/* AutoTasks site stylesheet: tokens compiled from the design system, then components. */
:root {
  --paper: #f3eee4;
  --paper-2: #ebe4d6;
  --surface: #fffdfa;
  --ink: #211f1a;
  --ink-muted: #625c53;
  --rule: #d8d0c3;
  --rule-strong: #8a8275;
  --orange: #c94812;
  --orange-ink: #a93409;
  --orange-soft: #f9e4d6;
  --deep-ink: #252720;
  --on-orange: #ffffff;
  --on-deep: var(--paper);
  --focus: var(--ink);
  --error: #a3261b;
  --brand-mark: #f0561e;
  --night: #172238;
  --night-rule: rgba(243, 238, 228, 0.16);
  --on-night: var(--paper);
  --on-night-muted: #b9b3a8;
  --cloud: var(--paper);
  --cloud-shade: #d8ccb6;
  --illo-skin: #e9a27a;
  --illo-skin-shade: #b8693f;
  --illo-hill: #2c3a30;
  --illo-skin-light: #f4bd98;
  --illo-nail: #f7d3bd;
  --illo-pup-light: #e8743a;
  --shadow-artifact: 0 1px 2px rgba(33, 31, 26, 0.06), 0 10px 28px rgba(33, 31, 26, 0.07);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-28: 112px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --content-max: 1180px;
  --gutter-desktop: 48px;
  --gutter-tablet: 28px;
  --gutter-mobile: 20px;
  --header-desktop: 76px;
  --header-mobile: 64px;
  --target-min: 48px;
  --measure: 36em;
  --font-serif: Fraunces, Georgia, "Times New Roman", serif;
  --font-sans: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* AutoTasks site components. Every value comes from tokens.json via tokens.css. */

/* ---------- Page ---------- */
.at-page { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.at-page *, .at-page *::before, .at-page *::after { box-sizing: border-box; }
.at-page img { max-width: 100%; display: block; }
.at-wrap { max-width: calc(var(--content-max) + 2 * var(--gutter-desktop)); margin: 0 auto; padding: 0 var(--gutter-desktop); }
.at-skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--radius-md); z-index: 10; }
.at-skip:focus { top: 12px; }

/* ---------- Type ---------- */
.at-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 var(--space-6); font: 500 15px/1.4 var(--font-sans); color: var(--orange-ink); }
.at-eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--orange); flex: none; }
.at-h1 { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 72px; line-height: 1.06; letter-spacing: -0.02em; font-variation-settings: "opsz" 144; text-wrap: balance; }
.at-h2 { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 44px; line-height: 1.1; letter-spacing: -0.015em; font-variation-settings: "opsz" 96; text-wrap: balance; }
.at-h3 { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 24px; line-height: 1.25; font-variation-settings: "opsz" 36; }
.at-lead { margin: var(--space-6) 0 0; font-size: 20px; line-height: 1.55; max-width: var(--measure); }
.at-body { max-width: var(--measure); }
.at-small { font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
.at-num { font: 500 13px/1.4 var(--font-mono); color: var(--orange-ink); letter-spacing: 0.02em; }
.at-letter-text { font-family: var(--font-serif); font-size: 22px; line-height: 1.5; font-variation-settings: "opsz" 24; }

/* ---------- Header ---------- */
.at-header { position: sticky; top: 0; z-index: 5; height: var(--header-desktop); display: flex; align-items: center; background: var(--paper); border-bottom: 1px solid var(--rule); }
.at-header > .at-wrap { display: flex; align-items: center; gap: 36px; width: 100%; }
.at-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 44px; }
.at-logo .mk { width: 34px; height: 34px; display: grid; place-items: center; flex: none; }
.at-logo .mk svg { width: 34px; height: 34px; display: block; }
.at-mark .plate { fill: none; stroke: currentColor; stroke-width: 6.5; }
.at-mark .tile { fill: var(--orange); }
.at-logo .word { font: 600 23px/1 var(--font-serif); letter-spacing: -0.015em; font-variation-settings: "opsz" 72; }
.at-nav { display: flex; gap: 30px; margin-left: auto; }
.at-nav a { color: var(--ink); text-decoration: none; font: 500 16px/1.3 var(--font-sans); padding: 12px 0; border-bottom: 2px solid transparent; transition: border-color .18s ease, color .18s ease; }
.at-nav a:hover { border-bottom-color: var(--orange); }
.at-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.at-menu-btn { display: none; margin-left: auto; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; background: transparent; color: var(--ink); border: 1.5px solid var(--ink); border-radius: var(--radius-md); font: 600 15px/1 var(--font-sans); cursor: pointer; }
.at-menu-btn .bars { width: 16px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; position: relative; }
.at-menu-btn[aria-expanded="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Actions ---------- */
.at-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--target-min); padding: 0 24px; border-radius: var(--radius-md); background: var(--orange); color: var(--on-orange); border: 1.5px solid var(--orange); font: 600 16px/1.2 var(--font-sans); text-decoration: none; cursor: pointer; transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
.at-btn:hover, .at-btn.is-hover { background: var(--orange-ink); border-color: var(--orange-ink); }
.at-btn:active, .at-btn.is-active { background: var(--deep-ink); border-color: var(--deep-ink); }
.at-btn:focus-visible, .at-btn.is-focus { outline: 3px solid var(--focus); outline-offset: 3px; }
.at-btn--quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.at-btn--quiet:hover, .at-btn--quiet.is-hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.at-btn--quiet:active, .at-btn--quiet.is-active { background: var(--deep-ink); color: var(--paper); }
.at-btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.at-btn[aria-busy="true"] { cursor: progress; background: var(--orange-ink); border-color: var(--orange-ink); }
.at-link { display: inline-block; padding: 15px 0; color: var(--ink); font: 600 16px/1.2 var(--font-sans); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 6px; transition: color .18s ease; }
.at-link:hover, .at-link.is-hover { color: var(--orange-ink); }
.at-link:focus-visible, .at-link.is-focus { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.at-link .arr { display: inline-block; margin-left: 6px; transition: transform .18s ease; }
.at-link:hover .arr { transform: translateY(2px); }
.at-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: var(--space-8); }

/* ---------- Byline ---------- */
.at-byline { display: flex; align-items: center; gap: 14px; margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--rule); max-width: 34em; }
.at-byline img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 52% 30%; flex: none; }
.at-byline b { display: block; font: 600 16px/1.35 var(--font-sans); }
.at-byline span { display: block; font-size: 15px; line-height: 1.45; color: var(--ink-muted); }

/* ---------- Work note (illustrative example artifact) ---------- */
.at-note { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-artifact); padding: var(--space-7); }
.at-note__meta { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed var(--rule); font: 500 13px/1.4 var(--font-mono); color: var(--ink-muted); }
.at-note__meta .tag { color: var(--orange-ink); }
.at-note__title { margin: 18px 0 22px; font-family: var(--font-serif); font-weight: 500; font-size: 26px; line-height: 1.2; font-variation-settings: "opsz" 36; }
.at-steps { list-style: none; margin: 0; padding: 0; }
.at-step { position: relative; padding: 0 0 24px 40px; }
.at-step::before { content: ""; position: absolute; left: 9px; top: 26px; bottom: 2px; width: 2px; background: var(--rule); }
.at-step--today::before { background: var(--orange); }
.at-step:last-child { padding-bottom: 0; }
.at-step:last-child::before { display: none; }
.at-step__dot { position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink-muted); background: var(--surface); }
.at-step--change .at-step__dot { border-color: var(--orange); background: var(--orange); box-shadow: inset 0 0 0 4px var(--surface); }
.at-step__label { display: block; margin-bottom: 4px; font: 600 14px/1.4 var(--font-sans); color: var(--ink-muted); }
.at-step--change .at-step__label { color: var(--orange-ink); }
.at-step p { margin: 0; font-size: 17px; line-height: 1.55; }
.at-human { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0 0 40px; padding: var(--space-3) 14px; background: var(--orange-soft); border-radius: var(--radius-sm); font-size: 16px; line-height: 1.45; }
.at-human svg { flex: none; margin-top: 2px; }
.at-human b { font-weight: 600; }
.at-note__caption { margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed var(--rule); font-size: 15px; line-height: 1.5; color: var(--ink-muted); }

/* ---------- Hero A: working notebook ---------- */
.at-hero { padding: var(--space-16) 0 var(--space-12); }
.at-hero--a .at-hero__grid { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; }
.at-hero--a .at-note { margin-top: 8px; }

/* ---------- Hero B: founder-led letter ---------- */
.at-hero--b .at-hero__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.at-portrait { margin: 0; }
.at-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: var(--radius-lg); background: var(--paper-2); }
.at-hero--b .at-h1 { font-size: 60px; line-height: 1.08; }
.at-letter { margin-top: var(--space-6); padding-left: 22px; border-left: 2px solid var(--orange); max-width: 32em; }
.at-letter__from { margin: 0 0 6px; font: 500 13px/1.4 var(--font-mono); color: var(--ink-muted); }
.at-letter p.at-letter-text { margin: 0; }
.at-letter__sign { margin: 14px 0 0; font: 600 16px/1.4 var(--font-sans); }

/* ---------- Full-width example sheet (B) ---------- */
.at-sheet { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 40px 0 36px; }
.at-sheet__head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 28px; }
.at-sheet__head .tag { font: 500 13px/1.4 var(--font-mono); color: var(--orange-ink); }
.at-sheet__grid { display: grid; grid-template-columns: 1fr 72px 1fr 1fr; align-items: start; }
.at-sheet__col { padding-right: 32px; }
.at-sheet__col + .at-sheet__col { padding-left: 32px; border-left: 1px solid var(--rule); }
.at-sheet__col p { margin: 0; font-size: 17px; line-height: 1.55; }
.at-sheet__col .at-step__label { margin-bottom: 8px; }
.at-sheet__arrow { position: relative; height: 2px; margin-top: 30px; background: var(--orange); }
.at-sheet__arrow::after { content: ""; position: absolute; right: -1px; top: -5px; border: 6px solid transparent; border-left: 9px solid var(--orange); border-right: 0; }
.at-sheet__col--change .at-step__label { color: var(--orange-ink); }
.at-sheet__col--human { background: var(--orange-soft); border-left: 0 !important; padding: 16px 18px !important; border-radius: var(--radius-sm); margin-left: 24px; }
.at-sheet__caption { margin: 26px 0 0; font-size: 15px; color: var(--ink-muted); }

/* ---------- Section hint (top of the next section) ---------- */
.at-hint { padding: 36px 0 0; }
.at-hint .at-wrap > div { border-top: 1px solid var(--ink); padding-top: 18px; display: grid; grid-template-columns: 90px 1fr; gap: 16px; align-items: baseline; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .at-wrap { padding: 0 var(--gutter-tablet); }
  .at-header { height: var(--header-mobile); }
  .at-nav, .at-header .at-btn { display: none; }
  .at-menu-btn { display: inline-flex; }
  .at-h1 { font-size: 56px; }
  .at-hero--a .at-hero__grid, .at-hero--b .at-hero__grid { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 767px) {
  .at-page { font-size: 17px; }
  .at-wrap { padding: 0 var(--gutter-mobile); }
  .at-hero { padding: 32px 0 40px; }
  .at-h1, .at-hero--b .at-h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.015em; font-variation-settings: "opsz" 96; }
  .at-h2 { font-size: 30px; line-height: 1.15; }
  .at-eyebrow { margin-bottom: 16px; }
  .at-lead { font-size: 17px; line-height: 1.6; margin-top: 16px; }
  .at-actions { flex-direction: column; align-items: stretch; gap: 4px; margin-top: 24px; }
  .at-actions .at-btn { width: 100%; }
  .at-actions .at-link { align-self: flex-start; }
  .at-byline { margin-top: 20px; padding-top: 18px; }
  .at-note { padding: 20px; }
  .at-note__title { font-size: 22px; margin: 14px 0 18px; }
  .at-step p { font-size: 16px; }
  .at-human { margin-left: 0; }
  .at-portrait--band img { aspect-ratio: 16 / 9; object-position: 50% 28%; }
  .at-letter { padding-left: 16px; margin-top: 20px; }
  .at-letter-text { font-size: 19px; }
  .at-sheet { padding: 28px 0; }
  .at-sheet__head { flex-direction: column; gap: 6px; }
  .at-sheet__grid { grid-template-columns: 1fr; }
  .at-sheet__col, .at-sheet__col + .at-sheet__col { padding: 0 0 0 20px; border-left: 2px solid var(--rule); }
  .at-sheet__col:first-child { border-left-color: var(--orange); padding-bottom: 20px; }
  .at-sheet__arrow { display: none; }
  .at-sheet__col--change { padding-bottom: 20px; }
  .at-sheet__col--human { margin: 0; border-left: 0; }
  .at-hint .at-wrap > div { grid-template-columns: 1fr; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .at-page *, .at-page *::before, .at-page *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   Homepage sections, form, footer and page templates (Direction A)
   ===================================================================== */
html { scroll-padding-top: calc(var(--header-desktop) + 16px); }

/* ---------- Mobile menu ---------- */
.at-mnav { border-bottom: 1px solid var(--rule); background: var(--paper); }
.at-mnav[hidden] { display: none; }
.at-mnav ul { list-style: none; margin: 0; padding: 8px 0 20px; }
.at-mnav li a { display: flex; align-items: center; min-height: 52px; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none; font: 500 18px/1.3 var(--font-sans); }
.at-mnav li:first-child a { border-top: 0; }
.at-mnav li a:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.at-mnav .at-btn { width: 100%; margin-top: 12px; }

/* ---------- Sections ---------- */
.at-section { padding: var(--space-28) 0; }
.at-section--tight { padding: var(--space-20) 0; }
.at-section--band { background: var(--paper-2); }
.at-sechead { display: grid; grid-template-columns: 3fr 9fr; gap: 32px; padding-top: 18px; border-top: 1px solid var(--ink); margin-bottom: var(--space-12); }
.at-sechead .at-num { padding-top: 10px; }
.at-sechead p { margin: 18px 0 0; max-width: var(--measure); }
.at-offset { margin-left: calc(25% + 8px); }

/* ---------- Recognition rows ---------- */
.at-rows { list-style: none; margin: 0; padding: 0; }
.at-row { display: grid; grid-template-columns: 72px 5fr 6fr; gap: 32px; padding: 32px 0; border-top: 1px solid var(--rule); align-items: start; }
.at-row:last-child { border-bottom: 1px solid var(--rule); }
.at-row__num { font-family: var(--font-serif); font-size: 40px; line-height: 1; color: var(--orange); font-variation-settings: "opsz" 96; }
.at-row h3 { font-family: var(--font-serif); font-weight: 500; font-size: 26px; line-height: 1.25; margin: 0; font-variation-settings: "opsz" 36; }
.at-row p { margin: 0 0 6px; }
.at-row .at-link { padding: 13px 0; font-size: 15px; }

/* ---------- Example selector ---------- */
.at-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; }
.at-tabs[hidden] { display: none; }
.at-tab { min-height: 44px; padding: 0 18px; background: transparent; color: var(--ink); border: 1.5px solid var(--rule-strong); border-radius: var(--radius-md); font: 600 15px/1 var(--font-sans); cursor: pointer; transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
.at-tab:hover, .at-tab.is-hover { border-color: var(--ink); }
.at-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.at-tab:focus-visible, .at-tab.is-focus { outline: 3px solid var(--focus); outline-offset: 3px; }
.at-example { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-artifact); padding: 32px 36px; }
.at-example + .at-example { margin-top: 20px; }
.at-example[hidden] { display: none; }
.at-example__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px dashed var(--rule); }
.at-example__head .tag { font: 500 13px/1.4 var(--font-mono); color: var(--orange-ink); }
.at-example .at-sheet__grid { grid-template-columns: 1fr 56px 1fr 1fr; }
.at-example .at-sheet__col--change { border-left: 0; padding-left: 16px; }
.at-caption { margin: 20px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-muted); max-width: 44em; }

/* ---------- Process ---------- */
.at-process { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 0; padding: 0; }
.at-proc { padding: 0 32px; border-left: 1px solid var(--rule-strong); }
.at-proc:first-child { padding-left: 0; border-left: 0; }
.at-proc__n { display: block; font-family: var(--font-serif); font-size: 64px; line-height: 1; color: var(--orange); margin-bottom: 20px; font-variation-settings: "opsz" 144; }
.at-proc h3 { margin: 0 0 12px; }
.at-proc p { margin: 0; }

/* ---------- Judgment ---------- */
.at-judge { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.at-judge .at-h2::before { content: ""; display: block; width: 64px; height: 3px; background: var(--orange); margin-bottom: 28px; }
.at-judge p { margin: 0 0 18px; max-width: var(--measure); }
.at-judge p.at-letter-text { font-size: 24px; }

/* ---------- Case study feature ---------- */
.at-case { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; align-items: start; }
.at-meta { margin: 0; display: grid; gap: 18px; }
.at-meta div { padding-top: 12px; border-top: 1px solid var(--rule); }
.at-meta dt { font: 500 13px/1.4 var(--font-mono); color: var(--ink-muted); margin-bottom: 4px; }
.at-meta dd { margin: 0; font-size: 17px; line-height: 1.45; }
.at-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 1.5px solid var(--ink); border-radius: var(--radius-sm); font: 600 13px/1 var(--font-sans); }
.at-case__title { margin: 16px 0 16px; font-family: var(--font-serif); font-weight: 500; font-size: 32px; line-height: 1.2; font-variation-settings: "opsz" 72; text-wrap: balance; }
.at-case p { max-width: var(--measure); }

/* ---------- Founder block ---------- */
.at-founder { display: grid; grid-template-columns: 4fr 1fr 7fr; align-items: center; }
.at-founder .at-portrait { grid-column: 1; max-width: 380px; }
.at-founder__text { grid-column: 3; }
.at-founder__text .at-letter-text { margin: 20px 0 0; max-width: 30em; }

/* ---------- Costs ---------- */
.at-costs { display: grid; grid-template-columns: 6fr 1fr 5fr; align-items: start; }
.at-costs__text { grid-column: 1; }
.at-costs__text p { max-width: var(--measure); }
.at-seq { grid-column: 3; list-style: none; margin: 8px 0 0; padding: 28px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); }
.at-seq li { position: relative; padding: 0 0 26px 44px; }
.at-seq li:last-child { padding-bottom: 0; }
.at-seq li::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 0; width: 2px; background: var(--rule); }
.at-seq li:last-child::before { display: none; }
.at-seq .n { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--orange); display: grid; place-items: center; font: 600 13px/1 var(--font-sans); color: var(--orange-ink); background: var(--surface); }
.at-seq b { display: block; font-weight: 600; font-size: 17px; line-height: 1.4; padding-top: 2px; }
.at-seq span.d { display: block; font-size: 15px; line-height: 1.5; color: var(--ink-muted); }

/* ---------- FAQ ---------- */
.at-faq { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; align-items: start; }
.at-faq__list { border-bottom: 1px solid var(--rule); }
.at-faq details { border-top: 1px solid var(--rule); }
.at-faq summary { list-style: none; position: relative; display: block; min-height: 56px; padding: 18px 48px 18px 0; cursor: pointer; font-family: var(--font-serif); font-weight: 500; font-size: 21px; line-height: 1.35; font-variation-settings: "opsz" 36; }
.at-faq summary::-webkit-details-marker { display: none; }
.at-faq summary::after { content: "+"; position: absolute; right: 6px; top: 16px; width: 28px; height: 28px; display: grid; place-items: center; border: 1.5px solid var(--rule-strong); border-radius: 50%; font: 500 18px/1 var(--font-sans); color: var(--ink); transition: background-color .18s ease; }
.at-faq summary:hover::after { border-color: var(--ink); }
.at-faq details[open] summary::after { content: "\2212"; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.at-faq summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.at-faq details p { margin: 0 48px 22px 0; max-width: var(--measure); }

/* ---------- Contact and form ---------- */
.at-contact { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.at-contact__intro p { max-width: 30em; }
.at-contact__alt { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule-strong); }
.at-contact__alt p { margin: 0; font-size: 16px; }
.at-form { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 36px; }
.at-field { margin: 0 0 22px; }
.at-field > label, .at-fieldset legend { display: block; margin-bottom: 8px; font: 600 16px/1.35 var(--font-sans); color: var(--ink); }
.at-field .opt, .at-fieldset .opt { font-weight: 400; color: var(--ink-muted); }
.at-input { width: 100%; min-height: 48px; padding: 11px 14px; background: var(--surface); color: var(--ink); border: 1.5px solid var(--rule-strong); border-radius: var(--radius-md); font: 400 17px/1.45 var(--font-sans); transition: border-color .18s ease; }
textarea.at-input { min-height: 132px; resize: vertical; }
.at-input:hover { border-color: var(--ink-muted); }
.at-input:focus, .at-input.is-focus { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--ink); }
.at-input[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.at-err { display: flex; gap: 8px; margin: 8px 0 0; font: 500 15px/1.45 var(--font-sans); color: var(--error); }
.at-err::before { content: "!"; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--error); color: var(--surface); display: grid; place-items: center; font: 700 12px/1 var(--font-sans); }
.at-err[hidden] { display: none; }
.at-fieldset { border: 0; margin: 0 0 22px; padding: 0; }
.at-choice { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; margin-bottom: 8px; border: 1.5px solid var(--rule); border-radius: var(--radius-md); cursor: pointer; font-size: 16px; line-height: 1.4; transition: border-color .18s ease; }
.at-choice:hover { border-color: var(--rule-strong); }
.at-choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); flex: none; }
.at-choice input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.at-choice:has(input:checked) { border-color: var(--ink); background: var(--paper); }
.at-form__foot { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rule); }
.at-form__foot .at-btn { width: 100%; }
.at-form__note { margin: 14px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
.at-form__note a { color: var(--ink); text-underline-offset: 3px; }
.at-status { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 24px; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 16px; line-height: 1.5; }
.at-status b { display: block; font-weight: 600; }
.at-status--proto { background: var(--orange-soft); color: var(--ink); font: 500 14px/1.5 var(--font-mono); }
.at-status--error { border: 2px solid var(--error); color: var(--ink); background: var(--surface); }
.at-status--error b { color: var(--error); }
.at-status--success { border: 2px solid var(--ink); background: var(--paper); }
.at-status--sending { border: 1.5px dashed var(--rule-strong); color: var(--ink-muted); }
.at-status ul { margin: 6px 0 0; padding-left: 18px; }
.at-status a { color: var(--ink); }

/* ---------- Footer ---------- */
.at-footer { background: var(--deep-ink); color: var(--on-deep); padding: var(--space-20) 0 40px; }
.at-footer__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; }
.at-footer .at-logo { color: var(--on-deep); }

.at-footer p { margin: 18px 0 0; max-width: 28em; font-size: 16px; }
.at-footer__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; list-style: none; margin: 0; padding: 0; align-content: start; }
.at-footer__links a { display: flex; align-items: center; min-height: 44px; border-top: 1px solid rgba(243, 238, 228, 0.18); color: var(--on-deep); text-decoration: none; font-size: 16px; }
.at-footer__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.at-footer a:focus-visible { outline: 3px solid var(--on-deep); outline-offset: 3px; }
.at-footer__base { margin-top: 56px; padding-top: 20px; border-top: 1px solid rgba(243, 238, 228, 0.18); font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.at-footer__base a { color: var(--on-deep); }

/* ---------- Supporting pages ---------- */
.at-pagehead { padding: var(--space-16) 0 var(--space-12); border-bottom: 1px solid var(--rule); }
.at-pagehead .at-h1 { font-size: 60px; max-width: 16ch; }
.at-pagehead .at-lead { margin-top: 20px; }
.at-crumb { margin: 0 0 20px; font-size: 15px; color: var(--ink-muted); }
.at-crumb a { color: var(--ink); text-underline-offset: 3px; }
.at-twocol { display: grid; grid-template-columns: 3fr 9fr; gap: 48px; align-items: start; }
.at-toc { position: sticky; top: calc(var(--header-desktop) + 24px); }
.at-toc p { margin: 0 0 10px; font: 500 13px/1.4 var(--font-mono); color: var(--ink-muted); }
.at-toc ol { list-style: none; margin: 0; padding: 0; }
.at-toc a { display: block; padding: 7px 0; color: var(--ink); text-decoration: none; font-size: 15px; border-top: 1px solid var(--rule); }
.at-toc a:hover { color: var(--orange-ink); }
.at-prose { max-width: 38em; }
.at-prose h2 { margin: 48px 0 14px; font-family: var(--font-serif); font-weight: 500; font-size: 30px; line-height: 1.2; font-variation-settings: "opsz" 72; }
.at-prose h2:first-child { margin-top: 0; }
.at-prose p, .at-prose ul, .at-prose ol { margin: 0 0 18px; }
.at-prose li { margin-bottom: 6px; }
.at-prose a { color: var(--ink); text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.at-table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 16px; }
.at-table th, .at-table td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-top: 1px solid var(--rule); }
.at-table th { font: 600 14px/1.4 var(--font-sans); color: var(--ink-muted); width: 30%; }
.at-invite { margin-top: 56px; padding: 32px; background: var(--paper-2); border-radius: var(--radius-lg); }
.at-invite h2 { margin: 0 0 10px !important; }
.at-invite p { margin: 0 0 4px; }
.at-articlehead { max-width: 44em; }
.at-articlehead .at-h1 { font-size: 52px; line-height: 1.1; max-width: none; }
.at-byline--article { border-top: 0; padding-top: 0; margin-top: 24px; }
.at-postlist { list-style: none; margin: 0; padding: 0; }
.at-post { display: grid; grid-template-columns: 3fr 8fr 1fr; gap: 32px; padding: 28px 0; border-top: 1px solid var(--rule); align-items: start; }
.at-post:last-child { border-bottom: 1px solid var(--rule); }
.at-post h2 { margin: 0 0 8px; font-family: var(--font-serif); font-weight: 500; font-size: 26px; line-height: 1.25; font-variation-settings: "opsz" 36; }
.at-post h2 a { color: var(--ink); text-decoration: none; }
.at-post h2 a:hover { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 5px; }
.at-post h2 a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.at-post p { margin: 0; color: var(--ink-muted); max-width: var(--measure); }
.at-post .arr { justify-self: end; font-size: 22px; color: var(--ink); }

@media (max-width: 1023px) {
  html { scroll-padding-top: calc(var(--header-mobile) + 12px); }
  .at-section { padding: 80px 0; }
  .at-sechead, .at-judge, .at-case, .at-faq, .at-contact, .at-twocol, .at-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .at-offset { margin-left: 0; }
  .at-founder, .at-costs { grid-template-columns: 1fr; gap: 32px; }
  .at-founder .at-portrait, .at-founder__text, .at-costs__text, .at-seq { grid-column: 1; }
  .at-toc { position: static; }
  .at-pagehead .at-h1 { font-size: 48px; }
}
@media (max-width: 767px) {
  .at-section, .at-section--tight { padding: 56px 0; }
  .at-sechead { margin-bottom: 28px; gap: 10px; }
  .at-row { grid-template-columns: 44px 1fr; gap: 8px 14px; padding: 24px 0; }
  .at-row__num { font-size: 30px; grid-row: span 2; }
  .at-row h3 { font-size: 22px; }
  .at-example { padding: 20px; }
  .at-example__head { flex-direction: column; gap: 4px; }
  .at-example .at-sheet__grid { grid-template-columns: 1fr; }
  .at-example .at-sheet__col--change { padding-left: 20px; border-left: 2px solid var(--rule); }
  .at-process { grid-template-columns: 1fr; gap: 28px; }
  .at-proc, .at-proc:first-child { padding: 0; border-left: 0; display: grid; grid-template-columns: 52px 1fr; gap: 0 14px; }
  .at-proc__n { font-size: 40px; grid-row: span 2; margin: 0; }
  .at-judge p.at-letter-text { font-size: 20px; }
  .at-case__title { font-size: 26px; }
  .at-founder .at-portrait { max-width: 220px; }
  .at-seq { padding: 20px; }
  .at-faq summary { font-size: 19px; padding-right: 44px; }
  .at-faq details p { margin-right: 0; }
  .at-form { padding: 20px; }
  .at-footer { padding-top: 56px; }
  .at-footer__links { grid-template-columns: 1fr; }
  .at-pagehead { padding: 36px 0 32px; }
  .at-pagehead .at-h1, .at-articlehead .at-h1 { font-size: 36px; }
  .at-prose h2 { font-size: 25px; }
  .at-post { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .at-post .arr { display: none; }
  .at-invite { padding: 22px; }
}

/* =====================================================================
   Night hero with the marionette illustration (Direction C, owner-directed)
   ===================================================================== */
.at-night { position: relative; overflow: hidden; background: var(--night); color: var(--on-night); }
.at-night::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(243, 238, 228, 0.07) 1px, transparent 1.3px); background-size: 5px 5px; }
.at-night > * { position: relative; }

/* Header on night */
.at-header--night { background: var(--night); border-bottom-color: var(--night-rule); }
.at-header--night .at-logo, .at-header--night .at-nav a { color: var(--on-night); }

.at-header--night .at-menu-btn { color: var(--on-night); border-color: var(--on-night); }
.at-header--night .at-menu-btn[aria-expanded="true"] { background: var(--paper); color: var(--night); }
.at-header--night a:focus-visible, .at-header--night button:focus-visible, .at-header--night .at-btn.is-focus { outline-color: var(--on-night); }
.at-mnav--night { background: var(--night); border-bottom-color: var(--night-rule); }
.at-mnav--night li a { color: var(--on-night); border-top-color: var(--night-rule); }
.at-mnav--night a:focus-visible { outline-color: var(--on-night); }

/* Hero layout */
.at-hero--c { padding: 48px 0 0; }
.at-hero--c .at-hero__grid { display: grid; grid-template-columns: 6fr 6fr; gap: 24px; align-items: center; min-height: 640px; }
.at-chip { display: inline-flex; align-items: center; min-height: 32px; margin: 0 0 28px; padding: 0 14px; border: 1px solid var(--night-rule); border-radius: 999px; font: 500 14px/1 var(--font-sans); color: var(--on-night); background: rgba(243, 238, 228, 0.04); }
.at-hero--c .at-h1 { color: var(--on-night); font-weight: 400; font-size: 76px; line-height: 1.04; letter-spacing: -0.02em; }
.at-hero--c .at-lead { color: var(--on-night-muted); max-width: 30em; }
.at-btn--night { background: transparent; color: var(--on-night); border-color: rgba(243, 238, 228, 0.55); }
.at-btn--night:hover, .at-btn--night.is-hover { background: var(--paper); color: var(--night); border-color: var(--paper); }
.at-btn--night:active, .at-btn--night.is-active { background: var(--cloud-shade); color: var(--night); }
.at-night .at-btn:focus-visible, .at-night .at-btn.is-focus, .at-night .at-link:focus-visible { outline-color: var(--on-night); }
.at-night .at-btn .arr { display: inline-block; transition: transform .18s ease; }
.at-night .at-btn--night:hover .arr { transform: translateY(2px); }
.at-night .at-byline { border-top-color: var(--night-rule); }
.at-night .at-byline b { color: var(--on-night); }
.at-night .at-byline span { color: var(--on-night-muted); }
.at-night .at-byline img { box-shadow: 0 0 0 2px var(--night), 0 0 0 3px var(--night-rule); }

/* Illustration stage */
.at-stage { position: relative; align-self: end; margin-right: calc(-1 * var(--gutter-desktop)); }
.at-stage svg { display: block; width: 100%; height: auto; max-height: 760px; }
.at-marionette .cl { fill: var(--cloud); }
.at-marionette .cl-s { fill: var(--cloud-shade); }
.at-marionette .hill { fill: var(--illo-hill); }
.at-marionette .skin { fill: var(--illo-skin); }
.at-marionette .skin-s { fill: var(--illo-skin-shade); }
.at-marionette .finger { fill: none; stroke: var(--illo-skin); stroke-width: 19; stroke-linecap: round; stroke-linejoin: round; }
.at-marionette .finger-s { fill: none; stroke: var(--illo-skin-shade); stroke-width: 23; stroke-linecap: round; stroke-linejoin: round; }
.at-marionette .knuckle { fill: none; stroke: var(--illo-skin-shade); stroke-width: 2; stroke-linecap: round; opacity: .7; }
.at-marionette .str { stroke: var(--on-night); stroke-width: 1.4; opacity: .85; }
.at-marionette .pup { fill: var(--orange); }
.at-marionette .pup-d { fill: var(--orange-ink); }
.at-marionette .eye { fill: var(--night); }
.at-marionette .shine { fill: var(--paper); }
.at-marionette .pup-l { fill: var(--illo-pup-light); }
.at-marionette .skin-g { fill: url(#at-skin); }
.at-marionette .sk-l { stop-color: var(--illo-skin-light); }
.at-marionette .sk-m { stop-color: var(--illo-skin); }
.at-marionette .sk-d { stop-color: var(--illo-skin-shade); }
.at-marionette .nail { fill: var(--illo-nail); opacity: .9; }
.at-marionette .crease, .at-marionette .tendon { fill: none; stroke: var(--illo-skin-shade); stroke-width: 1.6; stroke-linecap: round; opacity: .55; }
.at-marionette .tendon { opacity: .28; stroke-width: 2.4; }
.at-marionette .knuck { fill: var(--illo-skin-light); opacity: .55; }
.at-marionette .badge { fill: var(--ink); }
.at-marionette .badge-text { font: 700 13px/1 var(--font-mono); fill: var(--paper); letter-spacing: 0.04em; }
.at-marionette .tex { fill: url(#at-htone); pointer-events: none; }
.at-motion-btn { position: absolute; right: 16px; bottom: 20px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; background: rgba(23, 34, 56, 0.9); color: var(--on-night); border: 1px solid rgba(243, 238, 228, 0.35); border-radius: 50%; cursor: pointer; transition: background-color .18s ease, border-color .18s ease; }
.at-motion-btn:hover { background: var(--night); border-color: rgba(243, 238, 228, 0.7); }
.at-motion-btn:focus-visible { outline: 3px solid var(--on-night); outline-offset: 3px; }
.at-motion-btn svg { width: 12px; height: 12px; fill: currentColor; }
.at-motion-btn .i-play, .at-motion-btn.is-paused .i-pause { display: none; }
.at-motion-btn.is-paused .i-play { display: inline; }
.at-motion-btn[hidden] { display: none; }

/* Example strip (replaces the reference's stats row) */
.at-strip { border-top: 1px solid var(--night-rule); }
.at-strip__grid { display: grid; grid-template-columns: 160px repeat(3, 1fr); gap: 32px; padding: 24px 0 30px; align-items: start; list-style: none; margin: 0; }
.at-strip__label { margin: 0; font: 500 13px/1.45 var(--font-mono); color: var(--on-night-muted); padding-top: 4px; }
.at-strip__item { padding-left: 18px; border-left: 1px solid var(--night-rule); }
.at-strip__item .n { display: block; font: 500 13px/1.4 var(--font-mono); color: var(--on-night-muted); margin-bottom: 4px; }
.at-strip__item b { display: block; font-family: var(--font-serif); font-weight: 400; font-size: 22px; line-height: 1.25; color: var(--on-night); font-variation-settings: "opsz" 36; }
.at-strip__item.is-human b::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 10px; border-radius: 50%; background: var(--orange); vertical-align: middle; }

@media (max-width: 1023px) {
  .at-hero--c .at-hero__grid { grid-template-columns: 1fr; min-height: 0; gap: 8px; }
  .at-hero--c .at-h1 { font-size: 56px; }
  .at-stage { margin: 0 auto; max-width: 520px; width: 100%; }
  .at-strip__grid { grid-template-columns: repeat(3, 1fr); }
  .at-strip__label { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .at-hero--c { padding-top: 28px; }
  .at-chip { margin-bottom: 18px; font-size: 13px; }
  .at-hero--c .at-h1 { font-size: 40px; line-height: 1.08; }
  .at-stage { max-width: 380px; margin-top: 12px; }
  .at-motion-btn { right: 8px; bottom: 12px; }
  .at-strip__grid { grid-template-columns: 1fr; gap: 14px; padding: 20px 0 26px; }
  .at-strip__item b { font-size: 19px; }
}
