/* midmen.in v3. One metaphor: the number travels. The model sits on one side, MIDMEN in the middle, the documents on the other;
   the yellow "just changed" marker rides the rails between them, and a red pen circles a sentence that stopped being true.
   Colour carries meaning only: ledger blue = MIDMEN, yellow = just changed, red = no longer true, green = true / ties out. */

@font-face { font-family: "Familjen Grotesk"; src: url(fonts/familjen-grotesk-latin-wght-normal.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2212, U+2215; }
@font-face { font-family: "Familjen Grotesk"; src: url(fonts/familjen-grotesk-rupee.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+20B9, U+2192; }
@font-face { font-family: "Newsreader"; src: url(fonts/newsreader-latin-wght-normal.woff2) format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2212, U+2215; }
@font-face { font-family: "Newsreader"; src: url(fonts/newsreader-latin-wght-italic.woff2) format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Newsreader"; src: url(fonts/newsreader-rupee.woff2) format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+20B9, U+2192; }

:root {
  --bg: #fbfcfd; --card: #ffffff; --ink: #0f1c28; --muted: #56636f; --line: #dae2e9; --rail: #c3d0db; --wash: #f1f5f8;
  --ledger: #1f4e79; --ledger-soft: #e3ecf5; --on-ledger: #ffffff;
  --marker: #ffd84a; --marker-ink: #2a2100; --red: #c4342b; --red-soft: #fdeceb; --true: #1b7547; --true-soft: #e4f3ea;
  --glow-y: #fff2bf; --glow-b: #dbe8f5;
  --night: #0e2438; --night-card: #15324d; --night-line: #27507a; --night-ink: #edf3f8; --night-muted: #a9bfd2; --night-ledger: #8fbbe6;
  --xl: #1d6f42; --wd: #2b5797; --pp: #c4471f;
  --shadow: 0 18px 44px -26px rgba(15, 28, 40, .38);
  --sans: "Familjen Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --gut: max(16px, env(safe-area-inset-left, 0px), 4vw);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0c1721; --card: #13212e; --ink: #e8eef3; --muted: #a1b1bf; --line: #23374a; --rail: #33506a; --wash: #101e2a;
  --ledger: #78aadb; --ledger-soft: #16304a; --on-ledger: #08131d;
  --marker: #f0c53a; --marker-ink: #231b00; --red: #ff8b7f; --red-soft: #3a1d1b; --true: #73d39b; --true-soft: #12301f;
  --glow-y: #2a2510; --glow-b: #10304d;
  --night: #081a2b; --night-card: #0f2a43; --night-line: #23496e;
  --xl: #4fbf80; --wd: #7ea6e6; --pp: #f08a5d;
  --shadow: 0 18px 44px -26px rgba(0, 0, 0, .7);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0c1721; --card: #13212e; --ink: #e8eef3; --muted: #a1b1bf; --line: #23374a; --rail: #33506a; --wash: #101e2a;
  --ledger: #78aadb; --ledger-soft: #16304a; --on-ledger: #08131d;
  --marker: #f0c53a; --marker-ink: #231b00; --red: #ff8b7f; --red-soft: #3a1d1b; --true: #73d39b; --true-soft: #12301f;
  --glow-y: #2a2510; --glow-b: #10304d;
  --night: #081a2b; --night-card: #0f2a43; --night-line: #23496e;
  --xl: #4fbf80; --wd: #7ea6e6; --pp: #f08a5d;
  --shadow: 0 18px 44px -26px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--sans); overflow-x: hidden; text-rendering: optimizeLegibility; }
body.glow { background: radial-gradient(62vw 42vw at 10% 0%, var(--glow-y), transparent 70%), radial-gradient(56vw 46vw at 95% 22%, var(--glow-b), transparent 70%), var(--bg); background-repeat: no-repeat; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--ledger); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ledger); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
p { margin: 0; }
b, strong { font-weight: 600; }
code { font: 500 .9em/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; }
.num { font-variant-numeric: lining-nums; white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--card); color: var(--ink); padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
.wrap { max-width: 1440px; margin: 0 auto; padding-left: var(--gut); padding-right: max(16px, env(safe-area-inset-right, 0px), 4vw); }
.narrow { max-width: 1040px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 16px/1 var(--sans); letter-spacing: .14em; flex: none; }
.logo svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 4px; margin: 0 auto; padding: 4px; border: 1px solid var(--line); border-radius: 99px; background: color-mix(in srgb, var(--card) 75%, transparent); }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 7px 14px; border-radius: 99px; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--wash); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--wash); font-weight: 600; }
.menu { display: none; position: relative; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; font: 600 15px/1 var(--sans); padding: 11px 14px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--wash); }
.menu nav { position: absolute; right: 0; top: calc(100% + 8px); width: min(78vw, 280px); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: var(--shadow); display: grid; }
.menu nav a { color: var(--ink); text-decoration: none; padding: 12px 14px; border-radius: 10px; font-size: 16px; }
.menu nav a:hover { background: var(--wash); }
.menu nav a[aria-current="page"] { font-weight: 600; background: var(--wash); }
@media (max-width: 960px) { .top .nav { display: none; } .menu { display: block; } .top .btn { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px/1 var(--sans); padding: 13px 20px; border-radius: 99px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--bg); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(1.15); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.blue { background: var(--ledger); border-color: var(--ledger); color: var(--on-ledger); }
.btn.small { padding: 10px 16px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: default; filter: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.center .actions { justify-content: center; }
.more { font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.more::after { content: ""; width: 18px; height: 1.5px; background: currentColor; transition: width .2s; }
.more:hover::after { width: 26px; }

/* type */
.pill { display: inline-block; font: 500 13px/1 var(--sans); color: var(--ledger); background: var(--ledger-soft); border-radius: 99px; padding: 7px 12px; }
.pill.on-night { color: var(--night-ledger); background: color-mix(in srgb, var(--night-ledger) 16%, transparent); }
h1, h2, h3 { text-wrap: balance; }
h1 { font: 600 clamp(38px, 5.4vw, 104px)/.98 var(--sans); letter-spacing: -.035em; margin: 0; }
h1 .turn, h2 .turn { display: block; color: var(--ledger); }
h1 > span:not(.turn), h2 > span:not(.turn) { display: block; }
h2 { font: 600 clamp(32px, 4vw, 64px)/1.02 var(--sans); letter-spacing: -.03em; margin: 0; }
h3 { font: 600 clamp(20px, 1.5vw, 24px)/1.2 var(--sans); letter-spacing: -.01em; margin: 0; }
.lede { font-size: clamp(18px, 1.35vw, 22px); color: var(--muted); max-width: 46ch; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.note { font-size: 14px; color: var(--muted); }

/* sections */
.sec { padding-block: clamp(72px, 10vw, 150px) 0; }
.sec-head { display: grid; gap: 18px; justify-items: start; max-width: 860px; }
.center .sec-head, .sec-head.center { justify-items: center; margin-inline: auto; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } .split.flip > :first-child { order: 0; } }
.stack { display: grid; gap: 18px; align-content: start; justify-items: start; min-width: 0; }

/* the strip of audiences under the hero */
.for { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; align-items: center; padding-block: 8px 0; }
.for span { font-size: 15px; color: var(--muted); }
.for b { font-weight: 500; font-size: 15px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); }

/* app windows: the shared atom of every diagram */
.win { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.cap { display: flex; align-items: center; gap: 8px; font: 600 13px/1 var(--sans); color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cap i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.cap .xl { background: var(--xl); } .cap .wd { background: var(--wd); } .cap .pp { background: var(--pp); } .cap .cl { background: var(--muted); border-radius: 50%; }
.cap em { margin-left: auto; font-style: normal; font-weight: 500; }
.doc { font: 400 17px/1.55 var(--serif); padding: 14px 16px; }
.doc p + p { margin-top: 8px; }
.doc h4 { font: 600 17px/1.2 var(--sans); color: var(--ledger); margin: 0 0 8px; }
.doc ul { margin: 0; padding-left: 18px; }
.rows { display: grid; }
.rows > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 15px; align-items: center; }
.rows > div:last-child { border-bottom: 0; }
.rows > div > span:first-child { color: var(--muted); }
.v { white-space: nowrap; font-variant-numeric: lining-nums; border-radius: 4px; padding: 0 .14em; margin: 0 -.14em; transition: background-color 1.6s ease, color 1.6s ease; }
.v.hot { background: var(--marker); color: var(--marker-ink); transition: none; }
.cell { outline: 2px solid var(--xl); outline-offset: 2px; border-radius: 2px; }
.claim { position: relative; display: block; border-radius: 6px; padding: 4px 6px; margin: -4px -6px; transition: background-color .3s, color .3s; }
.claim.broken { color: var(--red); }
.pen { position: absolute; inset: -10px -8px -12px -12px; width: calc(100% + 20px); height: calc(100% + 22px); overflow: visible; pointer-events: none; opacity: 0; }
.pen path { fill: none; stroke: var(--red); stroke-width: 1; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.claim.broken .pen { opacity: 1; }
.claim.broken .pen path { animation: pen .75s .2s ease-out forwards; }
@keyframes pen { to { stroke-dashoffset: 0; } }
.tag { display: inline-block; font: 600 12px/1 var(--sans); border-radius: 99px; padding: 5px 9px; margin-top: 8px; border: 1px solid currentColor; }
.claim + .tag, .claim .tag { display: table; }
.tag.ok { color: var(--true); } .tag.bad { color: var(--red); } .tag.wait { color: var(--ledger); }
del { color: var(--red); text-decoration-thickness: 1.5px; }
ins { color: var(--ledger); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* HERO */
.hero { min-height: calc(100svh - 68px); display: flex; flex-direction: column; justify-content: center; gap: clamp(18px, 2.6vh, 34px); padding-block: 2vh 4vh; text-align: center; }
.hero .pill { align-self: center; }
.hero-sub { font-size: clamp(17px, 1.3vw, 21px); color: var(--muted); max-width: 54ch; margin: -6px auto 0; }
.demo { --w: min(100%, max(800px, calc((100svh - 520px) * 1000 / 440))); width: var(--w); margin: 0 auto; text-align: left; }
.dia { container-type: inline-size; position: relative; aspect-ratio: 1000 / 440; }
.dia .rails { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rails path { fill: none; stroke: var(--rail); stroke-width: 2; }
.rails path.live { stroke: var(--ledger); stroke-dasharray: 6 10; opacity: 0; transition: opacity .3s; }
.dia.moving .rails path.live { opacity: 1; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -32; } }
.chip rect { fill: var(--marker); } .chip text { font: 600 15px var(--sans); fill: var(--marker-ink); }
.dia .win, .dia .hub { position: absolute; }
.dia .cap { font-size: 1.3cqi; padding: 1.1cqi 1.4cqi; gap: .8cqi; } .dia .cap i { width: 1.25cqi; height: 1.25cqi; }
.dia .rows > div { font-size: 1.5cqi; padding: 1.15cqi 1.4cqi; gap: 1cqi; }
.dia .doc { font-size: 1.55cqi; padding: 1.5cqi 1.6cqi; }
.dia .doc h4 { font-size: 1.7cqi; margin-bottom: 1cqi; }
.dia .doc ul { padding-left: 1.7cqi; }
.dia .slide .doc { font: 400 1.4cqi/1.45 var(--sans); }
.dia .tag { font-size: 1.15cqi; padding: .55cqi .9cqi; margin-top: .8cqi; }
.dia .claim { padding: .4cqi .6cqi; margin: -.4cqi -.6cqi; }
.dia .win { border-radius: 1.3cqi; }
.dia .xlwin { left: 0; top: 19%; width: 25%; }
.dia .wdwin { left: 74%; top: 0; width: 26%; min-height: 49%; }
.dia .slide { left: 74%; top: 56%; width: 26%; min-height: 44%; }
.hub { display: grid; place-content: center; gap: .9cqi; text-align: center; background: var(--ledger); color: var(--on-ledger); border-radius: 2cqi; box-shadow: 0 0 0 1cqi color-mix(in srgb, var(--ledger) 13%, transparent), 0 2cqi 5cqi -2cqi color-mix(in srgb, var(--ledger) 70%, transparent); }
.dia .hub { left: 40%; top: 34%; width: 19%; height: 32%; }
.hub b { display: flex; align-items: center; justify-content: center; gap: 1cqi; font: 700 2.1cqi/1 var(--sans); letter-spacing: .14em; }
.hub b svg { width: 2.8cqi; height: 2.8cqi; }
.hub small { font: 500 1.3cqi/1.25 var(--sans); opacity: .88; }
.drop { display: none; }
.demo-bar { display: flex; gap: 12px 16px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: clamp(16px, 2.4vh, 28px); }
.demo-bar .say { flex-basis: 100%; text-align: center; font-size: 15px; color: var(--muted); min-height: 1.55em; }
.steps-mini { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; font: 500 13px/1 var(--sans); color: var(--muted); }
.steps-mini li { padding: 7px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); }
.steps-mini li.now { color: var(--ink); border-color: var(--ink); }
.steps-mini li.done { color: var(--true); border-color: transparent; background: transparent; }
@media (max-width: 900px) {
  .hero { text-align: left; min-height: 0; padding-block: 18px 8px; gap: 16px; }
  .hero .pill { align-self: flex-start; }
  .hero-sub { margin: 0; }
  h1 { font-size: clamp(34px, 9.4vw, 60px); }
  .demo { width: 100%; }
  .dia { aspect-ratio: auto; display: grid; gap: 0; }
  .dia .rails { display: none; }
  .dia .win, .dia .hub { position: relative; left: auto; top: auto; width: 100%; min-height: 0; height: auto; }
  .dia .slide { display: none; }
  .dia .cap { font-size: 13px; padding: 9px 12px; gap: 8px; } .dia .cap i { width: 11px; height: 11px; }
  .dia .rows > div { font-size: 15px; padding: 8px 12px; } .dia .rows .wide-only { display: none; }
  .dia .doc { font-size: 16px; padding: 10px 12px; } .dia .tag { font-size: 12px; padding: 5px 9px; margin-top: 6px; }
  .dia .claim { padding: 3px 6px; margin: -3px -6px; }
  .dia .win { border-radius: 12px; }
  .dia .hub { grid-auto-flow: column; padding: 12px 14px; gap: 12px; border-radius: 12px; box-shadow: none; justify-content: space-between; align-items: center; }
  .hub b { font-size: 15px; gap: 8px; } .hub b svg { width: 22px; height: 22px; } .hub small { font-size: 13px; }
  .drop { display: block; position: relative; justify-self: center; width: 2px; height: 26px; background: repeating-linear-gradient(var(--rail) 0 4px, transparent 4px 8px); }
  .drop::after { content: ""; position: absolute; left: 50%; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--marker); transform: translate(-50%, -6px); opacity: 0; }
  .dia.moving .drop::after { animation: drop .8s ease-in-out 2; }
  @keyframes drop { 0% { opacity: 1; transform: translate(-50%, -6px); } 100% { opacity: 1; transform: translate(-50%, 20px); } }
  .demo-bar { justify-content: flex-start; margin-top: 16px; }
  .demo-bar .say { text-align: left; order: 3; }
  .steps-mini { display: none; }
}

/* click any number */
.trace { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1.1fr); align-items: center; }
.trace .rail-h { height: 2px; background: var(--rail); position: relative; }
.trace .rail-h::after { content: ""; position: absolute; right: -2px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ledger); }
.trace .doc .pick { font: inherit; color: inherit; background: none; border: 0; padding: 0 2px; margin: 0 -2px; border-bottom: 2px solid var(--ledger); cursor: pointer; border-radius: 3px; }
.trace .doc .pick[aria-pressed="true"] { background: var(--marker); color: var(--marker-ink); border-bottom-color: transparent; }
.card-src { display: grid; gap: 10px; padding: 16px; }
.card-src h3 { font-size: 18px; }
.card-src .where { font-size: 14px; color: var(--muted); }
.badge { justify-self: start; font: 600 12px/1.3 var(--sans); padding: 3px 9px; border-radius: 99px; color: var(--true); background: var(--true-soft); }
.pdfline { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.pdfline img { width: 100%; }
.card-src .src { font-size: 14px; }
@media (max-width: 760px) { .trace { grid-template-columns: minmax(0, 1fr); gap: 0; } .trace .rail-h { width: 2px; height: 28px; margin-left: 28px; } .trace .rail-h::after { right: auto; top: auto; bottom: -2px; left: -4px; } }

/* words vs numbers */
.lanes { display: grid; gap: 14px; }
.lane { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: center; }
.lane > span { font: 600 13px/1.2 var(--sans); color: var(--muted); }
.lane .doc { border: 1px dashed var(--rail); border-radius: 12px; background: var(--card); }
.slot { display: inline-block; min-width: 4.4em; border-bottom: 2px dotted var(--muted); }
.tagchip { display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1 var(--sans); color: var(--ledger); background: var(--ledger-soft); border-radius: 99px; padding: 6px 10px; white-space: nowrap; }
.lane.out .doc { border-style: solid; box-shadow: var(--shadow); }
.lane.out .v { background: color-mix(in srgb, var(--ledger-soft) 70%, transparent); }
@media (max-width: 520px) { .lane { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

/* the one dark section */
.night { background: var(--night); color: var(--night-ink); margin-top: clamp(72px, 10vw, 150px); padding-block: clamp(72px, 9vw, 130px); position: relative; overflow: hidden; }
.night::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; background: radial-gradient(closest-side, color-mix(in srgb, var(--night-ledger) 22%, transparent), transparent); pointer-events: none; }
.night .wrap { position: relative; }
.night h2 .turn { color: var(--night-ledger); }
.night .lede, .night .muted { color: var(--night-muted); }
.night a { color: var(--night-ledger); }
.night .btn { background: var(--night-ink); color: var(--night); border-color: var(--night-ink); }
.night .btn.ghost { background: transparent; color: var(--night-ink); }
.chat { background: var(--night-card); border: 1px solid var(--night-line); border-radius: 18px; padding: clamp(16px, 2vw, 26px); display: grid; gap: 16px; min-width: 0; }
.chat .ask { font: 400 clamp(17px, 1.3vw, 20px)/1.5 var(--serif); background: color-mix(in srgb, var(--night-ink) 7%, transparent); border-radius: 14px; padding: 14px 16px; }
.chat .who { font: 600 12px/1 var(--sans); color: var(--night-muted); }
.calls { list-style: none; margin: 0; padding: 0 0 0 22px; display: grid; gap: 0; position: relative; }
.calls::before { content: ""; position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; background: var(--night-line); }
.calls li { position: relative; display: grid; grid-template-columns: minmax(0, 17em) minmax(0, 1fr); gap: 4px 14px; padding: 9px 0; font-size: 15px; color: var(--night-muted); }
.calls li::before { content: ""; position: absolute; left: -21px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--night); border: 2px solid var(--night-line); transition: background .3s, border-color .3s; }
.calls li b { font: 600 13.5px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--night-ink); overflow-wrap: anywhere; }
.calls li.lit::before { background: var(--marker); border-color: var(--marker); }
.calls li.lit { color: var(--night-ink); }
@media (max-width: 560px) { .calls li { grid-template-columns: minmax(0, 1fr); } }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.facts span { font-size: 14px; border: 1px solid var(--night-line); border-radius: 99px; padding: 6px 12px; color: var(--night-ink); }

/* screenshots */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: clamp(14px, 2vw, 28px); align-items: start; }
.shot { margin: 0; display: grid; gap: 10px; min-width: 0; }
.shot img { border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); width: 100%; }
.shot figcaption { font-size: 14px; color: var(--muted); }
.shot.tall { max-width: 360px; }
.clip { margin: 0; display: grid; gap: 10px; min-width: 0; }
.clip video, .clip img { width: 100%; border-radius: 16px; border: 1px solid var(--line); background: var(--wash); aspect-ratio: 16 / 9; object-fit: cover; box-shadow: var(--shadow); }
.clip figcaption { font-size: 14px; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.clip button { font: 600 13px/1 var(--sans); padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }

/* doors */
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
@media (max-width: 760px) { .doors { grid-template-columns: minmax(0, 1fr); } }
.door { display: grid; gap: 14px; align-content: start; justify-items: start; padding: clamp(22px, 3vw, 40px); border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.door h3 { font-size: clamp(24px, 2.2vw, 34px); letter-spacing: -.02em; }
.door ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--muted); }
.door li { padding-left: 22px; position: relative; }
.door li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 10px; height: 2px; background: var(--rail); }

/* instructions: a real sequence, so it is numbered */
ol.how { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 0; }
ol.how > li { counter-increment: s; position: relative; padding: 0 0 34px 56px; min-width: 0; }
ol.how > li::before { content: counter(s); position: absolute; left: 0; top: -4px; width: 36px; height: 36px; border-radius: 50%; background: var(--ledger); color: var(--on-ledger); font: 700 15px/36px var(--sans); text-align: center; }
ol.how > li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 6px; width: 2px; background: var(--rail); }
ol.how h3 { margin-bottom: 8px; }
ol.how p { max-width: 62ch; }
ol.how p + p, ol.how p + .copy, ol.how .copy + p, ol.how .copy + .copy, ol.how p + .shot, ol.how p + ul, ol.how ul + p { margin-top: 10px; }
ol.how ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; max-width: 62ch; }
.copy { display: flex; align-items: stretch; max-width: 760px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.copy > :first-child { flex: 1; min-width: 0; padding: 12px 14px; overflow-wrap: anywhere; }
.copy code { font-size: 14px; }
.copy q { quotes: none; font: 400 17px/1.5 var(--serif); }
.copy button { flex: none; font: 600 14px var(--sans); border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--ledger); padding: 0 16px; cursor: pointer; min-width: 78px; }
.copy button.done { color: var(--true); }
.aside { border-left: 3px solid var(--rail); padding: 2px 0 2px 14px; color: var(--muted); font-size: 15px; max-width: 62ch; }

/* ledger list (facts, changes) */
dl.ledger { margin: 0; border-top: 1.5px solid var(--ink); display: grid; }
dl.ledger > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 6px 40px; padding: 20px 0; border-bottom: 1px solid var(--line); }
dl.ledger dt { font: 600 19px/1.3 var(--sans); }
dl.ledger dd { margin: 0; color: var(--muted); max-width: 66ch; }
dl.ledger dd p + p { margin-top: 8px; }
@media (max-width: 760px) { dl.ledger > div { grid-template-columns: minmax(0, 1fr); } }
.log { display: grid; gap: 0; border-top: 1.5px solid var(--ink); }
.log article { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 6px 32px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.log time { font: 600 15px/1.5 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.log h3 { font-size: 19px; margin-bottom: 6px; }
.log ul { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 4px; max-width: 70ch; }
@media (max-width: 640px) { .log article { grid-template-columns: minmax(0, 1fr); } }

/* the loop on How it works */
.loop { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; counter-reset: l; list-style: none; padding: 0; margin: 0; position: relative; }
.loop::before { content: ""; position: absolute; left: 8%; right: 8%; top: 22px; height: 2px; background: var(--rail); }
.loop li { counter-increment: l; display: grid; justify-items: center; gap: 10px; text-align: center; position: relative; padding: 0 6px; }
.loop li::before { content: counter(l); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 700 16px/1 var(--sans); background: var(--card); border: 2px solid var(--rail); color: var(--muted); position: relative; transition: background .3s, color .3s, border-color .3s; }
.loop li.lit::before { background: var(--ledger); border-color: var(--ledger); color: var(--on-ledger); }
.loop li.red::before { background: var(--red); border-color: var(--red); color: #fff; }
.loop b { font-size: 16px; }
.loop span { font-size: 14px; color: var(--muted); }
@media (max-width: 860px) { .loop { grid-template-columns: minmax(0, 1fr); gap: 14px; } .loop::before { left: 22px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; } .loop li { grid-template-columns: 46px minmax(0, 1fr); justify-items: start; text-align: left; column-gap: 14px; row-gap: 0; } .loop li::before { grid-row: span 2; } }

/* small diagrams on inner pages */
.mini { display: grid; gap: 14px; }
.mini .row-flow { display: grid; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); align-items: center; }
.mini .arrow { height: 2px; background: var(--rail); position: relative; }
.mini .arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--rail); border-right: 0; }
@media (max-width: 560px) { .mini .row-flow { grid-template-columns: minmax(0, 1fr); gap: 10px; } .mini .arrow { width: 2px; height: 22px; margin-left: 24px; } .mini .arrow::after { right: auto; top: auto; bottom: -2px; left: -4px; border: 5px solid transparent; border-top: 7px solid var(--rail); border-bottom: 0; } }
.verdicts { display: grid; gap: 8px; }
.verdicts > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 15px; }
.k { font: 600 12px/1 var(--sans); border-radius: 99px; padding: 5px 9px; white-space: nowrap; }
.k.ok { color: var(--true); background: var(--true-soft); } .k.old { color: var(--marker-ink); background: var(--marker); } .k.bad { color: var(--red); background: var(--red-soft); } .k.blue { color: var(--ledger); background: var(--ledger-soft); } .k.grey { color: var(--muted); background: var(--wash); }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.roles > div { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); display: grid; gap: 6px; align-content: start; }
.roles span { color: var(--muted); font-size: 15px; }
@media (max-width: 640px) { .roles { grid-template-columns: minmax(0, 1fr); } }

/* about */
.letter { font: 400 clamp(19px, 1.5vw, 22px)/1.65 var(--serif); max-width: 34em; display: grid; gap: 1em; }
.letter .sign { font-style: italic; color: var(--muted); }
.portrait { display: grid; gap: 12px; justify-items: start; }

/* footer */
.foot { margin-top: clamp(80px, 10vw, 150px); border-top: 1px solid var(--line); padding-block: 40px calc(32px + env(safe-area-inset-bottom, 0px)); font-size: 15px; }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 28px; }
.foot h4 { font: 600 14px/1 var(--sans); margin: 0 0 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot p { color: var(--muted); max-width: 40ch; }
.foot p + p { margin-top: 10px; }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .foot .wrap > :first-child { grid-column: 1 / -1; } }

.page-hero { padding-block: clamp(40px, 7vw, 110px) 0; display: grid; gap: 22px; justify-items: start; }
.page-hero h1 { font-size: clamp(38px, 5vw, 88px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .claim.broken .pen path { stroke-dashoffset: 0; }
}
.foot .sig { margin-top: 14px; }
.loop li.lit[data-red]::before { background: var(--red); border-color: var(--red); color: #fff; }

.sec-head + *, .stack + .shots { margin-top: clamp(32px, 4vw, 56px); }
.split > .stack + * { margin-top: 0; }
.about-links { margin-top: 40px; }
.page-hero.narrow, .sec.narrow { max-width: 1040px; }
.roles + .team, .roles + .ledger { margin-top: 28px; }
.split.team { align-items: start; }

/* tall pane screenshots are shown as a window onto their top part */
.shots.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shot.crop img { aspect-ratio: 7 / 10; object-fit: cover; object-position: top; }
@media (max-width: 480px) { .shots.pair { grid-template-columns: minmax(0, 1fr); } .shot.crop img { aspect-ratio: 7 / 9; } }
.calls.plain b { font: 600 15px/1.45 var(--sans); }
.calls.plain li { grid-template-columns: minmax(0, 12em) minmax(0, 1fr); }
.sec-head + .how, .sec-head + .roles, .sec-head + .doors, .sec-head + .split, .sec-head + .shots { margin-top: clamp(28px, 3.5vw, 52px); }
.roles + .shots, .roles + .split { margin-top: 28px; }
.split:has(> dl.ledger) { align-items: start; }
.split:has(> dl.ledger) > .stack { position: sticky; top: 100px; }
@media (max-width: 900px) { .split:has(> dl.ledger) > .stack { position: static; } }

/* What's new: the "New: …" pill (header and home), the lead story and the dated timeline */
.pill.new { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); padding: 5px 12px 5px 5px; }
.pill.new span { font-weight: 700; font-size: 12px; color: var(--marker-ink); background: var(--marker); border-radius: 99px; padding: 4px 8px; }
.pill.new:hover { border-color: var(--ledger); text-decoration: none; }
.pill.new.go { background: var(--ledger); color: var(--on-ledger); border-color: var(--ledger); padding: 7px 14px; font-weight: 600; }
.pill.new.go span { background: none; color: inherit; padding: 0; font-size: inherit; font-weight: inherit; }
.pill.new.go:hover { filter: brightness(1.08); }
.top-new { flex: none; }
@media (max-width: 1180px) { .top-new { display: none; } }
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
@media (max-width: 900px) { .hero-pills { justify-content: flex-start; } }
.when { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font: 600 15px/1 var(--sans); color: var(--muted); }
.lead .stack > h3 { margin-top: 8px; }
.lead .stack { gap: 16px; }
ol.how.short > li { padding-bottom: 18px; padding-left: 50px; }
ol.how.short > li::before { width: 32px; height: 32px; line-height: 32px; font-size: 14px; top: -3px; }
ol.how.short > li:not(:last-child)::after { left: 15px; top: 34px; }
.lead-shot { max-width: 380px; justify-self: center; }
ul.apps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
ul.apps li { display: inline-flex; align-items: center; gap: 7px; font: 500 13px/1 var(--sans); padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); }
ul.apps i { width: 10px; height: 10px; border-radius: 3px; }
ul.apps .xl { background: var(--xl); } ul.apps .wd { background: var(--wd); } ul.apps .pp { background: var(--pp); } ul.apps .cl { background: var(--muted); border-radius: 50%; }
.timeline { display: grid; gap: 0; border-top: 1.5px solid var(--ink); padding-top: 0; margin-top: clamp(72px, 10vw, 150px); }
.timeline.sec { padding-top: 0; }
.day { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 12px 40px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.day-date { font: 600 16px/1.4 var(--sans); color: var(--muted); margin: 0; letter-spacing: 0; }
.day-date time { position: sticky; top: 96px; }
.day-items { display: grid; gap: 18px; min-width: 0; }
.upd { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 22px; align-items: start; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.upd .shot img { aspect-ratio: 7 / 6; box-shadow: none; }
.upd .shot figcaption { font-size: 13px; }
.upd .stack { gap: 10px; }
.upd p { color: var(--muted); max-width: 62ch; }
ul.also { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 4px; font-size: 15px; max-width: 62ch; }
ul.minor { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
ul.minor li { position: relative; padding-left: 22px; color: var(--muted); max-width: 70ch; }
ul.minor li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--rail); }
@media (max-width: 760px) { .day { grid-template-columns: minmax(0, 1fr); } .day-date time { position: static; } .upd { grid-template-columns: minmax(0, 1fr); } .upd .shot { max-width: 360px; } }
.shot.f-mid img { object-position: 50% 42%; }
.shot.f-bottom img { object-position: 50% 100%; }
[data-page="home"] .top-new { display: none; }
@media (max-width: 1000px) { .day { grid-template-columns: minmax(0, 1fr); gap: 14px; } .day-date time { position: static; } }
