/* Fonts, served from devcops.app (SIL Open Font License, see fonts/): latin subsets of variable fonts. */
@font-face { font-family: "Big Shoulders Display"; src: url("fonts/big-shoulders-display-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Big Shoulders Stencil Display"; src: url("fonts/big-shoulders-stencil-display-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* Layout: a patrol case file. A header strip, a two-column hero (the claim beside the officer), then a
   1120px column: the example review as one framed exhibit with its rubber stamps, the procedure as a
   numbered sequence on a band, the squad, the ground rules as a two-column ledger, the config beside its
   notes, a field-report table, and the install steps. Ink outlines and hard shadows come from the logo's
   line art and are kept for the exhibit, the posted comments and the config file. */
:root {
  /* Palette, from the logo's own fills */
  --ink: #0c0d12;
  --navy: #233266;
  --uniform: #5e7ae6;
  --periwinkle: #91a4eb;
  --binary: #1dccd0;
  --badge: #c8862b;
  /* The same in both themes: the logo always sits on a light badge, the terminal is always dark. */
  --avatar-bg: #e9edfd;
  --terminal-bg: #0c0d12;
  --terminal-text: #e7eafb;

  /* Type */
  --font-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --font-stamp: "Big Shoulders Stencil Display", "Big Shoulders Display", Impact, sans-serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Theme: light */
  --bg: #f3f5fd;
  --surface: #ffffff;
  --band: #e8ecfb;
  --text: #13162c;
  --muted: #4c5478;
  --rule: #c9d0ee;
  --outline: #0c0d12;
  --accent: #3550cf;
  --accent-ink: #ffffff;
  --spot: #dfe5fc;
  --code-text: #1c2142;
  --code-key: #3550cf;
  --code-str: #0b7f84;
  --code-num: #9a5b12;
  --code-comment: #6a7196;
  --line-mark: #e2e8fd;
  --verified: #2847c4;
  --refuted: #c1323e;
  --gold: #9a6418;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1130;
    --surface: #151a3f;
    --band: #111639;
    --text: #e7eafb;
    --muted: #a6aedb;
    --rule: #2b3266;
    --outline: #03040a;
    --accent: #91a4eb;
    --accent-ink: #0c0d12;
    --spot: #1d2457;
    --code-text: #dfe4fb;
    --code-key: #a9b8f5;
    --code-str: #1dccd0;
    --code-num: #e2a85a;
    --code-comment: #8790c2;
    --line-mark: #1f2758;
    --verified: #9aabf7;
    --refuted: #ff7a82;
    --gold: #e0a24a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1130;
  --surface: #151a3f;
  --band: #111639;
  --text: #e7eafb;
  --muted: #a6aedb;
  --rule: #2b3266;
  --outline: #03040a;
  --accent: #91a4eb;
  --accent-ink: #0c0d12;
  --spot: #1d2457;
  --code-text: #dfe4fb;
  --code-key: #a9b8f5;
  --code-str: #1dccd0;
  --code-num: #e2a85a;
  --code-comment: #8790c2;
  --line-mark: #1f2758;
  --verified: #9aabf7;
  --refuted: #ff7a82;
  --gold: #e0a24a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--binary); outline-offset: 3px; border-radius: 4px; }
p, ul, ol, dl, dd, figure, pre, h1, h2, h3, h4 { margin: 0; }
code { font-family: var(--font-mono); font-size: .86em; }
h1, h2, h3 { font-family: var(--font-display); line-height: .98; text-wrap: balance; letter-spacing: .005em; }
h1 { font-size: clamp(3.1rem, 7.2vw, 5.8rem); font-weight: 900; }
h2 { font-size: clamp(2.3rem, 4.6vw, 3.5rem); font-weight: 800; }
h3 { font-size: 1.55rem; font-weight: 800; line-height: 1.05; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
}
.wrap {
  max-width: calc(1120px + 2 * max(16px, env(safe-area-inset-left, 0px)));
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-head { display: grid; gap: 14px; max-width: 46rem; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head .intro { color: var(--muted); max-width: 62ch; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: .02em;
  line-height: 1;
  padding: .62em 1.15em;
  border: 2.5px solid var(--outline);
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 4px 4px 0 var(--outline);
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--outline); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--outline); }
.btn.secondary { background: var(--surface); color: var(--text); }
.btn.small { font-size: 1.05rem; padding: .5em .9em; box-shadow: 3px 3px 0 var(--outline); }

/* Header */
.site-header { border-bottom: 2px solid var(--outline); background: var(--surface); }
.bar { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand .mark { width: 40px; height: 40px; }
.brand span { font-family: var(--font-display); font-weight: 900; font-size: 1.7rem; letter-spacing: .01em; }
.bar nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.bar nav a { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); text-decoration: none; }
.bar nav a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 820px) { .bar nav { display: none; } .bar .btn { margin-left: auto; } }

/* Hero */
.hero { padding-block: clamp(48px, 7vw, 88px) clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 22px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.hero .eyebrow::before {
  content: "";
  width: 12px;
  height: 14px;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}
.lead { font-size: 1.2rem; line-height: 1.55; max-width: 36rem; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--binary); }
.officer { position: relative; display: grid; place-items: center; }
.officer::before {
  content: "";
  position: absolute;
  width: min(100%, 440px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--spot);
  border: 2px solid var(--rule);
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
}
.officer svg { position: relative; width: min(100%, 400px); height: auto; aspect-ratio: 424.56 / 555.12; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .officer { max-width: 300px; margin-inline: auto; order: -1; }
}

/* Exhibit: the example review */
.exhibit { border-top: 2px solid var(--outline); }
.panel { background: var(--surface); border: 2.5px solid var(--outline); border-radius: 14px; box-shadow: 7px 7px 0 var(--outline); }
.lineup { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); overflow: hidden; }
.hunk { position: relative; border-right: 2px solid var(--outline); min-width: 0; background: var(--surface); }
.hunk-file {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 2px solid var(--outline);
  font-family: var(--font-mono);
  font-size: .78rem;
  background: var(--band);
}
.hunk-file .range { color: var(--muted); }
.hunk pre { overflow-x: auto; padding-block: 10px; font-family: var(--font-mono); font-size: .84rem; line-height: 1.85; color: var(--code-text); white-space: normal; }
/* One grid row per line, as wide as the longest line, so a marked line's band spans the whole scroll. */
.hunk code { display: grid; width: max-content; min-width: 100%; font-size: inherit; }
.hunk .line { display: grid; grid-template-columns: 3.2em 2.6em 1.2em max-content; padding-right: 18px; white-space: pre; }
.hunk .n { color: var(--code-comment); text-align: right; padding-right: .7em; font-variant-numeric: tabular-nums; }
.hunk .tag-cell { font-weight: 600; text-align: center; }
.hunk .plus { color: var(--code-comment); }
.hunk .line.marked { background: var(--line-mark); }
.hunk .line.marked.refuted .tag-cell { color: var(--refuted); }
.hunk .line.marked.verified .tag-cell { color: var(--verified); }
.hunk .k { color: var(--code-key); font-weight: 600; }
.hunk .num { color: var(--code-num); }
.hunk .c { color: var(--code-comment); font-style: italic; }
.hunk::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 56px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--binary) 28%, transparent), transparent);
  opacity: 0;
}
.suspects { list-style: none; padding: 18px; display: grid; gap: 14px; align-content: start; background: var(--band); }
.suspect {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px 16px 14px;
  background: var(--surface);
  border: 2px solid var(--outline);
  border-radius: 10px;
}
.suspect-head { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: .74rem; color: var(--muted); padding-right: 96px; }
.suspect-head .tag {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid currentColor;
  font-weight: 600;
}
.suspect.verified .tag { color: var(--verified); }
.suspect.refuted .tag { color: var(--refuted); }
.suspect .claim { font-size: .98rem; line-height: 1.45; }
.suspect .verdict { font-size: .86rem; color: var(--muted); }
.suspect.refuted .claim { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--refuted); color: var(--muted); }
.stamp {
  position: absolute;
  top: 8px;
  right: 12px;
  font-family: var(--font-stamp);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  padding: .32em .5em .26em;
  border: 2.5px solid currentColor;
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 3.5px currentColor;
  transform: rotate(-8deg);
  opacity: .9;
}
.suspect.verified .stamp { color: var(--verified); }
.suspect.refuted .stamp { color: var(--refuted); }
@media (max-width: 860px) {
  .lineup { grid-template-columns: minmax(0, 1fr); }
  .hunk { border-right: 0; border-bottom: 2px solid var(--outline); }
}

/* What lands on the pull request */
.outcome { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 40px; align-items: start; }
.outcome-label { grid-column: 1 / -1; }
.posted { display: grid; gap: 12px; padding: 18px 20px; font-size: .95rem; }
.posted header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .86rem; color: var(--muted); }
.posted header strong { color: var(--text); }
.posted .avatar { width: 30px; height: 30px; border-radius: 8px; background: var(--avatar-bg); border: 1.5px solid var(--outline); padding: 2px; }
.posted .bot { font-family: var(--font-mono); font-size: .68rem; border: 1px solid var(--rule); border-radius: 999px; padding: 0 7px; }
.posted h4 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; }
.posted .sub { font-size: .8rem; color: var(--muted); }
.posted ul { padding-left: 1.1em; }
.posted .fix strong, .posted .severity strong { font-weight: 700; }
@media (max-width: 760px) { .outcome { grid-template-columns: minmax(0, 1fr); } }

/* Procedure */
.band { background: var(--band); border-block: 2px solid var(--outline); }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 36px; counter-reset: step; }
.steps li { display: grid; gap: 10px; align-content: start; counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent);
}
.steps p { color: var(--muted); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Squad */
.squad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.officer-card { display: grid; gap: 10px; align-content: start; padding-top: 18px; border-top: 2.5px solid var(--outline); }
.officer-card .duty { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 600; }
.officer-card p { color: var(--muted); font-size: .96rem; }
@media (max-width: 960px) { .squad { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .squad { grid-template-columns: minmax(0, 1fr); } }

/* Ground rules */
.ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.ledger div { display: grid; gap: 6px; padding-block: 22px; border-bottom: 1.5px solid var(--rule); }
.ledger dt { font-weight: 700; font-size: 1.08rem; }
.ledger dd { color: var(--muted); }
@media (max-width: 760px) { .ledger { grid-template-columns: minmax(0, 1fr); } }

/* Config */
.config { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.yaml { overflow: hidden; }
.yaml .hunk-file { border-radius: 12px 12px 0 0; }
.yaml pre { overflow-x: auto; padding: 16px 20px; font-family: var(--font-mono); font-size: .84rem; line-height: 1.75; color: var(--code-text); }
.yaml .key { color: var(--code-key); font-weight: 600; }
.yaml .str { color: var(--code-str); }
.yaml .c { color: var(--code-comment); font-style: italic; }
.notes { display: grid; gap: 22px; }
.notes div { display: grid; gap: 6px; }
.notes h3 { font-size: 1.35rem; }
.notes p { color: var(--muted); }
@media (max-width: 860px) { .config { grid-template-columns: minmax(0, 1fr); } }

/* Field report */
.table-wrap { overflow-x: auto; border: 2px solid var(--outline); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 560px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1.5px solid var(--rule); }
th { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; background: var(--band); border-bottom: 2px solid var(--outline); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
td.size { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; }
td .note { display: block; font-family: var(--font-body); font-weight: 400; font-size: .78rem; color: var(--muted); }
.footnote { margin-top: 18px; color: var(--muted); font-size: .92rem; max-width: 72ch; }

/* Install */
.install { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.install ol { padding-left: 1.3em; display: grid; gap: 14px; }
.install ol li::marker { font-family: var(--font-display); font-weight: 900; color: var(--accent); }
.install .actions { margin-top: 26px; }
.terminal { display: grid; gap: 12px; }
.terminal pre { overflow-x: auto; padding: 16px 18px; background: var(--terminal-bg); color: var(--terminal-text); border: 2.5px solid var(--outline); border-radius: 12px; font-family: var(--font-mono); font-size: .84rem; line-height: 1.7; }
.terminal pre .prompt { color: var(--binary); user-select: none; }
.terminal p { color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .install { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
.site-footer { border-top: 2px solid var(--outline); background: var(--surface); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding-block: 26px; }
.footer-row .brand .mark { width: 32px; height: 32px; }
.footer-row .brand span { font-size: 1.35rem; }
.footer-row p { color: var(--muted); font-size: .9rem; }
.footer-row nav { display: flex; gap: 18px; margin-left: auto; }
.footer-row nav a { font-family: var(--font-mono); font-size: .8rem; }
.binary { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .18em; color: var(--code-str); padding-bottom: 22px; overflow-wrap: anywhere; }

/* The cross-examination: plays once when the exhibit comes into view. At rest every element is final. */
@media (prefers-reduced-motion: no-preference) {
  .lineup.play .hunk::after { animation: scan 1.1s ease-in-out .15s both; }
  .lineup.play .stamp { animation: thump .45s cubic-bezier(.2, .9, .3, 1.35) both; }
  .lineup.play .suspect:nth-child(1) .stamp { animation-delay: 1.2s; }
  .lineup.play .suspect:nth-child(2) .stamp { animation-delay: 1.55s; }
  .lineup.play .suspect:nth-child(3) .stamp { animation-delay: 1.9s; }
  .lineup.play .suspect.refuted .claim { animation: strike .5s ease 1.4s both; }
}
@keyframes scan { from { top: 0; opacity: 1; } 85% { opacity: 1; } to { top: calc(100% - 56px); opacity: 0; } }
@keyframes thump {
  from { transform: rotate(-16deg) scale(1.9); opacity: .25; }
  65% { transform: rotate(-7deg) scale(.95); opacity: .95; }
  to { transform: rotate(-8deg) scale(1); opacity: .9; }
}
@keyframes strike { from { text-decoration-color: transparent; } to { text-decoration-color: var(--refuted); } }

/* The logo's sprite: defined once, drawn by <use>. */
.sprite { position: absolute; }
