/* jackivison.co.uk. One stylesheet, no JavaScript.
   Set like a printed report: a white page, black type and rules, big numbers, no boxes or shadows.
   Orange is only for what something went to (the "after" in a number or chart) and the one solid contact block.
   Colours, type and widths are set once in :root. */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/poppins-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/poppins-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/poppins-latin-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/poppins-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Space Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/space-mono-latin-400.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --fg: #111111;
  --fg-2: #353535;
  --muted: #6b6b6b;
  --rule: #e2e2e2;
  --rule-2: #c4c4c4;
  --accent: #c2410c;
  /* The contact block: solid orange with white type (5.2:1) in both modes. */
  --block: #c2410c;
  --focus: #2563eb;
  --draft: #3355cc;
  /* Chart marks: burnt orange for the result, grey for "before" and context. Both modes pass the colour-blind checks. */
  --c-hi: #c2410c;
  --c-lo: #7a8996;
  /* Ranking donuts: one orange ramp, darkest = best position. Checked as an ordinal ramp in both modes. */
  --r1: #7a2a06;
  --r2: #9c360a;
  --r3: #c2410c;
  --r4: #dd6a2c;
  --r5: #ec9259;
  --c-band: rgba(194, 65, 12, 0.07);
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1200px;
  --narrow: 700px;
  --gutter: clamp(20px, 5vw, 48px);
  --space: clamp(56px, 7vw, 96px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --fg: #f3f2ee;
    --fg-2: #cfcdc6;
    --muted: #9b9990;
    --rule: #2b2b29;
    --rule-2: #4a4a46;
    --accent: #ff8a4c;
    --focus: #8db1ff;
    --draft: #8fa8ff;
    --c-hi: #dc6a2a;
    --c-lo: #5f6f7c;
    --r1: #ffb27a;
    --r2: #f59251;
    --r3: #e2722f;
    --r4: #c25a1d;
    --r5: #9c4614;
    --c-band: rgba(232, 118, 58, 0.1);
    color-scheme: dark;
  }
}

/* ── Base ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--fg-2); font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { color: var(--fg); font-weight: 600; letter-spacing: -0.02em; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-decoration-color: var(--rule-2); text-underline-offset: 0.22em; transition: text-decoration-color 0.15s ease, color 0.15s ease; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* Every block sits on the same column, so rules line up with the text. */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.wrap.narrow { width: min(100% - 2 * var(--gutter), var(--narrow)); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; top: -60px; left: 12px; z-index: 10; padding: 8px 14px; background: var(--fg); color: var(--bg); text-decoration: none; }
.skip:focus { top: 12px; }
.arrow path, .ne path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ne { display: inline-block; width: 0.78em; height: 0.78em; margin-left: 0.2em; vertical-align: -0.02em; color: var(--muted); }

/* ── Header and footer ────────────────────────────────────────────── */

.site-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 32px; padding-block: 22px 18px; }
.wordmark { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--fg); text-decoration: none; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 26px; }
.site-nav a { font-size: 15.5px; font-weight: 500; color: var(--fg); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { text-decoration-line: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 7px; }

.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 20px 40px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--muted); }
.site-footer ul { display: flex; gap: 22px; }
.site-footer a { color: var(--fg); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ── Numbers ──────────────────────────────────────────────────────── */

.figure { display: flex; flex-wrap: wrap; align-items: baseline; align-content: flex-start; align-self: start; column-gap: 0.1em; font-weight: 600; line-height: 1; letter-spacing: -0.045em; color: var(--fg); font-variant-numeric: tabular-nums; }
.figure .was { color: var(--muted); }
.figure .arrow { width: 0.5em; height: 0.5em; margin-inline: 0.06em; align-self: center; color: var(--accent); }
.figure .plus { color: var(--accent); }
.figure .of, .figure .unit { font-size: 0.42em; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.figure .unit { margin-left: 0.4em; }

/* ── Homepage ─────────────────────────────────────────────────────── */

/* Name, intro and facts, with the portrait beside the name on phones and down the right on wider screens. */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) clamp(104px, 24vw, 220px); grid-template-areas: "name photo" "lede lede" "facts facts"; gap: 24px 16px; padding-block: clamp(28px, 6vw, 72px) clamp(40px, 6vw, 72px); }
.intro:not(.has-photo) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "lede" "facts"; }
.name { grid-area: name; align-self: end; font-size: clamp(54px, 10vw, 136px); font-weight: 600; line-height: 0.9; letter-spacing: -0.055em; }
.intro .lede { grid-area: lede; }
.intro .facts { grid-area: facts; }
.intro .portrait { grid-area: photo; }
@media (min-width: 900px) {
  .intro.has-photo { grid-template-columns: minmax(0, 1fr) clamp(280px, 28vw, 360px); grid-template-rows: auto auto 1fr; grid-template-areas: "name photo" "lede photo" "facts photo"; column-gap: clamp(40px, 6vw, 96px); row-gap: 28px; }
  .name { align-self: start; }
  .intro .facts { align-self: end; }
}
.lede { max-width: 36rem; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; color: var(--fg-2); text-wrap: pretty; }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* Label and value rows, used in the intro and on About. */
.facts { max-width: 36rem; border-bottom: 1px solid var(--rule); }
.facts div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 16px; padding-block: 10px; border-top: 1px solid var(--rule); }
.facts dt { font-size: 14px; line-height: 1.6; color: var(--muted); }
.facts dd { font-size: 15.5px; font-weight: 500; line-height: 1.5; color: var(--fg); }

/* Headline numbers: four across under a black rule, two across on phones. */
.figures { margin-bottom: var(--space); border-top: 1px solid var(--fg); }
.figures ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.figures li { display: flex; flex-direction: column; padding: 20px 16px 24px 0; border-bottom: 1px solid var(--rule); }
.figures li:nth-child(even) { padding: 20px 0 24px 16px; border-left: 1px solid var(--rule); }
@media (min-width: 900px) {
  .figures ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .figures li, .figures li:nth-child(even) { padding: 24px 22px 28px; border-bottom: 0; border-left: 1px solid var(--rule); }
  .figures li:first-child { padding-left: 0; border-left: 0; }
}
.figures .figure { font-size: clamp(34px, 5.2vw, 66px); }
.figure-label { margin-top: 12px; font-size: 15px; line-height: 1.45; color: var(--fg); text-wrap: pretty; }
.figure-who { margin-top: auto; padding-top: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.figure-who span { display: block; font-family: var(--mono); font-size: 11.5px; }

/* Sections: a black rule, the heading in the left column, the content on the right. */
.section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 48px; margin-bottom: var(--space); padding-top: 20px; border-top: 1px solid var(--fg); }
@media (min-width: 900px) {
  .section { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); }
  .section-head { position: sticky; top: 24px; align-self: start; }
}
.section-head h2 { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.15; }
.section-head p { max-width: 22rem; margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.section-head .more { margin-top: 14px; font-weight: 500; color: var(--fg); }
.more a { text-decoration: none; }
.more a:hover { color: var(--accent); }
.more .arrow { display: inline-block; width: 1em; height: 1em; margin-left: 0.35em; vertical-align: -0.15em; }

/* The results ledger: number, what it was, small chart. */
.ledger > li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 32px; padding-block: 28px; border-bottom: 1px solid var(--rule); }
.ledger > li:first-child { padding-top: 4px; }
@media (min-width: 700px) { .ledger > li { grid-template-columns: 14rem minmax(0, 1fr); } }
@media (min-width: 1150px) { .ledger > li { grid-template-columns: 14rem minmax(0, 1fr) 15rem; } }
.ledger .figure { font-size: clamp(38px, 3.6vw, 48px); }
.ledger h3 { font-size: 18px; line-height: 1.35; }
.entry-text p { margin-top: 6px; max-width: 34rem; font-size: 15px; line-height: 1.55; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; color: var(--muted); }
.entry-text .meta { margin-top: 10px; }
.meta a { color: var(--fg); }
.entry-chart { align-self: center; max-width: 18rem; }
@media (min-width: 700px) and (max-width: 1149px) { .entry-chart { grid-column: 2; } }

/* Commercial keywords: a plain table. */
.rankings { margin-top: 48px; }
.rankings h3 { font-size: 18px; line-height: 1.35; }
.rankings table { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 15px; line-height: 1.4; }
.rankings th, .rankings td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); font-weight: 400; text-align: left; vertical-align: baseline; }
.rankings th:last-child, .rankings td:last-child { padding-right: 0; }
.rankings thead th { padding-top: 0; border-bottom-color: var(--fg); font-size: 13px; color: var(--muted); }
.rankings tbody th { font-weight: 500; color: var(--fg); }
.rankings tbody th small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }
.rankings .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rankings thead .num { white-space: normal; }
.rankings td.was { color: var(--muted); }
.rankings td.now { font-size: 24px; font-weight: 600; line-height: 1; letter-spacing: -0.03em; color: var(--fg); }

/* Dated rows: experience, posts. */
.rows > li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 28px; padding-block: 22px; border-bottom: 1px solid var(--rule); }
.rows > li:first-child { padding-top: 4px; }
@media (min-width: 640px) { .rows > li { grid-template-columns: 9rem minmax(0, 1fr); } }
.row-when { padding-top: 0.45em; font-family: var(--mono); font-size: 13px; line-height: 1.5; color: var(--muted); }
.rows h3 { font-size: 21px; line-height: 1.25; text-wrap: pretty; }
.rows h3 a { text-decoration: none; }
.rows h3 a:hover { color: var(--accent); }
.rows p:not(.row-when) { max-width: 62ch; margin-top: 8px; font-size: 15.5px; }
.rows p.row-role { margin-top: 2px; font-size: 14px; color: var(--muted); }
.draft { display: inline-block; margin-left: 10px; padding: 1px 6px; border: 1px solid currentColor; font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: 0.06em; line-height: 1.5; text-transform: uppercase; vertical-align: 0.3em; color: var(--draft); }
.empty { color: var(--muted); }

/* Contact: the solid orange block. */
.contact { background: var(--block); color: #fff; }
.contact .wrap { padding-block: clamp(36px, 5vw, 56px) clamp(56px, 8vw, 104px); }
.contact h2 { color: inherit; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.15; }
.contact p { margin-top: 8px; font-size: 16px; }
.contact .contact-email { margin-top: clamp(28px, 5vw, 64px); font-size: clamp(30px, 6.6vw, 92px); font-weight: 600; line-height: 1.02; letter-spacing: -0.045em; overflow-wrap: anywhere; }
.contact a { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.5); }
.contact a:hover { text-decoration-color: #fff; }
.contact-email a { text-decoration-thickness: 3px; text-underline-offset: 0.14em; }
.contact :focus-visible { outline-color: #fff; }
.elsewhere { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 24px; font-size: 16px; }

/* ── Other pages ──────────────────────────────────────────────────── */

.page-head { padding-block: clamp(28px, 6vw, 72px) clamp(36px, 5vw, 56px); }
.title { font-size: clamp(52px, 9vw, 120px); font-weight: 600; line-height: 0.92; letter-spacing: -0.055em; }
.page-head .lede { margin-top: clamp(18px, 2.4vw, 28px); }
.feed { margin-top: 14px; font-size: 14px; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 48px; margin-bottom: var(--space); padding-top: 24px; border-top: 1px solid var(--fg); }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); }
  .about-aside { position: sticky; top: 24px; align-self: start; }
}
.about-aside .portrait { width: 160px; margin-bottom: 24px; }
@media (min-width: 900px) { .about-aside .portrait { width: 100%; max-width: 280px; } }
.about-aside .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.about-grid .prose { max-width: 42rem; }

/* Blog posts */
.post-head { padding-top: clamp(28px, 6vw, 72px); }
.post-path { display: flex; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.post-path > * + *::before { content: "/"; content: "/" / ""; margin-inline: 0.5em; color: var(--rule-2); }
.post-path a { font-weight: 500; color: var(--fg); text-decoration: none; }
.post-path a:hover { color: var(--accent); }
.post-title { margin-top: 18px; font-size: clamp(36px, 5.6vw, 62px); font-weight: 600; line-height: 1.04; letter-spacing: -0.04em; text-wrap: balance; }
.standfirst { margin-top: 20px; font-size: clamp(18px, 1.9vw, 20px); line-height: 1.55; color: var(--fg-2); text-wrap: pretty; }
.byline { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--fg); font-size: 13.5px; color: var(--muted); }
.byline a { color: var(--fg); }

.prose { font-size: 17.5px; line-height: 1.75; color: var(--fg-2); }
.post .prose { margin-top: 44px; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.9em; font-size: 26px; line-height: 1.25; }
.prose h3 { margin-top: 1.7em; font-size: 20px; line-height: 1.35; }
.prose > :first-child { margin-top: 0; }
.prose h2 + *, .prose h3 + * { margin-top: 0.55em; }
.prose strong { font-weight: 600; color: var(--fg); }
.prose a { color: var(--fg); text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--muted); }
.prose blockquote { padding: 2px 0 2px 1.1em; border-left: 2px solid var(--fg); font-size: 20px; font-weight: 500; line-height: 1.5; color: var(--fg); }
.prose code { padding: 0.12em 0.36em; background: color-mix(in srgb, var(--fg) 6%, transparent); font-family: var(--mono); font-size: 0.84em; }
.prose pre { overflow-x: auto; padding: 16px 20px; background: color-mix(in srgb, var(--fg) 6%, transparent); font-size: 14px; line-height: 1.6; }
.prose pre code { padding: 0; background: none; font-size: inherit; }
.prose hr { height: 1px; margin-block: 2.4em; border: 0; background: var(--rule); }
.prose figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th:last-child, .prose td:last-child { padding-right: 0; }
.prose th:not([align]), .prose td:not([align]) { text-align: left; }
.prose th { font-weight: 600; color: var(--fg); border-bottom-color: var(--fg); }

.post-foot { margin-block: 64px var(--space); }
.author { padding-top: 14px; border-top: 1px solid var(--fg); }
.author-name { font-size: 17px; font-weight: 600; color: var(--fg); }
.author p + p { max-width: 52ch; margin-top: 4px; font-size: 15px; color: var(--muted); }
.post-nav { display: grid; gap: 0 32px; margin-top: 40px; }
.post-nav a { display: block; padding-block: 14px 16px; border-top: 1px solid var(--rule); text-decoration: none; }
.post-nav small { display: block; font-size: 13px; color: var(--muted); }
.post-nav span { display: block; margin-top: 4px; font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--fg); }
.post-nav a:hover span { color: var(--accent); }
@media (min-width: 640px) {
  .post-nav { grid-template-columns: 1fr 1fr; }
  .post-nav .newer { grid-column: 2; text-align: right; }
}

/* ── Results page ─────────────────────────────────────────────────── */

/* Every result in one ledger. The filter labels belong to hidden radio buttons;
   a checked radio hides the other kinds, so filtering needs no JavaScript. */
.tally { margin-bottom: var(--space); }
.filters { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 22px; padding-block: 14px 12px; border-top: 1px solid var(--fg); border-bottom: 1px solid var(--rule); background: var(--bg); }
@media (min-width: 700px) { .filters { position: sticky; top: 0; z-index: 2; } }
.filters > span { margin-right: 4px; font-size: 14px; color: var(--muted); }
.filters label { padding-block: 4px; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; user-select: none; }
.filters label span { font-family: var(--mono); font-size: 11.5px; }
.filters label:hover { color: var(--fg); }
#kind-all:checked ~ .filters [for="kind-all"],
#kind-clicks:checked ~ .filters [for="kind-clicks"],
#kind-impressions:checked ~ .filters [for="kind-impressions"],
#kind-rankings:checked ~ .filters [for="kind-rankings"],
#kind-keywords:checked ~ .filters [for="kind-keywords"],
#kind-conversions:checked ~ .filters [for="kind-conversions"],
#kind-local:checked ~ .filters [for="kind-local"] { color: var(--fg); box-shadow: inset 0 -2px var(--accent); }
#kind-all:focus-visible ~ .filters [for="kind-all"],
#kind-clicks:focus-visible ~ .filters [for="kind-clicks"],
#kind-impressions:focus-visible ~ .filters [for="kind-impressions"],
#kind-rankings:focus-visible ~ .filters [for="kind-rankings"],
#kind-keywords:focus-visible ~ .filters [for="kind-keywords"],
#kind-conversions:focus-visible ~ .filters [for="kind-conversions"],
#kind-local:focus-visible ~ .filters [for="kind-local"] { outline: 2px solid var(--focus); outline-offset: 3px; }
#kind-clicks:checked ~ .tally-rows > li:not(.kind-clicks),
#kind-impressions:checked ~ .tally-rows > li:not(.kind-impressions),
#kind-rankings:checked ~ .tally-rows > li:not(.kind-rankings),
#kind-keywords:checked ~ .tally-rows > li:not(.kind-keywords),
#kind-conversions:checked ~ .tally-rows > li:not(.kind-conversions),
#kind-local:checked ~ .tally-rows > li:not(.kind-local) { display: none; }

.tally-rows > li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 32px; padding-block: 18px 20px; border-bottom: 1px solid var(--rule); }
@media (min-width: 700px) { .tally-rows > li { grid-template-columns: 13rem minmax(0, 1fr); align-items: baseline; } .tally-meta { grid-column: 2; } }
@media (min-width: 1000px) { .tally-rows > li { grid-template-columns: 14rem minmax(0, 1fr) 15rem; } .tally-meta { grid-column: 3; } }
.tally-rows .figure { align-self: baseline; font-size: clamp(32px, 3.2vw, 42px); }
.tally-what { max-width: 36rem; font-size: 16px; line-height: 1.45; color: var(--fg); text-wrap: pretty; }
.tally-meta { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
@media (min-width: 1000px) { .tally-meta { display: grid; } }
.tally-meta a { color: var(--fg-2); }
.tally-meta .when { font-family: var(--mono); font-size: 12px; line-height: 1.75; }

/* The list of clients, then one section per client. */
.index > li { border-bottom: 1px solid var(--rule); }
.index a { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; padding-block: 14px; font-size: 19px; font-weight: 500; line-height: 1.3; color: var(--fg); text-decoration: none; }
.index > li:first-child a { padding-top: 4px; }
.index a:hover { color: var(--accent); }
.index .row-when { padding-top: 0; font-weight: 400; }

.case .section-head p { font-size: 14px; }
.case .section-head .case-period { margin-top: 4px; font-family: var(--mono); font-size: 12.5px; }
.case-summary { max-width: 60ch; font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; color: var(--fg); text-wrap: pretty; }
.case-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 28px 28px; margin-top: 32px; }
.case-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 10px; padding-top: 14px; border-top: 1px solid var(--fg); }
.case-stats dt { font-size: 14px; line-height: 1.45; color: var(--muted); }
.case-stats .figure { font-size: clamp(30px, 3vw, 40px); }
.case-chart { margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--rule); }
.case-outcome { margin-top: 56px; padding-top: 18px; border-top: 3px solid var(--accent); }
.case-outcome h3 { font-size: 22px; }
.case-outcome .case-summary { margin-top: 8px; font-size: 16.5px; color: var(--fg-2); }
.case-notes { max-width: 72ch; margin-top: 40px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }

/* ── Charts ───────────────────────────────────────────────────────── */

.c-caption { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }

.chart { margin: 0; }
.chart svg { overflow: visible; }
.chart-title { font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--fg); }
.chart-title span { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 400; color: var(--muted); }
.chart-note { margin-top: 12px; font-size: 13px; color: var(--muted); }
.c-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-block: 14px 6px; font-size: 13px; color: var(--muted); }
.key { display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 50%; vertical-align: -1px; }
.key.after { background: var(--c-hi); }
.key.before { background: var(--c-lo); }
.key.sq { border-radius: 2px; }
.key.band { border-radius: 2px; background: var(--c-band); box-shadow: inset 0 0 0 1px var(--rule-2); }
.key.r1 { background: var(--r1); }
.key.r2 { background: var(--r2); }
.key.r3 { background: var(--r3); }
.key.r4 { background: var(--r4); }
.key.r5 { background: var(--r5); }
.c-grid { stroke: var(--rule); stroke-width: 1; }

.c-dots { display: block; overflow: visible; }
.c-dots circle { fill: none; stroke: var(--c-lo); stroke-width: 1.5; }
.c-dots circle.on { fill: var(--c-hi); stroke: none; }

.c-row { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) 4.5rem; align-items: center; column-gap: 16px; min-height: 30px; }
.c-bars.mini .c-row { grid-template-columns: 5.6rem minmax(0, 1fr) 2.6rem; column-gap: 12px; min-height: 24px; }
.c-label { font-size: 14px; line-height: 1.3; color: var(--fg-2); }
.c-bars.mini .c-label { font-size: 12.5px; color: var(--muted); }
.c-value, .db-value { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-track { display: block; }
.c-track .hi { fill: var(--c-hi); }
.c-track .lo { fill: var(--c-lo); }
.c-track:hover rect { opacity: 0.8; }

.dumbbell { margin-top: 4px; }
.db-row { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr) 6.5rem; align-items: center; column-gap: 20px; min-height: 42px; }
.db-label { font-size: 14px; line-height: 1.3; color: var(--fg-2); }
.db-label small { display: block; margin-top: 1px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.db-track { display: block; overflow: visible; }
.db-track circle { stroke: var(--bg); stroke-width: 2; }
.db-track .c-before { fill: var(--c-lo); }
.db-track .c-after { fill: var(--c-hi); }
.db-track:hover circle { r: 6.5px; }
.c-link { stroke: var(--c-hi); stroke-width: 2; stroke-opacity: 0.45; stroke-linecap: round; }
.c-link.down { stroke: var(--c-lo); stroke-opacity: 0.8; }
.c-band { fill: var(--c-band); }
.db-axis { min-height: 22px; }
.db-axis text, .c-axis text, .c-mark-label { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); }
@media (max-width: 640px) {
  .db-row { grid-template-columns: minmax(0, 1fr) 5.8rem; row-gap: 2px; padding-top: 10px; }
  .db-label { grid-column: 1 / -1; }
  .db-axis span:first-child { display: none; }
}

.line-chart { display: grid; grid-template-columns: 2.8rem minmax(0, 1fr); column-gap: 12px; margin-top: 10px; }
.y-labels { position: relative; height: 200px; }
.y-labels span { position: absolute; right: 0; transform: translateY(-50%); font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.y-labels .y0 { top: 100%; }
.y-labels .y1 { top: 50%; }
.y-labels .y2 { top: 0; }
.plot { position: relative; height: 226px; }
.line-paths, .line-overlay, .col-plot { position: absolute; top: 0; left: 0; overflow: visible; }
.c-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-line.hi { stroke: var(--c-hi); }
.c-line.lo { stroke: var(--c-lo); }
.c-area { fill: var(--c-hi); fill-opacity: 0.1; }
.c-mark { stroke: var(--rule-2); stroke-width: 1; }
.c-end { stroke: var(--bg); stroke-width: 2; }
.c-end.hi { fill: var(--c-hi); }
.c-end.lo { fill: var(--c-lo); }
.c-hit { fill: var(--fg); fill-opacity: 0; }
.c-hit:hover { fill-opacity: 0.05; }
.col-plot .hi { fill: var(--c-hi); }
.col-plot .lo { fill: var(--c-lo); }
.c-missing { font-family: var(--mono); font-size: 10px; fill: var(--muted); }

.donuts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 16px; }
.donut { margin: 0; text-align: center; }
.donut figcaption { margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.donut svg { display: block; margin-inline: auto; overflow: visible; }
.donut circle { fill: none; stroke-width: 18; }
.donut .r1 { stroke: var(--r1); }
.donut .r2 { stroke: var(--r2); }
.donut .r3 { stroke: var(--r3); }
.donut .r4 { stroke: var(--r4); }
.donut .r5 { stroke: var(--r5); }
.donut circle:hover { stroke-width: 22; }
.d-num { font-family: var(--sans); font-size: 34px; font-weight: 600; letter-spacing: -0.04em; fill: var(--fg); }
.d-cap { font-family: var(--mono); font-size: 9.5px; fill: var(--muted); }
.d-arrow { width: 28px; height: 28px; margin-top: 22px; color: var(--accent); }
.d-arrow path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.spark { display: block; overflow: visible; }
.spark-line { fill: none; stroke: var(--c-hi); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: var(--c-hi); fill-opacity: 0.1; }

.c-table { margin-top: 16px; }
.c-table summary { width: max-content; cursor: pointer; list-style: none; font-size: 13px; font-weight: 500; color: var(--muted); }
.c-table summary::-webkit-details-marker { display: none; }
.c-table summary::before { content: "+ "; color: var(--accent); }
.c-table[open] summary::before { content: "− "; }
.c-table summary:hover { color: var(--fg); }
.c-table table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 13.5px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.c-table th, .c-table td { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--rule); font-weight: 400; text-align: left; }
.c-table th { font-size: 12px; color: var(--muted); }
.c-table [align="right"] { text-align: right; }
.prose .chart { margin-block: 2.4em; padding-block: 18px 20px; border-block: 1px solid var(--rule); }

@media print {
  .site-nav, .site-footer, .skip, .filters { display: none; }
  .contact { background: none; color: #000; }
  .contact a { color: #000; }
  a { text-decoration: none; }
}
