/* THE BOOK — izzy's closed-position record.
   Same sheet as the rest of the site: cream stock, ink, one mint accent,
   grain. External stylesheet (not inline like /privacy/) so the
   route can ship a strict CSP with no unsafe-inline. */

@font-face {
  font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/anton-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
}

:root {
  --paper: #ece7db;
  --paper-deep: #e0dac9;
  --ink: #141312;
  --mint: #d9e8cf;
  --muted: #57534b;
  --line: 1.5px solid var(--ink);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --display: "Anton", "Archivo", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pad: clamp(18px, 4vw, 40px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.10'/%3E%3C/svg%3E");
}

/* registration corners, same device as the homepage */

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 20px var(--pad) 0; max-width: 1180px; margin: 0 auto;
}
.brand {
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .1em;
  background: var(--ink); color: var(--paper); text-decoration: none;
  padding: 7px 11px 6px;
}
.back {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--ink); text-decoration: none; border: var(--line); padding: 6px 11px 5px;
  background: var(--paper);
}
.brand:focus-visible, .back:focus-visible, .range:focus-visible {
  outline: 3px solid var(--ink); outline-offset: 2px;
}
.back:hover { background: var(--ink); color: var(--paper); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 30px var(--pad) 90px; }

/* ---------- masthead ---------- */
.head { margin-bottom: 26px; }
.title {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(64px, 11vw, 132px); line-height: .84; letter-spacing: -.015em;
  text-indent: -.04em;
}
.lede {
  font-size: clamp(15px, 1.5vw, 19px); font-weight: 600; margin-top: 14px; max-width: 46ch;
}
.sub {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--muted);
  margin-top: 7px;
}
.rule { display: block; width: clamp(120px, 16vw, 220px); height: 1px; background: var(--ink); opacity: .8; margin-top: 20px; }

/* ---------- range tabs ---------- */
.ranges { display: flex; gap: 8px; margin: 0 0 20px; }
.range {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em;
  padding: 7px 14px 6px; border: var(--line); background: var(--paper); color: var(--ink);
  cursor: pointer;
}
.range.is-on { background: var(--ink); color: var(--paper); }
.range[disabled] { opacity: .45; cursor: default; }

/* ---------- stat cells ---------- */
.stats {
  display: grid; gap: 12px; margin-bottom: 22px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.stat { border: var(--line); background: var(--paper); padding: 13px 14px 12px; }
.stat-k {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .12em;
  color: var(--muted); display: block; margin-bottom: 7px;
}
.stat-v {
  font-family: var(--mono); font-size: clamp(19px, 2.2vw, 26px); font-weight: 700;
  letter-spacing: -.01em; line-height: 1; display: block;
}
.stat-n { font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; color: var(--muted); display: block; margin-top: 7px; }
/* the headline cell earns the second stock + the mint keyline */
.stat--lead { background: var(--paper-deep); box-shadow: inset 0 0 0 3px var(--mint); }
.v-up::before { content: "+"; }
.v-down { color: var(--ink); }

/* ---------- boxes ---------- */
.curvebox, .bookbox { border: var(--line); background: var(--paper); margin-bottom: 22px; }
.boxhead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 14px 11px; border-bottom: var(--line); flex-wrap: wrap;
}
.boxhead h2 { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.boxnote { font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; color: var(--muted); }

.curvehold { padding: 16px 14px 12px; }
.curve { display: block; width: 100%; height: clamp(120px, 20vw, 210px); overflow: visible; }
.curve-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.curve-fill { fill: var(--mint); opacity: .5; }
.curve-zero { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; opacity: .4; vector-effect: non-scaling-stroke; }
.curve-tip { fill: var(--ink); stroke: var(--paper); stroke-width: 1.5; }

/* ---------- the table ---------- */
.tablehold { overflow-x: auto; }
.book { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
.book th, .book td { padding: 9px 14px; text-align: left; white-space: nowrap; }
.book th {
  font-size: 9.5px; font-weight: 700; letter-spacing: .12em; color: var(--muted);
  border-bottom: var(--line);
}
.book td { border-bottom: 1px solid rgba(20, 19, 18, .16); }
.book tbody tr:last-child td { border-bottom: 0; }
.book tbody tr:hover td { background: var(--paper-deep); }
.num { text-align: right; }
.c-mkt { font-weight: 700; }

.side {
  display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .1em;
  border: 1.4px solid var(--ink); padding: 1px 6px;
}
.side--short { background: var(--ink); color: var(--paper); }

/* P&L chip — same grammar as the header strip: mint ring for green,
   solid ink for red, so the two surfaces read as one system */
.pnl { display: inline-block; padding: 1px 7px; border: 1.5px solid var(--ink); font-weight: 700; }
.pnl--up { background: var(--paper); box-shadow: 0 0 0 2px var(--mint); }
.pnl--up::before { content: "+"; }
.pnl--down { background: var(--ink); color: var(--paper); }

.empty { font-family: var(--mono); font-size: 11px; color: var(--muted); padding: 20px 14px; }

.foot { margin-top: 26px; display: grid; gap: 5px; }
.footline { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; color: var(--muted); }
.foot code { font-family: var(--mono); font-size: 10px; word-break: break-all; }

@media (max-width: 640px) {
  .book th, .book td { padding: 8px 10px; }
  .c-held { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .curve-line { stroke-dasharray: var(--len, 0); stroke-dashoffset: var(--len, 0); animation: draw 1.1s cubic-bezier(.2,.8,.2,1) forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* ============================================================
   THE PLATE (2026-08-02) — the book now prints on the shared
   halftone Saturn from /plate.css + /plate.js, the same ground
   as /saturnshop/ and the homepage.
   ============================================================ */

/* The crop marks were dropped from the markup: the plate frames the sheet
   now, and a second layer of print furniture over it read as clutter. */

/* Every block on this page was already a bordered paper card, which is
   exactly the right object to lay on a live plate — they only needed the mint
   sticker offset and cast shadow that the rest of the system uses, so a slip
   reads as sitting ON the print rather than punched into it. */
.stat,
.curvebox,
.bookbox {
  box-shadow: 0 0 0 3px var(--mint, #d9e8cf), 5px 5px 0 var(--ink);
}

/* the header bar is chrome, not a slip — it keeps its flat treatment so the
   page has one clear hierarchy of objects */
.top { position: relative; z-index: 10; }

.wrap { position: relative; z-index: 10; }

/* the closing fine print sat on bare paper; on the plate it needs the same
   backing as the copy it qualifies, or the halftone prints through 12px type */
.foot {
  position: relative;
  background: var(--paper);
  border: var(--line);
  padding: 14px 16px;
}
