/* Manas AI — site styles
   Tokens follow Brand kit / 01: canvas #111111, text #F0F0F0,
   Manrope 400/500 (300 for the wordmark only), Space Mono 400.
   Rule: palette colours always mean an agent. The brain is monochrome. */

:root {
  --canvas: #111111;
  --raise: #161616;
  --raise-2: #1a1a1a;
  --raise-3: #242424;
  --text: #F0F0F0;
  --text-2: rgba(240, 240, 240, .66);
  --text-3: rgba(240, 240, 240, .42);
  --line: rgba(240, 240, 240, .09);
  --line-2: rgba(240, 240, 240, .17);
  --ink: #111111;

  --lime: #80CF58;
  --aqua: #64CECA;
  --peri: #7293EC;
  --orange: #FB8C25;
  --emerald: #12AA77;
  --lavender: #BFA0EA;
  --yellow: #FFCC00;
  --blush: #F5BFD5;

  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1504px;
  --gutter: clamp(16px, 3.4vw, 48px);
  --header: 72px;
  --r-card: 16px;
  --r-panel: 20px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--canvas); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3, h4, figure, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; }
::selection { background: var(--emerald); color: var(--ink); }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }
[id] { scroll-margin-top: calc(var(--header) + 16px); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip {
  position: absolute; left: 12px; top: -64px; z-index: 100;
  background: var(--text); color: var(--ink); padding: 10px 14px; border-radius: 8px;
  font-weight: 500; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */
.display { font-size: clamp(46px, 8.3vw, 136px); line-height: .9; letter-spacing: -.05em; }
.h2 { font-size: clamp(34px, 4.6vw, 72px); line-height: 1.02; letter-spacing: -.042em; }
.h3 { font-size: clamp(22px, 1.9vw, 28px); line-height: 1.18; letter-spacing: -.022em; font-weight: 500; }
.lede { font-size: clamp(17px, 1.3vw, 20px); line-height: 1.55; color: var(--text-2); }
.mono { font-family: var(--mono); font-size: 12px; line-height: 1.5; letter-spacing: .01em; }
.dim { color: var(--text-3); }
/* The brand's square full stop. The margin offsets the headline's negative
   tracking so the square never touches the last letter (e.g. the leg of a "k"). */
.dot {
  display: inline-block; width: .13em; height: .13em; margin-left: .14em;
  background: var(--emerald); vertical-align: baseline;
}

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; gap: 14px;
  height: var(--h); padding: 0 6px 0 18px; border-radius: 12px;
  font: 500 15px/1 var(--sans); text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn .ic {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px;
  transition: background-color .25s, color .25s;
}
.btn .ic svg { width: 14px; height: 14px; transition: transform .35s var(--ease); }
.btn-light { background: var(--text); color: var(--ink); }
.btn-light .ic { background: var(--ink); color: var(--text); }
.btn-light:hover .ic { background: var(--emerald); color: var(--ink); }
.btn-light:hover .ic svg { transform: translate(1px, -1px); }
.btn-line { border: 1px solid var(--line-2); color: var(--text); padding: 0 18px; }
.btn-line:hover { border-color: rgba(240, 240, 240, .42); }
.btn-line .ic { width: auto; height: auto; }
.btn-line:hover .ic svg { transform: translateY(2px); }
.btn-sm { --h: 40px; font-size: 14px; padding-left: 14px; gap: 10px; border-radius: 10px; }
.btn-sm .ic { width: 28px; height: 28px; border-radius: 7px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; text-decoration: none; color: var(--text);
}
.text-link svg { width: 14px; height: 14px; transition: transform .35s var(--ease); }
.text-link:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */
/* Short landscape screens (phones on their side) get a slimmer header */
@media (max-height: 520px) and (orientation: landscape) { :root { --header: 58px; } }
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(17, 17, 17, .8);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header); }
.logo { display: inline-flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.logo .mark { width: 28px; height: auto; fill: currentColor; flex-shrink: 0; }
.logo .word { font-weight: 300; font-size: 18px; line-height: 1; letter-spacing: .17em; white-space: nowrap; padding-top: 1px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 14px; color: var(--text-2); text-decoration: none; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line-2);
}
.menu-btn span { position: relative; width: 16px; height: 8px; }
.menu-btn span::before, .menu-btn span::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: var(--text);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.menu-btn span::before { top: 0; }
.menu-btn span::after { top: 6.5px; }
.menu-open .menu-btn span::before { top: 3.25px; transform: rotate(45deg); }
.menu-open .menu-btn span::after { top: 3.25px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 39; display: none;
  flex-direction: column; justify-content: space-between; gap: 40px;
  padding: calc(var(--header) + 24px) var(--gutter) 28px;
  background: var(--canvas); overflow-y: auto;
}
.menu-open .menu { display: flex; }
.menu-open { overflow: hidden; }
.menu a.big {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(32px, 9vw, 48px); letter-spacing: -.035em; line-height: 1.1; text-decoration: none;
}
.menu a.big svg { width: 20px; height: 20px; color: var(--text-3); }
.menu-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.menu-foot .mono { color: var(--text-2); text-decoration: none; }

@media (max-width: 920px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 520px) {
  .nav-cta .btn { display: none; }
  .logo .word { font-size: 16px; }
}

/* ---------- Sections ---------- */
.block { padding-top: clamp(96px, 11vw, 176px); }
.sec-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding-top: 18px; border-top: 1px solid var(--line);
  margin-bottom: clamp(40px, 5.5vw, 88px);
}
.sec-head .label { font-size: 15px; font-weight: 500; white-space: nowrap; }
.sec-head .meta { font: 12px/1.5 var(--mono); color: var(--text-3); text-align: right; }

/* ---------- Reveal ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 7vw, 104px); }
.hero h1 .ln { display: block; overflow: hidden; padding: .08em 0 .1em; margin: -.08em 0 -.1em; }
.hero h1 .ln > span { display: block; }
.js .hero h1 .ln > span { transform: translateY(108%); transition: transform 1.1s var(--ease); }
.js .hero h1 .ln:nth-child(2) > span { transition-delay: .08s; }
.js .hero h1 .ln:nth-child(3) > span { transition-delay: .16s; }
.js.is-loaded .hero h1 .ln > span { transform: none; }
/* A slightly larger hover target for the colour-changing full stop (see site.js) */
.hero .dot { position: relative; }
.hero .dot::after { content: ""; position: absolute; inset: -8px; }
.hero-sub {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
  margin-top: clamp(28px, 3.4vw, 48px);
}
.hero-sub .lede { max-width: 34em; }
.hero-sub .btns { flex-shrink: 0; }

@media (max-width: 640px) {
  .hero h1 .ln, .hero h1 .ln > span { display: inline; }
  .js .hero h1 .ln > span { transform: none; transition: none; }
  .js .hero h1 { opacity: 0; transition: opacity .9s var(--ease); }
  .js.is-loaded .hero h1 { opacity: 1; }
}
@media (max-width: 860px) {
  .hero-sub { flex-direction: column; align-items: flex-start; }
}

/* Brain field */
.brain-fig { margin-top: clamp(40px, 5vw, 72px); }
/* No frame: the grid sits on the page background and dissolves at its edges */
/* Never taller than the screen under the header, so it fits on landscape phones and short laptops */
.brain {
  position: relative; height: clamp(400px, 46vw, 620px);
  height: clamp(min(400px, 100svh - 130px), 46vw, min(620px, 100svh - 130px));
  background: var(--canvas); overflow: hidden; isolation: isolate;
}
.brain canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 86%, transparent);
  mask-composite: intersect;
}
.brain .cursors, .brain .brain-hud { position: absolute; inset: 0; pointer-events: none; }
.brain .cursors { z-index: 2; }
.brain .brain-hud { z-index: 3; }
.hud-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 9px; border-radius: 7px; border: 1px solid var(--line);
  background: rgba(17, 17, 17, .9); color: var(--text-2);
  font: 11px/1 var(--mono); white-space: nowrap;
}
.hud-tl { top: 14px; left: 14px; }
.hud-tr { top: 14px; right: 14px; }
.live-sq { width: 7px; height: 7px; background: var(--emerald); animation: blink 1.6s steps(2, jump-none) infinite; }
/* Source lanes: the label and its port flash when data leaves (see brain.js) */
.lane {
  position: absolute; left: 14px; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 66px;
  padding: 3px 0; background: var(--canvas);
  font: 11px/1 var(--mono); color: var(--text-3);
}
.lane .port { flex-shrink: 0; width: 6px; height: 6px; background: #2c2c2c; }
.ag { position: absolute; left: 0; top: 0; width: 20px; height: 20px; opacity: 0; transition: opacity .7s; will-change: transform; }
.brain.is-on .ag { opacity: 1; }
.ag svg { width: 20px; height: 20px; overflow: visible; transition: transform .18s var(--ease); transform-origin: 3px 2px; }
.ag.clk svg { transform: scale(.82); }
.ag .tag {
  position: absolute; left: 15px; top: 19px;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 6px 8px; border-radius: 6px;
  background: var(--c); color: var(--ink); font: 11px/1 var(--mono);
}
.ag .tag em { font-style: normal; opacity: .62; }
.brain.is-small .ag .tag em { display: none; }
.ag.flip .tag { left: auto; right: 10px; }
.ag.up .tag { top: auto; bottom: 14px; }
.fig-cap {
  display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px 40px;
  margin-top: 14px; font: 12px/1.6 var(--mono); color: var(--text-3);
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 8px; height: 8px; background: var(--c); }
@media (max-width: 999px) { .legend span:nth-child(n+5) { display: none; } }
@media (max-width: 639px) {
  .legend span:nth-child(n+4) { display: none; }
  .hud-tr .hide-sm { display: none; }
}
@media (max-width: 400px) { .hud-tl .hide-xs { display: none; } }

@keyframes blink { 50% { opacity: .25; } }

/* ---------- Three cores (cores.js) ----------
   The symbol brain sits in the 70% column; each third of the symbol is a core.
   The chosen core is white, the colour of the Manas team. */
#cores .sec-head { margin-bottom: clamp(32px, 3.6vw, 56px); }
.cores {
  --symbol: #727272;
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  grid-template-areas: "title fig" "list fig"; grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 5vw, 96px);
}
.cores-title { grid-area: title; font-size: clamp(30px, 2.9vw, 44px); line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; }
.core-list { grid-area: list; align-self: end; margin-top: 28px; border-top: 1px solid var(--line); }
.core {
  position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 14px; row-gap: 3px;
  width: 100%; padding: 15px 0 16px; border-bottom: 1px solid var(--line); text-align: left; outline-offset: 4px;
}
/* Fills while the core waits before the next one takes over */
.core::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--text); transform: scaleX(var(--p, 0)); transform-origin: left;
}
.core-mark { grid-row: 1 / span 2; width: 30px; height: auto; margin-top: 5px; }
.core-mark path { fill: rgba(240, 240, 240, .12); }
.core-mark .on { fill: var(--text-3); transition: fill .3s; }
.core-name { font-size: 17px; font-weight: 500; letter-spacing: -.01em; color: var(--text-2); transition: color .3s; }
.core-line { font-size: 14.5px; line-height: 1.5; color: var(--text-3); transition: color .3s; }
.core:hover .core-name, .core[aria-pressed="true"] .core-name { color: var(--text); }
.core[aria-pressed="true"] .core-line { color: var(--text-2); }
.core[aria-pressed="true"] .core-mark .on { fill: var(--text); }

.mark-fig { grid-area: fig; align-self: center; display: flex; flex-direction: column; min-width: 0; }
.mark-canvas {
  display: block; width: 100%; touch-action: pan-y; cursor: crosshair;
  height: clamp(320px, 30vw, 440px); height: clamp(min(320px, 100svh - 200px), 30vw, min(440px, 100svh - 160px));
}
.mark-readout {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 26px; margin-top: 6px; font-size: 13.5px; color: var(--text-3);
}
.mark-tag {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  font: 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2);
}
.mark-tag::before { content: ""; width: 8px; height: 8px; background: var(--tag, var(--symbol)); transition: background-color .3s var(--ease); }
.mark-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1000px) {
  .cores { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "fig" "list"; grid-template-rows: none; }
  .mark-fig { margin-top: 20px; }
  .mark-canvas { height: min(72vw, 420px); height: clamp(min(240px, 100svh - 150px), 72vw, min(420px, 100svh - 150px)); }
  .core-list { margin-top: 24px; }
}
@media (max-width: 520px) {
  .mark-readout { flex-direction: column; gap: 4px; }
  /* Room for two lines, so longer items wrap instead of being cut off */
  .mark-text { max-width: 100%; min-height: 3.2em; white-space: normal; text-align: center; text-wrap: balance; }
}

/* ---------- System layers ---------- */
#system .sec-head { margin-bottom: clamp(32px, 3.6vw, 56px); }
.sys-intro { max-width: 32ch; font-size: clamp(30px, 3.5vw, 54px); text-wrap: balance; }
.layers { margin-top: clamp(40px, 4.6vw, 72px); }
.layer {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px);
  padding-block: clamp(32px, 3.8vw, 56px); border-top: 1px solid var(--line);
}
.layer-copy { position: sticky; top: calc(var(--header) + 40px); align-self: start; }
.layer-idx { display: flex; gap: 12px; margin-bottom: 22px; font: 12px/1.5 var(--mono); color: var(--text-3); }
.layer-idx b { font-weight: 400; color: var(--text); }
.layer-copy .h3 { margin-bottom: 16px; max-width: 18em; text-wrap: balance; }
.layer-copy > p { color: var(--text-2); max-width: 32em; }
.points { margin-top: 28px; border-top: 1px solid var(--line); max-width: 32em; }
.points li {
  display: flex; align-items: baseline; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--text-2);
}
.points li::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; background: var(--text-3); transform: translateY(-2px); }
.points b { color: var(--text); font-weight: 500; }
.layer-visual { container-type: inline-size; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; }
.agents-demo { min-width: 0; }
@media (max-width: 1000px) {
  .layer { grid-template-columns: 1fr; }
  .layer-copy { position: static; }
}

/* Shared panel */
.panel { background: var(--raise); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.panel-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font: 11.5px/1.4 var(--mono); color: var(--text-3);
}

/* 01 — Fig. 2, agents acting on the brain (agent-demo.js).
   --c is the active agent's colour; the brain itself stays monochrome. */
.ad-triggers { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 14px 0; }
.ad-trigger {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 13px; border-radius: 9px; border: 1px solid var(--line-2);
  font-size: 14px; color: var(--text-2);
  transition: background-color .25s, color .25s, border-color .25s;
}
.ad-trigger i { width: 8px; height: 8px; background: var(--c); transition: background-color .25s; }
.ad-trigger:hover { border-color: rgba(240, 240, 240, .42); color: var(--text); }
.ad-trigger[aria-pressed="true"] { background: var(--c); border-color: transparent; color: var(--ink); }
.ad-trigger[aria-pressed="true"] i { background: var(--ink); }
/* Fills while the demo waits before moving on to the next event */
.ad-trigger::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: rgba(17, 17, 17, .38); transform: scaleX(0); transform-origin: left;
}
.ad-trigger.is-holding::after { animation: ad-hold var(--hold, 5s) linear forwards; }
@keyframes ad-hold { to { transform: scaleX(1); } }

.ad-stage {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  column-gap: 72px; align-items: center; padding: 20px 18px 22px;
}
.ad-lines { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ad-line {
  fill: none; stroke: var(--c); stroke-width: 1.25; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .9;
  transition: stroke-dashoffset .65s var(--ease), opacity .45s;
}
.ad-line.drawn { stroke-dashoffset: 0; }
.ad-line.rest { opacity: .14; }
.agent-demo.tracing .ad-line { opacity: .06; }
.agent-demo.tracing .ad-line.trace { opacity: 1; }

.ad-brain { position: relative; display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; }
.ad-cell { aspect-ratio: 1; transition: background-color 1s ease-out, box-shadow .3s; }
.ad-cell.hit { background-color: var(--c) !important; transition: none; }
.ad-cell.held { box-shadow: 0 0 0 2px var(--c); }
.ad-cell.trace { box-shadow: 0 0 0 2px var(--text); }
.ad-cell.tw { animation: ad-tw var(--t, 3s) ease-in-out var(--d, 0s) infinite; }
@keyframes ad-tw { 50% { opacity: .5; } }
.ad-tag {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line-2); background: #141414;
  font: 11px/1 var(--mono); color: var(--text); white-space: nowrap;
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity .35s, transform .35s var(--ease), border-color .25s;
}
.ad-tag i { width: 6px; height: 6px; background: var(--c); }
.ad-tag.on { opacity: 1; transform: none; pointer-events: auto; }
.ad-tag.trace { border-color: var(--c); }
.agent-demo.tracing .ad-tag.on:not(.trace) { opacity: .2; }

.ad-actions { position: relative; z-index: 2; display: grid; }
.ad-actions li {
  display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 2px;
  padding: 11px 0; border-bottom: 1px solid var(--line); outline-offset: 4px; transition: opacity .3s;
}
.ad-actions li:last-child { border-bottom: 0; }
.ad-actions li > i { width: 8px; height: 8px; box-shadow: inset 0 0 0 1.5px var(--text-3); transition: background-color .2s, box-shadow .2s; }
.ad-actions b { font-size: 15px; font-weight: 500; color: var(--text-3); transition: color .3s; }
.ad-actions em { grid-column: 2 / -1; font: normal 11px/1.4 var(--mono); color: var(--text-3); opacity: 0; transition: opacity .3s; }
.ad-actions li:not([data-s="idle"]) b { color: var(--text); }
.ad-actions li[data-s="working"] > i, .ad-actions li[data-s="done"] > i { background: var(--c); box-shadow: none; }
.ad-actions li[data-s="working"] > i { animation: blink .35s steps(2, jump-none) infinite; }
.ad-actions li[data-s="done"] em, .ad-actions li[data-s="ask"] em { opacity: 1; }
.ad-actions li[data-s="ask"] > i { box-shadow: inset 0 0 0 1.5px var(--c); animation: blink 1s steps(2, jump-none) infinite; }
.ad-actions li[data-s="ask"] em { color: var(--text-2); }
.agent-demo.tracing .ad-actions li:not(.trace) { opacity: .3; }
.ad-approve {
  display: none; grid-column: 3; grid-row: 1; align-items: center; height: 28px; padding: 0 11px;
  border-radius: 8px; background: var(--c); color: var(--ink); font-size: 13px; font-weight: 500; transition: background-color .2s;
}
.ad-approve:hover { background: var(--text); }
.ad-actions li[data-s="ask"] .ad-approve { display: inline-flex; }

.ad-cursor { position: absolute; left: 0; top: 0; z-index: 4; opacity: 0; pointer-events: none; transition: transform .7s var(--ease), opacity .3s; }
.ad-cursor.on { opacity: 1; }
.ad-cursor svg { width: 20px; height: 20px; overflow: visible; fill: var(--c); }
.ad-cursor .tag {
  position: absolute; left: 15px; top: 19px; padding: 5px 7px; border-radius: 6px;
  background: var(--c); color: var(--ink); font: 11px/1 var(--mono); white-space: nowrap;
}
.ad-cursor.flip .tag { left: auto; right: 10px; }

@container (max-width: 600px) {
  .ad-stage { grid-template-columns: minmax(0, 1fr); row-gap: 44px; }
  .ad-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
  .ad-actions li { align-content: start; border-bottom: 0; border-top: 1px solid var(--line); }
  .ad-line.rest { opacity: .07; } /* stacked layout: keep the resting web quiet */
}
/* Smallest phones: Approve drops under its action instead of covering the name */
@container (max-width: 380px) {
  .ad-approve { grid-column: 2 / -1; grid-row: 3; justify-self: start; margin-top: 8px; }
}

/* 02 — Fig. 3, eight agents and their computers (computers.js).
   --c is the selected agent's colour. Screens share a few primitives (s-*). */
.ctrls { display: flex; gap: 5px; }
.ctrls i { width: 8px; height: 8px; background: var(--raise-3); }

.ag-picker { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.ag-swatch {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  min-height: 84px; padding: 10px 12px 12px; border-radius: 12px; background: var(--c); color: var(--ink); text-align: left;
  opacity: .78; outline: 2px solid transparent; outline-offset: 3px; transition: opacity .25s, outline-color .25s;
}
.ag-swatch .l { font: 11px/1 var(--mono); opacity: .6; }
.ag-swatch .r { font-size: 14px; font-weight: 500; line-height: 1.2; letter-spacing: -.01em; }
.ag-swatch:hover { opacity: 1; }
.ag-swatch[aria-pressed="true"] { opacity: 1; outline-color: var(--text); }
.ag-swatch::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(17, 17, 17, .38); transform: scaleX(0); transform-origin: left;
}
.ag-swatch.is-holding::after { animation: ad-hold var(--hold, 4s) linear forwards; }
@container (max-width: 939px) { .ag-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ag-swatch { min-height: 68px; } }
@media (max-width: 640px) {
  .ag-picker {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: -6px calc(var(--gutter) * -1) 4px; padding: 6px var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .ag-picker::-webkit-scrollbar { display: none; }
  .ag-swatch { flex: 0 0 136px; min-height: 76px; scroll-snap-align: start; }
}

.ag-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.layer-copy .profile { margin-top: 32px; }
.ag-stage .computer { container: pc / inline-size; display: flex; flex-direction: column; }
.pc-body { position: relative; }
.pc-screen { position: relative; height: 430px; overflow: hidden; font-size: 13px; }
.win-status { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 10px 16px; border-top: 1px solid var(--line); font: 11px/1.4 var(--mono); color: var(--text-2); }
.win-status span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 9px; vertical-align: 1px; background: var(--c); }
.pc-cursor { position: absolute; left: 0; top: 0; z-index: 6; width: 18px; height: 18px; opacity: 0; pointer-events: none; transition: transform .6s cubic-bezier(.2, .7, .1, 1), opacity .3s; }
.pc-cursor.is-on { opacity: 1; }
.pc-cursor svg { width: 18px; height: 18px; overflow: visible; fill: var(--c); transform-origin: 3px 2px; transition: transform .12s; }
.pc-cursor.down svg { transform: scale(.82); }
@container pc (max-width: 520px) { .computer .panel-bar > span:last-child { display: none; } }

.profile {
  display: flex; flex-direction: column; gap: 18px; padding: 20px;
  border-radius: var(--r-card); background: var(--c); color: var(--ink); transition: background-color .35s;
}
.profile-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.profile-head h4 { font-size: 20px; font-weight: 500; letter-spacing: -.015em; }
.profile-head span { font: 12px/1 var(--mono); opacity: .6; }
.profile dl { display: grid; gap: 14px; }
.profile dt { margin-bottom: 3px; font: 10.5px/1.4 var(--mono); opacity: .62; }
.profile dd { font-size: 14px; line-height: 1.45; }
.profile .skills { display: flex; flex-wrap: wrap; gap: 5px; }
.profile .skills span { padding: 3px 8px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(17, 17, 17, .28); font-size: 13px; }

/* Screen primitives */
.pc-screen .s-h { margin-bottom: 10px; font: 10.5px/1 var(--mono); color: var(--text-3); }
.pc-screen .sk { display: block; height: 7px; margin: 7px 0; border-radius: 4px; background: #262626; }
.pc-screen .pressed { filter: brightness(1.3); }
.pc-screen .typing::after { content: ""; display: inline-block; width: 1.5px; height: 1.05em; margin-left: 1px; vertical-align: -2px; background: var(--text); animation: blink 1s steps(2, jump-none) infinite; }
.s-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 5px; background: var(--raise-3); color: var(--text-2); font: 10.5px/1 var(--mono); white-space: nowrap; transition: background-color .2s, color .2s; }
.s-pill.c { background: var(--c); color: var(--ink); }
.s-btn { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 7px; background: var(--c); color: var(--ink); font-size: 12px; font-weight: 500; white-space: nowrap; }
.s-btn.s-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.s-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px;
  background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--text); font: 11px/1.2 var(--mono);
  opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s var(--ease);
}
.s-chip::before { content: ""; flex-shrink: 0; width: 7px; height: 7px; background: var(--c); }
.s-chip.in { opacity: 1; transform: none; }
@keyframes s-pop { from { opacity: 0; transform: scale(.94); } }

/* A — Ops coordinator: request inbox + task board */
.s-ops { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); height: 100%; }
.s-inbox { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-right: 1px solid var(--line); }
.s-inbox .s-h { margin-bottom: 2px; }
.s-msg {
  display: grid; gap: 3px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--raise-2);
  font-size: 12px; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s var(--ease), border-color .2s;
}
.s-msg.in { opacity: 1; transform: none; }
.s-msg b { font-size: 12px; font-weight: 500; }
.s-msg span { color: var(--text-2); line-height: 1.35; }
.s-msg em { font: normal 10px/1 var(--mono); color: var(--text-3); }
.s-msg.s-out { border-color: transparent; background: color-mix(in srgb, var(--c) 16%, transparent); }
.s-msg.pressed { border-color: var(--c); filter: none; }
.s-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.s-col { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: #131313; }
.s-col .s-h { margin-bottom: 2px; }
.s-card { position: relative; display: grid; gap: 5px; padding: 10px 10px 10px 12px; border-radius: 8px; background: var(--raise-3); font-size: 12.5px; font-weight: 500; }
.s-card span { font: 400 10px/1 var(--mono); color: var(--text-3); }
.s-card::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; background: var(--c); opacity: 0; }
.s-card.s-new { animation: s-pop .45s var(--ease); }
.s-card.s-new::before { opacity: 1; }
.s-card.lift { z-index: 4; box-shadow: 0 14px 30px rgba(0, 0, 0, .5); }
@container pc (max-width: 560px) {
  .s-ops { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .s-inbox { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .s-inbox .s-h { grid-column: 1 / -1; }
  .s-msg { padding: 6px 8px; font-size: 11px; }
  .s-msg em { display: none; }
  .s-board { gap: 6px; padding: 10px; }
  .s-col { padding: 6px; }
  .s-card { padding: 8px; font-size: 11.5px; }
}

/* B — Support triage: ticket list + conversation + composer */
.s-desk { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); height: 100%; }
.s-list { display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; border-right: 1px solid var(--line); }
.s-list .s-h { padding-left: 4px; }
.s-tk { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; row-gap: 3px; padding: 9px 10px; border-radius: 8px; font-size: 12px; transition: background-color .2s; }
.s-tk b { font: 400 10.5px/1.5 var(--mono); color: var(--text-3); }
.s-tk span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-tk em { grid-column: 2; min-height: 10px; font: normal 10px/1 var(--mono); color: var(--text-3); }
.s-tk em.on { color: var(--c); }
.s-tk.sel { background: var(--raise-3); }
.s-detail { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 14px 16px; }
.s-dh { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13.5px; }
.s-dh b { font-weight: 500; }
.s-thread { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: hidden; }
.s-bubble { max-width: 86%; padding: 9px 11px; border-radius: 10px; background: var(--raise-3); color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.s-bubble.s-mine { align-self: flex-end; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--text); animation: s-pop .4s var(--ease); }
.s-compose { display: grid; gap: 8px; padding: 10px; border-radius: 10px; border: 1px solid var(--line-2); }
.s-reply { min-height: 36px; font-size: 12.5px; line-height: 1.45; }
.s-cbar { display: flex; align-items: center; gap: 6px; }
.s-cbar .s-cite { order: -1; margin-right: auto; opacity: 0; transition: opacity .3s; }
.s-cbar .s-cite.in { opacity: 1; }
@container pc (max-width: 560px) { .s-desk { grid-template-columns: minmax(0, 1fr); } .s-list { display: none; } }

/* C — Revenue ops: call recording → summary → CRM record */
.s-rev { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; height: 100%; padding: 14px 16px; }
.s-call { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise-2); }
.s-playbtn { position: relative; width: 26px; height: 26px; border-radius: 7px; background: var(--c); }
.s-playbtn::after { content: ""; position: absolute; left: 10px; top: 8px; border-left: 8px solid var(--ink); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.s-meta { display: grid; gap: 3px; font-size: 12.5px; }
.s-meta b { font-weight: 500; }
.s-meta span { font: 10.5px/1 var(--mono); color: var(--text-3); }
.s-wave { display: flex; align-items: center; gap: 2px; height: 32px; }
.s-wave i { flex: 1; min-width: 1px; border-radius: 1px; background: #2e2e2e; transition: background-color .15s; }
.s-wave i.on { background: var(--c); }
.s-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; min-height: 0; }
.s-sum, .s-crm { padding: 12px; border-radius: 10px; border: 1px solid var(--line); }
.s-sum ul { display: grid; gap: 9px; font-size: 12.5px; line-height: 1.35; }
.s-sum li { position: relative; padding-left: 14px; animation: s-pop .35s var(--ease); }
.s-sum li::before { content: ""; position: absolute; left: 0; top: 5px; width: 6px; height: 6px; background: var(--c); }
.s-crm { display: grid; gap: 8px; align-content: start; }
.s-row { position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 8px; }
.s-row > span { font: 10.5px/1 var(--mono); color: var(--text-3); }
.s-field { position: relative; display: flex; align-items: center; height: 28px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line-2); background: #131313; font-size: 12.5px; white-space: nowrap; }
.s-select::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3); transform: translateY(-2px) rotate(45deg); }
.s-select.set { border-color: var(--c); }
.s-menu { position: absolute; left: -1px; right: -1px; top: 30px; z-index: 3; display: none; padding: 4px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--raise-3); box-shadow: 0 10px 24px rgba(0, 0, 0, .45); }
.s-select.open .s-menu { display: grid; }
.s-menu span { padding: 6px 8px; border-radius: 5px; font-size: 12px; }
.s-menu span.pressed { background: var(--c); color: var(--ink); filter: none; }
.s-cal { position: absolute; right: 0; bottom: 32px; z-index: 3; display: none; grid-template-columns: repeat(7, 22px); gap: 3px; padding: 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--raise-3); box-shadow: 0 10px 24px rgba(0, 0, 0, .45); }
.s-cal.open { display: grid; }
.s-cal i { display: grid; place-items: center; height: 20px; border-radius: 4px; font: normal 10px/1 var(--mono); color: var(--text-2); }
.s-cal i.pressed { background: var(--c); color: var(--ink); filter: none; }
.s-rev > .s-chip { justify-self: start; }
@container pc (max-width: 560px) {
  .s-split { grid-template-columns: minmax(0, 1fr); }
  .s-sum, .s-wave { display: none; }
  .s-call { grid-template-columns: auto minmax(0, 1fr); }
}

/* D — Procurement: quote documents → comparison table → recommendation */
.s-proc { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 14px; height: 100%; padding: 14px 16px; }
.s-docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.s-doc { padding: 10px 12px 12px; border-radius: 8px; background: #e9e9e6; color: #111; transition: transform .3s var(--ease), box-shadow .3s; }
.s-doc.open { transform: translateY(-4px) scale(1.03); box-shadow: 0 12px 26px rgba(0, 0, 0, .45); }
.s-doc .sk { height: 6px; margin: 6px 0; background: #cfcfca; }
.s-doch { margin-bottom: 6px; font: 9.5px/1 var(--mono); color: #777; }
.s-doc b { display: block; margin-bottom: 4px; font-size: 12.5px; font-weight: 600; }
.s-price { display: inline-block; margin: 3px 0; padding: 1px 4px; border-radius: 3px; font: 11px/1.3 var(--mono); transition: background-color .3s; }
.s-price.hl { background: var(--c); }
.s-cmp { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.s-cmp th { padding: 0 8px 8px; border-bottom: 1px solid var(--line); text-align: left; font: 400 10.5px/1.4 var(--mono); color: var(--text-3); }
.s-cmp td { height: 36px; padding: 0 8px; border-bottom: 1px solid var(--line); opacity: 0; transition: opacity .3s, background-color .3s; }
.s-cmp td.in { opacity: 1; }
.s-cmp tr.best td { background: color-mix(in srgb, var(--c) 15%, transparent); }
.s-cmp tr.best td:first-child { box-shadow: inset 2px 0 0 var(--c); }
.s-proc > .s-chip { align-self: start; justify-self: start; }
@container pc (max-width: 560px) { .s-cmp .nb { display: none; } .s-doc { padding: 8px; } .s-doc b { font-size: 11px; } }

/* E — Finance close: spreadsheet with formula bar, selection and fill handle */
.s-sheet { display: flex; flex-direction: column; height: 100%; }
.s-fx { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); font: 12px/1 var(--mono); }
.s-ref { min-width: 54px; padding: 5px 7px; border-radius: 5px; background: var(--raise-3); color: var(--text-2); }
.s-fxi { color: var(--text-3); font-style: italic; }
.s-formula { overflow: hidden; color: var(--text); white-space: nowrap; }
.s-gridwrap { position: relative; }
.s-grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12.5px; }
.s-grid th { height: 26px; border: 1px solid var(--line); background: #141414; text-align: center; font: 400 10.5px/1 var(--mono); color: var(--text-3); }
.s-grid thead th:nth-child(1) { width: 36px; }
.s-grid thead th:nth-child(2) { width: 30%; }
.s-grid td { height: 46px; padding: 0 10px; border: 1px solid var(--line); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.s-grid td.hd { height: 34px; color: var(--text-2); font-size: 12px; font-weight: 500; }
.s-grid td.num { text-align: right; font: 12px/1 var(--mono); }
.s-grid td.ok { color: var(--c); }
.s-grid td.flag { background: rgba(240, 240, 240, .05); color: var(--text); }
.s-grid td.ok::before, .s-grid td.flag::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; vertical-align: 1px; background: var(--c); }
.s-grid td.flag::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text); }
.s-sel { position: absolute; z-index: 2; border: 2px solid var(--c); pointer-events: none; opacity: 0; transition: width .12s, height .12s, left .12s, top .12s; }
.s-sel.on { opacity: 1; }
.s-sel::after { content: ""; position: absolute; right: -5px; bottom: -5px; width: 8px; height: 8px; border: 1px solid #111; background: var(--c); }
@container pc (max-width: 560px) { .s-grid .nb { display: none; } .s-grid td { padding: 0 6px; font-size: 11.5px; } }

/* F — Research analyst: browser tabs, address bar, highlights, cited notes */
.s-res { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 230px); height: 100%; }
.s-browser { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); }
.s-tabs { display: flex; gap: 2px; padding: 8px 10px 0; background: #131313; }
.s-tabs span { padding: 7px 12px; border-radius: 8px 8px 0 0; overflow: hidden; color: var(--text-3); font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
.s-tabs span.on { background: var(--raise); color: var(--text); }
.s-url { display: flex; align-items: center; gap: 8px; height: 30px; margin: 8px 10px; padding: 0 10px; border-radius: 8px; background: #131313; overflow: hidden; font: 11.5px/1 var(--mono); color: var(--text-2); white-space: nowrap; }
.s-url i { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--text-3); }
.s-page { flex: 1; min-height: 0; padding: 4px 18px 0; overflow: hidden; }
.s-pagein { transition: transform .5s var(--ease), opacity .16s; }
.s-pagein.swap { opacity: 0; }
.s-ptitle { display: block; margin: 8px 0 4px; font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.s-pmeta { display: block; margin-bottom: 12px; font: 10.5px/1 var(--mono); color: var(--text-3); }
.s-ptext { margin: 10px 0; font-size: 13px; line-height: 1.5; }
.s-ptext mark {
  color: inherit; background-color: transparent;
  background-image: linear-gradient(color-mix(in srgb, var(--c) 45%, transparent), color-mix(in srgb, var(--c) 45%, transparent));
  background-repeat: no-repeat; background-size: 0% 100%; transition: background-size .6s var(--ease);
}
.s-ptext mark.on { background-size: 100% 100%; }
.s-notes { padding: 14px; }
.s-notes ol { display: grid; gap: 10px; list-style: none; font-size: 12.5px; line-height: 1.4; }
.s-notes li { padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--raise-2); animation: s-pop .4s var(--ease); }
.s-ref2 { font: 10.5px/1 var(--mono); color: var(--c); }
@container pc (max-width: 560px) {
  .s-res { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .s-browser { border-right: 0; }
  .s-notes { max-height: 150px; overflow: hidden; border-top: 1px solid var(--line); }
  .s-notes ol { gap: 6px; }
  .s-tabs span { padding: 7px 8px; }
}

/* G — Compliance monitor: contract on paper + policy checklist */
.s-comp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 240px); height: 100%; }
.s-docview { padding: 14px 16px; overflow: hidden; border-right: 1px solid var(--line); background: #131313; }
.s-docpage { position: relative; height: 100%; overflow: hidden; padding: 16px 18px; border-radius: 6px; background: #ecece8; color: #111; }
.s-dtitle { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; }
.s-clause { position: relative; padding: 6px 0 4px; }
.s-clause b { padding: 0 3px; margin-left: -3px; border-radius: 3px; font-size: 11.5px; font-weight: 600; transition: background-color .3s; }
.s-clause .sk { height: 6px; margin: 6px 0; background: #d2d2cd; }
.s-clause.flag b { background: var(--c); }
.s-scan { position: absolute; left: 10px; right: 10px; top: 0; height: 40px; border-radius: 4px; background: color-mix(in srgb, var(--c) 26%, transparent); box-shadow: inset 2px 0 0 var(--c); opacity: 0; pointer-events: none; transition: transform .55s var(--ease), height .3s, opacity .3s; }
.s-scan.on { opacity: 1; }
.s-comment { position: absolute; right: 8px; width: 158px; padding: 8px 10px; border-radius: 8px; background: #111; color: var(--text); font-size: 11.5px; line-height: 1.4; box-shadow: 0 8px 20px rgba(0, 0, 0, .35), inset 2px 0 0 var(--c); opacity: 0; transform: translateX(8px); transition: opacity .3s, transform .3s var(--ease); }
.s-comment.in { opacity: 1; transform: none; }
.s-checks { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.s-checks ul { display: grid; gap: 8px; }
.s-checks li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--text-3); font-size: 12px; line-height: 1.3; transition: color .3s, border-color .3s; }
.s-checks li i { flex-shrink: 0; width: 9px; height: 9px; box-shadow: inset 0 0 0 1.5px var(--text-3); }
.s-checks li.ok { color: var(--text); }
.s-checks li.ok i { background: var(--c); box-shadow: none; }
.s-checks li.flag { border-color: var(--c); color: var(--text); }
.s-checks li.flag i { box-shadow: inset 0 0 0 1.5px var(--c); animation: blink 1s steps(2, jump-none) infinite; }
.s-checks .s-chip { align-self: flex-start; margin-top: auto; }
@container pc (max-width: 560px) {
  .s-comp { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .s-docview { border-right: 0; }
  .s-checks ul { grid-template-columns: 1fr 1fr; gap: 6px; }
  .s-checks li { padding: 7px 8px; font-size: 11px; }
  .s-checks .s-h, .s-checks .s-chip { display: none; }
  .s-comment { width: 136px; }
  .s-docview { padding: 10px; }
  .s-docpage { padding: 12px 14px; }
  .s-dtitle { margin-bottom: 2px; font-size: 12.5px; }
  .s-clause { padding: 4px 0 2px; }
  .s-clause .sk:last-child { display: none; }
}

/* H — People ops: onboarding runbook across apps */
.s-ppl { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 16px 18px; }
.s-hire { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 160px); align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise-2); }
.s-av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--c); color: var(--ink); font: 12px/1 var(--mono); }
.s-hire b { display: block; font-size: 14px; font-weight: 500; }
.s-hire div > span { font-size: 11.5px; color: var(--text-3); }
.s-progw { display: grid; justify-items: end; gap: 6px; font: 10.5px/1 var(--mono); color: var(--text-3); }
.s-prog { width: 100%; height: 5px; overflow: hidden; border-radius: 3px; background: var(--raise-3); }
.s-prog i { display: block; width: 0; height: 100%; background: var(--c); transition: width .5s var(--ease); }
.s-steps { display: grid; gap: 6px; list-style: none; }
.s-steps li { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); font-size: 12.5px; transition: border-color .3s; }
.s-app { padding: 5px 0; border-radius: 5px; background: var(--raise-3); color: var(--text-2); text-align: center; font: 10px/1 var(--mono); transition: background-color .2s, color .2s; }
.s-steps em { font: normal 10.5px/1 var(--mono); color: var(--text-3); white-space: nowrap; }
.s-steps li.working { border-color: var(--line-2); }
.s-steps li.working .s-app { background: var(--c); color: var(--ink); animation: blink .4s steps(2, jump-none) infinite; }
.s-steps li.done .s-app { background: var(--c); color: var(--ink); }
.s-steps li.done em { color: var(--text-2); }
.s-steps li.ask { border-color: var(--c); }
.s-steps li.ask em { color: var(--text); }
.s-steps .s-btn { display: none; cursor: pointer; }
.s-steps li.ask .s-btn { display: inline-flex; }
.s-steps .s-btn:hover { background: var(--text); }
@container pc (max-width: 560px) {
  .s-hire { grid-template-columns: auto minmax(0, 1fr); }
  .s-progw { grid-column: 1 / -1; justify-items: stretch; }
  .s-steps li { grid-template-columns: 50px minmax(0, 1fr) auto; row-gap: 4px; }
  .s-steps em { grid-column: 2; }
  .s-steps .s-btn { grid-column: 3; grid-row: 1 / span 2; }
}

/* 03 — Fig. 4, the operations floor (ops.js). Agent rows carry their colour as --c;
   the Manas team is white. */
.ops-bar { flex-wrap: wrap; }
.ops-live { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.ops-live i { width: 7px; height: 7px; background: var(--emerald); animation: blink 1.6s steps(2, jump-none) infinite; }
.ops-floor.is-paused .ops-live i { animation: none; background: var(--text-3); }
.ops-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 16px; }
.ops-stats b { font-weight: 400; color: var(--text); }
.ops-grid { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr) minmax(0, 270px); height: 470px; }

.ops-agents { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-right: 1px solid var(--line); }
.ops-agent {
  display: grid; grid-template-columns: 8px minmax(0, 1fr); align-items: center; column-gap: 9px; row-gap: 6px;
  padding: 7px 8px; border-radius: 8px; text-align: left; transition: background-color .2s, opacity .2s, box-shadow .2s;
}
.ops-agent > i { width: 8px; height: 8px; background: var(--c); }
.ops-agent b { overflow: hidden; font-size: 12.5px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.ops-track { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; }
.ops-track i { aspect-ratio: 1; background: #1f1f1f; }
.ops-track i.busy { background: color-mix(in srgb, var(--c) 32%, #1b1b1b); }
.ops-track i.hit { background: var(--c); }
.ops-track i:last-child { animation: s-pop .3s var(--ease); }
.ops-agent:hover { background: var(--raise-2); }
.ops-agent[aria-pressed="true"] { background: var(--raise-3); box-shadow: inset 0 0 0 1px var(--c); }
.ops-floor.filtering .ops-agent[aria-pressed="false"] { opacity: .4; }

.ops-feed {
  position: relative; overflow: hidden; padding: 4px 0;
  -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent);
}
.ops-row {
  display: grid; grid-template-columns: 44px minmax(0, 148px) minmax(0, 1fr) auto; align-items: center; column-gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.ops-row.enter { overflow: hidden; animation: ops-in .5s var(--ease); }
@keyframes ops-in {
  from { opacity: 0; max-height: 0; padding-block: 0; transform: translateY(-8px); }
  to { max-height: 64px; }
}
.ops-row time { font: 11px/1 var(--mono); color: var(--text-3); }
.ops-row .who { display: inline-flex; align-items: center; gap: 8px; overflow: hidden; font: 11.5px/1.3 var(--mono); color: var(--text); white-space: nowrap; text-overflow: ellipsis; }
.ops-row .who::before { content: ""; flex-shrink: 0; width: 7px; height: 7px; background: var(--c); }
.ops-row .what { overflow: hidden; color: var(--text-2); white-space: nowrap; text-overflow: ellipsis; }
.ops-row em { padding: 5px 7px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--line-2); font: normal 10.5px/1 var(--mono); color: var(--text-2); white-space: nowrap; }
.ops-row.manas .what, .ops-row.fix .what, .ops-row.incident .what { color: var(--text); }
.ops-row.incident .who::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); animation: blink 1s steps(2, jump-none) infinite; }
.ops-row.incident em { box-shadow: inset 0 0 0 1px rgba(240, 240, 240, .6); color: var(--text); }
.ops-row.incident.resolved .who::before { animation: none; background: var(--c); box-shadow: none; }
.ops-row.incident.resolved em, .ops-row.fix em { box-shadow: none; background: var(--raise-3); color: var(--text-2); }
.ops-row.asks em { box-shadow: inset 0 0 0 1px var(--c); color: var(--text); }
.ops-row.approved em { box-shadow: none; background: var(--c); color: var(--ink); }
.ops-row.hide { display: none; }

.ops-wait { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-left: 1px solid var(--line); }
.ops-h { font: 10.5px/1 var(--mono); color: var(--text-3); }
.ops-cards { display: grid; gap: 8px; }
.ops-card {
  display: grid; gap: 8px; padding: 12px 12px 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--raise-2); box-shadow: inset 2px 0 0 var(--c); animation: s-pop .4s var(--ease);
}
.ops-card .mono { font-size: 10.5px; color: var(--text-3); }
.ops-card p { font-size: 13px; line-height: 1.4; }
.ops-card .s-btn { justify-self: start; cursor: pointer; transition: background-color .2s; }
.ops-card .s-btn:hover { background: var(--text); }
.ops-card.out { animation: ops-out .35s var(--ease) forwards; }
@keyframes ops-out { to { opacity: 0; transform: translateX(12px); } }
.ops-empty { font-size: 12.5px; line-height: 1.45; color: var(--text-3); }
.ops-floor.has-waiting .ops-empty { display: none; }

@container (max-width: 1040px) {
  .ops-grid { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); grid-template-rows: 430px auto; height: auto; }
  .ops-wait { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .ops-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 640px) {
  .ops-stats span:not(:last-child) { display: none; }
  .ops-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 380px auto; }
  .ops-agents { flex-direction: row; gap: 4px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .ops-agents::-webkit-scrollbar { display: none; }
  .ops-agent { flex: 0 0 auto; grid-template-columns: 8px auto; padding: 7px 10px; border: 1px solid var(--line); }
  .ops-track { display: none; }
  .ops-row { grid-template-columns: 40px minmax(0, 1fr) auto; row-gap: 4px; padding: 10px 14px; }
  .ops-row .what { grid-column: 2 / -1; grid-row: 2; white-space: normal; }
  .ops-cards { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- How we work: 4 steps, 3 engagements ----------
   Each engagement owns a colour; the bar over the steps and each step's pixel
   glyph use it, so you can see which engagement covers which step. */
.how-title { max-width: 16ch; margin-bottom: clamp(36px, 4.5vw, 64px); }
.hw-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.hw-bar i { height: 4px; border-radius: 2px; background: var(--c); }
.hw-bar .w2 { grid-column: span 2; }
.hw-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hw-step { padding: 24px clamp(16px, 2vw, 28px) 30px 0; }
.hw-step + .hw-step { padding-left: clamp(16px, 2vw, 28px); border-left: 1px solid var(--line); }
.hw-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hw-step .n { font: 12px/1 var(--mono); color: var(--text-3); }
.hw-step h3 { margin: 26px 0 10px; font-size: clamp(28px, 2.7vw, 40px); line-height: 1; letter-spacing: -.04em; }
.hw-step p { max-width: 22em; color: var(--text-2); font-size: 15px; }
/* Step glyphs: tiny story loops driven by assets/glyphs.js. Squares = the brain,
   outlined pixel cursor = an agent. Everything is in the step colour. */
.px-glyph { width: 56px; height: 56px; flex-shrink: 0; overflow: visible; }
.px-glyph .sq, .px-glyph .dot { fill: var(--c); transition: opacity .18s; }
.px-glyph .ho { fill: none; stroke: var(--c); stroke-width: 1.5; }
.px-glyph .scanline { fill: var(--c); opacity: 0; }
.px-glyph .scanline.on { opacity: .55; }
.px-glyph [data-f] { opacity: 0; transition: opacity .18s; }
.px-glyph [data-f].on { opacity: 1; }
.px-glyph .dim { opacity: .16; }
.px-glyph .cur { transition: transform .45s cubic-bezier(.2, .7, .1, 1), opacity .2s; }
.px-glyph .ptr { fill: var(--c); stroke: #111; stroke-width: 1.2; stroke-linejoin: round; transform-box: fill-box; transform-origin: 0 0; transition: transform .1s; }
.px-glyph .cur.small .ptr { transform: scale(.72); }
.px-glyph .cur.click .ptr { transform: scale(.8); }
.px-glyph .cur.small.click .ptr { transform: scale(.58); }

.hw-engs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.hw-eng {
  display: flex; flex-direction: column; gap: 8px; min-height: 200px; padding: 18px 20px 20px;
  border-radius: var(--r-card); background: var(--c); color: var(--ink); text-decoration: none;
  transition: transform .35s var(--ease);
}
.hw-eng:hover { transform: translateY(-3px); }
.hw-eng.w2 { grid-column: span 2; }
.hw-eng .tag { display: flex; justify-content: space-between; gap: 12px; margin-bottom: auto; font: 11px/1.4 var(--mono); opacity: .62; }
.hw-eng h3 { margin-top: 28px; font-size: clamp(24px, 2.2vw, 30px); font-weight: 500; line-height: 1.1; letter-spacing: -.025em; }
.hw-eng p { font-size: 15.5px; }
.hw-eng .more { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; font-weight: 500; }
.hw-eng .more svg { width: 14px; height: 14px; transition: transform .35s var(--ease); }
.hw-eng:hover .more svg { transform: translateX(3px); }
@media (max-width: 1000px) {
  .hw-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hw-step:nth-child(3) { padding-left: 0; border-left: 0; }
  .hw-step:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hw-bar { display: none; }
  .hw-step { box-shadow: inset 0 3px 0 var(--c); }
  .hw-engs { grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
  .hw-eng.w2 { grid-column: auto; }
  .hw-eng { min-height: 0; }
}
@media (max-width: 560px) {
  .hw-steps { grid-template-columns: minmax(0, 1fr); }
  .hw-step, .hw-step + .hw-step { padding-left: 0; border-left: 0; }
  .hw-step + .hw-step { border-top: 1px solid var(--line); }
  .hw-step h3 { margin-top: 16px; }
}

/* ---------- Control: Fig. 6, set the rules (rules.js) ----------
   A meter = one agent's access to one system, in the agent's colour:
   none □□□□ · read ■□□□ · draft ■■□□ · ask first ■■■▢ · act ■■■■ */
/* Headline across the top, then the principles beside the table they explain */
#control .sec-head { margin-bottom: clamp(32px, 3.6vw, 56px); }
.trust {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "title title" "list fig";
  gap: clamp(28px, 3vw, 44px) clamp(40px, 5vw, 96px); align-items: start;
}
.trust .trust-copy { display: contents; }
.trust .h2 { grid-area: title; text-wrap: balance; }
.trust .principles { grid-area: list; }
.trust .rules-fig { grid-area: fig; }
.principles { border-bottom: 1px solid var(--line); }
.principles li {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 16px; align-items: start;
  padding: 16px 0; border-top: 1px solid var(--line); cursor: default; outline-offset: 4px; transition: opacity .25s;
}
.principles h3 { font-size: 16px; font-weight: 500; }
.principles p { margin-top: 3px; color: var(--text-2); font-size: 14.5px; }
.pg { width: 24px; height: 24px; margin-top: 1px; }
.pg rect { fill: var(--text-3); transition: fill .2s, stroke .2s; }
.pg .o { fill: none; stroke: var(--text-3); stroke-width: 1; }
.pg .f { fill: #262626; }
.principles li.active .pg rect:not(.f):not(.o) { fill: var(--text-2); }
.principles li.active .pg .o { stroke: var(--text-2); }
.trust.is-hl .principles li:not(.active) { opacity: .4; }

.rules { transition: box-shadow .3s; }
.rules.hl-all { box-shadow: 0 0 0 1px var(--text-2); }
.perm-scroll { overflow-x: auto; }
.perm { width: 100%; min-width: 420px; }
.perm th, .perm td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.perm thead th { padding-top: 16px; font: 400 11px/1.4 var(--mono); color: var(--text-3); }
.perm tbody tr { transition: background-color .2s; }
.perm tbody tr:hover { background: color-mix(in srgb, var(--c) 6%, transparent); }
.perm tbody th { font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.perm tbody th span { display: inline-flex; align-items: center; gap: 9px; }
.perm tbody th span::before { content: ""; width: 8px; height: 8px; background: var(--c); }

.meter { display: inline-flex; gap: 3px; padding: 8px; margin: -8px 0 -8px -8px; border-radius: 7px; transition: background-color .2s, box-shadow .2s, opacity .25s; }
button.meter { cursor: pointer; }
button.meter:hover { background: var(--raise-3); }
.meter i { width: 9px; height: 9px; background: #2a2a2a; transition: background-color .2s, box-shadow .2s; }
.meter[data-l="1"] i:nth-child(-n+1), .meter[data-l="2"] i:nth-child(-n+2), .meter[data-l="3"] i:nth-child(-n+3), .meter[data-l="4"] i { background: var(--c); }
.meter[data-l="3"] i:nth-child(4) { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.meter.changed { box-shadow: inset 0 0 0 1px var(--c); }
.meter.pop i { animation: s-pop .3s var(--ease); }
.meter.pop i:nth-child(2) { animation-delay: .03s; }
.meter.pop i:nth-child(3) { animation-delay: .06s; }
.meter.pop i:nth-child(4) { animation-delay: .09s; }
.rules.hl-none button.meter:not([data-l="0"]), .rules.hl-ask button.meter:not([data-l="3"]) { opacity: .2; }
.rules.hl-none button.meter[data-l="0"], .rules.hl-ask button.meter[data-l="3"] { box-shadow: inset 0 0 0 1.5px var(--text-2); }

.rules-log { display: grid; gap: 7px; max-height: 0; overflow: hidden; padding: 0 16px; border-bottom: 1px solid transparent; transition: max-height .4s var(--ease), padding .4s var(--ease), border-color .3s; }
.rules.hl-log .rules-log { max-height: 120px; padding: 14px 16px; border-bottom-color: var(--line); }
.rules-log p { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 11.5px/1.4 var(--mono); color: var(--text-2); }
.rules-log time { color: var(--text-3); }
.rules-log .who { display: inline-flex; align-items: center; gap: 7px; color: var(--text); }
.rules-log .who::before { content: ""; width: 7px; height: 7px; background: var(--c); }

.rules-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; }
.rules-say { min-height: 1.45em; font-size: 14px; line-height: 1.45; color: var(--text); }
.rules-say b { font-weight: 500; color: var(--text-2); }
.rules-reset { flex-shrink: 0; padding: 7px 10px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); font: 11px/1 var(--mono); color: var(--text-3); transition: color .2s, box-shadow .2s; }
.rules-reset:hover { color: var(--text); box-shadow: inset 0 0 0 1px rgba(240, 240, 240, .4); }
.rules-key { display: flex; flex-wrap: wrap; gap: 10px 20px; padding: 0 16px 16px; font: 11px/1 var(--mono); color: var(--text-3); }
.rules-key > span { display: inline-flex; align-items: center; gap: 8px; }
.rules-key .meter { --c: var(--text-3); gap: 2px; padding: 0; margin: 0; }
.rules-key .meter i { width: 6px; height: 6px; }
.rules-key .meter[data-l="3"] i:nth-child(4) { box-shadow: inset 0 0 0 1px var(--c); }
@media (max-width: 1000px) { .trust { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "list" "fig"; } }
@media (max-width: 560px) {
  .perm { min-width: 0; }
  .perm th, .perm td { padding: 10px 6px; }
  .perm th:first-child { padding-left: 14px; }
  .perm thead th { font-size: 10px; }
  .perm tbody th { font-size: 13px; white-space: normal; }
  .perm tbody th span::before { display: none; }
  .perm tbody th span { color: color-mix(in srgb, var(--c) 70%, var(--text)); }
  .meter { gap: 2px; padding: 10px 6px; margin: -10px 0 -10px -6px; }
  .meter i { width: 7px; height: 7px; }
}
@media (max-width: 400px) {
  .perm th, .perm td { padding-inline: 4px; }
  .perm th:first-child { padding-left: 12px; }
  .perm thead th { letter-spacing: -.03em; }
}

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); }
.faq .h2 { max-width: 10ch; }
.faq-side p { margin-top: 20px; color: var(--text-2); max-width: 26em; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-size: clamp(17px, 1.4vw, 20px); letter-spacing: -.012em; line-height: 1.35;
}
.faq-list summary::-webkit-details-marker { display: none; }
.pm { position: relative; flex-shrink: 0; width: 14px; height: 14px; }
.pm::before, .pm::after { content: ""; position: absolute; background: var(--text-2); transition: transform .3s var(--ease); }
.pm::before { left: 0; right: 0; top: 6.25px; height: 1.5px; }
.pm::after { top: 0; bottom: 0; left: 6.25px; width: 1.5px; }
details[open] .pm::after { transform: scaleY(0); }
.faq-list .ans { padding: 0 40px 24px 0; color: var(--text-2); max-width: 40em; }
@media (max-width: 1000px) { .faq { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta { padding-block: clamp(120px, 14vw, 224px) clamp(96px, 10vw, 160px); }
.cta-title { font-size: clamp(44px, 7.4vw, 120px); line-height: .94; letter-spacing: -.05em; max-width: 13ch; }
.cta-row { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 28px 48px; margin-top: clamp(32px, 4vw, 56px); }
.cta-row .lede { max-width: 30em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 6fr) repeat(3, minmax(0, 2fr)); gap: 32px; padding-block: 56px 72px; }
.foot-brand p { margin-top: 20px; max-width: 24em; color: var(--text-2); font-size: 15px; }
.foot-col h4 { margin-bottom: 14px; font: 400 11px/1.4 var(--mono); color: var(--text-3); }
.foot-col a { display: block; padding: 4px 0; color: var(--text-2); font-size: 14.5px; text-decoration: none; transition: color .2s; }
.foot-col a:hover { color: var(--text); }
@media (pointer: coarse) { .foot-col a { padding-block: 8px; } }
.foot-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-block: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3);
}
.palette { display: flex; gap: 4px; }
.palette i { width: 8px; height: 8px; background: var(--c); }
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .palette { display: none; }
}

/* ---------- Inner pages ---------- */
.page-hero { padding-top: clamp(56px, 8vw, 128px); }
.crumb { display: flex; align-items: center; gap: 10px; margin-bottom: clamp(24px, 3vw, 40px); font: 12px/1.5 var(--mono); color: var(--text-3); }
.crumb i { width: 7px; height: 7px; background: var(--emerald); }
.page-hero .display { font-size: clamp(44px, 7vw, 116px); max-width: 12ch; }
.page-hero .lede { margin-top: clamp(24px, 3vw, 40px); max-width: 36em; }

/* Engagement flow diagram */
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; position: relative; }
.flow-node {
  position: relative; display: block; padding: 20px 22px 22px; border-radius: var(--r-card);
  border: 1px solid var(--line); background: var(--raise); color: var(--text); text-decoration: none;
  transition: border-color .25s, background-color .25s;
}
.flow-node:hover { border-color: var(--line-2); background: var(--raise-2); }
.flow-node .tag { display: flex; justify-content: space-between; gap: 12px; font: 11px/1.4 var(--mono); color: var(--text-3); margin-bottom: 28px; }
.flow-node h3 { font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -.03em; line-height: 1.1; }
.flow-node p { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.flow-node + .flow-node::before {
  content: ""; position: absolute; left: -10px; top: 50%; width: 10px; height: 1px; background: var(--line-2);
}
.flow-loop {
  grid-column: 2 / 4; position: relative; height: 40px; margin-top: -2px;
  border: 1px solid var(--line-2); border-top: 0; border-radius: 0 0 14px 14px;
  margin-inline: 12% 12%;
}
.flow-loop::before {
  content: ""; position: absolute; left: -4.5px; top: -1px;
  border-left: 4.5px solid transparent; border-right: 4.5px solid transparent; border-bottom: 7px solid var(--text-2);
}
.flow-loop span {
  position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%);
  padding: 0 10px; background: var(--canvas); font: 11px/1.6 var(--mono); color: var(--text-3); white-space: nowrap;
}
@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; }
  .flow-node + .flow-node::before { left: 50%; top: -10px; width: 1px; height: 10px; }
  .flow-loop { display: none; }
}

.track { display: flex; gap: 4px; }
.track i { width: 22px; height: 6px; background: var(--raise-3); }
.track i.on { background: var(--text); }
.eng-detail {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 96px);
  padding-block: clamp(48px, 6vw, 88px); border-top: 1px solid var(--line);
}
.ed-head .meta-row { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; font: 12px/1.5 var(--mono); color: var(--text-3); }
.ed-head .h2 { font-size: clamp(34px, 3.6vw, 56px); }
.ed-head .lead { margin-top: 16px; font-size: clamp(19px, 1.6vw, 23px); letter-spacing: -.015em; line-height: 1.3; }
.ed-head .body { margin-top: 14px; color: var(--text-2); max-width: 30em; }
.ed-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); align-content: start; }
.ed-cols h3 { padding-bottom: 12px; border-bottom: 1px solid var(--line-2); font: 400 11.5px/1.4 var(--mono); color: var(--text-3); }
.ed-cols li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.45; }
@media (max-width: 1000px) { .eng-detail { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .ed-cols { grid-template-columns: 1fr; } }

.note-band {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px);
  padding: clamp(28px, 3vw, 40px); border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--raise);
}
.note-band h2 { font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -.03em; line-height: 1.15; }
.note-band p { color: var(--text-2); }
@media (max-width: 860px) { .note-band { grid-template-columns: 1fr; } }

/* About */
.purpose { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); }
.purpose .h2 { max-width: 13ch; }
.purpose .copy { display: grid; gap: 18px; color: var(--text-2); font-size: clamp(17px, 1.3vw, 19px); max-width: 34em; }
.beliefs li {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 5vw, 96px);
  padding-block: clamp(28px, 3.4vw, 44px); border-top: 1px solid var(--line);
}
.beliefs li:last-child { border-bottom: 1px solid var(--line); }
.beliefs h3 { font-size: clamp(24px, 2.4vw, 36px); letter-spacing: -.035em; line-height: 1.1; max-width: 16ch; }
.beliefs p { color: var(--text-2); max-width: 36em; font-size: 16.5px; }
.principle-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.principle-row div { padding-top: 20px; border-top: 1px solid var(--line-2); }
.principle-row h3 { margin-bottom: 10px; font-size: 18px; font-weight: 500; }
.principle-row p { color: var(--text-2); font-size: 15.5px; }
@media (max-width: 860px) {
  .purpose, .beliefs li { grid-template-columns: 1fr; }
  .principle-row { grid-template-columns: 1fr; }
}

/* Book */
.book { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 5vw, 96px); align-items: start; padding-bottom: clamp(96px, 10vw, 160px); }
.book .display { font-size: clamp(44px, 6vw, 96px); }
.book-notes { margin-top: 40px; border-top: 1px solid var(--line); }
.book-notes > div { padding-block: 20px; border-bottom: 1px solid var(--line); }
.book-notes h2 { margin-bottom: 10px; font: 400 11.5px/1.4 var(--mono); color: var(--text-3); }
.book-notes li { display: flex; align-items: baseline; gap: 12px; padding: 5px 0; font-size: 16px; }
.book-notes li::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; background: var(--emerald); transform: translateY(-2px); }
.book-notes p { color: var(--text-2); font-size: 15.5px; }
.cal-inline { min-height: 700px; overflow: auto; }
.cal-inline iframe { display: block; width: 100%; border: 0; }
.cal-loading { padding: 20px 16px; color: var(--text-3); }
.cal-inline:has(iframe) .cal-loading { display: none; }
.cal .panel-bar a { color: var(--text-2); text-decoration: none; white-space: nowrap; }
@media (max-width: 520px) { .cal .panel-bar .hide-sm { display: none; } }
.cal .panel-bar a:hover { color: var(--text); }
@media (max-width: 1000px) { .book { grid-template-columns: 1fr; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .hero h1 .ln > span { transform: none; }
  .js .hero h1 { opacity: 1; }
}

/* ==========================================================================
   v2 — motion layer (assets/motion.js, story.js, transitions.js)
   ========================================================================== */

/* ---------- Page transitions: header stays, new page arrives square by square ---------- */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
.site-header { view-transition-name: site-header; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(site-header) { display: none; }
::view-transition-new(site-header) { animation: none; }
::view-transition-group(*) { animation-duration: .62s; animation-timing-function: cubic-bezier(.2, .7, .1, 1); }
/* Whatever a card or button grows into must be visible the moment the page is captured */
.js [data-no-anim][data-reveal], .js [data-no-anim] [data-reveal] { opacity: 1; transform: none; transition: none; }
[data-no-anim][data-lines], [data-no-anim] [data-lines] { opacity: 1 !important; }

/* ---------- First-visit boot ---------- */
.boot { display: none; }
.booting .boot {
  display: block; position: fixed; inset: 0; z-index: 200; background: var(--canvas);
  animation: boot-failsafe 0s linear 5s forwards;
}
.boot.is-leaving { background: transparent; }
.boot canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.boot-count {
  position: absolute; left: 50%; top: calc(50% + var(--mh, 168px) / 2 + 8px); transform: translateX(-50%);
  display: flex; gap: 14px; white-space: nowrap;
  font: 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3);
  transition: opacity .25s;
}
.boot-count [data-boot-n] { color: var(--text); font-variant-numeric: tabular-nums; }
.boot.is-leaving .boot-count { opacity: 0; }
@keyframes boot-failsafe { to { visibility: hidden; } }

/* ---------- Scramble: the real text stays in place (transparent) under an aria-hidden overlay ---------- */
.scr { position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; white-space: inherit; text-overflow: clip; pointer-events: none; }
.scr-on, .scr-on *:not(.scr) { color: transparent !important; }
/* The square beside the Fig. 3 status line sits on the line, so the text can decode cleanly */
.win-status span::before { content: none; }
.win-status::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; background: var(--c); }
.ops-row .who > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Headlines: lines slide up from behind a mask ---------- */
.js [data-lines]:not(.lines-ready) { opacity: 0; }
.ml { display: block; overflow: hidden; padding: .1em 0 .14em; margin: -.1em 0 -.14em; }
.ms {
  display: inline-block; transform: translateY(112%);
  transition: transform 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms + var(--beat, 0) * 380ms);
}
.lines-in .ms { transform: none; }

/* ---------- The closing line fills in with the scroll ---------- */
.fill-ready .fw { color: rgba(240, 240, 240, .16); transition: color .35s var(--ease); }
.fill-ready .fw.on { color: var(--text); }

/* ---------- Arrow masks and drawn underlines ---------- */
.am { position: relative; display: inline-grid; overflow: hidden; flex-shrink: 0; }
.am > svg { grid-area: 1 / 1; transition: transform .45s var(--ease) !important; }
.am > .am-in { transform: translate(calc(var(--ax) * -115%), calc(var(--ay) * -115%)); }
a:hover .am > svg:first-child, button:hover .am > svg:first-child { transform: translate(calc(var(--ax) * 115%), calc(var(--ay) * 115%)); }
a:hover .am > .am-in, button:hover .am > .am-in { transform: none; }
.nav-links a, .foot-col a, .text-link, .menu-foot .mono, .cal .panel-bar a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: color .2s, background-size .45s var(--ease);
}
.nav-links a:hover, .foot-col a:hover, .text-link:hover, .menu-foot .mono:hover, .cal .panel-bar a:hover { background-size: 100% 1px; }
.foot-col a { width: fit-content; }
.text-link { padding-bottom: 2px; }

/* ---------- Pixel spotlight on cards ---------- */
.spot { position: relative; isolation: isolate; }
.spot-cv { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; border-radius: inherit; }
.spot > :not(.spot-cv) { position: relative; z-index: 1; }

/* ---------- Approve: pending (three squares stepping), then done ---------- */
.ad-approve, .ops-card .s-btn, .s-steps .s-btn { position: relative; }
.ap-sq { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 3px; }
.is-pending .ap-l { visibility: hidden; }
.is-pending .ap-sq { display: flex; }
.ap-sq i { width: 5px; height: 5px; background: currentColor; opacity: .25; animation: ap-step .72s steps(1, end) infinite; }
.ap-sq i:nth-child(2) { animation-delay: .24s; }
.ap-sq i:nth-child(3) { animation-delay: .48s; }
@keyframes ap-step { 0% { opacity: 1; } 33% { opacity: .25; } }
.ad-actions li .ad-approve.is-pending, .ad-actions li .ad-approve.is-done, .s-steps li .s-btn.is-done { display: inline-flex; }
.ad-approve.is-done, .ops-card .s-btn.is-done, .s-steps .s-btn.is-done,
.ad-approve.is-done:hover, .ops-card .s-btn.is-done:hover, .s-steps .s-btn.is-done:hover {
  background: transparent; color: var(--c); box-shadow: inset 0 0 0 1px var(--c); cursor: default;
}

/* ---------- Booking: a pixel loader until the calendar is ready ---------- */
.cal-inline { position: relative; }
.cal-inline iframe { transition: opacity .45s var(--ease); }
.cal-inline:not(.cal-ready) iframe { opacity: 0; }
.cal-loading { display: flex; align-items: center; gap: 14px; padding: 22px 18px; color: var(--text-3); }
.cal-inline:not(.cal-ready):has(iframe) .cal-loading { display: flex; position: absolute; left: 0; top: 0; }
.cal-inline.cal-ready .cal-loading { display: none; }
.px-load { display: grid; grid-template-columns: repeat(3, 6px); gap: 3px; }
.px-load i { width: 6px; height: 6px; background: var(--text); opacity: .12; animation: px-load 1.08s steps(1, end) infinite; }
.px-load i:nth-child(1) { animation-delay: 0s; } .px-load i:nth-child(2) { animation-delay: .12s; } .px-load i:nth-child(3) { animation-delay: .24s; }
.px-load i:nth-child(6) { animation-delay: .36s; } .px-load i:nth-child(9) { animation-delay: .48s; } .px-load i:nth-child(8) { animation-delay: .6s; }
.px-load i:nth-child(7) { animation-delay: .72s; } .px-load i:nth-child(4) { animation-delay: .84s; } .px-load i:nth-child(5) { animation-delay: .96s; }
@keyframes px-load { 0% { opacity: .9; } 12% { opacity: .12; } }

/* ---------- Hero: the running example and linked agents ---------- */
.story-tag {
  position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 8px; border-radius: 6px; background: rgba(17, 17, 17, .92); box-shadow: inset 0 0 0 1px var(--emerald);
  font: 11px/1 var(--mono); color: var(--text); white-space: nowrap;
  animation: story-in .45s var(--ease); transition: opacity .5s;
}
.story-tag i { width: 7px; height: 7px; background: var(--emerald); }
.story-tag.out { opacity: 0; }
@keyframes story-in { from { opacity: 0; transform: translateY(4px); } }
.brain .ag { transition: opacity .3s; }
.brain.is-linking .ag:not(.is-linked) { opacity: .14; }
.brain.is-linking .ag.is-linked .tag { box-shadow: 0 0 0 2px #111, 0 0 0 3px var(--c); }
.legend [data-agent] { transition: opacity .25s; }
.legend:hover [data-agent]:not(:hover) { opacity: .32; }

/* The symbol's blocks in flight from the hero grid */
.flight { position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none; }

/* ---------- Linked agents in the figures ---------- */
.ag-swatch { transition: opacity .25s, outline-color .25s; }
.ag-picker.is-linking .ag-swatch:not(.is-linked) { opacity: .28; }
.ops-row, .ops-agent { transition: opacity .25s, background-color .2s; }
.ops-floor.linking .ops-row:not(.is-linked) { opacity: .28; }
.ops-floor.linking .ops-agent:not(.is-linked) { opacity: .3; }
@media (hover: hover) {
  .perm tbody tr { transition: opacity .25s, background-color .2s; }
  .perm tbody:hover tr:not(:hover) { opacity: .45; }
}
.perm tbody tr.is-story { background: color-mix(in srgb, var(--c) 14%, transparent); }
.perm tbody tr.is-story th { box-shadow: inset 3px 0 0 var(--c); }

/* ---------- The System as chapters ---------- */
#system .sec-head { position: sticky; top: var(--header); z-index: 20; padding-bottom: 14px; background: var(--canvas); }
#system .sec-head::after {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: var(--text); transform: scaleX(var(--sp, 0)); transform-origin: left;
}
#system .layer-copy { top: calc(var(--header) + 92px); }
.chap-meta [data-ch], .chap-meta [data-arr] { transition: color .45s var(--ease); }
.chap-meta .on { color: var(--text); }
.layer-idx b { color: var(--text-3); }
.layer-idx b, .layer-idx span { transition: color .45s var(--ease); }
.layer.is-active .layer-idx b, .layer.is-active .layer-idx span { color: var(--text); }
.js #system .layer-visual:not(.ch-ready) { opacity: 0; }
#system .layer-visual { position: relative; transition: opacity .7s var(--ease), filter .7s var(--ease); }
#system .layer.is-past .layer-visual { opacity: .3; filter: saturate(.25); }
.ch-cover { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; pointer-events: none; }
.ch-wait .panel { border-color: transparent; }
#system .layer-visual .panel { transition: border-color .5s; }
.ch-outline { position: absolute; z-index: 6; pointer-events: none; overflow: visible; transition: opacity .6s; }
.ch-outline rect { fill: none; stroke: rgba(240, 240, 240, .6); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .75s var(--ease); }
.ch-outline.draw rect { stroke-dashoffset: 0; }
.ch-outline.fade { opacity: 0; }
@media (max-width: 480px) {
  #system .sec-head { gap: 12px; }
  .chap-meta { font-size: 11px; }
}

/* ---------- How we work in sequence ---------- */
.hw.seq .hw-bar i { position: relative; overflow: hidden; background: color-mix(in srgb, var(--c) 18%, transparent); }
.hw.seq .hw-bar i::after { content: ""; position: absolute; inset: 0; background: var(--c); transform: scaleX(var(--f, 0)); transform-origin: left; }
.hw.seq .hw-step .n { transition: color .45s var(--ease); }
.hw.seq .hw-step.is-reached .n { color: var(--text); }
@media (max-width: 1000px) {
  .hw.seq .hw-step { position: relative; box-shadow: inset 0 3px 0 color-mix(in srgb, var(--c) 18%, transparent); }
  .hw.seq .hw-step::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c);
    transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease);
  }
  .hw.seq .hw-step.is-reached::before { transform: none; }
}

/* ---------- Control without hover: the table stays in view while principles scroll past ---------- */
@media (hover: none) and (max-width: 1000px) {
  .trust.is-scrolly { gap: 24px; grid-template-areas: "title" "fig" "list"; }
  .trust.is-scrolly .rules-fig {
    position: sticky; top: calc(var(--header) + 10px); z-index: 3; align-self: start;
    background: var(--canvas); box-shadow: 0 -10px 0 var(--canvas), 0 14px 18px -6px var(--canvas);
  }
  .trust.is-scrolly .principles { margin-top: 4px; padding-bottom: 30vh; }
}
@media (hover: none) and (min-width: 1001px) {
  .trust.is-scrolly .rules-fig { position: sticky; top: calc(var(--header) + 24px); align-self: start; }
}

/* ---------- The invoice thread: a fixed rail in the left margin (wide screens) ---------- */
.thread { display: none; }
@media (min-width: 1200px) {
  .thread {
    display: block; position: fixed; z-index: 35; width: 1px; pointer-events: none;
    top: calc(var(--header) + 40px); bottom: 32px;
    left: calc(max(0px, (100% - var(--max)) / 2) + var(--gutter) - 26px); background: var(--line);
    transition: opacity .5s var(--ease);
  }
  .thread.is-done { opacity: 0; }
  .thread-fill { position: absolute; inset: 0; background: var(--emerald); transform: scaleY(0); transform-origin: top; }
  .thread-stop {
    position: absolute; left: -3px; width: 7px; height: 7px; margin-top: -3px;
    background: var(--canvas); box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color .3s, box-shadow .3s;
  }
  .thread-stop.on { background: var(--emerald); box-shadow: none; }
  .thread-label {
    position: absolute; right: 7px; top: 14px; transform: rotate(180deg);
    writing-mode: vertical-rl; white-space: nowrap; font: 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--emerald);
  }
}
/* One synchronous measuring pass with nothing stuck (story.js) */
.measuring .pin-target, .measuring .layers.stack .layer, .measuring #system .sec-head,
.measuring #system .layer-copy, .measuring .trust.is-scrolly .rules-fig { position: static !important; }

/* ---------- Pinned scenes (motion.js holds the frame, story.js / cores.js play it) ---------- */
.is-pinned .pin-target { position: sticky; z-index: 2; }
.pin-space { pointer-events: none; }

/* The System: chapters stack, each pinned under the chapter bar while the next slides over */
.layers.stack .layer { position: sticky; top: var(--stack-top); padding-block: 26px; background: var(--canvas); margin-bottom: 42vh; }
.layers.stack .layer:last-child { margin-bottom: 0; }
.layers.stack::after { content: ""; display: block; height: 36vh; }
.layers.stack .layer-copy { position: static; }

/* How we work, pinned: each engagement lights once its steps are done */
.hw.pin-scene .hw-eng { opacity: .2; transform: translateY(14px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.hw.pin-scene .hw-eng.lit { opacity: 1; transform: none; }
.hw.pin-scene .hw-eng.lit:hover { transform: translateY(-3px); }

/* What we do on narrower screens: one core open at a time, so the pinned frame stays put */
@media (max-width: 1000px) {
  .core { grid-template-rows: auto 0fr; padding-block: 13px; transition: grid-template-rows .5s var(--ease); }
  .core[aria-pressed="true"], .core-list:not(:has([aria-pressed="true"])) li:first-child .core { grid-template-rows: auto 1fr; }
  .core-line { min-height: 0; overflow: hidden; }
}

/* ---------- Fig. 3 picker: the chosen agent is the one in full colour, marked with an ink square ---------- */
.ag-swatch { opacity: .42; outline: 0; transition: opacity .3s var(--ease); }
.ag-swatch:hover, .ag-picker.is-linking .ag-swatch.is-linked { opacity: .9; }
.ag-swatch[aria-pressed="true"] { opacity: 1; outline: 0; }
.ag-swatch::before {
  content: ""; position: absolute; top: 11px; right: 11px; width: 8px; height: 8px;
  background: var(--ink); transform: scale(0); transition: transform .35s var(--ease);
}
.ag-swatch[aria-pressed="true"]::before { transform: none; }
.ag-swatch:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* ---------- Legal pages (privacy.html, terms.html) ---------- */
.legal-page { padding-bottom: clamp(96px, 10vw, 160px); }
.legal-page .display { font-size: clamp(40px, 5.6vw, 88px); }
.legal-date { margin-top: clamp(20px, 2.4vw, 32px); color: var(--text-3); }
.legal { max-width: 44em; margin-top: clamp(40px, 5vw, 72px); padding-top: 8px; border-top: 1px solid var(--line); }
.legal h2 { margin: 40px 0 12px; font-size: 20px; font-weight: 500; letter-spacing: -.015em; }
.legal p { color: var(--text-2); font-size: 16px; line-height: 1.7; }
.legal p + p { margin-top: 14px; }
.legal a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.legal a:hover { text-decoration-color: currentColor; }
