/* jackivison.co.uk. One stylesheet, no JavaScript. Styled after Electrician SEO Pro (Poppins, navy, white cards),
   with a burnt-orange accent. 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;
  --bg-2: #f4f7fa;
  --card: #ffffff;
  --fg: #0f2635;
  --fg-2: #34434e;
  --muted: #6b7c88;
  --rule: #e2ebf2;
  --rule-2: #d4e1ec;
  --navy-1: #013752;
  --navy-2: #00263c;
  --navy-3: #001a2a;
  --on-dark: #ffffff;
  --on-dark-2: #c9d7e2;
  --on-dark-muted: #8fa6b8;
  --up: #c2410c;
  --up-on-dark: #ff8a4c;
  --focus: #2563eb;
  --draft: #3355cc;
  --shadow: 0 16px 40px -24px rgba(15, 38, 53, 0.3);
  --radius: 10px;
  /* Chart marks: burnt orange for the result, cool 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: 1160px;
  --narrow: 720px;
  --gutter: clamp(20px, 5vw, 48px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1621;
    --bg-2: #102231;
    --card: #102231;
    --fg: #eef3f7;
    --fg-2: #c3d0da;
    --muted: #8fa3b3;
    --rule: #1d3242;
    --rule-2: #2a4457;
    --navy-1: #01263a;
    --navy-2: #001623;
    --navy-3: #000f19;
    --up: #ff8a4c;
    --focus: #8db1ff;
    --draft: #8fa8ff;
    --shadow: 0 16px 40px -24px rgba(0, 0, 0, 0.6);
    --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(--up) 22%, transparent); }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap.narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); }
.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; border-radius: 6px; background: var(--fg); color: var(--bg); text-decoration: none; }
.skip:focus { top: 12px; }
.arrow path, .ne path, .ki path, .up path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.arrow path, .ne path { stroke-width: 1.8; }
.ki path, .up path { stroke-width: 2.4; }
.ne { display: inline-block; width: 0.78em; height: 0.78em; margin-left: 0.2em; vertical-align: -0.02em; color: var(--muted); }

/* Small uppercase label above a heading, with a trend arrow. */
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--up); }
.kicker .ki { width: 16px; height: 16px; flex: none; }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 8px; background: var(--up); color: #fff; font-weight: 600; font-size: 16px; text-decoration: none; box-shadow: 0 12px 30px -16px rgba(194, 65, 12, 0.7); }
.btn:hover { filter: brightness(1.07); }

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

.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 32px; padding-block: 20px; }
.wordmark { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg); text-decoration: none; }
.wordmark::after { content: "."; color: var(--up); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.site-nav a { font-size: 15.5px; font-weight: 500; color: var(--fg); text-decoration: none; }
.site-nav a:hover { color: var(--up); }
.site-nav a[aria-current="page"] { text-decoration-line: underline; text-decoration-color: var(--up); text-decoration-thickness: 2px; text-underline-offset: 8px; }

.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; max-width: none; padding-block: 28px 36px; background: var(--navy-3); color: var(--on-dark-muted); font-size: 14px; }
.site-footer p, .site-footer ul { width: 100%; max-width: var(--max); }
.site-footer { padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2)); }
.site-footer p, .site-footer ul { width: auto; }
.site-footer ul { display: flex; gap: 22px; }
.site-footer a { text-decoration: none; color: var(--on-dark-2); }
.site-footer a:hover { color: #fff; }

/* ── Dark bands: the homepage hero, page headings and contact ─────── */

.hero, .band {
  position: relative;
  overflow: hidden;
  color: var(--on-dark-2);
  background: radial-gradient(ellipse 55% 60% at 80% 10%, rgba(255, 138, 76, 0.16), transparent 70%), linear-gradient(170deg, var(--navy-1) 0%, var(--navy-2) 100%);
}
.hero::before, .band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 65% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 65% 20%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero > *, .band > * { position: relative; }
.hero h1, .hero h2, .band h1, .band h2 { color: var(--on-dark); }
.hero .kicker, .band .kicker { color: var(--up-on-dark); }
.hero a, .band a { text-decoration-color: rgba(255, 255, 255, 0.35); }
.hero a:hover, .band a:hover { text-decoration-color: #fff; }

.hero { padding-block: clamp(48px, 7vw, 96px) clamp(56px, 7vw, 96px); }
.hero-grid { display: grid; gap: 28px 64px; }
@media (min-width: 960px) { .hero-grid.has-photo { grid-template-columns: minmax(0, 1fr) clamp(260px, 26vw, 340px); align-items: center; } }
.display { margin-top: 16px; font-size: clamp(50px, 7.4vw, 92px); font-weight: 700; line-height: 0.98; letter-spacing: -0.04em; }
.lede { max-width: 38rem; margin-top: clamp(18px, 2.4vw, 26px); font-size: clamp(18px, 1.8vw, 21px); line-height: 1.6; text-wrap: pretty; }
.facts { display: flex; flex-wrap: wrap; gap: 16px 44px; margin-top: clamp(28px, 4vw, 40px); }
.facts dt, .aside-facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-dark-muted); }
.facts dd { display: flex; align-items: center; gap: 9px; margin-top: 4px; font-size: 15.5px; font-weight: 500; color: var(--on-dark); }
.live { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--up-on-dark); box-shadow: 0 0 0 4px rgba(255, 138, 76, 0.22); }

.portrait { display: block; width: 120px; }
.portrait img { display: block; width: 100%; aspect-ratio: 4 / 5; border-radius: 14px; background: #fff; }
.hero .portrait img { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 30px 60px -28px rgba(0, 0, 0, 0.7); }
@media (min-width: 960px) { .hero .portrait { width: 100%; } }
@media (max-width: 959px) { .hero .portrait { order: -1; } }

/* The results panel, like Electrician SEO Pro's live rank tracker. */
.hero-panel { position: relative; margin-top: clamp(40px, 6vw, 64px); }
.panel { max-width: 620px; padding: 14px; border: 1px solid rgba(120, 170, 210, 0.28); border-radius: 12px; background: rgba(0, 21, 34, 0.55); box-shadow: 0 0 0 1px rgba(255, 138, 76, 0.22), 0 18px 50px -18px rgba(255, 138, 76, 0.4); }
.panel-bar { display: flex; align-items: center; gap: 12px; padding: 4px 6px 14px; font-family: var(--mono); font-size: 11.5px; color: var(--on-dark-muted); }
.panel-dots { display: inline-flex; gap: 6px; }
.panel-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.panel-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--up-on-dark); }
.panel-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--up-on-dark); }
.panel-rows { display: grid; gap: 8px; }
.panel-rows li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid rgba(120, 170, 210, 0.16); border-radius: 8px; background: rgba(255, 255, 255, 0.03); }
.panel-rank { font-size: 20px; font-weight: 700; color: var(--up-on-dark); }
.panel-kw { min-width: 0; color: var(--on-dark); font-size: 15.5px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.panel-kw small { display: block; margin-top: 3px; font-family: var(--mono); font-size: 11px; font-weight: 400; color: #7f9bb1; }
.panel-delta { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 11.5px; color: #8fe3b4; white-space: nowrap; }
.panel-delta .up { width: 12px; height: 12px; }
.float-card { display: inline-flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 20px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; color: #0f2635; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.55); }
.float-card .ki { width: 30px; height: 30px; color: var(--up); }
.float-card strong { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.float-card span { max-width: 9rem; font-family: var(--mono); font-size: 11px; line-height: 1.35; color: #6b7c88; }
@media (min-width: 1100px) { .float-card { position: absolute; left: calc(var(--gutter) + 660px); bottom: 36px; margin: 0; } }

/* ── Sections: centred heading, content below ─────────────────────── */

.section { padding-block: clamp(64px, 9vw, 112px) 0; }
.section.tight { padding-top: clamp(40px, 5vw, 64px); }
.section-head { max-width: 46rem; margin-inline: auto; margin-bottom: clamp(32px, 4vw, 48px); text-align: center; }
.section-head h2 { margin-top: 10px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; }
.section-head > p:not(.kicker) { margin-top: 12px; font-size: 17px; color: var(--muted); }
.more { margin-top: 32px; text-align: center; font-size: 15.5px; }
.contact-band { margin-top: clamp(80px, 10vw, 128px); }
.contact-band .section { padding-block: clamp(64px, 8vw, 96px); }
.contact-band .section-head > p:not(.kicker) { color: var(--on-dark-2); }

/* Cards */
.result, .tile, .timeline > li, .posts a, .case-chart, .c-card { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }

/* Homepage results */
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.result { display: flex; flex-direction: column; padding: 22px 24px 20px; }
.result .figure { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.14em; margin: 0; font-size: clamp(36px, 3.8vw, 46px); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; color: var(--fg); }
.figure .arrow { width: 0.5em; height: 0.5em; margin-inline: 0.08em; align-self: center; color: var(--up); }
.figure .plus { color: var(--up); }
.figure .of, .figure .unit { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.figure .unit { margin-left: 0.4em; }
.result h3 { margin-top: 14px; font-size: 17px; line-height: 1.35; }
.result p { margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--fg-2); }
.result .source { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: auto; padding-top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.result .source a { color: var(--fg); }

/* Experience */
.timeline { display: grid; gap: 14px; max-width: 880px; margin-inline: auto; }
.timeline > li { display: grid; gap: 4px; padding: 22px 26px; }
@media (min-width: 640px) { .timeline > li { grid-template-columns: 9rem minmax(0, 1fr); column-gap: 28px; } }
.when { padding-top: 0.5em; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.timeline h3 { font-size: 22px; line-height: 1.2; }
.timeline h3 a, .project h3 a { text-decoration: none; }
.timeline h3 a:hover, .project h3 a:hover { color: var(--up); }
.role { display: inline-block; justify-self: start; width: max-content; margin-top: 6px; padding: 2px 8px; border: 1px solid var(--rule-2); border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); }
.timeline .text { max-width: 62ch; margin-top: 10px; font-size: 15.5px; color: var(--fg-2); }

/* Things I've built (kept for if projects come back) */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.project { padding: 22px 24px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.project h3 { font-size: 20px; }
.project p { margin-top: 8px; font-size: 15px; }
.project .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--fg); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status-live::before { background: var(--up); }

/* Clients */
.clients { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 980px; margin-inline: auto; }
.clients li { padding: 10px 16px; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); font-size: 15px; font-weight: 500; color: var(--fg); box-shadow: 0 10px 24px -20px rgba(15, 38, 53, 0.35); }

/* Post lists */
.posts { display: grid; gap: 14px; max-width: 880px; margin-inline: auto; }
.posts a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; padding: 20px 24px; text-decoration: none; }
.row-title { font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; color: var(--fg); text-wrap: pretty; }
.posts a:hover .row-title { color: var(--up); }
.posts time { padding-top: 0.35em; font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.row-desc { grid-column: 1 / -1; max-width: 62ch; font-size: 15px; color: var(--muted); }
@media (max-width: 560px) {
  .posts a { grid-template-columns: minmax(0, 1fr); }
  .posts time { order: -1; padding-top: 0; }
}
.draft { display: inline-block; margin-left: 10px; padding: 1px 6px; border: 1px solid currentColor; border-radius: 4px; 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 { text-align: center; color: var(--muted); }

/* Contact */
.contact-email { text-align: center; font-size: clamp(28px, 4.4vw, 48px); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.contact-email a { color: var(--on-dark); text-underline-offset: 0.16em; text-decoration-color: var(--up-on-dark); text-decoration-thickness: 3px; }
.elsewhere { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-top: 22px; font-size: 16px; }
.elsewhere a { color: var(--on-dark); }
.elsewhere span { font-family: var(--mono); font-size: 12px; color: var(--on-dark-muted); }

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

.page-head { padding-block: clamp(48px, 7vw, 88px); }
.display-2 { margin-top: 14px; font-size: clamp(42px, 6vw, 68px); font-weight: 700; line-height: 1; letter-spacing: -0.035em; }
.page-head .lede { margin-top: 18px; }
.feed { margin-top: 16px; font-family: var(--mono); font-size: 12px; }

.about-grid { display: grid; gap: 32px 56px; padding-top: clamp(40px, 6vw, 72px); }
@media (min-width: 960px) {
  .about-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); }
  .about-aside { position: sticky; top: 24px; align-self: start; }
}
.about-aside .portrait { width: 160px; margin-bottom: 24px; }
.about-aside .portrait img { border: 1px solid var(--rule); box-shadow: var(--shadow); }
@media (min-width: 960px) { .about-aside .portrait { width: 100%; max-width: 280px; } }
.aside-facts { display: grid; gap: 16px; padding: 20px 22px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
.aside-facts dt { color: var(--muted); }
.aside-facts dd { margin-top: 4px; font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--fg); }

/* Blog posts */
.post-head { padding-top: clamp(32px, 6vw, 72px); }
.kicker-row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.post-head .kicker { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--mono); font-size: 11.5px; font-weight: 400; letter-spacing: 0.06em; color: var(--muted); }
.post-head .kicker a { color: var(--up); text-decoration: none; font-weight: 400; }
.post-title { margin-top: 16px; font-size: clamp(34px, 5vw, 52px); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.standfirst { margin-top: 18px; font-size: clamp(18px, 1.9vw, 20px); line-height: 1.55; color: var(--fg-2); text-wrap: pretty; }
.byline { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 12px; 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: 40px; }
.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(--up); }
.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(--up); }
.prose blockquote { padding: 4px 0 4px 1.1em; border-left: 3px solid var(--up); font-size: 20px; font-weight: 500; line-height: 1.5; color: var(--fg); }
.prose code { padding: 0.12em 0.36em; border-radius: 4px; background: var(--bg-2); font-family: var(--mono); font-size: 0.84em; }
.prose pre { overflow-x: auto; padding: 16px 20px; border-radius: 8px; background: var(--bg-2); 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 img { border-radius: 8px; }
.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(--rule-2); }

.post-foot { margin-top: 64px; }
.author { padding: 22px 24px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--bg-2); }
.author-name { font-size: 18px; font-weight: 700; color: var(--fg); }
.author p + p { max-width: 52ch; margin-top: 6px; font-size: 15px; color: var(--muted); }
.post-nav { display: grid; gap: 14px 24px; margin-top: 28px; }
.post-nav a { display: block; padding: 16px 20px; border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; }
.post-nav small { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.post-nav span { display: block; margin-top: 6px; font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--fg); }
.post-nav a:hover span { color: var(--up); }
@media (min-width: 640px) {
  .post-nav { grid-template-columns: 1fr 1fr; }
  .post-nav .newer { grid-column: 2; text-align: right; }
}

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

/* The wall: every headline result as a card. The chips are labels for hidden radio buttons;
   a checked radio hides the other kinds, so filtering needs no JavaScript. */
.wall { margin-top: clamp(40px, 5vw, 56px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border: 1px solid var(--rule-2); border-radius: 999px; background: var(--card); font-size: 14px; font-weight: 500; color: var(--fg); cursor: pointer; user-select: none; }
.chips label span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.chips label:hover { border-color: var(--up); }
#kind-all:checked ~ .chips [for="kind-all"],
#kind-clicks:checked ~ .chips [for="kind-clicks"],
#kind-impressions:checked ~ .chips [for="kind-impressions"],
#kind-rankings:checked ~ .chips [for="kind-rankings"],
#kind-keywords:checked ~ .chips [for="kind-keywords"],
#kind-conversions:checked ~ .chips [for="kind-conversions"],
#kind-local:checked ~ .chips [for="kind-local"] { border-color: var(--up); background: var(--up); color: #fff; }
#kind-all:checked ~ .chips [for="kind-all"] span,
#kind-clicks:checked ~ .chips [for="kind-clicks"] span,
#kind-impressions:checked ~ .chips [for="kind-impressions"] span,
#kind-rankings:checked ~ .chips [for="kind-rankings"] span,
#kind-keywords:checked ~ .chips [for="kind-keywords"] span,
#kind-conversions:checked ~ .chips [for="kind-conversions"] span,
#kind-local:checked ~ .chips [for="kind-local"] span { color: inherit; opacity: 0.8; }
#kind-all:focus-visible ~ .chips [for="kind-all"],
#kind-clicks:focus-visible ~ .chips [for="kind-clicks"],
#kind-impressions:focus-visible ~ .chips [for="kind-impressions"],
#kind-rankings:focus-visible ~ .chips [for="kind-rankings"],
#kind-keywords:focus-visible ~ .chips [for="kind-keywords"],
#kind-conversions:focus-visible ~ .chips [for="kind-conversions"],
#kind-local:focus-visible ~ .chips [for="kind-local"] { outline: 2px solid var(--focus); outline-offset: 3px; }
#kind-clicks:checked ~ .wall-grid .tile:not(.kind-clicks),
#kind-impressions:checked ~ .wall-grid .tile:not(.kind-impressions),
#kind-rankings:checked ~ .wall-grid .tile:not(.kind-rankings),
#kind-keywords:checked ~ .wall-grid .tile:not(.kind-keywords),
#kind-conversions:checked ~ .wall-grid .tile:not(.kind-conversions),
#kind-local:checked ~ .wall-grid .tile:not(.kind-local) { display: none; }

.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; margin-top: 24px; }
.tile { display: flex; flex-direction: column; padding: 18px 20px 16px; }
.tile-who { align-self: flex-start; padding: 2px 8px; border: 1px solid var(--rule-2); border-radius: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); }
.tile .figure { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.14em; margin-top: 14px; font-size: clamp(34px, 3.2vw, 40px); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; color: var(--fg); }
.tile-what { margin-top: 8px; font-size: 14.5px; line-height: 1.45; color: var(--fg-2); text-wrap: pretty; }
.tile-when { margin-top: auto; padding-top: 12px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tile-when a { color: var(--fg); }
.case-index { padding-top: clamp(72px, 9vw, 112px); text-align: center; }
.case-index-title { font-size: clamp(28px, 3.4vw, 38px); }
.jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin-top: 22px; }
.jump a { display: inline-block; padding: 8px 14px; border: 1px solid var(--rule-2); border-radius: 999px; background: var(--card); font-size: 14px; font-weight: 500; text-decoration: none; color: var(--fg); }
.jump a:hover { border-color: var(--up); color: var(--up); }

/* One section per client */
.case .section-head { max-width: none; margin-inline: 0; text-align: left; }
.case-kicker { display: inline-block; padding: 3px 9px; border: 1px solid var(--rule-2); border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); }
.case .section-head h2 { margin-top: 12px; }
.case .section-head > p:not(.case-kicker) { margin-top: 6px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.case-summary { max-width: 66ch; font-size: 18px; line-height: 1.6; color: var(--fg-2); }
.case-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 28px; }
.case-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 18px 20px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.case-stats dt { font-size: 14px; line-height: 1.45; color: var(--muted); }
.case-stats .figure { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.14em; font-size: clamp(32px, 3.4vw, 42px); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; color: var(--fg); }
.case-chart { margin-top: 24px; padding: 24px 26px; }
.case-outcome { --bg: var(--bg-2); margin-top: 32px; padding: 28px; border-radius: 12px; background: var(--bg-2); }
.case-outcome h3 { font-size: 26px; }
.case-outcome .case-summary { margin-top: 8px; font-size: 16.5px; }
.case-outcome .case-chart { margin-top: 20px; box-shadow: none; }
.case-notes { max-width: 72ch; margin-top: 28px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
@media (max-width: 640px) {
  .case-chart { padding: 18px 16px; }
  .case-outcome { padding: 20px 16px; }
}

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

.result-chart { margin-top: 16px; }
.c-caption { display: block; margin-top: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.result.feature { grid-column: 1 / -1; }
.feature-head { display: grid; gap: 24px 56px; }
@media (min-width: 760px) { .feature-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; } }
.feature-head h3 { margin-top: 0; }
.feature .chart { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule); }
.dot-pair { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 22px; }
.dot-pair figure { margin: 0; }
.dot-pair figcaption { margin-bottom: 9px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; 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(--card); 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(--card); 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-family: var(--mono); font-size: 11px; text-transform: uppercase; 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: 700; letter-spacing: -0.03em; 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(--up); }
.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-family: var(--mono); font-size: 11.5px; text-transform: uppercase; color: var(--muted); }
.c-table summary::-webkit-details-marker { display: none; }
.c-table summary::before { content: "+ "; color: var(--up); }
.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: 2em; padding: 22px 24px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }

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