/*
  Tommy Gao portfolio. One hand-written stylesheet: no framework, no preprocessor.
  Mobile-first; breakpoints at 600, 768, 1024 and 1200px.
  Navy masthead, canvas page, pastel domain surfaces, one green accent, one icon family.
  Public Sans throughout (the "What I learned" pull-quote is its italic); IBM Plex Mono for
  labels, evidence values and kind tags.
*/

/* ------------------------------------------------------------------ tokens */

:root {
  --navy: #0B2F43;
  --navy-2: #123D55;
  --ink: #173342;
  --canvas: #F6F8FB;
  --white: #FFFFFF;
  --line: #DDE6EB;
  --line-strong: #C3D2DA;
  --muted: #59717E;
  --muted-strong: #4F6672; /* small text on pastel surfaces */
  --green: #247763;
  --green-dark: #1B5E4D;
  --green-soft: #E3F1EC;
  --signal: #D8A34D;       /* the AI stage marker in the System Spine */
  --on-navy: #FFFFFF;
  --on-navy-muted: #C4D6E0;
  --focus: #247763;

  /* Pastel section surfaces and the darker ink that goes with each (AA on white and on its pastel). */
  --blue: #E6F2FC;     --blue-ink: #1F5F8B;
  --mint: #E7F5EE;     --mint-ink: #1E6B4F;
  --sand: #FBF1DF;     --sand-ink: #87580F;
  --lavender: #EEEAF9; --lavender-ink: #5A4A9C;
  --rose: #FBEAEC;     --rose-ink: #A0374A;
  --teal: #E3F3F2;     --teal-ink: #1C6A69;

  /* One stable colour per domain. */
  --domain-finance-operations: var(--blue);
  --domain-commercial-pricing: var(--mint);
  --domain-logistics: var(--sand);
  --domain-finance-planning: var(--lavender);
  --domain-ai-operations: var(--rose);
  --domain-governed-data: var(--teal);

  /* Set per domain by .domain--<colour>; neutral elsewhere. */
  --surface: var(--white);
  --accent: var(--green);

  --sans: "Public Sans", system-ui, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "IBM Plex Mono Fallback", ui-monospace, monospace;

  --max: 1280px;
  --gutter: clamp(16px, 3.4vw, 40px);
  --gap: 24px;
  --space: clamp(32px, 3.6vw, 48px);
  --radius: 14px;
  --radius-lg: 16px;

  --fs-label: 0.8125rem;  /* 13px: the floor for labels */
  --fs-small: 0.9375rem;  /* 15px */
  --fs-h1: clamp(2rem, 1.4rem + 2vw, 2.75rem);
  --fs-h2: clamp(1.75rem, 1.45rem + 0.9vw, 2.125rem);
  --fs-h3: clamp(1.25rem, 1.15rem + 0.35vw, 1.4375rem);
}

.domain--blue { --surface: var(--blue); --accent: var(--blue-ink); }
.domain--mint { --surface: var(--mint); --accent: var(--mint-ink); }
.domain--sand { --surface: var(--sand); --accent: var(--sand-ink); }
.domain--lavender { --surface: var(--lavender); --accent: var(--lavender-ink); }
.domain--rose { --surface: var(--rose); --accent: var(--rose-ink); }
.domain--teal { --surface: var(--teal); --accent: var(--teal-ink); }

/* ------------------------------------------------------------------ base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--canvas);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

@media (min-width: 1024px) {
  body { font-size: 1.0625rem; }
}

[hidden] { display: none !important; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
svg { display: block; }
img { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.22em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }

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

::selection { background: var(--green-soft); color: var(--ink); }

kbd {
  font-family: var(--mono);
  font-size: 0.875em;
  padding: 0 0.35em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
}

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

.sprite { display: none; }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -120px;
  z-index: 30;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 8px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  flex: none;
  width: 22px;
  height: 22px;
}
.icon--domain { width: 36px; height: 36px; }
.icon--arrow { width: 18px; height: 18px; transition: transform 0.15s ease; }
a:hover .icon--arrow { transform: translateX(3px); }

/* Small shared labels: mono, tracked, uppercase. */
.label,
.kicker,
.case-kicker,
.signal__key,
.work-item__domain,
.project-card__kicker,
.facts dt,
.stack-group__title,
.spine-note__stage,
.spine-caption__label {
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}
.label { color: var(--muted-strong); }

.prose { max-width: 68ch; }

/* ------------------------------------------------------------------ evidence tags and status */

.tag {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: 0.1em;
}
.tag--realised { background: #E3F1EC; border-color: #A9D3C4; color: #1B5E4D; }
.tag--estimated { background: #FBF1DF; border-color: #E6C68F; color: #7A4E0E; }
.tag--structural { background: #E6F2FC; border-color: #B3D2EC; color: #1F5A84; }
.tag--current { background: #EEEAF9; border-color: #CEC5EC; color: #4E3F8F; }
.tag--inferred { background: #F3F5F7; border-color: #AFC0C9; border-style: dashed; color: #4F6672; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 10px;
  border: 1px solid #9CCFBE;
  border-radius: 999px;
  background: var(--white);
  color: var(--green-dark);
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

/* ------------------------------------------------------------------ buttons and disclosures */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.button--primary { background: var(--navy); color: var(--white); }
.button--primary:hover { background: var(--navy-2); color: var(--white); }
.button--secondary { background: var(--white); border-color: var(--line-strong); color: var(--ink); }
.button--secondary:hover { border-color: var(--ink); color: var(--ink); }
.button--ghost { border-color: rgba(255, 255, 255, 0.55); color: var(--on-navy); }
.button--ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); color: var(--white); }

.disclosure {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.disclosure > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--mono);
  font-size: 1.125rem;
  color: var(--muted);
}
.disclosure[open] > summary::after { content: "\2212"; }
.disclosure > :not(summary) { padding: 0 16px 16px; }
.disclosure--inline { display: inline-block; border: 0; background: none; }
.disclosure--inline > summary {
  min-height: 44px;
  padding: 8px 0;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.22em;
}
.disclosure--inline > summary::after { content: none; }
.disclosure--inline > :not(summary) { padding: 0 0 8px; font-size: var(--fs-small); color: var(--muted-strong); }

/* ------------------------------------------------------------------ header */

.site-header {
  position: relative;
  z-index: 10;
  background: var(--navy);
  color: var(--on-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  --focus: #9AD9C4;
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--on-navy);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--white); }
/* Two controls carry the same links: the list from 768px, a <details> menu below it. Exactly one is
   shown at each width without script, so the header has its final height on first paint. */
.nav-list { display: none; flex-wrap: wrap; gap: 0 4px; }
.nav-list a,
.nav-menu__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--on-navy-muted);
  font-size: var(--fs-small);
  font-weight: 500;
  text-decoration: none;
}
.nav-list a:hover,
.nav-menu__list a:hover { color: var(--white); background: rgba(255, 255, 255, 0.08); }

.nav-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  color: var(--on-navy);
  font-size: var(--fs-small);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.nav-menu__toggle::-webkit-details-marker { display: none; }
.nav-menu__close,
.nav-menu[open] .nav-menu__open { display: none; }
.nav-menu[open] .nav-menu__close { display: block; }
.nav-menu__list {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: flex;
  flex-direction: column;
  padding: 8px var(--gutter) 16px;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.nav-menu__list a { width: 100%; padding: 0 8px; font-size: 1rem; }

@media (min-width: 768px) {
  .nav-list { display: flex; }
  .nav-menu { display: none; }
}

/* ------------------------------------------------------------------ A. masthead */

.masthead {
  background: var(--navy);
  color: var(--on-navy);
  --focus: #9AD9C4;
}
.masthead__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding-block: 28px 32px;
}
.masthead__who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
}
.masthead__name { font-size: 1.25rem; font-weight: 600; letter-spacing: 0.01em; }
.masthead__kicker { font-size: var(--fs-small); color: var(--on-navy-muted); }
.masthead__statement {
  margin-top: 14px;
  max-width: 16em;
  font-size: clamp(2rem, 1.3rem + 2.2vw, 2.875rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.masthead__supporting {
  margin-top: 14px;
  max-width: 40em;
  color: var(--on-navy-muted);
}
.masthead__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.masthead .button--primary { background: var(--white); color: var(--navy); }
.masthead .button--primary:hover { background: #E8F1F6; color: var(--navy); }
/* The illustration follows the text and actions on small screens, so it never pushes them down. */
.masthead__media { max-width: 560px; }
.masthead__media .editorial-img { width: 100%; border-radius: var(--radius-lg); background: #F8F5EF; }

@media (min-width: 1024px) {
  .masthead__grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    column-gap: 48px;
    align-items: center;
    padding-block: 40px 44px;
  }
  .masthead__statement { font-size: clamp(2.25rem, 0.9rem + 2.1vw, 2.75rem); max-width: 15em; }
  .masthead__supporting { margin-top: 16px; }
  .masthead__actions { margin-top: 24px; }
  .masthead__media { max-width: none; }
}

/* ------------------------------------------------------------------ B. what I bring */

.strengths-band {
  padding-block: 28px 32px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.strengths__title {
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-strong);
}
.strengths {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 16px;
}
.strength {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 4px;
  align-items: start;
  align-content: start;
}
.strength__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
}
.strength__icon .icon { width: 24px; height: 24px; }
.strength__title { align-self: center; font-size: 1.0625rem; color: var(--navy); }
.strength__text { font-size: var(--fs-small); line-height: 1.5; }

@media (min-width: 600px) {
  .strengths { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
}
@media (min-width: 1024px) {
  .strengths { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .strength { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .strength__icon { grid-row: auto; }
  .strength__text { font-size: 1rem; }
}

/* ------------------------------------------------------------------ sections */

.section { padding-block: var(--space); }
.section--tint { background: var(--surface); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 20px;
}
.section-title { font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.01em; color: var(--navy); }
.section-intro { max-width: 60ch; color: var(--muted); }
.subhead { font-size: var(--fs-h3); color: var(--navy); }

/* ------------------------------------------------------------------ C. domain panels */

.section--domains .section-head { flex-direction: column; align-items: flex-start; }
.domain-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
.domain-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 4px;
  border: 1px solid rgba(23, 51, 66, 0.1);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.domain-panel:hover { transform: translateY(-2px); border-color: var(--accent); }
.domain-panel__head { display: flex; align-items: center; gap: 12px; }
.domain-panel__icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--white);
  color: var(--accent);
}
.domain-panel__icon .icon--domain { width: 32px; height: 32px; }
.domain-panel__title { font-size: 1.25rem; color: var(--navy); }
.domain-panel__value { font-size: 1rem; line-height: 1.45; }
.panel__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  min-height: 44px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 0.22em;
}
.panel__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
}
.panel__link:focus-visible { outline: none; }
.panel__link:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 3px; }
.domain-panel:hover .panel__link .icon--arrow { transform: translateX(3px); }

@media (min-width: 600px) {
  .domain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .domain-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}

/* ------------------------------------------------------------------ E. selected work */

.section--work { background: var(--white); border-top: 1px solid var(--line); }
.work-list { border-top: 1px solid var(--line); }
.work-item { border-bottom: 1px solid var(--line); }
.work-item__link {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  grid-template-areas:
    "num main arrow"
    "num result result"
    "num meta meta";
  gap: 4px 12px;
  align-items: start;
  padding: 16px 8px 16px 0;
  border-left: 3px solid transparent;
  color: var(--ink);
  text-decoration: none;
}
.work-item__link:hover { color: var(--ink); background: var(--canvas); border-left-color: var(--accent); }
.work-item__num { grid-area: num; padding-left: 10px; font-family: var(--mono); font-size: var(--fs-label); color: var(--muted); line-height: 2; }
.work-item__main { grid-area: main; display: grid; gap: 2px; }
.work-item__domain { color: var(--accent); }
.work-item__title { font-size: 1.25rem; font-weight: 600; color: var(--navy); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; }
.work-item__link:hover .work-item__title { text-decoration-color: var(--accent); }
.work-item__result { grid-area: result; max-width: 70ch; }
.work-item__meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.work-item__meta:empty { display: none; }
/* A long status wraps inside its column rather than running into the arrow. */
.work-item__meta .status { white-space: normal; }
.work-item__link > .icon--arrow { grid-area: arrow; margin-top: 4px; color: var(--accent); }

@media (min-width: 1024px) {
  .work-item__link {
    grid-template-columns: 3rem minmax(0, 16rem) minmax(0, 1fr) minmax(0, 14rem) 24px;
    grid-template-areas: "num main result meta arrow";
    gap: 24px;
    padding-block: 18px;
  }
  .work-item__meta { margin-top: 2px; }
  .work-item__meta:empty { display: flex; }
  .work-item__num { line-height: 1.9; }
}

/* ------------------------------------------------------------------ D. how I work */

/* One neutral surface and the green accent for every step: the six pastels stay reserved for the
   six domains, so a colour always means the same domain. */
.method-steps {
  --surface: var(--green-soft);
  --accent: var(--green);
  position: relative;
  display: grid;
  gap: 0;
  margin-top: 24px;
}
.method-step { position: relative; }
.method-step__head { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.method-step__icon {
  position: absolute;
  left: 0;
  top: 0;
  box-sizing: content-box;
  width: 22px;
  height: 22px;
  padding: 10px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
}
.method-step__title { font-size: 1.0625rem; color: var(--navy); }
.method-step__num { font-family: var(--mono); font-weight: 500; color: var(--muted-strong); margin-right: 4px; }
.method-step__text { font-size: var(--fs-small); line-height: 1.5; }

/* Small screens: an ordered list on a vertical rail. */
@media (max-width: 599.98px) {
  .method-step { padding: 0 0 18px 60px; }
  .method-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 21px;
    top: 44px;
    bottom: 0;
    width: 2px;
    background: var(--line-strong);
  }
}
@media (min-width: 600px) {
  .method-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .method-step { padding: 14px 16px 16px; border-radius: 12px; background: var(--surface); }
  .method-step__icon { position: static; padding: 0; background: none; }
  .method-step__head { min-height: 0; margin-bottom: 6px; }
}
@media (min-width: 768px) {
  .method-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Connected chevrons on wide screens, as in the reference journey. */
@media (min-width: 1024px) {
  .method-steps { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0 6px; }
  .method-step { padding: 0; background: none; border-radius: 0; }
  .method-step__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-height: 92px;
    margin: 0 0 10px;
    padding: 14px 26px 14px 26px;
    background: var(--surface);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%, 16px 50%);
  }
  .method-step:first-child .method-step__head {
    padding-left: 16px;
    border-radius: 12px 0 0 12px;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%);
  }
  .method-step__title { font-size: 1rem; }
  .method-step__text { padding-inline: 16px 10px; }
  .method-step:first-child .method-step__text { padding-left: 6px; }
}

/* ------------------------------------------------------------------ G. about and contact */

.close-band { background: var(--white); border-top: 1px solid var(--line); }
.close-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  padding-block: var(--space);
}
.about .section-title,
.contact .section-title { margin-bottom: 12px; }
.about__lead { max-width: 52ch; font-size: 1.125rem; line-height: 1.55; }
.facts { display: grid; gap: 0; margin-top: 18px; border-top: 1px solid var(--line); }
.facts__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px 20px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--muted-strong); padding-top: 3px; }
.facts dd { font-size: var(--fs-small); }
.stack-disclosure { margin-top: 18px; }
.stack-groups { display: grid; gap: 14px; }
.stack-group__title { color: var(--muted-strong); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--canvas);
  font-size: 0.875rem;
  line-height: 1.5;
}
.contact {
  align-self: start;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: var(--on-navy);
  --focus: #9AD9C4;
}
.contact .section-title { color: var(--white); }
.contact__lead { color: var(--on-navy-muted); }
.contact .chips { margin-top: 14px; }
.contact .chip { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.22); color: var(--on-navy); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.contact__actions .button .icon { width: 18px; height: 18px; }
/* On the navy card the primary action is a white button and the secondaries are outlined, so the hierarchy reads as on the masthead. */
.contact .button--primary { background: var(--white); color: var(--navy); }
.contact .button--primary:hover { background: #E8F1F6; color: var(--navy); }
.contact .button--secondary { background: transparent; border-color: rgba(255, 255, 255, 0.55); color: var(--on-navy); }
.contact .button--secondary:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); color: var(--white); }
.contact__note {
  margin-top: 14px;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--on-navy-muted);
}

/* Enquiry form on the navy card: white fields, light labels, errors in a pale coral that meets AA on navy. */
.contact-form { display: grid; gap: 14px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.contact-form__title { font-size: 1.125rem; }
.field { display: grid; gap: 6px; }
.field__label { font-size: var(--fs-small); font-weight: 600; }
.field__input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}
textarea.field__input { resize: vertical; min-height: 120px; }
.field__input:focus-visible { outline: 3px solid #9AD9C4; outline-offset: 2px; }
.field__input[aria-invalid="true"] { border-color: #FFB4AB; box-shadow: 0 0 0 1px #FFB4AB; }
.field__error { font-size: var(--fs-small); color: #FFC9C2; }
/* A <button> does not inherit the page font, so the submit button sets it to match the link buttons. */
.contact-form__submit { justify-self: start; font-family: inherit; font-size: 1rem; cursor: pointer; }
.contact-form__submit:disabled { opacity: 0.7; cursor: progress; }
.contact-form__status:empty { display: none; }
.contact-form__status, .contact-form__failure { font-size: var(--fs-small); line-height: 1.5; }
.contact-form__failure a { color: var(--white); }
/* The honeypot stays in the form for bots but is never shown or announced. */
.contact-form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 600px) {
  .facts__row { grid-template-columns: 11rem minmax(0, 1fr); }
  .stack-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .close-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; }
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  background: var(--navy);
  color: var(--on-navy-muted);
  font-size: var(--fs-small);
  --focus: #9AD9C4;
}
.site-footer__inner {
  display: grid;
  gap: 12px;
  padding-block: 28px;
}
.site-footer__name { color: var(--white); font-weight: 600; }
.site-footer__note { max-width: 70ch; }
.site-footer__updated { font-family: var(--mono); font-size: var(--fs-label); }

@media (min-width: 1024px) {
  .site-footer__inner { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) auto; gap: 32px; align-items: start; }
}

/* ------------------------------------------------------------------ page heads (domain, project, 404) */

.page-head {
  position: relative;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding-block: 0 28px;
}
.page-head::before {
  content: "";
  display: block;
  height: 6px;
  margin-bottom: 18px;
  background: var(--accent);
}
.page-not-found .page-head::before { background: var(--navy); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; font-size: var(--fs-small); color: var(--muted); }
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "\203A"; color: var(--muted); }
.breadcrumb a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; color: var(--muted-strong); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 500; }
.page-head__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 8px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); }
.kicker .icon--domain { width: 32px; height: 32px; }
.page-title {
  margin-top: 10px;
  font-size: var(--fs-h1);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--navy);
}
.standfirst { margin-top: 12px; max-width: 58ch; font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem); line-height: 1.5; }
.page-head__actions { margin-top: 20px; }
.figure img { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.figure figcaption { margin-top: 8px; font-size: 0.875rem; line-height: 1.45; color: var(--muted); }

@media (min-width: 1024px) {
  .page-head__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
}

/* ------------------------------------------------------------------ domain page */

.domain-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding-block: var(--space) 0;
}
.domain-context .section-title { margin-bottom: 12px; }
.domain-aside { display: grid; gap: 16px; align-content: start; }
.panel {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.panel--surface { background: var(--surface); border-color: transparent; }
.panel__title { font-size: 1.25rem; color: var(--navy); margin-bottom: 8px; }
.evidence-line { font-size: var(--fs-small); line-height: 1.55; }
.evidence-line + .evidence-line { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.evidence-line .label { display: block; }
.evidence-line__value { font-family: var(--mono); font-weight: 500; color: var(--navy); }

@media (min-width: 1024px) {
  .domain-body { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; }
}

.project-cards { display: grid; gap: 16px; }
.project-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px 32px;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.project-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.project-card__main { display: grid; gap: 8px; justify-items: start; }
.project-card__kicker { color: var(--muted-strong); }
.project-card__num { color: var(--accent); margin-right: 6px; }
.project-card__title { font-size: var(--fs-h3); }
.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--navy);
  text-decoration-color: var(--accent);
}
.project-card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.project-card__link:focus-visible { outline: none; }
.project-card__link:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 3px; }
.project-card:hover .icon--arrow { transform: translateX(3px); }
.project-card__signal {
  align-self: center;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface);
  font-size: var(--fs-small);
  line-height: 1.5;
}
.project-card__signal .label { display: block; color: var(--accent); }
.project-card__signal__value {
  display: block;
  font-family: var(--mono);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--navy);
}
.project-card__ai { font-size: var(--fs-small); line-height: 1.5; color: var(--muted-strong); }
.project-card__ai .label { margin-right: 6px; }

@media (min-width: 768px) {
  .project-card { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); padding: 24px; }
}

.support-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.support-item {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--white);
}
.support-item__title { font-size: 1.0625rem; color: var(--navy); }
.support-item__summary { margin-top: 4px; font-size: var(--fs-small); line-height: 1.5; color: var(--muted-strong); }

@media (min-width: 600px) {
  .support-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .support-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

.domain-links { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.domain-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  height: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(23, 51, 66, 0.1);
  border-radius: 12px;
  background: var(--surface);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}
.domain-link .icon--domain { width: 28px; height: 28px; color: var(--accent); }
.domain-link .icon--arrow { margin-left: auto; color: var(--accent); }
.domain-link:hover { color: var(--navy); border-color: var(--accent); transform: translateY(-2px); }

@media (min-width: 600px) {
  .domain-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .domain-links { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .not-found .domain-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ project page */

.case-kicker { margin-top: 6px; color: var(--muted-strong); }
.case-kicker__num { color: var(--accent); }

.glance { display: grid; gap: 10px; margin-top: 20px; }
.glance__row { display: grid; align-content: start; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface); }
.glance__key { font-family: var(--mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.glance__body { font-size: 1rem; line-height: 1.5; }
/* A thin persistent underline marks each row as a link on touch screens too; hover and focus colour it. */
.glance__link { display: block; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; }
.glance__link:hover,
.glance__link:focus-visible { color: var(--navy); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.2em; }
.glance__row--status .glance__body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
/* The status pill wraps inside its column; the basis summary meets AA on every pastel surface. */
.glance__row--status .status { white-space: normal; }
.glance .disclosure--inline > summary { color: var(--muted-strong); }
@media (min-width: 768px) { .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* One equal column per row: three rows fill three columns, four rows four. */
/* Two columns: a three-row summary lets its last row (Result) span both, leaving no empty cell. */
@media (min-width: 768px) and (max-width: 1199.98px) { .glance__row--result:last-child { grid-column: 1 / -1; } }
@media (min-width: 1200px) { .glance { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; } }

.case-section { padding-block: var(--space); background: var(--white); border-bottom: 1px solid var(--line); }
.case-section--tint { background: var(--canvas); }
.case-section__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.case-section__title { font-size: var(--fs-h2); letter-spacing: -0.01em; color: var(--navy); }
.case-section__body { min-width: 0; display: grid; gap: 20px; align-content: start; }
/* Consecutive paragraphs share one block so their spacing is the paragraph gap, not the section gap. */
.prose-group { display: grid; gap: 14px; }

@media (min-width: 1024px) {
  .case-section__grid { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; }
  .case-section__title { position: sticky; top: 24px; align-self: start; }
}

.case-list { display: grid; gap: 10px; max-width: 72ch; }
.case-list li { position: relative; padding-left: 20px; }
.case-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.check-list { display: grid; gap: 8px; }
.check-list li { position: relative; padding-left: 26px; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.38em;
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(45deg);
}

/* Process: connected circles on a rail, one per project phase. */
.process { display: grid; gap: 0; }
.process-step {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 14px;
  padding-bottom: 18px;
}
.process-step:last-child { padding-bottom: 0; }
.process-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 48px;
  bottom: 0;
  width: 2px;
  background: var(--line-strong);
}
.process-step__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
}
.process-step__icon .icon { width: 24px; height: 24px; }
.process-step__phase { align-self: end; font-size: 1.0625rem; color: var(--navy); }
.process-step__text { font-size: var(--fs-small); line-height: 1.5; }

@media (min-width: 1024px) {
  .process { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 16px; }
  .process-step { grid-template-columns: minmax(0, 1fr); align-content: start; row-gap: 6px; padding-bottom: 0; }
  .process-step__icon { grid-row: auto; }
  .process-step__phase { margin-top: 4px; }
  .process-step:not(:last-child)::before {
    left: 56px;
    right: -8px;
    top: 23px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
}

.figure--case { max-width: 680px; }
.case-head__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.page-head__figure,
.case-head__figure { max-width: 560px; }
.figure--editorial img { border-color: transparent; background: #F8F5EF; }
.domain-context__figure { margin-top: 24px; }
@media (min-width: 1024px) {
  .case-head__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
  .page-head__figure,
  .case-head__figure { max-width: none; }
}

.judgement { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.judgement__item {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.judgement__item--deterministic { border: 2px solid var(--green); }
.judgement__title { font-size: 1.125rem; color: var(--navy); margin-bottom: 10px; }
.judgement__item p, .judgement__item li { font-size: var(--fs-small); line-height: 1.55; }

@media (min-width: 768px) {
  .judgement { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .judgement__item:last-child { grid-column: 1 / -1; }
}
@media (min-width: 1200px) {
  .judgement { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .judgement__item:last-child { grid-column: auto; }
}

.steps { display: grid; gap: 10px; counter-reset: step; max-width: 72ch; }
.steps li { position: relative; padding-left: 36px; counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.15em;
  font-family: var(--mono);
  font-size: var(--fs-label);
  color: var(--accent);
}

.stack-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.stack-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.stack-card__title,
.stack-dev__title { font-size: 1.0625rem; color: var(--navy); margin-bottom: 8px; }
.stack-items { display: grid; gap: 8px; }
.stack-items li { font-size: var(--fs-small); line-height: 1.5; }
.stack-items__name { display: block; font-weight: 600; color: var(--ink); }
.stack-items__why { color: var(--muted-strong); }
.stack-dev {
  padding: 16px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--canvas);
}
.stack-dev__note { margin-bottom: 10px; font-weight: 600; color: var(--green-dark); }

@media (min-width: 600px) {
  .stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .stack-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.outcome { max-width: 60ch; font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem); line-height: 1.5; }
.signal-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.signal {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
}
.signal__key { color: var(--accent); }
.signal__value { font-family: var(--mono); font-size: 1.375rem; font-weight: 500; line-height: 1.25; color: var(--navy); }
.signal__label { font-size: var(--fs-small); line-height: 1.45; }
.outcome-status { display: flex; align-items: center; gap: 12px; }

@media (min-width: 768px) {
  .signal-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.pullquote {
  max-width: 44ch;
  padding-left: 20px;
  border-left: 3px solid var(--accent);
}
.pullquote__text p {
  font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
  color: var(--navy);
}

.related { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.related__item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--white);
}
.related__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  color: var(--navy);
  text-decoration-color: var(--accent);
}
.related__line { font-size: var(--fs-small); line-height: 1.5; color: var(--muted-strong); }
.back-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  color: var(--accent);
  text-decoration-color: currentColor;
}

@media (min-width: 768px) {
  .related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.pager { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.pager__link {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  text-decoration: none;
}
.pager__link:hover { border-color: var(--accent); color: var(--ink); }
.pager__dir { font-family: var(--mono); font-size: var(--fs-label); color: var(--muted-strong); }
.pager__title { font-weight: 600; color: var(--navy); }
.pager-hint { font-size: var(--fs-small); color: var(--muted); }

@media (min-width: 600px) {
  .pager { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pager__link--next { text-align: right; }
}

/* ------------------------------------------------------------------ System Spine (project pages) */

.spine-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.spine-figure { --spine-bg: var(--white); min-width: 0; }

/* Diagram drawings: vertical below 1024px, horizontal from 1024px. */
.spine-svg { width: 100%; height: auto; overflow: visible; }
.spine-svg--v { max-width: 420px; }
.spine-svg--h { display: none; }

.spine-svg text { fill: var(--ink); }
.spine-svg .spine-num { font-family: var(--mono); font-size: 13px; fill: var(--muted); }
.spine-name { font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: 0.06em; }
.spine-label { font-family: var(--sans); font-size: 17px; }
.spine-svg .spine-label.is-absent { font-style: italic; fill: var(--muted); }
.spine-svg--v .spine-name { font-size: 13px; }
.spine-svg--v .spine-label { font-size: 16px; }

.spine-rail { fill: none; stroke: var(--ink); stroke-width: 1.25; }
.spine-halo { fill: var(--spine-bg); }
.spine-node { fill: var(--ink); }
.spine-node--ai { fill: var(--signal); stroke: var(--ink); stroke-width: 1.5; }
.spine-node--gate { fill: var(--green); }
.spine-figure[data-ai="absent"] .spine-node--ai {
  fill: var(--spine-bg);
  stroke: var(--muted);
  stroke-dasharray: 3 3;
}

.spine-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: var(--fs-label);
  color: var(--muted-strong);
}
.spine-legend li { display: inline-flex; align-items: center; gap: 9px; }
.legend-mark { display: inline-block; flex: none; width: 10px; height: 10px; }
.legend-mark--det { background: var(--ink); clip-path: circle(50%); }
.legend-mark--ai { width: 9px; height: 9px; background: var(--signal); outline: 1px solid var(--ink); transform: rotate(45deg); }
.legend-mark--gate { background: var(--green); }
.legend-mark--none { width: 9px; height: 9px; border: 1px dashed var(--muted); transform: rotate(45deg); }

.spine-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.spine-caption__label { color: var(--muted-strong); }
.spine-caption__text { font-size: 1.125rem; font-weight: 600; line-height: 1.35; color: var(--navy); }

.spine-notes { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 32px; }
.spine-note {
  display: grid;
  align-content: start;
  gap: 4px;
  padding-block: 14px 16px;
  border-top: 1px solid var(--line);
}
.spine-note__stage { color: var(--muted-strong); }
.spine-note__num { color: var(--ink); margin-right: 0.4em; }
.spine-note__label { font-weight: 600; line-height: 1.4; }
.spine-note__text { font-size: var(--fs-small); line-height: 1.55; }
.spine-note--ai .spine-note__stage::after,
.spine-note--gate .spine-note__stage::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 10px;
  vertical-align: 1px;
}
.spine-note--ai .spine-note__stage::after { background: var(--signal); outline: 1px solid var(--ink); transform: rotate(45deg); }
.spine-note--ai.is-absent .spine-note__stage::after { background: transparent; outline: 1px dashed var(--muted); }
.spine-note--gate .spine-note__stage::after { background: var(--green); }
.spine-note--ai.is-absent .spine-note__label { font-style: italic; color: var(--muted-strong); }

@media (min-width: 1024px) {
  .spine-svg--h { display: block; }
  .spine-svg--v { display: none; }
  .spine-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .spine-notes { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 24px; }
}

/* ------------------------------------------------------------------ content text at desktop widths */

/* Secondary paragraphs that carry content reach the 16px body size from 1024px; labels, chips
   and lesson blocks stay at 13-14px. Placed after the component rules so it wins the cascade. */
@media (min-width: 1024px) {
  .domain-panel__value,
  .method-step__text { font-size: 1rem; }
}

/* ------------------------------------------------------------------ 404 */

.not-found { display: grid; gap: 32px; padding-block: var(--space); }
.not-found .section-title { margin-bottom: 16px; }

/* ------------------------------------------------------------------ reduced motion and print */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .domain-panel:hover,
  .project-card:hover,
  .domain-link:hover { transform: none; }
  a:hover .icon--arrow,
  .domain-panel:hover .panel__link .icon--arrow,
  .project-card:hover .icon--arrow { transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  .skip-link, .site-nav, .pager-hint, .masthead__actions { display: none !important; }
  body, html, .masthead, .site-header, .site-footer, .contact { background: #fff !important; color: #000 !important; }
  .section, .case-section { padding-block: 20px; break-inside: avoid-page; }
  a { text-decoration: none; }
}
