/* Layout: one night on a 24-hour dial. A poster line sits over a large dial
   that plots an example night; below it, working exhibits (a morning approval
   queue, a scope gate, a report page) show the practice instead of describing
   it. Everything is left-aligned. The page ends at dawn, on light ground.
   The night sky is the one ground for every page; only the dawn at the foot
   changes it. Lamp amber is what people decide. Each practice has a color
   for its agent's work: blue for AI operations, red for penetration testing
   (its lane on the home dial, the hosts on the scope map, the agent's stamp
   on a finding). Paper speaks in
   serif; everything else is one sans family whose width axis does the work. */
:root {
  color-scheme: dark;
  --night-0: #080A1F;      /* the page ground */
  --night-1: #0E1130;      /* panels */
  --night-2: #181C47;      /* cards on a panel */
  --rule: #2A3066;         /* lines that carry structure */
  --moon: #EEECE4;         /* primary text */
  --mist: #B6BBD8;         /* running text */
  --dim: #868DB6;          /* secondary text */
  --agent: #93ABFF;        /* what the AI operations agents do */
  --test: #FF5D6C;         /* what the penetration testing agent does */
  --lamp: #FFB659;         /* what people decide */
  --lamp-hi: #FFC983;
  --lamp-ink: #2B1700;
  --ok: #7ED9B7;
  --stop: #FF8F8F;         /* the scope gate's Blocked verdict */
  --paper: #F2EEE3;        /* documents */
  --ink: #1B1838;
  --ink-soft: #4D496B;
  --ink-test: #B4233F;     /* stamp inks on paper: the testing agent, then the operator */
  --ink-amber: #A65800;
  --dawn-1: #1C1B4D;
  --dawn-2: #4C2F6C;
  --dawn-3: #A85674;
  --dawn-4: #EA8B6B;
  --dawn-5: #F7C088;
  --day: #FBEAD0;          /* first light, where the page ends */
  --sans: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--night-0);
  color: var(--moon);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--night-0);
}
h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; border-radius: 3px; }

.svg-defs { position: absolute; }
.wrap {
  width: 100%;
  max-width: 78rem;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.skip {
  position: absolute;
  left: -999rem;
  top: 0;
  z-index: 20;
  padding: .6rem 1rem;
  background: var(--lamp);
  color: var(--lamp-ink);
  font-weight: 650;
}
.skip:focus { left: max(20px, env(safe-area-inset-left, 0px)); top: calc(env(safe-area-inset-top, 0px) + .5rem); }

/* Type roles */
.poster {
  max-width: 64rem;
  font-weight: 760;
  font-stretch: 84%;
  font-size: clamp(2.7rem, 5.4vw + 1rem, 5.6rem);
  line-height: .98;
  letter-spacing: -.022em;
}
.headline {
  font-weight: 720;
  font-stretch: 88%;
  font-size: clamp(2rem, 2.7vw + 1.15rem, 3.5rem);
  line-height: 1.03;
  letter-spacing: -.018em;
}
.heading { font-weight: 680; font-stretch: 94%; font-size: 1.4rem; line-height: 1.2; letter-spacing: -.008em; }
.lede { font-size: clamp(1.0625rem, .45vw + 1rem, 1.25rem); line-height: 1.55; color: var(--mist); max-width: 40rem; }
.fine { font-size: .875rem; line-height: 1.5; color: var(--dim); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .55rem 1.2rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: none;
  font: 650 .9375rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.btn-lamp { background: var(--lamp); color: var(--lamp-ink); }
.btn-lamp:hover { background: var(--lamp-hi); }
.btn-quiet { border-color: var(--rule); color: var(--moon); }
.btn-quiet:hover { border-color: var(--mist); }
.btn-small { min-height: 2.25rem; padding: .35rem .9rem; font-size: .875rem; }
.textlink { color: var(--moon); text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: .22em; }
.textlink:hover { text-decoration-color: var(--lamp); }
button.textlink { padding: 0; border: 0; background: none; cursor: pointer; font-size: .875rem; }

/* Header */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 9;
  background: color-mix(in srgb, var(--night-0) 86%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: 1.35rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -.01em;
  color: var(--moon);
  text-decoration: none;
}
.brand svg { width: 1.75rem; height: 1.75rem; flex: none; overflow: visible; }
.orbit { transform-origin: 16px 17px; }
.orbit-dot { fill: var(--lamp); }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a:not(.btn) { color: var(--mist); text-decoration: none; font-size: .9375rem; }
.nav a:not(.btn):hover { color: var(--moon); }
@media (max-width: 880px) { .nav a:not(.btn) { display: none; } }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
canvas.stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.twinkle {
  position: absolute;
  z-index: -1;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--moon);
  box-shadow: 0 0 6px 1px color-mix(in srgb, var(--moon) 45%, transparent);
  opacity: .7;
}
@media (prefers-reduced-motion: no-preference) {
  .twinkle { animation: twinkle var(--d, 6s) ease-in-out var(--o, 0s) infinite; }
}
@keyframes twinkle { 0%, 100% { opacity: .2; } 50% { opacity: .95; } }
.hero .wrap { display: grid; gap: clamp(2rem, 4.5vw, 3.5rem); padding-block: clamp(3rem, 6.5vw, 5.5rem) clamp(3.5rem, 7vw, 6rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "dial copy" "dial log";
  grid-template-rows: auto 1fr;
  gap: 2.25rem clamp(2rem, 4.5vw, 4.5rem);
  align-items: start;
}
.hero-copy { grid-area: copy; display: grid; gap: 1.6rem; justify-items: start; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.5rem; }
.jumps { display: inline-flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .9375rem; }

/* The night dial */
.dial-wrap { grid-area: dial; display: grid; gap: .9rem; justify-items: center; }
.dial { display: block; width: 100%; max-width: 36rem; height: auto; overflow: visible; font-family: var(--sans); }
/* The dial is drawn by tools/dial.py. From the outside in: the sky band
   (thick through the night, tapering at dusk and dawn), a quarter-hour
   track, the hour numerals, and an inner face with two small dials. */
.dial .bezel { fill: none; stroke: var(--rule); stroke-width: 1; }
.dial .guide { fill: none; stroke: color-mix(in srgb, var(--rule) 60%, transparent); stroke-width: .8; }
.dial .sky circle { fill: var(--moon); }
.dial .rail { fill: none; stroke: var(--rule); stroke-width: .9; }
.dial .ticks-quarter { fill: none; stroke: var(--dim); stroke-width: 8; stroke-dasharray: .8 14.2535; stroke-dashoffset: .4; }
.dial .ticks-hour { fill: none; stroke: var(--mist); stroke-width: 16; stroke-dasharray: 1.6 58.6139; stroke-dashoffset: .8; }
.dial .pearls { fill: none; stroke: var(--dim); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 0 11.781; }
.dial .seconds { display: none; fill: var(--moon); transform-origin: 300px 300px; }
.dial .rays { fill: none; stroke: color-mix(in srgb, var(--rule) 75%, transparent); stroke-width: 54; stroke-dasharray: .6 5.8141; }
.dial text { fill: var(--dim); font-size: 20px; font-weight: 500; font-stretch: 82%; }
.dial .hours text { font-size: 17px; font-variant-numeric: tabular-nums; }
.dial .hours .cardinal { fill: var(--mist); font-weight: 650; }
.dial .hours .side { font-size: 15.5px; }
.dial .sub-face { fill: var(--night-0); stroke: var(--rule); stroke-width: 1; }
.dial .sub-ticks { fill: none; stroke: var(--dim); stroke-width: 4; }
.dial .sub-ticks-count { stroke-dasharray: .5 2.9558; }
.dial .sub-ticks-moon { stroke-dasharray: .7 6.2115; }
.dial .dial-count { fill: var(--lamp); font-size: 34px; font-weight: 740; font-stretch: 80%; font-variant-numeric: tabular-nums; }
.dial .sub-label { font-size: 11.5px; }
.dial .moon-dark { fill: var(--night-2); stroke: var(--rule); stroke-width: .8; }
.dial .moon-lit { fill: var(--moon); }
.dial .moon-star { fill: var(--mist); }
.dial .lead { stroke: var(--dim); stroke-width: 1; }
.dial .dial-time { fill: var(--moon); font-size: 66px; font-weight: 720; font-stretch: 76%; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.dial .dial-state { font-weight: 650; }
.dial .dial-state.is-night { fill: var(--agent); }
.dial .dial-state.is-day { fill: var(--lamp); }
.dial .now path { fill: var(--moon); }
.dial .now-glow { fill: url(#dial-glow); }
.dial .now-bead { fill: var(--night-0); stroke: var(--moon); stroke-width: 3; }
.dial .mark { cursor: pointer; }
.dial .mark .hit { fill: transparent; }
.dial .mark .dot { stroke: var(--night-0); stroke-width: 3; transform-box: fill-box; transform-origin: center; transition: transform .15s; }
.dial .mark.by-agent .dot { fill: var(--agent); }
.dial .mark.by-agent.of-test .dot { fill: var(--test); }
.dial .mark.by-person .dot { fill: var(--lamp); }
/* Each practice has a lane in the sky band, from its first event to its sign-off */
.dial .lane { fill: none; stroke: var(--agent); stroke-width: 6; }
.dial .lane.of-test { stroke: var(--test); }
.dial .mark text { fill: var(--mist); font-variant-numeric: tabular-nums; }
.dial .mark.is-on .dot { transform: scale(1.55); }
.dial .mark.is-on text { fill: var(--moon); }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; font-size: .875rem; color: var(--dim); }
.legend > * { display: inline-flex; align-items: center; gap: .45rem; color: inherit; }
.legend > *::before { content: ""; flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: var(--agent); }
.legend .k-test::before { background: var(--test); }
.legend .k-person::before { background: var(--lamp); }
.legend .k-now::before { background: none; border: 2px solid var(--moon); }
.legend .k-wait::before { background: none; border: 2px solid var(--lamp); }
.legend .k-moon::before { background: linear-gradient(90deg, var(--night-2) 50%, var(--moon) 50%); }
.legend a { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .2em; }
.legend a:hover { color: var(--moon); }
@media (prefers-reduced-motion: no-preference) {
  .dial .sweep { stroke-dasharray: 1570.8; animation: sweep 1.8s cubic-bezier(.3, .1, .2, 1) both; }
  .dial .seconds { display: inline; animation: orbit 60s linear infinite; }
  .dial .lane { stroke-dasharray: 1; animation: draw 1s cubic-bezier(.3, .1, .2, 1) .35s both; }
  .dial .lane.of-test { animation-duration: .75s; animation-delay: .79s; }
  .dial .mark, .nightlog li { animation: arrive .45s ease-out both; animation-delay: calc(.35s + var(--i, 0) * .22s); }
  /* arrival order; set here, not in style attributes, so the content security policy can forbid inline styles */
  [data-i="1"] { --i: 1; } [data-i="2"] { --i: 2; } [data-i="3"] { --i: 3; } [data-i="4"] { --i: 4; } [data-i="5"] { --i: 5; }
}
@keyframes sweep { from { stroke-dashoffset: 1570.8; } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes arrive { from { opacity: 0; } }

/* The example night beside the dial, one column per practice */
.nightlog { grid-area: log; display: grid; gap: 1.1rem; }
.lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1.6rem; align-items: start; }
.lane-col { display: grid; gap: .3rem; align-content: start; }
.lane-col h3 { display: flex; align-items: center; gap: .6rem; font-size: 1.0625rem; font-weight: 680; font-stretch: 94%; line-height: 1.25; color: var(--moon); }
.lane-col h3::before { content: ""; flex: none; width: 1.5rem; height: .34rem; border-radius: 999px; background: var(--agent); }
.lane-col.of-test h3::before { background: var(--test); }
.nightlog ol { display: grid; gap: .15rem; }
.nightlog li, .record li { display: grid; gap: .1rem .7rem; align-items: baseline; }
.nightlog li { grid-template-columns: auto minmax(0, 1fr); align-content: start; margin-inline: -.7rem; padding: .6rem .7rem; border-radius: 10px; transition: background-color .15s; }
.nightlog li > div { display: contents; }
.nightlog li p { grid-column: 1 / -1; }
.record li { grid-template-columns: 4.6rem minmax(0, 1fr); }
.nightlog li.is-on { background: color-mix(in srgb, var(--night-2) 75%, transparent); }
.nightlog time, .record time { font-size: .875rem; font-weight: 600; font-stretch: 82%; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nightlog p, .record p { font-size: .9375rem; line-height: 1.5; color: var(--mist); }
.who { display: block; font-size: .8125rem; font-weight: 650; color: var(--agent); }
.of-test .by-agent .who { color: var(--test); }
.by-person .who { color: var(--lamp); }
.nightlog .by-person p, .record .by-person p { color: var(--moon); }

/* Bands */
.band { padding-block: clamp(4.5rem, 9vw, 8rem); scroll-margin-top: 4rem; }
.flow { display: grid; gap: clamp(3rem, 6vw, 5rem); }
.head { display: grid; gap: 1.4rem; max-width: 58rem; }
.block { display: grid; gap: 1.5rem; min-width: 0; }
.block[id] { scroll-margin-top: 5rem; }   /* a linked block lands below the sticky header */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem clamp(2rem, 5vw, 4.5rem); align-items: start; }
.split-wide-left { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split-wide-right { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

.takes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem clamp(1.5rem, 4vw, 3.5rem); }
.pairs { display: grid; gap: 1.3rem; }
.takes dt, .pairs dt { font-weight: 650; color: var(--moon); }
.takes dd, .pairs dd { margin-top: .25rem; color: var(--mist); font-size: 1rem; }

/* Exhibit: the morning queue */
.exhibit {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
  padding: clamp(1.25rem, 3.2vw, 2.75rem);
  border-radius: 20px;
  background: var(--night-1);
  scroll-margin-top: 5rem;
}
.exhibit-head { display: grid; gap: .6rem; max-width: 44rem; }
.exhibit-head p { color: var(--mist); }
.queue { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem clamp(1.5rem, 3.5vw, 3rem); align-items: start; }
.cards { display: grid; gap: .9rem; }
.card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 1rem 1.5rem;
  align-items: start;
  padding: 1.2rem 1.25rem 1.3rem;
  border-radius: 12px;
  background: var(--night-2);
}
.card-doc { display: grid; gap: .8rem; justify-items: start; }
.card-doc h4 { font-size: 1.125rem; font-weight: 680; font-stretch: 94%; line-height: 1.25; }
.card-doc .fine { color: var(--mist); }
.card-plan { display: grid; gap: .9rem; justify-items: start; }
.proposal { display: grid; gap: .45rem; width: 100%; }
.proposal > div { display: grid; grid-template-columns: 4.4rem minmax(0, 1fr); gap: .6rem; align-items: baseline; }
.proposal dt { font-size: .8125rem; color: var(--dim); }
.proposal dd { font-size: .9375rem; line-height: 1.4; color: var(--moon); min-width: 0; overflow-wrap: anywhere; }
.proposal select { width: 100%; padding: .35rem .5rem; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--night-0); font-size: .9375rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.card.is-done { background: color-mix(in srgb, var(--night-2) 55%, var(--night-1)); }

/* Stamps: the office's own way of saying when and who */
.stamp {
  display: inline-grid;
  justify-items: start;
  width: max-content;
  max-width: 100%;
  padding: .36rem .6rem .3rem;
  border: 2px solid currentColor;
  border-radius: 4px;
  color: var(--agent);
  font: 700 .72rem/1.15 var(--sans);
  font-stretch: 72%;
  letter-spacing: .09em;
  text-transform: uppercase;
  transform: rotate(-2.5deg);
  filter: url(#ink);
}
.stamp b { font-size: 1.05rem; font-weight: 800; letter-spacing: .03em; }
.stamp-lamp { color: var(--lamp); transform: rotate(2.5deg); }
@media (prefers-reduced-motion: no-preference) {
  .approved:not([hidden]) { animation: thud .2s ease-out both; }
}
@keyframes thud { from { opacity: 0; transform: rotate(2.5deg) scale(1.7); } }

.record { display: grid; gap: 1rem; justify-items: start; scroll-margin-top: 5rem; }
.record ol { width: 100%; }
.record ol { display: grid; }
.record li { padding: .7rem 0; border-top: 1px solid var(--rule); }
.record li:last-child { border-bottom: 1px solid var(--rule); }
.record .by-agent time { color: var(--agent); }
.record .by-person time { color: var(--lamp); }

.fieldnote { max-width: 50rem; font-size: clamp(1.25rem, .9vw + 1.05rem, 1.7rem); font-weight: 500; font-stretch: 92%; line-height: 1.38; color: var(--moon); }

/* A real sequence, so it is numbered */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3.5rem); counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 1rem; }
.steps li::before { content: counter(step); grid-column: 1; grid-row: 1 / span 4; font-size: 3.4rem; font-weight: 760; font-stretch: 70%; line-height: .9; color: color-mix(in srgb, var(--agent) 50%, var(--night-0)); }
.steps h4 { font-size: 1.0625rem; font-weight: 650; }
.steps p { margin-top: .25rem; color: var(--mist); font-size: 1rem; }

/* Paper: the documents a test starts and ends with */
.paper {
  position: relative;
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.4rem, 3.2vw, 2.4rem);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.55 var(--serif);
  box-shadow: 0 30px 60px -28px rgb(0 0 0 / .75);
  scroll-margin-top: 5rem;
}
.paper :focus-visible { outline-color: var(--ink); }
.paper h3 { font: 620 1.6rem/1.18 var(--serif); letter-spacing: -.012em; }
.paper h4 { font: 650 .9375rem/1.3 var(--serif); margin-bottom: .3rem; }
.paper .sub { font-size: .9375rem; color: var(--ink-soft); }
.paper strong { font-weight: 650; }
.paper code { font-family: var(--code); font-size: .875em; overflow-wrap: anywhere; }
.paper .stamp { color: var(--ink-test); }
.paper .stamp-lamp { color: var(--ink-amber); }
.clauses { display: grid; counter-reset: clause; }
.clauses li { counter-increment: clause; display: grid; grid-template-columns: 2.1rem minmax(0, 1fr); gap: .5rem; padding: .8rem 0; border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); }
.clauses li::before { content: "\00A7" counter(clause); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem 2.5rem; padding-block: .9rem; border-block: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); }
.facts dt { font-size: .8125rem; color: var(--ink-soft); }
.facts dd { font-weight: 650; }
.repro { display: grid; gap: .3rem; padding-left: 1.3rem; list-style: decimal; }
.stamps { display: flex; flex-wrap: wrap; gap: .9rem 1.4rem; padding-top: .4rem; }
@media (min-width: 901px) {
  .tilt-l { transform: rotate(-.7deg); }
  .tilt-r { transform: rotate(.8deg); }
}

/* Exhibit: the scope gate */
.gate { display: grid; gap: 1.3rem; padding: clamp(1.25rem, 3vw, 2.25rem); border-radius: 20px; background: var(--night-1); scroll-margin-top: 5rem; }
.gate > p { color: var(--mist); }
.gate code { font-family: var(--code); font-size: .9em; color: var(--moon); }
.scope-list { display: grid; gap: .5rem; }
.scope-list > div { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: .75rem; align-items: baseline; }
.scope-list dt { font-size: .875rem; color: var(--dim); }
.scope-list dd { display: flex; flex-wrap: wrap; gap: .2rem 1rem; color: var(--mist); font-size: .9375rem; }
.gate form { display: grid; gap: .7rem; }
.gate label { font-size: .875rem; font-weight: 600; color: var(--mist); }
.gate-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.gate input {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 2.75rem;
  padding: .5rem .8rem;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  background: var(--night-0);
  font: 400 1rem/1.2 var(--code);
}
.presets { display: flex; flex-wrap: wrap; gap: .4rem; }
.presets button { padding: .3rem .65rem; border: 1.5px solid var(--rule); border-radius: 999px; background: none; font: 400 .8125rem/1.3 var(--code); color: var(--mist); cursor: pointer; }
.presets button:hover { border-color: var(--mist); color: var(--moon); }
.verdict { display: grid; gap: .2rem; padding: 1rem 1.1rem; border-radius: 12px; background: var(--night-2); overflow-wrap: anywhere; }
.verdict strong { font-size: 1.25rem; font-weight: 720; font-stretch: 90%; }
.verdict span { color: var(--mist); font-size: .9375rem; }
.verdict[data-state="allowed"] strong { color: var(--ok); }
.verdict[data-state="blocked"] strong { color: var(--stop); }

.gets { display: grid; gap: .85rem; font-size: 1.125rem; line-height: 1.4; color: var(--moon); }
.gets li { padding-left: 1.5rem; background: radial-gradient(circle at .3rem .75rem, var(--lamp) 0 .22rem, transparent .25rem) no-repeat; }

/* How we work */
.rules { display: grid; gap: clamp(1.75rem, 3.5vw, 2.5rem); }
.rules > div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: .5rem clamp(2rem, 5vw, 4.5rem); align-items: baseline; }
.rules dt { font-weight: 700; font-stretch: 90%; font-size: clamp(1.4rem, 1.2vw + 1.05rem, 1.9rem); line-height: 1.15; letter-spacing: -.01em; }
.rules dd { display: grid; gap: .6rem; justify-items: start; color: var(--mist); max-width: 40rem; }

.letter { display: grid; gap: 1.15rem; max-width: 40rem; font-size: clamp(1.0625rem, .4vw + 1rem, 1.2rem); line-height: 1.6; color: var(--mist); }
.letter p:first-child { color: var(--moon); }
.letter .sign { color: var(--moon); font-weight: 650; }
.about-head { display: grid; gap: clamp(1.75rem, 3vw, 2.5rem); justify-items: start; }
.portrait { display: block; width: min(100%, 19rem); height: auto; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--rule); border-radius: 12px; background: var(--night-2); }

/* Dawn, then day */
.dawn {
  position: relative;
  isolation: isolate;
  height: clamp(11rem, 24vw, 19rem);
  background: linear-gradient(180deg, var(--night-0) 0%, var(--dawn-1) 24%, var(--dawn-2) 44%, var(--dawn-3) 61%, var(--dawn-4) 75%, var(--dawn-5) 88%, var(--day) 100%);
}
.day { background: var(--day); color: var(--ink); }
.day :focus-visible { outline-color: var(--ink); }
.day .band { padding-block: clamp(2rem, 4vw, 3.5rem) clamp(4.5rem, 9vw, 7.5rem); }
.day .lede { color: var(--ink-soft); }
.email {
  justify-self: start;
  font-weight: 740;
  font-stretch: 86%;
  font-size: clamp(1.9rem, 4vw + .8rem, 4rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: .06em;
  text-underline-offset: .14em;
  text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent);
  overflow-wrap: anywhere;
}
.email:hover { text-decoration-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn-ink { background: var(--ink); color: var(--day); }
.btn-ink:hover { background: color-mix(in srgb, var(--ink) 86%, var(--dawn-3)); }
.btn-ink-quiet { border-color: color-mix(in srgb, var(--ink) 45%, transparent); color: var(--ink); }
.btn-ink-quiet:hover { border-color: var(--ink); }
.site-footer { padding-block: 2rem 2.5rem; color: var(--ink-soft); font-size: .875rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 2rem; }
.site-footer .wrap::before { content: ""; flex: 0 0 100%; border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); margin-bottom: 1.1rem; }
.site-footer .notes { display: grid; gap: .35rem; max-width: 38rem; text-align: right; }
@media (max-width: 640px) { .site-footer .notes { text-align: left; } }

@media (max-width: 1080px) {
  .takes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "dial" "log"; grid-template-rows: none; }
  .split, .split-wide-left, .split-wide-right, .queue { grid-template-columns: minmax(0, 1fr); }
  .rules > div { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .portrait { width: min(100%, 14rem); }
}
@media (max-width: 640px) {
  .lanes { grid-template-columns: minmax(0, 1fr); }
  .takes { grid-template-columns: minmax(0, 1fr); }
}

/* Pages: the nav marks where you are */
.nav a[aria-current="page"] { color: var(--moon); text-decoration: underline; text-decoration-color: var(--lamp); text-decoration-thickness: 2px; text-underline-offset: .45em; }

/* A practice page opens on a shorter stretch of night, with its own figure
   beside the headline. The figures are drawn by tools/figures.py. */
.page-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; }
.page-head .wrap { padding-block: clamp(3rem, 6vw, 5rem) clamp(3.5rem, 6.5vw, 5.5rem); }
.page-grid .hero-copy { grid-area: auto; }
.page-head .poster { font-size: clamp(2.4rem, 2.7vw + 1.2rem, 4.2rem); }
.crosslinks { max-width: 44rem; color: var(--mist); }
.figure-wrap { display: grid; gap: .9rem; justify-items: center; }
.figure { display: block; width: 100%; max-width: 34rem; height: auto; overflow: visible; font-family: var(--sans); }
.figure text { fill: var(--mist); font-size: 19px; font-weight: 500; font-stretch: 82%; }

/* Figure: the night's mail, carried to a sign-off line */
.routes .sheet { fill: var(--paper); }
.routes .sheet-line { fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.routes .src-name { fill: var(--moon); font-weight: 650; }
.routes .src-time { fill: var(--dim); font-variant-numeric: tabular-nums; }
.routes .route { fill: none; stroke: var(--agent); stroke-width: 2.5; stroke-linecap: round; }
.routes .proposal { fill: none; stroke: var(--agent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: .5 7; }
.routes .proposal.is-off { display: none; }
.routes .filed { display: none; fill: none; stroke: var(--lamp); stroke-width: 3; stroke-linecap: round; }
.routes .filed.is-on { display: inline; }
.routes .gate-line { stroke: var(--lamp); stroke-width: 2; stroke-dasharray: 10 6; }
.routes .gate-name { fill: var(--lamp); font-weight: 700; text-anchor: middle; }
.routes .doc-name { fill: var(--moon); text-anchor: end; }
.routes .wait { fill: var(--night-0); stroke: var(--lamp); stroke-width: 3; }
.routes .wait.is-done { fill: var(--lamp); }
.routes .folder-glyph { fill: none; stroke: var(--dim); stroke-width: 1.5; stroke-linejoin: round; }
.routes .dest-name { fill: var(--dim); }
.routes .dest.is-filed .folder-glyph { fill: var(--lamp); stroke: var(--lamp); }
.routes .dest.is-filed .dest-name { fill: var(--moon); }

/* Figure: the signed scope, as a map */
.scopemap .host-cell { fill: var(--night-2); stroke: var(--test); stroke-width: 1.5; }
.scopemap .host-name { fill: var(--moon); font-family: var(--code); font-size: 18px; font-stretch: 100%; text-anchor: middle; }
.scopemap .finding { fill: var(--lamp); stroke: var(--night-0); stroke-width: 3; }
.scopemap .net-name { fill: var(--mist); font-family: var(--code); font-size: 17px; font-stretch: 100%; }
.scopemap .net-name.is-outside { fill: var(--dim); }
.scopemap .row-label { fill: var(--dim); font-size: 13px; text-anchor: end; font-variant-numeric: tabular-nums; }
.scopemap .cell { fill: color-mix(in srgb, var(--night-2) 80%, transparent); stroke: var(--rule); stroke-width: 1; }
.scopemap .cell.is-host { fill: var(--test); stroke: var(--test); }
/* struck out in the moon color, so it cannot be read as a host the agent found */
.scopemap .cell.is-excluded { fill: none; stroke: var(--moon); stroke-width: 2; }
.scopemap .x-mark { fill: none; stroke: var(--moon); stroke-width: 2; stroke-linecap: round; }
.scopemap .cell.is-outside { fill: none; stroke: var(--dim); stroke-dasharray: 3 3; }
.scopemap .is-probe { stroke-width: 4; }
.scopemap .is-probe.is-allowed { stroke: var(--ok); }
.scopemap .is-probe.is-blocked { stroke: var(--stop); stroke-dasharray: none; }
@media (max-width: 640px) {
  .scopemap .row-label { display: none; }
  .routes text { font-size: 21px; }
}

.legend .k-quiet::before { background: var(--night-2); border: 1px solid var(--rule); }
.legend .k-excluded::before { background: none; border: 2px solid var(--moon); }
.legend .k-out::before { background: none; border: 1.5px dashed var(--dim); }
.legend-cells > *::before { border-radius: 2px; }
.legend-cells .k-person::before { border-radius: 50%; }

@media (prefers-reduced-motion: no-preference) {
  .routes .route { stroke-dasharray: 1; animation: draw 1.1s cubic-bezier(.3, .1, .2, 1) both; animation-delay: calc(.3s + var(--i, 0) * .35s); }
  .routes .proposal, .routes .doc-name, .routes .wait { animation: arrive .45s ease-out both; animation-delay: calc(1.2s + var(--i, 0) * .35s); }
  .routes .filed.is-on { stroke-dasharray: 1; animation: draw .5s ease-out both; }
  .scopemap .host, .scopemap .row { animation: arrive .4s ease-out both; animation-delay: calc(.3s + var(--r, 0) * .07s); }
  /* scan order; set here, not in style attributes, so the content security policy can forbid inline styles */
  [data-r="1"] { --r: 1; } [data-r="2"] { --r: 2; } [data-r="3"] { --r: 3; } [data-r="4"] { --r: 4; }
  [data-r="5"] { --r: 5; } [data-r="6"] { --r: 6; } [data-r="7"] { --r: 7; } [data-r="8"] { --r: 8; }
  [data-r="9"] { --r: 9; } [data-r="10"] { --r: 10; } [data-r="11"] { --r: 11; } [data-r="12"] { --r: 12; }
  [data-r="13"] { --r: 13; } [data-r="14"] { --r: 14; } [data-r="15"] { --r: 15; } [data-r="16"] { --r: 16; }
  [data-r="17"] { --r: 17; }
}
@keyframes draw { from { stroke-dashoffset: 1; } }

/* Home: the two practices, each holding something from the night above */
.doors { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4.5rem clamp(2rem, 5vw, 4.5rem); align-items: start; }
.door { display: grid; gap: clamp(2rem, 3.5vw, 2.75rem); align-content: start; scroll-margin-top: 5rem; }
.door-copy { display: grid; gap: 1.3rem; justify-items: start; }
.door .headline { font-size: clamp(1.8rem, 1.4vw + 1.25rem, 2.6rem); }
.door .card { grid-template-columns: minmax(0, 1fr); }
.card-doc h3 { font-size: 1.125rem; font-weight: 680; font-stretch: 94%; line-height: 1.25; }
@media (max-width: 900px) {
  .doors, .page-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Round 4: answers, roles, timelines, a sample record, a privacy page */
.steps li > * { grid-column: 2; }
.steps.of-test li::before { color: color-mix(in srgb, var(--test) 50%, var(--night-0)); }
.steps .when { margin-top: .15rem; font-size: .875rem; font-weight: 600; color: var(--dim); }
.blurb { max-width: 46rem; color: var(--mist); }

/* Questions, answered: the question on the left, the answer beside it */
.qa { display: grid; }
.qa > div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: .4rem clamp(2rem, 5vw, 4.5rem); align-items: baseline; padding: 1.2rem 0; border-top: 1px solid var(--rule); }
.qa > div:last-child { border-bottom: 1px solid var(--rule); }
.qa dt { font-size: 1.0625rem; font-weight: 650; line-height: 1.35; color: var(--moon); }
.qa dd { max-width: 40rem; color: var(--mist); }
.qa strong { font-weight: 650; color: var(--moon); }

/* Who does what: the agent in its practice color, the operator in lamp amber,
   and what stays with the client as an open mark */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3.5rem); }
.role { display: grid; gap: .9rem; align-content: start; }
.role h4 { display: flex; align-items: center; gap: .6rem; font-size: 1.0625rem; font-weight: 680; font-stretch: 94%; line-height: 1.25; color: var(--moon); }
.role h4::before { content: ""; flex: none; width: 1.5rem; height: .34rem; border-radius: 999px; background: var(--test); }
.role.by-person h4::before { background: var(--lamp); }
.role.by-client h4::before { height: .5rem; background: none; border: 2px solid var(--moon); }
.role ul { display: grid; gap: .6rem; color: var(--mist); }

/* The harness: what code decides, beside the code itself and its own output */
#harness, #approval-gate, #record-chain { scroll-margin-top: 5rem; }
/* Beside a long exhibit the text keeps pace with the code, where the screen is tall enough to hold it. */
@media (min-width: 901px) and (min-height: 940px) { .split-follow > .block { position: sticky; top: 5.5rem; } }
@media (min-width: 901px) { .split-code { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
.source { display: grid; gap: 1rem; min-width: 0; padding: clamp(1.25rem, 3vw, 2.25rem); border-radius: 20px; background: var(--night-1); }
.source-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem 1rem; font-size: .875rem; color: var(--dim); }
.source-head code { font-family: var(--code); color: var(--mist); }
.source pre + .source-head, .source .fine + .source-head { margin-top: .6rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.source pre { margin: 0; padding-bottom: .2rem; overflow-x: auto; font: 400 .8125rem/1.65 var(--code); color: var(--moon); tab-size: 4; }
.source pre code { font: inherit; }
.source pre.term { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--mist); }
.source .cm { color: var(--dim); }
.source .kw { color: var(--test); }
.source .cmd { color: var(--moon); }
.source .no { color: var(--stop); }
.source .ok { color: var(--ok); }
.source .hold { color: var(--lamp); }
.source.of-ops .kw { color: var(--agent); }   /* the AI operations page keeps its agent's blue */
@media (max-width: 640px) { .source pre { font-size: .75rem; } }

/* A sample audit record */
.ledger-wrap { overflow-x: auto; }
.ledger { width: 100%; min-width: 46rem; border-collapse: collapse; font-size: .9375rem; line-height: 1.45; }
.ledger th { padding: 0 1.2rem .6rem 0; border-bottom: 1px solid var(--rule); text-align: left; font-size: .8125rem; font-weight: 600; color: var(--dim); }
.ledger td { padding: .7rem 1.2rem .7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--mist); }
.ledger td:first-child { white-space: nowrap; font-weight: 600; font-stretch: 82%; color: var(--dim); font-variant-numeric: tabular-nums; }
.ledger td.by-agent { color: var(--agent); white-space: nowrap; }
.ledger td.by-person { color: var(--lamp); white-space: nowrap; }

/* Privacy */
.prose { display: grid; gap: 2.5rem; }
.prose > div { display: grid; gap: .8rem; max-width: 44rem; }
.prose p { color: var(--mist); }
@media (max-width: 900px) {
  .qa > div, .roles { grid-template-columns: minmax(0, 1fr); }
}
