/* PromptMask — the redaction page.
 * Loads after /shared/base.css. Light scheme: white paper, black ink, one teal accent.
 * Teal (#23A094) is for fills, rules and large marks; text that must read uses --teal-ink.
 * Mint (#D3F3F0) belongs to placeholders: wherever you see it, something was masked.
 * The two product replicas (the popup and the in-page notices) keep the extension's own colours. */

:root {
  color-scheme: light;
  --paper: #FFFFFF;
  --ink: #000000;
  --text: #161A19;
  --dim: #4A5250;
  --teal: #23A094;
  --teal-ink: #0F7A70;
  --mint: #D3F3F0;
  --mint-ink: #0B5E56;
  --wash: #EEF9F7;
  --line: #DDE4E2;
  --line-dark: #2A2F2E;
  --dim-dark: #A7B1AF;
  --toast: #1b3a57;
  --focus-ring: #0F7A70;
  --selection-bg: #D3F3F0;
  --selection-fg: #000;
  --max-w: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --disp: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shell-bg: #000;
  --shell-fg: #fff;
  --footer-bg: #000;
  --footer-fg: #fff;
}

body { background: var(--paper); color: var(--text); font: 400 17px/1.6 var(--body); }
h1, h2, h3 { text-wrap: balance; color: var(--ink); }
.aer-footer h2 { color: inherit; }
p, li, dd { text-wrap: pretty; }
code { font-family: var(--mono); font-size: 0.86em; background: color-mix(in srgb, var(--ink) 6%, transparent); padding: 1px 5px; border-radius: 4px; }
kbd { font-family: var(--mono); font-size: 0.82em; font-weight: 500; display: inline-block; padding: 1px 6px 2px; border-radius: 5px; background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink), 0 2px 0 var(--ink); line-height: 1.3; }

/* Dark surfaces get a teal focus ring that reads on black. */
.band--how, .aer-strip, .aer-footer { --focus-ring: var(--teal); }
.band--access { --focus-ring: var(--ink); }

/* A masked value, everywhere on the page. */
.ph { font-family: var(--mono); font-weight: 500; font-size: 0.86em; color: var(--mint-ink); background: var(--mint); padding: 0.06em 0.36em; border-radius: 5px; white-space: nowrap; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* In-text links: a teal underline that fills to a mint highlight on hover. */
main a:not([class]), .aer-footer__author {
  text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 3px;
  background: linear-gradient(var(--mint), var(--mint)) 0 100% / 0 100% no-repeat;
  transition: background-size 260ms var(--ease);
}
main a:not([class]):hover { background-size: 100% 100%; }
.aer-footer .aer-footer__author { opacity: 1; background: none; }

/* ---------- page nav ---------- */
.pagenav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.2) blur(8px); -webkit-backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line); }
.pagenav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.pagenav__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--disp); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.015em; color: var(--ink); min-height: 44px; }
.pagenav__mark { width: 30px; height: 30px; transition: transform 300ms var(--ease); }
.pagenav__brand:hover .pagenav__mark { transform: rotate(-8deg) scale(1.06); }
.pagenav__menu { display: flex; align-items: center; gap: 2px; }
.pagenav__menu a { text-decoration: none; font-weight: 500; font-size: 0.98rem; color: var(--ink); padding: 10px 12px; border-radius: 8px; transition: background 160ms ease; }
.pagenav__menu a:hover { background: var(--wash); }
.pagenav__actions { display: flex; align-items: center; gap: 10px; }
.pagenav__cta { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; font-size: 0.96rem; text-decoration: none; white-space: nowrap; transition: transform 160ms var(--ease), box-shadow 160ms var(--ease); }
.pagenav__cta:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--teal); }
.pagenav__cta:active { transform: none; box-shadow: none; }
.pagenav__toggle { display: none; width: 44px; height: 44px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--paper); flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.pagenav__toggle span { width: 18px; height: 2px; background: var(--ink); transition: transform 180ms var(--ease); }
.pagenav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.pagenav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 860px) {
  .pagenav__toggle { display: flex; }
  .pagenav__menu { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 2px solid var(--ink); padding: 6px var(--gutter) 14px; box-shadow: 0 18px 30px -18px rgba(0,0,0,.25); }
  .pagenav__menu[hidden] { display: none; }
  .pagenav__menu a { padding: 14px 6px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1.05rem; }
  .pagenav__menu a:last-child { border-bottom: 0; }
}
@media (min-width: 861px) { .pagenav__menu[hidden] { display: flex; } }
@media (max-width: 480px) {
  .pagenav .wrap { gap: 6px; }
  .pagenav__brand { font-size: 1.12rem; gap: 7px; }
  .pagenav__mark { width: 26px; height: 26px; }
  .pagenav__actions { gap: 6px; }
  .pagenav__cta { padding: 6px 12px; font-size: 0.9rem; }
}
:where([id]) { scroll-margin-top: 76px; }
@media (max-width: 374px) {
  .pagenav__brand { flex-shrink: 0; }
  .pagenav__cta { display: none; }
}

/* ---------- shared idioms ---------- */
.band { padding: clamp(64px, 9vw, 120px) 0; }
.band__head { max-width: 720px; }
.h2 { font-family: var(--disp); font-weight: 800; font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.02; letter-spacing: -0.025em; }
.band__lede { margin-top: 16px; font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.55; color: var(--dim); max-width: 60ch; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 24px; border-radius: 12px; font-weight: 650; font-size: 1.05rem; text-decoration: none; transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms ease; }
.btn:active { transform: translate(1px, 1px); box-shadow: none; }
.btn--primary, .btn--ink { background: var(--ink); color: #fff; }
.btn--primary:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--teal); }
.btn--ink:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--paper); }
.btn--ghost { color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--ghost:hover { background: var(--wash); transform: translate(-2px, -2px); box-shadow: inset 0 0 0 2px var(--ink), 4px 4px 0 var(--ink); }
.btn--line { color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--line:hover { background: color-mix(in srgb, var(--paper) 22%, transparent); transform: translate(-2px, -2px); box-shadow: inset 0 0 0 2px var(--ink), 4px 4px 0 var(--ink); }

/* ---------- hero ---------- */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 104px); overflow-x: clip; }
.hero__grid { display: grid; gap: clamp(36px, 5vw, 64px); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 1024px) { .hero__grid { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); } }
.hero__title { font-family: var(--disp); font-weight: 800; font-size: clamp(2.45rem, 6.4vw, 4.6rem); line-height: 0.98; letter-spacing: -0.028em; max-width: 13ch; }
.hero__lede { margin-top: 22px; font-size: clamp(1.08rem, 1.7vw, 1.3rem); line-height: 1.55; max-width: 42ch; color: var(--text); }
.hero__cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__facts { margin-top: 26px; display: grid; gap: 6px; font-size: 0.95rem; color: var(--dim); }
.hero__facts li { display: flex; gap: 10px; align-items: baseline; }
.hero__facts li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--teal); transform: translateY(-1px); }
@media (max-width: 480px) { .hero__cta .btn { flex: 1 1 100%; } }

/* Hero entrance: copy settles in before the demo starts. */
@media (prefers-reduced-motion: no-preference) {
  .pm-js .hero__copy > * { animation: rise 700ms var(--ease) both; }
  .pm-js .hero__copy > :nth-child(2) { animation-delay: 80ms; }
  .pm-js .hero__copy > :nth-child(3) { animation-delay: 160ms; }
  .pm-js .hero__copy > :nth-child(4) { animation-delay: 240ms; }
  .pm-js .hero__stage { animation: rise 800ms var(--ease) 200ms both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- the demo: a chat composer with PromptMask installed ---------- */
.demo { margin: 0; }
.demo__frame { position: relative; display: flex; flex-direction: column; height: var(--demo-h, 380px); background: var(--paper); border: 2px solid var(--ink); border-radius: 20px; box-shadow: 10px 10px 0 var(--teal); overflow: hidden; }
.demo__bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.demo__title { font-weight: 600; color: var(--ink); }
.demo__ext { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: 0.85rem; }
.demo__ext img { width: 22px; height: 22px; border-radius: 5px; }
.demo__thread { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 22px 18px 18px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end; gap: 8px; background: linear-gradient(#FBFCFC, #FFFFFF); }
.bubble { max-width: 88%; padding: 12px 15px; border-radius: 18px 18px 6px 18px; background: #EEF1F0; color: var(--ink); font-size: 0.98rem; line-height: 1.6; overflow-wrap: anywhere; }
.bubble .ph { font-size: 0.84em; }
.demo__sent { font-size: 0.8rem; color: var(--dim); display: inline-flex; align-items: center; gap: 6px; }
.demo__sent::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

/* Notices, exactly as the content script draws them (spinner bottom 64 / toast bottom 16). */
.spinner { position: absolute; right: 16px; bottom: 64px; width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.25); opacity: 0; transition: opacity 160ms ease; }
.spinner.is-on { opacity: 1; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: absolute; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 7px; max-width: calc(100% - 32px); padding: 10px 14px; border-radius: 10px; font: 400 13px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; color: #f8f8f8; background: var(--toast); box-shadow: 0 8px 24px rgba(0,0,0,.2); opacity: 0; transition: opacity 160ms ease; }
.toast.is-on { opacity: 1; }
.toast__ok { flex: none; }
.toast__ok[hidden] { display: none; }

.composer { position: relative; flex: none; display: flex; align-items: flex-end; gap: 12px; margin: 0 14px 14px; padding: 14px 12px 12px 16px; border: 1.5px solid #C9D2D0; border-radius: 18px; background: var(--paper); transition: background 200ms ease, border-color 200ms ease; overflow: hidden; }
.composer__text { flex: 1; min-height: 3.2em; font-size: 0.98rem; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.composer__ph { color: #8A9492; }
.composer__send { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; transition: background 200ms ease, transform 120ms ease; }
.composer.is-busy { background: #F6F8F7; }
.composer.is-busy .composer__send { background: #C3CAC8; }
.composer__send.is-press { transform: scale(0.9); }
.caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 1px; vertical-align: -0.2em; background: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* While the model works, a light passes over the text. */
.composer.is-busy::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(35,160,148,.16) 50%, transparent 70%); transform: translateX(-100%); animation: sweep 1.1s var(--ease) infinite; pointer-events: none; }
@keyframes sweep { to { transform: translateX(100%); } }
.composer__text .ph.is-new { animation: mask-in 520ms var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes mask-in { 0% { opacity: 0; transform: scale(.8); background: var(--teal); color: #fff; } 60% { opacity: 1; transform: scale(1.04); background: var(--teal); color: #fff; } 100% { transform: none; } }

/* Play states. The static markup is the finished state; page.js arms and plays it. */
.demo.is-armed .bubble, .demo.is-armed .demo__sent { opacity: 0; transform: translateY(14px) scale(.98); }
.demo .bubble, .demo .demo__sent { transition: opacity 420ms var(--ease), transform 520ms var(--ease); }
.demo.is-armed .bubble.is-on, .demo.is-armed .demo__sent.is-on { opacity: 1; transform: none; }
.demo.is-armed .demo__sent.is-on { transition-delay: 260ms; }

/* Steps under the frame */
.demo__steps { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.steps { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.92rem; color: var(--dim); }
.steps__i { display: inline-flex; align-items: center; gap: 8px; transition: color 200ms ease; }
.steps__n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 0.78rem; font-weight: 700; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); transition: background 220ms ease, color 220ms ease, transform 220ms var(--ease); }
.steps__i.is-on { color: var(--ink); }
.steps__i.is-on .steps__n { background: var(--teal); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); transform: scale(1.1); }
.demo.is-armed .steps__i:not(.is-on):not(.is-done) { opacity: .55; }
.steps__i.is-done .steps__n { background: var(--ink); color: #fff; }
.steps kbd.is-press { animation: press 260ms ease; }
@keyframes press { 40% { transform: translateY(2px); box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 var(--ink); } }
.demo__replay { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 10px; font-size: 0.9rem; font-weight: 600; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); transition: background 160ms ease, transform 160ms var(--ease); }
.demo__replay:hover { background: var(--wash); transform: translateY(-1px); }
.demo__replay svg { transition: transform 400ms var(--ease); }
.demo__replay:hover svg { transform: rotate(-200deg); }
.demo__replay[hidden] { display: none; }
.demo__note { margin-top: 14px; font-size: 0.86rem; color: var(--dim); max-width: 60ch; }

@media (max-width: 560px) {
  .demo__frame { border-radius: 16px; box-shadow: 6px 6px 0 var(--teal); }
  .demo__frame { --demo-h: 350px; }
  .demo__thread { padding: 18px 12px 14px; }
  .bubble { max-width: 94%; font-size: 0.95rem; }
  .composer { margin: 0 10px 10px; padding: 12px 10px 10px 13px; }
  .composer__text { font-size: 0.95rem; }
  .toast { right: 12px; bottom: 12px; }
  .spinner { right: 12px; }
  .steps { gap: 10px 14px; }
}

/* ---------- what it masks ---------- */
.band--masks { background: var(--wash); border-top: 1px solid var(--line); }
.masks { margin-top: clamp(36px, 5vw, 56px); display: grid; gap: clamp(28px, 4vw, 48px); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 720px) { .masks { grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); } }
@media (min-width: 1100px) { .masks { grid-template-columns: 360px minmax(0, 1fr); } }

/* The popup, rebuilt from popup.html / popup.css (system font, iOS-style switches, #0a84ff). */
.popup { width: 100%; max-width: 380px; justify-self: center; padding: 14px 12px 12px; border-radius: 18px; background: rgba(242,242,247,.96); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 12px 34px rgba(60,60,67,.24); font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Helvetica, Arial, sans-serif; color: #000; }
.popup__head { margin-bottom: 12px; }
.popup__title { font-size: 27px; font-weight: 700; line-height: 1.1; color: #1c1c1e; }
.popup__pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; line-height: 1.2; color: #1c1c1e; }
.popup__pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #0a84ff; transition: background 200ms ease; }
.popup__pill.is-paused { color: #6e6e73; }
.popup__pill.is-paused::before { background: #8e8e93; }
.pcard { margin: 0; min-width: 0; padding: 10px 12px 4px; border-radius: 14px; border: 1px solid #ededf2; background: #fff; }
.pcard + .pcard { margin-top: 10px; }
.pcard__title { float: left; width: 100%; padding: 0; font-size: 14px; font-weight: 700; color: #6e6e73; margin-bottom: 6px; }
.prow { clear: both; position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 49px; padding: 9px 0; border-bottom: 1px solid #e5e5ea; font-size: 15px; line-height: 1.25; cursor: pointer; }
.prow:last-of-type { border-bottom: 0; }
.prow input { position: absolute; opacity: 0; width: 51px; height: 31px; right: 0; margin: 0; cursor: pointer; }
.slider { position: relative; flex: none; width: 51px; height: 31px; border-radius: 999px; background: #d1d1d6; transition: background-color 180ms ease; pointer-events: none; }
.slider::before { content: ""; position: absolute; width: 27px; height: 27px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.24), 0 .5px 1px rgba(0,0,0,.2); transition: transform 220ms cubic-bezier(.22,1,.36,1); }
.prow input:checked + .slider { background: #0a84ff; }
.prow input:checked + .slider::before { transform: translateX(20px); }
.prow input:focus-visible + .slider { outline: 2px solid #0a84ff; outline-offset: 2px; }
.prow:active .slider::before { width: 32px; }
.prow input:checked:active + .slider::before { transform: translateX(15px); }
.popup__note { margin: 12px 4px 2px; font-size: 13px; line-height: 1.4; color: #6e6e73; }

.masks__side { container: side / inline-size; display: grid; gap: clamp(28px, 4vw, 40px); min-width: 0; }
.sample { background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; }
.sample__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.sample__count { font-family: var(--mono); font-weight: 500; font-size: 0.82rem; color: var(--mint-ink); background: var(--mint); padding: 3px 9px; border-radius: 999px; }
.sample__text { padding: 18px; font-size: 1.04rem; line-height: 1.85; color: var(--ink); overflow-wrap: anywhere; }
.m { white-space: nowrap; font-family: var(--mono); font-weight: 500; font-size: 0.86em; color: var(--mint-ink); background: var(--mint); padding: 0.08em 0.36em; border-radius: 5px; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background 220ms ease, color 220ms ease, box-shadow 220ms ease; }
.m.is-off { white-space: normal; font-family: inherit; font-weight: inherit; font-size: 1em; color: var(--ink); background: transparent; padding: 0; text-decoration: underline dotted #8A9492 1.5px; text-underline-offset: 4px; }
.m.is-flip { animation: flip 420ms var(--ease); }
@keyframes flip { 0% { opacity: .2; filter: blur(2px); } 100% { opacity: 1; filter: none; } }
.m.is-hl { box-shadow: 0 0 0 2px var(--teal); }
.m.is-off.is-hl { box-shadow: none; background: #F3F5F4; }
.sample__foot { padding: 0 18px 16px; font-size: 0.86rem; color: var(--dim); }

.keys__h { font-family: var(--disp); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; }
.keys__list { margin: 14px 0 0; display: grid; }
.keys__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 18px; padding: 12px 0; border-top: 1px solid color-mix(in srgb, var(--teal) 30%, transparent); }
.keys__row:last-child { border-bottom: 1px solid color-mix(in srgb, var(--teal) 30%, transparent); }
.keys__row dt { font-weight: 600; color: var(--ink); font-size: 0.98rem; }
.keys__row dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.keys__row dd span { font-family: var(--mono); font-size: 0.8rem; color: var(--mint-ink); background: var(--paper); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--teal) 45%, transparent); padding: 2px 8px; border-radius: 6px; transition: background 200ms ease; }
.keys__row:hover dd span { background: var(--mint); }
.keys__row > * { transition: opacity 220ms ease; }
.keys__row.is-off > * { opacity: .45; }
.keys__row.is-off dd span { text-decoration: line-through; }
.keys__foot { margin-top: 16px; font-size: 0.95rem; color: var(--dim); }
@container side (min-width: 540px) { .keys__row { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); } }

/* ---------- how it works ---------- */
.band--how { background: #000; color: #E9EEED; }
.band--how .h2, .band--how h3 { color: #fff; }
.band--how .band__lede { color: var(--dim-dark); }
.band--how code { background: rgba(255,255,255,.1); color: #fff; }

.path { position: relative; margin-top: clamp(40px, 6vw, 64px); display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); view-timeline: --path block; }
/* The rail: a line through the numbers that fills as the path scrolls into view. */
.path::before, .path::after { content: ""; position: absolute; background: var(--line-dark); }
.path::after { background: var(--teal); }
@media (min-width: 900px) {
  .path { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
  .path::before, .path::after { top: 21px; left: 22px; right: calc(25% - 7px); height: 2px; transform-origin: left center; }
  .path::after { transform: scaleX(var(--fill, 1)); }
}
@media (max-width: 899px) {
  .path { padding-left: 0; }
  .path::before, .path::after { left: 21px; top: 22px; bottom: 60px; width: 2px; transform-origin: center top; }
  .path::after { transform: scaleY(var(--fill, 1)); }
}
.hop { position: relative; padding: 0; }
@media (max-width: 899px) { .hop { padding-left: 64px; } }
.hop__n { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #000; color: #fff; font-family: var(--disp); font-weight: 800; font-size: 1.15rem; box-shadow: inset 0 0 0 2px var(--teal); }
@media (max-width: 899px) { .hop__n { position: absolute; left: 0; top: -6px; } }
.hop__h { margin-top: 18px; font-family: var(--disp); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.01em; }
@media (max-width: 899px) { .hop__h { margin-top: 2px; } }
.hop__file { margin-top: 4px; font-family: var(--mono); font-size: 0.82rem; color: var(--teal); }
.hop__p { margin-top: 10px; font-size: 0.98rem; color: #D5DCDA; }
.hop__msg { margin-top: 14px; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--dim-dark); }
.hop--gpu .hop__n { background: var(--teal); color: #000; box-shadow: none; }
.hop--gpu .hop__h::after { content: "Gemma runs here"; display: table; margin-top: 8px; padding: 2px 8px; border-radius: 999px; font-family: var(--body); font-size: 0.72rem; font-weight: 600; letter-spacing: 0; color: #000; background: var(--mint); }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .path::after { animation: rail-x linear both; animation-timeline: --path; animation-range: entry 35% cover 55%; }
    @media (max-width: 899px) { .path::after { animation-name: rail-y; } }
  }
}
@keyframes rail-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rail-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
/* Fallback without scroll timelines: page.js sets --fill once the path is in view. */
.path.is-armed::after { transition: transform 1400ms var(--ease); }

.guards { margin-top: clamp(48px, 6vw, 72px); display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .guards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }
.guard { padding-top: 18px; border-top: 2px solid var(--teal); }
.guard__h { font-family: var(--disp); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.guard p { margin-top: 8px; font-size: 0.98rem; color: #D5DCDA; }

/* ---------- model ---------- */
.model { display: grid; gap: clamp(36px, 5vw, 64px); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 960px) { .model { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }
.specs { margin: 28px 0 0; display: grid; }
.specs > div { display: grid; grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr); gap: 4px 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.specs > div:last-child { border-bottom: 1px solid var(--line); }
.specs dt { font-weight: 650; color: var(--ink); }
.specs dd { margin: 0; color: var(--text); font-size: 0.98rem; }
@media (max-width: 480px) { .specs > div { grid-template-columns: minmax(0, 1fr); } }
.model__terms { margin-top: 18px; font-size: 0.92rem; color: var(--dim); }

.model__states { display: grid; gap: 18px; min-width: 0; }
.state { min-width: 0; }
.state__label { font-weight: 650; color: var(--ink); font-size: 0.95rem; }
.state__stage { position: relative; margin-top: 8px; min-height: 132px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 16px; border-radius: 16px; background-color: #F4F6F5; background-image: radial-gradient(#D3DAD8 1px, transparent 1px); background-size: 14px 14px; border: 1px solid var(--line); }
.state__stage--row { flex-direction: column; align-items: flex-end; gap: 20px; }
.banner { width: 100%; max-width: 280px; padding: 12px 16px; border-radius: 12px; font: 500 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: #f0f0f0; background: linear-gradient(135deg, #1b3a57 0%, #163049 100%); box-shadow: 0 8px 28px rgba(0,0,0,.3); }
.spinner--static, .toast--static { position: static; opacity: 1; }
.spinner--static { margin-right: 0; }
@media (prefers-reduced-motion: no-preference) {
  .model__states.is-in .spinner--static { animation: spin 0.8s linear infinite; }
}
.state__note { font-size: 0.88rem; color: var(--dim); }

/* ---------- privacy ---------- */
.band--privacy { background: var(--mint); color: #102221; }
.band--privacy .band__lede { color: #2E3D3B; }
.band--privacy code { background: rgba(255,255,255,.7); }
.facts { margin-top: clamp(36px, 5vw, 56px); display: grid; gap: 28px 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }
.fact { padding-top: 18px; border-top: 2px solid var(--ink); }
.fact__h { font-family: var(--disp); font-weight: 800; font-size: 1.22rem; letter-spacing: -0.01em; }
.fact p { margin-top: 8px; font-size: 0.98rem; color: #22302E; }
.privacy__links { margin-top: clamp(36px, 5vw, 52px); display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; font-size: 1rem; }
.privacy__links > a { font-weight: 650; color: var(--ink); }
.band--privacy a:not([class]) { background-image: linear-gradient(#fff, #fff); text-decoration-color: var(--ink); }
.privacy__meta { color: #2E3D3B; font-size: 0.95rem; }

/* ---------- limits ---------- */
.limits__list { margin-top: clamp(32px, 4vw, 48px); display: grid; gap: 28px 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .limits__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.limits__list li { padding-left: 20px; border-left: 2px solid var(--ink); }
.limits__h { font-family: var(--disp); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.limits__list p { margin-top: 8px; font-size: 0.98rem; color: var(--text); }

/* ---------- access ---------- */
.band--access { background: var(--teal); color: #000; border-top: 2px solid var(--ink); }
.access { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 900px) { .access { grid-template-columns: minmax(0, 1.4fr) auto; } }
.band--access .h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 14ch; }
.access__lede { margin-top: 16px; font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 54ch; color: #000; }
.access__cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 480px) { .access__cta .btn { flex: 1 1 100%; } }

/* ---------- footer ---------- */
.aer-footer .aer-footer__author { text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: 3px; }

/* ---------- staggered reveals (the shell adds .is-in to [data-reveal] once seen) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .pm-js [data-reveal] > * { opacity: 0; transform: translateY(16px); transition: opacity 560ms var(--ease), transform 640ms var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .pm-js [data-reveal].is-in > * { opacity: 1; transform: none; }
  .pm-js .path[data-reveal] > .hop .hop__n { transform: scale(.6); transition: transform 520ms var(--ease); transition-delay: calc(var(--i, 0) * 110ms + 80ms); }
  .pm-js .path[data-reveal].is-in > .hop .hop__n { transform: none; }
  .pm-js .path[data-reveal] > * { transition-delay: calc(var(--i, 0) * 110ms); }
}

@media (max-width: 380px) { .demo__frame { --demo-h: 366px; } }

/* A canceled decorative model-state loop stays settled on preference restoration. */
html.pm-motion-settled .model__states .spinner--static { animation: none!important; }
