/* gabrielvoyer.com: "The Highlighter Module"
   The page reads like a polished online course. Objectives check themselves off as you
   read, and an optional knowledge check (the loudest block on the page) ends in a certificate.
   Palette rule from Gabriel: no orange, no teal. Every color is a token below, so he can
   change them later in one place. */

:root {
  --paper: #f7f5ef;
  --surface: #ffffff;
  --ink: #141a2e;
  --muted: #545b73;
  --rule: #d9d5c8;
  --field: #ffffff;
  --field-border: #737a92;
  --accent: #2a3bd1;
  --accent-ink: #ffffff;
  --accent-soft: #e4e7fb;
  --mark: #f2e35a;
  --mark-ink: #141a2e;
  --success: #22713a;
  --error: #b4123f;

  /* The knowledge check is an inverted block in both themes. */
  --q-bg: #141a2e;
  --q-ink: #eef0f7;
  --q-muted: #b4b9cf;
  --q-rule: #343b5c;
  --q-accent: #a9b3ff;
  --q-field: #1c2340;
  --q-field-border: #7d86b0;
  --q-success: #8fd16a;
  --q-error: #ff8fa8;

  /* The certificate is always "paper", in both themes and in print. */
  --cert-bg: #fffdf5;
  --cert-ink: #141a2e;
  --cert-muted: #545b73;
  --cert-accent: #2a3bd1;

  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 38rem;
  --gutter: 16px;
  --radius: 14px;
  --radius-sm: 8px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1120; --surface: #151a2e; --ink: #eef0f7; --muted: #a2a8c0; --rule: #2a2f47;
    --field: #151a2e; --field-border: #6f7799; --accent: #8d9bff; --accent-ink: #0e1120;
    --accent-soft: #1c2348; --mark: #f2e35a; --mark-ink: #141a2e; --success: #8fd16a; --error: #ff7d9b;
    --q-bg: #1a2150; --q-ink: #f3f4fa; --q-muted: #b9bfdc; --q-rule: #2f3870; --q-accent: #b3bcff;
    --q-field: #222a5e; --q-field-border: #8189bd; --q-success: #9ddb79; --q-error: #ff9ab0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1120; --surface: #151a2e; --ink: #eef0f7; --muted: #a2a8c0; --rule: #2a2f47;
  --field: #151a2e; --field-border: #6f7799; --accent: #8d9bff; --accent-ink: #0e1120;
  --accent-soft: #1c2348; --mark: #f2e35a; --mark-ink: #141a2e; --success: #8fd16a; --error: #ff7d9b;
  --q-bg: #1a2150; --q-ink: #f3f4fa; --q-muted: #b9bfdc; --q-rule: #2f3870; --q-accent: #b3bcff;
  --q-field: #222a5e; --q-field-border: #8189bd; --q-success: #9ddb79; --q-error: #ff9ab0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 1.1875rem; line-height: 1.62;
  font-optical-sizing: auto; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--display); color: inherit; margin: 0; }
h2 { font-weight: 800; font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-weight: 700; font-size: 1.2rem; line-height: 1.3; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 30; background: var(--paper); padding: 8px 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.site-header .bar { max-width: 78rem; margin: 0 auto; padding: 0.2rem var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; font-family: var(--display); }
.site-header .name { font-weight: 800; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; padding: 0.7rem 0; white-space: nowrap; }
.site-header nav { display: flex; gap: 0.15rem; font-size: 0.95rem; font-weight: 500; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: 0.7rem 0.5rem; min-height: 44px; display: inline-flex; align-items: center; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); }
.progress { display: flex; gap: 4px; padding: 0 var(--gutter) 6px; max-width: 78rem; margin: 0 auto; }
.progress span { flex: 1; height: 4px; background: var(--rule); border-radius: 2px; transition: background-color 400ms ease; }
.progress span.done { background: var(--accent); }

/* Layout: on desktop the objectives become a sticky course-outline rail */
.layout { max-width: 78rem; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr); }
.sections { min-width: 0; }

/* Hero: a course tile */
.intro { padding: 2.25rem 0 1.5rem; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.25rem; padding: 0; list-style: none; font-family: var(--display); font-size: 0.86rem; font-weight: 700; }
.chips li { padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.chips li:first-child { background: var(--mark); color: var(--mark-ink); }
.intro h1 { font-weight: 800; font-size: clamp(2.5rem, 10.5vw, 5.1rem); line-height: 0.98; letter-spacing: -0.035em; max-width: 15ch; }
.intro .lede { font-size: 1.2rem; color: var(--muted); margin: 1.25rem 0 1.5rem; max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin-bottom: 2rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-family: var(--display); font-weight: 700; font-size: 1.05rem; line-height: 1.2; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--accent); border-radius: 999px; padding: 0.8rem 1.5rem; min-height: 48px; cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.mark { background: var(--mark); color: var(--mark-ink); border-color: var(--mark); }
.textlink { font-family: var(--display); font-weight: 700; font-size: 1rem; padding: 0.6rem 0; min-height: 44px; display: inline-flex; align-items: center; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0; }
.stats div { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.9rem 0.9rem 1rem; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 0.3rem; }
.stats dt { font-family: var(--display); font-size: 0.9rem; line-height: 1.3; color: var(--muted); }
.stats dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 8vw, 2.6rem); line-height: 1; letter-spacing: -0.03em; }

/* Objectives */
.objectives { margin: 0.5rem 0 1rem; padding: 1.25rem 0 1.5rem; border-top: 3px solid var(--ink); min-width: 0; }
.objectives h2 { font-size: 1rem; letter-spacing: 0; margin-bottom: 0.9rem; line-height: 1.4; font-weight: 700; }
.objectives ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.objectives a { display: grid; grid-template-columns: 26px 1fr; gap: 0.75rem; align-items: start; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.02rem; line-height: 1.4; font-weight: 500; padding: 0.2rem 0; min-height: 44px; }
.objectives a:hover .text { text-decoration: underline; text-underline-offset: 0.18em; }
.box { width: 24px; height: 24px; margin-top: 0.05rem; border: 2px solid var(--ink); border-radius: 6px; display: grid; place-items: center; transition: background-color 250ms ease, border-color 250ms ease; }
.box svg { width: 15px; height: 15px; }
.box path { fill: none; stroke: var(--accent-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 350ms ease 150ms; }
.text { background-image: linear-gradient(var(--mark), var(--mark)); background-repeat: no-repeat; background-size: 0% 100%; transition: background-size 700ms cubic-bezier(.2,.7,.2,1) 250ms; box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 2px; }
.objectives li.done .box { background: var(--accent); border-color: var(--accent); }
.objectives li.done .box path { stroke-dashoffset: 0; }
.objectives li.done .text { background-size: 100% 100%; color: var(--mark-ink); }
.verified { display: none; font-size: 0.8rem; font-weight: 700; color: var(--success); margin-left: 0.35rem; white-space: nowrap; }
.objectives li.is-verified .verified { display: inline; }
.tally { margin: 1rem 0 0.35rem; font-family: var(--display); font-size: 0.92rem; color: var(--muted); }
.objectives .textlink { font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) {
  .box, .box path, .text, .progress span { transition: none !important; }
}

/* Sections */
.section { padding: 3.5rem 0; border-top: 1px solid var(--rule); }
.section > h2 { margin-bottom: 1.4rem; }
.section > p { max-width: var(--measure); }
.facts { margin: 0; display: grid; gap: 1.25rem; max-width: var(--measure); }
.facts div { display: grid; gap: 0.1rem; }
.facts dt { font-family: var(--display); font-weight: 700; font-size: 1.12rem; }
.facts dd { margin: 0; color: var(--muted); }

.feature { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.4rem 1.25rem 1.3rem; max-width: 44rem; }
.feature:hover { border-color: var(--accent); }
.feature h3 { font-size: clamp(1.4rem, 4.2vw, 1.8rem); line-height: 1.15; letter-spacing: -0.015em; }
.feature h3 a { color: var(--ink); text-decoration: none; }
.feature h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.feature:hover h3 a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.feature h3 a:focus-visible { outline: none; }
.feature:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.meta { list-style: none; padding: 0; font-family: var(--display); font-size: 0.9rem; color: var(--muted); margin: 0.6rem 0 0.9rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.meta li { border: 1px solid var(--rule); border-radius: 999px; padding: 0.15rem 0.6rem; }
.feature p { max-width: var(--measure); }
.feature .go { font-family: var(--display); font-weight: 700; color: var(--accent); }
.next-up { margin-top: 1.5rem; font-size: 1rem; color: var(--muted); max-width: var(--measure); }

.split { display: grid; gap: 1rem; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.4rem 1.25rem 1.2rem; }
.panel h3 { margin-bottom: 0.6rem; font-size: 1.35rem; }
.panel ul { margin: 0 0 1rem; padding-left: 1.15rem; }
.panel li { margin-bottom: 0.55rem; }
.links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.25rem; font-family: var(--display); font-weight: 700; font-size: 1rem; margin: 0.5rem 0 0; }
.links a { display: inline-flex; min-height: 44px; align-items: center; }

/* ===== Knowledge check: the loud block ===== */
.check { background: var(--q-bg); color: var(--q-ink); border-top: 1px solid var(--q-rule); border-bottom: 1px solid var(--q-rule); }
.check a { color: var(--q-accent); }
.check :focus-visible { outline-color: var(--mark); }
.check .wrap { max-width: 46rem; margin: 0 auto; padding: 3.5rem var(--gutter) 3.75rem; }
.check .kicker { font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--q-muted); margin: 0 0 0.6rem; }
.check h2 { font-size: clamp(2.2rem, 9vw, 3.6rem); letter-spacing: -0.03em; line-height: 1; }
.check .intro-text { color: var(--q-muted); font-size: 1.1rem; margin: 1rem 0 1.5rem; max-width: 34rem; }
.check .btn { background: var(--mark); color: #141a2e; border-color: var(--mark); }
.check .btn.ghost { background: transparent; color: var(--q-ink); border-color: var(--q-ink); }
.check-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1.5rem; font-family: var(--display); }
.qcount { font-weight: 700; font-size: 1rem; color: var(--q-muted); margin: 0; }
.linkbtn { background: none; border: 0; color: var(--q-accent); cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; font: inherit; font-family: var(--display); font-weight: 700; }
.pips { display: flex; gap: 6px; margin-top: 0.5rem; }
.pips span { width: 34px; height: 6px; border-radius: 3px; background: var(--q-rule); }
.pips span.on { background: var(--q-accent); }
.pips span.right { background: var(--q-success); }
.pips span.wrong { background: var(--q-error); }
.notes-toggle { font-family: var(--display); font-size: 0.95rem; font-weight: 700; color: var(--q-ink); background: transparent; border: 1.5px solid var(--q-field-border); border-radius: 999px; padding: 0.5rem 0.9rem; min-height: 44px; cursor: pointer; }
.notes-toggle[aria-pressed="true"] { background: var(--q-ink); color: var(--q-bg); border-color: var(--q-ink); }
.check fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.check legend { font-family: var(--display); font-weight: 800; font-size: clamp(1.35rem, 5vw, 1.75rem); line-height: 1.2; letter-spacing: -0.015em; padding: 0; margin-bottom: 1.1rem; }
.check legend:focus { outline: none; }
.opts { display: grid; gap: 0.6rem; }
.opt { display: grid; grid-template-columns: 22px 1fr; gap: 0.8rem; align-items: start; background: var(--q-field); border: 1.5px solid var(--q-field-border); border-radius: 12px; padding: 0.9rem 1rem; cursor: pointer; font-size: 1.05rem; line-height: 1.45; }
.opt input { width: 20px; height: 20px; margin: 0.15rem 0 0; accent-color: var(--mark); }
.opt:has(input:checked:not(:disabled)) { border-color: var(--mark); box-shadow: 0 0 0 1px var(--mark); }
.opt:has(input:focus-visible) { outline: 3px solid var(--mark); outline-offset: 2px; }
.opt.is-right { border-color: var(--q-success); box-shadow: 0 0 0 1px var(--q-success); }
.opt.is-wrong { border-color: var(--q-error); box-shadow: 0 0 0 1px var(--q-error); }
.opt .tag { display: block; font-family: var(--display); font-weight: 800; font-size: 0.85rem; margin-top: 0.2rem; }
.opt.is-right .tag { color: var(--q-success); }
.opt.is-wrong .tag { color: var(--q-error); }
.qactions { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; margin-top: 1.25rem; }
.qerror { font-family: var(--display); color: var(--q-error); margin: 0.75rem 0 0; min-height: 1.4em; }
.feedback { margin-top: 1.25rem; padding: 1.1rem 1.15rem; border-radius: 12px; border: 1.5px solid var(--q-rule); background: color-mix(in srgb, var(--q-field) 70%, transparent); }
.feedback h3:focus { outline: 3px solid var(--mark); outline-offset: 4px; }
.feedback h3 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.25rem; margin-bottom: 0.4rem; }
.feedback.right h3 { color: var(--q-success); }
.feedback.wrong h3 { color: var(--q-error); }
.feedback p { margin-bottom: 0.6rem; }
.design-notes { display: none; margin-top: 1rem; padding: 0.9rem 1rem; border-left: 3px solid var(--mark); background: color-mix(in srgb, var(--mark) 10%, transparent); font-size: 0.98rem; }
.notes-on .design-notes { display: block; }
.design-notes dl { margin: 0; display: grid; gap: 0.35rem; }
.design-notes dt { font-family: var(--display); font-weight: 800; font-size: 0.85rem; color: var(--mark); }
.design-notes dd { margin: 0 0 0.35rem; color: var(--q-ink); }
.result h2:focus { outline: none; }
.score { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 14vw, 5.5rem); line-height: 1; letter-spacing: -0.04em; margin: 0.3rem 0 0.75rem; font-variant-numeric: tabular-nums; }
.review { margin: 1rem 0 2rem; padding-left: 1.2rem; }
.review li { margin-bottom: 0.6rem; }
.talk { margin: 2.25rem 0 0; padding-top: 1.75rem; border-top: 1px solid var(--q-rule); }
.talk h3 { font-size: 1.5rem; margin-bottom: 0.9rem; }
.talk .qactions { margin-top: 0; }
.talk-reply { color: var(--q-muted); margin-top: 1rem; }
.namefield { display: grid; gap: 0.35rem; font-family: var(--display); font-weight: 700; margin: 1.75rem 0 0.4rem; max-width: 24rem; }
.namefield input { font: inherit; font-family: var(--body); font-weight: 400; font-size: 1.05rem; color: var(--q-ink); background: var(--q-field); border: 1.5px solid var(--q-field-border); border-radius: 10px; padding: 0.65rem 0.8rem; min-height: 48px; }
.namefield small { font-weight: 500; color: var(--q-muted); font-size: 0.88rem; }

/* Certificate */
.cert { position: relative; background: var(--cert-bg); color: var(--cert-ink); border-radius: 6px; margin: 1.5rem 0 1.25rem; padding: 2rem 1.4rem 1.6rem; text-align: center; border: 2px solid var(--cert-accent); box-shadow: inset 0 0 0 5px var(--cert-bg), inset 0 0 0 6px var(--cert-accent); }
.cert .seal { width: 76px; height: 76px; margin: 0 auto 0.75rem; display: block; }
.cert .seal circle { fill: none; stroke: var(--cert-accent); stroke-width: 3; }
.cert .seal path { fill: none; stroke: var(--cert-accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.cert .c-title { font-family: var(--display); font-weight: 800; font-size: 1rem; color: var(--cert-muted); margin: 0 0 0.6rem; }
.cert .c-name { font-family: var(--body); font-style: italic; font-weight: 600; font-size: clamp(1.8rem, 8vw, 2.6rem); line-height: 1.15; margin: 0 0 0.4rem; overflow-wrap: anywhere; }
.cert .c-course { font-family: var(--display); font-size: 1.05rem; margin: 0 0 0.9rem; }
.cert .c-course strong { background-image: linear-gradient(#f2e35a, #f2e35a); background-repeat: no-repeat; background-size: 100% 100%; padding: 0 3px; }
.cert .c-desc { color: var(--cert-muted); font-size: 0.98rem; max-width: 30rem; margin: 0 auto 0.9rem; }
.cert .c-meta { font-family: var(--display); font-size: 0.9rem; color: var(--cert-muted); display: flex; flex-wrap: wrap; justify-content: center; gap: 0.2rem 1.2rem; margin: 0; }
.cert .c-fine { font-family: var(--display); font-size: 0.78rem; color: var(--cert-muted); margin: 1rem 0 0; }
@media (prefers-reduced-motion: no-preference) {
  .cert.reveal .seal circle { stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 900ms ease forwards; }
  .cert.reveal .seal path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 450ms ease 650ms forwards; }
  .cert.reveal .c-course strong { background-size: 0% 100%; animation: swipe 700ms cubic-bezier(.2,.7,.2,1) 900ms forwards; }
  .cert.reveal { animation: rise 500ms cubic-bezier(.2,.7,.2,1); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes swipe { to { background-size: 100% 100%; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

/* Contact */
.contact-wrap { max-width: 78rem; margin: 0 auto; padding: 0 var(--gutter); }
.contact { border-top: 0; max-width: 46rem; }
#contact-form { display: grid; gap: 1.1rem; max-width: 32rem; margin-top: 1.25rem; }
.form-note { font-family: var(--display); font-size: 0.92rem; color: var(--muted); margin: 0; }
.field { display: grid; gap: 0.35rem; }
#contact-form label { font-family: var(--display); font-weight: 700; font-size: 0.98rem; }
.hp label { display: block; }
#contact-form input, #contact-form textarea { font: inherit; font-family: var(--body); font-weight: 400; font-size: 1.05rem; color: var(--ink); background: var(--field); border: 1.5px solid var(--field-border); border-radius: 10px; padding: 0.7rem 0.8rem; width: 100%; min-height: 48px; }
#contact-form input:focus-visible, #contact-form textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field-error { font-weight: 500; font-size: 0.92rem; color: var(--error); }
textarea { min-height: 9rem; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#contact-form .btn { justify-self: start; }
button[aria-disabled="true"] { opacity: 0.65; cursor: progress; }
.status { font-family: var(--display); font-size: 1rem; margin: 0; min-height: 1.5em; }
.status.ok { color: var(--success); }
.status.err { color: var(--error); }

.site-footer { border-top: 1px solid var(--rule); }
.site-footer .bar { max-width: 78rem; margin: 0 auto; padding: 2rem var(--gutter) 3rem; font-family: var(--display); font-size: 0.9rem; color: var(--muted); }
.site-footer p { max-width: 40rem; }

/* Desktop */
@media (min-width: 1000px) {
  :root { --gutter: 40px; }
  .progress { display: none; }
  .layout { grid-template-columns: 16rem minmax(0, 1fr); column-gap: 4.5rem; }
  .intro { grid-column: 2; grid-row: 1; padding-top: 4.5rem; }
  .objectives { grid-column: 1; grid-row: 1 / span 2; align-self: start; position: sticky; top: 5.5rem; margin-top: 4.6rem; }
  .sections { grid-column: 2; grid-row: 2; }
  .stats { grid-template-columns: repeat(4, 1fr); max-width: 56rem; }
  .split { grid-template-columns: 1fr 1fr; }
  .check .wrap { padding-top: 5rem; padding-bottom: 5rem; }
  .contact-wrap { display: grid; grid-template-columns: 16rem minmax(0, 1fr); column-gap: 4.5rem; }
  .contact { grid-column: 2; }
}

/* ===== Article pages (case study, résumé) ===== */
.article { max-width: 46rem; margin: 0 auto; padding: 2.5rem var(--gutter) 4rem; }
.article .back { font-family: var(--display); font-size: 0.95rem; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.article h1 { font-weight: 800; font-size: clamp(2.1rem, 7.5vw, 3.6rem); line-height: 1.02; letter-spacing: -0.03em; margin: 1rem 0 1rem; }
.article .lede { font-size: 1.22rem; color: var(--muted); }
.summary { margin: 2rem 0 2.5rem; padding: 1.25rem 0; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--rule); display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.summary div { display: grid; gap: 0.1rem; }
.summary dt { font-family: var(--display); font-size: 0.88rem; color: var(--muted); }
.summary dd { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.02rem; line-height: 1.35; }
.article h2 { margin: 2.75rem 0 0.9rem; font-size: 1.6rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.75rem 3rem; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0.05rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 0.95rem; }
.steps h3 { margin-bottom: 0.35rem; }
.callout { border-left: 3px solid var(--accent); padding: 0.25rem 0 0.25rem 1.1rem; margin: 2rem 0; color: var(--muted); }
.cta-band { margin-top: 2.5rem; padding: 1.5rem 1.25rem; border-radius: var(--radius); background: var(--q-bg); color: var(--q-ink); }
.cta-band h2 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.cta-band p { color: var(--q-muted); }
.cta-band .btn { background: var(--mark); color: #141a2e; border-color: var(--mark); }

/* Résumé */
.resume h1 { margin-bottom: 0.4rem; }
.resume .titles, .resume .contact-line { font-family: var(--display); color: var(--muted); font-size: 0.98rem; display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; margin: 0 0 0.4rem; }
.resume .titles { color: var(--ink); font-weight: 700; }
.resume .contact-line { margin-bottom: 1.25rem; }
.resume h2 { font-size: 1.15rem; margin: 2.1rem 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--ink); letter-spacing: 0; }
.job { margin-bottom: 1.5rem; }
.job .head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; align-items: baseline; }
.job h3 { font-size: 1.08rem; }
.job .when { font-family: var(--display); font-size: 0.92rem; color: var(--muted); }
.job .where { font-family: var(--display); font-size: 0.95rem; color: var(--muted); margin: 0.1rem 0 0.5rem; }
.job ul { margin: 0; padding-left: 1.15rem; }
.job li { margin-bottom: 0.35rem; font-size: 1.05rem; }
.skills { font-size: 1.02rem; }
.print-btn { margin-top: 0.5rem; }

@media (max-width: 480px) { .summary { grid-template-columns: 1fr; } }

@media print {
  :root { --paper: #fff; --ink: #000; --muted: #333; --accent: #000; --rule: #999; }
  body { font-size: 10.5pt; line-height: 1.38; background: #fff; color: #000; }
  .site-header, .site-footer, .back, .print-btn, .no-print { display: none !important; }
  .article { padding: 0; max-width: none; }
  .resume h1 { font-size: 22pt; margin-top: 0; }
  .resume h2 { font-size: 11.5pt; margin: 11pt 0 5pt; }
  .job { margin-bottom: 7pt; break-inside: avoid; }
  .job li { font-size: 10.5pt; margin-bottom: 2pt; }
  .resume h2, .job h3, .job .head { break-after: avoid; }
  .skills, .job .where, .resume .titles, .resume .contact-line { font-size: 10pt; }
  a { color: #000; text-decoration: none; }
  @page { margin: 0.55in; }
  /* Printing the certificate prints only the certificate. */
  body.print-cert > *:not(main), body.print-cert main > *:not(.check), body.print-cert .check .wrap > *:not(#check-app), body.print-cert #check-app > *:not(.result), body.print-cert .result > *:not(.cert) { display: none !important; }
  body.print-cert .check { background: #fff; border: 0; }
  body.print-cert .cert { margin: 1in auto 0; max-width: 6.5in; }
}

/* The "Test yourself" link under the objectives is a plain link, not a checklist row. */
.objectives a.textlink { display: inline-flex; grid-template-columns: none; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 0.18em; }

/* Very narrow phones (320px): keep all three nav links on screen. */
@media (max-width: 359px) {
  .site-header nav { gap: 0; font-size: 0.88rem; }
  .site-header nav a { padding-inline: 0.3rem; }
}
.result-title { font-size: clamp(1.8rem, 7vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.result-title:focus { outline: none; }
.result h4, .talk h4 { font-family: var(--display); font-weight: 700; margin: 0 0 0.6rem; }
.talk h4 { font-size: 1.5rem; margin-bottom: 0.9rem; }
.result h4 { font-size: 1.15rem; }

/* Big numbers inside the Video panel */
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0 0 1rem; }
.mini-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 0.2rem; padding: 0.7rem 0.6rem; border-radius: var(--radius-sm); background: var(--accent-soft); }
.mini-stats dt { font-family: var(--display); font-size: 0.8rem; line-height: 1.25; color: var(--ink); }
.mini-stats dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 7vw, 2.1rem); line-height: 1; letter-spacing: -0.03em; color: var(--accent); }

/* Learner feedback case study: results table */
.mini-stats.wide { margin: 0 0 0.5rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.data { width: 100%; border-collapse: collapse; font-family: var(--display); font-size: 0.98rem; font-variant-numeric: tabular-nums; }
.data th, .data td { padding: 0.7rem 0.75rem; text-align: right; border-bottom: 1px solid var(--rule); }
.data thead th { font-size: 0.85rem; color: var(--muted); font-weight: 700; }
.data tbody th { text-align: left; font-weight: 500; color: var(--muted); }
.data tbody td { font-weight: 700; }
.data tbody tr:last-child > * { border-bottom: 0; }
.data th:first-child { padding-left: 1rem; }
.data td:last-child, .data th:last-child { padding-right: 1rem; }
.data .hl { background: var(--mark); color: var(--mark-ink); }
@media (max-width: 400px) { .data { font-size: 0.9rem; } .data th, .data td { padding: 0.6rem 0.45rem; } }
.feature + .feature { margin-top: 1rem; }
