/* ==========================================================================
   VBSA — Values-based Scholarship Array
   Design system & stylesheet

   Aligned to "HKBU x Elsevier — A&H Handbook Design Guideline (Concept 01)",
   Mimasu.Studio for HKBU:
     §2  Typography    golden ratio (1:1.618) applied to the primary face only
     §3  Colour        five specified colours, WCAG-checked by the studio
     §4  Layout        section dividers, running heads, rules, footnotes
     §5  Cover         hairline rule, edition line, logo corners, soft arcs
     §6  Tables/Charts two table styles; rose chart paired with a percentage list

   Big Caslon CC and Helvetica are licensed Monotype faces, so this build uses
   open-licensed substitutes: Libre Caslon Display/Text for the Caslon role and
   Inter for the Helvetica role. See assets/css/fonts.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* --- The five specified colours (§3.1) --------------------------------- */
  --deep-burgundy: #5e2c2b; /* PANTONE 7630 C — primary                        */
  --burgundy: #a63f37;      /* PANTONE 7608 C — rules, numerals, table headers */
  --muted-pink: #daaeb2;    /* PANTONE 5025 C — chart tips, soft emphasis      */
  --charcoal: #66625f;      /* PANTONE 2333 C — audiences, secondary ink       */
  --light-grey: #f7f7f7;    /* PANTONE 420 @10% — panels, row striping         */

  /* --- Working ramp derived from the five above -------------------------- */
  --burgundy-950: #2e1516;
  --burgundy-900: #3e1d1e;
  --burgundy-800: #4e2525;
  --burgundy-700: var(--deep-burgundy);
  --burgundy-600: #7a3a37;

  --accent: var(--burgundy);
  --accent-400: #c4746a;

  --pink: var(--muted-pink);
  --pink-200: #e8c9cb;
  --pink-100: #f2e0e1;
  --pink-050: #faf4f4;

  --charcoal-900: #3a3836;
  --charcoal-800: #4d4a47;
  --charcoal-700: var(--charcoal);
  /* 600 removed: it sat lighter than the specified Charcoal and failed AA */
  --charcoal-500: #93908c;
  --charcoal-400: #aeaba8;
  --charcoal-300: #c9c7c4;
  --charcoal-200: #e0dfdd;

  /* --- Ground (§3: white pages, Light Grey panels) ----------------------- */
  --paper: #ffffff;
  --paper-2: var(--light-grey);
  --paper-3: #f1f1f1;

  /* --- Ink --------------------------------------------------------------- */
  --ink: #2b2927;

  /* --- Status: the one non-brand colour, for "increasing" and success ------ */
  --positive: #2f6b3d;
  --positive-soft: rgba(47, 107, 61, 0.09);
  --positive-line: rgba(47, 107, 61, 0.28);
  --ink-soft: #4d4a47;
  --ink-muted: #66625f;   /* = specified Charcoal; passes AA on every background */

  /* --- Type (§2) ---------------------------------------------------------
     Caslon role: Libre Caslon Display at the largest sizes, Libre Caslon Text
     for headers, quotes and table headings. Helvetica role: Inter. */
  --f-display: "Libre Caslon Display", "Libre Caslon Text", "Iowan Old Style",
    Georgia, "Times New Roman", serif;
  --f-serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --f-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  /* Golden ratio scale (1:1.618), primary face only.
     Guideline reference sizes: 11.56 / 18.54 / 30 / 48.54 / 78.54 pt */
  --t-1: 0.8125rem;                         /* 13px — captions, table headings  */
  --t-2: clamp(1.05rem, 1.46vw, 1.3125rem); /* 21px — section sub-headings      */
  --t-3: clamp(1.4rem, 2.37vw, 2.125rem);   /* 34px — quotes                    */
  --t-4: clamp(1.95rem, 3.83vw, 3.4375rem); /* 55px — chapter / section titles  */
  --t-5: clamp(3rem, 6.2vw, 5.5625rem);     /* 89px — large chapter numeral     */
  --t-h1: var(--t-4);
  --t-h2: var(--t-4);
  --t-h3: var(--t-2);
  --t-h4: var(--t-1);

  /* Helvetica role (§2.3): body 10/13, table 8.5/11, footnote 8.5/11 */
  --t-lead: clamp(1.05rem, 1.3vw, 1.1875rem);
  --t-body: 1rem;
  --t-small: 0.875rem;
  --t-micro: 0.8125rem;
  --lh-tight: 1.375;

  /* Space (§4.1 margins scaled to the screen) */
  --section-y: clamp(4.25rem, 8.5vw, 7.5rem);
  --gutter: clamp(1.25rem, 4vw, 2.75rem);
  --maxw: 1280px;

  /* Radius — the printed system is square; only pills stay round */
  --r-xs: 2px;
  --r-sm: 3px;
  --r-md: 4px;
  --r-lg: 6px;
  --r-xl: 8px;
  --r-pill: 999px;

  /* Elevation — restrained; the system relies on rules, not shadows */
  --sh-xs: 0 1px 2px rgba(43, 41, 39, 0.04);
  --sh-sm: 0 1px 3px rgba(43, 41, 39, 0.05);
  --sh-md: 0 10px 24px -14px rgba(43, 41, 39, 0.18);
  --sh-lg: 0 24px 48px -26px rgba(43, 41, 39, 0.24);
  --sh-book: 0 50px 80px -42px rgba(43, 41, 39, 0.44),
    0 20px 36px -22px rgba(43, 41, 39, 0.24);

  /* Hairlines (§4.2) */
  --line: 1px solid rgba(43, 41, 39, 0.12);
  --line-strong: 1px solid rgba(43, 41, 39, 0.22);
  --line-burgundy: 1px solid var(--burgundy);

  /* Motion — calm, editorial */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.33, 1, 0.68, 1);

  --nav-h: 74px;
  --subnav-h: 0px;
}

/* Pages that carry a page-local sub-navigation reserve room for it. */
.has-subnav {
  --subnav-h: 48px;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--subnav-h) + 20px);
}

body {
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--pink);
  color: var(--burgundy-900);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
::-webkit-scrollbar-track {
  background: var(--paper-2);
}
::-webkit-scrollbar-thumb {
  background: var(--charcoal-400);
  border: 3px solid var(--paper-2);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--charcoal-700);
}

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

/* On the deep burgundy surfaces the accent ring disappears — use a light ring. */
.quote-card :focus-visible,
.book :focus-visible,
.lightbox :focus-visible,
.footer :focus-visible,
.cover :focus-visible {
  outline-color: var(--pink-200);
}

/* SVG segments: a rectangular outline looks like a defect on a radial chart, so
   the indicator follows the wedge itself — a heavy contrasting stroke plus a
   light halo, which is both shape-accurate and highly visible. */
.radar__wedge:focus-visible {
  outline: none;
  stroke: var(--burgundy-900);
  stroke-width: 2.4;
  paint-order: stroke;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 1px rgba(46, 21, 22, 0.85));
}
.chart-card[data-chart="audience"] .radar__wedge:focus-visible {
  stroke: var(--charcoal-900);
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 1px rgba(26, 24, 23, 0.85));
}
.radar__wedge--empty:focus-visible {
  stroke: var(--burgundy-900);
  stroke-dasharray: none;
}

/* --------------------------------------------------------------------------
   3. Typography primitives
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--f-serif);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.008em;
  color: var(--deep-burgundy);
  text-wrap: balance;
}

/* The display cut is reserved for the largest sizes (§2.1 primary font) */
.h-1 {
  font-size: var(--t-h1);
}
.h-2 {
  font-size: var(--t-h2);
  letter-spacing: -0.012em;
  line-height: 1.08;
}
.h-3 {
  font-size: var(--t-h3);
  line-height: 1.2;
  letter-spacing: -0.006em;
}
.h-4 {
  font-size: var(--t-h4);
  line-height: 1.3;
  letter-spacing: 0;
  font-weight: 700;
}

p {
  text-wrap: pretty;
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.62;
  color: var(--ink-soft);
  letter-spacing: -0.004em;
}

/* Quotes: primary face, regular italic (§2.1) */
.quote-card p,
.statement__quote {
  font-family: var(--f-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.004em;
}

/* Functional labels: Helvetica role, uppercase, tracked (§2.2) */
.mono,
.label {
  font-family: var(--f-sans);
  font-size: var(--t-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  line-height: var(--lh-tight);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--f-sans);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

/* Section index numerals */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
  margin-bottom: clamp(2.25rem, 4vw, 3.5rem);
  max-width: 60rem;
  border-top: var(--line-burgundy);
  padding-top: clamp(1.1rem, 2vw, 1.7rem);
}

.section-head__index {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--f-sans);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Chapter numeral (§4.3): primary face, burgundy, 30 pt reference size */
.section-head__index b {
  font-family: var(--f-serif);
  font-size: var(--t-3);
  font-weight: 400;
  line-height: 0.8;
  letter-spacing: 0.02em;
  color: var(--burgundy);
}

.section-head__index::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(43, 41, 39, 0.12);
}

.section-head p {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: var(--t-lead);
  line-height: 1.62;
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  /* the safe-area terms are 0 on every non-notched device, so this is a no-op
     there and keeps content clear of the notch in landscape on a phone */
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* Contains the horizontal offset used by left/right reveal animations without
   creating a scroll container, so `position: sticky` keeps working. */
main {
  overflow-x: clip;
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--tight {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.section--paper2 {
  background: var(--paper-2);
}
.rule {
  height: 1px;
  background: rgba(43, 41, 39, 0.12);
  border: 0;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  min-height: 44px;
  --btn-bg: var(--burgundy-700);
  --btn-fg: #fff;
  --btn-bd: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.45rem;
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease),
    background-color 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease);
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    120px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.22),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.btn:hover::after {
  opacity: 1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.4s var(--ease-spring);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--burgundy-800);
  --btn-bd: rgba(43, 41, 39, 0.2);
}
.btn--ghost:hover {
  --btn-bg: rgba(255, 255, 255, 0.7);
  --btn-bd: rgba(43, 41, 39, 0.34);
}

.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  --btn-bd: rgba(255, 255, 255, 0.28);
}
.btn--outline-light:hover {
  --btn-bg: rgba(255, 255, 255, 0.08);
  --btn-bd: rgba(255, 255, 255, 0.5);
}

.btn--sm {
  padding: 0.65rem 1.15rem;
  font-size: 0.875rem;
}

/* Text link. A persistent underline keeps links identifiable without relying on
   colour alone (WCAG 1.4.1); the hover state simply strengthens it. */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 42%, transparent);
  transition: text-decoration-color 0.35s var(--ease), color 0.3s var(--ease);
}

.link:hover {
  text-decoration-color: currentColor;
}

.link svg {
  width: 14px;
  height: 14px;
  text-decoration: none;
  transition: transform 0.4s var(--ease-spring);
}
.link:hover svg {
  transform: translate(2px, -2px);
}

/* --------------------------------------------------------------------------
   6. Navigation
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--pink),
    var(--pink)
  );
  z-index: 1001;
  pointer-events: none;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: height 0.45s var(--ease), background-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  z-index: -1;
}

.nav.is-stuck {
  height: 62px;
  border-bottom-color: rgba(43, 41, 39, 0.08);
}

.nav.is-stuck::before {
  opacity: 1;
}

.nav__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: clamp(0.7rem, 1.1vw, 0.95rem);
  flex: none;
  transition: transform 0.4s var(--ease-spring);
}

.brand:hover {
  transform: translateY(-1px);
}


/* The wordmark: set large enough to read as a logo, in the real 700 weight
   rather than a synthesised bold. */
.brand__mark {
  font-family: var(--f-serif);
  font-size: clamp(1.28rem, 1.9vw, 1.58rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--burgundy-900);
}

/* The descriptor, stacked on two lines behind a hairline rule. */
.brand__full {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.14em;
  padding-left: clamp(0.7rem, 1.1vw, 0.95rem);
  border-left: var(--line);
  font-family: var(--f-sans);
  font-size: 0.625rem; /* was 9px */
  line-height: 1.45;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.nav__link {
  position: relative;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 450;
  color: var(--ink-soft);
  border-radius: var(--r-pill);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, 4px) scale(0);
  transition: transform 0.4s var(--ease-spring);
}

.nav__link:hover {
  color: var(--burgundy-800);
  background: rgba(43, 41, 39, 0.04);
}

.nav__link.is-active {
  color: var(--burgundy-800);
  font-weight: 550;
}

.nav__link.is-active::after,
.nav__link[aria-current="page"]::after {
  transform: translate(-50%, 0) scale(1);
}

.nav__link[aria-current="page"] {
  color: var(--burgundy-800);
  font-weight: 550;
}

/* Page-local sub-navigation — sits under the global nav and sticks with it.
   Keeps site-level links (Leave this page) separate from page anchors. */
.subnav {
  position: sticky;
  top: 61px;
  z-index: 900;
  border-bottom: var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}

.subnav__inner {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  height: var(--subnav-h);
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav__inner::-webkit-scrollbar {
  display: none;
}

.subnav__label {
  flex: none;
  margin-right: 0.9rem;
  font-family: var(--f-sans);
  font-size: 0.6875rem; /* was 10px; 11px floor */
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.subnav a {
  flex: none;
  padding: 0.42rem 0.85rem;
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  color: var(--ink-soft);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.subnav a:hover {
  background: rgba(43, 41, 39, 0.05);
  color: var(--burgundy-800);
}

.subnav a.is-current {
  background: var(--burgundy-700);
  color: #fff;
}

.nav__cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  border: var(--line-strong);
  align-items: center;
  justify-content: center;
  flex: none;
}

.nav__toggle span {
  position: relative;
  width: 17px;
  height: 1.5px;
  background: var(--burgundy-800);
  border-radius: 2px;
  transition: transform 0.4s var(--ease), background-color 0.3s;
}

.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px;
  height: 1.5px;
  background: var(--burgundy-800);
  border-radius: 2px;
  transition: transform 0.4s var(--ease);
}

.nav__toggle span::before {
  top: -5.5px;
}
.nav__toggle span::after {
  top: 5.5px;
}

.nav__toggle[aria-expanded="true"] span {
  background: transparent;
}
.nav__toggle[aria-expanded="true"] span::before {
  transform: translateY(5.5px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span::after {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: var(--nav-h) 0 0;
  z-index: 999;
  background: var(--paper);
  padding: 2rem var(--gutter) 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateY(-102%);
  transition: transform 0.6s var(--ease-out), visibility 0.6s;
  visibility: hidden;
  overflow-y: auto;
}

.drawer.is-open {
  transform: translateY(0);
  visibility: visible;
}

.drawer a {
  font-family: var(--f-display);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--burgundy-900);
  padding: 0.85rem 0;
  border-bottom: var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.drawer.is-open a {
  opacity: 1;
  transform: none;
}

.drawer a span {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 6vw, 5.5rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  background: linear-gradient(178deg, var(--paper) 0%, var(--paper-2) 62%, var(--paper-3) 100%);
}

.hero__aura {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 130%;
  pointer-events: none;
  background: radial-gradient(
    44% 40% at 78% 24%,
    rgba(94, 44, 43, 0.055),
    transparent 70%
  );
}

.hero__rings {
  position: absolute;
  right: -14vw;
  top: 4%;
  width: min(760px, 68vw);
  aspect-ratio: 1;
  pointer-events: none;
  opacity: 0.32;
  background: repeating-radial-gradient(
    circle at 50% 50%,
    rgba(94, 44, 43, 0.09) 0 1px,
    transparent 1px 46px
  );
  mask-image: radial-gradient(circle at 50% 50%, #000 12%, transparent 72%);
  -webkit-mask-image: radial-gradient(
    circle at 50% 50%,
    #000 12%,
    transparent 72%
  );
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.82fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero__copy {
  max-width: 40rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.42rem 0.95rem 0.42rem 0.5rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.74);
  border: var(--line);
  box-shadow: var(--sh-xs);
  font-size: 0.8125rem;
  color: var(--ink-soft);
  backdrop-filter: blur(8px);
  margin-bottom: 1.6rem;
}

.hero__badge b {
  font-weight: 550;
  color: var(--burgundy-800);
}

.hero__badge i {
  font-style: normal;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--burgundy-700);
  color: var(--pink-200);
  font-family: var(--f-sans);
  font-size: 0.6875rem; /* was 10px; 11px floor */
  font-weight: 600;
}

.hero__title {
  font-size: clamp(2.7rem, 4.9vw, 4.35rem);
  font-weight: 600;
  line-height: 0.97;
  letter-spacing: -0.034em;
  color: var(--burgundy-900);
  font-variation-settings: "SOFT" 32, "WONK" 1, "opsz" 144;
  margin-bottom: 1.5rem;
}

/* Line mask for the reveal. The descender of the italic y in "Array" reaches
   below the line box, and line-height is 0.97, so a plain overflow:hidden cut
   the tail off. The padding gives the mask room and the negative margin takes
   exactly the same space back, leaving the line rhythm untouched. */
.hero__title .l {
  display: block;
  overflow: hidden;
  padding-bottom: 0.26em;
  margin-bottom: -0.26em;
}

.hero__title .l > span {
  display: block;
}

/* Emphasis in prose uses the primary face's italic. The Inter italic files are
   not shipped, and §2.1 sets emphasis in the Caslon role, so <em> resolves to
   the Libre Caslon Text italic already loaded for quotes. */
p em,
li em,
dd em,
dt em,
td em,
th em,
figcaption em {
  font-family: var(--f-serif);
  font-style: italic;
}

/* italic emphasis only — an underline here cut through the descender of the y */
.hero__title em {
  font-style: italic;
  font-variation-settings: "SOFT" 70, "WONK" 1, "opsz" 144;
  color: var(--accent);
}

.hero__sub {
  font-size: var(--t-lead);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: 2.1rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 2.4rem;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(1.25rem, 3vw, 2.6rem);
  padding-top: 1.4rem;
  border-top: var(--line);
  max-width: 34rem;
}

.hero__fact {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem 0;
}

.hero__fact dt {
  font-family: var(--f-sans);
  font-size: 0.6875rem; /* was 10px; 11px floor */
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero__fact dd {
  font-family: var(--f-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--burgundy-800);
  letter-spacing: -0.01em;
}

/* Book stage ------------------------------------------------------------- */
.hero__stage {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1600px;
  min-height: 460px;
}

.hero__stage::before {
  content: "";
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(94, 44, 43, 0.2),
    transparent 66%
  );
  filter: blur(28px);
  transform: translateY(12%);
}

.book {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  width: clamp(228px, 25vw, 306px);
  aspect-ratio: 0.7;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(-1.2deg);
  transition: transform 0.9s var(--ease-out);
  animation: bookFloat 7.5s ease-in-out infinite;
}

@keyframes bookFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

/* The handbook cover. The studio's own artwork is used rather than a
   reconstruction, so the site shows the published cover exactly. §5.1 */
.cover {
  position: relative;
  overflow: hidden;
  border-radius: 2px 5px 5px 2px;
  background: var(--deep-burgundy);
  box-shadow: var(--sh-book);
}

.cover__art {
  display: block;
  width: 100%;
  height: auto;
}

.cover__art--flat {
  aspect-ratio: 0.695;
  object-fit: cover;
}

/* the flat export used outside the 3D mock-up keeps square-ish corners */
.cover-wrap .cover__art,
.cover-wrap > .cover__art {
  border-radius: 3px;
}

/* spine */
.book > .cover {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.book__spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 13px;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.5),
    rgba(255, 255, 255, 0.09) 62%,
    rgba(0, 0, 0, 0.28)
  );
  border-radius: 4px 0 0 4px;
  z-index: 3;
}

/* page block behind */
.book__pages {
  position: absolute;
  inset: 1.4% -1.4% 1.4% 96%;
  border-radius: 0 5px 5px 0;
  background: repeating-linear-gradient(
    to right,
    #ffffff 0 2px,
    #e0dfdd 2px 3.2px
  );
  box-shadow: 4px 6px 18px -6px rgba(46, 21, 22, 0.55);
  transform: translateZ(-1px);
}


/* floating chips */
.book-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.92);
  border: var(--line);
  box-shadow: var(--sh-md);
  backdrop-filter: blur(10px);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--burgundy-800);
  white-space: nowrap;
  animation: chipFloat 6.5s ease-in-out infinite;
}

.book-chip svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
  flex: none;
}

.book-chip--a {
  top: 7%;
  right: -15%;
  animation-delay: -1.2s;
}

.book-chip--b {
  top: 44%;
  left: -16%;
  animation-delay: -3.4s;
}

@keyframes chipFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

/* --------------------------------------------------------------------------
   8. Logo strip
   -------------------------------------------------------------------------- */
.logostrip {
  border-top: var(--line);
  border-bottom: var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.logostrip__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding-block: 1.5rem;
  flex-wrap: wrap;
}

.logostrip img {
  height: 30px;
  width: auto;
  opacity: 0.72;
  filter: grayscale(1);
  transition: opacity 0.4s var(--ease), filter 0.4s var(--ease),
    transform 0.4s var(--ease);
}

.logostrip img:hover {
  opacity: 1;
  filter: grayscale(0);
  transform: translateY(-2px);
}

.logostrip__x {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   9. Statement / quote blocks
   -------------------------------------------------------------------------- */
.statement {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.statement__quote {
  position: relative;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.9vw, 2.35rem);
  line-height: 1.24;
  letter-spacing: -0.024em;
  color: var(--burgundy-800);
  font-variation-settings: "SOFT" 66, "WONK" 1, "opsz" 110;
  padding-left: clamp(1.5rem, 3vw, 2.5rem);
  border-left: 2px solid var(--accent);
}

.statement__quote::after {
  content: "";
  position: absolute;
  left: -2px;
  bottom: 0;
  width: 2px;
  height: 42%;
  background: var(--pink);
}

.statement__body p + p {
  margin-top: 1.15rem;
}

.statement__body {
  font-size: var(--t-body);
  color: var(--ink-soft);
  line-height: 1.78;
}

/* emphasised terms */
.term {
  position: relative;
  font-weight: 600;
  color: var(--burgundy-800);
  white-space: nowrap;
}

.term::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0.06em;
  height: 0.3em;
  background: var(--pink-100);
  z-index: -1;
  border-radius: 2px;
}

.term--audience::after {
  background: var(--charcoal-200);
}

/* Pull quote card (dark) */
.quote-card {
  position: relative;
  border-radius: var(--r-lg);
  padding: clamp(2rem, 4.5vw, 3.4rem);
  background:
    radial-gradient(
      120% 130% at 88% 8%,
      rgba(196, 116, 106, 0.35),
      transparent 58%
    ),
    linear-gradient(150deg, var(--burgundy-700), var(--burgundy-900) 72%);
  color: #fdf6f5;
  overflow: hidden;
  box-shadow: var(--sh-lg);
  isolation: isolate;
}

.quote-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(
    circle at 92% 84%,
    rgba(255, 255, 255, 0.055) 0 1px,
    transparent 1px 26px
  );
  opacity: 0.9;
  z-index: -1;
}

.quote-card__mark {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--f-display);
  font-style: normal;
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 0.62;
  color: var(--pink);
  opacity: 0.85;
  margin-bottom: 1.5rem;
}

.quote-card__mark::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(218, 174, 178, 0.55),
    rgba(218, 174, 178, 0)
  );
}

/* the closing ornament mirrors the opening one: the rule runs from faint on the
   left to solid on the right, ending at a reversed quote mark */
.quote-card__mark--close {
  margin-top: 1.5rem;
  margin-bottom: 0;
  justify-content: flex-end;
}

.quote-card__mark--close::after {
  content: none;
}

.quote-card__mark--close::before {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(218, 174, 178, 0),
    rgba(218, 174, 178, 0.55)
  );
}

.quote-card p {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.16rem, 2.05vw, 1.6rem);
  line-height: 1.42;
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 90;
  color: #ffffff;
}

.quote-card footer {
  margin-top: 1.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.875rem;
  color: rgba(253, 247, 244, 0.82);
}

.quote-card footer .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  color: var(--pink-200);
}

.quote-card footer b {
  display: block;
  font-weight: 550;
  color: #fff;
}

.quote-card--light {
  background: linear-gradient(150deg, #fff, var(--paper-2));
  color: var(--burgundy-900);
  border: var(--line);
  box-shadow: var(--sh-md);
}

.quote-card--light p {
  color: var(--burgundy-800);
}

.quote-card--light .quote-card__mark {
  color: var(--pink);
}

.quote-card--light footer {
  border-top-color: rgba(43, 41, 39, 0.12);
  color: var(--ink-muted);
}

.quote-card--light footer .avatar {
  background: var(--burgundy-700);
  border-color: transparent;
  color: var(--pink-200);
}

.quote-card--light footer b {
  color: var(--burgundy-900);
}

/* --------------------------------------------------------------------------
   10. Charts (radar)
   -------------------------------------------------------------------------- */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.25rem);
}

.chart-card {
  position: relative;
  border: var(--line);
  border-top: 1px solid var(--burgundy);
  background: var(--paper);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  transition: border-color 0.4s var(--ease);
}

.chart-card:hover {
  border-color: rgba(43, 41, 39, 0.2);
  border-top-color: var(--burgundy);
}

.chart-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.chart-card__title {
  font-family: var(--f-display);
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--burgundy-900);
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 40;
}

.chart-card__caption {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-bottom: 0.9rem;
  max-width: 34ch;
}

.chart-card__hint {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  gap: 0.4rem;
  font-family: var(--f-sans);
  font-size: 0.6875rem; /* was 10px; 11px floor */
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: var(--line);
  padding: 0.35rem 0.65rem;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.chart-card__hint svg {
  width: 12px;
  height: 12px;
}

.radar {
  width: 100%;
  max-width: 400px;
  margin-inline: auto;
  height: auto;
  display: block;
  overflow: visible;
  cursor: crosshair;
}

.radar__spoke {
  stroke: rgba(43, 41, 39, 0.16);
  stroke-width: 0.8;
}

/* §6.3: four circles at 25 / 50 / 75 / 100 %, dashed except the outermost */
.radar__ring {
  fill: none;
  stroke: rgba(43, 41, 39, 0.30);
  stroke-width: 0.7;
  stroke-dasharray: 2.5 3.5;
}

/* in the printed chart all four rings are dashed; the outer is a shade stronger */
.radar__ring--outer {
  stroke-dasharray: 2.5 3.5;
  stroke: rgba(43, 41, 39, 0.42);
}

/* the grid sits over the fill, as in the printed chart */
.radar__rings,
.radar__spokes {
  opacity: 0.85;
}


/* Only the wedges take the pointer. The axis labels run along textPaths that
   sit over the wedges, and the spokes and rings cross them -- together they
   were covering about a third of the radar, so pointing at a wedge sometimes
   did nothing. */
.radar__rings,
.radar__ring,
.radar__spokes,
.radar__spoke,
.radar__labels,
.radar__label {
  pointer-events: none;
}

.radar__wedge {
  transition: opacity 0.35s var(--ease), filter 0.35s var(--ease);
  transform-origin: 0 0;
  cursor: pointer;
}

.radar__wedge--empty {
  fill: none;
  stroke: rgba(43, 41, 39, 0.22);
  stroke-width: 0.8;
  stroke-dasharray: 2 3;
}

/* Axis labels set in the primary serif (§6.3 "Typography") */
.radar__label {
  font-family: var(--f-serif);
  font-size: 12px;
  letter-spacing: 0;
  fill: var(--ink-muted);
  transition: fill 0.3s var(--ease);
}

.radar__label--strong {
  fill: var(--charcoal-800);
}

/* The chart scales with its card, so the labels shrink with it. Bump the
   declared size on narrow screens to keep them legible (~9px rendered). */
@media (max-width: 420px) {
  .radar__label {
    font-size: 13px;
  }
}


.chart-card.is-hovering .radar__wedge:not(.is-hot) {
  opacity: 0.24;
}

.radar__wedge.is-hot {
  filter: brightness(1.06) saturate(1.1);
}

.radar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: var(--line);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.radar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.radar-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
}

.radar-readout {
  min-height: 3.1rem;
  margin-top: 0.9rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--r-sm);
  background: rgba(43, 41, 39, 0.035);
  border: var(--line);
  font-size: 0.875rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transition: background-color 0.35s var(--ease);
}

.radar-readout b {
  color: var(--burgundy-800);
  font-weight: 600;
}

.radar-readout .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   11. Array matrix
   -------------------------------------------------------------------------- */
.matrix-tabs {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border-radius: var(--r-sm);
  background: rgba(43, 41, 39, 0.05);
  border: var(--line);
  margin-bottom: 1.6rem;
}

.matrix-tabs button {
  padding: 0.55rem 1.15rem;
  border-radius: var(--r-xs);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
  white-space: nowrap;
}

.matrix-tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--burgundy-800);
  box-shadow: var(--sh-xs);
}

.matrix-tabs .swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  margin-right: 0.45rem;
  vertical-align: -1px;
}

.matrix {
  --head: var(--accent);
  --head-ink: #fff;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: var(--line);
  background: #fff;
  box-shadow: var(--sh-md);
}

.matrix[data-dimension="audience"] {
  --head: var(--charcoal-700);
  --head-ink: #fff;
}

.matrix__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.matrix table {
  width: 100%;
  min-width: 880px;
  /* fixed, so the five tile slots are equal and the geometry does not reflow
     when you switch between the Values and Audience tabs */
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.matrix thead th {
  position: relative;
  z-index: 3;
  background: var(--head);
  color: var(--head-ink);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.012em;
  text-align: left;
  padding: 0.95rem 1.1rem;
  font-variation-settings: "SOFT" 26, "WONK" 0, "opsz" 28;
}

.matrix thead th:first-child {
  width: 190px;
}

/* The merged "Evidence Tiles" cell is a caption, not a heading: in the
   published figure it sits on white, centred. */
.matrix thead th[colspan] {
  background: #fff;
  color: var(--charcoal-900);
  text-align: center;
  border-bottom: 1px solid var(--head);
}

.matrix tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--head);
  color: var(--head-ink);
  text-align: left;
  vertical-align: middle;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.24;
  letter-spacing: -0.008em;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-variation-settings: "SOFT" 26, "WONK" 0, "opsz" 24;
}

.matrix tbody tr:first-child th {
  border-top: 0;
}

/* rule between the label column and the tile columns, as in the figure */
.matrix thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 4;
}

.matrix thead th:first-child::after,
.matrix tbody th::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.28);
}

.matrix tbody td {
  position: relative;
  padding: 0.85rem 0.9rem;
  border-top: var(--line);
  border-left: var(--line);
  vertical-align: middle;
  color: var(--ink-soft);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
  background: #fff;
}

.matrix tbody tr:hover td {
  background: var(--pink-050);
}

.matrix[data-dimension="audience"] tbody tr:hover td {
  background: #f7f7f7;
}

.matrix tbody td.is-open {
  background: var(--paper-2);
}

.matrix tbody td .tile {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.35;
  font-weight: 450;
  color: var(--charcoal-800);
}

.matrix tbody td .tile::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 0.42em;
  border-radius: 2px;
  background: var(--head);
  opacity: 0.75;
}

/* §6.2: an undefined tile is a dash, and nothing else */
/* the same diagonal hatch as the footer legend, lighter so a whole cell of it
   stays quiet */
.matrix tbody td.is-empty {
  text-align: center;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(43, 41, 39, 0.055) 0 3px,
    transparent 3px 6px
  );
}

.matrix tbody tr:hover td.is-empty {
  background-color: #fff;
}

.matrix-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: var(--line);
  background: var(--paper-2);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.matrix-note span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.matrix-note i {
  width: 22px;
  height: 10px;
  border-radius: 3px;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(43, 41, 39, 0.12) 0 3px,
    transparent 3px 6px
  );
  border: var(--line);
  flex: none;
}

/* On the overview the note sits under the builder rather than inside the
   matrix, so it needs its own frame. */
.matrix-note--standalone {
  margin-top: 0.7rem;
  border: var(--line);
  border-radius: var(--r-md);
}

.matrix-note__scroll {
  display: none !important;
  font-family: var(--f-sans);
  font-size: 0.6875rem; /* was 10px; 11px floor */
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* On narrower screens the table scrolls sideways — signal that. */
@media (max-width: 1120px) {
  .matrix {
    position: relative;
  }
  .matrix::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 52px;
    border-radius: 0 var(--r-lg) var(--r-lg) 0;
    background: linear-gradient(
      to right,
      rgba(255, 255, 255, 0),
      rgba(255, 255, 255, 0.94) 62%
    );
    pointer-events: none;
    z-index: 2;
  }
  .matrix-note__scroll {
    display: inline-flex !important;
  }
}

/* --------------------------------------------------------------------------
   12. Evidence tile anatomy
       Built to the published figure: a single soft panel with no internal
       rules. The label column is bold, the value column regular, at the same
       size — the distinction is weight, not size. Rows group by whitespace.
   -------------------------------------------------------------------------- */
.anatomy {
  --field-w: clamp(300px, 40vw, 540px);
  --col-gap: clamp(0.9rem, 3vw, 3rem);
  position: relative;
  display: grid;
  gap: 0;
}

/* the panel behind the centre column only */
.anatomy::before {
  content: "";
  position: absolute;
  top: -4.5%;
  bottom: -4.5%;
  left: 50%;
  width: calc(var(--field-w) + clamp(1rem, 2.4vw, 2.2rem));
  transform: translateX(-50%);
  border-radius: var(--r-xl);
  background: var(--paper-2);
  box-shadow: none;
  pointer-events: none;
}

.anatomy__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--field-w) minmax(0, 1fr);
  column-gap: var(--col-gap);
  align-items: stretch;
}

/* a group break, as in the printed figure */
.anatomy__row--gap {
  margin-top: clamp(1.3rem, 2.6vw, 2rem);
}

.anatomy__stack {
  position: relative;
  padding-block: clamp(0.5rem, 2vw, 1.5rem);
}

.anatomy__field {
  position: relative;
  z-index: 1;
  grid-column: 2;
  padding: clamp(0.38rem, 0.85vw, 0.62rem) clamp(1.2rem, 2.4vw, 2rem);
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(0.9rem, 2vw, 1.6rem);
  align-items: baseline;
  background: none;
  border: 0;
  transition: background-color 0.4s var(--ease);
}

/* --- callouts outside the panel ------------------------------------------ */
.anatomy__note {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink-muted);
  padding-block: 0.4rem;
  transition: color 0.35s var(--ease), opacity 0.35s var(--ease);
  opacity: 0.7;
}

.anatomy__note--left {
  grid-column: 1;
  justify-content: flex-end;
  text-align: right;
}

.anatomy__note--right {
  grid-column: 3;
  justify-content: flex-start;
  text-align: left;
}

.anatomy__note span {
  max-width: 26ch;
}

/* thin leader line, as in the published figure */
.anatomy__note::after {
  content: "";
  position: absolute;
  top: 50%;
  width: clamp(0.75rem, 2.4vw, 2.6rem);
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(43, 41, 39, 0.26),
    rgba(43, 41, 39, 0.05)
  );
}

.anatomy__note--left::after {
  left: 100%;
  background: linear-gradient(
    to left,
    rgba(43, 41, 39, 0.26),
    rgba(43, 41, 39, 0.05)
  );
}

.anatomy__note--right::after {
  right: 100%;
}

.anatomy__note::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--burgundy);
  opacity: 0;
  transform: translateY(-50%) scale(0.4);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease-spring);
}

.anatomy__note--left::before {
  left: calc(100% + var(--col-gap) - 3px);
}
.anatomy__note--right::before {
  right: calc(100% + var(--col-gap) - 3px);
}

/* --- the specimen itself -------------------------------------------------- */
.anatomy__label {
  font-family: var(--f-sans);
  font-size: clamp(0.95rem, 1.35vw, 1.0625rem);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.3;
  color: var(--charcoal-900);
}

.anatomy__value {
  font-family: var(--f-sans);
  font-size: clamp(0.95rem, 1.35vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink);
}

.anatomy__value a {
  color: var(--burgundy);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: text-decoration-color 0.3s var(--ease);
}

.anatomy__value a:hover {
  text-decoration-color: currentColor;
}

.anatomy__row.is-active .anatomy__field {
  background: rgba(94, 44, 43, 0.05);
}

.anatomy__row.is-active .anatomy__note {
  opacity: 1;
  color: var(--charcoal-800);
}

.anatomy__row.is-active .anatomy__note::before {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.anatomy__row.is-active .anatomy__label {
  color: var(--burgundy);
}

/* --- context: percentile bar --------------------------------------------- */
.percentile {
  display: grid;
  gap: 0.5rem;
  max-width: 30rem;
}

.percentile__head {
  display: block;
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--charcoal-700);
}

.percentile__track {
  position: relative;
  height: 13px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--paper-2) 0%,
    var(--pink-200) 34%,
    var(--accent-400) 62%,
    var(--burgundy) 100%
  );
}

.percentile__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: transparent;
}

.percentile__marker {
  position: absolute;
  top: -7px;
  left: 0;
  width: 2px;
  height: 27px;
  background: var(--charcoal-900);
  border-radius: 1px;
  transition: left 1.4s var(--ease-out);
}

.percentile__marker::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5.5px solid transparent;
  border-right: 5.5px solid transparent;
  border-top: 7px solid var(--charcoal-900);
}

.percentile__scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

/* --- trend --------------------------------------------------------------- */
.trend {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 400;
}

.trend svg {
  width: 13px;
  height: 13px;
  color: var(--positive);
  flex: none;
  transform: translateY(1px);
}

/* --- sources: an inline list, as in the published figure ------------------ */
.sources {
  display: inline;
}

.sources span {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  white-space: normal;
}

.sources span + span::before {
  content: " | ";
  color: var(--charcoal-400);
}

.anatomy__legend {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.anatomy__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.anatomy__legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--burgundy);
  flex: none;
}

@media (max-width: 880px) {
  .anatomy::before {
    display: none;
  }
  .anatomy__row {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 0.9rem;
  }
  .anatomy__row--gap {
    margin-top: 0.6rem;
  }
  .anatomy__note--left,
  .anatomy__note--right,
  .anatomy__field {
    grid-column: 1;
  }
  .anatomy__note {
    justify-content: flex-start !important;
    text-align: left !important;
    padding: 0 0 0.35rem;
    order: 2;
    opacity: 0.9;
  }
  .anatomy__note::after,
  .anatomy__note::before {
    display: none;
  }
  .anatomy__note span {
    max-width: none;
  }
  .anatomy__field {
    order: 1;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
    border: var(--line);
    border-radius: var(--r-md);
    background: var(--paper);
    margin-bottom: 0.4rem;
  }
}

/* --------------------------------------------------------------------------
   12b. Reference table — §6.1 Table style
        Column headers in Burgundy; horizontal rules only (above the header,
        below the header, below the last row); Light Grey row striping.
   -------------------------------------------------------------------------- */
.table-wrap {
  border-top: 1px solid var(--burgundy);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-small);
  line-height: 1.55;
}

.table caption {
  text-align: left;
}

.table thead th {
  font-family: var(--f-serif);
  font-size: var(--t-1);
  font-weight: 700;
  color: var(--burgundy);
  text-align: left;
  vertical-align: bottom;
  padding: 0.9rem 1.1rem 0.75rem 0;
  border-bottom: 1px solid var(--burgundy);
}

.table thead th + th {
  padding-left: 1.1rem;
}

.table__sub {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal-700);
}

.table tbody th {
  font-family: var(--f-sans);
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--charcoal-800);
  text-align: left;
  vertical-align: top;
  padding: 0.85rem 1.1rem 0.85rem 0;
  line-height: 1.45;
}

.table tbody td {
  padding: 0.85rem 0 0.85rem 1.1rem;
  vertical-align: top;
  color: var(--ink-soft);
}

/* Light Grey striping on alternating rows (§6.1) */
.table tbody tr:nth-child(even) th,
.table tbody tr:nth-child(even) td {
  background: var(--light-grey);
}

.table tbody tr:nth-child(even) th {
  padding-left: 0.85rem;
}

.table tbody tr:nth-child(even) td {
  padding-right: 0.85rem;
}

.table tbody tr:last-child th,
.table tbody tr:last-child td {
  border-bottom: 1px solid var(--charcoal-300);
}

.table__source {
  margin-top: 1rem;
  font-size: var(--t-1);
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 74ch;
}

.table__source cite {
  font-style: italic;
}

/* --------------------------------------------------------------------------
   12c. Worked example — §6.3
   -------------------------------------------------------------------------- */
.practice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.practice__chart {
  border: var(--line);
  border-top: 1px solid var(--burgundy);
  padding: clamp(1.1rem, 2.6vw, 1.8rem);
  background: var(--paper);
}

/* the numbered score list that accompanies the chart (§6.3) */
.score-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.6rem;
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--burgundy);
}

.score-list li {
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.42rem 0;
  border-bottom: var(--line);
}

.score-list__n {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--charcoal-500);
}

.score-list__label {
  font-size: var(--t-small);
  color: var(--ink-soft);
  line-height: 1.3;
}

.score-list__value {
  font-family: var(--f-serif);
  font-size: var(--t-3);
  font-weight: 400;
  line-height: 1;
  color: var(--burgundy);
  font-variant-numeric: lining-nums tabular-nums;
}

/* the printed "Notes" field, translated for the screen */
.reflect {
  margin-top: 1.6rem;
  border-top: 1px solid var(--burgundy);
  border-bottom: var(--line);
  padding: 1.1rem 0 1.2rem;
}

.reflect__title {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 0.5rem;
}

.reflect__prompt {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: var(--t-2);
  line-height: 1.4;
  color: var(--deep-burgundy);
}

/* --------------------------------------------------------------------------
   12d. Method — stats and steps
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0;
  border-top: 1px solid var(--burgundy);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.stats__item {
  padding: 1.2rem 1.4rem 1.3rem 0;
  border-bottom: var(--line);
}

.stats__item + .stats__item {
  padding-left: 1.4rem;
  border-left: var(--line);
}

.stats__item dt {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--charcoal-700);
  margin-bottom: 0.6rem;
}

.stats__item dd {
  font-family: var(--f-serif);
  font-size: var(--t-3);
  font-weight: 400;
  line-height: 1;
  color: var(--burgundy);
  margin-bottom: 0.5rem;
}

.stats__item span {
  display: block;
  font-size: var(--t-small);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 30ch;
}

.steps__list {
  display: grid;
  gap: 0;
  border-top: var(--line);
}

.steps__list > li {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: var(--line);
}

.steps__num {
  font-family: var(--f-serif);
  font-size: var(--t-2);
  line-height: 1.1;
  color: var(--burgundy);
}

.steps__list h3 {
  margin-bottom: 0.35rem;
}

.steps__list p {
  font-size: var(--t-small);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 78ch;
}

.method__note {
  margin-top: 1.6rem;
  padding-left: 1.4rem;
  border-left: 1px solid var(--burgundy);
  font-size: var(--t-small);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 78ch;
}

.nowrap {
  white-space: nowrap;
}

@media (max-width: 880px) {
  .practice {
    grid-template-columns: minmax(0, 1fr);
  }
  .score-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .stats__item + .stats__item {
    padding-left: 0;
    border-left: 0;
  }
  .table thead th,
  .table tbody th {
    padding-left: 0;
  }
  .table tbody tr:nth-child(even) th {
    padding-left: 0.5rem;
  }
}

/* --------------------------------------------------------------------------
   12e. Footnotes — §4.2 (secondary face, smallest size, rule above)
   -------------------------------------------------------------------------- */
.footnotes {
  margin-top: clamp(1.5rem, 3vw, 2.2rem);
  padding-top: 0.9rem;
  border-top: var(--line);
  max-width: 74ch;
}

.footnotes li {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  gap: 0.5rem;
  font-family: var(--f-sans);
  font-size: var(--t-1);
  line-height: 1.5;
  color: var(--ink-muted);
  padding: 0.22rem 0;
}

.footnotes li + li {
  border-top: 1px solid rgba(43, 41, 39, 0.07);
}

.footnotes__n {
  font-weight: 600;
  color: var(--charcoal-700);
}

/* superscript reference in running text */
  .fn-ref {
  font-family: var(--f-sans);
  font-size: 0.6875rem;   /* was 0.6875em, which resolved to ~9.6px */
  font-weight: 600;
  vertical-align: super;
  line-height: 0;
  color: var(--burgundy);
  padding-left: 0.1em;
}

/* §4.3 vertical column rule, as used between the printed text columns */
.rule-v {
  position: relative;
}

@media (min-width: 881px) {
  .rule-v::before {
    content: "";
    position: absolute;
    top: 0.15rem;
    bottom: 0.15rem;
    left: calc(-1 * var(--rule-gap, 2.25rem));
    width: 1px;
    background: rgba(43, 41, 39, 0.14);
  }
}

/* --------------------------------------------------------------------------
   13. Collaboration
   -------------------------------------------------------------------------- */
.collab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.collab__logos {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.partner {
  display: flex;
  /* stretch, not centre: the rule on .partner__meta is the divider between the
     logo and the text, and it should reach the card's inner edges rather than
     stopping at the height of the text */
  align-items: stretch;
  gap: clamp(1rem, 2.5vw, 1.6rem);
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  border-radius: var(--r-md);
  background: #fff;
  border: var(--line);
  box-shadow: var(--sh-sm);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.partner:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}

.partner img {
  /* A fixed column, not an intrinsic width: the two wordmarks are different
     shapes (556x101 and 57x11), so sizing to content put the vertical rule at
     a different x in each card. contain keeps each logo undistorted inside
     the same box. */
  width: clamp(130px, 15vw, 210px);
  height: clamp(26px, 3.4vw, 38px);
  flex: none;
  object-fit: contain;
  object-position: left center;
  /* the logo keeps its own height while the column beside it stretches */
  align-self: center;
}

.partner__meta {
  border-left: var(--line);
  padding-left: clamp(0.9rem, 2vw, 1.4rem);
  min-width: 0;
  /* fill the stretched row and centre the text inside it, so the rule runs the
     full inner height and the two lines sit on the card's centre line */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.partner__meta b {
  display: block;
  font-family: var(--f-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--burgundy-900);
  letter-spacing: -0.012em;
}

.partner__meta span {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* Contrast panel A&H vs STEM */
.contrast {
  margin-top: clamp(2rem, 4vw, 3rem);
  border-radius: var(--r-lg);
  border: var(--line);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--sh-sm);
}

.contrast__head {
  padding: 1.1rem clamp(1.1rem, 2.5vw, 1.75rem);
  border-bottom: var(--line);
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.contrast__head h3 {
  font-size: 1.18rem;
}

.contrast__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contrast__col {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.contrast__col + .contrast__col {
  border-left: var(--line);
}

.contrast__col--ah {
  background: linear-gradient(180deg, rgba(242, 224, 225, 0.7), transparent);
}

.contrast__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.contrast__col--stem .contrast__kicker {
  color: var(--charcoal-700);
}

.contrast__col ul {
  display: grid;
  gap: 0.6rem;
}

.contrast__col li {
  position: relative;
  padding-left: 1.3rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.contrast__col li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
}

.contrast__col--stem li::before {
  background: var(--charcoal-300);
}

/* --------------------------------------------------------------------------
   14. Milestones timeline
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  padding-top: 3.4rem;
}

/* one place for the markers' geometry, so the rail can be derived from it */
.timeline__items {
  --cols: 4;
  --dot: 15px;
  --rail: 2px;
  --col-gap: clamp(0.75rem, 2vw, 1.5rem);
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--col-gap);
}

/* The rail runs between the centres of the first and last markers, and is
   vertically centred on them: dot centre = --dot/2 from the top of the grid,
   so the rail's top edge sits half its own thickness above that. */
.timeline__rail {
  position: absolute;
  top: calc(var(--dot) / 2 - var(--rail) / 2);
  left: calc(var(--dot) / 2);
  right: calc(
    (100% - (var(--cols) - 1) * var(--col-gap)) / var(--cols) - var(--dot) / 2
  );
  height: var(--rail);
  background: rgba(43, 41, 39, 0.1);
  border-radius: var(--rail);
  overflow: hidden;
}

.timeline__rail::after {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: 0 50%;
  transform: scaleX(var(--tp, 0));
  background: linear-gradient(90deg, var(--burgundy-700), var(--accent));
  transition: transform 0.25s linear;
}

.milestone {
  position: relative;
  /* flex column so the card can absorb the leftover height. Using height:100%
     on the card instead made it the full row height and pushed it out of the
     row by the height of the date above it. */
  display: flex;
  flex-direction: column;
  padding-top: 2.4rem;
}

.milestone__dot {
  position: absolute;
  top: 0;
  left: 0;
  /* explicit block: the narrow-screen layout switches this to position:relative,
     and an inline span would then ignore width and height entirely */
  display: block;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--burgundy-700);
  transition: transform 0.5s var(--ease-spring), background-color 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.milestone__dot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: pulse 3s var(--ease) infinite;
}

@keyframes pulse {
  0% {
    opacity: 0.5;
    transform: scale(0.6);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

.milestone.is-active .milestone__dot {
  background: var(--burgundy-700);
  transform: scale(1.14);
}

.milestone:hover .milestone__dot {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.2);
}

.milestone__date {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.7rem;
  display: block;
}

.milestone__card {
  border-radius: var(--r-md);
  border: var(--line);
  background: #fff;
  padding: clamp(1rem, 2vw, 1.35rem);
  box-shadow: var(--sh-xs);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease),
    border-color 0.4s var(--ease);
}

.milestone:hover .milestone__card {
  transform: translateY(-5px);
  box-shadow: var(--sh-md);
  border-color: rgba(166, 63, 55, 0.35);
}

.milestone__card h3 {
  font-size: 1.06rem;
  line-height: 1.28;
}

.milestone__card p {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.milestone__tag {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.25rem 0.55rem;
  border-radius: var(--r-xs);
  font-family: var(--f-sans);
  font-size: 0.6875rem; /* was 10px; 11px floor */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--paper-2);
  border: var(--line);
  color: var(--ink-muted);
}

.milestone__tag--live {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

/* --------------------------------------------------------------------------
   15a. Supporting organisations — cards
        Unchanged: this block was already working and carries logos.
   -------------------------------------------------------------------------- */
.contrib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.contrib-card {
  border-radius: var(--r-md);
  border: var(--line);
  background: #fff;
  padding: clamp(1.2rem, 2.4vw, 1.7rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: var(--sh-xs);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.contrib-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-md);
}

.contrib-card__org {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
}

.contrib-card__org img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

/* a square mark needs more height than a wide wordmark to read at the
   same weight beside the others */
.contrib-card__org img[src*="wun"] {
  height: 40px;
}

.contrib-card__org img[src*="elsevier-wordmark"] {
  height: 19px;
}

.contrib-card h3 {
  font-size: 1.1rem;
  line-height: 1.28;
}

.contrib-card__sub {
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   15. Contributors — credits
       One row primitive for every group: organisations, authors, reviewers and
       thanks. Structure comes from rules and alignment, as in §6.1, rather than
       from a different card treatment per group.
   -------------------------------------------------------------------------- */
/* every people group gets the same breathing room above its label, including
   the first one, which follows the supporting-organisation cards */
.credits-group {
  margin-top: clamp(2.25rem, 4.5vw, 3.5rem);
}

.credits-group .eyebrow {
  margin-bottom: 0.9rem;
}

.credits {
  --label: clamp(200px, 30%, 330px);
  display: grid;
  gap: 0;
}

.credit {
  display: grid;
  grid-template-columns: var(--label) minmax(0, 1fr);
  gap: 0 clamp(1rem, 2.5vw, 2rem);
  align-items: baseline;
}

.credit > * {
  padding: 0.7rem 0;
  border-bottom: var(--line);
  min-width: 0;
}

/* the name or organisation — always the strongest element in the row */
.credit__label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: var(--t-small);
  font-weight: 600;
  line-height: 1.35;
  color: var(--charcoal-900);
}

.credit__label img {
  height: 20px;
  width: auto;
  flex: none;
  opacity: 0.92;
}

.credit__label img[src*="elsevier-wordmark"] {
  height: 15px;
}

/* the description, affiliation or list of names */
.credit__value {
  font-size: var(--t-small);
  line-height: 1.55;
  color: var(--ink-muted);
}

/* the affiliation simply wraps if it is long — never truncate a name */
.credit__value--end {
  overflow-wrap: anywhere;
}

.credit__names {
  color: var(--ink-soft);
}

.credit__names li {
  display: inline;
  font-weight: 500;
}

.credit__names li + li::before {
  content: "·";
  margin: 0 0.55em;
  color: var(--charcoal-400);
}

/* §6.1 style striping keeps long credit lists scannable */
/* reviewers: the same rows, flowed into balanced columns. The affiliation
   column is a fixed share so every value starts at the same x — the other
   groups are left-aligned too. */
.credits--reviewers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  --label: minmax(0, 40%);
}

.credits--reviewers .credit {
  gap: 0 0.9rem;
}

@media (max-width: 700px) {
  .credits--reviewers {
    grid-template-columns: minmax(0, 1fr);
  }
  .credit {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .credit > * {
    padding: 0;
    border-bottom: 0;
  }
  .credit {
    padding: 0.7rem 0;
    border-bottom: var(--line);
  }
  .credit__value {
    margin-top: 0.15rem;
  }
}

/* --------------------------------------------------------------------------
   16. Handbook page (Q&A / download)
   -------------------------------------------------------------------------- */
.page-hero {
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 6vw, 4.5rem));
  padding-bottom: clamp(2rem, 4vw, 3rem);
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  border-bottom: var(--line);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1.4rem;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  opacity: 0.5;
}

.book-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.prose {
  max-width: 62ch;
}

.prose > * + * {
  margin-top: 1.15rem;
}

.prose p {
  color: var(--ink-soft);
  line-height: 1.78;
}

.prose h3 {
  margin-top: 2.4rem;
  font-size: var(--t-h3);
}

.prose strong {
  color: var(--burgundy-800);
  font-weight: 600;
}

.prose .lead-in::first-letter {
  float: left;
  font-family: var(--f-display);
  font-size: 3.9em;
  line-height: 0.82;
  font-weight: 600;
  color: var(--burgundy-700);
  padding: 0.06em 0.12em 0 0;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 144;
}

/* sticky cover column */
.book-aside {
  position: sticky;
  top: calc(var(--nav-h) + var(--subnav-h) + 6px);
  display: grid;
  gap: 0.9rem;
}

/* The cover column has to fit the viewport below the two sticky bars, or its
   action buttons sit permanently below the fold and it stops sticking early. */
.has-subnav .book-aside .cover-wrap {
  max-width: 290px;
}

.book-aside .book-facts {
  gap: 0.35rem;
  padding: 0.95rem 1.1rem;
}

.book-aside .book-facts div {
  padding-bottom: 0.4rem;
}

/* Cover used outside the hero mock-up */
.cover-wrap {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: zoom-in;
}

.cover-wrap .cover {
  transition: transform 0.7s var(--ease-out), box-shadow 0.7s var(--ease);
}

.cover-wrap:hover .cover {
  transform: translateY(-5px) rotate(-0.6deg);
  box-shadow: 0 70px 100px -44px rgba(46, 21, 22, 0.66),
    0 26px 50px -26px rgba(46, 21, 22, 0.42);
}

.cover-wrap--static {
  cursor: default;
}

.cover-wrap--static:hover .cover {
  transform: none;
}


.book-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

/* Table of contents (long reference pages) */
.toc {
  display: grid;
  gap: 0.05rem;
  padding: 1.15rem 1.25rem 1rem;
  border-radius: var(--r-md);
  border: var(--line);
  background: #fff;
  box-shadow: var(--sh-xs);
}

.toc__title {
  font-family: var(--f-sans);
  font-size: 0.6875rem; /* was 10px; 11px floor */
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: var(--line);
}

.toc a {
  display: block;
  padding: 0.42rem 0.6rem;
  margin-inline: -0.6rem;
  border-radius: var(--r-xs);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink-soft);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.toc a:hover,
.toc a:focus-visible {
  background: var(--paper-2);
  color: var(--burgundy-800);
}

.toc a.is-active {
  background: var(--pink-050);
  color: var(--burgundy-800);
  font-weight: 550;
}

.book-facts {
  display: grid;
  gap: 0.55rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--r-md);
  border: var(--line);
  background: #fff;
  font-size: 0.875rem;
}

.book-facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: var(--line);
}

.book-facts div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.book-facts dt {
  font-family: var(--f-sans);
  font-size: 0.6875rem; /* was 10px; 11px floor */
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.book-facts dd {
  font-weight: 500;
  color: var(--burgundy-800);
  text-align: right;
}

/* --------------------------------------------------------------------------
   17. Accordion
   -------------------------------------------------------------------------- */
.accordion {
  border-top: var(--line);
}

.acc-item {
  border-bottom: var(--line);
}

.acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: clamp(1.05rem, 2.2vw, 1.5rem) 0;
  text-align: left;
  transition: color 0.3s var(--ease);
}

.acc-trigger:hover {
  color: var(--accent);
}

.acc-index {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  flex: none;
  padding-top: 0.35em;
  transition: color 0.3s var(--ease);
}

.acc-trigger h3 {
  flex: 1;
  font-size: clamp(1.06rem, 1.9vw, 1.38rem);
  font-weight: 550;
  line-height: 1.3;
  transition: color 0.3s var(--ease);
}

.acc-icon {
  position: relative;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: var(--line-strong);
  display: grid;
  place-items: center;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease),
    transform 0.5s var(--ease-spring);
}

.acc-icon::before,
.acc-icon::after {
  content: "";
  position: absolute;
  background: var(--burgundy-800);
  border-radius: 2px;
  transition: transform 0.45s var(--ease), background-color 0.35s var(--ease),
    opacity 0.35s var(--ease);
}

.acc-icon::before {
  width: 12px;
  height: 1.5px;
}
.acc-icon::after {
  width: 1.5px;
  height: 12px;
}

.acc-trigger[aria-expanded="true"] .acc-icon {
  background: var(--burgundy-700);
  border-color: transparent;
  transform: rotate(180deg);
}

.acc-trigger[aria-expanded="true"] .acc-icon::before,
.acc-trigger[aria-expanded="true"] .acc-icon::after {
  background: #fff;
}

.acc-trigger[aria-expanded="true"] .acc-icon::after {
  transform: scaleY(0);
}

.acc-trigger[aria-expanded="true"] .acc-index {
  color: var(--accent);
}

.acc-panel {
  overflow: hidden;
  height: 0;
  transition: height 0.55s var(--ease-out);
}

/* Without scripting there is nothing to set that height, so every answer would
   stay collapsed and the FAQ would be unreadable. A one-line script in <head>
   puts .js on <html>; when it is absent, keep the panels open. */
html:not(.js) .acc-panel {
  height: auto !important;
}

html:not(.js) .acc-panel__inner {
  opacity: 1 !important;
  transform: none !important;
}

html:not(.js) .acc-trigger {
  cursor: default;
}

html:not(.js) .acc-icon {
  display: none;
}

.acc-panel__inner {
  padding: 0 0 clamp(1.4rem, 3vw, 2.1rem) calc(0.6875rem * 4 + 2.6rem);
  max-width: 68ch;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease) 0.08s, transform 0.5s var(--ease) 0.08s;
}

.acc-trigger[aria-expanded="true"] + .acc-panel .acc-panel__inner {
  opacity: 1;
  transform: none;
}

.acc-panel__inner p + p {
  margin-top: 1rem;
}

.acc-panel__inner ul {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Flow layout, not a flex row: a flex container makes every direct child a
   column, so an inline <em> inside the prose became a column of its own and the
   body's left edge drifted from row to row. The bullet is positioned instead. */
.acc-panel__inner li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.acc-panel__inner li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.acc-panel__inner {
  color: var(--ink-soft);
  line-height: 1.75;
}

/* Sub-headings and pull-quotes inside an expanded answer. This markup only
   appears after the Handbook v7 rebuild: the answers now carry the handbook's
   six user types and the quotations that sit under them. */
.acc-panel__inner h4 {
  margin-top: 1.8rem;
  margin-bottom: 0.5rem;
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy-800);
}

.acc-panel__inner h4 + p {
  margin-top: 0;
}

.pull-quote {
  margin: 1.3rem 0;
  padding-left: 1.05rem;
  border-left: 2px solid var(--pink);
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--ink);
}

.pull-quote p {
  margin: 0;
}

.pull-quote cite {
  display: block;
  margin-top: 0.55rem;
  font-family: var(--f-sans);
  font-style: normal;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.acc-panel__inner .pull-quote + p,
.acc-panel__inner ul + p {
  margin-top: 1.1rem;
}



/* --------------------------------------------------------------------------
   17b. Foreword
   Added with the Handbook v7 rebuild: two signed forewords, one per partner.
   The full text sits in a native <details>, so it opens without JavaScript.
   -------------------------------------------------------------------------- */
.foreword-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: clamp(1rem, 2.2vw, 1.6rem);
  margin-top: clamp(1.4rem, 3vw, 2.2rem);
  /* natural heights, so opening one card's full text does not stretch the
     other into a tall empty column */
  align-items: start;
}

.foreword-card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 2.4vw, 1.8rem);
  border: var(--line);
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--sh-xs);
}

.foreword-card .pull-quote {
  margin: 0;
}

.foreword-card__who {
  margin-top: auto;
  padding-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.foreword-card__who b {
  font-family: var(--f-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--burgundy-800);
}

.foreword-more {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: var(--line);
}

.foreword-more summary {
  cursor: pointer;
  font-family: var(--f-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.foreword-more summary::-webkit-details-marker {
  display: none;
}

.foreword-more summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.3s var(--ease);
}

.foreword-more[open] summary::after {
  transform: rotate(-135deg) translateY(-1px);
}

.foreword-more summary:hover {
  color: var(--burgundy-700);
}

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

.foreword-more p {
  margin-top: 0.9rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   17c. Benefits grid
   Sits directly under an <h3> in the "Why should I use…" column. The six
   benefits are cells in a tinted panel; hairlines carry the itemising, so no
   bullets or numerals are needed -- and numerals would echo the chapter list
   that follows.
   -------------------------------------------------------------------------- */
.benefits {
  display: grid;
  grid-template-columns: 1fr;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
  border: var(--line);
  border-radius: var(--r-md);
  background: var(--pink-050);
  /* clip the corner cells so the tint never bleeds past the radius */
  overflow: hidden;
}

.benefits li {
  padding: 1.05rem 1.3rem;
  border-top: var(--line);
  font-size: 0.9375rem;
  line-height: 1.62;
  color: var(--ink-soft);
}

.benefits li:first-child {
  border-top: none;
}

@media (min-width: 620px) {
  .benefits {
    grid-template-columns: 1fr 1fr;
  }

  .benefits li:nth-child(even) {
    border-left: var(--line);
  }

  /* the top row sits directly under the panel's border */
  .benefits li:nth-child(2) {
    border-top: none;
  }
}

/* --------------------------------------------------------------------------
   17d. Scholar profiles
   Two real profiles from "Selected HKBU Scholar Profiles". Each card holds a
   values radar and an audiences radar, with the percentiles listed beside them
   so the figures are readable without the picture.
   -------------------------------------------------------------------------- */
.profiles {
  display: grid;
  gap: clamp(1.2rem, 2.6vw, 2rem);
  margin-top: clamp(1.6rem, 3.4vw, 2.6rem);
}

.profile {
  padding: clamp(1.2rem, 2.6vw, 2rem);
  border: var(--line);
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--sh-xs);
}

.profile__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.9rem;
  padding-bottom: 0.85rem;
  border-bottom: var(--line);
}

.profile__name {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.15rem, 1.9vw, 1.4rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--burgundy-900);
}

.profile__meta {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.profile__pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.4rem, 3vw, 2.4rem);
  margin-top: clamp(1rem, 2vw, 1.5rem);
}

@media (min-width: 820px) {
  .profile__pair {
    grid-template-columns: 1fr 1fr;
  }
}

.profile__chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.profile__chart .radar {
  width: 100%;
  max-width: 300px;
  height: auto;
}

.profile__chart .score-list {
  width: 100%;
}

.profiles__note {
  margin-top: clamp(1.2rem, 2.6vw, 1.8rem);
  font-family: var(--f-sans);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 80ch;
}

.profile-radar {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
}

.profile-radar__ring {
  fill: none;
  stroke: rgba(43, 41, 39, 0.1);
  stroke-width: 1;
}

.profile-radar__ring--outer {
  stroke: rgba(43, 41, 39, 0.18);
}

.profile-radar__spoke {
  stroke: rgba(43, 41, 39, 0.1);
  stroke-width: 1;
}

.profile-radar__tick {
  font-family: var(--f-sans);
  font-size: 9px;
  fill: var(--ink-muted);
  opacity: 0.75;
}

.profile-radar__label {
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.01em;
  fill: var(--ink-muted);
}

.profile-radar__shape {
  fill: rgba(218, 174, 178, 0.28);
  stroke: var(--burgundy);
  stroke-width: 1.6;
  stroke-dasharray: 5 3;
  stroke-linejoin: round;
}

.profile-radar__dot {
  fill: var(--burgundy);
}

/* the list under each radar: one row per axis, label left, figure right */
.profile__chart .score-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--burgundy);
}

.profile__chart .score-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.34rem 0;
  border-bottom: var(--line);
}

.profile__chart .score-list__label {
  font-family: var(--f-sans);
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.profile__chart .score-list__value {
  font-family: var(--f-serif);
  font-size: 0.95rem;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--burgundy);
}

/* the chart title: Values / Audiences, as the report prints them */
.profile__dim {
  margin: 0 0 0.2rem;
  font-family: var(--f-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--burgundy-800);
}

/* ---- build-in animation -------------------------------------------------
   The polygons sit in a 420-unit viewBox with the centre at 210; scaling about
   that point makes the shape grow out of the hub rather than out of its own
   bounding box. */
.profile-radar__ring,
.profile-radar__spoke,
.profile-radar__tick,
.profile-radar__label {
  opacity: 0;
  transition: opacity 0.6s var(--ease) 0.05s;
}

.profile-radar__shape {
  transform-box: view-box;
  transform-origin: 210px 210px;
  transform: scale(0.02);
  opacity: 0;
  transition:
    transform 0.95s cubic-bezier(0.22, 0.68, 0.24, 1) 0.25s,
    opacity 0.5s var(--ease) 0.25s;
}

.profile-radar__dot {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  opacity: 0;
  transition:
    transform 0.42s var(--ease-spring),
    opacity 0.24s var(--ease);
}

.profile__chart .score-list li {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.45s var(--ease),
    transform 0.45s var(--ease);
}

/* ---- the drawn state ---------------------------------------------------- */
.profile.is-drawn .profile-radar__ring,
.profile.is-drawn .profile-radar__spoke,
.profile.is-drawn .profile-radar__tick,
.profile.is-drawn .profile-radar__label {
  opacity: 1;
}

.profile.is-drawn .profile-radar__shape {
  transform: scale(1);
  opacity: 1;
}

.profile.is-drawn .profile-radar__dot {
  transform: scale(1);
  opacity: 1;
  transition-delay: calc(0.85s + var(--i, 0) * 0.075s), calc(0.85s + var(--i, 0) * 0.075s);
}

.profile.is-drawn .profile__chart .score-list li {
  opacity: 1;
  transform: none;
  transition-delay: calc(1.05s + var(--i, 0) * 0.05s), calc(1.05s + var(--i, 0) * 0.05s);
}

/* labels fade a touch later than the grid they sit on */
.profile.is-drawn .profile-radar__label {
  transition-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .profile-radar__ring,
  .profile-radar__spoke,
  .profile-radar__tick,
  .profile-radar__label,
  .profile-radar__shape,
  .profile-radar__dot,
  .profile__chart .score-list li {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* --------------------------------------------------------------------------
   17e. Framework builder (builder.html)
   The section 03 matrix, read-only by default. "Customise your framework"
   opens the tray and makes every class selectable.
   -------------------------------------------------------------------------- */
.fb {
  margin-top: clamp(1.4rem, 3vw, 2rem);
}

.fb__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.95rem;
}

.fb__bar .matrix-tabs {
  margin: 0;
}

.fb__bar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.fb__toggle {
  margin-left: 0;
}

/* ---- layout: the tray slides in beside the table ----------------------- */
.fb__body {
  display: flex;
  gap: clamp(1rem, 2.2vw, 1.6rem);
  align-items: flex-start;
}

.fb__body .matrix {
  flex: 1 1 auto;
  min-width: 0;
}

.fb__tray {
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  flex: 0 0 0;
  width: 0;
  opacity: 0;
  transform: translateX(14px);
  overflow: hidden;
  border: var(--line);
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--sh-md);
  transition:
    flex-basis 0.55s var(--ease-out),
    width 0.55s var(--ease-out),
    opacity 0.32s var(--ease),
    transform 0.55s var(--ease-out),
    border-color 0.2s var(--ease);
}

.fb.tray-open .fb__tray {
  flex-basis: 330px;
  width: 330px;
  opacity: 1;
  transform: none;
}

.fb__tray.is-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--pink-100), var(--sh-md);
}

/* No scrollbar: the table is fluid and always fits its column. Below 620px
   six columns cannot be squeezed any further, so it may scroll there. */
@media (min-width: 620px) {
  .matrix--build .matrix__scroll {
    /* clip, not visible: collapsed table borders round up by a pixel or two,
       which is enough to raise a scrollbar. clip trims that without creating a
       scroll container, so no bar ever appears. */
    overflow-x: clip;
    overflow-y: visible;
  }

  .matrix--build table {
    min-width: 0;
  }
}

@media (max-width: 1179.98px) {
  .fb__body {
    flex-direction: column;
    align-items: stretch;
  }

  .fb__tray {
    flex: 0 0 auto;
    width: 100%;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    transition:
      max-height 0.55s var(--ease-out),
      opacity 0.32s var(--ease),
      transform 0.45s var(--ease-out),
      border-color 0.2s var(--ease);
  }

  .fb.tray-open .fb__tray {
    /* the desktop rule sets a fixed 330px width; below the breakpoint the tray
       sits under the table and should take the full column */
    width: 100%;
    max-height: 78vh;
    opacity: 1;
    transform: none;
  }
}

/* the table keeps the section 03 shell, with less minimum width because the
   tray shares the row */
.matrix--build table {
  font-size: 0.875rem;
}

.matrix--build thead th:first-child {
  width: 150px;
}

.matrix--build tbody th {
  font-size: 0.8125rem;
  padding: 0.7rem 0.85rem;
}

.matrix--build tbody td {
  /* the button supplies the inset, so the selectable area is the whole cell;
     this gutter is only what keeps the chips from touching the rules */
  padding: 0.22rem;
  vertical-align: top;
}

/* the empty slots keep the section 03 hatch, so the default state reads the
   same as the table on the overview */
.matrix--build tbody td.is-empty {
  padding: 0.85rem 0.9rem;
}

/* ---- a class cell ------------------------------------------------------- */
.fb-cell {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  padding: 0.6rem 0.62rem;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  background: transparent;
  text-align: left;
  font-family: var(--f-sans);
  font-size: 0.875rem;
  font-weight: 450;
  line-height: 1.35;
  color: var(--charcoal-800);
  cursor: default;
  transition:
    color 0.22s var(--ease),
    border-color 0.22s var(--ease),
    transform 0.16s var(--ease),
    background-color 0.22s var(--ease);
}

/* the read-only state is the table from section 03: a dot and a name */
.fb-cell__row {
  display: flex;
  align-items: flex-start;
  gap: 0.42rem;
}

.fb-cell__dot {
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 0.42em;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.75;
  transition: transform 0.26s var(--ease-spring), background-color 0.22s var(--ease),
    opacity 0.22s var(--ease);
}

.fb-cell__name {
  display: block;
}

.fb-cell__n {
  display: block;
  margin-top: 0.2rem;
  margin-left: 0.9rem;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  opacity: 0;
  transition: opacity 0.3s var(--ease), color 0.22s var(--ease);
}

/* ---- customising -------------------------------------------------------- */
.fb.is-customising .fb-cell {
  cursor: pointer;
}

.fb.is-customising .fb-cell__n {
  opacity: 1;
  transition-delay: calc(var(--i, 0) * 11ms);
}

.fb.is-customising .fb-cell:hover {
  background: var(--pink-050);
  border-color: var(--pink-200);
}

.fb.is-customising .fb-cell:active {
  transform: scale(0.985);
}

.fb.is-customising .fb-cell:hover .fb-cell__dot {
  transform: scale(1.35);
}

.fb-cell:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* the fill wipes in from the left rather than fading */
.fb-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--burgundy-800);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.34s var(--ease-out);
}

.fb-cell.is-on {
  color: #fff;
}

.fb-cell.is-on::before {
  transform: scaleX(1);
}

.fb-cell.is-on .fb-cell__dot {
  background: #fff;
  transform: scale(1.1);
}

.fb-cell.is-on .fb-cell__n {
  color: rgba(255, 255, 255, 0.72);
}

.fb-cell.is-on:hover {
  background: transparent;
}

/* partly picked: an indicator was removed from the class */
.fb-cell.is-part {
  background: var(--pink-100);
  border-color: var(--pink-200);
  color: var(--burgundy-900);
}

.fb-cell.is-part .fb-cell__dot {
  background: var(--burgundy-800);
}

@keyframes fb-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.fb-cell.is-pop {
  animation: fb-pop 0.4s var(--ease);
}

.fb-cell.is-dragging {
  opacity: 0.5;
}

/* ---- the tray ----------------------------------------------------------- */
.fb-tray__head {
  flex: none;
  padding: 0.95rem 1.05rem 0.85rem;
  border-bottom: var(--line);
  background: var(--pink-050);
}

.fb-tray__foot {
  flex: none;
  padding: 0.8rem 1.05rem;
  border-top: var(--line);
  background: #fff;
}

/* the export trigger */
.fb-export {
  width: 100%;
  justify-content: center;
  gap: 0.55rem;
}

.fb-export__chev {
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.22s var(--ease);
}

.fb-export[aria-expanded="true"] .fb-export__chev {
  margin-top: 2px;
  transform: rotate(-135deg);
}

/* ---- 3. the dropdown ---------------------------------------------------
   Fixed to the viewport, because the tray clips its children for the
   slide-in and would otherwise cut the menu off. */
.fb-menu {
  position: fixed;
  z-index: 200;
  min-width: 250px;
  padding: 0.32rem;
  border: var(--line);
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: 0 18px 40px -12px rgba(43, 41, 39, 0.28), 0 2px 8px rgba(43, 41, 39, 0.06);
  animation: fb-menu-in 0.16s var(--ease-out) both;
}

@keyframes fb-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.fb-menu button {
  display: block;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: var(--r-xs);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: var(--f-sans);
  transition: background-color 0.14s var(--ease);
}

.fb-menu button:hover,
.fb-menu button:focus-visible {
  background: var(--pink-050);
  outline: none;
}

.fb-menu__label {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink);
}

.fb-menu__hint {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

.fb-tray__count {
  margin: 0 0 0.65rem;
  font-family: var(--f-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--burgundy-800);
  white-space: nowrap;
}

.fb-tray__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fb-tray__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.85rem 1.05rem 1.05rem;
  overflow-y: auto;
  animation: fb-body-in 0.35s var(--ease) both;
}

@keyframes fb-body-in {
  from { opacity: 0.35; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.fb-empty {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-muted);
}

.fb-sec + .fb-sec {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: var(--line);
}

.fb-sec__h {
  margin: 0 0 0.55rem;
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.fb-sec__h span {
  color: var(--accent);
}

.fb-group + .fb-group {
  margin-top: 0.9rem;
}

/* the class header is a band, bold, so the items under it read as a group */
.fb-group__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.4rem 0.32rem 0.5rem;
  margin-bottom: 0.15rem;
  border-radius: var(--r-xs);
  background: var(--pink-050);
}

.fb-group__cls {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--f-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--burgundy-800);
}

.fb-group__x {
  flex: none;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--burgundy-800);
  font-size: 0.9375rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s var(--ease), background-color 0.15s var(--ease);
}

.fb-group__x:hover {
  opacity: 1;
  background: var(--pink-100);
}

.fb-group__x:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  opacity: 1;
}

/* the "?" that opens the definition */
.fb-item__q {
  flex: none;
  width: 17px;
  height: 17px;
  padding: 0;
  border: 1px solid rgba(43, 41, 39, 0.2);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--f-sans);
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  opacity: 0.55;
  transition: opacity 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.fb-item:hover .fb-item__q,
.fb-item__q:hover,
.fb-item__q:focus-visible {
  opacity: 1;
  color: var(--burgundy-800);
  border-color: var(--pink-200);
}

.fb-item__q:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ---- the definition card ----------------------------------------------- */
.fb-tip {
  position: fixed;
  z-index: 210;
  width: 340px;
  max-height: 56vh;
  overflow-y: auto;
  padding: 0.85rem 0.95rem;
  border: var(--line);
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: 0 20px 46px -14px rgba(43, 41, 39, 0.32), 0 2px 8px rgba(43, 41, 39, 0.06);
  animation: fb-tip-in 0.14s var(--ease-out) both;
}

@keyframes fb-tip-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

.fb-tip__path {
  margin: 0 0 0.2rem;
  font-family: var(--f-sans);
  font-size: 0.625rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.fb-tip__name {
  margin: 0 0 0.55rem;
  font-family: var(--f-display);
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--burgundy-900);
}

.fb-tip__dl {
  margin: 0;
}

.fb-tip__dl div {
  padding: 0.4rem 0;
  border-top: 1px solid rgba(43, 41, 39, 0.08);
}

.fb-tip__dl dt {
  margin-bottom: 0.12rem;
  font-family: var(--f-sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.fb-tip__dl dd {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.fb-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fb-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.22rem 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink-soft);
  border-bottom: 1px solid rgba(43, 41, 39, 0.06);
}

.fb-item span {
  flex: 1;
  min-width: 0;
}

.fb-item__x {
  flex: none;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.fb-item__x:hover {
  background: var(--pink-100);
  color: var(--burgundy-800);
}

.fb-item__x:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* The section 03 table paints a white fade down its right edge below 1120px to
   say "this scrolls sideways". The build table is fluid and no longer scrolls,
   so the fade would be pointing at nothing. */
.matrix--build::after {
  display: none;
}

/* Below 620px six columns cannot be squeezed any further, and scrolling a
   matrix sideways is worse than not having one: the table stacks instead, each
   row becoming a value name followed by its classes. */
@media (max-width: 619.98px) {
  .matrix--build .matrix__scroll {
    overflow: visible;
  }

  .matrix--build table,
  .matrix--build thead,
  .matrix--build tbody,
  .matrix--build tr,
  .matrix--build th,
  .matrix--build td {
    display: block;
    width: auto;
    min-width: 0;
  }

  .matrix--build thead {
    display: none;
  }

  .matrix--build tbody tr {
    border-top: 1px solid var(--head);
  }

  .matrix--build tbody th {
    position: static;
    border-left: none;
    border-top: none;
    padding: 0.7rem 0.9rem;
  }

  .matrix--build tbody td {
    padding: 0;
    border-left: none;
  }

  .matrix--build tbody td.is-empty {
    display: none;
  }

  .matrix--build .fb-cell {
    border-radius: 0;
    padding: 0.5rem 0.9rem 0.6rem 1.6rem;
  }

  .matrix--build .fb-cell::before {
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fb__tray,
  .fb-tray__body,
  .fb-menu,
  .fb-tip,
  .fb-export__chev,
  .fb-cell,
  .fb-cell::before,
  .fb-cell__dot,
  .fb-cell__n,
  .fb-item__x {
    transition: none !important;
    animation: none !important;
  }

  .fb.is-customising .fb-cell__n {
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   17f. Forms wired to the API, and the comment dialog
   The form markup is the site's own; what is new is the error line, the
   offscreen honeypot, the sending state, and the dialog around the comment form.
   -------------------------------------------------------------------------- */
.form-error {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin: 0.2rem 0 0.4rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--pink-200);
  border-radius: var(--r-xs);
  background: var(--pink-050);
  color: var(--burgundy-900);
  font-size: 0.875rem;
  line-height: 1.55;
}

/* .form-error is a grid item and sets display itself, so the global [hidden]
   rule needs help to win here */
.form-error[hidden] {
  display: none !important;
}

/* The honeypot. Offscreen rather than display:none: a bot that parses the DOM
   fills it, while a person never sees it and autofill leaves it alone. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form.is-sending {
  cursor: progress;
}

.form.is-sending button[type="submit"] {
  opacity: 0.72;
  cursor: progress;
}

.form button[type="submit"]:disabled {
  cursor: progress;
}

/* ---- the comment dialog ------------------------------------------------- */
.cmodal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.cmodal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(43, 41, 39, 0.42);
  backdrop-filter: blur(2px);
  animation: cmodal-fade 0.18s var(--ease-out) both;
}

.cmodal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 780px);
  overflow-y: auto;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: 0 32px 70px -20px rgba(43, 41, 39, 0.45);
  animation: cmodal-rise 0.24s var(--ease-out) both;
}

@keyframes cmodal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cmodal-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.cmodal__x {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.cmodal__x:hover {
  background: var(--pink-050);
  color: var(--burgundy-800);
}

.cmodal__x:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cmodal__eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.cmodal__title {
  margin: 0 0 0.6rem;
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3.4vw, 1.9rem);
  line-height: 1.15;
  color: var(--burgundy-900);
}

.cmodal__lede {
  margin: 0 0 1.4rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  .cmodal__scrim,
  .cmodal__panel {
    animation: none !important;
  }
}

/* the privacy notice's list of what is collected */
.privacy-list {
  margin: 0.6rem 0 1rem;
  padding: 0;
  list-style: none;
  counter-reset: privacy;
}

.privacy-list li {
  position: relative;
  padding: 0.45rem 0 0.45rem 2.1rem;
  border-bottom: 1px solid rgba(43, 41, 39, 0.08);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.privacy-list li:last-child {
  border-bottom: 0;
}

.privacy-list li::before {
  counter-increment: privacy;
  content: counter(privacy, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.5rem;
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.privacy-list b {
  color: var(--ink);
  font-weight: 600;
}

/* the two scholars' percentiles, axis by axis */
.profile-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.profile-table th,
.profile-table td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid rgba(43, 41, 39, 0.08);
  text-align: left;
  vertical-align: middle;
}

.profile-table thead th {
  background: var(--burgundy);
  color: #fff;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.3;
  border-bottom: 0;
}

.profile-table thead th span {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  opacity: 0.82;
}

.profile-table tbody th[scope="row"] {
  font-family: var(--f-sans);
  font-weight: 450;
  color: var(--ink-soft);
  width: 40%;
}

.profile-table__group th {
  padding-top: 1.1rem;
  padding-bottom: 0.35rem;
  background: #fff;
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--burgundy);
}

/* a bar and its number, drawn to one scale for every row */
.pmeter {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.pmeter i {
  flex: none;
  display: block;
  width: 92px;
  height: 8px;
  border-radius: 4px;
  background: var(--pink-100);
  position: relative;
  overflow: hidden;
}

.pmeter i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v) * 1%);
  border-radius: 4px;
  background: var(--burgundy);
}

.pmeter b {
  font-family: var(--f-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--burgundy-800);
  min-width: 2.2em;
}

/* --------------------------------------------------------------------------
   18. Citation
   -------------------------------------------------------------------------- */
.cite {
  border-radius: var(--r-lg);
  border: var(--line);
  background: linear-gradient(165deg, #fff, var(--paper-2));
  overflow: hidden;
  box-shadow: var(--sh-sm);
}

.cite__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
  border-bottom: var(--line);
}

.cite__head h3 {
  font-size: 1.2rem;
}

.cite__tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: var(--r-sm);
  background: rgba(43, 41, 39, 0.05);
  border: var(--line);
}

.cite__tabs button {
  padding: 0.4rem 0.85rem;
  border-radius: var(--r-xs);
  font-family: var(--f-sans);
  font-size: 0.6875rem; /* was 10px; 11px floor */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.cite__tabs button[aria-selected="true"] {
  background: var(--burgundy-700);
  color: #fff;
}

.cite__body {
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
  position: relative;
}

.cite__body pre {
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--charcoal-800);
  padding-right: 5.5rem;
  margin: 0;
}

.cite__body pre code {
  font: inherit;
}

.cite__copy {
  position: absolute;
  top: clamp(1.1rem, 2.4vw, 1.6rem);
  right: clamp(1.1rem, 2.4vw, 1.6rem);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--r-pill);
  border: var(--line-strong);
  background: #fff;
  font-family: var(--f-sans);
  font-size: 0.6875rem; /* was 10px; 11px floor */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--burgundy-800);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease), transform 0.35s var(--ease-spring);
}

.cite__copy:hover {
  background: var(--burgundy-700);
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
}

.cite__copy svg {
  width: 12px;
  height: 12px;
}

.cite__copy.is-done {
  background: var(--positive);
  color: #fff;
  border-color: transparent;
}

/* --------------------------------------------------------------------------
   19. Contact form
   -------------------------------------------------------------------------- */
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.1rem;
}

.field {
  display: grid;
  gap: 0.42rem;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-family: var(--f-sans);
  font-size: 0.6875rem; /* was 10px; 11px floor */
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.field label .req {
  color: var(--accent);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--r-sm);
  border: var(--line-strong);
  background: #fff;
  font-size: 0.9375rem;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background-color 0.3s var(--ease);
}

.field textarea {
  resize: vertical;
  min-height: 132px;
  line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--charcoal-500);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(166, 63, 55, 0.12);
}

.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: #c0392b;
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.1);
}

.field__error {
  font-size: 0.75rem;
  color: #c0392b;
  min-height: 1em;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.field.has-error .field__error {
  opacity: 1;
  transform: none;
}

/* Consent checkbox */
.field--check {
  padding-top: 0.25rem;
}

.checkbox {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--f-sans);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.checkbox input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.checkbox__box {
  position: relative;
  width: 20px;
  height: 20px;
  margin-top: 0.1em;
  flex: none;
  border-radius: 6px;
  border: 1.5px solid var(--charcoal-400);
  background: #fff;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.checkbox__box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2.5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg) scale(0.4);
  opacity: 0;
  transition: transform 0.28s var(--ease-spring), opacity 0.2s var(--ease);
}

.checkbox input:checked + .checkbox__box {
  background: var(--burgundy-700);
  border-color: var(--burgundy-700);
}

.checkbox input:checked + .checkbox__box::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.checkbox input:focus-visible + .checkbox__box {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.field--check.has-error .checkbox__box {
  border-color: #c0392b;
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.1);
}

.checkbox a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}

.checkbox a:hover {
  text-decoration-color: currentColor;
}

.form__foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
  padding-top: 0.5rem;
}

.form__note {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  max-width: 42ch;
}

.form-done {
  display: none;
  grid-column: 1 / -1;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  border-radius: var(--r-md);
  background: var(--positive-soft);
  border: 1px solid var(--positive-line);
  color: var(--positive);
  font-size: 0.9375rem;
}

.form-done.is-visible {
  display: flex;
}

.form-done svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.contact-aside {
  display: grid;
  gap: 1.4rem;
  align-content: start;
}

.contact-method {
  display: flex;
  gap: 0.9rem;
  padding-bottom: 1.2rem;
  border-bottom: var(--line);
}

.contact-method:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.contact-method__icon {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  border: var(--line);
  color: var(--burgundy-700);
}

.contact-method__icon svg {
  width: 17px;
  height: 17px;
}

.contact-method b {
  display: block;
  font-size: 0.9375rem;
  font-weight: 550;
  color: var(--burgundy-900);
}

.contact-method span,
.contact-method a {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.contact-method a:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   20. Lightbox
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(26, 17, 18, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__figure {
  position: relative;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: grid;
  gap: 1rem;
  justify-items: center;
  transform: scale(0.95);
  transition: transform 0.5s var(--ease-out);
}

.lightbox.is-open .lightbox__figure {
  transform: none;
}

.lightbox__figure img {
  max-height: 74vh;
  width: auto;
  border-radius: var(--r-sm);
  background: #fff;
  box-shadow: var(--sh-lg);
}

.lightbox__caption {
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.875rem;
  max-width: 62ch;
}

.lightbox__caption b {
  display: block;
  font-family: var(--f-display);
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
  color: #fff;
}

.lightbox__bar {
  position: absolute;
  top: clamp(1rem, 3vw, 1.75rem);
  right: clamp(1rem, 3vw, 1.75rem);
  display: flex;
  gap: 0.5rem;
}

/* gallery navigation + counter */
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease-spring);
}

.lb-nav[hidden] {
  display: none;
}

.lb-nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lb-nav--prev {
  left: clamp(-64px, -4vw, -14px);
}

.lb-nav--next {
  right: clamp(-64px, -4vw, -14px);
}

.lb-nav svg {
  width: 20px;
  height: 20px;
}

.lightbox[data-index]::after {
  content: attr(data-index);
  position: absolute;
  top: clamp(1rem, 3vw, 1.75rem);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.62);
  pointer-events: none;
}

@media (max-width: 880px) {
  .lb-nav {
    width: 40px;
    height: 40px;
  }
  .lb-nav--prev {
    left: 6px;
  }
  .lb-nav--next {
    right: 6px;
  }
}

.lb-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease-spring);
}

.lb-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.06);
}

.lb-btn svg {
  width: 17px;
  height: 17px;
}

.zoomable-wrap {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: zoom-in;
}

.zoomable-wrap img {
  width: 100%;
  transition: transform 0.8s var(--ease-out);
}

.zoomable-wrap:hover img {
  transform: scale(1.025);
}

.zoomable-wrap__tag {
  position: absolute;
  bottom: 0.9rem;
  right: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--r-pill);
  background: rgba(26, 17, 18, 0.72);
  color: #fff;
  font-family: var(--f-sans);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.zoomable-wrap__tag svg {
  width: 11px;
  height: 11px;
}

/* Figure frame for the supplied diagrams */
.figure {
  border-radius: var(--r-lg);
  border: var(--line);
  background: #fff;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  box-shadow: var(--sh-sm);
}

.figure figcaption {
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  text-align: center;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   21. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--burgundy-950);
  color: rgba(255, 255, 255, 0.72);
  padding-top: clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 62vw;
  aspect-ratio: 1;
  background: repeating-radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.045) 0 1px,
    transparent 1px 40px
  );
  mask-image: radial-gradient(circle, #000, transparent 68%);
  -webkit-mask-image: radial-gradient(circle, #000, transparent 68%);
  pointer-events: none;
}

.footer__inner {
  position: relative;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 0.9fr));
  gap: clamp(1.6rem, 4vw, 3rem);
  padding-bottom: clamp(2.2rem, 4vw, 3.2rem);
}

.footer__brand .brand__mark {
  color: #fff;
}

.footer__brand .brand__full {
  color: rgba(255, 255, 255, 0.5);
  border-left-color: rgba(255, 255, 255, 0.18);
}


/* WCAG 2.5.8 (AA) wants 24x24 for standalone targets. Links sitting inside a
   sentence are exempt, so only the standalone ones are raised here. */
/* "View original figure" and the database link are standalone controls, not
   links sitting inside a sentence. */
button.link,
.matrix-note a.link {
  min-height: 24px;
  align-items: center;
}

.footer__bottom nav a,
.breadcrumb a,
.contact-method a,
.anatomy__value a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

.footer__tagline {
  margin-top: 1.1rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.6);
}

.footer__logos {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.footer__logos img {
  height: 30px;
  width: auto;
  opacity: 0.9;
}

.footer__logos img.is-light {
  filter: brightness(0) invert(1);
}

.footer h4 {
  color: #fff;
  font-family: var(--f-sans);
  font-size: 0.6875rem; /* was 10px; 11px floor */
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 1rem;
}

.footer__links {
  display: grid;
  gap: 0.6rem;
}

.footer__links a {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.66);
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
  display: inline-block;
}

.footer__links a:hover {
  color: #fff;
  transform: translateX(3px);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer__bottom nav {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.footer__bottom a:hover {
  color: #fff;
}

.footer__wordmark {
  position: relative;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(3.4rem, 15vw, 12rem);
  line-height: 1;
  letter-spacing: -0.055em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.16);
  text-align: center;
  padding-top: clamp(1.6rem, 4vw, 3rem);
  padding-bottom: clamp(1.4rem, 3.4vw, 2.6rem);
  user-select: none;
  font-variation-settings: "SOFT" 20, "WONK" 1, "opsz" 144;
  white-space: nowrap;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   22. Motion / reveal
   -------------------------------------------------------------------------- */
[data-reveal] {
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

/* Only hide content once we know scripting is available, so the page is fully
   readable with JavaScript disabled. `.js` is set by an inline script in <head>. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
}

.js [data-reveal="fade"] {
  transform: none;
}

.js [data-reveal="left"] {
  transform: translateX(-26px);
}

.js [data-reveal="right"] {
  transform: translateX(26px);
}

.js [data-reveal="scale"] {
  transform: scale(0.965) translateY(14px);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* hero intro */
.hero__title .l > span {
  animation: lineUp 1.1s var(--ease-out) both;
}
.hero__title .l:nth-child(1) > span {
  animation-delay: 0.12s;
}
.hero__title .l:nth-child(2) > span {
  animation-delay: 0.24s;
}

@keyframes lineUp {
  from {
    /* must clear the mask padding above, so measure past the line box */
    transform: translateY(calc(100% + 0.36em));
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.hero__fade {
  animation: heroFade 1s var(--ease-out) both;
}
.hero__fade--1 {
  animation-delay: 0.05s;
}
.hero__fade--2 {
  animation-delay: 0.4s;
}
.hero__fade--3 {
  animation-delay: 0.5s;
}
.hero__fade--4 {
  animation-delay: 0.62s;
}
@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero__stage {
  animation: heroFade 1.2s var(--ease-out) 0.3s both;
}

/* Back to top */
.to-top {
  position: fixed;
  right: calc(clamp(1rem, 3vw, 2rem) + env(safe-area-inset-right, 0px));
  bottom: calc(clamp(1rem, 3vw, 2rem) + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--burgundy-800);
  color: var(--pink-200);
  box-shadow: var(--sh-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.9);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease-spring),
    visibility 0.45s, background-color 0.3s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--accent);
  color: #fff;
}

.to-top svg {
  width: 17px;
  height: 17px;
}

.figure-chip {
  width: 46px;
  height: 46px;
  flex: none;
  object-fit: contain;
  padding: 4px;
  border-radius: 10px;
  background: linear-gradient(160deg, #fff, var(--paper-2));
  border: var(--line);
}

/* --------------------------------------------------------------------------
   26. Indicator database and framework builder (indicators.html)

   Built in this site's own language — hairlines, Caslon headings, the burgundy
   palette — rather than the blue of the V3 wireframe, which is a wireframe and
   not a style reference.
   -------------------------------------------------------------------------- */

/* --- filter bar ----------------------------------------------------------- */
.ind-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.9rem 1.1rem;
  align-items: end;
  padding: 1.15rem 1.25rem;
  border: var(--line);
  border-radius: var(--r-md);
  background: var(--paper-2);
}

.ind-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.ind-field label {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.ind-field select,
.ind-field input {
  font-family: var(--f-sans);
  font-size: 0.875rem;
  color: var(--ink);
  background: #fff;
  border: var(--line-strong);
  border-radius: var(--r-xs);
  padding: 0.5rem 0.6rem;
  min-height: 40px;
  width: 100%;
}

.ind-field select:focus-visible,
.ind-field input:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 1px;
}

.ind-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.2rem;
  margin-top: 0.9rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.ind-summary b {
  color: var(--ink);
  font-weight: 600;
}

/* --- the database list ---------------------------------------------------- */
.ind-list {
  margin-top: 1rem;
}

.ind-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem 1.2rem;
  align-items: baseline;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.2rem;
  border: 0;
  border-bottom: var(--line);
  background: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease);
}

.ind-row:hover {
  background: var(--pink-050);
}

.ind-row[aria-expanded="true"] {
  background: var(--paper-2);
}

.ind-row__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--charcoal-900);
}

.ind-row__path {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.ind-row__path i {
  font-style: normal;
  color: var(--charcoal-300);
  margin: 0 0.35em;
}

.ind-row__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

/* provenance badges: which source a row's level-4 name came from */
.ind-badge {
  font-family: var(--f-sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: var(--r-xs);
  border: var(--line);
  background: #fff;
  color: var(--ink-muted);
}

.ind-badge--spec {
  background: var(--pink-050);
  border-color: rgba(166, 63, 55, 0.28);
  color: var(--burgundy);
}

.ind-badge--pending {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(43, 41, 39, 0.055) 0 3px,
    transparent 3px 6px
  );
  color: var(--ink-muted);
}

/* --- the record ----------------------------------------------------------- */
/* the indicator's definition, directly under its own row */
.ind-item {
  border-bottom: var(--line);
}

.ind-item__detail {
  padding: 0.2rem 1.1rem 1.3rem;
  animation: ind-detail-in 0.2s var(--ease-out) both;
}

@keyframes ind-detail-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.ind-item__detail .ind-record {
  margin: 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--pink-050);
  padding: 1.1rem 1.2rem;
  box-shadow: none;
}
.ind-record {
  margin-top: 1.1rem;
  border: var(--line);
  border-left: 3px solid var(--burgundy);
  border-radius: var(--r-md);
  background: #fff;
  padding: clamp(1.1rem, 2.4vw, 1.7rem);
}

.ind-record__path {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.ind-record h3 {
  margin: 0.4rem 0 0.7rem;
  font-size: 1.32rem;
}

.ind-record__def {
  font-size: 1rem;
  line-height: 1.72;
  color: var(--ink-soft);
  max-width: 62ch;
}

.ind-record dl {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.2rem;
  font-size: 0.875rem;
}

.ind-record dl > div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 0.4rem 1.2rem;
  padding-bottom: 0.55rem;
  border-bottom: var(--line);
}

.ind-record dt {
  font-weight: 600;
  color: var(--charcoal-800);
}

.ind-record dd {
  color: var(--ink-muted);
}

/* --- framework builder ---------------------------------------------------- */
.builder {
  border: var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  overflow: hidden;
}

.builder__head {
  padding: clamp(1rem, 2.2vw, 1.5rem) clamp(1rem, 2.2vw, 1.6rem) 0;
}

.builder__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.builder__title h3 {
  font-size: 1.32rem;
}

.builder__level {
  font-family: var(--f-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: var(--r-pill);
  background: var(--burgundy-900);
  color: var(--paper-2);
}

.builder__note {
  margin-top: 0.55rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 70ch;
}

/* mode tabs */
.builder__modes {
  display: flex;
  gap: 0.25rem;
  margin-top: 1.1rem;
  border-bottom: var(--line);
  overflow-x: auto;
}

.builder__mode {
  flex: none;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--ink-muted);
  padding: 0.55rem 0.85rem 0.6rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.builder__mode[aria-selected="true"] {
  color: var(--burgundy);
  border-bottom-color: var(--burgundy);
}

/* step rail */
.builder__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  padding: 0.9rem clamp(1rem, 2.2vw, 1.6rem);
  border-bottom: var(--line);
  background: var(--paper-2);
  font-family: var(--f-sans);
  font-size: 0.8125rem;
}

.builder__step {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-muted);
}

.builder__step i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--charcoal-300);
  font-size: 0.6875rem;
  font-style: normal;
  font-weight: 700;
}

.builder__step[data-state="current"] {
  color: var(--burgundy);
  font-weight: 600;
}

.builder__step[data-state="current"] i {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: #fff;
}

.builder__step[data-state="done"] i {
  background: var(--charcoal-800);
  border-color: var(--charcoal-800);
  color: #fff;
}

.builder__body {
  padding: clamp(1rem, 2.2vw, 1.6rem);
}

/* the two picking panels */
.build-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.8rem);
}

.build-panel {
  border: var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.build-panel__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--burgundy-800);
}

.build-panel--audience .build-panel__head {
  background: var(--charcoal-700);
}

.build-panel__scroll {
  overflow-y: auto;
  max-height: 30rem;
  padding: 0.7rem 0.9rem 0.9rem;
}

.build-group + .build-group {
  margin-top: 1.05rem;
}

.build-group__name {
  font-family: var(--f-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--burgundy);
  padding-bottom: 0.3rem;
}

.build-panel--audience .build-group__name {
  color: var(--charcoal-800);
}

.build-class__name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--charcoal-900);
  margin: 0.55rem 0 0.25rem;
}

.build-class--pending .build-class__name {
  color: var(--ink-muted);
}

.build-ind {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  min-height: 26px;            /* the label carries the tap target, not the box */
  padding: 0.2rem 0 0.2rem 0.15rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-soft);
  cursor: pointer;
}

.build-ind input {
  margin-top: 0.2rem;
  flex: none;
  width: 15px;
  height: 15px;
  accent-color: var(--burgundy);
}

.build-class--pending .build-class__name::after {
  content: "to be published";
  margin-left: 0.5rem;
  font-family: var(--f-sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0.1rem 0.4rem;
  border-radius: var(--r-xs);
  border: var(--line);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(43, 41, 39, 0.055) 0 3px,
    transparent 3px 6px
  );
}

/* generated framework tree */
.fw-tree {
  border-top: 1px solid var(--burgundy);
}

.fw-tree__tile {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
  padding: 0.85rem 0 0.5rem;
}

.fw-tree__tile + .fw-tree__group {
  margin-top: 0;
}

.fw-tree__group {
  border-bottom: var(--line);
  padding-bottom: 0.5rem;
}

.fw-tree__group > b {
  display: block;
  font-size: 0.9375rem;
  padding: 0.5rem 0 0.15rem;
}

.fw-tree__class {
  padding-left: 1.1rem;
  border-left: 1px solid var(--charcoal-300);
  margin-left: 0.15rem;
}

.fw-tree__class > span {
  display: block;
  font-size: 0.8125rem;
  color: var(--charcoal-800);
  padding: 0.3rem 0 0.15rem;
}

.fw-tree ul {
  padding-left: 1rem;
  border-left: 1px dashed var(--charcoal-300);
  margin-left: 0.15rem;
}

.fw-tree li {
  position: relative;
  padding: 0.1rem 0 0.1rem 1rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.fw-tree li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* review step */
.fw-review {
  display: grid;
  gap: 0.6rem;
}

.fw-review__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: var(--line);
}

.fw-review__row b {
  font-size: 0.9375rem;
}

.fw-review__row span {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.fw-remove {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--burgundy);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  padding: 0.3rem 0.1rem;
}

/* builder footer */
.builder__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.9rem clamp(1rem, 2.2vw, 1.6rem);
  border-top: var(--line);
  background: var(--paper-2);
}

.builder__count {
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.builder__count b {
  color: var(--ink);
}

.builder__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* drag & drop */
.dnd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 2.4vw, 1.8rem);
}

.dnd__drop {
  border: 1px dashed var(--charcoal-300);
  border-radius: var(--r-md);
  padding: 0.9rem;
  min-height: 12rem;
  background: var(--paper-2);
}

.dnd__drop.is-over {
  border-color: var(--burgundy);
  background: var(--pink-050);
}

.dnd__chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.35rem;
  border: var(--line);
  border-radius: var(--r-xs);
  background: #fff;
  font-size: 0.8125rem;
  color: var(--charcoal-900);
  cursor: grab;
}

.dnd__chip:active {
  cursor: grabbing;
}

.dnd__chip span {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.dnd__empty {
  display: grid;
  place-items: center;
  min-height: 9rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
  text-align: center;
  padding: 1rem;
}

/* a pending note, echoing the matrix legend */
.ind-pending-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.ind-pending-note i {
  width: 22px;
  height: 10px;
  border-radius: 3px;
  flex: none;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(43, 41, 39, 0.12) 0 3px,
    transparent 3px 6px
  );
  border: var(--line);
}

@media (max-width: 620px) {
  .builder__modes {
    flex-wrap: wrap;
    overflow: visible;
  }
}

@media (max-width: 880px) {
  .build-panels,
  .dnd {
    grid-template-columns: minmax(0, 1fr);
  }
  .build-panel__scroll {
    max-height: 22rem;
  }
  .ind-record dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.1rem;
  }
  .ind-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The hidden attribute relies on a UA display:none, which any author display
   rule overrides — .btn and .lb-nav are inline-flex. Make it authoritative. */
[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   27. Users Cases (cases.html)
   -------------------------------------------------------------------------- */

/* --- the scholar strip ---------------------------------------------------- */
.scholar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 1.6rem);
  padding: clamp(1.1rem, 2.4vw, 1.5rem);
  border: var(--line);
  border-left: 3px solid var(--burgundy);
  border-radius: var(--r-md);
  background: #fff;
}

/* the design document gives the scholar a photo slot and a stacked set of
   affiliation lines; the photo is an initials plate here */
.scholar__photo {
  display: grid;
  place-items: center;
  width: 72px;
  height: 88px;
  flex: none;
  border-radius: var(--r-sm);
  border: var(--line);
  background: linear-gradient(150deg, var(--pink-050), var(--paper-3));
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--burgundy-800);
}

.scholar__who {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.scholar__meta {
  display: grid;
  gap: 0.08rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.scholar__note {
  margin-top: 0.9rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 74ch;
}

/* --- the values / audience tile map -------------------------------------- */
.tile-map {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  table-layout: fixed;
}

.tile-map__row {
  width: 132px;
  padding: 0.7rem 0.85rem;
  vertical-align: middle;
  text-align: left;
  background: var(--burgundy-800);
  color: #fff;
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--burgundy-900);
}

.tile-map td {
  border: var(--line);
  background: #fff;
  padding: 0;
  text-align: center;
  vertical-align: middle;
}

.tile-map td button {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0.55rem 0.5rem;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--charcoal-800);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.tile-map td button:hover {
  background: var(--pink-050);
}

.tile-map td button:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: -2px;
}

.tile-map td button[aria-pressed="true"] {
  background: var(--burgundy-800);
  color: #fff;
  font-weight: 600;
}

.tile-map__blank {
  background: var(--paper-2);
}

.scholar__avatar {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--burgundy-600), var(--burgundy-900));
  color: var(--pink-200);
  font-family: var(--f-display);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.scholar__name {
  font-family: var(--f-display);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--burgundy-900);
}

.scholar__meta {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.scholar__flag {
  margin-left: auto;
  align-self: flex-start;
  font-family: var(--f-sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0.25rem 0.55rem;
  border-radius: var(--r-xs);
  border: var(--line);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(43, 41, 39, 0.055) 0 3px,
    transparent 3px 6px
  );
  white-space: nowrap;
}

/* --- the radiating profile ------------------------------------------------ */
.profile-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: clamp(1.4rem, 3vw, 2.2rem);
}

.profile-card {
  border: var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  padding: clamp(0.9rem, 2vw, 1.4rem);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--burgundy);
}

.profile-card__title {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.profile-card__scale {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

.profile-chart {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 0.4rem;
}

.profile-chart__label {
  font-family: var(--f-sans);
  font-size: 11px;
  font-style: italic;
  fill: var(--charcoal-800);
}

/* the plate is measured from the rendered text and inserted behind it */
.profile-chart__plate {
  fill: var(--paper-3);
  stroke: rgba(43, 41, 39, 0.12);
  stroke-width: 1;
}

.profile-chart__scalehead,
.profile-chart__tick {
  font-family: var(--f-sans);
  font-size: 8px;
  fill: var(--ink-muted);
  /* a halo keeps the ruler legible where it crosses a spoke */
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.profile-chart__scalehead {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  fill: var(--charcoal-800);
}

.profile-chart__notetext {
  font-family: var(--f-sans);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  fill: var(--burgundy-800);
}

/* --- the figure title, as the document prints it above the two charts ----- */
.chart-hint {
  margin-top: 0.9rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  text-align: center;
}

.profile-figure__title {
  font-family: var(--f-display);
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  font-weight: 600;
  letter-spacing: -0.008em;
  color: var(--burgundy-900);
  text-align: center;
  margin-bottom: 0.35rem;
}

.profile-figure__sub {
  display: block;
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-muted);
}

/* --- reveal animation -----------------------------------------------------
   The bars scale out of the hub in turn; everything else follows. Timings live
   here so the JS only has to add .is-drawn. */
.profile-chart__bar {
  transform-box: fill-box;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.95s cubic-bezier(0.22, 0.68, 0.24, 1);
  transition-delay: calc(var(--i, 0) * 65ms);
}

.profile-chart.is-drawn .profile-chart__bar {
  transform: scaleX(1);
}

/* Only the spokes are interactive. The scale, labels, plates, notes, tracks and
   arrowheads are decoration: without this the percentile scale, which is drawn
   last and lies along the 0° spoke, swallows the hover. */
.profile-chart__track,
.profile-chart__shape,
.profile-chart__arrow,
.profile-chart__scale,
.profile-chart__plate,
.profile-chart__label,
.profile-chart__note,
.profile-chart__hub {
  pointer-events: none;
}

/* hovering a spoke redraws it from the hub outward; only once the chart has
   drawn, so a hover during the reveal cannot leave a bar stuck half-drawn */
.profile-chart__hit {
  pointer-events: all;
  cursor: pointer;
}

.profile-chart.is-drawn .profile-chart__axis:hover .profile-chart__bar {
  animation: spoke-redraw 0.75s cubic-bezier(0.22, 0.68, 0.24, 1);
}

@keyframes spoke-redraw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.profile-chart__track {
  opacity: 0;
  transition: opacity 0.5s ease 0.15s;
}

.profile-chart.is-drawn .profile-chart__track {
  opacity: 1;
}

.profile-chart__hub {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  transition: transform 0.5s cubic-bezier(0.34, 1.4, 0.64, 1) 0.05s;
}

.profile-chart.is-drawn .profile-chart__hub {
  transform: scale(1);
}

.profile-chart__arrow {
  opacity: 0;
  transition: opacity 0.45s ease 0.75s;
}

.profile-chart.is-drawn .profile-chart__arrow {
  opacity: 1;
}

.profile-chart__shape {
  opacity: 0;
  transition: opacity 0.7s ease 0.8s;
}

.profile-chart.is-drawn .profile-chart__shape {
  opacity: 1;
}

.profile-chart__scale {
  opacity: 0;
  transition: opacity 0.6s ease 0.2s;
}

.profile-chart.is-drawn .profile-chart__scale {
  opacity: 1;
}

.profile-chart__plate,
.profile-chart__label {
  opacity: 0;
  transition: opacity 0.55s ease 1.05s;
}

.profile-chart.is-drawn .profile-chart__plate,
.profile-chart.is-drawn .profile-chart__label {
  opacity: 1;
}

.profile-chart__note {
  opacity: 0;
  transition: opacity 0.6s ease 1.35s;
}

.profile-chart.is-drawn .profile-chart__note {
  opacity: 1;
}

/* the sparkline draws in from the left once its block is on screen */
.sparkline__line {
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.22, 0.68, 0.24, 1);
}

.split.is-drawn .sparkline__line {
  stroke-dashoffset: 0;
}

.sparkline__area,
.sparkline__dot {
  opacity: 0;
  transition: opacity 0.5s ease 0.5s;
}

.split.is-drawn .sparkline__area,
.split.is-drawn .sparkline__dot {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .profile-chart.is-drawn .profile-chart__axis:hover .profile-chart__bar {
    animation: none !important;
  }
  .profile-chart__bar,
  .profile-chart__hub {
    transform: none !important;
    transition: none !important;
  }
  .profile-chart__track,
  .profile-chart__arrow,
  .profile-chart__shape,
  .profile-chart__scale,
  .profile-chart__plate,
  .profile-chart__label,
  .profile-chart__note,
  .sparkline__area,
  .sparkline__dot {
    opacity: 1 !important;
    transition: none !important;
  }
  .sparkline__line {
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }
}

.profile-card--audience {
  --profile-from: #efeeec;
  --profile-to: #66625f;
}

.profile-card--audience .profile-card__head {
  border-bottom-color: var(--charcoal-700);
}

.profile-card--audience .profile-card__title {
  color: var(--charcoal-800);
}

/* --- case 1: one tile in focus -------------------------------------------- */
.case-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.case-picker button {
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--charcoal-800);
  background: #fff;
  border: var(--line);
  border-radius: var(--r-pill);
  padding: 0.42rem 0.85rem;
  min-height: 32px;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.case-picker button:hover {
  border-color: rgba(166, 63, 55, 0.4);
}

.case-picker button[aria-pressed="true"] {
  background: var(--burgundy-800);
  border-color: var(--burgundy-800);
  color: #fff;
}

.case-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.9rem;
  margin-bottom: clamp(1.3rem, 2.6vw, 1.9rem);
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.case-note b {
  font-family: var(--f-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--burgundy-900);
}

/* --- case 2: quantitative vs qualitative ---------------------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.6rem);
}

.split__cell {
  border: var(--line);
  border-radius: var(--r-md);
  background: #fff;
  padding: clamp(1rem, 2.2vw, 1.4rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
}

.split__kind {
  font-family: var(--f-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.split__cell--quant .split__kind { color: var(--burgundy); }
.split__cell--qual .split__kind { color: var(--charcoal-700); }

.split__cell--qual {
  border-left: 3px solid var(--charcoal-300);
}

.sparkline {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
}

.split__value {
  font-family: var(--f-display);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--burgundy-900);
}

.split__unit {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.split__narrative {
  font-family: var(--f-serif);
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.62;
  color: var(--ink-soft);
  margin: 0;
}

.split__badge {
  align-self: flex-start;
  margin-top: auto;
  font-family: var(--f-sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0.22rem 0.5rem;
  border-radius: var(--r-xs);
  border: var(--line);
}

@media (max-width: 880px) {
  .profile-pair,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .scholar__flag {
    margin-left: 0;
  }
}

/* --------------------------------------------------------------------------
   28. Home-page contents block
   The sticky sub-nav carries four chapter names; this block is where all
   twelve sections are listed, so the bar stays short and nothing is
   unreachable.
   -------------------------------------------------------------------------- */
.contents {
  padding: clamp(1.5rem, 3.6vw, 2.4rem) 0 clamp(1.3rem, 3vw, 2rem);
  border-bottom: var(--line);
}

.contents__title {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1.1rem;
}

.contents__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2rem);
}

.contents__col {
  min-width: 0;
}

.contents__chapter {
  font-family: var(--f-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.008em;
  color: var(--burgundy-900);
  padding-bottom: 0.45rem;
  margin-bottom: 0.45rem;
  border-bottom: 1px solid var(--burgundy);
}

.contents__col a {
  display: block;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-soft);
  padding: 0.24rem 0;
  transition: color 0.25s var(--ease);
}

.contents__col a:hover {
  color: var(--burgundy);
}

.contents__col a b {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--charcoal-300);
  margin-right: 0.45em;
}

@media (max-width: 880px) {
  .contents__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .contents__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }
}

/* The "On this page" label is the first thing to go: on a narrow screen the
   chips themselves are the navigation, and the label only costs ~95px. */
@media (max-width: 700px) {
  .subnav__label {
    display: none;
  }
}

/* Four chapter chips still do not fit one row below ~560px, and a sticky bar
   you must scroll horizontally is a bar you cannot use. Wrap instead, and
   raise --subnav-h to match so the anchor offset and the sticky cover column
   stay correct. */
@media (max-width: 560px) {
  .has-subnav {
    --subnav-h: 86px;
  }

  .subnav__inner {
    height: auto;
    min-height: var(--subnav-h);
    flex-wrap: wrap;
    align-content: center;
    overflow: visible;
    padding: 0.35rem 0;
  }

  .subnav a {
    font-size: 0.8125rem;
    padding: 0.34rem 0.7rem;
  }
}

/* marks a value on the generated case tile that is illustrative rather than
   published — the handbook gives no scored example for an individual */
.anatomy__aside {
  display: inline-block;
  margin-left: 0.4rem;
  font-family: var(--f-sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0.1rem 0.4rem;
  border-radius: var(--r-xs);
  border: var(--line);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(43, 41, 39, 0.055) 0 3px,
    transparent 3px 6px
  );
  vertical-align: middle;
}

.sources .is-primary {
  font-weight: 600;
  color: var(--charcoal-900);
}

/* The generated case tile carries a full reasoning paragraph per indicator,
   where the printed specimen on the home page carries a one-line description.
   Give the centre column more of the width so the prose is not set in a
   two-hundred-pixel ribbon. */
.anatomy--prose {
  --field-w: clamp(320px, 58vw, 720px);
}

.anatomy--prose .anatomy__value {
  line-height: 1.62;
}

/* --------------------------------------------------------------------------
   23. Utilities
   -------------------------------------------------------------------------- */

/* The Elsevier wordmark is optically much heavier than the HKBU lock-up at
   equal height, so it is set down wherever the two appear together. */
.logostrip img[src*="elsevier-wordmark"] {
  height: 21px;
}
.footer__logos img[src*="elsevier-wordmark"] {
  height: 19px;
}
.partner img[src*="elsevier-wordmark"] {
  height: clamp(20px, 2.6vw, 28px);
}


.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.stack-sm > * + * {
  margin-top: 0.75rem;
}
.stack > * + * {
  margin-top: 1.25rem;
}
.mt-sm {
  margin-top: clamp(0.7rem, 1.4vw, 1rem);
}

.mt-lg {
  margin-top: clamp(2rem, 4vw, 3.25rem);
}
.mt-md {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
}

.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-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 3000;
  padding: 0.7rem 1.1rem;
  border-radius: var(--r-sm);
  background: var(--burgundy-800);
  color: #fff;
  font-size: 0.875rem;
  transition: top 0.3s var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   24. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1120px) {
  .nav__links {
    display: none;
  }
  .nav__toggle {
    display: inline-flex;
  }
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
  }
  .hero__stage {
    min-height: 400px;
    order: 2;
  }
  .hero__copy {
    max-width: 46rem;
  }
  .statement {
    grid-template-columns: minmax(0, 1fr);
  }
  .collab {
    grid-template-columns: minmax(0, 1fr);
  }
  .book-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .book-aside {
    position: relative;
    top: 0;
    max-width: 460px;
  }
  .footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .timeline__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1rem;
  }
  .timeline__rail,
  .timeline__rail::after {
    display: none;
  }
  .timeline {
    padding-top: 0;
  }
  .milestone {
    padding-top: 0;
  }
  .milestone__dot {
    position: relative;
    top: 0;
    margin-bottom: 0.9rem;
  }
  .anatomy__row {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 0.9rem;
  }
  .anatomy__note--left,
  .anatomy__note--right,
  .anatomy__field {
    grid-column: 1;
  }
  .anatomy__note {
    justify-content: flex-start !important;
    text-align: left !important;
    padding: 0 0 0.35rem;
    order: 2;
    opacity: 0.9;
  }
  .anatomy__note::after,
  .anatomy__note::before {
    display: none;
  }
  .anatomy__note span {
    max-width: none;
  }
  .anatomy__field {
    order: 1;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
    border-radius: var(--r-md) !important;
    border: var(--line);
    margin-bottom: 0.4rem;
  }
  .anatomy__row:first-child .anatomy__field {
    border-top: var(--line);
  }
  .anatomy::before {
    display: none;
  }
  .contrast__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .contrast__col + .contrast__col {
    border-left: 0;
    border-top: var(--line);
  }
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .form {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  :root {
    --nav-h: 64px;
  }
  .acc-panel__inner {
    padding-left: 0;
  }
  .brand__full {
    display: none;
  }
  .hero__facts {
    gap: 0 1.5rem;
  }
  .timeline__items {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer__top {
    grid-template-columns: minmax(0, 1fr);
  }
  .book-chip--a {
    right: -4%;
  }
  .book-chip--b {
    left: -4%;
  }
  .hero__cta .btn {
    flex: 1 1 auto;
  }
  .cite__body pre {
    padding-right: 0;
  }
  .cite__copy {
    position: static;
    margin-top: 1rem;
  }
}

/* --------------------------------------------------------------------------
   25. Accessibility & print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero__title .l > span,
  .hero__fade,
  .hero__stage {
    animation: none !important;
  }
}

@media print {
  .nav,
  .drawer,
  .to-top,
  .scroll-progress,
  .lightbox {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .section {
    padding-block: 1.5rem;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
