@font-face { font-family: "Inter"; src: url("./fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("./fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("./fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations"), url("./fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }
/* =====================================================================
   [TOKENS] Values copied from tokens.generated.ts (v5.*, signal.*, av.*, mark.*) and globals.css (radius, motion).
   Dark is the default; light overrides it.
   ===================================================================== */
:root, :root[data-theme="dark"] {
  --ground: #131211; --surface: #1b1a18; --surface-2: #232220; --surface-3: #2c2a27;
  --fg: #ece9e3; --fg-2: #c6c2ba; --fg-3: #8f8b83;
  --line: #2a2825; --line-strong: #3b3834; --bubble: #262420; --code-ground: #161513;
  --accent: #2cc6c6; --accent-soft: #112e2e; --accent-ink: #7ee0e0; --link: #6fa8ff; --focus: #6fa8ff;
  --ok: #4bce97; --ok-soft: #16321f; --ok-ink: #4bce97;
  --warn: #f0be43; --warn-soft: #382c10; --err: #f87168; --err-soft: #3c1a17;
  --jira: #579dff; --jira-soft: #1c2b41; --conf: #4bce97; --conf-soft: #1c3329; --auto: #e2b203; --auto-soft: #332e1b;
  --loz-neutral-bg: #2c2a27; --loz-neutral-ink: #c6c2ba; --loz-info-bg: #1c2b41; --loz-info-ink: #85b8ff; --loz-ok-bg: #1c3329; --loz-ok-ink: #7ee2b8;
  --working: #e2b203; --working-soft: #332e1b; --attention: #f87168;
  --series-1: #7480e0; --series-2: #c95d8f; --series-3: #7e9838; --series-4: #a1409b; --series-5: #ae80c5;
  --elev-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.35);
  --elev-overlay: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 32px rgba(0, 0, 0, 0.5);
  --av-pe-edge: #7d8594; --av-pe-rim: #99a0ae; --av-shadow: .5; --av-rim: .35;
  --tile-top: #232b3a; --tile-bottom: #0b0f16; --tile-edge: #8a93a3;
  --hero-glow: rgba(44, 198, 198, .16);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --ground: #f7f5f1; --surface: #ffffff; --surface-2: #f0ede7; --surface-3: #e8e4dd;
  --fg: #1b1a18; --fg-2: #4b4842; --fg-3: #6b6760;
  --line: #e5e1da; --line-strong: #d2cdc4; --bubble: #ece8e0; --code-ground: #f4f2ee;
  --accent: #0f8f8f; --accent-soft: #dff2f1; --accent-ink: #0b6b6b; --link: #0c66e4; --focus: #0c66e4;
  --ok: #1f845a; --ok-soft: #e1f3ea; --ok-ink: #216e4e;
  --warn: #a35700; --warn-soft: #fbefd9; --err: #c1352a; --err-soft: #fbe4e1;
  --jira: #1d7afc; --jira-soft: #e9f2ff; --conf: #1f845a; --conf-soft: #e3fcef; --auto: #946f00; --auto-soft: #fff7d6;
  --loz-neutral-bg: #e8e4dd; --loz-neutral-ink: #45423c; --loz-info-bg: #e9f2ff; --loz-info-ink: #0055cc; --loz-ok-bg: #dcfff1; --loz-ok-ink: #216e4e;
  --working: #f5cd47; --working-soft: #fff7d6; --attention: #c9372c;
  --series-1: #5563c9; --series-2: #c0487a; --series-3: #6f8a2e; --series-4: #bc7cb6; --series-5: #653b8a;
  --elev-1: 0 1px 2px rgba(27, 26, 24, 0.06), 0 4px 16px rgba(27, 26, 24, 0.05);
  --elev-overlay: 0 0 0 1px rgba(27, 26, 24, 0.08), 0 12px 32px rgba(27, 26, 24, 0.14);
  --av-pe-edge: #5f6879; --av-pe-rim: #8a92a2; --av-shadow: .3; --av-rim: .2;
  --tile-top: #ffffff; --tile-bottom: #dfe4ec; --tile-edge: #6b7383;
  --hero-glow: rgba(15, 143, 143, .10);
  color-scheme: light;
}
:root {
  /* Round 7: one screen is the container every section fills (no top bar). dvh follows the phone's toolbars; 100vh
     is only the fallback for browsers without the dynamic units. */
  --screen: 100vh;
  /* Radius (globals.css --v5-radius-*) */
  --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-xl: 10px; --r-2xl: 12px; --r-3xl: 16px;
  /* Motion (globals.css --v5-dur-*, --v5-ease-*). JS mirrors these in [MOTION]. */
  --dur-hover: 80ms; --dur-press: 120ms; --dur-enter: 180ms; --dur-panel: 240ms; --dur-exit: 140ms; --stagger: 40ms;
  --ease-enter: cubic-bezier(0, 0.4, 0, 1);
  --ease-soft: cubic-bezier(0.4, 1, 0.6, 1);
  --ease-move: cubic-bezier(0.4, 0, 0, 1);
  --ease-exit: cubic-bezier(0.6, 0, 0.8, 0.6);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  /* Springs: JS writes linear() curves here at boot ([MOTION] SPRING). The fallbacks are the strong ease-out. */
  --spring-pop: var(--ease-out); --spring-pop-ms: 420ms;
  /* Type (v5-scales.ts TYPE_SCALE; display steps down on a phone) */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: 44px;
  --gutter: 16px; --maxw: 1200px;
}
@supports (height: 100dvh) { :root { --screen: 100dvh; } }
@media (max-width: 759px) { :root { --display: 34px; } }

/* =====================================================================
   [LAYOUT] base
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
/* Round 7: the page settles on whole screens. Not CSS scroll-snap on the page: measured in Chrome, both proximity and
   mandatory pulled a short wheel or trackpad scroll back to where it started, so a mouse could not leave a screen.
   Instead the scroll stays the browser's own, and once it comes to rest between two screens, [SNAP] glides on to the
   next one in the direction the visitor was going. `.snap` and `.snap-mark` mark those screens. The page's own
   scrollbar is hidden: each section is one full screen, and nothing ever looks like a scroll box inside it. */
html { -webkit-text-size-adjust: 100%; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
.snap-mark { position: absolute; left: 0; width: 1px; height: 1px; pointer-events: none; opacity: 0; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--ground); color: var(--fg); font: 400 15px/1.55 var(--font); overflow-x: clip; -webkit-font-smoothing: antialiased; transition: background-color 240ms ease, color 240ms ease; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px; font: 600 11px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap; }
.chip.neutral { background: var(--loz-neutral-bg); color: var(--loz-neutral-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.icon { display: inline-block; flex: none; }

/* Buttons: 44px targets, press scales to .97 (Emil), hover gated to fine pointers. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--r-xl); font: 600 15px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer; border: 1px solid transparent;
  transition: transform var(--dur-press) var(--ease-soft), background-color var(--dur-hover) var(--ease-soft), border-color var(--dur-hover) var(--ease-soft), opacity var(--dur-hover) var(--ease-soft); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--fg); color: var(--ground); }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--line-strong); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { opacity: .9; }
  .btn-outline:hover { background: var(--surface-2); border-color: var(--fg-3); }
}
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg-2); cursor: pointer; transition: transform var(--dur-press) var(--ease-soft), background-color var(--dur-hover) var(--ease-soft); }
.icon-btn:active { transform: scale(.95); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--surface-2); color: var(--fg); } }
.icon-btn[disabled] { opacity: .35; cursor: default; }

/* ---------- Beta chip (round 7: the top bar is gone; the chip sits quietly at the top of the hero) ---------- */
/* The beta chip opens a popover: hover (fine pointers), click or tap, Enter or Space; Escape and outside clicks close. */
.beta { position: relative; z-index: 20; align-self: flex-start; margin: -12px 0 -14px -4px; }
.beta-btn { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 4px; border: 0; background: none; cursor: pointer; border-radius: var(--r-lg); }
.beta-btn .chip { transition: background-color 160ms ease, transform var(--dur-press) var(--ease-soft); }
.beta-btn:active .chip { transform: scale(.95); }
.beta-btn[aria-expanded="true"] .chip { background: var(--accent); color: var(--ground); }
@media (hover: hover) and (pointer: fine) { .beta-btn:hover .chip { background: color-mix(in srgb, var(--accent) 30%, var(--accent-soft)); } }
.beta-pop { position: absolute; left: 4px; top: calc(100% + 2px); z-index: 50; width: min(320px, calc(100vw - 2 * var(--gutter))); padding: 14px 16px; border-radius: 14px; background: var(--surface); box-shadow: var(--elev-overlay); display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; color: var(--fg-2);
  transform-origin: 24px 0; transition: opacity 160ms var(--ease-out), transform 200ms var(--ease-out); }
.beta-pop[hidden] { display: flex; opacity: 0; transform: scale(.96) translateY(-4px); pointer-events: none; visibility: hidden; transition: opacity 120ms var(--ease-exit), transform 120ms var(--ease-exit), visibility 0s linear 120ms; }
.beta-pop b { font: 600 15px/1.3 var(--font); color: var(--fg); }
.beta-pop p { margin: 0; }
.beta-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -4px 0 -10px; color: var(--link); font-weight: 600; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .beta-link:hover { text-decoration: underline; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: var(--screen); display: grid; align-items: center; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 72% 40%, var(--hero-glow), transparent 70%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding-block: max(32px, env(safe-area-inset-top, 0px)) 48px; width: 100%; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.headline { margin: 0; font-weight: 500; letter-spacing: -.02em; }
.h-lead { display: block; font-size: var(--display); line-height: 1.1; color: var(--fg-2); }
.h-word { display: inline-grid; font-size: calc(var(--display) * 1.72); line-height: 1.04; font-weight: 650; letter-spacing: -.035em; color: var(--fg); }
.h-word > span { grid-area: 1 / 1; will-change: transform, opacity; transition: transform 560ms var(--ease-out), opacity 420ms var(--ease-out), filter 420ms var(--ease-out); }
.h-word > span::after { content: "."; color: var(--accent); }
.h-word > span[data-state="in"] { opacity: 1; transform: none; filter: none; }
.h-word > span[data-state="below"] { opacity: 0; transform: translateY(42%); filter: blur(5px); }
.h-word > span[data-state="above"] { opacity: 0; transform: translateY(-42%); filter: blur(5px); }
.h-static { display: none; font-size: var(--display); line-height: 1.15; }
.subline { margin: 0; max-width: 34ch; font-size: 19px; line-height: 1.45; color: var(--fg-2); text-wrap: pretty; }
.rotator { display: flex; flex-direction: column; gap: 2px; border-left: 2px solid var(--accent); padding-left: 14px; }
.rot-eyebrow { font: 600 11px/16px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.stack { display: grid; }
.stack > * { grid-area: 1 / 1; transition: transform 520ms var(--ease-out), opacity 360ms var(--ease-out), filter 360ms var(--ease-out); }
.stack > [data-state="in"] { opacity: 1; transform: none; filter: none; }
.stack > [data-state="below"] { opacity: 0; transform: translateY(10px); filter: blur(3px); pointer-events: none; }
.stack > [data-state="above"] { opacity: 0; transform: translateY(-10px); filter: blur(3px); pointer-events: none; }
.rot-role { font: 600 17px/1.35 var(--font); color: var(--fg); }
.rot-line { font-size: 15px; line-height: 1.45; color: var(--fg-2); }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.helper { margin: -10px 0 0; font-size: 13px; color: var(--fg-3); }
.hero-visual { position: relative; display: flex; justify-content: center; }
/* The perch (placements.ts `perch`): the bust sits on the composer's place, as on an empty chat; here the composer
   is the generated card. The bust is drawn first, so the card's top edge sits in front of its torso. */
.perch { position: relative; display: flex; flex-direction: column; align-items: center; will-change: transform; }
.bust-glow { position: absolute; left: 50%; top: 20px; width: 340px; height: 300px; margin-left: -170px; border-radius: 999px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--prod-glow) 34%, transparent), transparent); transition: --prod-glow 700ms var(--ease-out); }
@property --prod-glow { syntax: '<color>'; inherits: true; initial-value: #2cc6c6; }
.hero-visual { --prod-glow: var(--accent); }
/* The held card (round 3). One figure width (--fw) sets everything: the `hold` crop is 420 board units wide and 390
   tall; the card's top edge sits at board y 360 and the card is 504 units wide, so the hands land on its edge. */
.perch { --fw: 300px; }
#hero-avatar { position: relative; width: var(--fw); z-index: 1; }
#hero-avatar svg { width: 100%; height: auto; display: block; }
/* Round 4: the hands sit behind the card (the card covers the fists, as if held from behind); only the knuckles show above its edge. */
#hero-hands { position: absolute; left: 50%; top: 0; width: var(--fw); margin-left: calc(var(--fw) / -2); z-index: 1; pointer-events: none; }
#hero-hands svg { width: 100%; height: auto; display: block; overflow: visible; }
.hero-pause { position: absolute; right: 0; top: 0; z-index: 3; }
.gen-wrap { position: relative; z-index: 2; margin-top: calc(var(--fw) * -50 / 420); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gen-cap { font-size: 13px; color: var(--fg-3); text-align: center; min-height: 20px; }
.gen-cap .stack > * { justify-self: center; }
.perch .gen-stage-box { --mc-s: calc(var(--fw) * 1.2 / 360px); }
@media (max-width: 1080px) and (min-width: 760px) { .perch { --fw: 250px; } }
@media (min-width: 760px) and (max-height: 760px) { .perch { --fw: 270px; } }

/* Phone hero: exactly the outcome's order (avatar head + role row, headline, card, buttons, helper). */
@media (max-width: 759px) {
  .hero-grid { grid-template-columns: 84px minmax(0, 1fr); grid-template-areas: "beta beta" "av rot" "head head" "card card" "cta cta" "help help"; gap: 14px 12px; padding-block: max(16px, env(safe-area-inset-top, 0px)) 20px; align-items: start; }
  .beta { grid-area: beta; margin-block: -10px -12px; }
  .hero-copy, .hero-visual, .perch { display: contents; }
  .bust-glow { display: none; }
  #hero-avatar { grid-area: av; position: relative; width: 84px; align-self: center; }
  .rotator { grid-area: rot; align-self: center; padding-left: 12px; }
  .rot-role { font-size: 15px; }
  .rot-line { font-size: 14px; }
  .headline { grid-area: head; }
  .h-lead { font-size: 25px; }
  .h-word { font-size: 46px; }
  .subline { display: none; }
  .gen-wrap { grid-area: card; margin-top: 0; gap: 4px; }
  #hero-hands { display: none; }
  .gen-wrap .gen-stage-box { --mc-s: .94; }
  [data-phone-card="off"] .gen-wrap { display: none; }
  .ctas { grid-area: cta; flex-wrap: nowrap; gap: 8px; }
  .ctas .btn { flex: 1 1 auto; padding: 0 12px; font-size: 14px; }
  .helper { grid-area: help; margin: -4px 0 0; }
  .gen-cap { align-self: stretch; text-align: left; padding: 0 56px 0 6px; }
  .gen-cap .stack > * { justify-self: start; }
  .hero-pause { grid-area: card; justify-self: end; align-self: end; position: relative; z-index: 3; margin-bottom: -12px; }
}

/* ---------- [MORPH] the generated card: one plate that changes shape, content composed piece by piece ---------- */
.gen-stage-box { --mc-s: 1; width: calc(360px * var(--mc-s)); height: calc(236px * var(--mc-s)); flex: none; }
.gen-stage { position: relative; width: 360px; height: 236px; transform: scale(var(--mc-s)); transform-origin: 0 0; }
.mc-shadow { position: absolute; inset: 0; border-radius: 16px; background: #000; opacity: .3; filter: blur(20px); transform-origin: 50% 50%; }
:root[data-theme="light"] .mc-shadow { opacity: .14; }
.mc-edge, .mc-fill { position: absolute; inset: 0; will-change: clip-path; }
.mc-edge { background: var(--line-strong); }
.mc-fill { background: var(--surface); inset: 1px; }
.mc-content { position: absolute; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; font-size: 12px; line-height: 1.35; color: var(--fg-2); }
.mc-head { display: flex; align-items: center; gap: 7px; font: 600 13px/18px var(--font); color: var(--fg); }
.mc-head .chip { margin-left: auto; }
.mc-head .icon { color: var(--accent); }
/* list */
.gl-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; padding: 7px 9px; border-radius: var(--r-md); background: var(--surface-2); font-size: 12px; color: var(--fg); }
.gl-row .k { font: 400 11px/1 var(--mono); color: var(--jira); }
/* chart */
.gc-plot { position: relative; flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end; padding: 4px 6px 0; border-bottom: 1px solid var(--line-strong); }
.gc-plot::before, .gc-plot::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.gc-plot::before { top: 34%; } .gc-plot::after { top: 67%; }
.gc-bar { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.gc-bar i { display: block; width: 100%; max-width: 46px; border-radius: 5px 5px 2px 2px; transform-origin: 50% 100%; }
.gc-bar b { font: 600 11px/1 var(--mono); color: var(--fg); }
.gc-x { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 0 6px; font-size: 10.5px; color: var(--fg-3); text-align: center; white-space: nowrap; }
/* kanban */
.gk-cols { position: relative; flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.gk-col { background: var(--surface-2); border-radius: var(--r-lg); padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.gk-col > b { font: 600 10px/14px var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3); display: flex; justify-content: space-between; }
.gk-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 7px; font-size: 11px; line-height: 1.3; color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.gk-card i { display: block; font-style: normal; font: 400 9.5px/1.2 var(--mono); color: var(--fg-3); }
/* gantt */
.gg { display: grid; grid-template-columns: 52px 1fr; gap: 6px 8px; align-items: center; position: relative; }
.gg .wk { display: grid; grid-template-columns: repeat(4, 1fr); font: 600 10px/14px var(--font); color: var(--fg-3); }
.gg .lab { font-size: 11.5px; color: var(--fg-2); }
.gg .track { position: relative; height: 18px; border-radius: 5px; background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--line) calc(25% - 1px) 25%); }
.gg .bar { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; transform-origin: 0 50%; }
.gg .today { position: absolute; top: 18px; bottom: -2px; width: 1.5px; background: var(--err); transform-origin: 50% 0; border-radius: 1px; }
.gg .today::before { content: ""; position: absolute; top: -3px; left: -2.5px; width: 6.5px; height: 6.5px; border-radius: 999px; background: var(--err); }
.gg .ms { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg); background: var(--warn); border-radius: 2px; }
/* timesheet */
.gt { display: grid; grid-template-columns: 54px repeat(5, 1fr) 40px; gap: 5px 5px; align-items: center; font-size: 11px; }
.gt .h { font: 600 10px/14px var(--font); color: var(--fg-3); text-align: center; }
.gt .k { font: 400 10.5px/1 var(--mono); color: var(--jira); }
.gt .c { height: 24px; border-radius: 5px; background: var(--surface-2); display: grid; place-items: center; font: 600 11px/1 var(--mono); color: transparent; transition: background-color 220ms var(--ease-out), color 220ms var(--ease-out); }
.gt .c[data-on] { background: var(--accent-soft); color: var(--accent-ink); }
.gt .sum { font: 600 11px/1 var(--mono); color: var(--fg-2); text-align: right; }
.gt-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--fg-2); }
.gt-foot .meter { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.gt-foot .meter i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: background-color 240ms ease; }
.gt-foot[data-full] .meter i { background: var(--ok); }
.gt-foot b { font: 600 12px/1 var(--mono); color: var(--fg); min-width: 38px; text-align: right; }
.gt-foot[data-full] b { color: var(--ok-ink); }
.mc-search { height: 24px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; gap: 6px; padding: 0 9px; font-size: 11px; color: var(--fg-3); }
.mc-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mc-tile { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: var(--r-lg); border: 1px solid var(--line); font-size: 11px; color: var(--fg); background: var(--surface); }
.mc-tile .sq { width: 18px; height: 18px; border-radius: 5px; flex: none; display: grid; place-items: center; color: #fff; }
.mc-rows { display: flex; flex-direction: column; gap: 4px; }
.disc { width: 16px; height: 16px; border-radius: 999px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--line-strong); transition: background-color 160ms ease, border-color 160ms ease; }
.disc svg { opacity: 0; transform: scale(.4); transition: transform var(--spring-pop-ms) var(--spring-pop), opacity 140ms var(--ease-out); }

/* ---------- Sections ---------- */
.section { padding-block: 56px; }
.eyebrow { font: 600 12px/16px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 8px; }
.s-title { margin: 0; font-size: var(--display); line-height: 1.1; font-weight: 500; letter-spacing: -.02em; }
.s-intro { margin: 10px 0 0; color: var(--fg-2); font-size: 17px; max-width: 56ch; }
.s-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.s-head > div:first-child { flex: 1; min-width: 0; }
@media (max-width: 759px) { .section { padding-block: 28px 40px; } .s-intro { font-size: 15px; } .s-head { margin-bottom: 16px; } }

/* ---------- [STEPS] round 8: How it works, three steps played by the scroll ---------- */
/* The section is a track: one pinned screen plus two step lengths. On the left, the steps on a dotted rail (the
   active one bright, its circle filled); on the right, a chat window shows the chat at that step. Snap marks sit at
   each step, so one scroll gesture is one step. Reduced motion: no track, the steps are buttons. */
.how { position: relative; --step: 70svh; height: calc(var(--screen) + 2 * var(--step)); }
.how .snap-mark:nth-of-type(1) { top: var(--step); }
.how .snap-mark:nth-of-type(2) { top: calc(var(--step) * 2); }
.steps-pin { position: sticky; top: 0; height: var(--screen); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center;
  padding-block: max(28px, env(safe-area-inset-top, 0px)) max(28px, env(safe-area-inset-bottom, 0px)); }
[data-reduced] .how { height: auto; }
[data-reduced] .how .snap-mark { display: none; }
[data-reduced] .steps-pin { position: relative; min-height: var(--screen); height: auto; }
.steps-side { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.steps-track { position: relative; }
.steps-list { position: relative; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 44px; }
/* The rail: a dotted line from the first circle to the last, and the accent line the scroll draws over it. */
.st-rail, .st-fill { position: absolute; left: 21px; width: 2px; top: var(--rail-top, 22px); height: var(--rail-h, 0px); pointer-events: none; }
.st-rail { background: radial-gradient(circle, var(--line-strong) 1px, transparent 1.4px) 0 0 / 2px 7px repeat-y; }
.st-fill { background: var(--accent); transform-origin: 50% 0; transform: scaleY(0); border-radius: 1px; }
.st { position: relative; z-index: 1; }
.st-btn { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 20px; align-items: center; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--r-xl); }
.st-num { grid-row: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--ground); font: 600 16px/1 var(--mono); color: var(--fg-3);
  transition: background-color 320ms var(--ease-out), border-color 320ms var(--ease-out), color 320ms var(--ease-out), transform var(--spring-pop-ms) var(--spring-pop); }
.st-title { grid-row: 1; grid-column: 2; font-size: calc(var(--display) * 1.05); line-height: 1.04; font-weight: 650; letter-spacing: -.03em; color: var(--fg); opacity: .32; transition: opacity 320ms var(--ease-out); }
.st-line { grid-row: 2; grid-column: 2; margin: 0; font-size: 17px; line-height: 1.45; color: var(--fg-2); max-width: 32ch; opacity: .32; transition: opacity 320ms var(--ease-out); text-wrap: pretty; }
.st[aria-current="step"] .st-num { background: var(--accent); border-color: var(--accent); color: var(--ground); transform: scale(1.06); }
.st[aria-current="step"] .st-title, .st[aria-current="step"] .st-line { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .st:not([aria-current="step"]) .st-btn:hover .st-title, .st:not([aria-current="step"]) .st-btn:hover .st-line { opacity: .6; } }
.st-dots { display: none; }
/* The window: a chat frame (title bar, the chat). It fills the screen's height, as the gallery did. */
.sp-win { position: relative; display: flex; flex-direction: column; height: min(calc(var(--screen) - 72px), 720px); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--elev-overlay); overflow: hidden; }
.sp-bar { position: relative; display: flex; align-items: center; justify-content: center; height: 42px; flex: none; border-bottom: 1px solid var(--line); font: 600 13px/1 var(--font); color: var(--fg-2); }
.sp-bar .lights { position: absolute; left: 16px; top: 50%; margin-top: -5px; display: flex; gap: 7px; }
.sp-bar .lights i { width: 10px; height: 10px; border-radius: 999px; background: var(--surface-3); }
.sp-bar .sp-title { display: inline-flex; align-items: center; gap: 7px; }
.sp-bar .sp-title .mini-av { width: 18px; height: 18px; }
.sp-win .chat, .ch-win .chat { flex: 1 1 0; min-height: 0; height: auto; }
@media (min-width: 760px) and (max-width: 1080px) { .steps-pin { gap: 32px; } .st-title { font-size: var(--display); } .st-line { font-size: 15px; } }
/* Phone: the active step on top (its number, title and line, with three dots), the window fills the rest. */
@media (max-width: 759px) {
  .how { --step: 62svh; }
  .steps-pin { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding-block: max(14px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-bottom, 0px)); }
  .steps-side { gap: 6px; flex: none; }
  .steps-side .eyebrow { margin: 0; }
  .steps-list { display: grid; gap: 0; }
  .steps-list > .st { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); visibility: hidden; transition: opacity 200ms var(--ease-exit), transform 360ms var(--ease-out), visibility 0s linear 200ms; }
  .steps-list > .st[aria-current="step"] { opacity: 1; transform: none; visibility: visible; transition: opacity 320ms var(--ease-out) 80ms, transform 420ms var(--ease-out) 80ms, visibility 0s; }
  .st-rail, .st-fill { display: none; }
  .st-btn { grid-template-columns: 36px minmax(0, 1fr); gap: 2px 12px; padding-right: 64px; }
  .st-num { width: 36px; height: 36px; font-size: 14px; }
  .st-title { font-size: 30px; }
  .st-line { font-size: 14.5px; }
  .st-dots { position: absolute; z-index: 2; right: max(var(--gutter), env(safe-area-inset-right, 0px)); top: max(14px, env(safe-area-inset-top, 0px)); display: flex; }
  .st-dots button { width: 22px; height: 44px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
  .st-dots button::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--line-strong); transition: transform 240ms var(--ease-out), background-color 240ms ease; }
  .st-dots button[aria-current="step"]::before { background: var(--accent); transform: scale(1.3); }
  .sp-win { flex: 1 1 0; min-height: 0; height: auto; border-radius: 16px; }
}

/* ---------- [CHALLENGES] round 8: a menu of challenges, each played as a chat ---------- */
/* One screen. Left, the challenges as a vertical tablist (the playing one shows its progress); right, its short
   description over its chat. It tours by itself; a pick holds the tour (see Challenges.RESUME_MS). Phone: the menu is
   a row of chips that scrolls sideways, the description under it, the chat fills the rest. */
.chal { position: relative; height: var(--screen); }
.chal-in { height: 100%; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: center; padding-block: max(28px, env(safe-area-inset-top, 0px)) max(28px, env(safe-area-inset-bottom, 0px)); }
[data-reduced] .chal { height: auto; min-height: var(--screen); }
.chal-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.chal-side .s-title { font-size: calc(var(--display) * .9); }
.chal-menu { display: flex; flex-direction: column; gap: 4px; }
.ch-tab { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px 12px; border: 0; border-radius: var(--r-2xl); background: transparent; text-align: left; cursor: pointer; color: var(--fg-3); font: 500 16px/1.3 var(--font); overflow: hidden;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), transform var(--dur-press) var(--ease-soft); }
.ch-tab:active { transform: scale(.98); }
.ch-num { font: 600 12px/1 var(--mono); color: var(--fg-3); }
.ch-tab[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--elev-1); }
.ch-tab[aria-selected="true"] .ch-num { color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .ch-tab:not([aria-selected="true"]):hover { background: var(--surface-2); color: var(--fg-2); } }
.ch-bar { position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; border-radius: 1px; background: var(--line); overflow: hidden; opacity: 0; transition: opacity 200ms ease; }
.ch-bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.ch-tab[aria-selected="true"] .ch-bar { opacity: 1; }
.chal[data-held] .ch-tab[aria-selected="true"] .ch-bar i { background: var(--fg-3); }
.chal-tools { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fg-3); }
.chal-panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; height: min(calc(var(--screen) - 72px), 720px); }
.ch-head { display: flex; flex-direction: column; gap: 6px; flex: none; }
.ch-desc { margin: 0; font-size: 18px; line-height: 1.45; color: var(--fg); max-width: 56ch; text-wrap: pretty; }
.ch-label { display: flex; min-width: 0; }
.ch-label .chip { white-space: normal; height: auto; min-height: 20px; padding-block: 4px; line-height: 1.25; max-width: 100%; }
.ch-win { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--elev-overlay); overflow: hidden; }
@media (min-width: 760px) and (max-width: 1080px) { .chal-in { gap: 28px; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
@media (max-width: 759px) {
  .chal-in { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding-block: max(14px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-bottom, 0px)); }
  .chal-side { gap: 8px; flex: none; }
  .chal-side .s-title { font-size: 26px; }
  .chal-side .eyebrow { margin: 0; }
  /* The chips run past the gutters to the screen's edges, and scroll sideways inside the section only. */
  .chal-menu { flex-direction: row; gap: 6px; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter) 4px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-padding-inline: var(--gutter); }
  .chal-menu::-webkit-scrollbar { display: none; }
  .ch-tab { flex: none; grid-template-columns: auto auto; gap: 6px; min-height: 44px; padding: 0 14px 2px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 14px; white-space: nowrap; }
  .ch-tab[aria-selected="true"] { border-color: var(--fg-3); }
  .ch-bar { left: 12px; right: 12px; bottom: 4px; }
  .chal-panel { flex: 1 1 0; height: auto; gap: 10px; }
  .ch-desc { font-size: 15px; }
  .ch-win { border-radius: 16px; }
  .chal-tools { display: none; }
}
.chal-head-row { display: flex; align-items: center; gap: 12px; }
.chal-head-row > div { flex: 1; min-width: 0; }


/* ---------- [SCENE] the chat, mirrored from src/client/chat (thread, trail rows, question, approval, composer) ---------- */
.chat { position: relative; height: var(--chat-h, 470px); display: flex; flex-direction: column; background: var(--ground); --av-acc: #00ffff; }

.c-view { position: relative; flex: 1; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 100%); }
.c-thread { position: absolute; left: 0; right: 0; top: 0; padding: 18px 16px 14px; display: flex; flex-direction: column; gap: 12px; transition: transform 680ms var(--ease-move); will-change: transform; }
.c-greet { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 90px; text-align: center; color: var(--fg-2); font-size: 15px; }
.c-greet .mini-av { width: 40px; height: 40px; }
.bubble { align-self: flex-start; max-width: 84%; background: var(--bubble); color: var(--fg); border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: 14px; line-height: 21px; white-space: pre-wrap; }
.turn-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-3); }
.mini-av { width: 22px; height: 22px; flex: none; }
.mini-av .eye { fill: var(--av-acc); }
.thinking .mini-av .eye { animation: blinkEye 1.2s var(--ease-in-out) infinite; }
@keyframes blinkEye { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.shimmer { position: relative; color: var(--fg-3); }
.shimmer::after { content: attr(data-text); position: absolute; inset: 0; color: var(--fg); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 50%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0%, #000 50%, transparent 100%); -webkit-mask-size: 50% 100%; mask-size: 50% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; animation: shimmer 1.6s var(--ease-in-out) infinite; }
@keyframes shimmer { from { -webkit-mask-position: -100% 0; mask-position: -100% 0; } to { -webkit-mask-position: 200% 0; mask-position: 200% 0; } }
.ccard { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-2xl); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ccard-h { display: flex; align-items: center; gap: 8px; font: 600 13px/18px var(--font); letter-spacing: -.005em; color: var(--fg); }
.ccard-h .chip { margin-left: auto; }
.ccard-sub { font-size: 12px; line-height: 16px; color: var(--fg-3); margin-top: -4px; }
.trail { display: flex; flex-direction: column; }
.trow { display: grid; grid-template-columns: 18px 1fr auto; gap: 6px; align-items: center; min-height: 26px; font-size: 13px; line-height: 18px; color: var(--fg-2); }
.trow .glyph { width: 14px; height: 14px; color: var(--fg-3); transition: color 200ms ease; }
.trow .t { min-width: 0; }
.trow .t span { display: inline-block; white-space: pre; }
.trow .ok-mark { width: 14px; height: 14px; color: var(--ok); opacity: 0; transform: scale(.5); transition: transform var(--spring-pop-ms) var(--spring-pop), opacity 160ms var(--ease-out); }
.trow[data-checked] .ok-mark { opacity: .9; transform: none; }
.trow .el { font: 400 11px/1 var(--mono); color: var(--fg-3); opacity: 0; transition: opacity 200ms var(--ease-out); }
.trow .slot { position: relative; width: 14px; height: 14px; display: grid; place-items: center; }
.trow .slot > * { grid-area: 1 / 1; }
.trow .spin { width: 14px; height: 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); border-top-color: var(--accent); opacity: 0; transition: opacity 160ms ease; }
.trow[data-state="running"] { color: var(--fg); }
.trow[data-state="running"] .glyph { opacity: 0; }
.trow[data-state="running"] .spin { opacity: 1; animation: spin 700ms linear infinite; }
.trow[data-state="done"] .glyph { opacity: 0; }
.trow[data-state="done"] .disc { background: var(--ok); border-color: var(--ok); color: var(--ground); }
.trow[data-state="done"] .disc svg { opacity: 1; transform: none; }
.trow .disc { width: 14px; height: 14px; opacity: 0; transition: opacity 120ms ease, background-color 160ms ease; border-width: 0; }
.trow[data-state="done"] .disc { opacity: 1; }
.trow[data-state="done"] .el { opacity: 1; }
.trow[data-state="done"] .ok-mark, .trow[data-state="running"] .ok-mark { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.q-opts { display: flex; flex-direction: column; gap: 6px; }
.q-opt { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r-xl); font-size: 13px; color: var(--fg); overflow: hidden; transition: border-color 160ms ease, background-color 160ms ease; }
.q-opt .radio { width: 14px; height: 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; transition: border-color 160ms ease; }
.q-opt .radio::after { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--accent); transform: scale(0.3); opacity: 0; transition: transform var(--spring-pop-ms) var(--spring-pop), opacity 140ms ease; }
.q-opt[data-picked] { border-color: var(--accent); background: var(--accent-soft); }
.q-opt[data-picked] .radio { border-color: var(--accent); }
.q-opt[data-picked] .radio::after { transform: none; opacity: 1; }
.q-opt .chip { margin-left: auto; }
.q-opt .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.q-note { font-size: 12px; color: var(--fg-3); }
.answered { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); padding: 2px 0; }
.answered b { font-weight: 600; color: var(--fg); }
.appr { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.appr .what { flex: 1 1 160px; font-size: 13px; color: var(--fg); }
.appr .what small { display: block; font-size: 12px; color: var(--fg-3); }
.c-btn { height: 28px; padding: 0 12px; border-radius: var(--r-md); font: 600 13px/1 var(--font); border: 0; display: inline-flex; align-items: center; gap: 6px; transition: transform var(--dur-press) var(--ease-soft), background-color 160ms ease; }
.c-btn.primary { background: var(--fg); color: var(--ground); }
.c-btn.ghost { background: transparent; color: var(--fg-2); }
.c-btn[data-pressed] { transform: scale(.97); }
.prog { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.prog-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg); }
.prog-line .num { margin-left: auto; font: 400 11px/1 var(--mono); color: var(--fg-3); }
.prog-bar { height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform 420ms var(--ease-move); }
.prog[data-complete] .prog-bar i { background: var(--ok); }
.reply { font-size: 14px; line-height: 21px; color: var(--fg); }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 1px; vertical-align: -0.15em; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.verify { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); }
.verify b { color: var(--ok-ink); font-weight: 600; }
.verify .open { white-space: nowrap; margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--link); font-size: 12px; }
.verify svg.tick path { stroke-dasharray: 24; stroke-dashoffset: 24; }
.tapring { position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 999px; background: var(--fg); pointer-events: none; z-index: 5; }

/* Suggestions + composer */
.c-sugg { display: flex; gap: 6px; padding: 0 12px 8px; overflow: hidden; min-height: 38px; }
.s-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; color: var(--fg-2); white-space: nowrap; transition: transform var(--dur-press) var(--ease-soft), background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.s-chip svg { color: var(--accent); }
.s-chip[data-pressed] { transform: scale(.97); background: var(--accent-soft); border-color: var(--accent); color: var(--fg); }
.c-comp { margin: 0 12px 12px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 16px; padding: 10px 10px 8px 14px; display: flex; align-items: flex-end; gap: 8px; box-shadow: var(--elev-1); }
.c-comp .txt { flex: 1; min-height: 42px; max-height: 63px; overflow: hidden; font-size: 14px; line-height: 21px; color: var(--fg); }
.c-comp .ph { color: var(--fg-3); }
.c-send { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-3); color: var(--fg-3); flex: none; transition: background-color 160ms ease, color 160ms ease, transform var(--dur-press) var(--ease-soft); }
.c-comp[data-has] .c-send { background: var(--fg); color: var(--ground); }
.c-send[data-pressed] { transform: scale(.92); }

/* Results: the generative UI, mirrored from the chat's result blocks (cards, lozenges, tables). */
.res { border: 1px solid var(--line); border-radius: var(--r-2xl); background: var(--surface); padding: 12px; display: flex; flex-direction: column; gap: 10px; transform-origin: 50% 0; }
.res-h { display: flex; align-items: center; gap: 8px; font: 600 14px/18px var(--font); color: var(--fg); }
.res-h .chip { margin-left: auto; }
.res-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--surface-2); font-size: 12px; color: var(--fg-2); }
.pill b { color: var(--fg); font-weight: 600; }
.pill .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--ok); }
.gadgets { display: grid; grid-template-columns: 1.35fr 1fr; gap: 8px; }
@media (max-width: 759px) { .gadgets { grid-template-columns: 1fr; } }
.gadget { border: 1px solid var(--line); border-radius: var(--r-xl); padding: 9px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gadget > b { font: 600 11px/14px var(--font); color: var(--fg-3); text-transform: uppercase; letter-spacing: .04em; }
.g-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 12px; color: var(--fg); min-width: 0; }
.g-row .k { font: 400 11px/1 var(--mono); color: var(--jira); }
.g-row .s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loz { font: 600 10px/16px var(--font); letter-spacing: .04em; text-transform: uppercase; padding: 0 5px; border-radius: 3px; background: var(--loz-neutral-bg); color: var(--loz-neutral-ink); white-space: nowrap; }
.loz.info { background: var(--loz-info-bg); color: var(--loz-info-ink); }
.loz.ok { background: var(--loz-ok-bg); color: var(--loz-ok-ink); }
.pie-wrap { display: flex; align-items: center; gap: 10px; }
.pie { width: 76px; height: 76px; transform: rotate(-90deg); flex: none; }
.pie circle { fill: none; stroke-width: 14; }
.legend { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--fg-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; }
.skel { border-radius: 4px; background: var(--surface-3); height: 10px; }
.ts { width: 100%; border-collapse: separate; border-spacing: 0 3px; font-size: 12px; }
.ts th { font: 600 10.5px/14px var(--font); color: var(--fg-3); text-transform: uppercase; letter-spacing: .04em; text-align: center; padding: 0 2px; }
.ts th:first-child, .ts td:first-child { text-align: left; }
.ts td { text-align: center; padding: 0 2px; color: var(--fg); }
.ts td:first-child { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); }
.ts .h-cell { display: inline-grid; place-items: center; min-width: 30px; height: 22px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-ink); font: 600 11px/1 var(--mono); }
.ts .h-cell.zero { background: transparent; color: var(--fg-3); font-weight: 400; }
.ts tfoot td { font: 600 11px/1 var(--mono); color: var(--fg); padding-top: 4px; }
.ts tfoot td:last-child { color: var(--ok-ink); }
.ct-row { position: relative; display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 7px 9px; border-radius: var(--r-lg); background: var(--surface-2); font-size: 12px; color: var(--fg); transition: opacity 260ms var(--ease-out); }
.ct-row .m { font: 400 11px/1 var(--mono); color: var(--fg-3); }
.ct-row .strike { position: absolute; left: 9px; right: 9px; top: 50%; height: 1.5px; background: var(--fg-3); transform: scaleX(0); transform-origin: 0 50%; transition: transform 340ms var(--ease-in-out); }
.ct-row[data-gone] { opacity: .5; }
.ct-row[data-gone] .strike { transform: scaleX(1); }
.ct-count { font: 500 12px/1.3 var(--mono); color: var(--fg-2); }
.portal { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); }
.portal-top { padding: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 28%, var(--surface-2)), var(--surface-2)); display: flex; flex-direction: column; gap: 8px; }
.portal-top b { font: 600 15px/1.2 var(--font); }
.portal-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.portal-body > b { font: 600 11px/14px var(--font); color: var(--fg-3); text-transform: uppercase; letter-spacing: .04em; }

/* .instant: the final still frame (reduced motion, or a jump to the end): nothing transitions. */
.instant, .instant * { transition: none !important; animation: none !important; }
.instant .caret { display: none; }

/* ---------- [LOOP] growth loop ---------- */
/* Round 4: the section is a scroll track; its one-screen panel is pinned (sticky) while the scroll drives the four
   phases. The track is the panel plus four phase lengths; past its end the page ends, and scrolling on grows. */
.loop { position: relative; --phase: 55svh; height: calc(var(--screen) + 5 * var(--phase)); }
/* Round 7: the loop is one full-screen container. Its track is five lengths long: four drive the phases, the fifth
   brings in the end (the buttons and the benchmark) inside the same screen, so the page itself never moves on while
   the animation runs, and nothing inside it ever scrolls. Snap marks sit at its start (where the logos from the gallery
   land), in the middle of each phase and at the end, so each scroll step plays one phase. */
.loop .snap-mark:nth-of-type(1) { top: calc(var(--phase) * .5); }
.loop .snap-mark:nth-of-type(2) { top: calc(var(--phase) * 1.5); }
.loop .snap-mark:nth-of-type(3) { top: calc(var(--phase) * 2.5); }
.loop .snap-mark:nth-of-type(4) { top: calc(var(--phase) * 3.5); }
.loop .snap-mark:nth-of-type(5) { top: calc(var(--phase) * 5); }
.loop-pin { position: sticky; top: 0; height: var(--screen); display: flex; flex-direction: column; justify-content: center; gap: 4px; padding-block: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-bottom, 0px)); }
[data-reduced] .loop { height: auto; min-height: var(--screen); padding-block: 56px; }
[data-reduced] .loop .snap-mark { display: none; }
[data-reduced] .loop-pin { position: static; height: auto; }
.loop-stage { position: relative; width: 100%; max-width: 640px; height: clamp(260px, calc(var(--screen) - 250px), 440px); margin: 4px auto 0; }
.loop-head { position: absolute; left: 50%; top: 50%; width: 156px; transform: translate(-50%, -54%); z-index: 2; }
.loop-head svg { width: 100%; height: auto; display: block; }
.loop-halo { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 999px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 45%, transparent), transparent); opacity: .15; transition: opacity 600ms var(--ease-out); pointer-events: none; }
.node { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(180deg, var(--tile-top), var(--tile-bottom)); border: 1px solid color-mix(in srgb, var(--tile-edge) 35%, transparent); box-shadow: var(--elev-1); will-change: transform, opacity; opacity: 0; }
.node img { width: 26px; height: 26px; }
/* Round 8: depth. The products sit behind Atlasito (z 1, the head is 2) while they explore and are analysed; at
   Learning they come to the front (z 3) and fly into its mind through the visor, which opens as a door. */
.node { z-index: 1; }
.node[data-front] { z-index: 3; }
/* The door: a live copy of the visor (an SVG <use> of the head's visor group) laid exactly over it, hinged on its
   bottom edge. While it is open the visor itself is hidden and the mind behind it (a glowing cavity) shows. */
.loop-doorhost { position: absolute; left: 50%; top: 50%; width: 156px; aspect-ratio: 292 / 250; transform: translate(-50%, -54%); z-index: 4; pointer-events: none;
  perspective: 300px; perspective-origin: 50% -40%; /* the eye a little above the head, so the open door is seen from above */ }
.door { position: absolute; left: calc(30 / 292 * 100%); top: calc(106 / 250 * 100%); width: calc(232 / 292 * 100%); height: calc(75 / 250 * 100%); transform-origin: 50% 100%; transform-style: preserve-3d; visibility: hidden; will-change: transform; }
/* Two faces: the visor outside; past 90 degrees the door shows its inside, a dark steel panel. */
.door-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: calc(12 / 232 * 100%) / calc(12 / 75 * 100%); }
.door-face svg { width: 100%; height: 100%; display: block; overflow: visible; }
.door-back { transform: rotateX(180deg); background: linear-gradient(180deg, #4a515d, #1b1f26 70%); box-shadow: inset 0 0 0 1.5px rgba(223, 227, 234, .55), inset 0 4px 10px rgba(0, 0, 0, .5); }
.door-back::after { content: ""; position: absolute; left: 12%; right: 12%; top: 18%; height: 2px; border-radius: 1px; background: color-mix(in srgb, var(--av-acc, #2cc6c6) 70%, transparent); opacity: .7; }
.still .loop-doorhost { width: 82px; }
.node .badge { position: absolute; right: -6px; top: -6px; width: 18px; height: 18px; border-radius: 999px; background: var(--ok); color: var(--ground); display: grid; place-items: center; opacity: 0; transform: scale(.4); transition: transform var(--spring-pop-ms) var(--spring-pop), opacity 160ms var(--ease-out); }
.node[data-mark] .badge { opacity: 1; transform: none; }
.loop-top { position: relative; display: flex; justify-content: center; align-items: center; text-align: center; }
.loop-top #loop-pause { position: absolute; right: 0; top: 50%; margin-top: -22px; }
.loop-edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.loop-edges line { stroke-linecap: round; }
.loop-end { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; }
/* Its space is always kept (the stage never jumps); the scroll's last length fades it in. */
html[data-motion] .loop-end { opacity: 0; transform: translate3d(0, 16px, 0); visibility: hidden; will-change: opacity, transform; }
.bench { display: flex; align-items: center; justify-content: center; }
.bench-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; border: 0; background: none; cursor: pointer; color: var(--fg-2); font-size: 15px; border-radius: var(--r-lg); transition: color var(--dur-hover) ease, transform var(--dur-press) var(--ease-soft); }
.bench-link:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .bench-link:hover { color: var(--fg); } }
/* The inline expansion: a 0fr → 1fr column, so the row widens smoothly and stays centred; the chips follow, staggered. */
.bench-reveal { display: grid; grid-template-columns: 0fr; transition: grid-template-columns 420ms var(--ease-out); }
.bench[data-open] .bench-reveal { grid-template-columns: 1fr; }
.bench-chips { min-width: 0; overflow: hidden; display: flex; gap: 6px; margin: 0; padding: 4px 0 4px 8px; list-style: none; white-space: nowrap; }
.bench-chips li { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; color: var(--fg); opacity: 0; transform: translate3d(-10px, 0, 0) scale(.96);
  transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out); transition-delay: 0ms; }
.bench[data-open] .bench-chips li { opacity: 1; transform: none; transition-duration: 320ms, 420ms; transition-delay: calc(80ms + var(--i) * 55ms); }
.bench-chips li:last-child { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
@media (max-width: 759px) {
  .bench { flex-direction: column; }
  .bench-reveal { grid-template-columns: 1fr; grid-template-rows: 0fr; transition: grid-template-rows 420ms var(--ease-out); }
  .bench[data-open] .bench-reveal { grid-template-rows: 1fr; }
  .bench-chips { min-height: 0; flex-wrap: wrap; justify-content: center; white-space: normal; padding: 0; }
  .bench[data-open] .bench-chips { padding: 4px 0; }
}
.loop-stills { display: none; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 8px; }
.still { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.still .loop-stage { height: 200px; margin: 0; }
.still .loop-head { width: 82px; }
.still .node { width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 9px; }
.still .node img { width: 16px; height: 16px; }
.still .node .badge { width: 12px; height: 12px; right: -4px; top: -4px; }
.loop-ctrl { display: flex; justify-content: flex-end; }
@media (max-width: 759px) {
  .loop-stage { height: clamp(260px, calc(var(--screen) - 290px), 420px); }
  .loop-head, .loop-doorhost { width: 120px; }
  .node { width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 12px; }
  .node img { width: 22px; height: 22px; }
  .loop-stills { grid-template-columns: 1fr 1fr; }
  .loop-top { justify-content: flex-start; text-align: left; padding-right: 52px; }
  .loop-end .ctas { width: 100%; }
}
[data-reduced] .loop-live { display: none; }
[data-reduced] .loop-stills { display: grid; }
[data-reduced] .hero-pause, [data-reduced] .ch-pause, [data-reduced] #loop-pause { display: none; }
[data-reduced] .h-word, [data-reduced] .h-lead { display: none; }
[data-reduced] .h-static { display: block; }

/* ---------- [NET] background graph, [SCROLL] reveals and the bridge ---------- */
#net { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main { position: relative; z-index: 1; }

#bridge { position: fixed; inset: 0; z-index: 30; pointer-events: none; visibility: hidden; }
.fly { position: absolute; left: 0; top: 0; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(180deg, var(--tile-top), var(--tile-bottom)); border: 1px solid color-mix(in srgb, var(--tile-edge) 35%, transparent); box-shadow: var(--elev-1); opacity: 0; will-change: transform, opacity; }
.fly img { width: 22px; height: 22px; }
html[data-motion] [data-reveal] { opacity: 0; transform: translate3d(0, 18px, 0); filter: blur(6px); transition: opacity 640ms var(--ease-out) var(--rd, 0ms), transform 900ms var(--ease-out) var(--rd, 0ms), filter 640ms var(--ease-out) var(--rd, 0ms); }
html[data-motion] [data-reveal="stage"] { transform: translate3d(0, 44px, 0) scale(.965); filter: blur(4px); }
html[data-motion] [data-reveal][data-shown] { opacity: 1; transform: none; filter: none; }

/* ---------- Footer ---------- */

/* ---------- [PANEL] iteration panel ---------- */
.pnl-toggle { position: fixed; right: 16px; bottom: 16px; z-index: 70; box-shadow: var(--elev-overlay); }
.pnl { position: fixed; right: 16px; bottom: 72px; z-index: 70; width: min(340px, calc(100vw - 32px)); max-height: calc(var(--screen) - 100px); overflow: auto; background: var(--surface); border-radius: 16px; box-shadow: var(--elev-overlay); padding: 14px; display: flex; flex-direction: column; gap: 12px; transform-origin: 100% 100%; transition: transform 220ms var(--ease-out), opacity 180ms var(--ease-out); }
.pnl[hidden] { display: flex; opacity: 0; transform: scale(.96) translateY(6px); pointer-events: none; visibility: hidden; transition: transform 140ms var(--ease-exit), opacity 140ms var(--ease-exit), visibility 0s linear 140ms; }
.pnl h2 { margin: 0; font: 600 14px/1.3 var(--font); display: flex; align-items: center; gap: 8px; }
.pnl h2 small { margin-left: auto; font: 400 11px/1 var(--mono); color: var(--fg-3); }
.pnl fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pnl legend { padding: 0; font-size: 12px; color: var(--fg-2); display: flex; gap: 6px; width: 100%; }
.pnl legend i { margin-left: auto; font-style: normal; font: 400 10.5px/16px var(--mono); color: var(--fg-3); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 10px; }
.seg button { flex: 1 1 auto; min-height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--fg-2); font-size: 12.5px; padding: 0 8px; cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.25); font-weight: 600; }
.pnl .btn { height: 36px; font-size: 13px; }
[data-in-frame] .pnl, [data-in-frame] .pnl-toggle { display: none !important; }

/* ---------- Phone frame view ---------- */
.pframe { position: fixed; top: 16px; right: 16px; z-index: 60; width: calc(390px * var(--pf-s, .8) + 20px); height: calc(844px * var(--pf-s, .8) + 20px); padding: 10px; border-radius: calc(54px * var(--pf-s, .8)); background: #0a0a0a; box-shadow: 0 0 0 1px #333, 0 20px 60px rgba(0,0,0,.5); }
.pframe iframe { width: 390px; height: 844px; border: 0; border-radius: calc(44px); transform: scale(var(--pf-s, .8)); transform-origin: 0 0; background: var(--ground); }
.pframe-cap { position: absolute; left: 0; right: 0; bottom: -2px; transform: translateY(100%); text-align: center; font: 400 11px/20px var(--mono); color: var(--fg-3); }
html[data-frame-on] body { padding-right: calc(390px * var(--pf-s, .8) + 52px); }
html[data-frame-on] .pnl-toggle { right: calc(390px * var(--pf-s, .8) + 52px); }
html[data-frame-on] .pnl { right: calc(390px * var(--pf-s, .8) + 52px); }

/* ---------- [AVATAR] v3 CSS, from docs/beta/avatar-v3/prototype.html ---------- */
@property --av-acc { syntax: '<color>'; inherits: true; initial-value: #00ffff; }
.av-figure { display: block; overflow: visible; }
.av-figure .av-acc-f { fill: var(--av-acc); }
.av-figure .av-acc-s { stroke: var(--av-acc); }
.av-figure .av-led-lit { fill: var(--av-acc); }
.av-figure .av-breathe { transform-box: view-box; transform-origin: 150px 270px; animation: av-breathe 6.4s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes av-breathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2.2px) scale(1.004); } }
.av-figure .av-chest { transform-box: view-box; transform-origin: 150px 424px; animation: av-chest 6.4s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes av-chest { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.007); } }
.av-figure .av-sway { transform-box: view-box; transform-origin: 150px 274px; animation: av-sway 11.3s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes av-sway { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(.9deg); } 70% { transform: rotate(-.7deg); } }
.av-figure .av-bar { animation: av-bar 1.6s ease-in-out infinite; }
@keyframes av-bar { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.av-figure .av-sheen { animation: av-sheen 10s ease-in-out infinite alternate; }
@keyframes av-sheen { from { transform: translateX(-160px); } to { transform: translateX(0); } }
.av-figure .av-lens-core { transform-box: fill-box; transform-origin: center; animation: av-core 2.6s ease-in-out infinite; }
@keyframes av-core { 0%, 100% { opacity: .75; transform: scale(.94); } 50% { opacity: 1; transform: scale(1); } }
.av-figure .fh-item { transform-box: fill-box; transform-origin: center; }
.av-figure[data-crop="head"] .av-chest { display: none; }
.av-figure[data-crop="chathead"] .av-chest { display: none; }
.av-paused .av-figure * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .av-figure * { animation: none !important; } }

/* Logos: the three modes of question 7 (all in colour, proven only in colour, monochrome). */
[data-logos="mono"] .logo-img { filter: grayscale(1) contrast(.9) brightness(1.35); }
[data-logos="proven"] .logo-img:not([data-proven]) { filter: grayscale(1) contrast(.9) brightness(1.35); opacity: .8; }

/* ---- The app (sync-to-app.sh) ---------------------------------------------
   The root layout fixes the body to one screen and scrolls each page inside its
   own frame; this page scrolls the window (its pinned sections need it). */
html:has(#home-v2), html:has(#home-v2) body { height: auto !important; overflow: visible !important; }
/* The iteration panel and the phone frame are design tools, not the product. */
#home-v2 ~ .pnl, #home-v2 ~ .pnl-toggle, .pnl, .pnl-toggle, #pframe-host { display: none !important; }
