:root {
  color-scheme: light;
  --paper: #ffffff;
  --soft: #f3f6fa;
  --surface: #ffffff;
  --hero-wash: linear-gradient(180deg, #eaf0fa 0%, #f6f9fd 24%, #ffffff 42%);
  --ink: #141821;
  --copy: #2f3644;
  --secondary: #525b6c;
  --muted: #646e82;
  --line: #d8dee8;
  --fine-line: #e4e9f1;
  --card-line: #d6dde8;
  --blue: #1a56db;
  --blue-hover: #1545b5;
  --blue-tint: rgba(26, 86, 219, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.88);
  --table-highlight: #f5f8fd;
  --badge-ink: #18794e;
  --badge-bg: rgba(24, 121, 78, 0.1);
  --strike-ink: #5d677a;
  --selection: #cfe1ff;
  --tag-new: #244ec9;
  --tag-new-bg: #ecf1fe;
  --tag-improve: #18794e;
  --tag-improve-bg: #eaf6f0;
  --tag-fix: #8f5300;
  --tag-fix-bg: #fef2de;
  --tag-secure: #5d43b5;
  --tag-secure-bg: #efeafd;
  --ink-2: var(--secondary);
  --ink-3: var(--muted);
  --accent: var(--blue);
  --green: var(--badge-ink);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  /* Strict 3-size body scale below hero */
  --text-heading: clamp(1.65rem, 2.5vw, 2.25rem);
  --text-body: 1rem;
  --text-sm: 0.875rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #151517;
  --soft: #1d2027;
  --surface: #22262f;
  --hero-wash: linear-gradient(180deg, #1b2232 0%, #171a22 56%, #151517 100%);
  --ink: #f3f5f9;
  --copy: #cfd5e2;
  --secondary: #a8b1c2;
  --muted: #8f99ad;
  --line: #323846;
  --fine-line: #2b303c;
  --card-line: #343b4a;
  --blue: #7ab3ff;
  --blue-hover: #9ec6ff;
  --blue-tint: rgba(122, 179, 255, 0.14);
  --nav-bg: rgba(21, 21, 23, 0.88);
  --table-highlight: #1f2430;
  --badge-ink: #6ee7b7;
  --badge-bg: rgba(52, 211, 153, 0.14);
  --strike-ink: #8d97ab;
  --selection: #244a75;
  --tag-new: #aec2ff;
  --tag-new-bg: #26304d;
  --tag-improve: #7ee2b8;
  --tag-improve-bg: #19342a;
  --tag-fix: #f3c27e;
  --tag-fix-bg: #3b2d1d;
  --tag-secure: #cab8ff;
  --tag-secure-bg: #302744;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: #151517;
    --soft: #1d2027;
    --surface: #22262f;
    --hero-wash: linear-gradient(180deg, #1b2232 0%, #171a22 56%, #151517 100%);
    --ink: #f3f5f9;
    --copy: #cfd5e2;
    --secondary: #a8b1c2;
    --muted: #8f99ad;
    --line: #323846;
    --fine-line: #2b303c;
    --card-line: #343b4a;
    --blue: #7ab3ff;
    --blue-hover: #9ec6ff;
    --blue-tint: rgba(122, 179, 255, 0.14);
    --nav-bg: rgba(21, 21, 23, 0.88);
    --table-highlight: #1f2430;
    --badge-ink: #6ee7b7;
    --badge-bg: rgba(52, 211, 153, 0.14);
    --strike-ink: #7d8698;
    --selection: #244a75;
    --tag-new: #aec2ff;
    --tag-new-bg: #26304d;
    --tag-improve: #7ee2b8;
    --tag-improve-bg: #19342a;
    --tag-fix: #f3c27e;
    --tag-fix-bg: #3b2d1d;
    --tag-secure: #cab8ff;
    --tag-secure-bg: #302744;
  }
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}

::selection {
  background: var(--selection);
  color: var(--ink);
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 160ms var(--ease-out);
}

a:hover {
  color: var(--blue-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

button, input {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

img, video {
  max-width: 100%;
  display: block;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[role="tab"]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
  border-radius: 6px;
}

.container {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: 32px;
}

.skip-link {
  position: absolute;
  left: 20px;
  top: -80px;
  z-index: 200;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: var(--text-sm);
}

.skip-link:focus {
  top: 10px;
}

/* Single-line top navigation; borderless at top on home hero, crisp separation once scrolled */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--fine-line);
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}

.home-page .navbar {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.home-page[data-scrolled="true"] .navbar {
  background: var(--nav-bg);
  border-bottom-color: var(--fine-line);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.navbar-inner {
  width: min(1200px, 100%);
  height: 64px;
  margin-inline: auto;
  padding-inline: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.portal-return {
  font-size: var(--text-sm);
  color: var(--secondary);
  white-space: nowrap;
}

.portal-return:hover {
  color: var(--ink);
  text-decoration: none;
}

.brand-sep {
  color: var(--muted);
  opacity: 0.55;
  font-size: var(--text-sm);
  user-select: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--ink);
  white-space: nowrap;
}

.brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: var(--text-sm);
}

.nav-link {
  color: var(--secondary);
  font-weight: 500;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--ink);
  text-decoration: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--secondary);
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.theme-toggle:hover {
  background: var(--soft);
  color: var(--ink);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .theme-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .theme-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .theme-moon {
  display: block;
}

html:not([data-theme]) .theme-toggle {
  display: none;
}

/* Buttons: primary action only, clean radius, brisk transitions */
.button,
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 12px 24px;
  min-height: 44px;
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  background: #1a56db;
  color: #ffffff;
  border: 1px solid transparent;
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}

:root[data-theme="dark"] .button,
:root[data-theme="dark"] .btn {
  background: #2563eb;
  color: #ffffff;
}

.button:hover,
.btn:hover {
  background: #1545b5;
  color: #ffffff;
  text-decoration: none;
}

:root[data-theme="dark"] .button:hover,
:root[data-theme="dark"] .btn:hover {
  background: #3b82f6;
}

.button:active,
.btn:active {
  transform: translateY(1px);
}

.button-small,
.btn-sm {
  font-size: var(--text-sm);
  min-height: 36px;
  padding: 7px 16px;
  border-radius: 8px;
}

.text-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: var(--text-body);
  font-weight: 500;
}

/* Hero: full-bleed wash from y=0 behind borderless header, centered monumental H1 + wide stage */
.hero-surface {
  background: var(--hero-wash);
  margin-top: -64px;
  padding-top: 64px;
}

.hero {
  padding: clamp(44px, 6vw, 76px) 0 clamp(44px, 5vw, 64px);
  text-align: center;
}

.hero-head {
  max-width: 860px;
  margin-inline: auto;
}

.hero h1 {
  font-size: clamp(2.65rem, 5.8vw, 4.75rem);
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-feature-settings: "halt" 1;
  color: var(--ink);
  text-wrap: balance;
}

.hero-sub {
  font-size: var(--text-body);
  line-height: 1.75;
  color: var(--secondary);
  max-width: 31em;
  margin: 20px auto 0;
  text-wrap: pretty;
}

.hero-cta {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.hero-stage {
  width: min(1140px, 100%);
  margin: clamp(32px, 4.5vw, 48px) auto 0;
  padding-inline: 24px;
}

.hero-device {
  margin: 0;
}

.hero-device-image {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10.6;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

.hero-device-image picture {
  display: block;
}

.hero-device-image img {
  position: absolute;
  max-width: none;
  width: 122%;
  height: auto;
  left: -11%;
  top: -4%;
}

.product-caption {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: 14px;
  text-align: center;
}

/* Shared section rhythm & strict 3-size body discipline */
.section {
  padding: clamp(68px, 8vw, 104px) 0;
}

.section h2 {
  font-size: var(--text-heading);
  font-weight: 680;
  line-height: 1.24;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}

.section-intro {
  color: var(--secondary);
  font-size: var(--text-body);
  line-height: 1.75;
  max-width: 58ch;
  margin-top: 14px;
}

/* Interactive AI Streaming Diff Workbench */
.ai-workbench-section {
  border-top: 1px solid var(--fine-line);
}

.ai-workbench-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
  max-width: 920px;
}

.ai-workbench-head .section-intro {
  max-width: 48ch;
}

.ai-skill-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--soft);
  border: 1px solid var(--fine-line);
  gap: 2px;
}

.ai-skill-tab {
  border: 0;
  background: transparent;
  color: var(--secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 7px;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.ai-skill-tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ai-sheet {
  margin-top: 32px;
  max-width: 920px;
  padding: clamp(24px, 3.5vw, 38px);
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px -22px rgba(15, 23, 42, 0.1);
}

.ai-sheet-prose {
  max-width: 72ch;
  font-size: var(--text-body);
  line-height: 1.85;
  color: var(--copy);
}

.ai-diff-old {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  color: var(--strike-ink);
}

.ai-sheet[data-accepted="true"] .ai-diff-old {
  display: none;
}

.ai-diff-new {
  display: block;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--badge-bg);
  box-shadow: inset 3px 0 0 var(--badge-ink);
  color: var(--badge-ink);
  font-size: var(--text-body);
  line-height: 1.75;
}

.ai-sheet[data-accepted="true"] .ai-diff-new {
  margin-top: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
}

.ai-diff-bar {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--fine-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: var(--text-sm);
  color: var(--secondary);
}

.ai-diff-bar strong {
  color: var(--ink);
  font-weight: 600;
}

.ai-diff-toggle {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--badge-ink);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 5px 12px;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.ai-diff-toggle:hover {
  background: var(--badge-bg);
}

/* Asymmetric X Article & GitHub Book Capture Section */
.capture-section {
  background: var(--soft);
}

.capture-layout {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: clamp(36px, 5vw, 72px);
}

.capture-steps {
  list-style: none;
  margin: 28px 0;
  display: grid;
  gap: 20px;
}

.capture-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: baseline;
}

.capture-steps li > span {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
}

.capture-steps strong {
  display: block;
  font-size: var(--text-body);
  font-weight: 650;
  color: var(--ink);
}

.capture-steps p {
  font-size: var(--text-body);
  color: var(--secondary);
  line-height: 1.7;
  margin-top: 4px;
  max-width: 52ch;
}

.capture-preview {
  min-width: 0;
}

.capture-document {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.capture-document-top {
  padding: 12px 20px;
  border-bottom: 1px solid var(--fine-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: var(--text-sm);
  color: var(--secondary);
  font-family: var(--font-mono);
}

.capture-document-body {
  padding: 28px 26px 24px;
}

.capture-document h3 {
  font-size: var(--text-body);
  font-weight: 680;
  line-height: 1.5;
  color: var(--ink);
}

.capture-source {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: 8px;
}

.capture-document-body > p:not(.capture-source) {
  font-size: var(--text-body);
  line-height: 1.75;
  color: var(--copy);
  margin-top: 16px;
  max-width: 54ch;
}

.capture-files {
  border-top: 1px solid var(--fine-line);
  margin-top: 22px;
  padding-top: 14px;
  display: flex;
  gap: 20px;
  font-size: var(--text-sm);
  color: var(--secondary);
  font-family: var(--font-mono);
}

.capture-preview figcaption {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: 14px;
}

/* Capabilities Grid: clean 1px hairlines, zero fake numbering */
.feature-heading {
  max-width: 60ch;
}

.feature-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 40px;
  margin-top: 44px;
}

.feature {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.feature h3 {
  font-size: var(--text-body);
  font-weight: 680;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 8px;
}

.feature p {
  font-size: var(--text-body);
  color: var(--secondary);
  line-height: 1.75;
  max-width: 48ch;
}

.feature a {
  font-size: var(--text-sm);
  font-weight: 500;
  display: inline-block;
  margin-top: 14px;
}

.feature-more {
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--secondary);
  border-top: 1px solid var(--fine-line);
  margin-top: 40px;
  padding-top: 20px;
}

/* Product Film Stage */
.film-section {
  background: var(--soft);
}

.film-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.film-heading p {
  font-size: var(--text-body);
  color: var(--secondary);
  max-width: 42ch;
}

.video-shell {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #0f1420;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--card-line);
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-caption {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  color: var(--secondary);
  font-size: var(--text-sm);
  margin-top: 14px;
}

.video-fallback {
  display: none;
  margin-top: 12px;
  font-size: var(--text-body);
}

.video-fallback.visible {
  display: block;
}

/* Download Stage */
.download-heading {
  max-width: 60ch;
}

.version-note {
  font-size: var(--text-sm);
  color: var(--secondary);
  margin-top: 10px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 40px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.download-platform {
  padding: 28px 28px 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.download-platform:first-child {
  padding-left: 0;
}

.download-platform:last-child {
  padding-right: 0;
}

.download-platform + .download-platform {
  border-left: 1px solid var(--line);
}

.platform-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.platform-symbol {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
}

.platform-symbol svg {
  width: 22px;
  height: 22px;
}

.download-platform h3 {
  font-size: var(--text-body);
  font-weight: 680;
  line-height: 1.4;
}

.recommended-note {
  font-size: var(--text-sm);
  color: var(--blue);
  font-weight: 500;
  display: none;
  margin-left: auto;
}

.download-platform.recommended .recommended-note {
  display: inline;
}

.download-platform p {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--secondary);
  margin-top: 12px;
  line-height: 1.75;
}

.package-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.download-platform .package-link {
  font-size: var(--text-body);
  font-weight: 600;
  display: inline-block;
}

/* CLI & Agent Download Methods */
.download-methods {
  margin-top: 44px;
  scroll-margin-top: 84px;
}

.download-methods-heading h3 {
  font-size: var(--text-body);
  font-weight: 680;
  color: var(--ink);
}

.download-methods-heading p {
  font-size: var(--text-body);
  color: var(--secondary);
  margin-top: 6px;
  max-width: 60ch;
}

.download-methods-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  margin-top: 24px;
}

.download-method {
  min-width: 0;
}

.download-method h4 {
  font-size: var(--text-body);
  font-weight: 650;
  color: var(--ink);
}

.download-method > p {
  font-size: var(--text-sm);
  color: var(--secondary);
  margin-top: 6px;
  line-height: 1.75;
}

.download-example-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--secondary);
  margin-top: 18px;
}

.copy-example {
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 5px 12px;
  min-height: 32px;
  font-size: var(--text-sm);
  color: var(--blue);
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.copy-example:hover {
  background: var(--soft);
}

.download-method .download-example {
  margin: 8px 0 0;
  font-size: var(--text-sm);
  line-height: 1.7;
  padding: 16px 18px;
  max-width: 100%;
}

.download-agent-prompt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.download-method .download-method-note,
.download-methods-footnote,
.download-copy-status {
  font-size: var(--text-sm);
  color: var(--secondary);
  margin-top: 14px;
  line-height: 1.75;
}

.download-copy-status {
  min-height: 1.6em;
  margin-top: 6px;
}

.download-help {
  font-size: var(--text-sm);
  color: var(--secondary);
  max-width: 65ch;
  margin-top: 32px;
  line-height: 1.85;
}

.download-help a {
  white-space: nowrap;
}

.upgrade-note {
  margin-top: 24px;
  padding: 18px 22px;
  background: var(--soft);
  border-radius: 12px;
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--secondary);
  max-width: 68ch;
}

.upgrade-note strong {
  color: var(--ink);
  font-weight: 650;
  margin-right: 6px;
}

/* FAQ Section */
.faq-section {
  border-top: 1px solid var(--fine-line);
}

.faq-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.8fr;
  gap: 56px;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 32px 20px 0;
  position: relative;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--ink);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--secondary);
  font-weight: 400;
  position: absolute;
  right: 0;
  top: 16px;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-answer {
  font-size: var(--text-body);
  color: var(--secondary);
  line-height: 1.8;
  padding: 0 20px 22px 0;
  max-width: 62ch;
}

.faq-more {
  font-size: var(--text-sm);
  margin-top: 16px;
}

/* Footer */
.footer {
  background: var(--soft);
  color: var(--secondary);
  padding: 32px 0;
  font-size: var(--text-sm);
  line-height: 1.8;
  border-top: 1px solid var(--fine-line);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.footer-name {
  font-size: var(--text-body);
  color: var(--ink);
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--secondary);
}

.footer a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Guide & Compare reading pages: open directly into live document sheet, same 3-size body scale */
.guide-page,
.compare-page {
  font-size: var(--text-body);
}

.subnav {
  background: var(--paper);
  border-bottom: 1px solid var(--fine-line);
  position: sticky;
  top: 64px;
  z-index: 40;
}

.subnav-links {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  list-style: none;
  padding: 13px 0;
  font-size: var(--text-sm);
  white-space: nowrap;
}

.subnav a {
  color: var(--secondary);
  font-weight: 500;
}

.subnav a:hover {
  color: var(--ink);
  text-decoration: none;
}

.guide-body {
  padding-bottom: 64px;
  min-width: 0;
}

.doc-intro,
.intro {
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--line);
}

.doc-intro h1,
.intro h1 {
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  letter-spacing: -0.04em;
  line-height: 1.2;
  font-weight: 700;
  max-width: 26ch;
}

.doc-intro p,
.intro .lead {
  font-size: var(--text-body);
  line-height: 1.8;
  color: var(--secondary);
  max-width: 62ch;
  margin-top: 14px;
}

.intro .note {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: 12px;
}

.doc-section,
section.block {
  padding: 40px 0;
  border-bottom: 1px solid var(--fine-line);
  min-width: 0;
  scroll-margin-top: 132px;
}

.doc-section h2,
section.block h2 {
  font-size: var(--text-heading);
  line-height: 1.3;
  font-weight: 680;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.doc-section h3 {
  font-size: var(--text-body);
  font-weight: 680;
  color: var(--ink);
  margin: 26px 0 8px;
}

.doc-section p,
.doc-section ul,
.doc-section ol,
section.block > p {
  font-size: var(--text-body);
  margin-bottom: 14px;
  color: var(--copy);
  line-height: 1.8;
  max-width: 65ch;
}

.doc-section ul,
.doc-section ol {
  padding-left: 22px;
}

.doc-section li {
  margin: 6px 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--soft);
  padding: 2px 6px;
  border-radius: 5px;
  overflow-wrap: anywhere;
}

pre {
  font-family: var(--font-mono);
  margin: 16px 0;
  padding: 18px 20px;
  background: var(--soft);
  border: 1px solid var(--fine-line);
  border-radius: 10px;
  overflow: auto;
  font-size: var(--text-sm);
  line-height: 1.75;
  letter-spacing: 0;
}

pre code {
  padding: 0;
  background: none;
  overflow-wrap: normal;
  font-size: inherit;
}

.agent-prompt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.callout {
  background: var(--soft);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 18px 0;
  font-size: var(--text-body);
  max-width: 65ch;
}

.hash-scroll,
.table-wrapper {
  overflow: auto;
  width: 100%;
  margin: 18px 0;
  border-top: 1px solid var(--line);
}

.hash-table,
.compare-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--text-sm);
}

.compare-table {
  min-width: 780px;
}

.hash-table th,
.hash-table td,
.compare-table th,
.compare-table td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--fine-line);
  vertical-align: top;
  line-height: 1.65;
}

.hash-table th,
.compare-table th {
  font-weight: 600;
  color: var(--ink);
  background: var(--soft);
  white-space: nowrap;
}

.hash-table td:last-child {
  width: 38%;
}

.hash-table code {
  font-size: 0.8125rem;
  padding: 0;
  background: none;
  word-break: break-all;
}

.highlight-col {
  background: var(--table-highlight);
}

kbd {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.card {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.card h3 {
  font-size: var(--text-body);
  font-weight: 680;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 8px;
}

.card p,
.pair ul,
.pair .who {
  font-size: var(--text-body);
  color: var(--secondary);
  line-height: 1.75;
}

.pairs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
}

.pair {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.pair h3 {
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--ink);
}

.pair .role {
  font-size: var(--text-sm);
  color: var(--muted);
  margin: 4px 0 14px;
}

.pair ul {
  padding-left: 20px;
}

.pair li {
  margin: 5px 0;
}

.pair .who {
  font-size: var(--text-sm);
  margin-top: 14px;
}

.faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 40px;
}

.qa {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.qa h3 {
  font-size: var(--text-body);
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 8px;
}

.qa p {
  font-size: var(--text-body);
  color: var(--secondary);
  line-height: 1.75;
}

.cta {
  padding: 36px 40px;
  background: var(--soft);
  border-radius: 16px;
  margin: 36px 0 64px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.cta h2 {
  font-size: var(--text-heading);
  font-weight: 680;
}

.cta p {
  font-size: var(--text-body);
  color: var(--secondary);
  margin-top: 8px;
}

/* Changelog dark/light token bridge */
html #changelog .lg {
  --lg-card: var(--surface);
  --lg-ink: var(--ink);
  --lg-ink2: var(--secondary);
  --lg-ink3: var(--muted);
  --lg-line: var(--line);
}

html #changelog .lg-badge {
  color: var(--badge-ink);
  background: var(--badge-bg);
}

html #changelog .lg-tag,
html #changelog .lg-cat,
html #changelog .lg-older > summary span {
  background: var(--soft);
}

html #changelog .lg-new,
html #changelog .lg-cat.lg-new {
  color: var(--tag-new);
  background: var(--tag-new-bg);
}

html #changelog .lg-improve,
html #changelog .lg-cat.lg-improve {
  color: var(--tag-improve);
  background: var(--tag-improve-bg);
}

html #changelog .lg-fix,
html #changelog .lg-cat.lg-fix {
  color: var(--tag-fix);
  background: var(--tag-fix-bg);
}

html #changelog .lg-secure,
html #changelog .lg-cat.lg-secure {
  color: var(--tag-secure);
  background: var(--tag-secure-bg);
}

html #changelog .lg-row:hover {
  border-color: var(--blue);
}

/* Responsive layouts */
@media (max-width: 900px) {
  .capture-layout,
  .download-methods-grid,
  .faq-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature-columns,
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  :root {
    --text-body: 0.9375rem;
    --text-sm: 0.8125rem;
  }

  html {
    scroll-padding-top: 72px;
  }

  .container,
  .navbar-inner {
    padding-inline: 20px;
  }

  .navbar-inner {
    height: 58px;
    gap: 10px;
  }

  .hero-surface {
    margin-top: -58px;
    padding-top: 58px;
  }

  .portal-return,
  .brand-sep,
  .nav-desktop {
    display: none;
  }

  .brand {
    font-size: 1.0625rem;
    gap: 8px;
  }

  .brand img {
    width: 24px;
    height: 24px;
  }

  .nav-links {
    gap: 12px;
  }

  .button-small,
  .btn-sm {
    padding: 6px 12px;
    min-height: 32px;
  }

  .hero {
    padding: 32px 0 40px;
  }

  .hero-stage {
    padding-inline: 16px;
  }

  .ai-workbench-head {
    gap: 20px;
  }

  .ai-sheet {
    margin-top: 20px;
    padding: 20px;
  }

  .feature-columns,
  .download-grid,
  .cards,
  .pairs,
  .faq {
    grid-template-columns: 1fr;
  }

  .download-platform,
  .download-platform:first-child,
  .download-platform:last-child {
    padding: 22px 0;
  }

  .download-platform + .download-platform {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .subnav {
    top: 58px;
  }

  .cta {
    padding: 24px;
  }
}

@media (max-width: 359px) {
  .nav-secondary {
    display: none;
  }

  .nav-links {
    gap: 8px;
  }
}

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

  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
