/* ==========================================================================
   Colin Wright — Portfolio
   A single stylesheet. Design tokens first, then a small set of modular
   content blocks reused across every page (and, eventually, slide decks).
   Restraint is the point: near-neutral palette, one accent, generous space.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  /* Color — near-neutral, one intentional accent. Case study images carry
     the real color; everything here stays quiet. */
  --paper:    #faf8f3;   /* warm off-white background */
  --paper-2:  #f1ede4;   /* faintly recessed surface (placeholder fills) */
  --ink:      #1c1b18;   /* near-black text */
  --muted:    #6c685e;   /* secondary text, captions — 5.24:1 on paper (AA) */
  --faint:    #6f6b5f;   /* tertiary / metadata — 5.02:1 on paper, 4.56:1 on paper-2 (AA) */
  --hairline: #e4dfd3;   /* hairline rules + borders */
  --accent:   #335a6b;   /* the one accent — a quiet, considered blue */
  --accent-deep: #244451;

  /* Type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Fluid type scale */
  --fs-xs:  0.78rem;
  --fs-sm:  0.9rem;
  --fs-base: clamp(1.06rem, 0.98rem + 0.4vw, 1.22rem);
  --fs-lede: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  --fs-h3:  clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  --fs-h2:  clamp(1.5rem, 1.25rem + 1vw, 2.1rem);
  --fs-h1:  clamp(2.1rem, 1.6rem + 2.4vw, 3.5rem);

  /* Spacing rhythm */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 3rem;
  --space-5: 5rem;
  --space-6: 8rem;

  /* Measure */
  --measure: 68ch;       /* comfortable reading width for prose */
  --wide:    1080px;     /* outer page width for figures / cards */

  --radius: 4px;
}

/* ---- Reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-base);
  line-height: 1.65;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1px;
  transition: color 120ms ease;
}
a:hover { color: var(--accent-deep); text-decoration: underline; }

/* WCAG 1.4.1 (Use of Color): links inside running text need a non-color cue.
   Link/body-text contrast is < 3:1, so in-prose links carry a persistent
   underline. Standalone controls (nav, footer, buttons, the big serif link
   lists) are distinguishable by position and styling, so they're excluded. */
.lede a,
.prose p a,
.prose li a,
p.prose a,
figcaption a,
.contact-line a { text-decoration: underline; text-underline-offset: 0.16em; text-decoration-thickness: 1px; }

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 var(--space-2); }

::selection { background: rgba(51, 90, 107, 0.16); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute; left: var(--space-2); top: -3rem;
  background: var(--ink); color: var(--paper);
  padding: 0.5rem 0.9rem; border-radius: var(--radius);
  font-family: var(--sans); font-size: var(--fs-sm);
  z-index: 100; transition: top 120ms ease;
}
.skip-link:focus { top: var(--space-2); color: var(--paper); }

/* Skip-link target: focusable container shouldn't draw its own outline box */
main[tabindex="-1"]:focus { outline: none; }

/* ---- Layout containers -------------------------------------------------- */
.page { max-width: var(--wide); margin: 0 auto; padding: 0 var(--space-3); }

/* A vertical rhythm wrapper for prose-width content */
.prose { max-width: var(--measure); }

/* Main content gets breathing room top and bottom */
main { display: block; padding: var(--space-5) 0 var(--space-6); }

/* A generic stacked section with space above it */
.section { margin-top: var(--space-5); }
.section--tight { margin-top: var(--space-4); }

/* Eyebrow label above section headings */
.eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 var(--space-1);
}

/* ---- Header (site-header custom element) -------------------------------- */
.site-header {
  border-bottom: 1px solid var(--hairline);
}
.site-header__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: var(--space-3);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.wordmark:hover { color: var(--ink); text-decoration: none; }
.site-nav {
  display: flex;
  gap: var(--space-3);
  font-family: var(--sans);
  font-size: var(--fs-sm);
}
.site-nav a {
  color: var(--muted);
  letter-spacing: 0.01em;
}
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.3em;
}

/* ---- Footer (site-footer custom element) -------------------------------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  font-family: var(--sans);
  font-size: var(--fs-sm);
}
.site-footer__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: var(--space-4) var(--space-3) var(--space-5);
  display: grid;
  gap: var(--space-3);
}
.footer-contact { display: grid; gap: 0.35rem; }
.footer-contact a.email {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.9rem);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  width: fit-content;
}
.footer-contact a.email:hover { color: var(--accent); text-decoration: none; }
.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}
.availability::before {
  content: "";
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: #4f8a5b;          /* quiet green "available" dot */
  flex: none;
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  color: var(--faint);
  padding-top: var(--space-2);
  border-top: 1px solid var(--hairline);
}
.footer-meta a { color: var(--faint); }
.footer-meta a:hover { color: var(--ink); text-decoration: none; }

/* ---- Lede / intro ------------------------------------------------------- */
.lede {
  font-size: var(--fs-lede);
  line-height: 1.45;
  max-width: 30ch + var(--measure);
  max-width: min(46ch, 100%);
  color: var(--ink);
}
.lede--wide { max-width: min(58ch, 100%); }
.lede p { margin-bottom: var(--space-2); }
.lede .quiet { color: var(--muted); }

/* ---- Tags --------------------------------------------------------------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tag {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: 100px;
  padding: 0.28rem 0.7rem;
  white-space: nowrap;
}
.tag--baseline { background: transparent; }

/* ---- Case study cards (landing) ----------------------------------------- */
.case-list {
  display: grid;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-card {
  display: grid;
  grid-template-columns: minmax(0, 360px) 1fr;
  gap: var(--space-4);
  align-items: start;
}
.case-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.case-card__media img { width: 100%; height: 100%; object-fit: cover; }
.case-card__media:hover { border-color: var(--faint); }
.case-card__body { padding-top: 0.25rem; }
.case-card__title {
  margin: 0 0 0.4rem;
}
.case-card__title a { color: var(--ink); }
.case-card__title a:hover { color: var(--accent); text-decoration: none; }
.case-card .tags { margin-bottom: var(--space-2); }
.case-card__desc { color: var(--muted); margin-bottom: var(--space-2); }
.card-more {
  font-family: var(--sans);
  font-size: var(--fs-sm);
}

/* ---- Figures ------------------------------------------------------------ */
figure { margin: 0; }
.figure {
  margin: var(--space-4) 0;
}
.figure__frame {
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.figure--wide { max-width: var(--wide); }
figcaption {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: 0.7rem;
  max-width: var(--measure);
}

/* Placeholder image box: a labeled, correctly-sized stand-in */
.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    repeating-linear-gradient(
      -45deg,
      var(--paper-2),
      var(--paper-2) 11px,
      #ece7db 11px,
      #ece7db 22px
    );
  color: var(--muted);
  font-family: var(--sans);
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  padding: var(--space-3);
}
.ph span { max-width: 40ch; }
.ph--4x3  { aspect-ratio: 4 / 3; }
.ph--16x9 { aspect-ratio: 16 / 9; }
.ph--1x1  { aspect-ratio: 1 / 1; }
.ph--3x1  { aspect-ratio: 3 / 1; }
.ph--phone { aspect-ratio: 9 / 16; }

/* ---- Text-beside-image block -------------------------------------------- */
.text-figure {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: center;
  margin: var(--space-4) 0;
}
.text-figure--flip .text-figure__media { order: -1; }
.text-figure__text { max-width: 46ch; }
.text-figure__text h3 { margin-bottom: var(--space-1); }
.text-figure__text p { color: var(--muted); }
.text-figure__media figcaption { margin-top: 0.6rem; }

/* ---- Compare block (rejected vs chosen copy) ---------------------------- */
.compare {
  margin: var(--space-4) 0;
}
.compare__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
.compare__col {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: var(--space-3);
  background: var(--paper);
}
.compare__col--rejected { background: var(--paper-2); }
.compare__label {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}
.compare__col--rejected .compare__label { color: var(--faint); }
.compare__col--chosen .compare__label { color: var(--accent); }
.compare__copy {
  font-size: 1.05rem;
  line-height: 1.5;
}
.compare__col--rejected .compare__copy { color: var(--muted); }
.compare__rationale {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: var(--space-2);
  max-width: var(--measure);
}
.compare__rationale strong { color: var(--ink); font-weight: 600; }

/* ---- Voice system: principles, tone sliders, guardrails, rules ---------- */
/* The voice section's evidence: how a "neighborhood mechanic" feeling is
   pinned down into rules, a tone position, guardrails, and component specs. */
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin: var(--space-3) 0;
}
.principle {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: var(--space-3);
  background: var(--paper);
}
.principle__n {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 var(--space-1);
}
.principle__name {
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}
.principle > p:not([class]) {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: var(--space-2);
}
.usage {
  margin: 0;
  padding-top: var(--space-2);
  border-top: 1px solid var(--hairline);
  font-family: var(--sans);
  font-size: var(--fs-sm);
  display: grid;
  gap: 0.45rem;
}
.usage > div { display: grid; grid-template-columns: 4rem 1fr; gap: 0.5rem; }
.usage dt {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.5;
}
.usage dd { margin: 0; color: var(--ink); }
.usage dd.usage__avoid { color: var(--muted); }

/* Tone sliders — a "mixing board" showing where the voice lands */
.sliders {
  list-style: none;
  margin: var(--space-3) 0;
  padding: var(--space-3) var(--space-4);
  display: grid;
  gap: var(--space-3);
  max-width: var(--measure);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--paper);
}
.slider {
  display: grid;
  grid-template-columns: minmax(7ch, auto) 1fr minmax(7ch, auto);
  align-items: center;
  gap: var(--space-2);
  font-family: var(--sans);
  font-size: var(--fs-sm);
}
.slider__end { color: var(--faint); }
.slider__end:first-child { text-align: right; }
.slider__end--active { color: var(--ink); font-weight: 600; }
.slider__track {
  position: relative;
  height: 2px;
  background: var(--hairline);
  border-radius: 2px;
}
.slider__dot {
  position: absolute;
  top: 50%;
  left: var(--pos, 50%);
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--paper);
}

/* "This, but not that" guardrails */
.guardrails {
  list-style: none;
  margin: var(--space-3) 0;
  padding: var(--space-3) var(--space-4);
  max-width: var(--measure);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--paper);
}
.guardrails li {
  font-size: var(--fs-h3);
  line-height: 1.3;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--hairline);
}
.guardrails li:first-child { padding-top: 0; border-top: 0; }
.guardrails li:last-child { padding-bottom: 0; }
.guardrails__is { color: var(--ink); font-weight: 600; }
.guardrails__not { color: var(--muted); }

/* Component rules table */
.rules-wrap {
  margin: var(--space-3) 0;
  overflow-x: auto;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--paper);
}
.rules {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: var(--fs-sm);
  min-width: 32rem;
}
.rules th, .rules td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-2);
  border-top: 1px solid var(--hairline);
}
.rules thead th {
  border-top: 0;
  padding-top: 0;
  padding-bottom: var(--space-1);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}
.rules tbody th { width: 24%; color: var(--ink); font-weight: 600; }
/* Group delineator row (e.g. "In the newsletter" / "Beyond the newsletter") */
.rules tr.rules__group th {
  width: auto;
  padding-top: var(--space-3);
  padding-bottom: var(--space-1);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.rules tbody:first-of-type tr.rules__group th { padding-top: var(--space-1); border-top: 0; }
.rules__do { display: block; color: var(--ink); font-weight: 600; }
.rules__note { display: block; color: var(--muted); margin-top: 0.3rem; font-size: var(--fs-xs); line-height: 1.45; }
.rules__dont { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }

/* ---- Pull quote --------------------------------------------------------- */
.pullquote {
  border-left: 2px solid var(--accent);
  padding-left: var(--space-3);
  margin: var(--space-4) 0;
  font-size: var(--fs-h3);
  line-height: 1.35;
  color: var(--ink);
  max-width: 34ch;
}

/* ---- Prose helpers ------------------------------------------------------ */
.prose h2 { margin-top: var(--space-4); margin-bottom: var(--space-2); }
.prose h3 { margin-top: var(--space-3); margin-bottom: var(--space-1); }
.prose h4 { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; margin: var(--space-4) 0 var(--space-1); }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 var(--space-2); }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--faint); }
.prose .placeholder-note {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  color: var(--accent-deep);
  background: var(--paper-2);
  border: 1px dashed var(--faint);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
}

/* ---- Page header block (case studies / interior pages) ------------------ */
.page-head {
  max-width: var(--measure);
  margin-bottom: var(--space-4);
}
.page-head h1 { margin-bottom: var(--space-2); }
.page-head .tags { margin-top: var(--space-2); }
.page-head .deck {
  font-size: var(--fs-lede);
  line-height: 1.45;
  color: var(--muted);
  max-width: 50ch;
}

/* ---- Wayfinding list (404 / dead-end pages) ----------------------------- */
.wayfinding {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0 var(--space-4);
  max-width: var(--measure);
}
.wayfinding li {
  padding: var(--space-2) 0;
  border-top: 1px solid var(--hairline);
}
.wayfinding li:last-child { border-bottom: 1px solid var(--hairline); }
.wayfinding a {
  font-family: var(--serif);
  font-size: var(--fs-h3);
  color: var(--ink);
}
.wayfinding a:hover { color: var(--accent); text-decoration: none; }
.wayfinding a::after { content: " \2192"; color: var(--faint); }
.wayfinding p {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  color: var(--muted);
  margin: 0.25rem 0 0;
  max-width: 52ch;
}

/* ---- "Next case study" link --------------------------------------------- */
.next-link {
  margin-top: var(--space-6);
  padding-top: var(--space-3);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.next-link__eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.next-link a {
  font-family: var(--serif);
  font-size: var(--fs-h3);
  color: var(--ink);
  width: fit-content;
}
.next-link a:hover { color: var(--accent); text-decoration: none; }
.next-link a::after { content: " \2192"; color: var(--faint); }

/* ---- Buttons / download link -------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.6rem 1.1rem;
  text-decoration: none;
}
.button:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--paper); text-decoration: none; }
/* Buttons never underline, even inside prose (beats .prose p a). */
.prose a.button, .prose a.button:hover { text-decoration: none; }
.button--ghost {
  color: var(--ink);
  background: transparent;
}
.button--ghost:hover { color: var(--ink); background: var(--paper-2); border-color: var(--faint); }

/* ---- Résumé ------------------------------------------------------------- */
.resume-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--hairline);
}
.resume-header .contact-line {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: 0.5rem;
}
.resume-section { margin-top: var(--space-4); }
.resume-section > h2 {
  font-size: var(--fs-h3);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--space-2);
}
.resume-entry { margin-bottom: var(--space-3); max-width: var(--measure); }
.resume-entry__head {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}
/* Let a long role/org line wrap on its own while the dates stay pinned top-right. */
.resume-entry__head > span:first-child { flex: 1 1 auto; min-width: 0; }
.resume-entry__role { font-weight: 600; }
.resume-entry__org { color: var(--muted); }
.resume-entry__dates {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  color: var(--faint);
  white-space: nowrap;
}
.resume-entry ul { margin-top: 0.4rem; }
.resume-section > p { max-width: var(--measure); }
.resume-skills { max-width: var(--measure); list-style: none; padding-left: 0; margin: 0; }
.resume-skills li { margin-bottom: 0.4rem; }

/* Small shared utilities (replacing one-off inline styles) */
.quiet { color: var(--muted); }
.prose .tags { margin-top: var(--space-2); }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 720px) {
  main { padding-top: var(--space-4); padding-bottom: var(--space-5); }
  .section { margin-top: var(--space-4); }

  .case-card { grid-template-columns: 1fr; gap: var(--space-2); }
  .case-card__media { max-width: 420px; }

  .text-figure { grid-template-columns: 1fr; gap: var(--space-2); }
  .text-figure--flip .text-figure__media { order: 0; }

  .compare__grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }

  /* Component-rules table → stacked cards (no horizontal scroll on mobile) */
  .rules-wrap { overflow-x: visible; padding: 0; border: 0; background: none; }
  .rules { min-width: 0; }
  .rules thead { display: none; }
  .rules, .rules tbody, .rules tr, .rules tbody th, .rules td { display: block; }
  .rules tr {
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-2);
  }
  .rules tbody th {
    width: auto;
    padding: 0 0 var(--space-1);
    margin-bottom: var(--space-1);
    border: 0;
    border-bottom: 1px solid var(--hairline);
  }
  .rules td { padding: var(--space-2) 0 0; border: 0; }
  .rules td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.15rem;
    font-size: var(--fs-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faint);
  }
  /* Group label → plain section heading between card groups, not a card */
  .rules tr.rules__group {
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: var(--space-3) 0 var(--space-1);
    background: none;
  }
  .rules tbody:first-of-type tr.rules__group { margin-top: 0; }
  .rules tr.rules__group th { padding: 0; margin: 0; border: 0; }

  .site-header__inner { padding: var(--space-2) var(--space-3); }
  .site-nav { gap: var(--space-2); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---- Print (résumé → PDF) ----------------------------------------------- */
@media print {
  :root { --paper: #fff; --ink: #000; }
  body { font-size: 11pt; line-height: 1.4; }
  site-header, site-footer, .site-header, .site-footer,
  .print-hide, .skip-link { display: none !important; }
  main { padding: 0; }
  a { color: #000; text-decoration: none; }
  .resume-section { break-inside: avoid; }
  .resume-entry { break-inside: avoid; }
  .page { padding: 0; max-width: none; }
}
