/* Froth Watch: one stylesheet for every page of froth.watch.
   Tokens and the issue components come from the issue 1 web design (docs/report-2026-10-23.html).
   Fonts are self-hosted (OFL): Archivo for display, IBM Plex Sans for text, IBM Plex Mono for data. */

/* ------------------------------------------------------------------ fonts */
@font-face { font-family: "Archivo"; src: url(/assets/fonts/archivo-var.woff2) format("woff2-variations"), url(/assets/fonts/archivo-var.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/assets/fonts/plex-sans-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/assets/fonts/plex-sans-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/assets/fonts/plex-sans-500-normal.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/assets/fonts/plex-sans-600-normal.woff2) format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/assets/fonts/plex-mono-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/assets/fonts/plex-mono-500-normal.woff2) format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }

/* ----------------------------------------------------------------- tokens */
:root {
  --bg: #f4f6f4;
  --bg-2: #e9efeb;
  --surface: #ffffff;
  --fg: #142019;
  --fg-2: #2c3b33;
  --muted: #56655d;
  --line: #d6ded9;
  --grid: #e3e8e4;
  --accent: #17694c;
  --accent-strong: #0f5139;
  --accent-wash: #e2efe8;
  --on-accent: #ffffff;
  --band: #0f2a20;
  --band-2: #173a2d;
  --band-fg: #eaf3ee;
  --band-muted: #9fc2b1;
  --band-line: rgba(159, 194, 177, 0.24);
  --foam: #c9f0dc;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --good: #0ca30c; --warn: #fab219; --crit: #d03b3b;
  --good-wash: rgba(12, 163, 12, 0.13); --warn-wash: rgba(250, 178, 25, 0.22); --crit-wash: rgba(208, 59, 59, 0.15);
  --todo: #8a5a00; --todo-wash: #fff4d6;
  --shadow: 0 1px 2px rgba(15, 42, 32, 0.06), 0 10px 30px -12px rgba(15, 42, 32, 0.18);
  --radius: 10px;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: 1180px;
  --col: 800px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1310; --bg-2: #111a15; --surface: #151d19; --fg: #e3eae6; --fg-2: #c6d1cb; --muted: #9aaaa1; --line: #29362f; --grid: #222d27;
    --accent: #4cc392; --accent-strong: #74d8ac; --accent-wash: #173528; --on-accent: #08170f;
    --band: #0a1f17; --band-2: #12301f; --band-fg: #e3f0e9; --band-muted: #86b19c; --band-line: rgba(134, 177, 156, 0.22); --foam: #a8e8c6;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --good-wash: rgba(12, 163, 12, 0.22); --warn-wash: rgba(250, 178, 25, 0.22); --crit-wash: rgba(208, 59, 59, 0.26);
    --todo: #ffd27a; --todo-wash: #2a2513;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1310; --bg-2: #111a15; --surface: #151d19; --fg: #e3eae6; --fg-2: #c6d1cb; --muted: #9aaaa1; --line: #29362f; --grid: #222d27;
  --accent: #4cc392; --accent-strong: #74d8ac; --accent-wash: #173528; --on-accent: #08170f;
  --band: #0a1f17; --band-2: #12301f; --band-fg: #e3f0e9; --band-muted: #86b19c; --band-line: rgba(134, 177, 156, 0.22); --foam: #a8e8c6;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --good-wash: rgba(12, 163, 12, 0.22); --warn-wash: rgba(250, 178, 25, 0.22); --crit-wash: rgba(208, 59, 59, 0.26);
  --todo: #ffd27a; --todo-wash: #2a2513;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
@media (max-width: 560px) { body { font-size: 16px; } }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.on-band :focus-visible, .site-head :focus-visible, .site-foot :focus-visible { outline-color: var(--foam); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0; font-weight: 800; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.8rem); letter-spacing: -0.012em; }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.005em; }
p { margin: 0 0 14px; }
p, li { text-wrap: pretty; }
.eyebrow { font-family: var(--mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.col { max-width: var(--col); margin: 0 auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--foam); color: var(--band); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }
.todo { display: inline-block; font-family: var(--mono); font-size: 0.82em; color: var(--todo); background: var(--todo-wash); border: 1px dashed currentColor; border-radius: 4px; padding: 0 6px; }
.site-foot .todo { color: #ffd27a; background: rgba(250, 178, 25, 0.12); }

/* Theme toggle icons: the sun shows in dark mode and the moon in light mode. */
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* ----------------------------------------------------------------- header */
.site-head { background: var(--band); color: var(--band-fg); position: relative; z-index: 5; border-bottom: 1px solid var(--band-line); }
.site-head::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--band); z-index: 20; }
.site-head .bar { display: flex; align-items: center; gap: 14px 22px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--band-fg); text-decoration: none; margin-right: auto; }
.brand:hover { color: #fff; }
.brand .mark { width: 30px; height: 30px; flex: none; display: block; color: var(--foam); }
.wordmark { font-family: var(--display); font-weight: 800; font-stretch: 125%; text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.02rem; line-height: 1; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--band-muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; padding: 8px 10px; border-radius: 6px; }
.nav a:hover { color: var(--band-fg); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] { color: var(--band-fg); box-shadow: inset 0 -2px 0 var(--foam); border-radius: 0; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--band-line); background: transparent; color: var(--band-fg); cursor: pointer; padding: 0; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.07); }
.icon-btn svg { width: 18px; height: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent; font: 600 0.95rem/1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-foam { background: var(--foam); color: var(--band); }
.btn-foam:hover { background: #fff; color: var(--band); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.site-head .btn { height: 38px; padding: 0 14px; font-size: 0.88rem; }
.no-js .theme-toggle { display: none; }
@media (max-width: 720px) {
  .site-head .bar { padding-block: 10px 0; min-height: 0; gap: 8px; }
  .nav { order: 3; width: 100%; margin: 0 -10px; overflow-x: auto; scrollbar-width: none; }
  .nav a { padding: 10px; font-size: 0.88rem; }
  .wordmark { font-size: 0.92rem; }
  .brand .mark { width: 26px; height: 26px; }
}

/* ------------------------------------------------------- bands and froth */
.band { background: var(--band); color: var(--band-fg); position: relative; isolation: isolate; overflow: hidden; }
.band a:not(.btn) { color: var(--foam); }
.band .eyebrow { color: var(--band-muted); }
.art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
/* Owner's art keeps its subject (the right-hand side) in view when a phone crops it. */
.art img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; display: block; }
.art svg.froth { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--foam); }
.art.scrim::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--band) 0%, color-mix(in srgb, var(--band) 82%, transparent) 38%, color-mix(in srgb, var(--band) 10%, transparent) 78%); }
@media (max-width: 760px) { .art.scrim::after { background: linear-gradient(180deg, color-mix(in srgb, var(--band) 30%, transparent) 0%, color-mix(in srgb, var(--band) 88%, transparent) 55%, var(--band) 100%); } }

/* ------------------------------------------------------------------- home */
.hero { padding-block: clamp(56px, 10vw, 128px) clamp(44px, 7vw, 84px); }
.hero .kicker { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 18px; }
.hero .kicker span + span::before { content: "·"; margin-right: 14px; color: var(--band-muted); }
.nameplate { font-family: var(--display); font-weight: 800; font-stretch: 125%; text-transform: uppercase; font-size: clamp(2.5rem, 8.4vw, 6.4rem); line-height: 0.9; letter-spacing: -0.012em; color: var(--band-fg); margin: 0; }
.nameplate .w2 { display: block; color: transparent; -webkit-text-stroke: 2px var(--foam); }
.hero .lede { font-size: clamp(1.12rem, 2.1vw, 1.38rem); line-height: 1.45; max-width: 34ch; margin: 22px 0 30px; color: var(--band-fg); }
.hero .lede b { color: var(--foam); font-weight: 500; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: end; } }
.hero-latest { justify-self: end; width: 100%; max-width: 420px; background: color-mix(in srgb, var(--band) 72%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid var(--band-line); border-radius: 12px; padding: 18px 20px; }
.hero-latest .eyebrow { display: flex; justify-content: space-between; gap: 10px; }
.hero-latest h2 { font-size: 1.18rem; line-height: 1.25; margin: 8px 0 10px; font-weight: 700; }
.hero-latest h2 a { color: var(--band-fg); text-decoration: none; }
.hero-latest h2 a:hover { text-decoration: underline; }
.hero-latest p { color: var(--band-muted); font-size: 0.92rem; margin: 0 0 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--warn); color: #1b1404; white-space: nowrap; }
.badge-soft { background: var(--accent-wash); color: var(--accent); }
.arrow-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.arrow-link svg { width: 16px; height: 16px; transition: transform 0.15s ease; }
.arrow-link:hover svg { transform: translateX(3px); }

.section { padding-block: clamp(48px, 7vw, 84px); }
.section + .section { padding-top: 0; }
.section-head { display: grid; gap: 6px; margin-bottom: 22px; }
.section-head .more { justify-self: start; margin-top: 4px; }
@media (min-width: 760px) { .section-head.split { grid-template-columns: 1fr auto; align-items: end; } .section-head.split .more { justify-self: end; } }
.alt { background: var(--bg-2); }

/* Latest issue feature */
.feature { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.feature .text { padding: clamp(22px, 3.2vw, 36px); display: flex; flex-direction: column; gap: 4px; }
.feature .text h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.15; font-weight: 800; letter-spacing: -0.015em; margin: 8px 0 14px; }
.feature .text h3 a { color: var(--fg); text-decoration: none; }
.feature .text h3 a:hover { color: var(--accent); }
.feature .meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.feature .lead { font-size: 1.06rem; color: var(--fg-2); }
.feature .points { list-style: none; padding: 0; margin: 4px 0 18px; display: grid; gap: 10px; }
.feature .points li { font-size: 0.95rem; color: var(--fg-2); display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline; }
.feature .cta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.feature .panel { background: var(--band); color: var(--band-fg); padding: clamp(20px, 2.6vw, 28px); position: relative; isolation: isolate; overflow: hidden; }
.feature .panel h4 { font-size: 1rem; font-weight: 700; margin: 6px 0 4px; }
.feature .panel p.cap { font-size: 0.8rem; color: var(--band-muted); margin: 0 0 14px; }
@media (max-width: 880px) { .feature { grid-template-columns: 1fr; } }
.read { display: inline-flex; gap: 8px; align-items: baseline; font-family: var(--mono); font-size: 0.78rem; line-height: 1.45; background: var(--accent-wash); color: var(--accent); padding: 5px 11px; border-radius: 12px; }
.band .read { background: rgba(201, 240, 220, 0.1); color: var(--foam); }

/* Layer strip: twelve layers, five ratings each */
.strip .rows { display: grid; gap: 7px; }
.strip .srow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.strip .sname { font-size: 0.86rem; color: var(--band-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .segs { display: flex; gap: 3px; flex: none; }
.strip .seg { width: 18px; height: 14px; border-radius: 2px; }
.strip .skey { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.74rem; color: var(--band-muted); margin-top: 14px; }
.strip .skey i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.strip .dims { display: flex; justify-content: flex-end; gap: 3px; font-family: var(--mono); font-size: 0.58rem; color: var(--band-muted); margin-bottom: 6px; }
.strip .dims span { width: 18px; text-align: center; }
.strip.wide .rows { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 7px 32px; }
@media (max-width: 760px) { .strip.wide .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(6, auto); } }
@media (max-width: 520px) { .strip.wide .rows { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; gap: 6px; } }
.c-crit { background: #d03b3b; } .c-warn { background: #fab219; } .c-good { background: #0ca30c; }
.c-na { background: transparent; box-shadow: inset 0 0 0 1px var(--band-muted); opacity: 0.6; }

/* Tiles with sparklines */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; align-content: start; min-width: 0; }
.tile .label { font-size: 0.82rem; color: var(--muted); }
.tile .value { font-family: var(--display); font-stretch: 100%; font-size: 1.62rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.tile .delta { font-size: 0.84rem; color: var(--fg-2); }
.tile .src { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); margin-top: 4px; }
.tile svg { width: 100%; height: 38px; display: block; margin-top: 8px; overflow: visible; }
.spark-area { fill: var(--accent); fill-opacity: 0.1; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }

/* Probability rows */
.prob { display: grid; gap: 16px; }
.prow { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: start; }
.qid { font-family: var(--mono); font-size: 0.8rem; font-weight: 500; color: var(--accent); background: var(--accent-wash); border-radius: 4px; text-align: center; padding: 2px 0; }
.prow .q { font-size: 0.97rem; margin-bottom: 6px; }
.hz { display: grid; grid-template-columns: 52px minmax(0, 1fr) 160px; gap: 10px; align-items: center; font-size: 0.84rem; margin-top: 4px; }
.hz .h { font-family: var(--mono); color: var(--muted); font-size: 0.72rem; }
.track { position: relative; height: 12px; background: var(--grid); border-radius: 6px; overflow: hidden; }
.fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 6px; }
.tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--surface); opacity: 0.9; }
.hz .v { font-variant-numeric: tabular-nums; }
.hz .v b { font-weight: 600; }
.why { font-size: 0.86rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 560px) { .hz { grid-template-columns: 44px minmax(0, 1fr); } .hz .v { grid-column: 2; } }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 22px 20px; display: grid; gap: 10px; align-content: start; }
.step .icon { width: 56px; height: 56px; border-radius: 14px; background: var(--accent-wash); display: grid; place-items: center; color: var(--accent); }
.step .icon img, .step .icon svg { width: 34px; height: 34px; }
.step .n { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.1em; }
.step h3 { font-size: 1.15rem; }
.step p { font-size: 0.95rem; color: var(--fg-2); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Issue list (home and archive) */
.issue-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.issue-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px 28px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.issue-row .when { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); display: grid; gap: 4px; }
.issue-row .when b { color: var(--fg); font-weight: 500; }
.issue-row h3 { font-size: 1.22rem; line-height: 1.25; margin-bottom: 6px; }
.issue-row h3 a { color: var(--fg); text-decoration: none; }
.issue-row h3 a:hover { color: var(--accent); text-decoration: underline; }
.issue-row p { margin: 0; color: var(--fg-2); font-size: 0.95rem; }
.issue-row .go { align-self: center; }
@media (max-width: 720px) { .issue-row { grid-template-columns: 1fr; } .issue-row .go { display: none; } }
.empty { border: 1px dashed var(--line); border-radius: 12px; padding: 28px; text-align: center; color: var(--muted); }

/* Sign-up form */
.signup { display: grid; gap: 10px; max-width: 540px; }
.signup .row { display: flex; gap: 8px; }
.signup label.lbl { font-size: 0.86rem; font-weight: 500; }
.signup input[type="email"] { flex: 1; min-width: 0; height: 50px; padding: 0 15px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 400 1rem var(--body); }
.signup input[type="email"]::placeholder { color: var(--muted); opacity: 1; }
.signup input[type="email"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.signup button { height: 50px; }
.signup .fine { font-size: 0.82rem; color: var(--muted); margin: 0; }
.signup .fine a { color: inherit; }
.signup .msg { display: none; gap: 10px; align-items: flex-start; font-size: 0.93rem; line-height: 1.45; padding: 12px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); }
.signup .msg svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.signup .msg b { display: block; }
.signup[data-state="error"] .msg-error, .signup[data-state="soon"] .msg-soon, .signup[data-state="success"] .msg-success, .signup[data-state="failed"] .msg-failed { display: flex; }
.signup[data-state="error"] input[type="email"] { border-color: var(--crit); box-shadow: 0 0 0 1px var(--crit); }
.signup[data-state="success"] .row, .signup[data-state="soon"] .row { opacity: 0.55; }
.signup .msg-error { border-color: color-mix(in srgb, var(--crit) 50%, transparent); background: var(--crit-wash); }
.signup .msg-error svg { color: var(--crit); }
.signup .msg-success svg, .signup .msg-soon svg { color: var(--accent); }
.signup .msg-failed svg { color: var(--s2); }
.signup.on-band label.lbl { color: var(--band-fg); }
.signup.on-band input[type="email"] { background: rgba(255, 255, 255, 0.07); border-color: color-mix(in srgb, var(--foam) 38%, transparent); color: var(--band-fg); }
.signup.on-band input[type="email"]::placeholder { color: var(--band-muted); }
.signup.on-band input[type="email"]:focus-visible { outline-color: var(--foam); }
.signup.on-band .fine { color: var(--band-muted); }
.signup.on-band .msg { background: rgba(10, 20, 15, 0.55); border-color: var(--band-line); color: var(--band-fg); }
.signup.on-band .msg-error { background: rgba(208, 59, 59, 0.2); border-color: rgba(255, 140, 140, 0.45); }
.signup.on-band .msg-error svg { color: #ff9c9c; }
.signup.on-band .msg-success svg, .signup.on-band .msg-soon svg { color: var(--foam); }
@media (max-width: 340px) { .signup .row { flex-direction: column; } .signup input[type="email"] { flex: none; } .signup button { width: 100%; } }

/* Sign-up call to action band */
.cta-band { padding-block: clamp(48px, 7vw, 80px); }
.cta-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 56px; align-items: center; }
.cta-grid h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-stretch: 112%; letter-spacing: -0.02em; }
.cta-grid p { color: var(--band-muted); margin: 12px 0 0; max-width: 42ch; }
.cta-grid ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; color: var(--band-fg); font-size: 0.95rem; }
.cta-grid li { display: flex; gap: 10px; align-items: baseline; }
.cta-grid li svg { width: 14px; height: 14px; color: var(--foam); flex: none; transform: translateY(2px); }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------- page mastheads */
.page-mast { padding-block: clamp(44px, 7vw, 88px) clamp(32px, 5vw, 56px); }
.page-mast h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-stretch: 112%; letter-spacing: -0.022em; line-height: 1.02; margin: 10px 0 0; }
.page-mast .dek { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--band-muted); max-width: 52ch; margin: 16px 0 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--band-muted); }
.crumbs a { color: var(--band-muted); text-decoration: none; }
.crumbs a:hover { color: var(--foam); text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: 0.6; }

/* ------------------------------------------------------------ prose pages */
.prose { max-width: 720px; margin: 0 auto; padding-block: clamp(36px, 6vw, 64px); }
.prose h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin: 44px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { margin: 26px 0 8px; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--accent); }
.prose .lead { font-size: 1.15rem; color: var(--fg-2); }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0 0 18px; }
.prose dt { font-family: var(--mono); font-size: 0.82rem; color: var(--accent); padding-top: 3px; }
.prose dd { margin: 0; }
@media (max-width: 560px) { .prose dl { grid-template-columns: 1fr; gap: 2px; } .prose dd { margin-bottom: 10px; } }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 22px; }
.callout p:last-child { margin: 0; }
.qlist { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.qlist li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: baseline; margin: 0; }
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 8px 0 18px; }
.scale div { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 0.86rem; }
.scale b { display: block; font-family: var(--mono); font-weight: 500; color: var(--accent); font-size: 0.8rem; }
@media (max-width: 640px) { .scale { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --------------------------------------------------------------- not found */
.lost { min-height: min(72vh, 680px); display: grid; align-items: center; padding-block: 64px; }
.lost .big { font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: clamp(5rem, 22vw, 13rem); line-height: 0.85; color: transparent; -webkit-text-stroke: 2px var(--foam); letter-spacing: -0.03em; }
.lost h1 { font-size: clamp(1.8rem, 4.6vw, 3rem); font-stretch: 112%; margin: 18px 0 12px; }
.lost p { color: var(--band-muted); max-width: 46ch; }
.lost .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.lost .btn-ghost { color: var(--band-fg); border-color: var(--band-line); }
.lost .btn-ghost:hover { color: var(--foam); border-color: var(--foam); }

/* ------------------------------------------------------------------ footer */
.site-foot { background: var(--band); color: var(--band-muted); font-size: 0.9rem; border-top: 1px solid var(--band-line); padding-block: 48px max(40px, env(safe-area-inset-bottom, 0px)); }
.site-foot a { color: var(--band-fg); text-decoration: none; }
.site-foot a:hover { color: var(--foam); text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.foot-grid h2 { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--band-muted); margin: 0 0 10px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-grid .brand { margin-bottom: 12px; }
.foot-grid p { margin: 0 0 8px; max-width: 42ch; }
.foot-legal { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--band-line); display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.8rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ============================================================== issue pages */
.issue-mast { padding-block: clamp(36px, 6vw, 64px) 30px; }
.issue-mast h1 { font-size: clamp(1.9rem, 4.6vw, 3.2rem); font-stretch: 106%; letter-spacing: -0.02em; line-height: 1.06; margin: 14px 0 0; max-width: 24ch; }
.issue-mast .meta-line { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 14px; }
.issue-mast .dek { color: var(--band-muted); font-size: 1.08rem; max-width: 60ch; margin: 14px 0 0; }
.issue-mast .strip-wrap { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--band-line); }
.issue-mast .strip-wrap .cap { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.05em; color: var(--band-muted); margin-bottom: 12px; text-transform: uppercase; }
.sample-note { margin-top: 18px; display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--band-fg); background: rgba(250, 178, 25, 0.1); border: 1px solid rgba(250, 178, 25, 0.35); border-radius: 10px; padding: 12px 14px; max-width: 760px; }
.sample-note svg { width: 18px; height: 18px; color: var(--warn); flex: none; margin-top: 2px; }
.issue-layout { display: grid; grid-template-columns: minmax(0, var(--col)); justify-content: center; gap: 0 56px; }
@media (min-width: 1180px) { .issue-layout { grid-template-columns: 200px minmax(0, var(--col)); } }
.toc-rail { display: none; }
@media (min-width: 1180px) {
  .toc-rail { display: block; position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow: auto; padding-top: 40px; }
  .toc-mobile { display: none; }
}
.toc-rail h2, .toc-mobile summary { font-family: var(--mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.toc-rail ol, .toc-mobile ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc-rail a, .toc-mobile a { display: grid; grid-template-columns: 26px 1fr; padding: 5px 8px; margin-left: -8px; border-radius: 6px; font-size: 0.86rem; line-height: 1.3; color: var(--fg-2); text-decoration: none; }
.toc-rail a::before, .toc-mobile a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 0.7rem; color: var(--muted); padding-top: 2px; }
.toc-rail a:hover, .toc-mobile a:hover { background: var(--accent-wash); color: var(--accent); }
.toc-mobile { margin: 24px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.toc-mobile summary { cursor: pointer; list-style-position: outside; }
.toc-mobile[open] { padding-bottom: 14px; }

.issue-body { counter-reset: sec; padding-bottom: 24px; }
.issue-body section { padding-block: 44px 6px; scroll-margin-top: 16px; }
.issue-body section > header { margin-bottom: 16px; display: grid; gap: 6px; }
.issue-body section > header .eyebrow::before { counter-increment: sec; content: counter(sec, decimal-leading-zero) "  ·  "; white-space: pre; color: var(--accent); }
.issue-body section > header .eyebrow:empty::before { content: counter(sec, decimal-leading-zero); }
.issue-body section > header h2 { font-size: clamp(1.4rem, 2.6vw, 1.72rem); }
.lead { font-size: 1.12rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.brief { border-left: 4px solid var(--accent); }
.brief p:last-child { margin: 0; }

/* Heatmap */
.heat { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 0.8rem; }
.heat th { font-family: var(--mono); font-weight: 500; font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 4px; text-align: center; }
.heat th.l { text-align: left; }
.heat td { padding: 6px 6px; border-radius: 4px; text-align: center; white-space: nowrap; }
.heat td.l { text-align: left; background: transparent; white-space: normal; }
.heat td.na { color: var(--muted); background: var(--grid); }
.heat td.crit { background: var(--crit-wash); } .heat td.warn { background: var(--warn-wash); } .heat td.good { background: var(--good-wash); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.dot.crit { background: #d03b3b; } .dot.warn { background: #fab219; } .dot.good { background: #0ca30c; }
.scroll { overflow-x: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.8rem; color: var(--muted); align-items: center; margin-top: 8px; }
.key { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: 3px; }
.sq { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* Stories */
.stories { display: grid; gap: 14px; }
.story { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; align-items: start; }
.story h3 { margin-bottom: 6px; }
.story p { font-size: 0.95rem; margin-bottom: 8px; }
.story .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 0.78rem; color: var(--muted); }
.story svg { width: 100%; height: auto; display: block; }
.story .mini-cap { font-family: var(--mono); font-size: 0.64rem; color: var(--muted); margin-top: 4px; }
@media (max-width: 640px) { .story { grid-template-columns: 1fr; } }
.status { display: inline-block; font-family: var(--mono); font-size: 0.68rem; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.st-confirmed { color: var(--accent); } .st-corroborated { color: var(--s1); } .st-reported { color: var(--muted); }
.tag { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }
.src a { font-size: 0.78rem; }

/* Figures */
figure { margin: 0; }
figure.card svg { width: 100%; height: auto; display: block; }
figcaption { font-size: 0.86rem; color: var(--muted); margin-top: 10px; }
figcaption b { color: var(--fg); font-weight: 600; }
.ax { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); }
.lbl { font-family: var(--body); font-size: 12px; fill: var(--fg); }
.lbl-b { font-family: var(--body); font-size: 12px; font-weight: 600; fill: var(--fg); }
.gridl { stroke: var(--grid); stroke-width: 1; }
.base { stroke: var(--muted); stroke-width: 1; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 680px) { .two { grid-template-columns: 1fr; } }

/* Tables */
.tw { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.t th, table.t td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t th { font-family: var(--mono); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
table.t tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; font-family: var(--mono); font-size: 0.68rem; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.p-crit { background: var(--crit-wash); color: var(--fg); } .p-warn { background: var(--warn-wash); color: var(--fg); } .p-good { background: var(--good-wash); color: var(--fg); }

/* Wins, blindspots, bull and bear */
.wins { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.win { border-top: 4px solid var(--s1); font-size: 0.92rem; display: flex; flex-direction: column; gap: 8px; }
.win p { margin: 0; }
.win-h { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.win-h h3 { margin: 0; }
.win .score { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.win .caveat { color: var(--muted); font-size: 0.86rem; }
.win .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 0.78rem; color: var(--muted); margin-top: auto; }
@media (max-width: 760px) { .wins { grid-template-columns: 1fr; } }
.side { display: inline-block; font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 7px; border-radius: 3px; color: #fff; margin-right: 6px; vertical-align: 1px; }
.s-growth { background: #2369be; } .s-risk { background: #c04e1d; } .s-neutral { background: var(--muted); }
:root[data-theme="dark"] .side { color: #0d1310; } :root[data-theme="dark"] .s-growth { background: #6ea8ef; } :root[data-theme="dark"] .s-risk { background: #f08a5d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .side { color: #0d1310; } :root:not([data-theme="light"]) .s-growth { background: #6ea8ef; } :root:not([data-theme="light"]) .s-risk { background: #f08a5d; } }
.cov { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 0.8rem; }
.cov-h { color: var(--muted); margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.cov-h b { color: var(--fg); font-weight: 600; margin-right: 4px; }
.cov-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; margin-bottom: 7px; }
.cov-bar span { display: block; min-width: 4px; }
.c-growth { background: var(--s1); } .c-risk { background: var(--s2); } .c-neutral { background: var(--grid); outline: 1px solid var(--line); outline-offset: -1px; }
.cov-heads { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cov-heads li { line-height: 1.35; }
.cov-heads .side { margin-right: 6px; }
.cov-heads .outlet { color: var(--muted); white-space: nowrap; }
.balance { margin-bottom: 14px; }
.balance h3 { margin-bottom: 8px; }
.balance .cov-bar { height: 12px; }
.balance p { margin: 6px 0 0; font-size: 0.92rem; }
.bsg { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bs-col h3 { margin-bottom: 2px; } .bs-col > .why { margin: 0 0 10px; }
.bs-growth { border-top: 4px solid var(--s1); } .bs-risk { border-top: 4px solid var(--s2); }
.bs { padding: 10px 0; border-top: 1px solid var(--line); }
.bs-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bs-h h4 { margin: 0 0 4px; font-size: 0.95rem; }
.bs p { font-size: 0.88rem; margin: 0 0 6px; }
.bs-meta { font-size: 0.76rem; color: var(--muted); }
.p-strength { background: var(--grid); color: var(--fg); }
.outlets { margin-top: 14px; font-size: 0.88rem; }
.outlets h3 { margin-bottom: 6px; } .outlets ul { margin: 0; padding-left: 1.1em; } .outlets li { margin-bottom: 4px; }
@media (max-width: 760px) { .bsg { grid-template-columns: 1fr; } }
.bb { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bb .card h3 { margin-bottom: 8px; }
.bb .card { font-size: 0.92rem; }
.bb .card ul { padding-left: 1.1em; margin: 0 0 10px; }
.bb .card li { margin-bottom: 6px; }
.bb .bull { border-top: 4px solid var(--s1); } .bb .bear { border-top: 4px solid var(--s2); }
@media (max-width: 680px) { .bb { grid-template-columns: 1fr; } }

/* Calendar */
.cal { display: grid; gap: 12px; }
.ev { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: start; }
.ev .d { font-family: var(--mono); font-size: 0.8rem; background: var(--accent-wash); color: var(--accent); border-radius: 4px; padding: 6px 8px; text-align: center; }
.ev .w { font-size: 0.86rem; color: var(--muted); }
.ev .w b { color: var(--fg); font-weight: 600; }

/* End matter: method notes, and the prose of a weekly web edition */
.endnotes { margin-top: 36px; padding-top: 28px; border-top: 2px solid var(--fg); font-size: 0.9rem; color: var(--fg-2); }
.endnotes h2 { font-size: 1.05rem; margin: 22px 0 8px; }
.endnotes h2:first-child { margin-top: 0; }
.endnotes ul { padding-left: 1.1em; }
.endnotes li { margin-bottom: 4px; }
.md p, .md li { font-size: 1rem; }
.md h3 { margin: 22px 0 8px; }
.md ul, .md ol { padding-left: 1.2em; }
.md li { margin-bottom: 6px; }
.md blockquote { margin: 0 0 14px; padding: 4px 14px; border-left: 3px solid var(--line); color: var(--fg-2); }
.md .tw { margin: 0 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.md td.st-red, .md td.st-amber, .md td.st-green { font-weight: 500; }
.md td.st-red { background: var(--crit-wash); } .md td.st-amber { background: var(--warn-wash); } .md td.st-green { background: var(--good-wash); }
.md sup.sid { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); white-space: nowrap; vertical-align: 0.35em; line-height: 0; }
.md figure.card { margin: 0; }
.md .figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin: 0 0 16px; }
.chart-area { fill: var(--accent); fill-opacity: 0.1; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }

#tip { position: fixed; z-index: 30; pointer-events: none; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; font-size: 0.8rem; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14); max-width: 260px; }
#tip strong { display: block; font-size: 0.95rem; }
#tip .row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }

/* Previous and next issue */
.issue-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.issue-nav a { display: grid; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--fg); }
.issue-nav a:hover { border-color: var(--accent); }
.issue-nav a span { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.issue-nav .next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .issue-nav { grid-template-columns: 1fr; } .issue-nav .next { grid-column: 1; text-align: left; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

@media print {
  .site-head .nav, .head-actions, .signup, .cta-band, .toc-rail, .toc-mobile, .issue-nav, .skip { display: none !important; }
  .band, .site-foot { background: #fff !important; color: #000 !important; }
  .art { display: none; }
  body { background: #fff; }
}
