/* Carried over from the Housing demo (Oct 5, 2026): one reading column, civic blue, Newsreader + IBM Plex. */
:root {
  --bg: #f3f5f4;
  --surface: #ffffff;
  --ink: #18242a;
  --muted: #5a6a70;
  --line: #d5dddb;
  --accent: #1d5f8a;      /* civic blue */
  --accent-soft: #dbe8f1;
  --fill-a: #1d5f8a;      /* spent or committed */
  --fill-b: #8fb6d1;      /* sold, not yet spent */
  --fill-c: #e3e9e8;      /* not yet sold */
  --warn: #8a5a12;
  --warn-soft: #f6ead2;
  --ok: #2c6b45;
  --ok-soft: #dcefe2;
  --shadow: 0 10px 30px rgb(16 32 40 / 0.14);
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11181b; --surface: #182226; --ink: #e4ebea; --muted: #9aabb0; --line: #2c3a3f;
    --accent: #7fb3d9; --accent-soft: #1f3442; --fill-a: #7fb3d9; --fill-b: #3d6683; --fill-c: #26343a;
    --warn: #e5b765; --warn-soft: #3a2e17; --ok: #7cc79a; --ok-soft: #1c3527;
    --shadow: 0 10px 30px rgb(0 0 0 / 0.5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11181b; --surface: #182226; --ink: #e4ebea; --muted: #9aabb0; --line: #2c3a3f;
  --accent: #7fb3d9; --accent-soft: #1f3442; --fill-a: #7fb3d9; --fill-b: #3d6683; --fill-c: #26343a;
  --warn: #e5b765; --warn-soft: #3a2e17; --ok: #7cc79a; --ok-soft: #1c3527;
  --shadow: 0 10px 30px rgb(0 0 0 / 0.5); color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.6; }
.wrap { max-width: 760px; margin: 0 auto; padding-inline: 16px; padding-block: 24px 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }
p { margin: 0; }
a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.eyebrow { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.stack-lg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.num { font-variant-numeric: tabular-nums; }
.small { font-size: 0.85rem; color: var(--muted); }
ul.stack { padding-left: 1.2rem; margin: 0; }

.site-nav a { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); text-decoration: none; }

.notice { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 10px 14px; font-size: 0.9rem; }
.notice strong { color: var(--warn); }

/* Long write-up prose */
.prose { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.prose h3 { margin-top: 18px; }
.entry + .entry { border-top: 2px solid var(--ink); padding-top: 28px; }

/* Citations: the figure itself is the link */
a.cite {
  color: inherit;
  text-decoration: underline dotted var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  border-radius: 2px;
  cursor: pointer;
}
a.cite:hover, a.cite[aria-expanded="true"] { background: var(--accent-soft); text-decoration-style: solid; }
.cite-pop {
  position: absolute; z-index: 10;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
  padding: 14px 16px; font-size: 0.88rem; line-height: 1.5;
  display: grid; gap: 10px;
}
.cite-pop[hidden] { display: none; }
.cite-pop .cp-claim { font-weight: 500; }
.cite-pop blockquote { margin: 0; padding-left: 10px; border-left: 2px solid var(--line); color: var(--muted); font-style: italic; }
.cite-pop .cp-src a { font-weight: 500; }
.cite-pop .cp-meta { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.cite-pop .cp-meta .ok { color: var(--ok); }
.cite-pop hr { border: 0; border-top: 1px solid var(--line); margin: 2px 0; width: 100%; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
tbody tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 600; border-top: 1px solid var(--line); border-bottom: 0; }

/* Claims appendix */
.appendix { border-top: 1px solid var(--line); padding-top: 14px; }
.appendix summary { cursor: pointer; font-weight: 500; }
.appendix > * + * { margin-top: 12px; }
.claims { font-size: 0.82rem; }
.claims td.id { font-family: var(--mono); color: var(--muted); white-space: nowrap; }
.claims td.quote { font-style: italic; color: var(--muted); min-width: 14rem; }
.claims td:nth-child(3) { min-width: 12rem; }
.claims td.checked { font-family: var(--mono); font-size: 0.72rem; white-space: nowrap; color: var(--ok); }
.claims tr.unchecked td.checked, .claims tr.open td.checked { color: var(--warn); }
.claims tr.retired td { text-decoration: line-through; color: var(--muted); }
.claims tr.retired td.checked { text-decoration: none; }
.claims tr:target td { background: var(--accent-soft); }
.type { font-family: var(--mono); font-size: 0.68rem; padding: 1px 6px; border-radius: 99px; border: 1px solid var(--accent); color: var(--accent); white-space: nowrap; font-style: normal; }

/* Short write-up (web version of the issue) */
.email { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.email-body { padding: 24px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.series-tag { display: inline-block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); padding: 3px 8px; border-radius: 3px; }
.bond-line { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.9rem; color: var(--muted); }
.pill { font-family: var(--mono); font-size: 0.75rem; padding: 2px 8px; border-radius: 99px; border: 1px solid currentColor; color: var(--ok); background: var(--ok-soft); }
.bar-block { display: grid; gap: 8px; }
.bar { display: flex; height: 18px; border-radius: 3px; overflow: hidden; background: var(--fill-c); }
.bar > div { height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.82rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.watch { border-left: 3px solid var(--accent); padding-left: 14px; display: grid; gap: 4px; font-size: 0.95rem; }
.readmore { font-weight: 500; }

footer { font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
@media (max-width: 480px) { h1 { font-size: 1.7rem; } .email-body { padding: 20px 16px; } }
