/* RafalAI shared styles: tokens, type, header, footer, buttons, and article prose.
   Page-specific layout stays inline in each page. */

/* Latin variable fonts, subset to the characters this site renders.
   Fallback faces use local metrics so the swap does not move the line. */
@font-face {
  font-family: "Inter Fallback";
  font-style: normal;
  font-weight: 100 900;
  src: local("Arial"), local("Liberation Sans");
  size-adjust: 109.56%;
  ascent-override: 88.42%;
  descent-override: 22.02%;
  line-gap-override: 0%;
}

@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  src: url("/src/fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces Fallback";
  font-style: normal;
  font-weight: 600 700;
  src: local("Times New Roman"), local("Liberation Serif");
  size-adjust: 110.73%;
  ascent-override: 88.32%;
  descent-override: 23.03%;
  line-gap-override: 0%;
}

@font-face {
  font-display: swap;
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600 700;
  src: url("/src/fonts/fraunces-latin.woff2") format("woff2");
}

@font-face {
  font-display: optional;
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  src: url("/src/fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
}

@font-face {
  font-display: optional;
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  src: url("/src/fonts/ibm-plex-mono-600-latin.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --font-sans: "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", "Fraunces Fallback", ui-serif, Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --max: 75rem;
  --prose: 42rem;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 8px;
  --radius-lg: 18px;

  --band: #10141b;
  --band-soft: #171d27;
  --band-line: rgba(226, 235, 245, 0.13);
  --band-ink: #f2f5f8;
  --band-text: #d4dbe4;
  --band-muted: #a3aec0;
  --band-accent: #43d9cb;
  --band-accent-2: #2bb3a3;
  --band-code: #8eded4;
  --band-on-accent: #062a29;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, transparent);
  --accent-2-soft: color-mix(in srgb, var(--accent) 9%, transparent);
  --chart: #075e63;
}

:root,
[data-theme="light"] {
  --bg: #f5f6f7;
  --paper: #ffffff;
  --paper-soft: #eceff2;
  --ink: #10141b;
  --text: #333b47;
  --muted: #576274;
  --line: #d9dee6;
  --line-strong: #c3cbd6;
  --accent: #075e63;
  --accent-ink: #ffffff;
  --accent-2: var(--accent);
  --good: #146c43;
  --warn: #9a5b00;
  --bad: #b42334;
  --shadow: 0 24px 70px rgba(16, 20, 27, 0.12);
  --grid-dot: rgba(16, 20, 27, 0.08);
}

[data-theme="dark"] {
  --bg: #0b0e13;
  --paper: #131820;
  --paper-soft: #1a212c;
  --ink: #f2f5f8;
  --text: #d4dbe4;
  --muted: #a3aec0;
  --line: rgba(226, 235, 245, 0.13);
  --line-strong: rgba(226, 235, 245, 0.24);
  --accent: #43d9cb;
  --accent-ink: #062a29;
  --accent-2: var(--accent);
  --good: #4ade80;
  --warn: #f2b56b;
  --bad: #f87171;
  --chart: #43d9cb;
  --shadow: 0 28px 78px rgba(0, 0, 0, 0.4);
  --grid-dot: rgba(226, 235, 245, 0.07);
  --band: #0b0e13;
  --band-soft: #131820;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  font: 17px/1.6 var(--font-sans);
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body > main { flex: 1 0 auto; }

button, input, textarea, select { font: inherit; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.02em; }
code { font-family: var(--font-mono); font-size: 0.86em; }

.container {
  margin-inline: auto;
  width: min(100% - 2rem, var(--max));
}

.skip-link {
  background: var(--ink);
  color: var(--bg);
  left: 1rem;
  padding: 0.7rem 1rem;
  position: fixed;
  top: 1rem;
  transform: translateY(-150%);
  z-index: 100;
}
.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header {
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  min-height: 4.25rem;
}
.header-contact, .menu-button, .site-menu { display: none; }
html:not(.js) .menu-button { display: none; }
html:not(.js) .site-menu { border-bottom: 1px solid var(--line); display: block !important; position: static; }
.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-family: var(--font-sans);
  font-weight: 700;
  gap: 0.65rem;
  letter-spacing: -0.03em;
  min-width: max-content;
  text-decoration: none;
}
.brand-ai { color: var(--accent); }
.brand img { border-radius: var(--radius); height: 2rem; width: 2rem; }
.nav { align-items: center; display: flex; gap: clamp(0.9rem, 2.4vw, 1.5rem); margin-left: auto; }
.nav a {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 680;
  text-decoration: none;
  transition: color 160ms var(--ease);
  white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { color: color-mix(in srgb, var(--accent) 78%, var(--ink)); }
.nav a[aria-current="page"] {
  font-weight: 760;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.28em;
}
.nav .nav-cta[aria-current="page"] { text-decoration: none; }
.nav .nav-cta {
  background: var(--accent);
  border-radius: 999px;
  color: var(--accent-ink);
  font-size: 0.86rem;
  font-weight: 760;
  padding: 0.45rem 0.95rem;
}
.nav .nav-cta:hover, .nav .nav-cta[aria-current="page"] { background: color-mix(in srgb, var(--accent) 78%, #000); color: var(--accent-ink); }
.theme-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  flex: none;
  height: 2rem;
  justify-content: center;
  padding: 0;
  width: 2rem;
}
.theme-toggle:hover { border-color: var(--line-strong); color: var(--ink); }
.theme-toggle:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.theme-toggle svg { height: 1rem; width: 1rem; }
.theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: block; }

/* Shared type */
.kicker {
  align-items: center;
  color: var(--accent);
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  gap: 0.5rem;
  letter-spacing: 0.09em;
  margin-bottom: 0.9rem;
  text-transform: uppercase;
}
.section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 46rem; }
h1 {
  font-size: clamp(2.35rem, 11vw, 5.25rem);
  letter-spacing: -0.03em;
  line-height: 0.98;
}
h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
}
.section-title {
  color: var(--ink);
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1rem;
}
.section-intro { color: var(--muted); font-size: 1.08rem; line-height: 1.72; margin: 0; }

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 760;
  gap: 0.5rem;
  justify-content: center;
  min-height: 3rem;
  padding-inline: 1.2rem;
  text-decoration: none;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), transform 120ms var(--ease);
}
.button:active { transform: translateY(1px); }
.button svg { height: 1rem; width: 1rem; }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: color-mix(in srgb, var(--accent) 78%, #000); color: var(--accent-ink); }
.button-secondary { background: color-mix(in srgb, var(--paper) 60%, transparent); border-color: var(--line-strong); color: var(--ink); }
.button-secondary:hover { background: var(--paper); }
.text-link {
  align-items: center;
  color: var(--accent);
  display: inline-flex;
  font-weight: 740;
  gap: 0.35rem;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }
.text-link svg { height: 0.95rem; width: 0.95rem; }

/* Forms */
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 0.42rem; }
.field-wide { grid-column: 1 / -1; }
.form-honeypot { height: 1px; left: -100vw; overflow: hidden; position: absolute; width: 1px; }
.field label, .field-label { color: var(--ink); font-size: 0.9rem; font-weight: 740; }
.field input, .field textarea, .field select {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  font-size: 16px;
  min-height: 48px;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  width: 100%;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.form-foot { align-items: center; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.form-note, .form-status { color: var(--muted); font-size: 0.9rem; line-height: 1.55; margin: 0; }
.form-note { flex: 1 1 18rem; }
.form-note a { color: var(--accent); }
.turnstile-slot[hidden] { display: none; }
.turnstile-slot:not([hidden]) { min-height: 65px; }
.turnstile-slot iframe { border: 0; height: 65px; width: 300px; }
.form-status[hidden] { display: none; }
.form-status[data-state="error"] { color: var(--bad); }
.form-status[data-state="ok"] { color: var(--good); }
.submit-button {
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent-ink);
  cursor: pointer;
  font-weight: 760;
  min-height: 3rem;
  padding-inline: 1.3rem;
  transition: background-color 160ms var(--ease), opacity 160ms var(--ease), transform 120ms var(--ease);
}
.submit-button:hover { background: color-mix(in srgb, var(--accent) 78%, #000); color: var(--accent-ink); }
.submit-button:active { transform: translateY(1px); }
.submit-button:disabled { cursor: wait; opacity: 0.58; }

input:focus-visible, textarea:focus-visible, select:focus-visible, .button:focus-visible, .nav a:focus-visible, .site-menu a:focus-visible, .menu-button:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Writing cards, used on the homepage and the articles index */
.read {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 200ms var(--ease), transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.read:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); transform: translateY(-3px); }
.read:hover .text-link { text-decoration: underline; }
.read picture { align-items: center; background: var(--paper-soft); display: flex; }
.read picture img { height: auto; width: 100%; }
.read-body { display: flex; flex: 1; flex-direction: column; padding: 1.6rem; }
.read-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  gap: 0.35rem 0.8rem;
  letter-spacing: 0.09em;
  margin-bottom: 1rem;
}
.read-meta span:first-child { color: var(--accent-2); font-weight: 700; text-transform: uppercase; }
.read h2, .read h3 {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin-bottom: 0.8rem;
}
.read p:not(.read-meta) { color: var(--muted); line-height: 1.65; margin-bottom: 1.4rem; }
.read .text-link { margin-top: auto; }
.read-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.read-feature picture { border-right: 1px solid var(--line); }
.read-plain { background: var(--paper); border-color: var(--line); }
.read-plain h2, .read-plain h3 { font-size: clamp(1.4rem, 2vw, 1.7rem); }
.reads { display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.reads-side { display: grid; gap: 1.1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem 2.2rem; }
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.6fr));
}
.footer-mark { border-radius: 22%; height: 2rem; margin-bottom: 0.9rem; width: 2rem; }
.footer-grid strong { color: var(--ink); }
.footer-tagline, .footer-company { color: var(--muted); }
.footer-tagline { font-size: 0.94rem; margin: 0.6rem 0 0; max-width: 26rem; }
.footer-company { font-size: 0.94rem; margin: 0.35rem 0 0; }
.footer-col h2 {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  margin: 0 0 0.8rem;
  text-transform: uppercase;
}
.footer-col ul { display: grid; gap: 0.45rem; list-style: none; margin: 0; padding: 0; }
.footer-col a { color: var(--accent); font-size: 0.94rem; font-weight: 620; text-decoration: none; }
.footer-col a:hover { color: var(--accent); text-decoration: underline; }
.footer-base {
  align-items: baseline;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.86rem;
  gap: 0.35rem 1rem;
  margin-top: 2.4rem;
  padding-top: 1.4rem;
}
.footer-base a { color: var(--accent); text-decoration: none; }
.footer-base a:hover { color: var(--accent); text-decoration: underline; }

.legal { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(4rem, 8vw, 6rem); }
.legal h1 {
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin: 0 0 0.8rem;
}
.legal .updated { color: var(--muted); margin: 0 0 2rem; }

/* Article pages */
.article-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.breadcrumbs { color: var(--muted); display: flex; flex-wrap: wrap; font-size: 0.9rem; gap: 0.6rem; margin-bottom: 1.8rem; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.article-hero .kicker { margin-bottom: 1.1rem; }
.article-title {
  color: var(--ink);
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin: 0 0 1.3rem;
  max-width: 18ch;
}
.article-dek {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.1vw, 1.55rem);
  line-height: 1.45;
  margin: 0 0 1.6rem;
  max-width: 40rem;
}
.byline {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  gap: 0.4rem 1.2rem;
  padding-top: 1.1rem;
}
.byline b { color: var(--ink); font-weight: 700; }
.article-figure { margin: clamp(2rem, 4vw, 3rem) 0 0; }
.article-figure img {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  height: auto;
  width: 100%;
}

.glance {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 1.4rem 2rem;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  margin: 0 0 2.6rem;
  padding: 1.5rem 1.6rem;
}
.glance dt { color: var(--accent); font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.09em; margin-bottom: 0.45rem; text-transform: uppercase; }
.glance dd { color: var(--ink); font-family: var(--font-serif); font-size: 1.22rem; line-height: 1.4; margin: 0; }
.glance .glance-source {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.98rem;
  grid-column: 1 / -1;
  line-height: 1.6;
  margin: 0;
  padding-top: 1.1rem;
}
.notebook .glance-source {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0.9rem 0 0;
}
.glance a { color: var(--accent); font-weight: 700; }

.article-shell {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 68ch) minmax(12rem, 16rem);
  justify-content: space-between;
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem);
}
.toc { align-self: start; position: sticky; top: 6rem; }
.toc p { color: var(--muted); font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.09em; margin: 0 0 0.8rem; text-transform: uppercase; }
.toc ol { border-left: 1px solid var(--line); display: grid; gap: 0.1rem; list-style: none; margin: 0; padding: 0; }
.toc a { border-left: 2px solid transparent; color: var(--muted); display: block; font-size: 0.9rem; line-height: 1.4; margin-left: -1px; padding: 0.35rem 0 0.35rem 0.9rem; text-decoration: none; }
.toc a:hover { border-left-color: var(--accent); color: var(--ink); }

.prose { color: var(--text); font-size: 17px; line-height: 1.7; max-width: 68ch; }
.prose > * + * { margin-top: 1.15em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose h2 {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 2.6em 0 0;
}
.prose h3 { color: var(--ink); font-size: 1.2rem; line-height: 1.3; margin: 2em 0 0; }
.prose h2 + *, .prose h3 + * { margin-top: 0.8em; }
.prose a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--accent-2); }
.prose code { background: var(--paper-soft); border-radius: 4px; padding: 0.1em 0.35em; }
.prose pre { background: var(--band); border-radius: var(--radius); color: var(--band-text); font-size: 0.88rem; overflow-x: auto; padding: 1.1rem 1.2rem; }
.prose pre code { background: none; padding: 0; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.45rem;
  line-height: 1.4;
  margin: 2em 0;
  padding: 0.2rem 0 0.2rem 1.4rem;
}
.prose blockquote p { margin: 0; }
.prose figure { margin: 2em 0; }
.prose figure img { border: 1px solid var(--line); border-radius: var(--radius); height: auto; width: 100%; }
.prose figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.6rem; }
.prose table { border-collapse: collapse; font-size: 0.95rem; width: 100%; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 0.6rem 0.5rem; text-align: left; vertical-align: top; }
.prose th { color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }

.prose .evidence {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-2);
  border-radius: var(--radius);
  font-size: 1rem;
  line-height: 1.7;
  margin-top: 3em;
  padding: 1.4rem 1.5rem;
}
.prose .evidence h2 {
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0;
  text-transform: uppercase;
}
.prose .evidence > * + * { margin-top: 0.8em; }
.prose .sources { font-size: 0.95rem; }
.prose .sources li { overflow-wrap: anywhere; }

.author-card {
  align-items: center;
  border-block: 1px solid var(--line);
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 4rem 1fr;
  margin-top: 3.2rem;
  padding-block: 1.6rem;
}
.author-card img,
.author-mark { border-radius: 22%; height: 4rem; width: 4rem; }
.author-card p { color: var(--muted); font-size: 0.98rem; line-height: 1.6; margin: 0; }
.author-card b { color: var(--ink); display: block; font-size: 1rem; margin-bottom: 0.2rem; }
.author-card a { color: var(--accent); font-weight: 700; }

.next-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-top: 2.4rem;
  padding: clamp(1.4rem, 3vw, 2rem);
}
.next-step h2 { color: var(--ink); font-family: var(--font-serif); font-size: 1.7rem; font-weight: 600; line-height: 1.15; margin-bottom: 0.6rem; }
.next-step p { color: var(--muted); margin-bottom: 1.3rem; }
.next-step .actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.next-ask { margin: 0.9rem 0 0; }
.next-ask a { color: var(--accent); font-weight: 700; }

.more { border-top: 1px solid var(--line); padding-block: clamp(3rem, 6vw, 4.5rem); }
.more-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 64rem) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .article-shell { grid-template-columns: 1fr; }
  .toc { display: none; }
}

@media (max-width: 48rem) {
  .reads { grid-template-columns: 1fr; }
  .site-header { height: 64px; }
  .site-header .header-inner {
    flex-wrap: nowrap;
    gap: 8px;
    height: 64px;
    margin-inline: 0;
    min-height: 64px;
    padding-inline: 12px;
    width: 100%;
  }
  .brand { gap: 0.4rem; }
  .nav { display: none; }
  .header-contact {
    align-items: center;
    background: var(--accent);
    border-radius: 999px;
    color: var(--accent-ink);
    display: inline-flex;
    flex: none;
    font-size: 0.95rem;
    font-weight: 760;
    margin-left: auto;
    min-height: 44px;
    padding: 0 12px;
    text-decoration: none;
    white-space: nowrap;
  }
  .theme-toggle {
    flex: none;
    height: 44px;
    width: 44px;
  }
  .menu-button {
    align-items: center;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    display: inline-flex;
    flex: none;
    height: 44px;
    justify-content: center;
    margin-left: 0;
    padding: 0;
    width: 44px;
  }
  .menu-icon, .menu-icon::before, .menu-icon::after {
    background: var(--ink);
    border-radius: 1px;
    content: "";
    display: block;
    height: 2px;
    position: relative;
    width: 18px;
  }
  .menu-icon::before, .menu-icon::after { position: absolute; left: 0; }
  .menu-icon::before { top: -6px; }
  .menu-icon::after { top: 6px; }
  .site-menu {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    color: var(--text);
    left: 0;
    padding: 0.5rem 16px 1rem;
    position: absolute;
    right: 0;
    top: 64px;
  }
  .site-menu[hidden] { display: none; }
  .site-menu:not([hidden]) { display: block; }
  .site-menu ul { display: grid; list-style: none; margin: 0; padding: 0; }
  .site-menu a {
    align-items: center;
    color: var(--accent);
    display: flex;
    font-size: 16px;
    font-weight: 680;
    min-height: 48px;
    text-decoration: none;
  }
  .container { width: min(100% - 1.5rem, var(--max)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .read-feature, .more-grid, .glance, .form-grid { grid-template-columns: 1fr; }
  .submit-button { width: 100%; }
  .read-feature picture { border-bottom: 1px solid var(--line); border-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .toc, .next-step, .more { display: none; }
  body { background: #fff; }
}

/* Page styles, scoped so they do not leak across routes. */

/* index.html */

    /* Hero */
    body.page-home .hero {
      border-bottom: 1px solid var(--line);
      overflow: hidden;
      padding-block: clamp(3.5rem, 7vw, 6rem) clamp(3.5rem, 6vw, 5rem);
      position: relative;
    }
    body.page-home .hero::after {
      background:
        radial-gradient(circle at 78% 22%, var(--accent-soft), transparent 32rem),
        radial-gradient(circle at 10% 90%, var(--accent-2-soft), transparent 28rem);
      content: "";
      inset: 0;
      pointer-events: none;
      position: absolute;
    }
    body.page-home .hero-grid {
      align-items: center;
      display: grid;
      gap: clamp(2.5rem, 5vw, 4.5rem);
      grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
      position: relative;
      z-index: 1;
    }
    body.page-home .hero-badge {
      align-items: center;
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 999px;
      color: var(--muted);
      display: inline-flex;
      font-size: 0.84rem;
      font-weight: 650;
      gap: 0.55rem;
      margin-bottom: 1.6rem;
      padding: 0.35rem 0.85rem 0.35rem 0.45rem;
    }
    body.page-home .hero-badge b {
      background: var(--accent-soft);
      border-radius: 999px;
      color: var(--accent);
      font-family: var(--font-mono);
      font-size: 0.72rem;
      padding: 0.15rem 0.55rem;
      text-transform: uppercase;
    }
    body.page-home .hero h1 {
      color: var(--ink);
      font-family: var(--font-serif);
      font-optical-sizing: auto;
      font-weight: 600;
      letter-spacing: -0.03em;
      line-height: 0.98;
      margin-bottom: 1.5rem;
    }
    body.page-home .strike { display: inline-block; position: relative; }
    body.page-home .hero h1 .keep { white-space: nowrap; }
    body.page-home .strike::after {
      background: var(--accent);
      border-radius: 4px;
      content: "";
      height: 0.065em;
      left: 0;
      opacity: .55;
      position: absolute;
      right: 0;
      top: 0.7em;
      transform: rotate(-0.6deg) scaleX(1);
      transform-origin: left center;
    }
    html.js body.page-home .strike::after { animation: strike 900ms 350ms var(--ease) both; }
    @keyframes strike { from { transform: rotate(-0.6deg) scaleX(0); } }
    body.page-home .hero-lead {
      color: var(--text);
      font-size: clamp(1.14rem, 1.7vw, 1.32rem);
      line-height: 1.6;
      margin-bottom: 2rem;
      max-width: 35rem;
    }
    body.page-home .hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
    body.page-home .hero-note {
      align-items: center;
      border-top: 1px solid var(--line);
      color: var(--muted);
      display: flex;
      font-size: 0.92rem;
      gap: 0.8rem;
      line-height: 1.5;
      margin: 2rem 0 0;
      max-width: 35rem;
      padding-top: 1.3rem;
    }
    body.page-home .hero-note img { border-radius: 10px; flex: none; height: 2.4rem; width: 2.4rem; }
    body.page-home .hero-note a { color: var(--ink); font-weight: 700; }

    body.page-home .hero-offer {
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 1.25rem 1.3rem 1.35rem;
    }
    body.page-home .hero-offer-title {
      color: var(--ink);
      font-family: var(--font-serif);
      font-size: clamp(1.45rem, 2.2vw, 1.9rem);
      font-weight: 600;
      letter-spacing: -0.02em;
      line-height: 1.15;
      margin: 0 0 0.45rem;
    }
    body.page-home .trace-note { color: var(--muted); font-size: 0.92rem; line-height: 1.5; margin: 0 0 1.1rem; }
    body.page-home .trace { display: grid; gap: 0.85rem; }
    body.page-home .trace h3 {
      color: var(--accent);
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.09em;
      line-height: 1.2;
      margin: 0 0 0.55rem;
      text-transform: uppercase;
    }
    body.page-home .trace-block ul,
body.page-home .trace-steps { list-style: none; margin: 0; padding: 0; }
    body.page-home .trace-block ul { display: flex; flex-wrap: wrap; gap: 0.4rem; }
    body.page-home .trace-block li {
      background: var(--paper-soft);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      color: var(--text);
      font-size: 0.88rem;
      line-height: 1.35;
      padding: 0.35rem 0.6rem;
    }
    body.page-home .trace-steps { display: grid; gap: 0.45rem; }
    body.page-home .trace-steps li {
      align-items: baseline;
      color: var(--text);
      display: grid;
      font-size: 0.92rem;
      gap: 0.65rem;
      grid-template-columns: 1.6rem minmax(0, 1fr);
      line-height: 1.4;
    }
    body.page-home .trace-steps span {
      color: var(--accent);
      font-family: var(--font-mono);
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.04em;
    }
    body.page-home .trace-out {
      background: var(--paper-soft);
      border-radius: var(--radius);
      padding: 0.85rem 0.9rem 0.95rem;
    }
    body.page-home .trace-answer { color: var(--ink); font-size: 0.98rem; line-height: 1.5; margin: 0 0 0.55rem; }
    body.page-home .trace-cite { color: var(--muted); font-size: 0.84rem; line-height: 1.45; margin: 0; }
    body.page-home span.element-tile {
      background: #10141b;
      border: 1px solid var(--line);
      border-radius: 22%;
      color: #f2f5f8;
      display: grid;
      flex: none;
      height: 4.25rem;
      place-items: center;
      position: relative;
      width: 4.25rem;
    }
    body.page-home .element-tile .element-sym {
      color: #f2f5f8;
      font-family: var(--font-serif);
      font-size: 1.35rem;
      font-weight: 700;
      letter-spacing: -0.03em;
      line-height: 1;
    }
    body.page-home .element-tile .element-num {
      color: #f2f5f8;
      font-family: var(--font-mono);
      font-size: 0.62rem;
      font-weight: 500;
      left: 0.42rem;
      letter-spacing: 0.06em;
      position: absolute;
      top: 0.38rem;
    }
    body.page-home .element-bar {
      background: #43d9cb;
      border-radius: 2px;
      bottom: 0.48rem;
      height: 3px;
      left: 22%;
      position: absolute;
      right: 16%;
    }
    body.page-home .element-bar::after {
      background: #43d9cb;
      border-radius: 50%;
      content: "";
      height: 7px;
      position: absolute;
      right: -3px;
      top: -2px;
      width: 7px;
    }

    /* Credentials strip */
    body.page-home .proof { border-bottom: 1px solid var(--line); }
    body.page-home .proof-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      list-style: none;
      margin: 0;
      padding: 0;
    }
    body.page-home .proof-grid li { align-items: flex-start; border-left: 1px solid var(--line); display: flex; gap: 0.85rem; min-width: 0; padding: 1.4rem 1.15rem; }
    body.page-home .proof-grid li:first-child { border-left: 0; padding-left: 0; }
    body.page-home .proof-grid li > span:not(.element-tile) { display: block; min-width: 0; }
    body.page-home .proof-grid strong {
      color: var(--ink);
      display: block;
      font-family: var(--font-serif);
      font-size: clamp(1.7rem, 2.6vw, 2.2rem);
      font-weight: 600;
      line-height: 1;
      margin-bottom: 0.55rem;
    }
    body.page-home .proof-grid li > span:not(.element-tile),
body.page-home .proof-grid li > span:not(.element-tile) > span { color: var(--muted); display: block; font-size: 0.92rem; line-height: 1.45; }

    /* Latest writing */
    body.page-home .lab-head {
      align-items: end;
      display: flex;
      flex-wrap: wrap;
      gap: 1.2rem 2rem;
      justify-content: space-between;
      margin-bottom: clamp(2rem, 4vw, 3rem);
    }
    body.page-home .lab-head .section-head { margin-bottom: 0; }

    /* About */
    body.page-home .about { background: var(--paper-soft); border-block: 1px solid var(--line); }
    body.page-home [data-theme="dark"] .about { background: color-mix(in srgb, var(--paper) 60%, var(--bg)); }
    body.page-home .about-grid {
      align-items: start;
      display: grid;
      grid-template-columns: minmax(0, 40rem);
    }
    body.page-home .about-copy .section-title { max-width: 16ch; }
    body.page-home .about-copy p:not(.kicker) { color: var(--text); font-size: 1.1rem; line-height: 1.75; margin-bottom: 1.1rem; max-width: 40rem; }
    body.page-home .about-copy .hero-actions { margin-top: 1.8rem; }

    /* What we build */
    body.page-home .offer-grid {
      align-items: stretch;
      display: grid;
      gap: 1.1rem;
      grid-template-columns: 1fr 1fr;
    }
    body.page-home .offer:first-child {
      align-items: start;
      column-gap: 1.25rem;
      display: grid;
      grid-column: 1 / -1;
      grid-template-columns: auto minmax(0, 1fr);
    }
    body.page-home .offer:first-child .offer-icon { grid-row: span 4; margin-bottom: 0; }
    body.page-home .offer:first-child h3,
body.page-home .offer:first-child p,
body.page-home .offer:first-child .tags,
body.page-home .offer:first-child .text-link { grid-column: 2; }
    body.page-home .offer {
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      display: flex;
      flex-direction: column;
      padding: 1.6rem 1.6rem 1.5rem;
      transition: border-color 200ms var(--ease), transform 200ms var(--ease), box-shadow 200ms var(--ease);
    }
    body.page-home .offer:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); transform: translateY(-3px); }
    body.page-home .offer-icon {
      align-items: center;
      background: var(--accent-soft);
      border-radius: 12px;
      color: var(--accent);
      display: inline-flex;
      height: 2.8rem;
      justify-content: center;
      margin-bottom: 1.3rem;
      width: 2.8rem;
    }
    body.page-home .offer-icon svg { height: 1.35rem; width: 1.35rem; }
    body.page-home .offer h3 { color: var(--ink); font-size: 1.28rem; line-height: 1.25; margin-bottom: 0.6rem; }
    body.page-home .offer p { color: var(--muted); line-height: 1.65; margin-bottom: 1.2rem; }
    body.page-home .offer .text-link { margin-top: auto; }
    body.page-home .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0 0 1.4rem; padding: 0; }
    body.page-home .tags li {
      border: 1px solid var(--line);
      border-radius: 999px;
      color: var(--text);
      font-size: 0.78rem;
      font-weight: 620;
      padding: 0.2rem 0.6rem;
    }
    body.page-home .engage {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      display: grid;
      grid-template-columns: 1fr;
      list-style: none;
      margin: 1.1rem 0 0;
      overflow: hidden;
      padding: 0;
    }
    body.page-home .engage li + li { border-top: 1px solid var(--line); }
    body.page-home .engage a {
      color: inherit;
      display: grid;
      gap: 0.35rem 0.9rem;
      grid-template-columns: auto minmax(0, 1fr);
      height: 100%;
      padding: 1.15rem 1.3rem;
      text-decoration: none;
      transition: background 200ms var(--ease);
    }
    body.page-home .engage .element-tile { grid-row: span 3; }
    body.page-home .engage a:hover { background: var(--accent-soft); }
    body.page-home .engage b { color: var(--ink); font-size: 1.02rem; }
    body.page-home .engage a > span:not(.element-tile) { color: var(--muted); font-size: 0.92rem; line-height: 1.55; min-width: 0; }
    body.page-home .engage em { color: var(--accent); font-size: 0.85rem; font-style: normal; font-weight: 650; margin-top: 0.3rem; }

    /* Method */
    body.page-home .method { background: var(--paper-soft); border-block: 1px solid var(--line); }
    body.page-home [data-theme="dark"] .method { background: color-mix(in srgb, var(--paper) 60%, var(--bg)); }
    body.page-home .method-top {
      align-items: center;
      display: grid;
      gap: clamp(2rem, 5vw, 4rem);
      grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
      margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
    }
    body.page-home .method-top .section-head { margin: 0; }
    body.page-home .method-visual img {
      aspect-ratio: 16 / 9;
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      height: auto;
      object-fit: cover;
      width: 100%;
    }
    body.page-home .steps {
      counter-reset: step;
      display: grid;
      gap: 0.9rem;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      list-style: none;
      margin: 0;
      padding: 0;
      position: relative;
    }
    body.page-home .steps li {
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 14px;
      counter-increment: step;
      padding: 1.2rem 1.15rem 1.25rem;
      position: relative;
    }
    body.page-home .steps li::before {
      color: var(--accent);
      content: counter(step, decimal-leading-zero);
      display: block;
      font-family: var(--font-mono);
      font-size: 0.78rem;
      font-weight: 760;
      margin-bottom: 0.85rem;
    }
    body.page-home .steps li:not(:last-child)::after {
      background: var(--line-strong);
      content: "";
      height: 1px;
      position: absolute;
      right: -0.9rem;
      top: 1.62rem;
      width: 0.9rem;
    }
    body.page-home .steps b { color: var(--ink); display: block; font-size: 1.02rem; line-height: 1.3; margin-bottom: 0.4rem; }
    body.page-home .steps span { color: var(--muted); display: block; font-size: 0.9rem; line-height: 1.55; }

    /* Agent band */
    body.page-home .band {
      background:
        radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--band-accent) 20%, transparent), transparent 30rem),
        radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--band-accent-2) 12%, transparent), transparent 26rem),
        var(--band);
      color: var(--band-text);
    }
    body.page-home .band .kicker { color: var(--band-accent-2); }
    body.page-home .band .section-title { color: var(--band-ink); }
    body.page-home .band .section-intro { color: var(--band-text); }
    body.page-home .band-grid {
      align-items: start;
      display: grid;
      gap: clamp(2.5rem, 5vw, 4rem);
      grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    }
    body.page-home .band-points { display: grid; gap: 1.1rem; list-style: none; margin: 2rem 0; padding: 0; }
    body.page-home .band-points li { display: grid; gap: 0.9rem; grid-template-columns: 1.6rem 1fr; }
    body.page-home .band-points svg { color: var(--band-accent-2); height: 1.25rem; margin-top: 0.15rem; width: 1.25rem; }
    body.page-home .band-points b { color: var(--band-ink); display: block; margin-bottom: 0.15rem; }
    body.page-home .band-points span { color: var(--band-muted); font-size: 0.95rem; line-height: 1.6; }
    body.page-home .look-form {
      background: var(--band-soft);
      border: 1px solid var(--band-line);
      border-radius: 14px;
      display: grid;
      gap: 0.6rem;
      grid-template-columns: minmax(0, 1fr) auto;
      padding: 0.45rem;
    }
    body.page-home .look-form label {
      clip: rect(0 0 0 0);
      height: 1px;
      overflow: hidden;
      position: absolute;
      white-space: nowrap;
      width: 1px;
    }
    body.page-home .look-form input {
      background: transparent;
      border: 0;
      color: var(--band-ink);
      font-family: var(--font-mono);
      font-size: 0.92rem;
      min-width: 0;
      padding: 0.7rem 0.8rem;
    }
    body.page-home .look-form input::placeholder { color: var(--band-muted); }
    body.page-home .look-form input:focus { box-shadow: none; outline: none; }
    body.page-home .look-form:focus-within { border-color: var(--band-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--band-accent) 28%, transparent); }
    body.page-home .look-form button {
      background: var(--band-accent);
      border: 0;
      border-radius: 10px;
      color: var(--band-on-accent);
      cursor: pointer;
      font-weight: 780;
      padding: 0 1.1rem;
    }
    body.page-home .look-hint { color: var(--band-muted); font-size: 0.86rem; margin: 0.7rem 0 0; }
    body.page-home .look-hint a { color: var(--band-ink); }
    body.page-home .code-card {
      background: var(--band-soft);
      border: 1px solid var(--band-line);
      border-radius: var(--radius-lg);
      overflow: hidden;
    }
    body.page-home .code-tabs {
      border-bottom: 1px solid var(--band-line);
      color: var(--band-muted);
      display: flex;
      font-family: var(--font-mono);
      font-size: 0.76rem;
      gap: 1rem;
      justify-content: space-between;
      padding: 0.75rem 1.1rem;
    }
    body.page-home .code-tabs b { color: var(--band-ink); font-weight: 600; }
    body.page-home .code-tabs .c-ok { color: var(--band-accent-2); }
    body.page-home .code-card pre {
      color: var(--band-text);
      font-family: var(--font-mono);
      font-size: 0.8rem;
      line-height: 1.75;
      margin: 0;
      overflow-x: auto;
      padding: 1.1rem 1.2rem;
    }
    body.page-home .t-tag { color: var(--band-code); }
    body.page-home .t-attr { color: var(--band-accent); }
    body.page-home .t-str { color: var(--band-accent-2); }
    body.page-home .t-com { color: var(--band-muted); }
    body.page-home .tool-cloud { border-top: 1px solid var(--band-line); padding: 1rem 1.2rem 1.2rem; }
    body.page-home .tool-cloud p { color: var(--band-muted); font-family: var(--font-mono); font-size: 0.74rem; margin: 0 0 0.7rem; text-transform: uppercase; }
    body.page-home .tool-cloud ul { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
    body.page-home .tool-cloud li {
      background: color-mix(in srgb, var(--band-accent) 12%, transparent);
      border: 1px solid color-mix(in srgb, var(--band-accent) 32%, transparent);
      border-radius: 6px;
      color: var(--band-ink);
      font-family: var(--font-mono);
      font-size: 0.74rem;
      padding: 0.18rem 0.5rem;
    }

    /* Workflow kits */
    body.page-home .kits {
      background:
        linear-gradient(135deg, var(--accent-soft), transparent 55%),
        var(--paper);
      border: 1px solid var(--line);
      border-radius: 24px;
      display: grid;
      gap: clamp(2rem, 4vw, 3rem);
      grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
      padding: clamp(1.6rem, 4vw, 3.2rem);
    }
    body.page-home .kits .section-head { margin-bottom: 1.8rem; }
    body.page-home .kit-list { display: grid; gap: 0.8rem; list-style: none; margin: 0; padding: 0; }
    body.page-home .kit-list li {
      background: var(--bg);
      border: 1px solid var(--line);
      border-radius: 14px;
      display: grid;
      gap: 0.25rem 1rem;
      grid-template-columns: 1fr auto;
      padding: 1.05rem 1.2rem;
    }
    body.page-home .kit-list b { color: var(--ink); font-size: 1.02rem; }
    body.page-home .kit-list span { color: var(--muted); font-size: 0.92rem; grid-column: 1 / -1; line-height: 1.55; }
    body.page-home .kit-list em {
      color: var(--accent);
      font-family: var(--font-mono);
      font-size: 0.72rem;
      font-style: normal;
      font-weight: 700;
      text-transform: uppercase;
    }

    /* Ask */
    body.page-home .ask { background: var(--paper-soft); border-top: 1px solid var(--line); }
    body.page-home [data-theme="dark"] .ask { background: color-mix(in srgb, var(--paper) 60%, var(--bg)); }
    body.page-home .ask-grid {
      display: grid;
      gap: clamp(2rem, 5vw, 4rem);
      grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    }
    body.page-home .ask-aside { display: grid; gap: 0.8rem; list-style: none; margin: 1.8rem 0 0; padding: 0; }
    body.page-home .ask-aside li { color: var(--muted); display: grid; font-size: 0.95rem; gap: 0.7rem; grid-template-columns: 1.2rem 1fr; }
    body.page-home .ask-aside svg { color: var(--accent-2); height: 1.1rem; margin-top: 0.2rem; width: 1.1rem; }
    body.page-home .ask-aside a { color: var(--ink); font-weight: 700; }
    body.page-home .ask-panel {
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      padding: clamp(1.2rem, 3vw, 1.9rem);
    }
    body.page-home .ask-form { display: grid; gap: 1rem; }

    @media (max-width: 64rem) {
      body.page-home .offer-grid,
body.page-home .engage { grid-template-columns: 1fr; }
      body.page-home .engage li + li { border-top: 1px solid var(--line); }
      body.page-home .proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      body.page-home .proof-grid li { border-left: 1px solid var(--line); border-top: 1px solid var(--line); padding: 1.25rem 1rem; }
      body.page-home .proof-grid li:nth-child(odd) { border-left: 0; padding-left: 0; }
      body.page-home .proof-grid li:nth-child(-n + 2) { border-top: 0; }
      body.page-home .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      body.page-home .steps li::after { display: none; }
      body.page-home .steps li:last-child { grid-column: 1 / -1; }
    }

    @media (max-width: 48rem) {
      body.page-home .hero-grid,
body.page-home .method-top,
body.page-home .band-grid,
body.page-home .kits,
body.page-home .ask-grid,
body.page-home .about-grid { grid-template-columns: 1fr; }
      body.page-home .offer:first-child { display: flex; flex-direction: column; }
      body.page-home .offer:first-child .offer-icon { margin-bottom: 1.3rem; }
      body.page-home .proof-grid li { align-items: flex-start; flex-direction: column; gap: 0.7rem; }
      body.page-home .proof-grid strong { font-size: 1.45rem; }
      body.page-home .hero-actions .button { width: 100%; }
      body.page-home .steps { grid-template-columns: 1fr; }
    }
  

/* contact/index.html */

    body.page-contact .contact {
      display: grid;
      gap: clamp(2rem, 5vw, 4rem);
      grid-template-areas: "intro form" "guidance form";
      grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
      padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem);
    }
    body.page-contact .contact-intro { grid-area: intro; }
    body.page-contact .contact-guidance { grid-area: guidance; }
    body.page-contact .contact-form-card { align-self: start; grid-area: form; position: sticky; top: 96px; }
    body.page-contact .contact h1 {
      color: var(--ink);
      font-family: var(--font-serif);
      font-optical-sizing: auto;
      font-weight: 600;
      letter-spacing: -0.03em;
      line-height: 0.98;
      margin: 0 0 1.2rem;
      max-width: 12ch;
    }
    body.page-contact .lead { color: var(--text); font-size: 1.15rem; line-height: 1.65; margin-bottom: 0; max-width: 34rem; }
    body.page-contact .offer-list { margin-top: 1.6rem; max-width: 34rem; }
    body.page-contact .offer-list h2 { color: var(--ink); font-size: 1.2rem; margin: 0 0 0.8rem; }
    body.page-contact .offer-list ul { display: grid; gap: 0.75rem; list-style: none; margin: 0; padding: 0; }
    body.page-contact .offer-list li { color: var(--muted); line-height: 1.55; }
    body.page-contact .offer-list b { color: var(--ink); }
    body.page-contact .expect {
      border-top: 1px solid var(--line);
      display: grid;
      gap: 1rem;
      list-style: none;
      margin: 2rem 0 0;
      padding: 1.6rem 0 0;
    }
    body.page-contact .expect li { display: grid; gap: 0.2rem 0.9rem; grid-template-columns: 2rem 1fr; }
    body.page-contact .expect span {
      color: var(--accent);
      font-family: var(--font-mono);
      font-size: 0.8rem;
      font-weight: 700;
      grid-row: span 2;
      padding-top: 0.15rem;
    }
    body.page-contact .expect b { color: var(--ink); }
    body.page-contact .expect p { color: var(--muted); margin: 0; }
    body.page-contact .aside-note {
      background: var(--paper);
      border: 1px solid var(--line);
      border-left: 3px solid var(--accent-2);
      border-radius: var(--radius);
      color: var(--muted);
      font-size: 0.95rem;
      line-height: 1.6;
      margin: 2rem 0 0;
      max-width: 34rem;
      padding: 1rem 1.2rem;
    }
    body.page-contact .aside-note a { color: var(--ink); font-weight: 700; white-space: nowrap; }
    body.page-contact .after-send {
      border-top: 1px solid var(--line);
      padding-block: clamp(2.4rem, 5vw, 3.6rem) clamp(4rem, 8vw, 6rem);
    }
    body.page-contact .after-send h2 {
      color: var(--ink);
      font-family: var(--font-serif);
      font-size: clamp(1.8rem, 3vw, 2.4rem);
      font-weight: 600;
      letter-spacing: -0.02em;
      margin: 0;
    }
    body.page-contact .after-send ol {
      display: grid;
      gap: 1.2rem;
      list-style: none;
      margin: 1.4rem 0 0;
      padding: 0;
    }
    body.page-contact .after-send li {
      color: var(--muted);
      line-height: 1.6;
    }
    body.page-contact .after-send b { color: var(--ink); }
    body.page-contact .after-send a { color: var(--ink); font-weight: 700; }
    @media (min-width: 48.01rem) {
      body.page-contact .after-send ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
    }
    body.page-contact .form-choice { color: var(--text); line-height: 1.55; margin: 0; }
    @media (max-width: 64rem) {
      body.page-contact .contact { display: flex; flex-direction: column; }
      body.page-contact .contact-form-card { margin-top: 24px; order: 2; position: static; }
      body.page-contact .contact-intro { order: 1; }
      body.page-contact .contact-guidance { order: 3; }
    }
    body.page-contact .contact-panel {
      align-self: start;
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      padding: clamp(1.2rem, 3vw, 1.9rem);
    }
    body.page-contact .contact-form { display: grid; gap: 1rem; }
  

/* first-look/index.html */

    body.page-look .hero {
      background: linear-gradient(180deg, color-mix(in srgb, var(--paper-soft) 55%, transparent), transparent);
      border-bottom: 1px solid var(--line);
      padding-block: clamp(3.5rem, 8vw, 6rem);
    }
    body.page-look .hero-grid {
      align-items: center;
      display: grid;
      gap: clamp(2rem, 5vw, 4rem);
      grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.9fr);
    }
    body.page-look .hero h1 {
      color: var(--ink);
      font-family: var(--font-serif);
      font-optical-sizing: auto;
      font-weight: 600;
      letter-spacing: -0.03em;
      line-height: 0.98;
      margin: 0 0 1.3rem;
      max-width: 12ch;
    }
    body.page-look .hero-lead {
      color: var(--text);
      font-size: clamp(1.14rem, 1.7vw, 1.3rem);
      line-height: 1.6;
      margin: 0 0 1rem;
      max-width: 34rem;
    }
    body.page-look .hero-support { color: var(--muted); margin: 0; max-width: 34rem; }
    body.page-look .hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

    body.page-look .paper {
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
    }
    body.page-look .doc-card { padding: 1.6rem 1.7rem 1.7rem; }
    body.page-look .doc-card h2 {
      color: var(--ink);
      font-family: var(--font-serif);
      font-size: clamp(1.6rem, 2.4vw, 2.1rem);
      font-weight: 600;
      line-height: 1.12;
      margin: 0 0 0.7rem;
    }
    body.page-look .doc-card p:not(.kicker) { color: var(--muted); margin: 0 0 1.3rem; }
    body.page-look .doc-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }

    body.page-look .section { padding-block: clamp(3.25rem, 6vw, 5.25rem); }
    body.page-look .section + .section { border-top: 1px solid var(--line); }
    body.page-look .section h2.section-title { font-size: clamp(2rem, 3.6vw, 2.9rem); }
    body.page-look .section .section-intro { margin-bottom: 1.6rem; max-width: 40rem; }
    body.page-look .muted { color: var(--muted); margin: 0; }
    body.page-look .linkish {
      background: none;
      border: 0;
      color: var(--accent);
      cursor: pointer;
      font-size: 0.92rem;
      font-weight: 700;
      padding: 0;
      text-decoration: underline;
      text-underline-offset: 0.18em;
    }

    body.page-look .work-grid {
      display: grid;
      gap: 1rem;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      list-style: none;
      margin: 0;
      padding: 0;
    }
    body.page-look .work-grid a {
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 14px;
      display: block;
      height: 100%;
      padding: 1.15rem 1.2rem 1.25rem;
      text-decoration: none;
      transition: border-color 180ms var(--ease), transform 180ms var(--ease);
    }
    body.page-look .work-grid a:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); }
    body.page-look .work-grid strong { color: var(--ink); display: block; font-size: 1rem; }
    body.page-look .work-grid span { color: var(--muted); display: block; font-size: 0.92rem; margin-top: 0.4rem; }

    body.page-look .stage {
      display: grid;
      gap: 1.25rem;
      grid-template-columns: minmax(0, 1.3fr) minmax(16rem, 0.7fr);
    }
    body.page-look .stage-paper { overflow: hidden; }
    body.page-look .stage-head {
      align-items: center;
      border-bottom: 1px solid var(--line);
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem 1rem;
      justify-content: space-between;
      padding: 1rem 1.25rem;
    }
    body.page-look .stage-head h3 { color: var(--ink); font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; margin: 0 0 0.15rem; }
    body.page-look .doc-frame {
      background: var(--paper);
      border: 0;
      display: block;
      height: min(70vh, 40rem);
      width: 100%;
    }
    body.page-look .notes { align-self: start; padding: 1.25rem 1.35rem 1.5rem; }
    body.page-look .notes h3 { color: var(--ink); font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; margin: 0 0 0.9rem; }
    body.page-look .explain-box { display: grid; gap: 0.95rem; }
    body.page-look .explain-box h4 { color: var(--ink); font-size: 0.95rem; margin: 0 0 0.25rem; }
    body.page-look .explain-box p { margin: 0; }

    body.page-look .instrument { padding: 1.4rem 1.5rem 1.55rem; }
    body.page-look .instrument h3 { color: var(--ink); font-family: var(--font-serif); font-weight: 600; margin: 0 0 0.75rem; }
    body.page-look .url-row {
      align-items: end;
      display: grid;
      gap: 0.75rem;
      grid-template-columns: minmax(0, 1fr) auto;
    }
    body.page-look .advanced { display: grid; gap: 0.9rem; margin-top: 1rem; }
    body.page-look .advanced[hidden] { display: none; }
    body.page-look .look-tools { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.85rem; }
    body.page-look .status { color: var(--muted); font-size: 0.92rem; margin: 0.85rem 0 0; }
    body.page-look .status[hidden] { display: none; }
    body.page-look .status[data-kind="ok"] { color: var(--good); }
    body.page-look .status[data-kind="bad"] { color: var(--bad); }
    body.page-look .counts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
    body.page-look .look-count {
      border: 1px solid var(--line);
      border-radius: 999px;
      font-size: 0.8rem;
      font-weight: 700;
      padding: 0.28rem 0.65rem;
    }
    body.page-look .look-count.is-pass { color: var(--good); }
    body.page-look .look-count.is-warn { color: var(--warn); }
    body.page-look .look-count.is-fail { color: var(--bad); }
    body.page-look .facts { display: grid; gap: 0.85rem; margin: 0 0 1.25rem; }
    body.page-look .facts dt { color: var(--muted); font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
    body.page-look .facts dd { color: var(--ink); margin: 0.2rem 0 0; overflow-wrap: anywhere; }
    body.page-look .findings { display: grid; gap: 0.75rem; }
    body.page-look .look-finding { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem 1rem; }
    body.page-look .look-finding header { align-items: baseline; display: flex; gap: 0.65rem; }
    body.page-look .look-finding h3 { font-family: var(--font-sans); font-size: 1rem; margin: 0; }
    body.page-look .look-finding ul { margin: 0.45rem 0 0; padding-left: 1.1rem; }
    body.page-look .look-status { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
    body.page-look .is-pass { border-left: 3px solid var(--good); }
    body.page-look .is-warn { border-left: 3px solid var(--warn); }
    body.page-look .is-fail { border-left: 3px solid var(--bad); }
    body.page-look .is-pass .look-status { color: var(--good); }
    body.page-look .is-warn .look-status { color: var(--warn); }
    body.page-look .is-fail .look-status { color: var(--bad); }
    body.page-look .look-actions { display: flex; gap: 0.6rem; margin-top: 1rem; }

    body.page-look .ask-card { display: grid; gap: 1rem; padding: clamp(1.2rem, 3vw, 1.9rem); }
    body.page-look .form-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

    body.page-look .tool-list,
body.page-look .activity { display: grid; gap: 0; list-style: none; margin: 0; padding: 0; }
    body.page-look .tool-list li {
      align-items: center;
      border-top: 1px solid var(--line);
      display: grid;
      gap: 1rem;
      grid-template-columns: minmax(0, 1fr) auto;
      padding: 0.85rem 0;
    }
    body.page-look .tool-list li:first-child { border-top: 0; }
    body.page-look .tool-list code { background: var(--paper-soft); border-radius: 4px; padding: 0.1rem 0.35rem; }
    body.page-look .activity li { border-top: 1px solid var(--line); color: var(--muted); padding: 0.6rem 0; }
    body.page-look .activity strong { color: var(--ink); }
    body.page-look .sub-head { color: var(--ink); font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; margin: 2rem 0 0.7rem; }
    body.page-look .faq { display: grid; gap: 1.15rem; }
    body.page-look .faq dt { color: var(--ink); font-weight: 750; }
    body.page-look .faq dd { color: var(--muted); margin: 0.25rem 0 0; }
    body.page-look .webmcp { color: var(--muted); margin: 0 0 1.2rem; }

    @media (max-width: 64rem) {
      body.page-look .work-grid { grid-template-columns: 1fr 1fr; }
    }
    @media (max-width: 48rem) {
      body.page-look .hero-grid,
body.page-look .stage,
body.page-look .url-row,
body.page-look .tool-list li { grid-template-columns: 1fr; }
      body.page-look .work-grid { grid-template-columns: 1fr; }
      body.page-look .hero-actions .button { width: 100%; }
    }
  

/* articles/index.html */

    body.page-articles .index-hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); }
    body.page-articles .index-hero h1 {
      color: var(--ink);
      font-family: var(--font-serif);
      font-weight: 600;
      letter-spacing: -0.03em;
      line-height: 0.98;
      margin: 0 0 1.2rem;
      max-width: 14em;
    }
    body.page-articles .index-hero p { color: var(--muted); font-size: 1.15rem; line-height: 1.65; margin: 0; max-width: 40rem; }
    body.page-articles .hub { padding-bottom: clamp(2.8rem, 6vw, 4.5rem); }
    body.page-articles .hub h2 {
      color: var(--ink);
      font-family: var(--font-serif);
      font-size: clamp(1.8rem, 3vw, 2.4rem);
      font-weight: 600;
      letter-spacing: -0.02em;
      margin: 0 0 0.45rem;
    }
    body.page-articles .hub-lede { color: var(--muted); line-height: 1.6; margin: 0 0 1.2rem; max-width: 36rem; }
    body.page-articles .hub-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    @media (min-width: 48.01rem) {
      body.page-articles .hub-grid > .read:last-child:nth-child(odd) { grid-column: 1 / -1; }
    }
    @media (max-width: 48rem) { body.page-articles .hub-grid { grid-template-columns: 1fr; } }
  

/* 404.html */

    body.page-404 .not-found { padding-block: clamp(4rem, 12vw, 8rem); }
    body.page-404 .not-found h1 {
      color: var(--ink);
      font-family: var(--font-serif);
      font-size: clamp(2.6rem, 7vw, 4.6rem);
      font-weight: 600;
      letter-spacing: -0.02em;
      line-height: 1;
      margin: 0 0 1.2rem;
    }
    body.page-404 .not-found .lead { color: var(--text); font-size: 1.15rem; line-height: 1.65; max-width: 36rem; }
    body.page-404 .not-found .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

body.page-articles .hub-single { grid-template-columns: minmax(0, 1fr); }

body.page-home .proof-grid li > a {
  align-items: flex-start;
  color: inherit;
  display: flex;
  flex: 1;
  gap: 0.85rem;
  min-width: 0;
  text-decoration: none;
}
body.page-home .proof-grid li > a > span:not(.element-tile) { display: block; min-width: 0; }
body.page-home .proof-grid li > a > span:not(.element-tile),
body.page-home .proof-grid li > a > span:not(.element-tile) > span {
  color: var(--muted);
  display: block;
  font-size: 0.92rem;
  line-height: 1.45;
}
body.page-home .tool-cloud li { display: grid; font-family: var(--font-sans); gap: 0.1rem; }
body.page-home .tool-cloud li b { font-size: 0.82rem; }
body.page-home .tool-cloud li code { color: var(--band-muted); font-size: 0.68rem; }
@media (max-width: 48rem) {
  body.page-home .proof-grid li > a { align-items: flex-start; flex-direction: column; gap: 0.7rem; }
}

body.page-look .doc-actions-spaced { margin-bottom: 1.25rem; }
body.page-look .instrument-spaced { margin-top: 1.15rem; }
body.page-look .tool-list strong { color: var(--ink); display: block; }
body.page-look .tool-list code { display: inline-block; margin-top: 0.25rem; }
body.page-look .offer-close { border-top: 1px solid var(--line); }

body.page-offer .offer-page { padding-block: clamp(3rem, 7vw, 5.5rem); }
body.page-offer .offer-page h1 {
  color: var(--ink);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 0 0 1rem;
  max-width: 16ch;
}
body.page-offer .offer-page h2 {
  color: var(--ink);
  font-size: clamp(1.5rem, 2vw, 2rem);
  margin: 2.2rem 0 0.8rem;
}
body.page-offer .section-intro { margin-bottom: 0.4rem; max-width: 42rem; }
body.page-offer .offer-cta { margin-top: 1.5rem; }
body.page-offer .offer-columns { display: grid; gap: 2.4rem; margin-top: 2.2rem; }
body.page-offer .offer-copy { color: var(--text); line-height: 1.65; margin: 0; max-width: 42rem; }
body.page-offer .offer-copy + .offer-copy { margin-top: 0.9rem; }
body.page-offer .offer-includes { display: grid; gap: 0.7rem; margin: 0; max-width: 42rem; padding-left: 1.2rem; }
body.page-offer .offer-includes li { color: var(--text); line-height: 1.55; }
body.page-offer .offer-steps { display: grid; gap: 0.95rem; list-style: none; margin: 0; padding: 0; }
body.page-offer .offer-steps b { color: var(--ink); display: block; margin-bottom: 0.2rem; }
body.page-offer .offer-steps span { color: var(--muted); display: block; line-height: 1.55; }
body.page-offer .offer-side {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 2vw, 1.6rem);
}
body.page-offer .offer-side h2:first-child { margin-top: 0; }
body.page-offer .offer-faq { display: grid; gap: 1.15rem; margin: 0; }
body.page-offer .offer-faq dt { color: var(--ink); font-weight: 750; }
body.page-offer .offer-faq dd { color: var(--muted); margin: 0.25rem 0 0; }
body.page-offer .offer-related { display: grid; gap: 0.7rem; list-style: none; margin: 0; padding: 0; }
body.page-offer .offer-related a { color: var(--ink); font-weight: 700; }
@media (min-width: 48.01rem) {
  body.page-offer .offer-columns {
    align-items: start;
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
  }
}
@media (max-width: 48rem) {
  body.page-offer .offer-cta .button { width: 100%; }
}

/* The public brief is its own document, including inside the First Look frame. */
body.page-brief { display: block; min-height: 100vh; }
body.page-brief .site-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.95rem 1.25rem;
  position: static;
}
body.page-brief .brand img { border-radius: 0; height: 1.75rem; width: 1.75rem; }
body.page-brief .doc-nav { display: flex; gap: 1.1rem; }
body.page-brief .doc-nav a { color: var(--muted); font-size: 0.9rem; font-weight: 700; text-decoration: none; }
body.page-brief .doc-nav a:hover { color: var(--ink); }
body.page-brief > main {
  background: var(--paper);
  border: 1px solid var(--line);
  flex: none;
  margin: 2.5rem auto 4rem;
  max-width: 42rem;
  padding: 3rem 2.4rem 3.4rem;
}
body.page-brief .kicker {
  color: var(--accent);
  display: block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
}
body.page-brief h1 {
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0.55rem 0 1rem;
}
body.page-brief .dek {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.4;
  margin: 0 0 0.7rem;
}
body.page-brief .meta,
body.page-brief .note { color: var(--muted); font-size: 0.95rem; }
body.page-brief .note { border-left: 2px solid var(--ink); margin: 1.4rem 0 2.1rem; padding-left: 0.95rem; }
body.page-brief h2 { font-size: 1.45rem; margin: 2.1rem 0 0.7rem; }
body.page-brief p,
body.page-brief li { margin: 0 0 0.9rem; }
body.page-brief ul { padding-left: 1.15rem; }
body.page-brief .sources a { word-break: break-word; }
html.embedded body.page-brief { background: var(--paper); }
html.embedded body.page-brief .site-header { display: none; }
html.embedded body.page-brief > main { border: 0; margin: 0; max-width: none; padding: clamp(1.2rem, 4vw, 2.2rem); }
@media print {
  body.page-brief > main { border: 0; margin: 0; max-width: none; padding: 0; }
}
