:root {
  color-scheme: light;
  --ink: #0e1714;
  --ink-soft: #1f2e29;
  --paper: #f3f5f4;
  --paper-deep: #e6ebe8;
  --mist: #d5ddd8;
  --teal: #0f766e;
  --teal-bright: #14b8a6;
  --teal-hover: #5eead4;
  --teal-wash: rgba(20, 184, 166, 0.14);
  --steel: #16364a;
  --hero-deep: #121f24;
  --foam: #f0fdfa;
  --line: rgba(14, 23, 20, 0.12);
  --shadow: 0 18px 40px rgba(14, 23, 20, 0.08);
  --surface: color-mix(in srgb, var(--paper) 88%, white);
  --header-bg: color-mix(in srgb, var(--paper) 82%, transparent);
  --body-spot-a: rgba(20, 184, 166, 0.12);
  --body-spot-b: rgba(30, 58, 76, 0.1);
  /* Text on filled controls (always readable) */
  --on-accent: #0e1714;
  --on-inverse: #f0fdfa;
  --terminal-bg: #0e1714;
  --terminal-fg: #b7f7e8;
  --terminal-border: rgba(20, 184, 166, 0.22);
  --radius: 4px;
  --radius-logo: 8px;
  --radius-mark: 7px;
  --radius-hair: 1px;
  --font-display: "Syne", "IBM Plex Sans Thai", sans-serif;
  --font-body: "Manrope", "IBM Plex Sans Thai", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  /* Modular steps ≥1.25× apart — avoid flat 12–20px cluster */
  --text-xs: 0.75rem; /* 12 */
  --text-sm: 0.875rem; /* 14 */
  --text-md: 1.125rem; /* 18 */
  --text-lg: 1.4375rem; /* 23 */
  --text-xl: 1.8125rem; /* 29 */
  --text-meta: var(--text-sm);
  --text-ui: var(--text-sm);
  --text-nav: var(--text-sm);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;
  --shell: min(1120px, calc(100% - 48px));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8f2ee;
  --ink-soft: #b4c5be;
  --paper: #0e1714;
  --paper-deep: #121f1b;
  --mist: #1a2823;
  --teal: #2dd4bf;
  --teal-bright: #2dd4bf;
  --teal-hover: #5eead4;
  --teal-wash: rgba(45, 212, 191, 0.14);
  --steel: #7dd3c7;
  --hero-deep: #121f24;
  --foam: #f0fdfa;
  --line: rgba(232, 242, 238, 0.12);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --surface: color-mix(in srgb, var(--paper-deep) 88%, black);
  --header-bg: color-mix(in srgb, var(--paper) 78%, transparent);
  --body-spot-a: rgba(45, 212, 191, 0.1);
  --body-spot-b: rgba(30, 58, 76, 0.28);
  --on-accent: #0e1714;
  --on-inverse: #0e1714;
  --terminal-bg: #071210;
  --terminal-fg: #ccfbf1;
  --terminal-border: rgba(45, 212, 191, 0.28);
}

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

html {
  scroll-behavior: smooth;
}

html.lenis,
html.lenis body {
  scroll-behavior: auto;
}

html.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

html[lang="th"] {
  --font-display: "IBM Plex Sans Thai", "Syne", sans-serif;
  --font-body: "IBM Plex Sans Thai", "Manrope", sans-serif;
}

html[lang="th"] .hero__brand,
html[lang="th"] .brand-mark__text,
html[lang="th"] .footer-brand {
  font-family: "Syne", "IBM Plex Sans Thai", sans-serif;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--body-spot-a), transparent 55%),
    radial-gradient(900px 500px at 100% 20%, var(--body-spot-b), transparent 50%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 220ms var(--ease),
    color 220ms var(--ease);
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--teal-wash);
  padding: 0.12em 0.35em;
  border-radius: var(--radius);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -48px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--ink);
  color: var(--on-inverse);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: var(--space-4);
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.shell.narrow {
  max-width: 720px;
}

/* Header */

.site-header {
  --chrome-fg: var(--ink);
  --chrome-fg-soft: var(--ink-soft);
  --chrome-bg: var(--header-bg);
  --chrome-line: var(--line);
  --chrome-hover-bg: color-mix(in srgb, var(--ink) 8%, transparent);
  --chrome-active-bg: var(--ink);
  --chrome-active-fg: var(--on-inverse);
  --chrome-cta-border: var(--ink);
  --chrome-cta-fg: var(--ink);
  --chrome-cta-hover-bg: var(--ink);
  --chrome-cta-hover-fg: var(--on-inverse);

  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: var(--chrome-bg);
  border-bottom: 1px solid var(--chrome-line);
  color: var(--chrome-fg);
  transition:
    background 180ms var(--ease),
    border-color 180ms var(--ease),
    color 180ms var(--ease);
}

/* Over dark hero: flip chrome tokens (light theme was ~1.3:1 on dark). */
.site-header.is-over-hero {
  --chrome-fg: var(--foam);
  --chrome-fg-soft: color-mix(in srgb, var(--foam) 82%, transparent);
  --chrome-bg: color-mix(in srgb, var(--hero-deep) 78%, transparent);
  --chrome-line: color-mix(in srgb, var(--foam) 16%, transparent);
  --chrome-hover-bg: color-mix(in srgb, var(--foam) 12%, transparent);
  --chrome-active-bg: var(--foam);
  --chrome-active-fg: var(--hero-deep);
  --chrome-cta-border: color-mix(in srgb, var(--foam) 55%, transparent);
  --chrome-cta-fg: var(--foam);
  --chrome-cta-hover-bg: var(--foam);
  --chrome-cta-hover-fg: var(--hero-deep);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: var(--space-6);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.lang-switch__btn {
  min-width: 40px;
  min-height: 36px;
  padding: 0 var(--space-3);
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-nav);
  font-weight: 500;
  cursor: pointer;
  transition:
    background 180ms var(--ease),
    color 180ms var(--ease);
}

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

.lang-switch__btn.is-active {
  background: var(--ink);
  color: var(--on-inverse);
}

.lang-switch__btn:hover,
.lang-switch__btn:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.lang-switch__btn.is-active:hover,
.lang-switch__btn.is-active:focus-visible {
  color: var(--on-inverse);
  background: var(--ink);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    background 180ms var(--ease),
    color 180ms var(--ease),
    border-color 180ms var(--ease);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  border-color: color-mix(in srgb, var(--ink) 35%, var(--line));
}

/* Header chrome tokens win over base control colors (incl. is-over-hero). */
.site-header .theme-toggle,
.site-header .nav-toggle {
  color: var(--chrome-fg-soft);
  border-color: var(--chrome-line);
}

.site-header .theme-toggle:hover,
.site-header .theme-toggle:focus-visible,
.site-header .nav-toggle:hover,
.site-header .nav-toggle:focus-visible {
  color: var(--chrome-fg);
  background: var(--chrome-hover-bg);
  border-color: color-mix(in srgb, var(--chrome-fg) 35%, var(--chrome-line));
}

.site-header .lang-switch {
  border-color: var(--chrome-line);
}

.site-header .lang-switch__btn {
  color: var(--chrome-fg-soft);
}

.site-header .lang-switch__btn + .lang-switch__btn {
  border-left-color: var(--chrome-line);
}

.site-header .lang-switch__btn.is-active {
  background: var(--chrome-active-bg);
  color: var(--chrome-active-fg);
}

.site-header .lang-switch__btn:hover,
.site-header .lang-switch__btn:focus-visible {
  color: var(--chrome-fg);
  background: var(--chrome-hover-bg);
}

.site-header .lang-switch__btn.is-active:hover,
.site-header .lang-switch__btn.is-active:focus-visible {
  color: var(--chrome-active-fg);
  background: var(--chrome-active-bg);
}

.site-header .site-nav a {
  color: var(--chrome-fg-soft);
}

.site-header .site-nav a:hover,
.site-header .site-nav a:focus-visible {
  color: var(--chrome-fg);
}

.site-header .nav-cta {
  border-color: var(--chrome-cta-border);
  color: var(--chrome-cta-fg) !important;
}

.site-header .nav-cta:hover,
.site-header .nav-cta:focus-visible {
  background: var(--chrome-cta-hover-bg);
  color: var(--chrome-cta-hover-fg) !important;
}

.site-header .brand-mark {
  color: var(--chrome-fg);
}

.theme-toggle__icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

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

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-md);
  letter-spacing: -0.02em;
}

.brand-mark__logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-logo);
  flex-shrink: 0;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent);
}

.brand-mark__glyph {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-bright), var(--steel));
  box-shadow: 0 0 0 4px var(--teal-wash);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-size: var(--text-meta);
  font-weight: 500;
}

.site-nav a {
  text-decoration: none;
  /* Color from .site-header --chrome-* tokens */
  transition: color 180ms var(--ease);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--chrome-fg);
}

.nav-cta {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--chrome-cta-border);
  border-radius: var(--radius);
  color: var(--chrome-cta-fg) !important;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--chrome-cta-hover-bg);
  color: var(--chrome-cta-hover-fg) !important;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition:
    background 180ms var(--ease),
    border-color 180ms var(--ease);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  border-color: color-mix(in srgb, var(--ink) 35%, var(--line));
  outline: none;
}

.nav-toggle__bars {
  display: grid;
  gap: 5px;
  width: 18px;
}

.nav-toggle__bars span {
  display: block;
  height: 1.75px;
  border-radius: 1px;
  background: currentColor;
  transition:
    transform 220ms var(--ease),
    opacity 180ms var(--ease);
  transform-origin: center;
}

.site-header.is-nav-open .nav-toggle__bars span:nth-child(1) {
  transform: translateY(6.75px) rotate(45deg);
}

.site-header.is-nav-open .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.site-header.is-nav-open .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-6.75px) rotate(-45deg);
}

/* Hero atmosphere (fixed WebGL) + content band */

.hero-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  height: 100svh;
  pointer-events: none;
  opacity: var(--hero-atmosphere-opacity, 1);
  transform: translate3d(0, var(--hero-atmosphere-shift, 0px), 0)
    scale(var(--hero-atmosphere-scale, 1));
  transform-origin: 68% 45%;
}

.hero-atmosphere.is-scrubbing {
  will-change: opacity, transform;
}

.hero-atmosphere.is-settled {
  visibility: hidden;
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 1;
  min-height: min(100svh, 880px);
  display: grid;
  align-items: end;
  overflow: clip;
  color: var(--foam);
  background: transparent;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--hero-deep);
  opacity: calc(1 - var(--hero-atmosphere-opacity, 1));
}

.hero__plane {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 42% 48% at 68% 45%, rgba(20, 184, 166, 0.28), transparent 58%),
    radial-gradient(ellipse 50% 40% at 30% 55%, rgba(15, 118, 110, 0.12), transparent 55%),
    linear-gradient(155deg, #0e1714 0%, #121f24 45%, #0e1714 100%);
}

.hero__wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 36% 40% at 68% 46%, rgba(20, 184, 166, 0.14), transparent 70%),
    linear-gradient(90deg, rgba(14, 23, 20, 0.72) 0%, rgba(14, 23, 20, 0.35) 42%, transparent 70%),
    linear-gradient(180deg, rgba(14, 23, 20, 0.25) 0%, transparent 30%, rgba(14, 23, 20, 0.55) 100%);
  pointer-events: none;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  opacity: 1;
  pointer-events: none;
  filter: none;
}

.hero__noise {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: clamp(96px, 16vh, 140px) 0 var(--space-10);
}

.hero__content > * {
  max-width: 640px;
}

.hero__brand {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-shadow: 0 0 40px rgba(20, 184, 166, 0.25);
  opacity: 0;
  transform: translateY(24px);
  animation: rise 900ms var(--ease) 80ms forwards;
}

.hero__company {
  margin: 0 0 var(--space-6);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: -0.01em;
  text-transform: none;
  color: color-mix(in srgb, var(--foam) 88%, transparent);
  opacity: 0;
  transform: translateY(24px);
  animation: rise 900ms var(--ease) 160ms forwards;
}

.hero__headline {
  margin: 0 0 var(--space-5);
  max-width: 16ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  opacity: 0;
  transform: translateY(24px);
  animation: rise 900ms var(--ease) 220ms forwards;
}

.hero__lede {
  margin: 0 0 var(--space-7);
  max-width: 42ch;
  font-size: var(--text-md);
  color: color-mix(in srgb, var(--foam) 92%, transparent);
  opacity: 0;
  transform: translateY(24px);
  animation: rise 900ms var(--ease) 360ms forwards;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  opacity: 0;
  transform: translateY(24px);
  animation: rise 900ms var(--ease) 480ms forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-6);
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  transition:
    background 180ms var(--ease),
    color 180ms var(--ease),
    border-color 180ms var(--ease),
    transform 180ms var(--ease);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

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

.btn--primary {
  background: var(--teal-bright);
  color: var(--on-accent);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--teal-hover);
  color: var(--on-accent);
}

.btn--ghost {
  border-color: color-mix(in srgb, var(--foam) 45%, transparent);
  color: var(--foam);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--foam);
  background: color-mix(in srgb, var(--foam) 12%, transparent);
  color: var(--foam);
}

.section--start .btn--ghost {
  border-color: var(--ink);
  color: var(--ink);
}

.section--start .btn--ghost:hover,
.section--start .btn--ghost:focus-visible {
  background: var(--ink);
  color: var(--on-inverse);
}

/* Sections (below hero) — Taste variance: distinct layout family per band */

.section {
  position: relative;
  z-index: 1;
  /* Full-bleed band; 24px+ gutters so tinted sections never flush text to the edge */
  padding: clamp(64px, 9vw, 104px) clamp(24px, 4vw, 48px);
  scroll-margin-top: 80px;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}

.section > .shell,
.section .shell {
  width: 100%;
  max-width: 1120px;
}

.section--problem.manifesto {
  padding: clamp(72px, 11vw, 112px) clamp(24px, 4vw, 48px);
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

/* Must beat .section--problem.manifesto background (paper) or foam text vanishes in light. */
.section.section--problem.manifesto.manifesto--break {
  border-top: 0;
  background: var(--hero-deep);
  color: var(--foam);
}

.section.section--problem.manifesto.manifesto--break .section__title,
.section.section--problem.manifesto.manifesto--break .manifesto__title {
  color: var(--foam);
}

.section.section--problem.manifesto.manifesto--break .section__lede,
.section.section--problem.manifesto.manifesto--break .manifesto__lede {
  color: color-mix(in srgb, var(--foam) 94%, transparent);
  border-left-color: var(--teal-bright);
}

.section.section--problem.manifesto.manifesto--break .manifesto__index {
  /* Solid mix (no opacity) so large watermark text stays ≥ ~3:1 on --hero-deep */
  color: color-mix(in srgb, var(--teal-bright) 62%, var(--foam));
  opacity: 1;
}

html[data-theme="dark"] .section.section--problem.manifesto.manifesto--break .manifesto__index {
  color: color-mix(in srgb, var(--teal-bright) 55%, var(--foam));
}

html[data-theme="dark"] .section.section--problem.manifesto.manifesto--break {
  background: color-mix(in srgb, var(--terminal-bg) 88%, var(--teal));
}

.section--knowledge {
  border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  padding-bottom: clamp(56px, 8vw, 88px);
  background: var(--paper);
}

.knowledge-proof {
  /* Bleed to section edges while the section keeps detector-safe gutters */
  margin: var(--space-8) calc(-1 * clamp(24px, 4vw, 48px)) var(--space-9);
  padding: var(--space-8) clamp(24px, 4vw, 48px);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--paper-deep) 80%, var(--teal-wash)) 0%,
      color-mix(in srgb, var(--surface) 90%, transparent) 100%
    );
  border-block: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.section--knowledge > .shell:last-child {
  padding-bottom: 0;
}

.section--how {
  border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  background: var(--paper-deep);
}

.section--tools {
  border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  background: var(--paper);
}

.section--start.start-band {
  border-top: 1px solid var(--line);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--steel) 8%, var(--paper)) 0%,
      var(--surface) 100%
    );
}

.section__title {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-wrap: balance;
}

.section__lede {
  margin: 0 0 var(--space-8);
  max-width: 50ch;
  color: var(--ink-soft);
  font-size: var(--text-md);
  text-wrap: pretty;
}

.manifesto__grid {
  display: grid;
  gap: var(--space-7);
  align-items: end;
}

@media (min-width: 900px) {
  .manifesto__grid {
    grid-template-columns: minmax(72px, 0.22fr) minmax(0, 1fr);
    gap: var(--space-9);
    align-items: start;
  }
}

.manifesto__index {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: color-mix(in srgb, var(--teal) 48%, var(--steel));
  opacity: 1;
  user-select: none;
}

html[data-theme="dark"] .manifesto__index {
  color: color-mix(in srgb, var(--teal) 58%, var(--foam));
}

.manifesto__title {
  max-width: 14ch;
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  margin-bottom: var(--space-6);
}

.manifesto__lede {
  margin-bottom: 0;
  max-width: 42ch;
  margin-left: clamp(0px, 4vw, 48px);
  padding-left: var(--space-5);
  border-left: 2px solid var(--teal);
}

.knowledge-head {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

@media (min-width: 900px) {
  .knowledge-head {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--space-9);
    align-items: end;
  }

  .knowledge-head .section__title {
    margin-bottom: 0;
    max-width: 16ch;
  }

  .knowledge-head .section__lede {
    margin: 0;
    justify-self: end;
    text-align: left;
  }
}

.section--knowledge .section__lede {
  margin-bottom: 0;
}

.how-layout {
  display: grid;
  gap: var(--space-8);
  align-items: start;
}

@media (min-width: 900px) {
  .how-layout {
    grid-template-columns: minmax(200px, 0.38fr) minmax(0, 1fr);
    gap: var(--space-10);
  }

  .how-layout--spread {
    grid-template-columns: minmax(180px, 0.28fr) minmax(0, 1fr);
    gap: clamp(48px, 6vw, 96px);
  }

  .how__rail {
    position: sticky;
    top: 96px;
  }

  .how__rail .section__lede {
    margin-bottom: 0;
    max-width: 28ch;
  }
}

.flow--zigzag .flow__step:nth-child(1) {
  max-width: 52ch;
}

.flow--zigzag .flow__step:nth-child(2) {
  margin-left: clamp(0px, 8vw, 96px);
  max-width: 52ch;
}

.flow--zigzag .flow__step:nth-child(3) {
  margin-left: clamp(0px, 3vw, 40px);
  max-width: 58ch;
}

.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.flow__step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--space-6);
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--line);
}

.flow__step:nth-child(even) {
  padding-left: clamp(0px, 3vw, 28px);
}

.flow__mark {
  width: 3px;
  min-height: 2.75rem;
  margin-top: 0.35rem;
  border-radius: var(--radius-hair);
  background: var(--teal);
  justify-self: start;
}

.flow__step:nth-child(2) .flow__mark {
  background: color-mix(in srgb, var(--teal) 55%, var(--steel));
}

.flow__step:nth-child(3) .flow__mark {
  background: var(--steel);
}

html[data-theme="dark"] .flow__step:nth-child(3) .flow__mark {
  background: color-mix(in srgb, var(--steel) 65%, var(--teal));
}

.flow__step h3 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
}

.flow__step p {
  margin: 0;
  max-width: 58ch;
  color: var(--ink-soft);
  line-height: 1.65;
}

.tools-intro {
  margin-bottom: var(--space-8);
}

@media (min-width: 900px) {
  .tools-intro {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--space-8);
    align-items: end;
  }

  .tools-intro .section__title {
    margin-bottom: 0;
    max-width: 12ch;
  }

  .tools-intro .section__lede {
    margin-bottom: 0;
  }
}

.tools-featured {
  display: grid;
  gap: var(--space-5);
  margin: 0 0 var(--space-9);
  padding: 0 0 var(--space-8);
  list-style: none;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 800px) {
  .tools-featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-7);
    align-items: start;
  }

  .tools-featured__item:nth-child(2) {
    margin-top: var(--space-7);
  }

  .tools-featured__item:nth-child(3) {
    margin-top: var(--space-3);
  }
}

.tools-featured__item {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.tools-featured__item code {
  display: block;
  margin: 0 0 var(--space-3);
  padding: 0 0 var(--space-3);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: transparent;
  color: var(--teal);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  overflow-wrap: anywhere;
}

.tools-featured__item p {
  margin: 0;
  max-width: 28ch;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: var(--text-meta);
}

.tools-layout {
  display: grid;
  gap: var(--space-8);
  align-items: start;
}

@media (min-width: 900px) {
  .tools-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.75fr);
    gap: var(--space-9);
  }

  .tools-layout--invert {
    grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  }

  .tool-shortcuts {
    margin-top: 0;
    padding: var(--space-6);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    position: sticky;
    top: 88px;
    background: color-mix(in srgb, var(--surface) 80%, transparent);
  }
}

.tool-grid {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.tool-row {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: var(--space-5);
  align-items: baseline;
  padding: var(--space-4) var(--space-3);
  margin-inline: calc(var(--space-3) * -1);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
  transition: background 160ms var(--ease);
}

.tool-row:hover {
  background: color-mix(in srgb, var(--teal-wash) 55%, transparent);
}

.tool-row code {
  background: transparent;
  padding: 0;
  color: var(--teal);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.tool-row span {
  color: var(--ink-soft);
  line-height: 1.5;
}

.tool-shortcuts {
  margin-top: var(--space-8);
  padding: var(--space-6) 0 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 900px) {
  .tools-layout--invert .tool-shortcuts {
    margin-top: 0;
    border-top: 0;
  }
}

.tool-shortcuts__title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.tool-shortcuts__body {
  margin: 0;
  max-width: 62ch;
  color: var(--ink-soft);
  line-height: 1.6;
}

.knowledge-total {
  margin: 0 0 var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--teal);
  min-height: 1.5em;
}

.knowledge-total.is-loading {
  color: var(--ink-soft);
}

.knowledge-total.is-error {
  color: var(--ink-soft);
  max-width: 48ch;
  line-height: 1.5;
}

.knowledge-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8) var(--space-6);
  margin: 0;
  padding: var(--space-6) 0 0;
  list-style: none;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  min-height: 4.5rem;
}

.knowledge-stats:empty {
  display: none;
}

.knowledge-stat {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  border: 0;
  min-width: 0;
}

.knowledge-stat:nth-child(odd) {
  transform: translateY(0);
}

@media (min-width: 900px) {
  .knowledge-stat:nth-child(2),
  .knowledge-stat:nth-child(4) {
    transform: translateY(var(--space-5));
  }
}

.knowledge-stat__count {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.knowledge-stat__label {
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.knowledge-stat__id {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--teal);
}

.pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8) var(--space-7);
  border-top: 1px solid var(--line);
  padding-top: var(--space-8);
}

.pillars--asymmetric {
  grid-template-columns: 1fr;
  gap: var(--space-7);
}

@media (min-width: 900px) {
  .pillars--asymmetric {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-8) var(--space-7);
    align-items: start;
  }

  .pillars--asymmetric .pillars__lead {
    padding-right: var(--space-6);
    border-right: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  }

  .pillars--asymmetric .pillars__lead h3 {
    font-size: clamp(1.35rem, 2vw, 1.65rem);
  }

  .pillars--asymmetric .pillars__lead p {
    max-width: 36ch;
  }
}

.pillars li {
  min-width: 0;
  padding-top: var(--space-1);
}

.pillars h3 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}

.pillars p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.knowledge-packs {
  margin: var(--space-9) 0 0;
  padding: var(--space-5) 0 0;
  max-width: 52rem;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.6;
  border-top: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  background: transparent;
}

.start-band__grid {
  display: grid;
  gap: var(--space-8);
  align-items: start;
}

@media (min-width: 900px) {
  .start-band__grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: var(--space-9);
    align-items: stretch;
  }

  .start-band__grid--terminal-lead {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }

  .start-band__copy .section__lede {
    max-width: 40ch;
  }

  .start-band .terminal {
    margin: 0;
    height: 100%;
    align-self: stretch;
  }
}

.terminal {
  margin: 0 0 var(--space-6);
  padding: var(--space-6);
  overflow-x: auto;
  background: var(--terminal-bg);
  color: var(--terminal-fg);
  border: 1px solid var(--terminal-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.75;
}

.terminal:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 3px;
}

.terminal code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.start-note {
  margin: 0 0 var(--space-7);
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.6;
  max-width: 48ch;
}

.start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: var(--space-8) 0;
  background: var(--paper-deep);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer-left {
  display: grid;
  gap: var(--space-2);
}

.footer-brand {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-brand__logo {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-mark);
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.footer-credit {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.footer-credit a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--teal) 55%, transparent);
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.footer-agent {
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
}

.footer-agent a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--teal) 40%, transparent);
}

.footer-agent a:hover,
.footer-agent a:focus-visible {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

/* Consent (analytics) */

.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: var(--space-4) 0 calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--paper) 94%, var(--teal-wash));
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.consent-banner[hidden] {
  display: none !important;
}

.consent-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.consent-banner__title {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-md);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.consent-banner__body {
  margin: 0;
  max-width: 52ch;
  font-size: var(--text-sm);
  color: var(--ink-soft);
  line-height: 1.5;
}

.consent-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.consent-banner .btn--ghost {
  border-color: var(--ink);
  color: var(--ink);
}

.consent-banner .btn--ghost:hover,
.consent-banner .btn--ghost:focus-visible {
  background: var(--ink);
  color: var(--on-inverse);
}

/* Reveal */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 700ms var(--ease),
    transform 700ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Floating back-to-top */

.back-top {
  position: fixed;
  right: max(var(--space-4), env(safe-area-inset-right, 0px));
  bottom: max(var(--space-5), calc(env(safe-area-inset-bottom, 0px) + var(--space-4)));
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--teal-bright) 45%, var(--line));
  background: color-mix(in srgb, var(--paper) 88%, var(--teal-bright));
  color: var(--ink);
  box-shadow: var(--shadow);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 220ms var(--ease),
    transform 220ms var(--ease),
    visibility 220ms var(--ease),
    background 180ms var(--ease),
    color 180ms var(--ease),
    border-color 180ms var(--ease);
}

.back-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.back-top:hover,
.back-top:focus-visible {
  background: var(--teal-bright);
  color: var(--on-accent);
  border-color: var(--teal-bright);
  outline: none;
}

.back-top:focus-visible {
  box-shadow:
    var(--shadow),
    0 0 0 3px color-mix(in srgb, var(--teal-bright) 35%, transparent);
}

.back-top__icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-theme="dark"] .back-top {
  background: color-mix(in srgb, var(--paper-deep) 78%, var(--teal-bright));
  color: var(--foam);
  border-color: color-mix(in srgb, var(--teal-bright) 55%, var(--line));
}

html[data-theme="dark"] .back-top:hover,
html[data-theme="dark"] .back-top:focus-visible {
  background: var(--teal-bright);
  color: var(--on-accent);
  border-color: var(--teal-bright);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 840px) {
  :root {
    --shell: min(1120px, calc(100% - 28px));
  }

  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-header.is-nav-open .site-nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    padding: var(--space-4) var(--space-4) var(--space-5);
    background: var(--paper);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  /* Open sheet always uses paper + ink — never foam-on-dark menu text. */
  .site-header.is-over-hero.is-nav-open .site-nav a {
    color: var(--ink);
  }

  .site-header.is-over-hero.is-nav-open .site-nav a:hover,
  .site-header.is-over-hero.is-nav-open .site-nav a:focus-visible {
    color: var(--ink);
    background: color-mix(in srgb, var(--ink) 8%, transparent);
  }

  .site-header.is-over-hero.is-nav-open .site-nav .nav-cta {
    border-color: var(--teal-bright);
    background: var(--teal-bright);
    color: var(--on-accent) !important;
  }

  .site-header.is-over-hero.is-nav-open .site-nav .nav-cta:hover,
  .site-header.is-over-hero.is-nav-open .site-nav .nav-cta:focus-visible {
    background: var(--teal-hover);
    color: var(--on-accent) !important;
  }

  .site-header.is-nav-open .site-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    color: var(--ink);
    font-size: var(--text-md);
  }

  .site-header.is-nav-open .site-nav a:hover,
  .site-header.is-nav-open .site-nav a:focus-visible {
    background: color-mix(in srgb, var(--ink) 8%, transparent);
  }

  .site-header.is-nav-open .site-nav .nav-cta {
    justify-content: center;
    margin-top: var(--space-2);
    border-color: var(--teal-bright);
    background: var(--teal-bright);
    color: var(--on-accent) !important;
  }

  .site-header.is-nav-open .site-nav .nav-cta:hover,
  .site-header.is-nav-open .site-nav .nav-cta:focus-visible {
    background: var(--teal-hover);
    color: var(--on-accent) !important;
  }

  .header-inner {
    min-height: 56px;
    gap: var(--space-3);
    position: relative;
  }

  .header-actions {
    gap: var(--space-2);
    flex-shrink: 0;
  }

  .brand-mark__text {
    font-size: var(--text-sm);
  }

  .hero {
    min-height: min(100svh, 760px);
    align-items: end;
  }

  .hero__canvas {
    opacity: 0.72;
  }

  .hero__wash {
    background:
      radial-gradient(ellipse 55% 42% at 70% 28%, rgba(20, 184, 166, 0.18), transparent 65%),
      linear-gradient(105deg, rgba(14, 23, 20, 0.82) 0%, rgba(14, 23, 20, 0.55) 48%, rgba(14, 23, 20, 0.35) 100%),
      linear-gradient(180deg, rgba(14, 23, 20, 0.35) 0%, rgba(14, 23, 20, 0.55) 42%, rgba(14, 23, 20, 0.9) 100%);
  }

  .hero__content {
    padding: clamp(88px, 14vh, 120px) 0 var(--space-9);
  }

  .hero__brand {
    font-size: clamp(2.2rem, 9.5vw, 3.2rem);
    max-width: 100%;
    white-space: nowrap;
    letter-spacing: -0.04em;
    text-shadow:
      0 0 28px rgba(14, 23, 20, 0.55),
      0 2px 18px rgba(14, 23, 20, 0.65);
  }

  .hero__company {
    letter-spacing: -0.01em;
  }

  .hero__headline,
  .hero__lede {
    text-shadow: 0 1px 14px rgba(14, 23, 20, 0.55);
  }


  .hero__lede {
    font-size: var(--text-md);
  }

  .hero__actions {
    width: 100%;
  }

  .start-actions {
    width: 100%;
  }

  .hero__actions .btn,
  .start-actions .btn {
    flex: 1 1 calc(50% - var(--space-3));
    min-width: min(100%, 140px);
  }

  .flow__step,
  .tool-row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .flow__mark {
    width: 2.5rem;
    min-height: 3px;
    margin-top: 0;
    margin-bottom: var(--space-1);
  }

  .tool-row {
    padding-inline: var(--space-2);
    margin-inline: calc(var(--space-2) * -1);
  }

  .manifesto__lede {
    margin-left: 0;
  }

  .manifesto__index {
    font-size: clamp(2.75rem, 16vw, 4rem);
  }

  .pillars,
  .pillars--asymmetric {
    grid-template-columns: 1fr;
    gap: var(--space-7);
    padding-top: var(--space-7);
  }

  .pillars li + li {
    border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    padding-top: var(--space-6);
  }

  .knowledge-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6) var(--space-5);
    text-align: center;
  }

  .knowledge-total {
    text-align: center;
  }

  .knowledge-stat {
    justify-items: center;
  }

  .knowledge-stat:nth-child(2),
  .knowledge-stat:nth-child(4) {
    transform: none;
  }

  .flow__step:nth-child(even) {
    padding-left: 0;
  }

  .flow--zigzag .flow__step:nth-child(2),
  .flow--zigzag .flow__step:nth-child(3) {
    margin-left: 0;
    max-width: none;
  }

  .tools-featured__item:nth-child(2),
  .tools-featured__item:nth-child(3) {
    margin-top: 0;
  }

  .tool-shortcuts {
    margin-top: var(--space-6);
  }

  .terminal {
    padding: var(--space-5);
    font-size: var(--text-xs);
    -webkit-overflow-scrolling: touch;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
  }
}

@media (max-width: 480px) {
  :root {
    --shell: min(1120px, calc(100% - 24px));
  }

  .brand-mark__text {
    max-width: none;
    overflow: visible;
    text-overflow: unset;
    white-space: nowrap;
  }

  .hero__brand {
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  .hero__actions .btn,
  .start-actions .btn {
    flex: 1 1 100%;
  }

  .knowledge-stats {
    grid-template-columns: 1fr;
    gap: var(--space-5);
    text-align: center;
  }

  .back-top {
    width: 44px;
    height: 44px;
  }
}

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

  .hero-atmosphere {
    transform: none;
  }

  .hero__brand,
  .hero__company,
  .hero__headline,
  .hero__lede,
  .hero__actions,
  .reveal,
  .back-top {
    animation: none !important;
    transition: none !important;
  }

  .hero__brand,
  .hero__company,
  .hero__headline,
  .hero__lede,
  .hero__actions,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .knowledge-stat:nth-child(2),
  .knowledge-stat:nth-child(4),
  .flow__step:nth-child(even) {
    transform: none;
    padding-left: 0;
  }

  .back-top {
    transform: none;
  }
}
