/* ==========================================================================
   PACA Design System — Dark Instrument Edition (designpaca pipeline)
   계기판처럼 정확한 · 단일 액센트 · 모노 수치 · 3종 라디우스 계약
   ========================================================================== */

:root {
  /* Surface Ladder (High-Contrast Obsidian Palette) */
  --bg-canvas: #08090d;
  --bg-subtle: #0d1017;
  --surface-1: #11141d;
  --surface-2: #161b28;
  --surface-3: #1e2538;
  --surface-4: #28324a;
  --surface-glass: rgba(13, 16, 23, 0.82);
  --surface-glass-strong: rgba(13, 16, 23, 0.94);

  /* Precise 1px Borders & Hairlines */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-highlight: rgba(255, 255, 255, 0.24);

  /* Typography Colors (WCAG AA Compliant on dark surfaces) */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #8fa0b5;
  --text-inverse: #08090d;

  /* Single Vibrant Accent */
  --accent: #3b82f6;
  --accent-bright: #60a5fa;
  --accent-hover: #2563eb;
  --accent-pressed: #1d4ed8;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --accent-glow: rgba(59, 130, 246, 0.25);
  --accent-border: rgba(59, 130, 246, 0.35);

  /* Semantic Feedback */
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);

  /* Typography Scale Tokens (Fluid Scale with Safe Fallbacks) */
  --step-0: clamp(0.75rem, 0.72rem + 0.15vw, 0.82rem);
  --step-1: clamp(0.85rem, 0.8rem + 0.25vw, 0.95rem);
  --step-2: clamp(1.00rem, 0.95rem + 0.35vw, 1.15rem);
  --step-3: clamp(1.25rem, 1.15rem + 0.6vw, 1.50rem);
  --step-4: clamp(1.90rem, 1.45rem + 1.7vw, 2.75rem);
  --step-5: clamp(2.75rem, 1.9rem + 3.6vw, 4.75rem);

  /* Spacing Tokens */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Shadows (Ultra-subtle, tinted) */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px -6px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.75);

  /* Standardized Corner Radii — 3종 계약 (sm: 입력·칩·kbd / md: 카드·패널 / pill: 버튼·알약) */
  --radius-pill: 9999px;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 4px;

  /* Band Rhythm — 섹션 표면 반전 (토큰 규칙에 정의된 리듬 반전) */
  --bg-band: #0a0d15;

  /* Layout Constants */
  --nav-h: 68px;
  --container-max: 1160px;
}

/* ── Reset & Global Primitives ────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-canvas);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ── Custom Sleek Scrollbar ───────────────────────────────────── */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:active {
  background: var(--accent);
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  font-family: "Wanted Sans Variable", "Wanted Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  min-height: 100dvh;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Accessibility Skip Link */
.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1000;
  padding: 10px 18px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  border-radius: var(--radius-md);
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* ── Typography System ────────────────────────────────────────── */
h1, h2, h3, h4 {
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }

/* 히어로 두 번쨰 줄 — 액센트 마커 (계기판 인디케이터) */
.h1-accent { color: var(--accent-bright); }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }

body {
  counter-reset: sec;
}

/* 섹션 인덱스 — 모노 계기판 넘버링 */
.section-head h2::before {
  counter-increment: sec;
  content: "0" counter(sec);
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

p {
  color: var(--text-secondary);
  font-weight: 400;
}

.sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 62ch;
}

.text-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

/* Semantic Color Classes */
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

/* Eyebrow Label Tag (Max 1 per major section) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}

/* Keyboard Shortcut Tag */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  line-height: 1;
}

/* Icon Primitive */
.icon {
  width: 1.2em;
  height: 1.2em;
  fill: currentColor;
  flex: none;
  display: inline-block;
  vertical-align: -0.2em;
}

/* ── Ambient Background Lighting ──────────────────────────────── */
.ambient-lighting {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 75%);
}

.ambient-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(720px circle at 72% 6%, rgba(59, 130, 246, 0.10), transparent 62%),
    radial-gradient(560px circle at 12% 34%, rgba(37, 99, 235, 0.05), transparent 65%);
}

/* ── Container Layout ─────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section-pad {
  padding-top: 100px;
  padding-bottom: 100px;
}

.band {
  background: var(--bg-band);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-head {
  margin-bottom: 48px;
}

.section-head--center {
  text-align: center;
}
.section-head--center .sub {
  margin-left: auto;
  margin-right: auto;
  margin-top: 14px;
}

/* ── Common Card Primitives (Design System) ───────────────────── */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  min-width: 0;
}

/* 기계식 코너 틱 — 계기판 마운팅 홀 */
.card::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--border-medium);
  border-right: 1px solid var(--border-medium);
  opacity: 0.6;
  pointer-events: none;
}

.card:hover::after {
  border-color: var(--accent);
  opacity: 1;
}

.card--subtle {
  background: var(--bg-subtle);
}

.card--inset {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.card--interactive:hover {
  border-color: var(--border-medium);
  background: var(--surface-2);
}

/* ── Scroll-Driven Progress Meter (R3) ─────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: scroll-progress-grow linear both;
    animation-timeline: scroll(root);
  }
}

@keyframes scroll-progress-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ── Common Button Components ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  line-height: 1;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--accent-hover);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn--primary:hover {
  background: var(--accent-pressed);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn--ghost {
  background: var(--surface-2);
  color: var(--text-primary);
  border-color: var(--border-medium);
}
.btn--ghost:hover {
  background: var(--surface-3);
  border-color: var(--border-highlight);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn__icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  font-size: 0.8em;
  margin-right: -4px;
}

/* ── Common Chip & Badge Primitives ───────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.chip--accent {
  background: var(--accent-soft);
  color: var(--accent-bright);
  border-color: var(--accent-border);
}

.chip--success {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.3);
}

.chip--warning {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.3);
}

.chip--subtle {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

/* ── Common Spec Grid & Row ───────────────────────────────────── */
.spec-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.spec-row span:first-child {
  color: var(--text-muted);
}
.spec-row span:last-child {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

/* ── Common Callout & Tip Box ─────────────────────────────────── */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.6;
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
}

.callout--tip {
  border-left: 3px solid var(--accent);
  background: rgba(59, 130, 246, 0.05);
}

.callout--info {
  border-left: 3px solid var(--success);
  background: rgba(16, 185, 129, 0.05);
}

/* ── Navigation (Fluid Island) ────────────────────────────────── */
.nav-wrapper {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 54px;
  padding: 0 10px 0 18px;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  max-width: var(--container-max);
  width: 100%;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.nav__logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 8px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav__link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}
.nav__link:hover, .nav__link[aria-current="page"] {
  color: var(--text-primary);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__hamburger {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  place-items: center;
}

/* Mobile Drawer Overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 13, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}

.mobile-menu-link {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ── Hero Section ─────────────────────────────────────────────── */
.hero {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 96px;
  position: relative;
}

.hero h1 {
  font-size: clamp(1.5rem, 0.3rem + 5.8vw, 5.2rem);
  margin-bottom: 56px;
}

.hero__lower {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}

.hero__lower > * {
  min-width: 0;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero__cta-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Multi-Tab Workstation Simulator ──────────────────────────── */
.simulator {
  background: var(--surface-1);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.18),
    0 8px 40px -8px rgba(59, 130, 246, 0.28),
    var(--shadow-lg);
  min-width: 0;
  transform: perspective(1400px) rotateY(-3deg) rotateX(0.6deg);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.simulator:hover {
  transform: perspective(1400px) rotateY(0deg) rotateX(0deg);
}

@media (prefers-reduced-motion: reduce) {
  .simulator { transform: none; }
  .simulator:hover { transform: none; }
}

.simulator-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px;
}

.simulator-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.simulator-title strong {
  color: var(--text-secondary);
  font-weight: 700;
}

@media (max-width: 768px) {
  .simulator-title { display: none; }
  .tab-bar {
    justify-content: center;
    width: 100%;
    border-radius: var(--radius-md);
  }
}

.tab-bar {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  background: var(--surface-1);
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  gap: 2px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 12px 16px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-secondary);
}

.tab-btn.is-active {
  background: var(--accent-hover);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.simulator-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
}
.tab-panel.is-active {
  display: flex;
}

/* Tab 1: Stream Sniffer */
.detection-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
}

.detection-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detection-pulse {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  animation: pulse-ring 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
  flex: none;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.active-download-box {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.download-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--surface-3);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width 0.6s ease;
}

.segment-visualizer {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 4px;
  margin-top: 8px;
}

.seg-block {
  height: 10px;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
}
.seg-block.done { background: var(--accent); }
.seg-block.active { background: var(--accent-bright); animation: blink 1s infinite alternate; }

@keyframes blink {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

.telemetry-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.sim-caption {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Tab 2: Segment Parallel Map Utilities */
.seg-grid-16 {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  background: var(--surface-2);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.seg-cell {
  height: 26px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
}
.seg-cell--done {
  background: var(--accent);
  color: var(--text-primary);
}
.seg-cell--active {
  background: var(--accent-bright);
  color: var(--text-primary);
  animation: blink 1s infinite alternate;
}
.seg-cell--pending {
  background: var(--surface-3);
  color: var(--text-muted);
}

/* Tab 3: Mobile QR Sync Utilities */
.qr-sync-container {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  align-items: center;
  background: var(--surface-2);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.qr-preview-box {
  width: 90px;
  height: 90px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 6px;
  display: grid;
  place-items: center;
}

.qr-preview-icon {
  width: 76px;
  height: 76px;
  color: #08090d;
}

/* ── Section 1: 3-Step Pipeline (How It Works) ────────────────── */
.pipeline-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--surface-2);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  color: var(--accent-bright);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
  font-size: 1.25rem;
}

/* ── Section 2: Comparison Matrix ─────────────────────────────── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.compare-card--legacy {
  border-color: rgba(239, 68, 68, 0.2);
}

.compare-card--modern {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, var(--surface-1), var(--surface-2));
}

.compare-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.compare-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compare-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  font-size: 0.9rem;
  align-items: flex-start;
}
.compare-item strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.compare-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.icon--cross { color: var(--danger); }
.icon--check { color: var(--success); }

/* ── Section 3: Bento Grid (Core Features) ────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.bento-cell--7 { grid-column: span 7; }
.bento-cell--5 { grid-column: span 5; }

.bento-cell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.bento-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--surface-2);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  color: var(--accent-bright);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
  margin-bottom: 16px;
}

.chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* ── Section 4: Mobile Companion Ecosystem ────────────────────── */
.mobile-showcase-hero {
  background: linear-gradient(180deg, transparent, rgba(13, 16, 23, 0.7) 40%, transparent);
}

.mobile-showcase {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.mobile-cards-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-stack-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
}

.feature-stack-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--surface-2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 1.3rem;
  flex: none;
}

/* ── Section 5: Platform Matrix ───────────────────────────────── */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 32px 20px;
}

.platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--surface-2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.6rem;
}

.platform-card p {
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ── Section 6: Bottom CTA Banner ─────────────────────────────── */
.cta-banner {
  text-align: center;
  padding: 64px 32px;
  background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.12), transparent 70%), var(--surface-1);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* ── Guide Page Layout ────────────────────────────────────────── */
.guide-header-pad {
  padding: calc(var(--nav-h) + 64px) 0 40px;
}

.guide-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: flex-start;
  padding-bottom: 80px;
}

.guide-toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
}

.guide-toc-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.guide-toc-link {
  font-size: 0.88rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.guide-toc-link:hover, .guide-toc-link.is-active {
  color: var(--text-primary);
  background: var(--surface-2);
}

.guide-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.guide-step-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-step-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.guide-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent-hover);
  color: #ffffff;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.9rem;
}

.guide-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.guide-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  font-size: 0.92rem;
  align-items: flex-start;
}

ul.guide-list > li::before {
  content: "✓";
  color: var(--accent-bright);
  font-weight: 700;
}

ol.guide-list {
  counter-reset: glist;
}

ol.guide-list > li::before {
  counter-increment: glist;
  content: counter(glist);
  color: var(--accent-bright);
  font-weight: 700;
}

/* ── Releases Page Layout ─────────────────────────────────────── */
.rel-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: flex-start;
  padding-bottom: 80px;
}

.rel-rail {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rel-rail__box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rel-rail__os {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.rel-rail__os:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}

.rel-featured {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rel-featured__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.rel-featured__tag {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.rel-featured__date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.rel-featured__notes {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.rel-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.rel-pill--pre {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.3);
}

.dl-groups {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 12px;
}

.dl-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dl-group__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.dl-group__sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: -4px;
}

.dl-asset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}
.dl-asset:hover {
  border-color: var(--border-medium);
  background: var(--surface-3);
}

.dl-asset__name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.dl-asset__size {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.dl-reco {
  box-shadow: 0 0 12px var(--accent-glow);
}

.link-inline {
  display: inline-block;
  padding: 4px 2px;
}

.rel-old {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rel-old details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  user-select: none;
}
.rel-old details summary::-webkit-details-marker {
  display: none;
}

.rel-old__body {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rel-empty {
  text-align: center;
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.rel-loading-box {
  text-align: center;
  padding: 60px 24px;
}

/* ── 404 Page Layout ──────────────────────────────────────────── */
.main-404-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
}

.empty-card-404 {
  max-width: 500px;
  width: 100%;
  padding: 56px 36px;
  text-align: center;
}

/* ── Legal Notice ─────────────────────────────────────────────── */
.legal-box {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  padding: 36px 40px;
}

.legal-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 20px;
}

.legal-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.legal-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 40px;
}

.legal-item dt {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.legal-item dd {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 0;
}

/* ── Footer ───────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  margin-top: 40px;
}

.footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text-primary);
}

.footer__links {
  display: flex;
  gap: 24px;
  color: var(--text-secondary);
}
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 6px 4px;
}
.footer__links a:hover {
  color: var(--text-primary);
}

.footer__copy {
  color: var(--text-muted);
}

/* ── Reveal Animations ────────────────────────────────────────── */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive Breakpoints ───────────────────────────────────── */
@media (max-width: 1024px) {
  .hero__lower {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .bento-cell--7, .bento-cell--5 {
    grid-column: span 12;
  }
  .mobile-showcase {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .guide-layout, .rel-layout {
    grid-template-columns: 1fr;
  }
  .guide-toc, .rel-rail {
    position: static;
  }
}

@media (max-width: 768px) {
  .legal-list {
    grid-template-columns: 1fr;
  }
  .legal-box {
    padding: 24px 20px;
  }
  .section-pad {
    padding-top: 64px;
    padding-bottom: 64px;
  }
  .nav__links, .nav__actions .btn {
    display: none;
  }
  .nav__hamburger {
    display: block;
  }
  .pipeline-rail {
    grid-template-columns: 1fr;
  }
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .platform-grid {
    grid-template-columns: 1fr;
  }
  .footer__row {
    flex-direction: column;
    align-items: flex-start;
  }
}
