/* blog.css - the journal, on the front page's system.
 *
 * Loaded after front.css and adds to it rather than replacing it: same black ground, same one
 * family at one weight, same hairlines, same 4 to 8px radii. A journal that looked like a
 * different product would undo the argument the front page spends a screen making.
 *
 * The one thing that changes is measure. The front page is a poster and runs to 1600px; an
 * article is read, so the column is capped near 68 characters and everything else is arranged
 * around that.
 */

/* The front page's nav is absolutely positioned over a black hero. Here it is a normal row at
   the top of the document, which is also why there is no padding compensating for it. */
body.blog .nav { position: static; padding: 1.4rem 4vw; }
/* Narrower than the front page's 1100. The front page is a poster and wants the room; an
   article's column is capped near 68 characters whatever the container does, so a wide
   container only moves the text away from the centre of the screen. */
body.blog .wrap-narrow { width: min(960px, 92vw); }

/* ── the head of an article ──────────────────────────────────────────────── */
.art-head { padding: 1rem 0 2.4rem; border-bottom: 1px solid var(--border); margin-bottom: 2.4rem; }
.art-head .label { display: block; margin-bottom: 0.9rem; }
.art-head h1 { max-width: 20ch; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.dek { color: var(--muted); font-size: 1.125rem; max-width: 60ch; margin-top: 1.1rem; }
.art-meta { display: flex; flex-wrap: wrap; gap: 0 1.4rem; color: var(--slate); margin-top: 1.4rem; }

/* The statistics strip. Four numbers the article then has to earn, which is the right order:
   a reader who does not want the argument still leaves with the figures. */
.art-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; margin-bottom: 2.6rem;
}
.art-stats > div { background: var(--black); padding: 1.1rem 1.1rem 1.3rem; display: grid; gap: 0.35rem; align-content: start; }
.art-stats b { font-weight: 400; font-size: 1.75rem; letter-spacing: -0.03em; line-height: 1; }
.art-stats span { color: var(--slate); font-size: 0.8125rem; line-height: 1.35; }
@media (max-width: 900px) { .art-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .art-stats { grid-template-columns: 1fr; } }

/* ── the body ────────────────────────────────────────────────────────────── */
.lead { font-size: 1.1875rem; line-height: 1.55; max-width: 68ch; color: var(--white); }
.art-section { margin-top: 2.8rem; }
.art-section h2 { font-size: clamp(1.5rem, 3vw, 1.95rem); margin-bottom: 1rem; max-width: 24ch; }
.art-section p { color: var(--muted); max-width: 68ch; line-height: 1.65; }
.art-section p + p { margin-top: 1rem; }

blockquote {
  margin: 1.8rem 0 0; padding: 0 0 0 1.4rem;
  border-left: 2px solid var(--white);
  font-size: 1.3rem; line-height: 1.3; letter-spacing: -0.02em; max-width: 34ch;
}

.callout { margin: 1.8rem 0 0; border: 1px solid var(--border); border-radius: 8px; padding: 1.2rem 1.3rem 1.4rem; }
.callout-t { color: var(--white); font-size: 1rem; margin-bottom: 0.75rem; }
.callout ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.callout li { color: var(--muted); font-size: 0.9375rem; padding-left: 1.1rem; position: relative; line-height: 1.55; }
.callout li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 5px; height: 1px; background: var(--slate); }
/* A warning gets a lighter edge rather than a colour. Nothing on this site is coloured, and a
   single accent introduced here would be the loudest thing on the page. */
.callout-warning { border-color: var(--slate); }
.callout-warning .callout-t::before { content: "Watch out: "; color: var(--slate); }

/* ── figures ─────────────────────────────────────────────────────────────── */
.figure { margin: 3rem 0 0; border: 1px solid var(--border); border-radius: 8px; padding: 1.3rem 1.3rem 1.5rem; }
.fig-head { display: grid; gap: 0.5rem; margin-bottom: 1.2rem; }
.fig-head b { font-weight: 400; font-size: 1.0625rem; letter-spacing: -0.01em; }
/* The plot scrolls inside its own box rather than pushing the page sideways. At 760 units wide
   the labels stay readable instead of collapsing to three characters on a phone. */
.fig-plot { overflow-x: auto; }
.fig-plot svg { display: block; width: 100%; min-width: 460px; height: auto; }
.fig-note { color: var(--slate); font-size: 0.8125rem; line-height: 1.5; margin-top: 1.1rem; max-width: 76ch; }

.fig-plot .d-label { fill: var(--white); font-size: 14px; }
.fig-plot .d-sub { fill: var(--slate); font-size: 11.5px; }
.fig-plot .d-value { fill: var(--white); font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.fig-plot .d-track { fill: var(--surface); }
.fig-plot .d-bar { fill: var(--white); }
.fig-plot .d-spine { stroke: var(--border); stroke-width: 1; }
.fig-plot .d-node { fill: var(--black); stroke: var(--border); stroke-width: 1; }
.fig-plot .d-node-n { fill: var(--slate); font-size: 11.5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ── takeaways and sources ───────────────────────────────────────────────── */
.takeaways { list-style: none; counter-reset: t; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.takeaways li {
  counter-increment: t; position: relative; padding-left: 2.6rem;
  color: var(--muted); max-width: 68ch; line-height: 1.6;
}
.takeaways li::before {
  content: counter(t, decimal-leading-zero); position: absolute; left: 0; top: 0.15em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem; color: var(--slate);
}
.sources { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--border); }
.sources .label { display: block; margin-bottom: 0.9rem; }
.sources ol { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.5rem; }
.sources li { color: var(--slate); font-size: 0.9375rem; }
/* Wrapped rather than truncated: a source you cannot read the domain of is a source you cannot
   judge, and these are the article's evidence. */
.sources a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.sources a:hover { color: var(--white); }

/* ── the index ───────────────────────────────────────────────────────────── */
/* No top border: the head above it already ends on a hairline, and two of them with a
   gap between reads as an empty first row. */
.journal { list-style: none; margin: 0; padding: 0; }
.journal li { border-bottom: 1px solid var(--border); }
.journal a {
  display: grid; grid-template-columns: 9rem 1fr; gap: 0.3rem 1.6rem;
  padding: 1.6rem 0; transition: background 0.15s ease;
}
.journal a:hover { background: var(--surface); }
.journal .jr-cat { grid-row: 1 / 3; }
.journal .jr-t { font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.15; }
.journal .jr-d { color: var(--slate); font-size: 0.9375rem; max-width: 62ch; }
.journal .jr-m { grid-column: 2; color: var(--slate); margin-top: 0.4rem; }
@media (max-width: 700px) {
  .journal a { grid-template-columns: 1fr; }
  .journal .jr-cat { grid-row: auto; }
  .journal .jr-m { grid-column: 1; }
}

.blog .close { border-top: 1px solid var(--border); margin-top: 5rem; }
