/* Layout: a quiet, single-column lobby. The tower is the only illustration; colour lives on its floors. */

/* ---------- Self-hosted fonts (SIL Open Font License, see /fonts) ---------- */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/bricolage-grotesque-700.woff2) format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/bricolage-grotesque-800.woff2) format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/atkinson-hyperlegible-400.woff2) format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/atkinson-hyperlegible-700.woff2) format('woff2'); }
@font-face { font-family: 'Space Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/space-mono-400.woff2) format('woff2'); }
@font-face { font-family: 'Space Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/space-mono-700.woff2) format('woff2'); }

:root {
  --bg: #F5F6FA;
  --surface: #FFFFFF;
  --ink: #11132B;
  --muted: #4A4E6E;
  --line: #DADCEB;
  --accent: #2338D6;
  --accent-ink: #FFFFFF;
  --accent-soft: #E6E9FF;
  --danger: #B0123F;
  --night: #0B0D22;
  --night-surface: #161938;
  --night-ink: #EEF0FF;
  --night-muted: #B7BAE0;
  --night-line: #33376A;
  --signal: #C6FF3D;
  --alarm: #FF8AB0;
  --tower-frame: #11132B;
  --f6: #C6FF3D; --f5: #FF8CC6; --f4: #8FD3FF; --f3: #FFB27A; --f2: #C9B8FF; --b1: #3B3B4F;
  --floor-ink: #11132B;
  --font-display: 'Bricolage Grotesque', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 12px;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0D22; --surface: #14173A; --ink: #EEF0FF; --muted: #AEB2D8; --line: #2A2E5C;
    --accent: #8C9BFF; --accent-ink: #0B0D22; --accent-soft: #181C47; --danger: #FF8AB0;
    --night: #05061A; --night-surface: #14173A; --tower-frame: #2E3366;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0D22; --surface: #14173A; --ink: #EEF0FF; --muted: #AEB2D8; --line: #2A2E5C;
  --accent: #8C9BFF; --accent-ink: #0B0D22; --accent-soft: #181C47; --danger: #FF8AB0;
  --night: #05061A; --night-surface: #14173A; --tower-frame: #2E3366;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--font-body); overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0; }
h1, h2, h3, .h3 { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.875rem, 3.6vw, 2.75rem); }
h3, .h3 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
strong { font-weight: 700; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.section { padding-block: clamp(64px, 9vw, 112px); border-top: 1px solid var(--line); }
.section.tight { border-top: 0; padding-top: 0; }
.eyebrow { font: 700 0.75rem/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.25rem); line-height: 1.6; color: var(--muted); max-width: 58ch; }
.section-head { display: grid; gap: 14px; max-width: 64ch; margin-bottom: clamp(32px, 5vw, 56px); }
.mono { font: 700 0.9375rem/1.4 var(--font-mono); color: var(--ink); word-break: break-word; }
.note { color: var(--muted); font-size: 0.9375rem; }
.callout { padding: 14px 18px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); font-size: 0.9375rem; max-width: 72ch; }
.callout strong { color: var(--ink); }

/* ---------- Accessibility helpers ---------- */
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 12px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.night :focus-visible { outline-color: var(--signal); }
main:focus, [tabindex="-1"]:focus { outline: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font: 700 1rem/1 var(--font-body); text-decoration: none; cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary, .btn-primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn-ghost, .btn-ghost:hover { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-signal, .btn-signal:hover { background: var(--signal); color: #11132B; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 1.25rem/1 var(--font-display); letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 30px; color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 0.9375rem; padding-block: 10px; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }
.nav .btn { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; }
.theme-toggle { width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ---------- Hero and tower ---------- */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(40px, 7vw, 104px); align-items: center; padding-block: clamp(56px, 9vw, 112px); }
.hero-copy { display: grid; gap: 24px; }
.hero .hl { color: var(--accent); }
.tower { margin: 0; justify-self: center; width: min(300px, 100%); }
.tower-antenna { display: block; width: 72px; height: 56px; margin: 0 auto -1px; color: var(--tower-frame); }
.tower ol { list-style: none; margin: 0; padding: 6px; display: grid; gap: 6px; background: var(--tower-frame); border-radius: 14px 14px 4px 4px; }
.tower li a { display: grid; grid-template-columns: 56px 1fr; align-items: center; min-height: 50px; border-radius: 8px; overflow: hidden; color: var(--floor-ink); text-decoration: none; font: 700 0.875rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; transition: transform 0.2s ease; }
.tower li a:hover { transform: translateX(6px); }
.tower .code { align-self: stretch; display: grid; place-items: center; background: rgba(17, 19, 43, 0.12); }
.tower .who { padding-inline: 14px; }
.tower-base { height: 10px; margin-inline: -14px; background: var(--tower-frame); border-radius: 3px; }
.bg-f6 { background: var(--f6); } .bg-f5 { background: var(--f5); } .bg-f4 { background: var(--f4); }
.bg-f3 { background: var(--f3); } .bg-f2 { background: var(--f2); } .bg-b1 { background: var(--b1); }
.tower li a.bg-b1 { color: #F5F6FA; }
.tower li a.bg-b1 .code { background: rgba(0, 0, 0, 0.25); }
@keyframes beacon { 0%, 90%, 100% { opacity: 1; } 95% { opacity: 0.2; } }
.beacon { animation: beacon 4s infinite; }

/* ---------- Floors ---------- */
.floors { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.floor { display: grid; grid-template-columns: 72px minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px 32px; align-items: start; padding-block: 28px; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.bot { width: 72px; height: 72px; border-radius: 16px; display: grid; place-items: center; transition: transform 0.25s ease; }
.bot svg { width: 50px; height: 56px; }
.floor:hover .bot { transform: rotate(-4deg) scale(1.05); }
.floor-code { font: 700 0.75rem/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.floor h3 { margin-top: 6px; }
.floor-main > p:last-child { margin-top: 8px; color: var(--muted); max-width: 46ch; }
.floor-detail { display: grid; gap: 12px; padding-top: 4px; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.875rem; }
.guardrail { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9375rem; }
.guardrail svg { flex: none; margin-top: 4px; color: var(--accent); }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 28px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 8px; align-content: start; padding-top: 20px; border-top: 2px solid var(--ink); }
.steps li::before { content: counter(step); font: 800 2.25rem/1 var(--font-display); color: var(--accent); }
.step-when { font: 700 0.75rem/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.steps li > p:last-child { color: var(--muted); }

/* ---------- Night Shift ---------- */
.night { background: var(--night); color: var(--night-ink); border-top: 0; }
.night h2, .night h3 { color: var(--night-ink); }
.night .eyebrow { color: var(--signal); }
.night .lede { color: var(--night-muted); }
.ns { border: 1px solid var(--night-line); border-radius: 18px; background: var(--night-surface); padding: clamp(20px, 4vw, 44px); min-height: 380px; }
.ns-idle { display: grid; gap: 18px; justify-items: start; }
.ns-kicker { font: 700 0.8125rem/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--alarm); }
.ns-clock { font: 700 clamp(4.5rem, 12vw, 8.5rem)/0.9 var(--font-mono); color: var(--signal); letter-spacing: -0.04em; }
.ns-clock small { font-size: 0.3em; letter-spacing: 0.04em; margin-left: 0.4em; text-transform: uppercase; }
@keyframes colon { 50% { opacity: 0.25; } }
.colon { animation: colon 1.2s steps(1) infinite; }
.ns-intro { font-size: 1.125rem; color: var(--night-ink); max-width: 46ch; }
.ns-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; color: var(--night-muted); }
.ns-check input { width: 20px; height: 20px; accent-color: var(--signal); }
.ns-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font: 700 0.8125rem/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--night-muted); }
.ns-bar strong { color: var(--signal); }
.fuse { height: 6px; margin-top: 14px; border-radius: 999px; background: var(--night-line); overflow: hidden; }
.fuse span { display: block; height: 100%; width: 100%; background: var(--signal); transition: width 1s linear; }
.fuse.low span { background: var(--alarm); }
.alert { display: grid; gap: 10px; margin-top: 28px; }
.alert-src { font: 700 0.75rem/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal); }
.alert-text { font: 700 clamp(1.25rem, 2.4vw, 1.625rem)/1.35 var(--font-body); color: var(--night-ink); max-width: 52ch; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 24px; }
.choice { min-height: 64px; padding: 14px 16px; border: 1px solid var(--night-line); border-radius: 12px; background: transparent; color: var(--night-ink); font: 700 1rem/1.35 var(--font-body); text-align: left; cursor: pointer; transition: border-color 0.15s ease; }
.choice:hover { border-color: var(--signal); }
.choice[data-state="right"] { background: var(--signal); border-color: var(--signal); color: #11132B; }
.choice[data-state="wrong"] { background: var(--alarm); border-color: var(--alarm); color: #11132B; }
.choice[data-state="dim"] { color: var(--night-muted); border-style: dashed; cursor: default; }
.verdict { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--night-line); }
.verdict > div { flex: 1 1 420px; min-width: 0; display: grid; gap: 6px; }
.verdict-title { font: 800 1.5rem/1.1 var(--font-display); color: var(--signal); }
.verdict-title.miss { color: var(--alarm); }
.ns-done { display: grid; gap: 14px; justify-items: center; text-align: center; padding-block: 12px; }
.ns-rank { font: 800 clamp(2.75rem, 7vw, 5rem)/1 var(--font-display); color: var(--signal); }
.ns-done p { max-width: 56ch; color: var(--night-muted); }
.ns-done .ns-rank-text { color: var(--night-ink); font-size: 1.125rem; }

/* ---------- Pillars, cards, grids ---------- */
.pillars, .grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.pillar { display: grid; gap: 10px; align-content: start; padding-top: 20px; border-top: 2px solid var(--ink); }
.pillar p { color: var(--muted); }
.links-row { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 36px; font-weight: 700; }
.card { display: grid; gap: 10px; align-content: start; padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card > p { color: var(--muted); }
.card > p.mono { color: var(--ink); }
.card.wide { max-width: 760px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.summary { margin-bottom: 40px; }
.summary .card { color: var(--ink); font-weight: 700; }
.list { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--muted); }
.list strong { color: var(--ink); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.9375rem; }
th, td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font: 700 0.75rem/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
tbody tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 0.8125rem; font-weight: 700; }

/* ---------- Definition lists, guardrails, notes ---------- */
.defs { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px 40px; }
.defs div { padding-top: 16px; border-top: 1px solid var(--line); }
.defs dt { font-weight: 700; }
.defs dd { margin: 6px 0 0; color: var(--muted); }
.guardrails { margin: 0; padding-left: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 48px; color: var(--muted); }
.guardrails li::marker { font: 700 0.875rem var(--font-mono); color: var(--accent); }
.guardrails strong { color: var(--ink); }
.notes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.notes li { display: grid; grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1fr); gap: 4px 32px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.notes li .eyebrow { grid-row: span 2; padding-top: 4px; }
.notes li > p:last-child { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding-block: 20px; list-style: none; cursor: pointer; font: 700 1.125rem/1.4 var(--font-body); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 1.75rem/1 var(--font-display); color: var(--accent); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 22px; color: var(--muted); max-width: 66ch; }

/* ---------- Call to action and forms ---------- */
.cta { background: var(--accent-soft); }
.cta .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: clamp(56px, 8vw, 96px); }
.cta-copy { display: grid; gap: 14px; }
.signup { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.signup .h3 { flex: 1 1 100%; }
.signup label { flex: 1 1 100%; font: 700 0.75rem/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.signup input { flex: 1 1 220px; min-width: 0; min-height: 50px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; }
.signup input::placeholder { color: var(--muted); opacity: 0.8; }
.signup input[aria-invalid="true"] { border-color: var(--danger); }
.form-status { flex: 1 1 100%; min-height: 1.5em; font-size: 0.9375rem; font-weight: 700; color: var(--ink); }

/* ---------- Sub-page hero and legal ---------- */
.page-hero .wrap { display: grid; gap: 20px; padding-block: clamp(56px, 8vw, 96px) clamp(40px, 6vw, 64px); }
.page-hero .callout, .page-hero .actions { margin-top: 8px; }
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; margin-top: 40px; align-items: start; }
.toc { position: sticky; top: 24px; font-size: 0.9375rem; }
.toc ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; }
.toc a { display: block; padding-block: 6px; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.5rem; margin: 48px 0 12px; scroll-margin-top: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px 36px; color: var(--muted); font-size: 0.9375rem; }
.site-footer .wrap { display: grid; gap: 18px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; margin-bottom: 12px; }
.footer-brand strong { color: var(--ink); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer-links a { display: inline-block; padding-block: 8px; color: var(--ink); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.fine { font-size: 0.875rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-layout, .doc-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
}
@media (max-width: 820px) {
  .hero .wrap, .cta .wrap, .grid-2, .pillars, .grid-3 { grid-template-columns: 1fr; }
  .guardrails { grid-template-columns: 1fr; }
  .floor { grid-template-columns: 64px minmax(0, 1fr); }
  .floor-detail { grid-column: 2; }
  .bot { width: 64px; height: 64px; }
  .notes li { grid-template-columns: 1fr; }
  .notes li .eyebrow { grid-row: auto; }
}
@media (max-width: 560px) {
  .grid-4, .steps { grid-template-columns: 1fr; }
  .nav { gap: 2px 16px; }
  .nav a:not(.btn) { font-size: 0.875rem; }
}

/* ---------- Mobile menu ---------- */
.menu-toggle { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: 700 0.9375rem/1 var(--font-body); cursor: pointer; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.2s ease; }
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -5px; } .menu-icon::after { top: 5px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-5px) rotate(-45deg); }
@media (max-width: 760px) {
  .js .menu-toggle { display: inline-flex; }
  .js .nav { display: none; }
  .js .nav.open { display: flex; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-block: 8px 4px; border-top: 1px solid var(--line); }
  .js .nav.open a:not(.btn) { padding-block: 14px; font-size: 1.0625rem; border-bottom: 1px solid var(--line); }
  .js .nav.open .btn { margin-top: 14px; min-height: 50px; }
  .js .nav.open .theme-toggle { margin-top: 12px; }
}

/* ---------- Hero details ---------- */
.for { color: var(--muted); font-size: 0.9375rem; }
.ns-copied { min-height: 1.5em; color: var(--night-ink); max-width: 56ch; }
.ns-copied.selectable { user-select: all; padding: 12px 16px; border: 1px dashed var(--night-line); border-radius: var(--radius); }
.night { border-block: 1px solid var(--night-line); }

/* ---------- Motion ---------- */
@keyframes rise { from { transform: translateY(16px); } to { transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .tower li { animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .tower li:nth-child(6) { animation-delay: 0s; } .tower li:nth-child(5) { animation-delay: 0.06s; }
  .tower li:nth-child(4) { animation-delay: 0.12s; } .tower li:nth-child(3) { animation-delay: 0.18s; }
  .tower li:nth-child(2) { animation-delay: 0.24s; } .tower li:nth-child(1) { animation-delay: 0.3s; }
  @view-transition { navigation: auto; }
}


/* ---------- Custom floor (7F) and the sketch tool ---------- */
.tower li a.custom { color: #F5F6FA; border: 2px dashed var(--f6); background: transparent; }
.tower li a.custom .code { background: rgba(198, 255, 61, 0.14); color: var(--f6); }
.bot-custom { border: 2px dashed var(--line); color: var(--accent); background: var(--surface); }
.bot-custom svg { width: 32px; height: 32px; }
.floor-custom { background: linear-gradient(var(--accent-soft), var(--accent-soft)) padding-box; margin-inline: calc(-1 * clamp(12px, 2vw, 20px)); padding-inline: clamp(12px, 2vw, 20px); border-radius: var(--radius); border-bottom-color: transparent; }
.arrow-link { font-weight: 700; text-decoration: none; }
.arrow-link::after { content: " →"; }
.arrow-link:hover { text-decoration: underline; }

.sketch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.sketch .section-head { margin-bottom: 28px; }
.sketch-form { display: grid; gap: 12px; }
.sketch-form label { font: 700 0.75rem/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sketch-form textarea { width: 100%; min-height: 168px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; line-height: 1.55; resize: vertical; }
.sketch-form textarea::placeholder { color: var(--muted); opacity: 0.8; }
.sketch-form textarea[aria-invalid="true"] { border-color: var(--danger); }
.help { font-size: 0.875rem; color: var(--muted); }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip-example { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: 400 0.875rem/1 var(--font-body); cursor: pointer; }
.chip-example:hover { border-color: var(--accent); color: var(--accent); }
.sketch-output { display: grid; gap: 12px; align-content: start; padding: clamp(20px, 3vw, 32px); border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); min-height: 320px; scroll-margin-top: 24px; }
.sketch-output:focus { outline: none; }
.sketch-output:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sketch-output h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.sketch-output h4 { margin: 12px 0 0; font: 700 0.75rem/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sketch-meta { font: 700 0.875rem/1.4 var(--font-mono); color: var(--accent); }
.roles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.roles li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.roles p { grid-column: 1 / -1; color: var(--muted); font-size: 0.9375rem; }
.role-name { font-weight: 700; }
.role-bot { font: 400 0.75rem/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 900px) { .sketch { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) {
  .tower li:nth-child(7) { animation-delay: 0s; } .tower li:nth-child(6) { animation-delay: 0.05s; }
  .tower li:nth-child(5) { animation-delay: 0.1s; } .tower li:nth-child(4) { animation-delay: 0.15s; }
  .tower li:nth-child(3) { animation-delay: 0.2s; } .tower li:nth-child(2) { animation-delay: 0.25s; }
  .tower li:nth-child(1) { animation-delay: 0.36s; }
}

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
@media print {
  .skip-link, .theme-toggle, .nav, #nightshift, .cta { display: none !important; }
  body { background: #FFFFFF; color: #000000; }
}

/* ---------- Audit additions: breadcrumbs, footer contact, survey next steps, mid-page CTA ---------- */
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.875rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current="page"] { color: var(--ink); }
.footer-brand { display: grid; gap: 10px; }
.footer-contact a { color: var(--ink); font-weight: 700; }
.next-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; color: var(--muted); }
.next-steps li { position: relative; padding-left: 22px; }
.next-steps li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.steps-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 40px; color: var(--muted); }
