/* ==========================================================================
   Dual Internet — Site components (nav, hero, sections, footer, page parts)
   ========================================================================== */

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-base) var(--ease-smooth),
              border-color var(--dur-base) var(--ease-smooth),
              box-shadow var(--dur-base) var(--ease-smooth),
              transform var(--dur-slow) var(--ease-out);
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom-color: var(--border-subtle);
  box-shadow: var(--shadow-2);
}
.nav.is-hidden { transform: translateY(-100%); }

.nav-inner {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.brand { display: inline-flex; align-items: center; gap: var(--sp-3); flex: none; }
.brand-mark {
  width: 34px; height: 34px;
  flex: none;
  transition: transform var(--dur-slow) var(--ease-spring);
}
.brand:hover .brand-mark { transform: rotate(-90deg); }
.brand-name {
  font-size: 1.02rem;
  font-weight: 660;
  letter-spacing: -0.03em;
  color: var(--fg);
  white-space: nowrap;
}
.brand-name b { font-weight: 660; color: var(--lane-a); }

.nav-links { display: flex; align-items: center; gap: var(--sp-1); margin-left: var(--sp-4); }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 38px;
  padding-inline: var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 520;
  color: var(--fg-muted);
  border-radius: var(--r-md);
  transition: color var(--dur-fast) var(--ease-smooth), background-color var(--dur-fast) var(--ease-smooth);
  white-space: nowrap;
}
.nav-link:hover { color: var(--fg); background: var(--surface-2); }
.nav-link[aria-current="page"] { color: var(--fg); font-weight: 600; }
.nav-link[aria-current="page"]::before {
  content: '';
  position: absolute;
  left: 50%; bottom: -1px;
  width: 18px; height: 2px;
  transform: translateX(-50%);
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--lane-a), var(--lane-b));
  animation: pop-in var(--dur-base) var(--ease-out);
}
.nav-actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }

/* Dropdown */
.nav-drop { position: relative; }
.nav-drop-btn svg.chev { width: 13px; height: 13px; transition: transform var(--dur-fast) var(--ease-out); opacity: 0.6; }
.nav-drop[data-open="true"] .nav-drop-btn svg.chev { transform: rotate(180deg); }
.nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 288px;
  padding: var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top left;
  transition: opacity var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              visibility var(--dur-fast);
}
.nav-drop[data-open="true"] .nav-drop-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.nav-drop-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  transition: background-color var(--dur-fast) var(--ease-smooth);
}
.nav-drop-item:hover { background: var(--surface-2); }
.nav-drop-item svg { width: 17px; height: 17px; color: var(--lane-a); margin-top: 3px; flex: none; }
.nav-drop-item strong { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--fg); }
.nav-drop-item span { display: block; font-size: var(--text-xs); color: var(--fg-subtle); line-height: 1.5; margin-top: 1px; }

/* Icon button (theme toggle, menu) */
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  color: var(--fg-muted);
  transition: background-color var(--dur-fast) var(--ease-smooth),
              color var(--dur-fast) var(--ease-smooth),
              border-color var(--dur-fast) var(--ease-smooth),
              transform var(--dur-fast) var(--ease-spring);
}
.icon-btn:hover { background: var(--surface-2); color: var(--fg); border-color: var(--border); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .ico-sun { display: none; }
[data-theme="light"] .theme-toggle .ico-sun { display: block; }
[data-theme="light"] .theme-toggle .ico-moon { display: none; }

/* Mobile */
.nav-burger { display: none; }
.nav-mobile {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: var(--z-overlay);
  background: var(--bg);
  padding: var(--sp-6) var(--gutter) var(--sp-12);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              visibility var(--dur-base);
  overscroll-behavior: contain;
}
.nav-mobile[data-open="true"] { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: var(--sp-3) var(--sp-2);
  font-size: var(--text-lg);
  font-weight: 560;
  color: var(--fg);
  border-bottom: 1px solid var(--border-subtle);
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), color var(--dur-fast) var(--ease-smooth);
}
.nav-mobile[data-open="true"] .nav-mobile-link { opacity: 1; transform: translateX(0); }
.nav-mobile-link svg { width: 17px; height: 17px; color: var(--fg-subtle); }
.nav-mobile-link:hover { color: var(--lane-a); }
.nav-mobile-group { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--fg-subtle); margin-top: var(--sp-6); margin-bottom: var(--sp-2); }

@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-burger { display: grid; }
  .nav-actions .btn-desktop { display: none; }
}
@media (min-width: 1081px) { .nav-mobile { display: none; } }

body.nav-open { overflow: hidden; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(3rem, 2rem + 5vw, 6.5rem));
  padding-bottom: var(--section-y);
  overflow: hidden;
  isolation: isolate;
}
.hero-glow-a { top: -12%; left: -8%; width: 46vw; height: 46vw; max-width: 640px; max-height: 640px; }
.hero-glow-b { bottom: -18%; right: -10%; width: 42vw; height: 42vw; max-width: 580px; max-height: 580px; }

.hero-inner { position: relative; z-index: 1; }
.hero-copy { max-width: 760px; }
.hero h1 { font-size: var(--text-5xl); margin-block: var(--sp-5) var(--sp-6); }
.hero .lead { font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); max-width: 60ch; }
.hero-cta { margin-top: var(--sp-8); }
.hero-meta { margin-top: var(--sp-6); font-size: var(--text-sm); color: var(--fg-subtle); }
.hero-meta .row { gap: var(--sp-5); }
.hero-meta-item { display: inline-flex; align-items: center; gap: var(--sp-2); }
.hero-meta-item svg { width: 15px; height: 15px; color: var(--accent); }

/* Announcement chip */
.announce {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.34rem 0.85rem 0.34rem 0.5rem;
  font-size: var(--text-xs);
  font-weight: 560;
  color: var(--fg-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  transition: border-color var(--dur-base) var(--ease-smooth), transform var(--dur-base) var(--ease-out);
}
.announce:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.announce .pill { padding: 0.12rem 0.5rem; font-size: var(--text-2xs); }
.announce svg { width: 13px; height: 13px; transition: transform var(--dur-base) var(--ease-out); }
.announce:hover svg { transform: translateX(3px); }

/* ==========================================================================
   Routing diagram (hero visual)
   ========================================================================== */
.diagram {
  position: relative;
  width: 100%;
  border-radius: var(--r-2xl);
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--lane-a) 7%, transparent), transparent 62%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-4);
  overflow: hidden;
}
.diagram-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.diagram-bar .code-dots i { width: 9px; height: 9px; }
.diagram-title { font-size: var(--text-xs); font-weight: 600; color: var(--fg-muted); font-family: 'JetBrains Mono', monospace; }
.diagram-body { padding: clamp(var(--sp-4), 3vw, var(--sp-8)); }
.diagram svg { width: 100%; height: auto; overflow: visible; }

.node-box { fill: var(--surface-2); stroke: var(--border); stroke-width: 1; }
.node-box-a { stroke: color-mix(in srgb, var(--lane-a) 55%, transparent); fill: color-mix(in srgb, var(--lane-a) 7%, var(--surface-2)); }
.node-box-b { stroke: color-mix(in srgb, var(--lane-b) 55%, transparent); fill: color-mix(in srgb, var(--lane-b) 7%, var(--surface-2)); }
.node-label { fill: var(--fg); font-size: 12px; font-weight: 600; font-family: 'Inter', sans-serif; }
.node-sub { fill: var(--fg-subtle); font-size: 10px; font-family: 'JetBrains Mono', monospace; }
.lane-path-a { stroke: var(--lane-a); stroke-width: 1.6; fill: none; opacity: 0.75; }
.lane-path-b { stroke: var(--lane-b); stroke-width: 1.6; fill: none; opacity: 0.75; }
.packet-a { fill: var(--lane-a); filter: drop-shadow(0 0 5px var(--lane-a)); }
.packet-b { fill: var(--lane-b); filter: drop-shadow(0 0 5px var(--lane-b)); }

/* ==========================================================================
   Stat band
   ========================================================================== */
.stat-band { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; background: var(--border-subtle); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.stat-cell { padding: var(--sp-6); background: var(--surface); text-align: center; transition: background-color var(--dur-base) var(--ease-smooth); }
.stat-cell:hover { background: var(--surface-2); }
.stat-num { font-size: var(--text-3xl); font-weight: 680; letter-spacing: -0.035em; line-height: 1; color: var(--fg); font-variant-numeric: tabular-nums; }
.stat-num .unit { font-size: 0.5em; color: var(--lane-a); margin-left: 2px; letter-spacing: 0; }
.stat-label { margin-top: var(--sp-2); font-size: var(--text-xs); font-weight: 560; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-subtle); }
@media (max-width: 760px) { .stat-band { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* ==========================================================================
   Feature bento
   ========================================================================== */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--sp-4); }
.bento > * { grid-column: span 2; }
.bento .span-3 { grid-column: span 3; }
.bento .span-4 { grid-column: span 4; }
.bento .span-6 { grid-column: span 6; }
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento > *, .bento .span-3, .bento .span-4, .bento .span-6 { grid-column: span 2; }
}
@media (max-width: 640px) { .bento { grid-template-columns: minmax(0, 1fr); } .bento > * { grid-column: span 1 !important; } }

.feature-card { display: flex; flex-direction: column; gap: var(--sp-4); overflow: hidden; }
.feature-card h3 { font-size: var(--text-lg); letter-spacing: -0.015em; }
.feature-card p { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.68; }
.feature-card .card-foot { margin-top: auto; padding-top: var(--sp-2); }

.feature-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.feature-list li { display: flex; align-items: flex-start; gap: var(--sp-3); font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.6; }
.feature-list svg { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 3px; }

/* ==========================================================================
   Steps / how it works
   ========================================================================== */
.steps { position: relative; display: flex; flex-direction: column; gap: var(--sp-8); }
.steps::before {
  content: '';
  position: absolute;
  left: 23px; top: 20px; bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--lane-a), var(--lane-b), transparent);
  opacity: 0.32;
  transform-origin: 50% 0;
  transform: scaleY(var(--step-progress, 1));
  transition: transform var(--dur-slower) var(--ease-out);
}
.step { display: flex; gap: var(--sp-5); position: relative; }
.step-num {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  flex: none;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--lane-a);
  font-variant-numeric: tabular-nums;
  z-index: 1;
  transition: transform var(--dur-base) var(--ease-spring),
              border-color var(--dur-base) var(--ease-smooth),
              box-shadow var(--dur-base) var(--ease-out),
              background-color var(--dur-base) var(--ease-smooth);
}
.step.in-view .step-num {
  border-color: color-mix(in srgb, var(--lane-a) 60%, transparent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--lane-a) 9%, transparent);
}
.step:hover .step-num { transform: scale(1.08); background: color-mix(in srgb, var(--lane-a) 10%, var(--surface)); }
.step-body { padding-top: var(--sp-2); min-width: 0; }
.step-body h3 { font-size: var(--text-lg); margin-bottom: var(--sp-2); }
.step-body p { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.7; max-width: 60ch; }
@media (max-width: 640px) { .steps::before { left: 19px; } .step-num { width: 40px; height: 40px; font-size: var(--text-xs); } }

/* ==========================================================================
   Tabs
   ========================================================================== */
.tabs { display: flex; flex-direction: column; gap: var(--sp-6); }
.tablist {
  display: flex;
  gap: var(--sp-1);
  padding: var(--sp-1);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
}
.tablist::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 42px;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 560;
  color: var(--fg-muted);
  border-radius: var(--r-md);
  white-space: nowrap;
  z-index: 1;
  transition: color var(--dur-fast) var(--ease-smooth);
}
.tab svg { width: 16px; height: 16px; }
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { color: var(--fg); font-weight: 620; }
.tab-thumb {
  position: absolute;
  top: var(--sp-1); left: 0;
  height: calc(100% - var(--sp-2));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  z-index: 0;
  transform: translateX(var(--tx, 0)) ;
  width: var(--tw, 0);
  transition: transform var(--dur-base) var(--ease-spring), width var(--dur-base) var(--ease-spring);
  pointer-events: none;
}
.tabpanel { animation: fade-in var(--dur-base) var(--ease-out); }
.tabpanel[hidden] { display: none; }

/* ==========================================================================
   Pricing
   ========================================================================== */
.billing-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  position: relative;
}
.billing-opt {
  position: relative;
  z-index: 1;
  min-height: 38px;
  padding: 0 var(--sp-5);
  font-size: var(--text-sm);
  font-weight: 580;
  color: var(--fg-muted);
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  transition: color var(--dur-fast) var(--ease-smooth);
}
.billing-opt[aria-pressed="true"] { color: var(--fg); }
.billing-thumb {
  position: absolute;
  top: var(--sp-1); left: var(--sp-1);
  height: calc(100% - var(--sp-2));
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  transform: translateX(var(--tx, 0));
  width: var(--tw, 0);
  transition: transform var(--dur-base) var(--ease-spring), width var(--dur-base) var(--ease-spring);
  pointer-events: none;
}

.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--sp-5); align-items: start; }
@media (max-width: 1000px) { .price-grid { grid-template-columns: minmax(0, 1fr); max-width: 480px; margin-inline: auto; } }

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-8) var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-smooth);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); border-color: var(--border-strong); }
.price-card.is-featured {
  border-color: color-mix(in srgb, var(--accent) 48%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent), var(--shadow-3);
  background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%), var(--surface);
}
.price-card.is-featured:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent), var(--shadow-4); }
.price-badge {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -50%);
  padding: 0.28rem 0.8rem;
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: var(--r-full);
  white-space: nowrap;
  box-shadow: 0 4px 14px -3px var(--glow-b);
}
.price-tier { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lane-a); }
.price-amount { display: flex; align-items: baseline; gap: var(--sp-2); flex-wrap: wrap; }
.price-value {
  font-size: clamp(2.25rem, 1.9rem + 1.6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  transition: opacity var(--dur-fast) var(--ease-smooth), transform var(--dur-fast) var(--ease-out);
}
.price-value.is-swapping { opacity: 0; transform: translateY(-8px); }
.price-period { font-size: var(--text-sm); color: var(--fg-subtle); }
.price-note { font-size: var(--text-xs); color: var(--fg-subtle); min-height: 1.2em; }
.price-desc { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.65; }
.price-features { display: flex; flex-direction: column; gap: var(--sp-3); font-size: var(--text-sm); }
.price-features li { display: flex; align-items: flex-start; gap: var(--sp-3); color: var(--fg-muted); line-height: 1.55; }
.price-features svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--accent); }
.price-features li.is-off { color: var(--fg-subtle); }
.price-features li.is-off svg { color: var(--fg-subtle); opacity: 0.6; }

/* Comparison table */
.cmp-check { color: var(--accent); }
.cmp-x { color: var(--fg-subtle); opacity: 0.55; }
table.data td svg, table.data th svg { width: 17px; height: 17px; }

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.acc { display: flex; flex-direction: column; gap: var(--sp-3); }
.acc-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--dur-base) var(--ease-smooth), background-color var(--dur-base) var(--ease-smooth);
}
.acc-item:hover { border-color: var(--border-strong); }
.acc-item.is-open { border-color: color-mix(in srgb, var(--lane-a) 40%, transparent); background: var(--surface-2); }
.acc-trigger {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  width: 100%;
  min-height: 60px;
  padding: var(--sp-4) var(--sp-5);
  text-align: left;
  font-size: var(--text-base);
  font-weight: 560;
  color: var(--fg);
  line-height: 1.5;
  transition: color var(--dur-fast) var(--ease-smooth);
}
.acc-trigger:hover { color: var(--lane-a); }
.acc-icon {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  flex: none;
  margin-left: auto;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  transition: transform var(--dur-base) var(--ease-spring),
              background-color var(--dur-base) var(--ease-smooth),
              color var(--dur-base) var(--ease-smooth),
              border-color var(--dur-base) var(--ease-smooth);
}
.acc-icon svg { width: 14px; height: 14px; }
.acc-item.is-open .acc-icon {
  transform: rotate(135deg);
  background: color-mix(in srgb, var(--lane-a) 14%, transparent);
  border-color: color-mix(in srgb, var(--lane-a) 45%, transparent);
  color: var(--lane-a);
}
.acc-inner { padding: 0 var(--sp-5) var(--sp-5); font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.75; }
.acc-inner > * + * { margin-top: var(--sp-3); }
.acc-inner code { font-size: 0.9em; }

/* FAQ filter */
.faq-search { position: relative; max-width: 520px; }
.faq-search svg.mag { position: absolute; left: var(--sp-4); top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--fg-subtle); pointer-events: none; }
.faq-search .input { padding-left: 3rem; min-height: 50px; }
.faq-empty { display: none; padding: var(--sp-10); text-align: center; color: var(--fg-subtle); }
.faq-empty svg { width: 34px; height: 34px; margin-inline: auto; margin-bottom: var(--sp-3); opacity: 0.5; }
.acc-item[hidden] { display: none; }

/* Chips row */
.chips { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.chip {
  min-height: 36px;
  padding: 0 var(--sp-4);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: 580;
  color: var(--fg-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  transition: all var(--dur-fast) var(--ease-smooth);
  white-space: nowrap;
}
.chip:hover { color: var(--fg); border-color: var(--border-strong); transform: translateY(-1px); }
.chip[aria-pressed="true"] {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

/* ==========================================================================
   Download page
   ========================================================================== */
.dl-hero-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--sp-8);
  align-items: center;
  padding: clamp(var(--sp-6), 4vw, var(--sp-12));
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  background: radial-gradient(100% 120% at 12% 0%, color-mix(in srgb, var(--lane-a) 9%, transparent), transparent 58%), var(--surface);
  box-shadow: var(--shadow-3);
}
@media (max-width: 900px) { .dl-hero-card { grid-template-columns: minmax(0, 1fr); } }

.dl-primary { display: flex; flex-direction: column; gap: var(--sp-5); }
.dl-file {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--surface-inset);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.dl-file-meta { min-width: 0; }
.dl-file-name { font-family: 'JetBrains Mono', monospace; font-size: var(--text-sm); font-weight: 560; color: var(--fg); overflow-wrap: anywhere; }
.dl-file-sub { font-size: var(--text-xs); color: var(--fg-subtle); margin-top: 2px; }

.hash-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-xs);
  color: var(--fg-muted);
}
.hash-row .hash-val { overflow-wrap: anywhere; min-width: 0; }
.hash-row .hash-key { color: var(--lane-a); font-weight: 600; flex: none; }

.req-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px,100%),1fr)); gap: 1px; background: var(--border-subtle); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.req-cell { padding: var(--sp-5); background: var(--surface); }
.req-key { font-size: var(--text-xs); font-weight: 620; letter-spacing: 0.07em; text-transform: uppercase; color: var(--fg-subtle); margin-bottom: var(--sp-2); }
.req-val { font-size: var(--text-sm); color: var(--fg); line-height: 1.6; }

/* Changelog */
.log-list { display: flex; flex-direction: column; gap: var(--sp-6); }
.log-item { display: grid; grid-template-columns: 168px 1fr; gap: var(--sp-6); padding-bottom: var(--sp-6); border-bottom: 1px solid var(--border-subtle); }
.log-item:last-child { border-bottom: 0; padding-bottom: 0; }
.log-ver { display: flex; flex-direction: column; gap: var(--sp-2); align-items: flex-start; }
.log-ver .v { font-family: 'JetBrains Mono', monospace; font-size: var(--text-lg); font-weight: 600; color: var(--fg); }
.log-ver .d { font-size: var(--text-xs); color: var(--fg-subtle); }
.log-body ul { display: flex; flex-direction: column; gap: var(--sp-2); }
.log-body li { display: flex; gap: var(--sp-3); font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.6; }
.log-tag { flex: none; font-family: 'JetBrains Mono', monospace; font-size: var(--text-2xs); font-weight: 700; padding: 0.1rem 0.42rem; border-radius: var(--r-sm); margin-top: 3px; min-width: 46px; text-align: center; }
.log-tag.add { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.log-tag.fix { background: color-mix(in srgb, var(--lane-a) 15%, transparent); color: var(--lane-a); }
.log-tag.chg { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); }
.log-tag.sec { background: color-mix(in srgb, var(--violet-400) 15%, transparent); color: var(--violet-400); }
@media (max-width: 700px) { .log-item { grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); } .log-ver { flex-direction: row; align-items: center; gap: var(--sp-3); } }

/* ==========================================================================
   Docs layout
   ========================================================================== */
.docs-layout { display: grid; grid-template-columns: 248px minmax(0,1fr) 208px; gap: var(--sp-10); align-items: start; }
@media (max-width: 1180px) { .docs-layout { grid-template-columns: 232px minmax(0,1fr); } .docs-toc { display: none; } }
@media (max-width: 860px) { .docs-layout { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); } .docs-side { position: static !important; max-height: none !important; } }

.docs-side {
  position: sticky;
  top: calc(var(--nav-h) + var(--sp-6));
  max-height: calc(100dvh - var(--nav-h) - var(--sp-12));
  overflow-y: auto;
  padding-right: var(--sp-2);
}
.docs-nav-group { margin-bottom: var(--sp-6); }
.docs-nav-title { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; color: var(--fg-subtle); margin-bottom: var(--sp-3); }
.docs-nav-link {
  display: block;
  padding: 0.45rem var(--sp-3);
  font-size: var(--text-sm);
  color: var(--fg-muted);
  border-left: 2px solid var(--border-subtle);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  transition: color var(--dur-fast) var(--ease-smooth),
              border-color var(--dur-fast) var(--ease-smooth),
              background-color var(--dur-fast) var(--ease-smooth),
              padding-left var(--dur-fast) var(--ease-out);
}
.docs-nav-link:hover { color: var(--fg); background: var(--surface-2); border-left-color: var(--border-strong); padding-left: var(--sp-4); }
.docs-nav-link.is-active { color: var(--lane-a); border-left-color: var(--lane-a); background: color-mix(in srgb, var(--lane-a) 7%, transparent); font-weight: 580; }

.docs-toc { position: sticky; top: calc(var(--nav-h) + var(--sp-6)); }
.docs-toc-title { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; color: var(--fg-subtle); margin-bottom: var(--sp-3); }
.docs-toc a {
  display: block;
  padding: 0.32rem 0;
  font-size: var(--text-xs);
  color: var(--fg-subtle);
  line-height: 1.5;
  transition: color var(--dur-fast) var(--ease-smooth), transform var(--dur-fast) var(--ease-out);
}
.docs-toc a:hover { color: var(--fg); transform: translateX(2px); }
.docs-toc a.is-active { color: var(--lane-a); font-weight: 600; }

.docs-main { min-width: 0; }

/* CLI reference rows */
.cmd-row {
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--dur-base) var(--ease-smooth), transform var(--dur-base) var(--ease-out);
}
.cmd-row:hover { border-color: var(--border-strong); transform: translateX(3px); }
.cmd-sig { font-family: 'JetBrains Mono', monospace; font-size: var(--text-sm); font-weight: 560; color: var(--lane-b); margin-bottom: var(--sp-2); overflow-wrap: anywhere; }
.cmd-desc { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.62; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--sp-10); align-items: start; }
@media (max-width: 980px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

.contact-card {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--dur-base) var(--ease-smooth), transform var(--dur-base) var(--ease-out);
}
.contact-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.contact-card h4 { font-size: var(--text-sm); margin-bottom: var(--sp-1); }
.contact-card p { font-size: var(--text-xs); color: var(--fg-muted); line-height: 1.6; }
.contact-card .link-arrow { margin-top: var(--sp-3); font-size: var(--text-xs); }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  position: relative;
  padding: clamp(var(--sp-10), 6vw, var(--sp-20)) var(--gutter);
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  background:
    radial-gradient(90% 130% at 12% 0%, color-mix(in srgb, var(--lane-a) 11%, transparent), transparent 55%),
    radial-gradient(80% 120% at 92% 100%, color-mix(in srgb, var(--lane-b) 11%, transparent), transparent 55%),
    var(--surface);
  overflow: hidden;
  text-align: center;
  isolation: isolate;
}
.cta-band h2 { font-size: var(--text-3xl); margin-bottom: var(--sp-4); }
.cta-band .lead { margin-inline: auto; margin-bottom: var(--sp-8); }
.cta-band > * { position: relative; z-index: 1; }

/* ==========================================================================
   Page header (sub-pages)
   ========================================================================== */
.page-head {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 2rem + 3.5vw, 5rem));
  padding-bottom: clamp(2rem, 1.5rem + 3vw, 4rem);
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--border-subtle);
}
.page-head-inner { position: relative; z-index: 1; }
.page-head h1 { font-size: var(--text-4xl); margin-block: var(--sp-4) var(--sp-5); }
.page-head .lead { font-size: var(--text-lg); }

.crumbs { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--text-xs); color: var(--fg-subtle); flex-wrap: wrap; }
.crumbs a { color: var(--fg-subtle); transition: color var(--dur-fast) var(--ease-smooth); }
.crumbs a:hover { color: var(--lane-a); }
.crumbs svg { width: 13px; height: 13px; opacity: 0.55; }
.crumbs [aria-current="page"] { color: var(--fg-muted); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { border-top: 1px solid var(--border-subtle); background: var(--bg-deep); padding-block: var(--sp-16) var(--sp-8); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: var(--sp-8); }
@media (max-width: 980px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand-col { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

.footer-brand-col { max-width: 320px; }
.footer-desc { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.65; margin-top: var(--sp-4); }
.footer-col-title { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; color: var(--fg); margin-bottom: var(--sp-4); }
.footer-links { display: flex; flex-direction: column; gap: var(--sp-1); }
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.3rem 0;
  font-size: var(--text-sm);
  color: var(--fg-muted);
  transition: color var(--dur-fast) var(--ease-smooth), transform var(--dur-fast) var(--ease-out);
  width: fit-content;
}
.footer-link:hover { color: var(--fg); transform: translateX(3px); }
.footer-link svg { width: 13px; height: 13px; opacity: 0.6; }

.footer-bottom {
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--fg-subtle);
}
.footer-legal { display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.footer-legal a { transition: color var(--dur-fast) var(--ease-smooth); }
.footer-legal a:hover { color: var(--fg-muted); }

.social-row { display: flex; gap: var(--sp-2); margin-top: var(--sp-5); }
.social-btn {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-muted);
  transition: color var(--dur-fast) var(--ease-smooth),
              border-color var(--dur-fast) var(--ease-smooth),
              transform var(--dur-fast) var(--ease-spring);
}
.social-btn:hover { color: var(--fg); border-color: var(--border-strong); transform: translateY(-2px); }
.social-btn:active { transform: scale(0.92); }
.social-btn svg { width: 17px; height: 17px; }

/* ==========================================================================
   Back to top
   ========================================================================== */
.to-top {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: var(--z-sticky);
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: var(--fg);
  box-shadow: var(--shadow-3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.85);
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-spring),
              visibility var(--dur-base),
              background-color var(--dur-fast) var(--ease-smooth);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.to-top:hover { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.to-top:active { transform: scale(0.9); }
.to-top svg { width: 19px; height: 19px; }
@media (max-width: 640px) { .to-top { bottom: var(--sp-4); right: var(--sp-4); width: 42px; height: 42px; } }

/* ==========================================================================
   Terminal simulation
   ========================================================================== */
.term { background: var(--surface-inset); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.term-body {
  padding: var(--sp-5);
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-sm);
  line-height: 1.85;
  min-height: 260px;
  overflow-x: auto;
}
.term-line { white-space: pre; }
.term-prompt { color: var(--accent); }
.term-path { color: var(--lane-a); }

/* ==========================================================================
   Adapter meter (live bandwidth mock)
   ========================================================================== */
.meter-card { padding: var(--sp-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.meter-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.meter-name { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--text-sm); font-weight: 600; }
.meter-val { font-family: 'JetBrains Mono', monospace; font-size: var(--text-sm); font-variant-numeric: tabular-nums; color: var(--fg-muted); }
.meter-track { height: 6px; background: var(--surface-inset); border-radius: var(--r-full); overflow: hidden; }
.meter-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--lane-a), var(--lane-b));
  transform-origin: 0 50%;
  transform: scaleX(var(--fill, 0));
  transition: transform 900ms var(--ease-smooth);
}
.meter-fill-a { background: linear-gradient(90deg, var(--cyan-600), var(--cyan-400)); }
.meter-fill-b { background: linear-gradient(90deg, var(--green-600), var(--green-400)); }
.spark { width: 100%; height: 42px; margin-top: var(--sp-3); }
.spark path { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   Guide cards
   ========================================================================== */
.guide-card { display: flex; flex-direction: column; gap: var(--sp-4); height: 100%; }
.guide-meta { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--text-xs); color: var(--fg-subtle); }
.guide-meta span { display: inline-flex; align-items: center; gap: var(--sp-1); }
.guide-meta svg { width: 13px; height: 13px; }
.guide-card h3 { font-size: var(--text-base); line-height: 1.42; }
.guide-card p { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.62; }

/* ==========================================================================
   License / legal helpers
   ========================================================================== */
.legal-meta {
  display: flex;
  gap: var(--sp-6);
  flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  font-size: var(--text-xs);
  color: var(--fg-muted);
}
.legal-meta b { color: var(--fg); font-weight: 620; }

.tier-note { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px,100%),1fr)); gap: var(--sp-4); }

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  .nav, .footer, .to-top, .scroll-progress, .bg-grid, .bg-orb, .bg-noise, .toast-region { display: none !important; }
  body { background: #fff; color: #000; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .card, .panel, .price-card { break-inside: avoid; border-color: #ccc; }
}
