/* Praetor site: shared tokens and parts.
   Paper pages use the cool paper palette. Dark panels use the app's Midnight theme. */
:root {
  --paper: #F4F5F3;
  --paper-2: #E8EBE7;
  --card: #FFFFFF;
  --ink: #16181D;
  --grey: #59606A;
  --rule: #D3D7D2;
  --red: #C4372B;

  /* the app's Midnight theme */
  --d-bg: #0B1220;
  --d-panel: #0F172A;
  --d-raised: #1E293B;
  --d-term: #020617;
  --d-line: #334155;
  --d-text: #CBD5E1;
  --d-mute: #94A3B8;
  --d-red: #F0685A;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}
a { color: inherit; text-underline-offset: 3px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.015em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(34px, 8.6vw, 60px); }
h2 { font-size: clamp(27px, 6vw, 40px); }
h3 { font-size: 18px; font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.mute { color: var(--grey); }
.label { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--grey); }

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px; }
.wordmark { font-family: var(--mono); font-weight: 600; font-size: 19px; text-decoration: none; letter-spacing: -0.02em; }
.wordmark i { font-style: normal; color: var(--red); }
.ver { font-family: var(--mono); font-size: 12.5px; color: var(--grey); }

/* the signature: a typeset rule sheet with one struck line */
.sheet {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 22px 20px;
  font-family: var(--mono);
  font-size: 14.5px;
  line-height: 1.6;
}
.sheet .head { color: var(--grey); font-size: 12.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--rule); }
.sheet ul { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sheet li { padding-left: 1.4em; text-indent: -1.4em; overflow-wrap: anywhere; }
.sheet li::before { content: "– "; color: var(--grey); }
.sheet .tail { margin-top: 12px; }
.struck { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--rule); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.struck s { color: var(--red); text-decoration-thickness: 2px; overflow-wrap: anywhere; font-size: 15px; }
.refused { font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: var(--red); padding: 2px 8px; border-radius: 3px; text-decoration: none; }

/* dark product panel */
.panel {
  background: var(--d-term);
  color: var(--d-text);
  border: 1px solid var(--d-line);
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.55;
}
.panel .bar { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--d-panel); border-bottom: 1px solid var(--d-line); color: var(--d-mute); font-size: 12px; }
.panel .row { padding: 14px 16px; border-bottom: 1px solid var(--d-raised); display: flex; flex-direction: column; gap: 6px; }
.panel .row:last-of-type { border-bottom: 0; }
.panel .cmd { color: var(--d-text); overflow-wrap: anywhere; }
.panel .cmd::before { content: "$ "; color: var(--d-mute); }
.panel .why { color: var(--d-red); overflow-wrap: anywhere; }
.panel .note { padding: 12px 16px; background: var(--d-panel); border-top: 1px solid var(--d-line); color: var(--d-mute); font-family: var(--sans); font-size: 13px; }

/* install: the one primary action */
.install { display: flex; flex-direction: column; gap: 8px; }
.install .cmdline { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #F4F5F3; border-radius: 6px; padding: 14px 16px; font-family: var(--mono); font-size: 14px; overflow-x: auto; white-space: nowrap; }
.install .cmdline::before { content: "$"; color: #8A919B; }
.install small { font-size: 13px; color: var(--grey); }

/* placeholders: things still to capture or decide */
.todo { border: 1.5px dashed var(--grey); border-radius: 6px; padding: 16px; font-size: 14px; color: var(--grey); display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.todo b { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.todo.shot { aspect-ratio: 16 / 10; text-align: center; align-items: center; }
mark.ph { background: none; color: inherit; border-bottom: 1.5px dashed currentColor; }

/* sections */
.sec { padding-block: 56px; }
.sec.alt { background: var(--paper-2); }
.sec-head { display: flex; flex-direction: column; gap: 12px; max-width: 62ch; margin-bottom: 28px; }

/* evidence: the dated list of fixes */
.fixes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.fixes li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.fixes time { font-family: var(--mono); font-size: 13px; color: var(--grey); }
.fixes p { max-width: 68ch; }

/* scope note, set like the rule sheet */
.scope { font-family: var(--mono); font-size: clamp(18px, 4.6vw, 26px); line-height: 1.45; letter-spacing: -0.01em; }
.scope span { display: block; }

/* three steps */
.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.steps > div { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--ink); padding-top: 14px; }
.steps .n { font-family: var(--mono); font-size: 13px; color: var(--grey); }

/* numbers */
.nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.nums .v { font-family: var(--serif); font-size: clamp(32px, 8vw, 46px); line-height: 1.05; font-variant-numeric: tabular-nums; }
.nums .d { font-size: 14.5px; color: var(--grey); }

/* terms */
.terms { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.terms div { display: flex; flex-direction: column; gap: 6px; }

footer.foot { border-top: 1px solid var(--rule); padding-block: 28px 44px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; color: var(--grey); }
footer.foot a { color: var(--ink); }

@media (min-width: 820px) {
  body { font-size: 18px; }
  .wrap { padding-inline: 32px; }
  .sec { padding-block: 88px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .terms { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .nums { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fixes li { grid-template-columns: 150px minmax(0, 1fr); gap: 24px; }
  footer.foot { flex-direction: row; justify-content: space-between; }
  .sheet { padding: 28px; font-size: 15.5px; }
}

/* dark page variant (the control room): same parts, Midnight colours, red still the only accent */
body.dark {
  background: var(--d-bg);
  color: var(--d-text);
  --paper-2: #0F172A;
  --card: #0F172A;
  --ink: #E2E8F0;
  --grey: #94A3B8;
  --rule: #334155;
  --red: #F0685A;
}
body.dark h1, body.dark h2, body.dark h3 { color: #F1F5F9; }
body.dark .refused { color: #0B1220; }
body.dark .install .cmdline { background: var(--d-term); color: var(--d-text); border: 1px solid var(--d-line); }
body.dark .todo b { color: var(--d-text); }
