/* Reporter — the Ledger direction. Paper ground, Newsreader for text, IBM Plex Mono for anything
   the machine produced, hairline rules instead of boxes. One accent: oxide red. */

:root {
  --paper: #faf7f2;
  --paper-deep: #f5f1e9;
  --card: #ffffff;
  --ink: #191713;
  --ink-soft: #55504a;
  --ink-faint: #7c766e;
  --rule: #ddd5c7;
  --rule-soft: #ece5d8;
  --accent: #8f3a24;
  --accent-deep: #6d2b1a;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --gutter: 72px;
  /* The design is drawn at 1440 with a 72px gutter, so its content is 1296 wide. Past
     that the bands stay full-bleed and the content centres instead of stretching. */
  --measure: 1296px;
  --edge: max(var(--gutter), (100% - var(--measure)) / 2);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); text-decoration: underline; }
a:focus-visible,
button:focus-visible,
.dropzone:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { font-weight: 400; letter-spacing: -0.018em; margin: 0; }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* --- shell ------------------------------------------------------------- */

.page { min-height: 100vh; display: flex; flex-direction: column; }
.band { padding-inline: var(--edge); }

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-block: 14px;
  padding-inline: var(--edge);
  border-bottom: 1px solid var(--rule);
}
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.wordmark:hover { text-decoration: none; }
.wordmark svg { display: block; }
.wordmark-name { font-size: 21px; font-weight: 500; letter-spacing: -0.01em; }
.wordmark-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }

.nav { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.nav a { color: var(--ink-soft); }
.nav a:hover { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--accent); }

/* --- hero -------------------------------------------------------------- */

.hero { padding: 52px var(--edge) 48px; display: flex; flex-direction: column; gap: 18px; }
.hero h1 { font-size: clamp(38px, 4.6vw, 66px); line-height: 1.04; letter-spacing: -0.022em; max-width: 20ch; }
.hero .lead { font-size: clamp(17px, 1.4vw, 18px); color: var(--ink-soft); max-width: 62ch; margin: 0; }

.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 26px;
  font-family: var(--serif);
  font-size: 16px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.btn:hover { text-decoration: none; background: var(--rule-soft); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--paper); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.platforms {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}
.platforms .sep { color: #c9bfad; }

/* --- proof strip ------------------------------------------------------- */

.proof {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-deep);
  padding: 22px var(--edge);
}
.proof-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; align-items: start; }
.claim { display: flex; flex-direction: column; gap: 6px; }
.claim-rule { height: 1px; background: var(--accent); }
.claim-name { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.11em; text-transform: uppercase; padding-top: 2px; }
.claim p { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); }

/* --- capability columns ------------------------------------------------ */

.capabilities { padding: 44px var(--edge) 48px; }
.capability-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; }
.capability { display: flex; flex-direction: column; gap: 12px; }
.capability-index { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--accent); }
.capability-rule { height: 1px; background: var(--ink); }
.capability h3 { margin: 6px 0 0; font-size: 23px; font-weight: 500; line-height: 1.2; }
.capability p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }

/* --- inner pages ------------------------------------------------------- */

.sheet { padding: 48px var(--edge) 72px; flex-grow: 1; }
.sheet-head { display: flex; flex-direction: column; gap: 12px; padding-bottom: 26px; border-bottom: 2px solid var(--ink); }
.sheet-head h1 { font-size: clamp(34px, 3.4vw, 46px); line-height: 1.08; max-width: 22ch; }
.sheet-head .lead { margin: 0; font-size: 18px; color: var(--ink-soft); max-width: 66ch; }

.rows { display: flex; flex-direction: column; }
/* Hide the rows until downloads.js has filled them in, so a visitor never reads a literal
   <version> placeholder. visibility, not display, so the page does not jump when they appear. */
[data-release="pending"] .rows { visibility: hidden; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.row-name { font-family: var(--mono); font-size: 14px; word-break: break-word; }
.row-note { font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.row-size { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); white-space: nowrap; }

.notice {
  border: 1px solid var(--rule);
  background: var(--card);
  padding: 20px 22px;
  margin-top: 28px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.notice strong { color: var(--ink); font-weight: 600; }
.notice code, code.inline { font-family: var(--mono); font-size: 13px; background: var(--rule-soft); padding: 1px 5px; }

/* --- demo -------------------------------------------------------------- */

.demo-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding-top: 34px; align-items: start; }

.dropzone {
  border: 2px dashed #c9bfad;
  background: var(--card);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--paper-deep); }
.dropzone-title { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.dropzone-hint { font-size: 15px; color: var(--ink-soft); max-width: 34ch; margin: 0; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-faint); }
.steps .dot { width: 8px; height: 8px; border: 1px solid #c9bfad; flex-shrink: 0; }
.steps li.done { color: var(--ink); }
.steps li.done .dot { background: var(--accent); border-color: var(--accent); }
.steps li.active { color: var(--ink); }
.steps li.active .dot { border-color: var(--accent); }

.facts { display: flex; flex-direction: column; gap: 0; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--ink-faint); }
.facts dd { margin: 0; font-size: 15px; }

.result-frame { width: 100%; height: 460px; border: 1px solid var(--rule); background: var(--card); }
.panel { display: flex; flex-direction: column; gap: 18px; }
.panel h2 { font-size: 25px; font-weight: 500; }

.refusal { border-left: 3px solid var(--accent); background: var(--card); padding: 16px 18px; }
.refusal-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.refusal p { margin: 6px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); }

[hidden] { display: none !important; }

/* --- footer ------------------------------------------------------------ */

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 20px;
  padding-inline: var(--edge);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* --- narrow ------------------------------------------------------------ */

@media (max-width: 1100px) {
  :root { --gutter: 40px; }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .proof-grid { grid-template-columns: 1fr; gap: 20px; }
  .demo-layout { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  body { font-size: 17px; }
  .masthead { padding-block: 12px; }
  .nav { gap: 18px; font-size: 14px; }
  .hero { padding: 32px var(--edge) 30px; }
  .capability-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 8px; align-items: start; }
  .btn { width: 100%; }
  .actions { gap: 10px; }
}

/* --- code ---------------------------------------------------------------
   Hand-marked rather than highlighted by a script: the snippet is three lines,
   and a dependency-free page suits a dependency-free product. */

.code-block { margin-top: 16px; }
.code-caption {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 8px;
}
pre.code {
  margin: 0;
  padding: 22px 24px;
  /* A dark plate on the paper page. The ground is the ink tone lifted a little, so it stays in
     the same warm family rather than reading as a pasted-in black box. */
  background: #1a1814;
  border: 1px solid #1a1814;
  border-left: 3px solid #c2603f;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 2;
  color: #e8e2d6;
  tab-size: 2;
}
pre.code code { font: inherit; background: none; padding: 0; color: inherit; }
.code .type { color: #e0906f; }
.code .call { color: #f4efe4; font-weight: 500; }
.code .str { color: #a8bf8a; }
.code .var { color: #cfc7b6; }
.code .kw { color: #b9a3d4; }
.code .pun { color: #8a8175; }
.code .com { color: #7d766a; font-style: italic; }
.code .flag { color: #e0906f; }
.code .cmd { color: #f4efe4; font-weight: 500; }
/* JSON. A key names a field, so it takes the same accent as a type; a number gets the one
   warm tone the palette was still missing. Strings, punctuation and true/false/null reuse
   .str, .pun and .kw unchanged. */
.code .key { color: #e0906f; }
.code .num { color: #d6a15c; }
.code-block + .code-block { margin-top: 26px; }
.beyond { padding-top: 46px; }
.beyond h2 { font-size: 28px; font-weight: 500; margin: 0 0 10px; }
.beyond .lead { margin: 0 0 6px; font-size: 17px; color: var(--ink-soft); max-width: 70ch; }
