/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg-page) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--border-1); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text-1); flex-shrink: 0; }
.logo__mark {
  width: 30px; height: 30px; display: block; object-fit: contain; flex-shrink: 0;
}
.logo b { color: var(--brand-600); font-weight: 700; }
.nav__links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  height: 36px; padding: 0 12px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-2); background: none; border: 0;
  transition: color .12s, background-color .12s;
}
.nav__link:hover, .nav__link[aria-expanded="true"] { color: var(--text-1); background: var(--bg-sunken); }
.nav__link.is-active { color: var(--text-1); font-weight: 600; }
.nav__link svg { width: 14px; height: 14px; transition: transform .15s; }
.nav__link[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.dropdown { position: relative; }
.dropdown__menu {
  position: absolute; top: calc(100% + 8px); left: -8px; width: 300px; padding: 6px;
  background: var(--bg-surface); border: 1px solid var(--border-1); border-radius: var(--radius);
  box-shadow: 0 16px 40px -12px rgb(16 19 28 / .18);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: all .15s var(--ease);
}
.dropdown__menu.is-open { opacity: 1; visibility: visible; transform: none; }
.dropdown__item { display: flex; gap: 12px; padding: 10px; border-radius: var(--radius-sm); }
.dropdown__item:hover { background: var(--bg-sunken); }
.dropdown__icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: 6px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.dropdown__icon svg { width: 16px; height: 16px; }
.dropdown__item strong { display: block; font-size: 14px; color: var(--text-1); font-weight: 600; line-height: 1.4; }
.dropdown__item span { display: block; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.icon-btn.nav__burger { display: none; }
.mobile-menu { display: none; }
.mobile-menu.is-open {
  display: block; position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49; overflow-y: auto;
  background: var(--bg-page); padding: 16px 20px 32px; border-top: 1px solid var(--border-1);
}
.mobile-menu a { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--border-1); font-size: 16px; color: var(--text-1); }
.mobile-menu a svg { width: 16px; height: 16px; color: var(--text-3); }
.mobile-menu .btn { width: 100%; margin-top: 20px; }

@media (max-width: 960px) {
  .nav__links, .nav__actions .btn--ghost { display: none; }
  .nav__inner { justify-content: space-between; }
  .icon-btn.nav__burger { display: inline-grid; }
}

@media (max-width: 520px) {
  #themeBtn { display: none; }
  .nav__actions .btn--ghost { display: none; }
  .nav__actions { gap: 4px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--radius); border: 1px solid transparent;
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: background-color .12s var(--ease), border-color .12s, color .12s, transform .12s var(--ease);
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.brand-icon { fill: currentColor; stroke: none; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn--primary { background: var(--brand-600); color: #fff; }
.btn--primary:hover { background: var(--brand-700); transform: translateY(-1px); }
[data-theme="dark"] .btn--primary { color: #07090f; }
.btn--secondary { background: var(--bg-surface); border-color: var(--border-2); color: var(--text-1); }
.btn--secondary:hover { border-color: var(--brand-400); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text-2); padding: 0 10px; height: 36px; }
.btn--ghost:hover { color: var(--brand-600); }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; flex-shrink: 0;
  border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--text-2);
  transition: background-color .12s, color .12s, border-color .12s;
}
.icon-btn:hover { background: var(--bg-sunken); color: var(--text-1); }
.icon-btn svg { width: 18px; height: 18px; }

/* Tooltip */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 8px); transform: translate(-50%, -2px);
  padding: 5px 8px; border-radius: 5px; background: #10131c; color: #eef1fc; font-size: 12px; font-weight: 500; line-height: 1.4;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s, transform .12s; z-index: 60;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Badges / chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 6px;
  border: 1px solid var(--border-1); border-radius: 999px; background: var(--bg-surface);
  font-size: 13px; color: var(--text-2); transition: border-color .12s;
}
.pill:hover { border-color: var(--border-2); }
.pill__tag { height: 20px; padding: 0 8px; border-radius: 999px; background: var(--brand-50); color: var(--brand-600); font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; }
.pill svg { width: 14px; height: 14px; color: var(--text-3); }
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 5px;
  font-size: 12px; font-weight: 500; background: var(--bg-sunken); color: var(--text-2); border: 1px solid var(--border-1);
}
.tag svg { width: 12px; height: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.dot--pulse { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Segmented control ---------- */
.segmented {
  position: relative; display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px;
  background: var(--bg-sunken); border: 1px solid var(--border-1);
}
.segmented__btn {
  position: relative; z-index: 1; height: 30px; padding: 0 12px; border: 0; border-radius: 6px; background: none;
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-3); transition: color .15s;
}
.segmented__btn svg { width: 14px; height: 14px; }
.segmented__btn[aria-selected="true"] { color: var(--text-1); }
.segmented__thumb {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; border-radius: 6px;
  background: var(--bg-surface); box-shadow: 0 1px 2px rgb(16 19 28 / .08), 0 0 0 1px var(--border-1);
  transition: transform .16s var(--ease), width .16s var(--ease);
}

/* ---------- Command copy bar ---------- */
.cmd { width: 100%; }
.cmd__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cmd__note { font-size: 12.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.cmd__note svg { width: 13px; height: 13px; }
.cmd__box {
  display: flex; align-items: stretch; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-sunken); border: 1px solid var(--border-1);
}
.cmd__code {
  flex: 1; min-width: 0; margin: 0; padding: 13px 16px; overflow-x: auto; white-space: pre;
  font: 450 13.5px/1.65 var(--font-mono); color: var(--text-1); scrollbar-width: thin;
}
.cmd__code .p { color: var(--text-3); user-select: none; }
.cmd__code .ph { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); border-radius: 3px; padding: 0 2px; }
.cmd__code .c { color: var(--text-3); }
.cmd__copy {
  width: 48px; flex-shrink: 0; border: 0; border-left: 1px solid var(--border-1); background: transparent;
  display: grid; place-items: center; color: var(--text-3); transition: color .12s, background-color .12s;
}
.cmd__copy:hover { color: var(--text-1); background: var(--bg-surface); }
.cmd__copy svg { width: 16px; height: 16px; }
.cmd__copy.is-done { color: var(--accent-cyan); }
.cmd--dark .cmd__box { background: var(--d-bg-surface); border-color: var(--d-border-1); }
.cmd--dark .cmd__code { color: var(--d-text-1); }
.cmd--dark .cmd__code .p, .cmd--dark .cmd__code .c { color: var(--d-text-3); }
.cmd--dark .cmd__copy { border-left-color: var(--d-border-1); color: var(--d-text-3); }
.cmd--dark .cmd__copy:hover { background: var(--d-bg-raised); color: var(--d-text-1); }
.cmd--dark .cmd__copy.is-done { color: var(--d-cyan); }
.cmd--dark .segmented { background: var(--d-bg-surface); border-color: var(--d-border-1); }
.cmd--dark .segmented__btn { color: var(--d-text-3); }
.cmd--dark .segmented__btn[aria-selected="true"] { color: var(--d-text-1); }
.cmd--dark .segmented__thumb { background: var(--d-bg-raised); box-shadow: 0 0 0 1px var(--d-border-1); }
.cmd--dark .cmd__note { color: var(--d-text-3); }

/* ---------- Product window ---------- */
.win {
  position: relative; border-radius: var(--radius-win); overflow: hidden;
  background: var(--d-bg-surface); border: 1px solid var(--d-border-1); box-shadow: var(--shadow-win);
  color: var(--d-text-2); font-size: 13px;
}
.win__bar {
  height: 36px; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; padding: 0 14px;
  background: var(--d-bg-raised); border-bottom: 1px solid var(--d-border-1);
}
.win__dots { display: flex; gap: 6px; }
.win__dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.win__dots i:nth-child(2) { background: #febc2e; }
.win__dots i:nth-child(3) { background: #28c840; }
.win__url {
  justify-self: center; display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px; border-radius: 5px;
  background: var(--d-bg-surface); color: var(--d-text-3); font: 12px/1 var(--font-mono); max-width: 100%; overflow: hidden; white-space: nowrap;
}
.win__url svg { width: 11px; height: 11px; color: var(--d-ok); flex-shrink: 0; }
.win__live { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--d-ok); font-family: var(--font-mono); }
.win__live .dot { background: var(--d-ok); width: 6px; height: 6px; }
.win__fade { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; background: linear-gradient(transparent, var(--d-bg-surface)); pointer-events: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-surface); border: 1px solid var(--border-1); border-radius: var(--radius);
  transition: border-color .18s, box-shadow .18s;
}
.card:hover { border-color: var(--border-2); box-shadow: var(--shadow-hover); }
.icon-tile {
  width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--brand-50); color: var(--brand-600);
}
.icon-tile svg { width: 18px; height: 18px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.6; }
.check-list svg { width: 16px; height: 16px; margin-top: 3px; color: var(--ok); flex-shrink: 0; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--brand-600); }
.link-arrow svg { width: 14px; height: 14px; transition: transform .12s; }
.link-arrow:hover svg { transform: translateX(2px); }

/* ---------- CTA band + Footer ---------- */
.cta-band { padding: 104px 0; text-align: center; border-top: 1px solid var(--border-1); }
.cta-band .h2 { font-size: 40px; }
.cta-band .actions { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.footer { border-top: 1px solid var(--border-1); padding: 64px 0 28px; background: var(--bg-surface); }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer__brand p { margin-top: 14px; font-size: 13.5px; color: var(--text-3); max-width: 30ch; }
.footer h4 { font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { font-size: 13.5px; color: var(--text-3); }
.footer ul a:hover { color: var(--text-1); }
.footer__bottom {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border-1);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3);
}
.footer__bottom .meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.status-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.status-link:hover { color: var(--text-1); }

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .cta-band { padding: 80px 0; }
  .cta-band .h2 { font-size: 30px; }
}
