/* ═══════════════════════════════════════════════════════════
   CERTI — AI-Native QMS
   Direction B: Analog ↔ Digital · "Intelligence that keeps you ready."
   Type: Apfel Grotezk (display) · Switzer (UI/body) ·
         Instrument Serif (editorial) · Geist Mono (data) · official logo artwork (wordmark)
   Apfel Grotezk © Collletttivo, SIL OFL 1.1 (self-hosted /fonts)
   ═══════════════════════════════════════════════════════════ */

/* ─── Self-hosted display face ─── */
@font-face {
  font-family: "Apfel Grotezk";
  src: url("../fonts/ApfelGrotezk-Regular.woff2") format("woff2"),
       url("../fonts/ApfelGrotezk-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Apfel Grotezk";
  src: url("../fonts/ApfelGrotezk-Mittel.woff2") format("woff2"),
       url("../fonts/ApfelGrotezk-Mittel.woff") format("woff");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Apfel Grotezk";
  src: url("../fonts/ApfelGrotezk-Fett.woff2") format("woff2"),
       url("../fonts/ApfelGrotezk-Fett.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Apfel Brukt";
  src: url("../fonts/ApfelGrotezk-Brukt.woff2") format("woff2"),
       url("../fonts/ApfelGrotezk-Brukt.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ── Self-hosted Switzer / Instrument Serif / Geist Mono ───────────────────────
   These used to arrive as two third-party stylesheets (Fontshare + Google Fonts),
   which put two extra DNS + TLS + round-trips in the critical path before first
   paint. Serving them from our own origin removes both render-blocking requests.
   The Google families keep their original latin / latin-ext split and unicode-range,
   so a browser still only downloads the subset the page actually needs. */
@font-face {
  font-family: "Switzer";
  src: url("../fonts/Switzer-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("../fonts/Switzer-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("../fonts/Switzer-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("../fonts/Switzer-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-400-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-400-latinext.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-400i-latin.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-400i-latinext.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-400-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-400-latinext.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-500-latin.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-500-latinext.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* height of the fixed nav in its scrolled (compact) state, so pinned sections that
     start at the top of the viewport can reserve room for it */
  --nav-h: 4.2rem;

  /* ── Direction B palette ── */
  --bg: #F7F6F2;          /* off-white page ground */
  --bg-2: #EFEDE6;        /* slightly deeper warm ground */
  --white: #FFFFFF;       /* surfaces / cards */
  --ink: #2C2C34;         /* charcoal — text, logo, dark surfaces */
  --ink-2: #2C2C34;
  --muted: #6B6B71;       /* charcoal 60% — captions, metadata */
  --line: #E4E1DA;        /* warm grey hairline (charcoal ~10%) */
  --line-soft: rgba(44, 44, 52, 0.10);

  --plum: #51344D;        /* THE signature — actions, links, depth */
  --sage: #76877D;        /* success / pass / compliant */
  --butter: #F3DF89;      /* warning fill (analog / warm)  — charcoal text only */
  --periwinkle: #CCCCFF;  /* info / selected fill (digital / cool) — charcoal text only */
  --brick: #B4472F;       /* error / failed / destructive */

  /* ── Type ── */
  --display: "Apfel Grotezk", "Helvetica Neue", Arial, sans-serif;
  --sans: "Switzer", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  /* Wordmark is now the official CERTI logo artwork (img), no longer a font. */

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section: clamp(6rem, 14vh, 11rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.87, 0, 0.13, 1);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body[data-loading] { overflow: hidden; height: 100vh; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
::selection { background: var(--plum); color: var(--bg); }

.container {
  width: 100%;
  max-width: 100rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.accent { color: var(--plum); font-style: inherit; }
.section { padding-block: var(--section); }

/* Visually hidden but available to screen readers & crawlers */
.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;
}

/* ─── Typography ─── */
.h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.5rem, 5.6vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
.h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.section__num { color: var(--plum); font-weight: 500; }
.section__label { color: var(--muted); }

/* ═══════════════ PRELOADER ═══════════════ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.preloader__inner { text-align: center; }
.preloader__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.4rem;
}
.preloader__mark {
  width: auto;
  height: clamp(2.4rem, 6vw, 3.4rem);
  opacity: 0.95;
}
.preloader__count {
  font-family: var(--mono);
  font-weight: 400;
  font-size: clamp(4.5rem, 15vw, 11rem);
  line-height: 1;
  margin-block: 1.5rem 1rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.preloader__count span::after { content: "%"; font-size: 0.32em; vertical-align: 1em; margin-left: 0.1em; color: var(--periwinkle); }
.preloader__tag {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: rgba(247, 246, 242, 0.55);
  font-size: 1.25rem;
}
.preloader__bar {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: rgba(247, 246, 242, 0.12);
}
.preloader__bar span {
  display: block;
  height: 100%; width: 0%;
  background: var(--periwinkle);
}

/* ═══════════════ CURSOR ═══════════════ */
.cursor { position: fixed; inset: 0; z-index: 150; pointer-events: none; }
.cursor__dot,
.cursor__ring {
  position: absolute;
  top: 0; left: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor__dot {
  width: 6px; height: 6px;
  background: var(--plum);
}
.cursor__ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(44, 44, 52, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
              background-color 0.35s, border-color 0.35s, opacity 0.3s;
}
.cursor__label {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bg);
  opacity: 0;
  transition: opacity 0.25s;
  white-space: nowrap;
}
.cursor[data-state="-sm"] .cursor__ring { width: 14px; height: 14px; border-color: var(--plum); }
.cursor[data-state="drag"] .cursor__ring {
  width: 84px; height: 84px;
  background: var(--plum);
  border-color: var(--plum);
}
.cursor[data-state="drag"] .cursor__label { opacity: 1; }
.cursor[data-state="open"] .cursor__ring {
  width: 76px; height: 76px;
  background: var(--plum);
  border-color: var(--plum);
}
.cursor[data-state="open"] .cursor__label { opacity: 1; }
.cursor[data-state="-hide"] .cursor__ring { opacity: 0; }
@media (hover: none) { .cursor { display: none; } }

/* ═══════════════ GRAIN ═══════════════ */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 120;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ═══════════════ NAV ═══════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: transform 0.6s var(--ease-out);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem var(--gutter);
  transition: background-color 0.4s, box-shadow 0.4s, padding 0.4s;
}
.nav.is-scrolled .nav__inner {
  background: rgba(247, 246, 242, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding-block: 0.8rem;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.nav__logo { display: flex; align-items: center; }
.nav__logomark {
  height: clamp(1.5rem, 2vw, 1.85rem);
  width: auto;
  transition: height 0.4s;
}
.nav.is-scrolled .nav__logomark { height: clamp(1.35rem, 1.8vw, 1.6rem); }

.nav__links { display: flex; gap: 2.2rem; }
.nav__link {
  position: relative;
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 500;
  height: 1.35em;
}
.nav__link span { display: block; transition: transform 0.4s var(--ease-out); }
.nav__link::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 100%;
  color: var(--plum);
  transition: transform 0.4s var(--ease-out);
}
.nav__link:hover span { transform: translateY(-100%); }
.nav__link:hover::after { transform: translateY(-100%); }

.nav__right { display: flex; align-items: center; gap: 1rem; }
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 2.6rem; height: 2.6rem;
  align-items: center;
}
.nav__burger span {
  display: block;
  width: 1.4rem; height: 2px;
  background: var(--ink);
  transition: transform 0.4s var(--ease-out), opacity 0.3s;
}
.nav__burger.is-open span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__burger.is-open span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* invert nav while the dark menu overlay is open */
.nav.on-dark .nav__inner { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav.on-dark .nav__logo { color: var(--bg); }
.nav.on-dark .nav__logomark { filter: invert(1) brightness(1.9); }
.nav.on-dark .nav__burger span { background: var(--bg); }
.nav.on-dark .nav__links { opacity: 0; pointer-events: none; }
.nav.on-dark .btn--ink { background: var(--bg); color: var(--ink); }

/* ═══════════════ MENU OVERLAY ═══════════════ */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  visibility: hidden;
  pointer-events: none;
}
.menu.is-open { visibility: visible; pointer-events: auto; }
.menu__bg {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(-100%);
}
.menu__inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
}
.menu__links { display: flex; flex-direction: column; gap: 0.4rem; }
.menu__link {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  color: var(--bg);
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.4rem, 9vw, 5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(30px);
  transition: color 0.3s;
}
.menu__link small {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--periwinkle);
  font-weight: 400;
}
.menu__link:hover { color: var(--periwinkle); }
.menu__foot {
  position: absolute;
  bottom: 2rem; left: var(--gutter); right: var(--gutter);
  display: flex;
  justify-content: space-between;
  color: rgba(247, 246, 242, 0.45);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ═══════════════ BUTTONS ═══════════════ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.9rem;
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.4s var(--ease-out), border-color 0.4s;
  white-space: nowrap;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.5s var(--ease-expo);
}
.btn:hover::before { transform: translateY(0); }

.btn--plum { background: var(--plum); color: var(--bg); }
.btn--plum::before { background: var(--ink); }

.btn--ink { background: var(--ink); color: var(--bg); }
.btn--ink::before { background: var(--plum); }

.btn--ghost { border: 1px solid rgba(44, 44, 52, 0.35); color: var(--ink); }
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover { color: var(--bg); border-color: var(--ink); }

.btn--sm { padding: 0.7rem 1.4rem; font-size: 0.85rem; }
.btn--full { width: 100%; justify-content: center; }

.btn__label { position: relative; display: block; overflow: hidden; height: 1.45em; }
.btn__text {
  position: relative;
  display: block;
  transition: transform 0.5s var(--ease-expo);
}
.btn__text::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 100%;
  width: 100%;
}
.btn:hover .btn__text { transform: translateY(-100%); }
.btn__arrow { transition: transform 0.4s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ═══════════════ HERO ═══════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: clip;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(247,246,242,0.55) 0%, rgba(247,246,242,0) 30%, rgba(247,246,242,0) 55%, rgba(247,246,242,0.9) 100%);
  pointer-events: none;
}
.hero__content {
  position: relative;
  z-index: 2;
  padding-top: 22vh;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: clamp(1rem, 3vh, 2rem);
}
.hero__eyebrow .dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: var(--plum);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(81, 52, 77, 0.35); }
  50% { box-shadow: 0 0 0 9px rgba(81, 52, 77, 0); }
}
.hero__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(4rem, 14vw, 13rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
}
.hero__title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.line__inner { display: inline-block; will-change: transform; }

.hero__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2.5rem;
  margin-top: clamp(2rem, 5vh, 3.5rem);
  flex-wrap: wrap;
}
.hero__sub {
  max-width: 34ch;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--ink-2);
  text-wrap: balance;
}
.hero__cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }

.hero__foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.6rem;
  margin-top: clamp(2.5rem, 7vh, 5rem);
  border-top: 1px solid var(--line);
}
.hero__meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.hero__scroll {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.hero__scroll-line {
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--ink);
  transform-origin: left;
  animation: scrollLine 2.2s var(--ease-expo) infinite;
}
@keyframes scrollLine {
  0% { transform: scaleX(0); transform-origin: left; }
  45% { transform: scaleX(1); transform-origin: left; }
  55% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* ═══════════════ MARQUEE ═══════════════ */
.marquee {
  border-block: 1px solid var(--line);
  padding-block: 1.5rem;
  overflow: clip;
  background: var(--bg);
}
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding-right: 3rem;
  white-space: nowrap;
}
.marquee__group span {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  letter-spacing: 0.005em;
  color: var(--ink-2);
}
.marquee__group i { font-style: normal; font-size: 0.55em; color: var(--plum); }
.marquee__group .marquee__cat {
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1vw, 0.85rem);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--plum);
  align-self: center;
}

/* ═══════════════ MANIFESTO ═══════════════ */
.manifesto__text {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.4vw, 4.1rem);
  line-height: 1.16;
  letter-spacing: -0.005em;
  max-width: 24ch;
}
.manifesto__text em { font-style: italic; }
.manifesto__text .accent { color: var(--plum); }
.manifesto__text .word { display: inline-block; }

.platform__principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(3rem, 8vh, 5.5rem);
  border-top: 1px solid var(--line);
}
.principle {
  padding: clamp(1.8rem, 3.5vh, 2.6rem) clamp(1.2rem, 2vw, 2.4rem);
  border-right: 1px solid var(--line);
}
.principle:first-child { padding-left: 0; }
.principle:last-child { border-right: 0; padding-right: 0; }
.principle__label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--plum);
  margin-bottom: 1rem;
}
.principle__text {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 22ch;
}

/* ═══════════════ IMPACT (stats band) ═══════════════ */
.stats { border-block: 1px solid var(--line); background: var(--bg-2); }
.stats__eyebrow {
  display: block;
  padding-top: clamp(2rem, 4vh, 3rem);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: clamp(1.8rem, 4.5vh, 3.2rem) clamp(1.2rem, 2.2vw, 2.4rem) clamp(2.2rem, 5vh, 3.6rem);
  border-right: 1px solid var(--line);
}
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; padding-right: 0; }
.stat__value {
  display: flex;
  align-items: baseline;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(2.8rem, 4.6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--plum);
  font-variant-numeric: tabular-nums;
}
.stat__unit { font-size: 0.45em; margin-left: 0.08em; }
.stat__unit--lg { font-size: 1em; margin-left: 0; }
.stat__cur { font-size: 1em; }
.stat__mark { font-size: 0.45em; color: var(--sage); margin-right: 0.15em; }
.stat__label {
  margin-top: 1.1rem;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.stat__desc { margin-top: 0.6rem; color: var(--muted); font-size: 0.92rem; line-height: 1.6; max-width: 30ch; }

/* ═══════════════ THE INTELLIGENCE (dark band) ═══════════════ */
.ai { position: relative; background: var(--ink); color: var(--bg); overflow: clip; }
.ai__watermark {
  position: absolute;
  right: -6%;
  top: 8%;
  width: clamp(16rem, 34vw, 34rem);
  height: auto;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}
.ai .container { position: relative; z-index: 1; }
.ai .section__head { border-color: rgba(247, 246, 242, 0.15); }
.ai .section__num { color: var(--periwinkle); }
.ai .section__label { color: rgba(247, 246, 242, 0.5); }
.ai .h2 { color: var(--bg); }
.ai .h2 em { color: var(--bg); }
.peri { color: var(--periwinkle); font-style: inherit; }

.ai__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}
.ai__lead {
  max-width: 46ch;
  color: rgba(247, 246, 242, 0.65);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.65;
}

/* ═══════════ AGENT FLOOR: 12-beat scroll cinematic ═══════════ */
.orbit { position: relative; }
/* the pinned frame */
.orbit__stage {
  position: relative;
  border: 1px solid rgba(247, 246, 242, 0.14);
  border-radius: 10px;
  overflow: hidden;
  background: #14141a;
  aspect-ratio: 21 / 9;
}
/* The film sits on a plane inside a perspective box. Scroll velocity pushes the plane
   back and tilts it, so travelling fast feels like travelling through depth; it settles
   the moment you stop. JS writes translateZ/rotateX/blur here. */
.orbit__space {
  position: absolute;
  inset: 0;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  overflow: hidden;
}
.orbit__plane {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
  /* slightly oversized so a Z push never reveals the edges */
  transform: scale(1.04);
}
.orbit__poster,
.orbit__film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* the poster holds the frame until enough of the film is buffered to scrub */
.orbit__poster { opacity: 1; transition: opacity 0.6s var(--ease-out); }
.orbit.is-ready .orbit__poster { opacity: 0; }
.orbit__film { opacity: 0; transition: opacity 0.6s var(--ease-out); }
.orbit.is-ready .orbit__film { opacity: 1; }
/* the runway is pure scroll distance: one beat per half screen */
.orbit__runway { height: 0; }

.orbit__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20,20,26,0.92) 0%, rgba(20,20,26,0.5) 34%, rgba(20,20,26,0) 64%),
    linear-gradient(0deg, rgba(20,20,26,0.8) 0%, rgba(20,20,26,0) 48%);
}

.orbit__hud {
  position: absolute;
  left: clamp(1.1rem, 2.6vw, 2.6rem);
  bottom: clamp(1.1rem, 2.6vw, 2.2rem);
  right: clamp(1.1rem, 2.6vw, 2.6rem);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: clamp(0.9rem, 2vw, 2rem);
}
.orbit__id { display: flex; align-items: baseline; gap: 0.3rem; }
.orbit__idx {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--periwinkle);
  font-variant-numeric: tabular-nums;
}
.orbit__of {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(247, 246, 242, 0.4);
}
.orbit__caption { max-width: 46ch; }
.orbit__role {
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(204, 204, 255, 0.8);
}
.orbit__name {
  margin-top: 0.25rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--bg);
}
.orbit__task {
  margin-top: 0.4rem;
  font-size: clamp(0.82rem, 1.05vw, 0.95rem);
  line-height: 1.5;
  color: rgba(247, 246, 242, 0.68);
}
/* One continuous rail, because the film is one continuous timeline. The fill tracks the
   playhead exactly; the ticks just mark where each agent begins. */
.orbit__rail {
  grid-column: 1 / -1;
  position: relative;
  height: 2px;
  margin-top: 0.9rem;
  background: rgba(247, 246, 242, 0.16);
}
.orbit__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--periwinkle);
}
.orbit__ticks {
  position: absolute;
  inset: -3px 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}
.orbit__tick {
  border-left: 1px solid rgba(247, 246, 242, 0.24);
  transition: border-color 0.35s var(--ease-out);
}
.orbit__tick:first-child { border-left-color: transparent; }
.orbit__tick.is-live { border-left-color: var(--bg); }

.orbit__scrollhint {
  position: absolute;
  top: clamp(0.9rem, 2vw, 1.4rem);
  right: clamp(0.9rem, 2vw, 1.4rem);
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(247, 246, 242, 0.5);
  border: 1px solid rgba(247, 246, 242, 0.16);
  border-radius: 100px;
  padding: 0.3rem 0.7rem;
  transition: opacity 0.5s var(--ease-out);
}
.orbit.is-engaged .orbit__scrollhint { opacity: 0; }

.orbit__loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(247, 246, 242, 0.55);
  transition: opacity 0.4s var(--ease-out);
  animation: orbitPulse 1.6s ease-in-out infinite;
}
.orbit.is-ready .orbit__loading { opacity: 0; animation: none; }
@keyframes orbitPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.85; } }

/* Phones + reduced motion: the stills as a plain list, no cinematic */
.orbit__list { display: none; }
.orbit__list.is-shown {
  display: grid;
  gap: clamp(0.9rem, 2vw, 1.4rem);
}
.orbit__item {
  border: 1px solid rgba(247, 246, 242, 0.13);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(247, 246, 242, 0.03);
}
.orbit__item img { width: 100%; height: auto; display: block; aspect-ratio: 21/9; object-fit: cover; }
.orbit__itembody { padding: clamp(0.9rem, 2vw, 1.2rem); }
.orbit__itemidx {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--periwinkle);
}
.orbit__itemname {
  margin-top: 0.3rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--bg);
}
.orbit__itemtask { margin-top: 0.35rem; font-size: 0.88rem; line-height: 1.5; color: rgba(247, 246, 242, 0.62); }

@media (max-width: 900px) {
  .orbit__stage { aspect-ratio: 4 / 3; }
  .orbit__hud { grid-template-columns: 1fr; gap: 0.6rem; }
  .orbit__idx { font-size: 2.2rem; }
}

.ai__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.9rem, 1.6vw, 1.4rem);
}
.ai-card {
  position: relative;
  padding: clamp(1.4rem, 2.2vw, 1.9rem);
  border: 1px solid rgba(247, 246, 242, 0.13);
  border-radius: 6px;
  background: rgba(247, 246, 242, 0.028);
  transition: border-color 0.45s var(--ease-out), background-color 0.45s, transform 0.45s var(--ease-out);
}
.ai-card:hover {
  border-color: rgba(204, 204, 255, 0.45);
  background: rgba(247, 246, 242, 0.05);
  transform: translateY(-6px);
}
.ai-card__icon {
  display: inline-flex;
  width: 2.6rem; height: 2.6rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(204, 204, 255, 0.3);
  border-radius: 8px;
  color: var(--periwinkle);
  margin-bottom: 1.1rem;
  transition: background-color 0.45s, border-color 0.45s;
}
.ai-card:hover .ai-card__icon { background: rgba(204, 204, 255, 0.08); border-color: rgba(204, 204, 255, 0.55); }
.ai-card__icon svg { width: 1.4rem; height: 1.4rem; }
/* Makes the "twelve agents" claim add up on screen: 2+1+3+3+2+1 across the six cards. */
.ai-card__count {
  position: absolute;
  top: clamp(1.4rem, 2.2vw, 1.9rem);
  right: clamp(1.4rem, 2.2vw, 1.9rem);
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(247, 246, 242, 0.4);
  border: 1px solid rgba(247, 246, 242, 0.14);
  border-radius: 100px;
  padding: 0.25rem 0.6rem;
  transition: color 0.4s, border-color 0.4s;
}
.ai-card:hover .ai-card__count { color: var(--periwinkle); border-color: rgba(204, 204, 255, 0.4); }

.ai-card__name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.55rem;
}
.ai-card__desc {
  color: rgba(247, 246, 242, 0.62);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ── CERTIQ — conversational agent panel ── */
.certiq {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(1.5rem, 3.5vw, 3.5rem);
  align-items: center;
  margin-top: clamp(2rem, 5vh, 3.2rem);
  padding: clamp(1.6rem, 3vw, 2.8rem);
  border: 1px solid rgba(204, 204, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(204, 204, 255, 0.05) 0%, rgba(247, 246, 242, 0.02) 60%);
}
.certiq__badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink);
  background: var(--periwinkle);
  padding: 0.32rem 0.8rem;
  border-radius: 100px;
  margin-bottom: 1.2rem;
}
.certiq__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.certiq__title em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.certiq__desc {
  color: rgba(247, 246, 242, 0.65);
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: 46ch;
  margin-bottom: 1.4rem;
}
.certiq__win {
  background: #26262d;
  border: 1px solid rgba(247, 246, 242, 0.12);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 60px -35px rgba(0, 0, 0, 0.6);
}
.certiq__winbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: rgba(247, 246, 242, 0.5);
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(247, 246, 242, 0.1);
}
.certiq__dot {
  width: 0.45rem; height: 0.45rem;
  border-radius: 50%;
  background: var(--periwinkle);
  animation: pulse 2.4s ease-in-out infinite;
}
/* which of the two real flows is currently playing */
.certiq__scenario {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--periwinkle);
  border: 1px solid rgba(204, 204, 255, 0.28);
  border-radius: 100px;
  padding: 0.22rem 0.6rem;
  white-space: nowrap;
}

/* fixed height + bottom-anchored scroll: behaves like a live chat, never jumps layout */
.certiq__thread {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-block: 0.9rem;
  height: 21rem;
  overflow: hidden;
}
.cq-msg {
  max-width: 88%;
  padding: 0.7rem 0.95rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  animation: cqIn 0.45s var(--ease-out) forwards;
}
@keyframes cqIn { to { opacity: 1; transform: translateY(0); } }
.cq-msg--user {
  align-self: flex-end;
  background: var(--periwinkle);
  color: var(--ink);
  border-bottom-right-radius: 3px;
}
.cq-msg--ai {
  align-self: flex-start;
  background: rgba(247, 246, 242, 0.07);
  border: 1px solid rgba(247, 246, 242, 0.1);
  color: rgba(247, 246, 242, 0.85);
  border-bottom-left-radius: 3px;
}
/* typing indicator */
.cq-typing {
  align-self: flex-start;
  display: flex;
  gap: 0.28rem;
  padding: 0.8rem 0.95rem;
  background: rgba(247, 246, 242, 0.07);
  border: 1px solid rgba(247, 246, 242, 0.1);
  border-radius: 10px;
  border-bottom-left-radius: 3px;
  opacity: 0;
  animation: cqIn 0.3s var(--ease-out) forwards;
}
.cq-typing span {
  width: 0.32rem; height: 0.32rem;
  border-radius: 50%;
  background: rgba(204, 204, 255, 0.75);
  animation: cqBlink 1.2s ease-in-out infinite;
}
.cq-typing span:nth-child(2) { animation-delay: 0.18s; }
.cq-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes cqBlink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* result card: the evidence CERTIQ hands back */
.cq-card {
  align-self: flex-start;
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(204, 204, 255, 0.28);
  border-left: 2px solid var(--periwinkle);
  border-radius: 8px;
  background: rgba(204, 204, 255, 0.06);
  opacity: 0;
  animation: cqIn 0.45s var(--ease-out) forwards;
}
.cq-card__label {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--periwinkle);
  margin-bottom: 0.35rem;
}
.cq-card__text { font-size: 0.88rem; line-height: 1.45; color: rgba(247, 246, 242, 0.9); }
.cq-card__meta {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: rgba(247, 246, 242, 0.45);
}

/* SUPPORTED badge + the sources CERTI actually read */
.cq-card__badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: var(--sage);
  border-radius: 100px;
  padding: 0.16rem 0.45rem;
  margin-left: 0.45rem;
  vertical-align: 0.1em;
}
.cq-card__src {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: rgba(204, 204, 255, 0.6);
}
/* facts table for the investigation frame */
.cq-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.7rem;
  margin-top: 0.5rem;
}
.cq-facts dt {
  font-family: var(--mono);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(247, 246, 242, 0.4);
  align-self: center;
}
.cq-facts dd { font-size: 0.8rem; color: rgba(247, 246, 242, 0.88); }
.cq-list { margin-top: 0.45rem; display: flex; flex-direction: column; gap: 0.3rem; }
.cq-list li {
  position: relative;
  padding-left: 0.85rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(247, 246, 242, 0.85);
}
.cq-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 0.28rem; height: 0.28rem;
  border-radius: 50%;
  background: var(--periwinkle);
}
.cq-hint {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(247, 246, 242, 0.32);
}
/* closing status */
.cq-done {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: var(--sage);
  padding: 0.4rem 0.8rem;
  border-radius: 100px;
  opacity: 0;
  animation: cqIn 0.45s var(--ease-out) forwards;
}

/* fake composer, purely to complete the picture */
.certiq__input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(247, 246, 242, 0.1);
}
.certiq__caret {
  width: 1px; height: 0.95rem;
  background: var(--periwinkle);
  animation: cqCaret 1.1s step-end infinite;
}
@keyframes cqCaret { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
.certiq__placeholder { flex: 1; font-size: 0.84rem; color: rgba(247, 246, 242, 0.35); }
.certiq__send {
  width: 1.7rem; height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(204, 204, 255, 0.18);
  color: var(--periwinkle);
  font-size: 0.8rem;
}

.ai__trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  margin-top: clamp(2rem, 5vh, 3.2rem);
  padding-top: clamp(1.4rem, 3vh, 2rem);
  border-top: 1px solid rgba(247, 246, 242, 0.13);
}
.ai__trust li {
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(247, 246, 242, 0.6);
}
.ai__trust li span {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--periwinkle);
  margin-bottom: 0.4rem;
}

/* Step marker shared by the two parts of "Where to start" */
.step-label {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  margin-bottom: clamp(1.4rem, 3vh, 2.2rem);
}
.step-label span { color: var(--plum); font-weight: 500; }
.step-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  align-self: center;
  margin-left: 0.4rem;
}

/* ═══════════════ ARCHETYPES ═══════════════ */
.arch { background: var(--bg); }
/* wide enough that "different starting points." sits on one line; the <br> sets the two lines */
.arch__h2 { max-width: 40ch; }
/* flows straight into the quickstarts step — no bottom gap between the two */
.arch.section { padding-bottom: clamp(3rem, 7vh, 5rem); }
.arch__intro {
  max-width: 52ch;
  margin-top: clamp(1rem, 2.5vh, 1.6rem);
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.6;
}
.arch__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
}
.arch__card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: clamp(1.6rem, 2.4vw, 2.3rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.arch__card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -30px rgba(44, 44, 52, 0.22);
}
.arch__head { display: flex; align-items: center; gap: 1rem; }
/* Avatar slot — swap the initial for an <img> when artwork is ready */
.arch__avatar {
  flex-shrink: 0;
  width: 4rem; height: 4rem;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--plum), #6b4a66);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  overflow: hidden;
}
.arch__avatar img { width: 100%; height: 100%; object-fit: cover; }
.arch__role {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--plum);
}
.arch__name {
  margin-top: 0.3rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.arch__persona { color: var(--ink-2); font-size: 0.98rem; line-height: 1.55; }
.arch__persona strong { font-weight: 600; }
.arch__quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--ink);
  padding-left: 1rem;
  border-left: 2px solid var(--plum);
}
.arch__turn { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.arch__fit {
  margin-top: auto;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
}
.arch__fit-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.7rem;
}
.arch__fit ul { display: flex; flex-direction: column; gap: 0.4rem; }
.arch__fit li { font-size: 0.9rem; }
.arch__fit a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 500;
  transition: color 0.3s;
}
.arch__fit a::before { content: "→"; color: var(--plum); font-size: 0.85em; }
.arch__fit a:hover { color: var(--plum); }

/* ═══════════════ QUICKSTARTS (horizontal gallery) ═══════════════ */
.modules { background: var(--bg-2); border-block: 1px solid var(--line); }
.modules__pin {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(0.9rem, 1.8vh, 1.5rem);
  overflow: clip;
}
.modules__head { margin-bottom: clamp(0.7rem, 1.8vh, 1.2rem); }

.modules__intro {
  margin-top: 0.7rem;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.25vw, 1.08rem);
  line-height: 1.5;
}
.modules .section__head { margin-bottom: 1rem; padding-bottom: 1rem; }

.modules__track {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
  padding-inline: var(--gutter);
  width: max-content;
  will-change: transform;
}
.mcard {
  position: relative;
  width: clamp(270px, 24vw, 380px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  overflow: clip;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.mcard:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -30px rgba(44, 44, 52, 0.25);
}
.mcard__media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg);
  margin: 0;
}
.mcard__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.8s var(--ease-out);
}
.mcard:hover .mcard__media img { transform: scale(1.06); }
.mcard__num {
  position: absolute;
  top: 0.9rem; left: 0.9rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--plum);
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0.32rem 0.75rem;
  border-radius: 100px;
}
.mcard__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(1.2rem, 2vw, 1.6rem);
}
.mcard__tag {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.7rem;
}
.mcard__name {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.35rem, 1.9vw, 1.65rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 0.8rem;
}
.mcard__quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.35;
  color: var(--plum);
  margin-bottom: 0.8rem;
  max-width: 36ch;
}
.mcard__desc {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 40ch;
}
.mcard__line {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--plum);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-expo);
  z-index: 1;
}
.mcard:hover .mcard__line { transform: scaleX(1); }
.mcard { cursor: pointer; }
.mcard__cta {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--plum);
}
.mcard__cta i { font-style: normal; transition: transform 0.4s var(--ease-out); }
.mcard:hover .mcard__cta i { transform: translateX(5px); }
.modules__next { margin-top: 0.9rem; }
.modules__next p { color: var(--muted); font-size: 0.98rem; }
.modules__next em { font-family: var(--serif); font-style: italic; color: var(--ink); }
@media (max-height: 900px) { .modules__next { display: none; } }

.modules__progress {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: clamp(1rem, 2.5vh, 1.6rem);
}
.modules__progress-bar {
  flex: 1;
  height: 1px;
  background: rgba(44, 44, 52, 0.15);
  position: relative;
}
.modules__progress-bar span {
  position: absolute;
  inset: 0;
  background: var(--plum);
  transform: scaleX(0);
  transform-origin: left;
}
.modules__progress-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.modules__progress-label span { color: var(--ink); }

/* ── Height budget for the pinned section ──────────────────────────────────────
   While this section is pinned, scroll is being spent travelling sideways, so there
   is nowhere to scroll down to: anything that does not fit in one viewport is simply
   lost. The section is therefore capped at exactly one viewport and the space is
   divided by priority: the copy is rigid and never shrinks or truncates, the photo is
   the only elastic part and absorbs all the pressure, growing on tall screens so the
   card never ends in dead white space. The heading is made height-aware too, since a
   width-only clamp keeps it at 80px per line on a 768px laptop.
   NOTE: this block has to stay after the .mcard rules above, which would otherwise
   win on source order and restore flex:1 on the body. */
@media (min-width: 769px) {
  /* Reserve the fixed nav's height: this section is pinned at the very top of the
     viewport, so without it the heading centres itself underneath the navbar and reads
     as though the nav has lost its background. */
  .modules__pin { height: 100svh; padding-top: calc(var(--nav-h) + 0.5rem); }
  .modules__head { flex: 0 0 auto; }
  .modules .h2 { font-size: clamp(1.9rem, min(5.6vw, 8.6vh), 5rem); }
  .modules__intro {
    font-size: clamp(0.88rem, min(1.25vw, 2vh), 1.08rem);
    margin-top: clamp(0.35rem, 1vh, 0.7rem);
  }
  .modules__track {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 44rem;          /* stops the cards going absurd on very tall screens */
    align-items: stretch;       /* every card the same height, however long its copy */
  }
  .mcard { width: clamp(270px, 24vw, 380px); height: 100%; }
  .mcard__media {
    aspect-ratio: auto;         /* the 3:2 default becomes a floor, not a fixed size */
    flex: 1 1 auto;
    min-height: 4.5rem;
  }
  .mcard__body { flex: 0 0 auto; }
}
/* Shorter windows: wider cards, because fewer text wraps means less rigid height to find */
@media (min-width: 769px) and (max-height: 820px) {
  .mcard { width: clamp(300px, 27vw, 420px); }
  .mcard__body { padding: clamp(1rem, 1.6vw, 1.3rem); }
}
/* 1366x768 laptops and anything with deep browser chrome: claw height back from the
   heading so the photo keeps enough room to hold its number badge. */
@media (min-width: 769px) and (max-height: 720px) {
  .modules .h2 { font-size: clamp(1.75rem, min(5.6vw, 6.6vh), 5rem); }
  .modules__head { margin-bottom: 0.5rem; }
  .modules .step-label { margin-bottom: 0.35rem; }
  .mcard__media { min-height: 6.5rem; }
  .mcard__num { top: 0.6rem; left: 0.6rem; padding: 0.24rem 0.6rem; font-size: 0.64rem; }
}

/* ═══════════════ CTA ═══════════════ */
.cta {
  position: relative;
  overflow: clip;
  text-align: center;
  padding-block: clamp(8rem, 20vh, 14rem);
}
.cta__disc {
  position: absolute;
  left: 50%; top: 50%;
  width: min(60vw, 44rem);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid var(--line);
  pointer-events: none;
}
.cta__disc::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px dashed rgba(81, 52, 77, 0.3);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cta__inner { position: relative; }
.cta__mark {
  width: auto;
  height: clamp(3rem, 6vw, 4.6rem);
  margin: 0 auto clamp(1.4rem, 3vh, 2.2rem);
  opacity: 0.9;
}
.cta__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3rem, 8.5vw, 8rem);
  line-height: 1;
  letter-spacing: -0.035em;
}
.cta__title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.cta__sub {
  margin-top: 1.8rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.cta__btn {
  display: inline-flex;
  margin-top: clamp(2.5rem, 6vh, 4rem);
  border-radius: 50%;
}
.cta__btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: clamp(10rem, 16vw, 13rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--plum);
  color: var(--bg);
  font-size: 1.05rem;
  font-weight: 500;
  transition: background-color 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.cta__btn:hover .cta__btn-inner { background: var(--ink); transform: scale(1.06); }
.cta__btn-inner span:last-child { font-size: 1.4rem; transition: transform 0.4s var(--ease-out); }
.cta__btn:hover .cta__btn-inner span:last-child { transform: translateX(6px); }

/* ═══════════════ FOOTER ═══════════════ */
.footer {
  position: relative;
  background: var(--ink);
  color: var(--bg);
  overflow: clip;
  padding-top: clamp(4rem, 10vh, 7rem);
}
.footer__grid {
  display: grid;
  /* brand + Explore + Legal. Was 4 columns when a Company column existed; add a track back
     if Blog returns, or the last column renders as an empty gap. */
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  padding-bottom: clamp(3rem, 8vh, 5rem);
}
.footer__col h3 {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(247, 246, 242, 0.45);
  margin-bottom: 1.2rem;
  font-weight: 500;
}
.footer__col a {
  display: block;
  padding-block: 0.3rem;
  color: rgba(247, 246, 242, 0.8);
  font-size: 0.95rem;
  width: fit-content;
  position: relative;
  transition: color 0.3s;
}
.footer__col a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0.1rem;
  width: 100%; height: 1px;
  background: var(--periwinkle);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-expo);
}
.footer__col a:hover { color: var(--bg); }
.footer__col a:hover::after { transform: scaleX(1); transform-origin: left; }
.footer__pitch {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.5vw, 2.3rem);
  line-height: 1.2;
  max-width: 18ch;
  letter-spacing: 0;
}
.footer__standards {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(247, 246, 242, 0.4);
}
/* ═══════════════ OFFICIAL PARTNER (BRCGS) ═══════════════ */
.partner {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding-block: clamp(1.8rem, 4vh, 2.6rem);
}
.partner__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-align: center;
}
.partner__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.partner__badge {
  display: inline-flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
}
.partner__badge img { height: clamp(1.6rem, 2.4vw, 2.1rem); width: auto; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(247, 246, 242, 0.12);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: rgba(247, 246, 242, 0.5);
}
.footer__top { color: var(--bg); font-size: 0.78rem; font-family: var(--mono); }
.footer__top:hover { color: var(--periwinkle); }
.footer__wordmark {
  display: flex;
  justify-content: center;
  padding: clamp(2.5rem, 6vh, 4.5rem) var(--gutter) clamp(2.5rem, 6vh, 4rem);
  pointer-events: none;
  user-select: none;
  border-top: 1px solid rgba(247, 246, 242, 0.08);
}
.footer__wordmark img {
  width: auto;
  height: clamp(8rem, 15vw, 12.5rem);
  opacity: 0.92;
}

/* ═══════════════ BOOK A DEMO MODAL (Cal.com) ═══════════════ */
.dmodal {
  position: fixed;
  inset: 0;
  z-index: 195;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3vw, 2.5rem);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}
.dmodal.is-open { visibility: visible; opacity: 1; }
.dmodal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 30, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.dmodal__panel {
  position: relative;
  width: 100%;
  /* wide enough that Cal stays above its ~700px threshold and renders slots beside dates */
  max-width: 56rem;
  height: auto;            /* hug the calendar instead of padding it with empty space */
  max-height: 92vh;
  overflow: hidden;
  /* slim strip for the close button: Cal puts its 12h/24h toggle in the same top-right
     corner, so the embed has to start below the button rather than under it */
  padding-top: 2.9rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  transform: translateY(16px) scale(0.985);
  transition: transform 0.45s var(--ease-out);
  box-shadow: 0 40px 90px -40px rgba(26, 26, 30, 0.5);
}
.dmodal.is-open .dmodal__panel { transform: translateY(0) scale(1); }
.dmodal__close {
  position: absolute;
  top: 0.35rem; right: 0.55rem;
  z-index: 2;
  width: 2.3rem; height: 2.3rem;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  background: var(--bg);   /* stays legible over the embed */
  border-radius: 50%;
  transition: background-color 0.3s, color 0.3s;
}
.dmodal__close:hover { background: var(--bg-2); color: var(--ink); }

.dmodal__cal {
  background: var(--bg);
  min-height: 0;
  max-height: 92vh;
  overflow-y: auto;        /* scrolls only if Cal grows past the viewport */
  overscroll-behavior: contain;
}
.dmodal__calmount { min-height: 26rem; }
.dmodal__calmount iframe { display: block; }   /* kill the inline baseline gap under the embed */
.dmodal__calmount.is-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dmodal__calmount.is-loading::after {
  content: "";
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  border: 1px solid rgba(44, 44, 52, 0.2);
  border-top-color: var(--plum);
  animation: spin 1s linear infinite;
}

@media (max-width: 1000px) {
  .dmodal__panel { max-height: 94vh; }
  .dmodal__cal { max-height: 94vh; }
}

/* ═══════════════ QUICKSTART DEMO: THE CARD ITSELF EXPANDS ═══════════════ */
/* ── Quickstart demo modal ─────────────────────────────────────────────────────
   Sized off the demo's own aspect so Arcade never gets letterboxed into dead space:
   the panel width is whichever of 76vw / the height-derived width is smaller, so the
   embed always fits the viewport without cropping its 41px control bar. */
.qsmodal {
  position: fixed;
  inset: 0;
  z-index: 195;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3vw, 2.5rem);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}
.qsmodal.is-open { visibility: visible; opacity: 1; }
.qsmodal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 30, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.qsmodal__panel {
  position: relative;
  /* Height budget solved for width: the video is width x --qs-aspect tall (its controls
     overlay the frame), so this is the widest panel whose demo plus the 3.4rem title bar
     still fits in 88vh. --qs-aspect is set per demo by openQs(). */
  width: min(76vw, calc((88vh - 3.4rem) / var(--qs-aspect, 0.5625)));
  max-width: 78rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transform: translateY(16px) scale(0.985);
  transition: transform 0.45s var(--ease-out);
  box-shadow: 0 40px 90px -40px rgba(26, 26, 30, 0.5);
}
.qsmodal.is-open .qsmodal__panel { transform: translateY(0) scale(1); }
/* Once the entrance has finished the transform is dropped entirely. `translateY(0) scale(1)`
   still counts as a transform, which makes the panel a containing block and a composited
   layer above the iframe — the very condition that stops embeds receiving clicks. Visually
   identical, structurally clean. */
.qsmodal.is-settled .qsmodal__panel { transform: none; transition: none; }
.qsmodal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.4rem;
  padding: 0 0.6rem 0 clamp(1rem, 2vw, 1.4rem);
  border-bottom: 1px solid var(--line);
}
.qsmodal__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.qsmodal__close {
  flex: 0 0 auto;
  width: 2.3rem; height: 2.3rem;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  border-radius: 50%;
  transition: background-color 0.3s, color 0.3s;
}
.qsmodal__close:hover { background: var(--bg-2); color: var(--ink); }
.qsmodal__mount { background: var(--ink); }
.qsmodal__video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--ink); }

@media (max-width: 768px) {
  .qsmodal__panel { width: 100%; max-width: none; }
}
.mcard__soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 1.5rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(247, 246, 242, 0.5);
}
.mcard__soon::before {
  content: "";
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  border: 1px solid rgba(204, 204, 255, 0.35);
  border-top-color: var(--periwinkle);
  animation: spin 1.4s linear infinite;
}
/* the "coming soon" placeholder is shown inside the modal mount, over its dark ground */
.qsmodal__mount .mcard__soon { min-height: 15rem; justify-content: center; }

/* ═══════════════ LEGAL PAGES (privacy policy, terms) ═══════════════
   Shared by privacy-policy.html and terms.html, which are standalone pages: they load
   this stylesheet but not main.js, so nothing here may depend on JS having run. */
.legal__head {
  padding: calc(var(--nav-h) + 3rem) 0 2.5rem;
  border-bottom: 1px solid var(--line);
}
.legal__logo { height: 1.9rem; width: auto; display: block; margin-bottom: 2.5rem; }
.legal__kicker {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum);
}
.legal__title {
  margin-top: 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.legal__title em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.legal__dates {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.legal__body { padding: 3rem 0 5rem; max-width: 74ch; }
.legal__body h2 {
  margin: 3rem 0 0.9rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  letter-spacing: -0.015em;
}
.legal__body h2:first-child { margin-top: 0; }
.legal__body h3 {
  margin: 1.8rem 0 0.6rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--plum);
}
.legal__body p, .legal__body li { color: var(--muted); line-height: 1.65; }
.legal__body p { margin-bottom: 1rem; }
.legal__body ul { margin: 0 0 1.2rem 1.1rem; }
.legal__body li { margin-bottom: 0.5rem; }
.legal__body strong { color: var(--ink); font-weight: 500; }
/* :not(.btn) so this never repaints a button — .legal__body a outranks .btn--plum on
   specificity, which previously gave the Back to home button plum text on a plum
   background plus an underline. */
.legal__body a:not(.btn) { color: var(--plum); text-decoration: underline; text-underline-offset: 0.2em; }
.legal__toc {
  margin: 0 0 2.5rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.legal__toc ol { margin: 0.6rem 0 0 1.2rem; columns: 2; column-gap: 2rem; }
.legal__toc li { margin-bottom: 0.35rem; font-size: 0.92rem; }
.legal__tbl { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-size: 0.9rem; }
.legal__tbl th, .legal__tbl td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.legal__tbl th {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.legal__tbl td { color: var(--muted); line-height: 1.5; }
.legal__wrap { overflow-x: auto; }
/* no display here: .btn's own inline-flex must win, or the label and arrow stack
   vertically instead of sitting in a row */
.legal__back { margin-top: 3rem; }
@media (max-width: 640px) { .legal__toc ol { columns: 1; } }

/* ═══════════════ DEMO / BOOKING PAGES ═══════════════
   Shared by demos/index.html, the nine demos/<slug>.html pages and book-a-demo.html.

   Like the legal pages these are STANDALONE: they load this stylesheet but not main.js,
   so nothing here may depend on JS having run. That is why they reuse .legal__head,
   .legal__logo, .legal__kicker and .legal__title for the masthead rather than the
   homepage's animated header, and why the .btn hover label-swap degrades to the
   background slide (that swap needs main.js to wrap the text). These pages exist so each
   demo has a real indexable URL instead of living only inside the homepage modal.

   THE ONE RULE ABOUT .dpage__frame: it may set the outer box's WIDTH only. Arcade scales
   its interactive layer to the iframe's frame, so anything of ours that sets the iframe's
   width, height or aspect-ratio mis-scales its hit targets and clips the 41px control bar
   that its own fullscreen and copy-link buttons live in. The inner aspect box is Arcade's
   own markup, reproduced verbatim by assets-src/gen-pages.py. */

.dpage__head { padding-bottom: 2rem; }

.dpage__crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.dpage__crumbs a { color: var(--muted); text-decoration: none; transition: color 0.25s; }
.dpage__crumbs a:hover { color: var(--plum); }
.dpage__crumbs [aria-current] { color: var(--ink); }

.dpage__lede {
  margin-top: 1.4rem;
  max-width: 60ch;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  color: var(--muted);
}

.dpage { padding: 3rem 0 0; }

/* ── The embed ── */
.dpage__demo { margin: 0 0 3.5rem; }
/* Cap the width so the demo's own height can never exceed the viewport: the frame is
   (width × --qs-aspect) + 41px tall, so solving for width against 74vh keeps the whole
   player, control bar included, on screen. Same derivation as the homepage modal panel. */
.dpage__frame {
  width: 100%;
  max-width: min(100%, calc(74vh / var(--qs-aspect, 0.5625)));
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--ink);
}
.dpage__video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--ink); }
.dpage__frame--soon .mcard__soon { aspect-ratio: 16 / 9; justify-content: center; }
.dpage__cap {
  margin: 1rem auto 0;
  max-width: 62ch;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ── Prose + aside ── */
.dpage__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: clamp(2rem, 5vw, 5rem);
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--line);
}
.dpage__prose { max-width: 66ch; }
.dpage__quote {
  margin: 0 0 1.8rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--plum);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.35;
  color: var(--ink);
}
.dpage__prose p { margin-bottom: 1.1rem; color: var(--muted); line-height: 1.7; }

.dpage__aside {
  align-self: start;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}
.dpage__asideh {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plum);
}
.dpage__list { margin: 1rem 0 0; padding: 0; list-style: none; }
.dpage__list li {
  position: relative;
  margin-bottom: 0.7rem;
  padding-left: 1.1rem;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--muted);
}
.dpage__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--plum);
}
/* no display property here: .btn's own inline-flex must win, or the label and the arrow
   stack vertically instead of sitting in a row (same trap as .legal__back) */
.dpage__asidebtn { margin-top: 1.4rem; }

/* ── Closing CTA ── */
.dpage__cta { padding: 4rem 0; text-align: center; }
.dpage__cta h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.dpage__cta p {
  margin: 1rem auto 1.8rem;
  max-width: 52ch;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Sibling demos ── */
.dpage__more { padding: 2.5rem 0 4rem; border-top: 1px solid var(--line); }
.dpage__more h2 {
  margin-bottom: 1.2rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.dpage__more ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.2rem 2rem;
  list-style: none;
}
.dpage__more a {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.96rem;
  transition: color 0.25s;
}
.dpage__more a:hover { color: var(--plum); }
.dpage__moren { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }

/* ── Footer ── */
.dpage__foot { padding: 2.5rem 0 3rem; border-top: 1px solid var(--line); background: var(--bg-2); }
.dpage__footgrid { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2.5rem; }
.dpage__footlogo img { height: 1.5rem; width: auto; display: block; }
.dpage__footnav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; }
.dpage__footnav a {
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s;
}
.dpage__footnav a:hover { color: var(--plum); }
.dpage__footnote { margin-left: auto; font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }

/* ═══════ /demos/ hub grid ═══════ */
.dhub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1.6rem;
  padding-bottom: 1rem;
  list-style: none;
}
.dhub__item > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  color: inherit;
  text-decoration: none;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.dhub__item > a:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -24px rgba(44, 44, 52, 0.35);
}
.dhub__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.dhub__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dhub__num {
  position: absolute;
  top: 0.7rem;
  left: 0.8rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--bg);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
.dhub__body { display: flex; flex-direction: column; flex: 1; padding: 1.2rem 1.3rem 1.3rem; }
.dhub__tag {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--plum);
}
.dhub__name {
  margin: 0.5rem 0 0.6rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.16rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.dhub__desc { flex: 1; font-size: 0.92rem; line-height: 1.55; color: var(--muted); }
.dhub__cta {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--plum);
}
.dhub__cta i { display: inline-block; font-style: normal; transition: transform 0.3s var(--ease-out); }
.dhub__item > a:hover .dhub__cta i { transform: translateX(4px); }

/* ═══════ /book-a-demo ═══════ */
.dbook {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: 4rem;
}
.dbook__cal {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
}
/* Cal renders month_view as calendar + slots side by side only while the container is
   wide enough; below roughly 700px it stacks them and the embed doubles in height. So
   this column stays the wide one at every breakpoint rather than being squeezed. */
.dbook__mount { min-height: 34rem; min-width: 0; }
.dbook__mount.is-loading { display: grid; place-items: center; }
.dbook__mount.is-loading::after {
  content: "Loading the calendar…";
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.dbook__fallback { padding: 3rem 2rem; text-align: center; }
.dbook__fallback p { margin-bottom: 1.2rem; color: var(--muted); }
.dbook__nojs { padding: 2.5rem 2rem; text-align: center; color: var(--muted); }
.dbook__nojs a { color: var(--plum); }
.dbook__aside { align-self: start; }
.dbook__asideh2 { display: block; margin-top: 2.2rem; }
.dbook__asidep { margin-top: 0.8rem; font-size: 0.94rem; line-height: 1.55; color: var(--muted); }

@media (max-width: 900px) {
  .dpage__cols, .dbook { grid-template-columns: minmax(0, 1fr); }
  .dpage__aside { order: -1; }   /* the three-line summary reads before a long passage */
  .dbook__aside { order: 1; }    /* but the calendar comes first when booking is the job */
  .dpage__footnote { margin-left: 0; width: 100%; }
}
@media (max-width: 640px) {
  .dpage { padding-top: 2rem; }
  .dpage__demo { margin-bottom: 2.5rem; }
  /* On a phone the height cap is what would turn the embed into a letterbox sliver, so
     it is dropped: full width, and the page scrolls instead. */
  .dpage__frame { max-width: 100%; }
}

/* ═══════════════ BRAND ASSETS PAGE (/brand/) ═══════════════
   Unlisted page, generated by assets-src/gen-brand.py. Standalone like the legal and
   demo pages: style.css but no main.js, so nothing here may depend on JS.

   The one real problem this block solves: the Paper colourway is #FCFCFC, so previewing
   it on the page's own cream ground would render twelve invisible tiles. Each stage
   therefore carries its own --ground, set per colourway in the generator, and the mark
   is previewed on the ground it is actually for. */

.bnote {
  margin-top: 1.6rem;
  padding: 0.9rem 1.1rem;
  max-width: 62ch;
  border: 1px solid var(--line);
  border-left: 2px solid var(--plum);
  border-radius: 6px;
  background: var(--white);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}
.bnote strong { color: var(--ink); font-weight: 500; }

/* ── Whole-pack download ── */
.bpack {
  display: block;
  margin-bottom: 3.5rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}
.bpack:hover { border-color: var(--plum); transform: translateY(-2px); }
.bpack__label {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plum);
}
.bpack__name {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.bpack__meta {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

/* ── Colourway sections ── */
.bsec { padding-bottom: 3.5rem; }
.bsec__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.6rem 0 1.4rem;
  border-top: 1px solid var(--line);
}
.bsec__swatch {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 6px;
  border: 1px solid var(--line-soft);
}
/* the "using them" and "naming us" sections have no single colour to stand for */
.bsec__swatch--split { background: linear-gradient(135deg, var(--ink) 0 50%, #CBCBFF 50% 100%); }
.bsec__head h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -0.015em;
}
.bsec__head p {
  margin-top: 0.35rem;
  max-width: 70ch;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--muted);
}
.bsec__head code {
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--plum);
}
.bsec__head a { color: var(--plum); text-decoration: underline; text-underline-offset: 0.2em; }
.bsec__head strong { color: var(--ink); font-weight: 500; }

/* ── The twelve tiles ── */
.bgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.2rem;
  list-style: none;
}
.bcard {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}
/* A FIXED height, and min-height:0, rather than aspect-ratio.
   aspect-ratio only sets a flex item's PREFERRED size, and a flex item's automatic
   minimum size is its content, so the tall lockups (vertical is 752x936, the tagline cut
   1014 high) pushed their own stage taller than the ratio asked for: measured 206px,
   330px and 348px in one row. The cards stayed equal height, so every meta block below
   started at a different y and nothing lined up. A fixed height plus min-height:0 lets
   the image's max-height:100% actually bite, so all four marks in a row sit on one
   baseline and each is scaled to fit rather than cropped. */
.bcard__stage {
  display: grid;
  /* `1fr / 1fr` rather than leaving the tracks implicit. An implicit row is auto-sized,
     and a percentage height against an auto track is indefinite, so the image's
     `height: 100%` below was silently falling back to auto and taking its height from
     the aspect ratio instead: 296px of artwork inside a 240px tile. A 1fr track of a
     container with a definite height is itself definite, so the percentage resolves. */
  grid-template: 1fr / 1fr;
  height: 15rem;
  min-height: 0;
  padding: 1.6rem;
  background: var(--ground, var(--bg-2));
  border-bottom: 1px solid var(--line);
}
/* Fill the area and let object-fit do the fitting, rather than clamping with
   max-width/max-height. Those two were measured NOT clamping the tall lockups: on a
   375px viewport the vertical cuts hit max-width first and took their aspect-ratio
   height with them, rendering 282x374 inside a 240px stage - nine of the twelve tiles
   overflowed. width/height 100% gives object-fit a definite box to work in, and
   `contain` then guarantees the mark is scaled to fit and centred, never cropped. */
.bcard__stage img { width: 100%; height: 100%; object-fit: contain; }
.bcard__meta { display: flex; flex-direction: column; flex: 1; padding: 0.9rem 1rem 1rem; }
.bcard__meta h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.bcard__meta p { margin-top: 0.35rem; font-size: 0.85rem; line-height: 1.5; color: var(--muted); }
.bcard__files { margin-top: auto; padding-top: 0.9rem; display: flex; gap: 0.5rem; }
.bcard__files a {
  flex: 1;
  /* tall enough to be a comfortable tap target on a phone, where these are the whole
     point of the page: 0.42rem gave a 31px button */
  padding: 0.62rem 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.bcard__files a:hover { background: var(--plum); border-color: var(--plum); color: var(--bg); }

/* ── Do / don't ── */
.bdo { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2rem; }
.bdo h3 {
  margin-bottom: 0.4rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plum);
}

@media (max-width: 640px) {
  .bsec__head { flex-direction: column; gap: 0.7rem; }
}

/* ═══════════════ REVEAL DEFAULTS (JS toggles) ═══════════════ */
[data-reveal] { opacity: 0; transform: translateY(40px); }
[data-hero-fade] { opacity: 0; }
.no-js [data-reveal], .no-js [data-hero-fade] { opacity: 1; transform: none; }
.reduced-motion [data-reveal],
.reduced-motion [data-hero-fade] { opacity: 1 !important; transform: none !important; }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 1024px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .ai__grid { grid-template-columns: 1fr 1fr; }
  .ai__trust { grid-template-columns: 1fr 1fr; }
  .certiq { grid-template-columns: 1fr; }
  /* Three cards never fill a 2-up grid, so below the 3-across breakpoint each card
     takes the full width instead of leaving an empty slot. */
  .arch__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat:nth-child(even) { border-right: 0; padding-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero__content { padding-top: 18vh; }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
  .hero__meta--right { display: none; }
  .platform__principles { grid-template-columns: 1fr; }
  .principle { border-right: 0; border-bottom: 1px solid var(--line); padding-inline: 0; }
  .principle:last-child { border-bottom: 0; }
  /* modules fall back to vertical scroll cards */
  .modules__pin { min-height: 0; }
  .modules__track {
    width: auto;
    flex-direction: column;
    padding-inline: var(--gutter);
  }
  .mcard { width: 100%; min-height: 0; }
  .modules__progress { display: none; }
  .stats__grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); padding-inline: 0; }
  .stat:last-child { border-bottom: 0; }
  .ai__grid { grid-template-columns: 1fr; }
  .ai__trust { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}

/* Full-width archetype cards (tablet range): split the card internally so the extra
   width carries a second column instead of stretching every line to ~110 characters. */
@media (min-width: 769px) and (max-width: 1024px) {
  .arch__card {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    grid-template-areas:
      "head    quote"
      "persona turn"
      "fit     fit";
    column-gap: clamp(1.5rem, 3.5vw, 3rem);
    row-gap: 1.1rem;
    align-items: start;
  }
  .arch__head { grid-area: head; }
  .arch__persona { grid-area: persona; }
  .arch__quote { grid-area: quote; }
  .arch__turn { grid-area: turn; }
  .arch__fit { grid-area: fit; margin-top: 0.4rem; }
  /* the three best-fit links read better as a row once they span the full card */
  .arch__fit ul { flex-direction: row; flex-wrap: wrap; gap: 0.5rem 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══ RESOURCES ═══
   The /resources/ hub and its item pages (article, checklist, self-assessment).
   Standalone like the demo and legal pages: style.css plus js/resources.js, nothing else.

   Rules this block keeps:
   - every selector starts with .res, and no existing selector is redefined
   - tokens only; the rgba() values are tints of --ink (44,44,52), --bg (247,246,242),
     --plum (81,52,77) and --sage (118,135,125)
   - butter and periwinkle are fills behind charcoal text, except periwinkle as a text
     accent on the charcoal tools band
   - sage is never text: at 3.5:1 on the page ground it fails AA, so it only fills
     bars and dots and the words sit beside it in charcoal
   - nothing depends on JS; filtering and scoring only toggle [hidden] and widths */

/* ─── Page-level helpers ─── */
.res-body [hidden] { display: none !important; }
.res-body :focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; border-radius: 4px; }
.res-skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 130;
  padding: 0.6rem 1rem; border-radius: 6px;
  background: var(--ink); color: var(--bg); font-size: 0.86rem;
}
.res-skip:focus { top: 0.6rem; }
.res-printonly, .res-legend { display: none; }

/* button modifiers that style.css does not have a public version of */
.res-btn--sm { padding: 0.62rem 1.25rem; font-size: 0.84rem; }
.res-btn--line { border: 1px solid rgba(44, 44, 52, 0.35); color: var(--ink); }
.res-btn--line::before { background: var(--ink); }
.res-btn--line:hover { color: var(--bg); border-color: var(--ink); }

/* ─── Site bar: static, no JS, no hamburger ─── */
.res-bar { border-bottom: 1px solid var(--line); }
.res-bar__in {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 2.2rem;
  min-height: var(--nav-h);
}
.res-bar__logo img { height: 1.6rem; width: auto; }
.res-bar__nav { display: flex; gap: 2rem; margin-left: auto; }
.res-bar__nav a {
  padding: 0.35rem 0; border-bottom: 1px solid transparent;
  font-size: 0.9rem; color: var(--muted); white-space: nowrap;
  transition: color 0.25s;
}
.res-bar__nav a:hover { color: var(--ink); }
.res-bar__nav a[aria-current] { color: var(--ink); border-bottom-color: var(--plum); }

/* ─── Shared type ─── */
.res-title {
  margin-top: 0.7rem;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.3rem, 5.4vw, 4.2rem); line-height: 1.02; letter-spacing: -0.03em;
  text-wrap: balance;
}
.res-title em, .res-h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.res-title--xl { font-size: clamp(3.1rem, 10vw, 9rem); line-height: 0.9; letter-spacing: -0.045em; }
.res-h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.8rem, 3.8vw, 3.1rem); line-height: 1.05; letter-spacing: -0.025em;
}
.res-lede {
  max-width: 46ch;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem); line-height: 1.6; color: var(--muted);
}
.res-mono {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.res-tag {
  display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px;
  background: var(--periwinkle); color: var(--ink);
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
}

/* ─── Sections and their numbered heads ─── */
.res-sec { padding: clamp(3.5rem, 9vh, 6.5rem) 0; border-top: 1px solid var(--line); }
.res-head {
  display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) minmax(0, 24rem);
  align-items: end; gap: 1rem 1.5rem; margin-bottom: clamp(2rem, 4vw, 3.2rem);
}
.res-head__n {
  align-self: start; padding-top: 0.7rem;
  font-family: var(--mono); font-size: 0.72rem; color: var(--plum);
}
.res-head__sub { font-size: 0.96rem; line-height: 1.6; color: var(--muted); }

/* ─── Hub hero ─── */
.res-hero { padding: clamp(2.5rem, 7vh, 5rem) 0 clamp(3rem, 8vh, 5.5rem); }
.res-hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: end; gap: 2.5rem clamp(2rem, 6vw, 6rem); margin-top: 1.2rem;
}
.res-stats { display: flex; margin-top: 2.2rem; border-top: 1px solid var(--line); }
.res-stats div {
  display: flex; flex: 1; flex-direction: column-reverse; justify-content: flex-end;
  padding: 1rem 1rem 0 0;
}
.res-stats div + div { padding-left: 1rem; border-left: 1px solid var(--line); }
.res-stats dd {
  font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 3.4vw, 2.9rem);
  line-height: 1; letter-spacing: -0.03em;
}
.res-stats dt {
  margin-top: 0.5rem;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}

/* ─── Featured ─── */
.res-feat { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.6rem; }
.res-feat__lead { grid-row: span 2; }
.res-lead {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(11rem, 17rem);
  gap: clamp(1.5rem, 3vw, 3rem); height: 100%;
  padding: clamp(1.6rem, 3vw, 2.8rem);
  border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.res-lead:hover, .res-card__link:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -24px rgba(44, 44, 52, 0.35);
}
.res-lead__text { display: flex; flex-direction: column; align-items: flex-start; }
.res-lead__title {
  margin: 0.9rem 0 1rem;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.9rem, 3.5vw, 3.1rem); line-height: 1.02; letter-spacing: -0.03em;
}
.res-lead__title em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.res-lead__dek { max-width: 44ch; line-height: 1.6; color: var(--muted); }
.res-lead__facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 1.4rem 0 1.8rem; }
.res-lead__go {
  display: inline-flex; align-items: center; gap: 0.7rem; margin-top: auto;
  padding: 0.9rem 1.7rem; border-radius: 100px;
  background: var(--plum); color: var(--bg); font-size: 0.92rem; font-weight: 500;
  transition: background 0.3s;
}
.res-lead:hover .res-lead__go { background: var(--ink); }
/* a schematic of the result screen: decorative, hidden from assistive tech */
.res-lead__readout {
  display: flex; flex-direction: column; justify-content: center; gap: 0.62rem;
  padding: 1.3rem; border-radius: 8px; background: var(--bg);
  border: 1px solid var(--line);
}
.res-lead__readout b { margin-bottom: 0.4rem; font-weight: 400; }
.res-lead__readout i { display: block; height: 0.55rem; border-radius: 2px; background: var(--sage); }
.res-lead__readout i:nth-of-type(1) { width: 92%; }
.res-lead__readout i:nth-of-type(2) { width: 58%; background: var(--butter); box-shadow: inset 0 0 0 1px rgba(44, 44, 52, 0.3); }
.res-lead__readout i:nth-of-type(3) { width: 84%; }
.res-lead__readout i:nth-of-type(4) { width: 31%; background: var(--brick); }
.res-lead__readout i:nth-of-type(5) { width: 76%; }
.res-lead__readout i:nth-of-type(6) { width: 66%; background: var(--butter); box-shadow: inset 0 0 0 1px rgba(44, 44, 52, 0.3); }
.res-lead__readout i:nth-of-type(7) { width: 100%; }
.res-lead__readout i:nth-of-type(8) { width: 44%; background: var(--brick); }

/* ─── Cards: one family, four variants ─── */
.res-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1.6rem; list-style: none;
}
.res-card__link {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.res-card__body { display: flex; flex: 1; flex-direction: column; padding: 1.3rem 1.35rem 1.2rem; }
.res-card__label {
  display: flex; flex-wrap: wrap; gap: 0.2rem 0.7rem;
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--plum);
}
.res-card__label span + span { color: var(--muted); }
.res-card__title {
  margin: 0.65rem 0 0.55rem;
  font-family: var(--display); font-weight: 500;
  font-size: 1.18rem; line-height: 1.2; letter-spacing: -0.01em;
}
.res-card__dek { flex: 1; font-size: 0.92rem; line-height: 1.55; color: var(--muted); }
.res-card__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.9rem;
  margin-top: 1.1rem; padding-top: 0.85rem; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.66rem; color: var(--muted);
}
.res-card__meta .res-tag { margin-left: auto; }

/* guide / article: typographic, no art needed. Guides carry the plum top rule. */
.res-card--guide .res-card__link { border-top: 2px solid var(--plum); }
.res-card--guide .res-card__title,
.res-card--article .res-card__title { font-size: 1.32rem; }
.res-card--big .res-card__title { font-size: clamp(1.4rem, 2.2vw, 1.75rem); }

/* checklist / template: a strip of ruled paper drawn in CSS */
.res-card__sheet {
  display: grid; gap: 0.6rem; padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.res-card__sheet i { display: flex; align-items: center; gap: 0.65rem; }
.res-card__sheet i::before {
  content: ""; flex: none; width: 0.78rem; height: 0.78rem;
  border: 1.5px solid var(--ink); border-radius: 2px;
}
.res-card__sheet i::after { content: ""; flex: 1; height: 1px; background: rgba(44, 44, 52, 0.22); }
.res-card__sheet i:first-child::before { background: var(--plum); border-color: var(--plum); }
.res-card__sheet i:nth-child(2)::after { margin-right: 22%; }
.res-card__sheet i:nth-child(3)::after { margin-right: 9%; }
.res-card--template .res-card__sheet i::before {
  width: 2.4rem; height: 0.78rem; border-width: 0 0 1.5px; border-radius: 0; background: none;
}

/* self-assessment: the three-band scale */
.res-card__gauge {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
  padding: 1.55rem 1.35rem; border-bottom: 1px solid var(--line); background: var(--bg);
}
.res-card__gauge i { height: 0.55rem; border-radius: 2px; background: var(--brick); }
.res-card__gauge i:nth-child(2) { background: var(--butter); box-shadow: inset 0 0 0 1px rgba(44, 44, 52, 0.3); }
.res-card__gauge i:nth-child(3) { background: var(--sage); }

/* demo video */
.res-card__poster, .res-strip__img {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink);
}
.res-card__poster img, .res-strip__img img { width: 100%; height: 100%; object-fit: cover; }
.res-card__play {
  position: absolute; left: 1rem; bottom: 1rem;
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem;
  border-radius: 50%; background: var(--bg); color: var(--ink);
  transition: transform 0.4s var(--ease-out);
}
.res-card__play svg { width: 0.8rem; height: 0.8rem; margin-left: 2px; }
.res-card__link:hover .res-card__play { transform: scale(1.1); }
.res-card__dur {
  position: absolute; right: 0.8rem; bottom: 0.8rem;
  padding: 0.2rem 0.45rem; border-radius: 4px;
  background: rgba(44, 44, 52, 0.85); color: var(--bg);
  font-family: var(--mono); font-size: 0.66rem;
}

/* ─── Free tools: the one dark band ─── */
.res-tools { padding: clamp(4rem, 11vh, 7.5rem) 0; background: var(--ink); color: var(--bg); }
.res-tools .res-head__n { color: var(--periwinkle); }
.res-tools .res-head__sub { color: rgba(247, 246, 242, 0.68); }
.res-tools :focus-visible { outline-color: var(--periwinkle); }
.res-tools .res-dot { color: var(--periwinkle); }
.res-tool .res-tag { display: block; width: fit-content; }
.res-tool {
  display: grid; align-items: center; gap: 0.4rem 1.5rem;
  grid-template-columns: 2.6rem minmax(0, 3.2fr) minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 1.5fr) 1.5rem;
  padding: 1.45rem 0.6rem; border-top: 1px solid rgba(247, 246, 242, 0.16);
  transition: background 0.3s;
}
.res-tools__list li:last-child .res-tool { border-bottom: 1px solid rgba(247, 246, 242, 0.16); }
.res-tool:hover { background: rgba(247, 246, 242, 0.05); }
.res-tool__n, .res-tool__c {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.04em;
  color: rgba(247, 246, 242, 0.68);
}
.res-tool__n { color: var(--periwinkle); }
.res-tool__name {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.2; letter-spacing: -0.01em;
}
.res-tool__name small {
  display: block; margin-top: 0.35rem; max-width: 46ch;
  font-family: var(--sans); font-size: 0.88rem; font-weight: 400; line-height: 1.5;
  letter-spacing: 0; color: rgba(247, 246, 242, 0.68);
}
.res-tool__go { justify-self: end; transition: transform 0.3s var(--ease-out); }
.res-tool:hover .res-tool__go { transform: translateX(4px); }
.res-tool--lead { padding-block: 2.1rem; }
.res-tool--lead .res-tool__name { font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 700; letter-spacing: -0.02em; }
.res-tool--lead .res-tag { margin-bottom: 0.7rem; }
.res-tools__foot { margin-top: 1.6rem; color: rgba(247, 246, 242, 0.68); }

/* ─── Browse by job: a nine-cell ledger ─── */
.res-jobs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line); list-style: none;
}
.res-job {
  display: flex; flex-direction: column; gap: 0.55rem; min-height: 11.5rem;
  padding: 1.4rem 1.5rem 1.35rem;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.res-job:hover { background: var(--white); }
.res-job__top { display: flex; justify-content: space-between; gap: 1rem; }
.res-job__top span:first-child { color: var(--plum); }
.res-job__name {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem); line-height: 1.15; letter-spacing: -0.015em;
}
.res-job__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: auto; padding-top: 1rem; }
.res-job__links a, .res-reset, .res-more {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--plum);
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.3em;
  transition: text-decoration-color 0.25s;
}
.res-job__links a:hover, .res-reset:hover, .res-more:hover { text-decoration-color: currentColor; }

/* ─── Library: filters, count, grid, empty state ─── */
.res-filter {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.1rem 2rem;
  padding: 1.3rem 0; border-block: 1px solid var(--line);
}
.res-filter__group { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.res-filter__group:first-child { flex: 1 1 28rem; }
.res-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.res-chip {
  padding: 0.5rem 0.95rem; border: 1px solid rgba(44, 44, 52, 0.3); border-radius: 100px;
  font-size: 0.84rem; line-height: 1.2; color: var(--ink);
  transition: border-color 0.25s, background 0.25s;
}
.res-chip:hover { border-color: var(--ink); }
.res-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--periwinkle); }
.res-select {
  min-width: 13.5rem; max-width: 100%; padding: 0.55rem 2.2rem 0.55rem 0.85rem;
  border: 1px solid rgba(44, 44, 52, 0.3); border-radius: 8px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%232C2C34' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 0.85rem center / 0.65rem;
  font: 0.88rem var(--sans); color: var(--ink);
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.res-status {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 3.4rem;
}
.res-count { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.res-empty {
  padding: clamp(3rem, 8vw, 5rem) 1.5rem; text-align: center;
  border: 1px dashed rgba(44, 44, 52, 0.3); border-radius: 10px;
}
.res-empty p {
  margin-bottom: 1.2rem;
  font-family: var(--display); font-weight: 500; font-size: clamp(1.2rem, 2vw, 1.5rem);
}

/* ─── Watch the quickstarts: a six-frame strip ─── */
.res-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.1rem; list-style: none; }
.res-strip a, .res-strip__img { display: block; }
.res-strip__img { border: 1px solid var(--line); border-radius: 8px; }
.res-strip__img img { transition: transform 0.6s var(--ease-out); }
.res-strip a:hover img { transform: scale(1.04); }
.res-strip__t {
  display: block; margin-top: 0.75rem;
  font-family: var(--display); font-weight: 500; font-size: 0.98rem; line-height: 1.25;
}
.res-strip a:hover .res-strip__t { color: var(--plum); }
.res-strip__m { display: block; margin-top: 0.35rem; font-family: var(--mono); font-size: 0.64rem; color: var(--muted); }

/* ─── Closing CTA ─── */
.res-cta { padding: clamp(4.5rem, 12vh, 8rem) 0; border-top: 1px solid var(--line); text-align: center; }
.res-cta p { max-width: 50ch; margin: 1.1rem auto 2rem; line-height: 1.65; color: var(--muted); }

/* ─── Item pages: shared masthead ─── */
.res-ahead { padding: 2.2rem 0 2.6rem; border-bottom: 1px solid var(--line); }
.res-ahead .res-title { max-width: 18ch; }
.res-dek {
  max-width: 58ch; margin-top: 1.3rem;
  font-size: clamp(1.08rem, 1.7vw, 1.32rem); line-height: 1.5; color: var(--muted);
}
.res-by {
  display: flex; flex-wrap: wrap; gap: 0.7rem 2.6rem; margin-top: 2rem;
  font-family: var(--mono); font-size: 0.7rem; line-height: 1.6; color: var(--muted);
}
.res-by b { display: block; font-weight: 500; color: var(--ink); }
.res-by a { color: var(--plum); text-decoration: underline; text-underline-offset: 0.2em; }
.res-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

/* ─── Article ─── */
.res-art {
  display: grid; grid-template-columns: 14rem minmax(0, 43rem);
  gap: clamp(2rem, 6vw, 6.5rem); padding-block: 3rem 4.5rem;
}
.res-toc { position: sticky; top: 1.5rem; align-self: start; }
.res-toc ol, .res-toc-m ol { margin-top: 0.9rem; list-style: none; }
.res-toc a, .res-toc-m a {
  display: block; padding: 0.42rem 0 0.42rem 0.95rem; border-left: 1px solid var(--line);
  font-size: 0.88rem; line-height: 1.35; color: var(--muted);
  transition: color 0.25s, border-color 0.25s;
}
.res-toc a:hover, .res-toc-m a:hover { border-left-color: var(--plum); color: var(--plum); }
.res-toc-m {
  display: none; margin-bottom: 2rem; padding: 1rem 1.2rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--white);
}
.res-toc-m summary { cursor: pointer; }

.res-prose { font-size: 1.06rem; line-height: 1.72; }
.res-prose > * { max-width: 68ch; }
.res-prose h2 {
  margin: 3.2rem 0 1rem; scroll-margin-top: 1.5rem;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.12; letter-spacing: -0.02em;
}
.res-prose h3 {
  margin: 2.2rem 0 0.6rem;
  font-family: var(--display); font-weight: 500; font-size: 1.2rem; line-height: 1.25;
}
.res-prose p { margin-bottom: 1.25rem; }
/* mono labels used as headings inside prose keep the label look, not the h2 look */
.res-prose .res-mono {
  margin: 0 0 0.8rem; font-family: var(--mono); font-size: 0.68rem; font-weight: 400;
  line-height: 1.5; letter-spacing: 0.1em;
}
.res-prose a { color: var(--plum); text-decoration: underline; text-underline-offset: 0.2em; }
.res-prose ul, .res-prose ol { margin: 0 0 1.5rem; padding-left: 1.4rem; }
.res-prose ul { list-style: none; }
.res-prose li { position: relative; margin-bottom: 0.55rem; }
.res-prose ul li::before {
  content: ""; position: absolute; left: -1.15rem; top: 0.72em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--plum);
}
.res-prose ol li::marker { font-family: var(--mono); font-size: 0.82em; color: var(--plum); }
.res-prose sup a { padding: 0 0.15em; font-family: var(--mono); font-size: 0.72em; text-decoration: none; }
.res-clause {
  padding: 0.12em 0.42em; border: 1px solid var(--line); border-radius: 4px;
  background: var(--bg-2); font-family: var(--mono); font-size: 0.8em; white-space: nowrap;
}
.res-box {
  margin: 0 0 2.2rem; padding: 1.5rem 1.6rem 0.4rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white);
}
.res-box .res-mono { margin-bottom: 1rem; color: var(--plum); }
.res-note {
  margin: 2rem 0; padding: 1.2rem 1.4rem 0.1rem;
  border-left: 2px solid var(--plum); border-radius: 0 8px 8px 0; background: var(--white);
}
.res-note .res-mono { margin-bottom: 0.5rem; color: var(--plum); }
.res-note--warn { border-left-color: var(--ink); background: var(--butter); color: var(--ink); }
.res-note--warn .res-mono { color: var(--ink); }
.res-tblwrap {
  margin: 2rem 0; overflow-x: auto;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white);
}
.res-tbl { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 0.92rem; line-height: 1.5; }
.res-tbl caption {
  padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); text-align: left;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.res-tbl th, .res-tbl td { padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.res-tbl tr:last-child > * { border-bottom: 0; }
.res-tbl thead th { font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.res-tbl tbody th { width: 26%; font-weight: 500; }
.res-tbl td { color: var(--muted); }
.res-pull {
  margin: 2.8rem 0; padding: 0.2rem 0 0.2rem 1.4rem; border-left: 2px solid var(--plum);
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.15rem); line-height: 1.22;
}
.res-fig { margin: 2.4rem 0; }
.res-fig img { width: 100%; height: auto; border-radius: 10px; }
.res-fig figcaption { margin-top: 0.7rem; font-family: var(--mono); font-size: 0.7rem; line-height: 1.6; color: var(--muted); }
.res-foots { margin-top: 3.5rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--muted); }
.res-foots .res-mono { margin-bottom: 0.8rem; }

/* product bridge: the item pages' one dark element */
.res-bridge {
  display: grid; grid-template-columns: minmax(0, 1fr) 12rem; align-items: center;
  gap: 1.5rem; margin: 2.6rem 0; padding: 1.4rem 1.5rem;
  border-radius: 12px; background: var(--ink); color: var(--bg);
  text-decoration: none;
}
.res-prose .res-bridge { color: var(--bg); text-decoration: none; }
.res-bridge .res-mono { color: var(--periwinkle); }
.res-bridge__t {
  display: block; margin: 0.5rem 0 0.4rem;
  font-family: var(--display); font-weight: 500; font-size: 1.25rem; line-height: 1.2;
}
.res-bridge__d { display: block; font-size: 0.92rem; line-height: 1.55; color: rgba(247, 246, 242, 0.72); }
.res-bridge__go { display: inline-block; margin-top: 0.9rem; color: var(--periwinkle); }
.res-bridge img { width: 100%; height: auto; border-radius: 6px; border: 1px solid rgba(247, 246, 242, 0.16); }
.res-bridge:focus-visible { outline-offset: 4px; }

.res-author {
  display: grid; grid-template-columns: 14rem minmax(0, 43rem);
  gap: clamp(2rem, 6vw, 6.5rem); padding: 2.6rem 0; border-top: 1px solid var(--line);
}
.res-author__name { font-family: var(--display); font-weight: 500; font-size: 1.3rem; }
.res-author p { margin: 0.5rem 0 1rem; max-width: 60ch; line-height: 1.65; color: var(--muted); }
.res-related { padding: 3rem 0 4.5rem; border-top: 1px solid var(--line); }
.res-related h2 { margin-bottom: 1.6rem; }

/* ─── Checklist ─── */
.res-sheet { max-width: 62rem; padding: 3rem 0 2rem; }
.res-group { margin-bottom: 3rem; }
.res-group__h {
  display: flex; align-items: baseline; gap: 1rem;
  padding-bottom: 0.8rem; border-bottom: 1.5px solid var(--ink);
}
.res-group__h span:first-child { font-family: var(--mono); font-size: 0.72rem; color: var(--plum); }
.res-group__h h2 { font-family: var(--display); font-weight: 500; font-size: clamp(1.2rem, 2vw, 1.45rem); letter-spacing: -0.01em; }
.res-group__h span:last-child { margin-left: auto; white-space: nowrap; }
.res-checks { list-style: none; }
.res-check {
  display: grid; grid-template-columns: 1.2rem minmax(0, 1fr) auto; align-items: start;
  gap: 1rem; padding: 0.95rem 0.5rem; border-bottom: 1px solid var(--line);
  line-height: 1.55; cursor: pointer; transition: background 0.2s;
}
.res-check:hover { background: rgba(81, 52, 77, 0.045); }
.res-check input {
  display: grid; place-content: center; width: 1.2rem; height: 1.2rem; margin-top: 0.18rem;
  border: 1.5px solid var(--ink); border-radius: 3px; background: var(--white);
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.res-check input::after {
  content: ""; width: 0.62rem; height: 0.34rem; margin-top: -0.14rem;
  border: solid var(--bg); border-width: 0 0 2px 2px; transform: rotate(-45deg); opacity: 0;
}
.res-check input:checked { border-color: var(--plum); background: var(--plum); }
.res-check input:checked::after { opacity: 1; }
.res-check input:checked + span { color: var(--muted); }
.res-check .res-clause { margin-top: 0.1rem; }
.res-disc {
  max-width: 68ch; margin: 2.5rem 0; padding: 1.1rem 1.3rem;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 0.9rem; line-height: 1.6; color: var(--muted);
}
.res-disc b { font-weight: 500; color: var(--ink); }
.res-disc a { color: var(--plum); text-decoration: underline; text-underline-offset: 0.2em; }

/* ─── Self-assessment ─── */
.res-quizwrap { max-width: 52rem; padding: 1rem 0 4rem; }
.res-meter {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 1rem; padding: 0.95rem 0;
  border-bottom: 1px solid var(--line); background: var(--bg);
  font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
}
.res-meter__track { flex: 1; height: 4px; overflow: hidden; border-radius: 4px; background: var(--line); }
.res-meter__track i { display: block; width: 0; height: 100%; background: var(--plum); transition: width 0.4s var(--ease-out); }
.res-scale { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin-top: 1.6rem; list-style: none; }
.res-q, .res-result { scroll-margin-top: 4.5rem; }
/* a legend renders above the fieldset's padding box, so the top gap is a margin */
.res-q { min-width: 0; margin: 2.3rem 0 0; padding: 0 0 2.3rem; border: 0; border-bottom: 1px solid var(--line); }
.res-q legend { display: block; width: 100%; padding: 0; }
.res-q legend .res-mono { display: block; margin-bottom: 0.6rem; color: var(--plum); }
.res-q__t {
  display: block;
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.2rem, 2.1vw, 1.5rem); line-height: 1.25; letter-spacing: -0.012em;
}
.res-opts { display: grid; gap: 0.5rem; margin-top: 1.3rem; }
.res-opt { position: relative; display: block; cursor: pointer; }
.res-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.res-opt__in {
  display: grid; grid-template-columns: 1.7rem minmax(0, 1fr); align-items: start; gap: 0.9rem;
  padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--white); font-size: 0.96rem; line-height: 1.5;
  transition: border-color 0.2s, background 0.2s;
}
.res-opt__in b {
  display: grid; place-items: center; width: 1.7rem; height: 1.7rem;
  border: 1.5px solid rgba(44, 44, 52, 0.4); border-radius: 50%;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
}
.res-opt:hover .res-opt__in { border-color: rgba(44, 44, 52, 0.5); }
.res-opt input:checked + .res-opt__in { border-color: var(--ink); background: var(--periwinkle); }
.res-opt input:checked + .res-opt__in b { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.res-opt input:focus-visible + .res-opt__in { outline: 2px solid var(--plum); outline-offset: 2px; }
.res-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; padding-top: 2.2rem; }
.res-submit p { font-family: var(--mono); font-size: 0.72rem; color: var(--brick); }

.res-result {
  margin-top: 3rem; padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line); border-radius: 12px; background: var(--white);
}
.res-result:focus { outline: none; }
.res-result__top {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1.5rem;
  padding-bottom: 1.8rem; border-bottom: 1px solid var(--line);
}
.res-band {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.42rem 0.9rem; border-radius: 100px; color: var(--ink);
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.res-band::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.res-band--ok { background: rgba(118, 135, 125, 0.24); }
.res-band--ok::before { background: var(--sage); }
.res-band--mid { background: var(--butter); }
.res-band--low { background: var(--brick); color: var(--white); }
.res-verdict h3 {
  margin: 1rem 0 0.6rem;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.08; letter-spacing: -0.025em;
}
.res-verdict p { max-width: 52ch; line-height: 1.6; color: var(--muted); }
.res-score { text-align: right; }
.res-score b {
  display: block;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(3rem, 8vw, 5.4rem); line-height: 0.9; letter-spacing: -0.04em;
}
.res-result h3.res-mono { margin: 2rem 0 0.4rem; font-weight: 400; }
.res-bars { list-style: none; }
.res-bars li {
  display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) 8.5rem; align-items: center;
  gap: 1rem; padding: 0.72rem 0; border-bottom: 1px solid var(--line); font-size: 0.94rem;
}
.res-bars__track { height: 0.7rem; overflow: hidden; border-radius: 2px; background: var(--bg-2); }
.res-bars__track i {
  display: block; width: 0; height: 100%; border-radius: 2px; background: var(--sage);
  transition: width 0.6s var(--ease-out);
}
.res-bars [data-level="mid"] i { background: var(--butter); box-shadow: inset 0 0 0 1px rgba(44, 44, 52, 0.35); }
.res-bars [data-level="low"] i { min-width: 3px; background: var(--brick); }
.res-bars__val { font-family: var(--mono); font-size: 0.68rem; color: var(--ink); text-align: right; white-space: nowrap; }
.res-fix { list-style: none; }
.res-fix li { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.res-fix strong { display: block; margin-bottom: 0.3rem; font-family: var(--display); font-weight: 500; font-size: 1.12rem; }
.res-fix p { max-width: 62ch; line-height: 1.6; color: var(--muted); }
.res-fix div { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin-top: 0.7rem; }
.res-allgood { padding: 1.1rem 0; line-height: 1.6; color: var(--muted); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .res-art, .res-author { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .res-toc { display: none; }
  .res-toc-m { display: block; }
  .res-jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .res-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem 1.1rem; }
  .res-lead { grid-template-columns: minmax(0, 1fr); }
  .res-lead__readout { display: none; }
}
@media (max-width: 900px) {
  .res-hero__grid, .res-feat { grid-template-columns: minmax(0, 1fr); }
  .res-feat__lead { grid-row: auto; }
  .res-head { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .res-head__sub { grid-column: 2; }
  .res-tool { grid-template-columns: 2rem minmax(0, 1fr) 1.5rem; }
  .res-tool__name { grid-column: 2; }
  .res-tool__go { grid-column: 3; grid-row: 1; }
  .res-tool__c { grid-column: 2; }
  .res-result__top { grid-template-columns: minmax(0, 1fr); }
  .res-score { text-align: left; }
}
@media (max-width: 640px) {
  .res-bar__in { padding-top: 0.75rem; row-gap: 0.3rem; }
  .res-bar__cta { margin-left: auto; }
  .res-bar__nav {
    order: 3; flex: 0 0 100%; gap: 1.6rem; margin-left: 0; padding-bottom: 0.45rem;
    overflow-x: auto; scrollbar-width: none;
  }
  .res-jobs { grid-template-columns: minmax(0, 1fr); }
  .res-job { min-height: 0; }
  .res-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .res-grid { grid-template-columns: minmax(0, 1fr); }
  .res-select { width: 100%; }
  .res-filter__group { flex: 1 1 100%; }
  .res-check { grid-template-columns: 1.2rem minmax(0, 1fr); }
  .res-check .res-clause { grid-column: 2; justify-self: start; }
  .res-bridge { grid-template-columns: minmax(0, 1fr); }
  .res-bridge img { display: none; }
  .res-bars li { grid-template-columns: minmax(0, 1fr) auto; gap: 0.45rem 1rem; }
  .res-bars__track { grid-column: 1 / -1; grid-row: 2; }
  .res-actions .btn, .res-submit .btn { flex: 1 1 100%; justify-content: center; }
}

/* ─── Reduced motion: no lift, no slide, no growing bars ─── */
@media (prefers-reduced-motion: reduce) {
  .res-lead:hover, .res-card__link:hover, .res-card__link:hover .res-card__play,
  .res-strip a:hover img, .res-tool:hover .res-tool__go { transform: none; }
  .res-meter__track i, .res-bars__track i { transition: none; }
}

/* ─── Print: a clean checklist, a clean blank self-check, or a clean result ─── */
@media print {
  .res-noprint, .res-skip, .res-bar, .res-cta, .res-related, .res-bridge, .res-actions,
  .res-meter, .res-submit, .res-toc, .res-toc-m, .res-author, .res-jsonly { display: none !important; }
  .res-printonly, .res-legend { display: block; }
  .res-body { background: var(--white); color: var(--ink); font-size: 10.5pt; }
  .res-ahead { padding: 0 0 1rem; }
  .res-ahead .res-title { max-width: none; font-size: 22pt; }
  .res-dek { margin-top: 0.5rem; font-size: 10.5pt; }
  .res-sheet, .res-quizwrap, .res-art { max-width: none; padding-block: 1rem 0; }
  .res-art { display: block; }
  .res-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 1.4rem; }
  .res-fields span { padding-bottom: 1.4rem; border-bottom: 1px solid var(--ink); font-family: var(--mono); font-size: 7.5pt; text-transform: uppercase; }
  .res-group { margin-bottom: 1.4rem; break-inside: avoid; }
  .res-group__h { break-after: avoid; }
  .res-check { padding: 0.45rem 0; break-inside: avoid; }
  .res-check input, .res-bars__track, .res-bars__track i, .res-band, .res-opt__in {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .res-q { margin-top: 0.9rem; padding-bottom: 0.9rem; break-inside: avoid; }
  .res-q__t { font-size: 12pt; }
  .res-opts { gap: 0.2rem; margin-top: 0.5rem; }
  .res-opt__in { padding: 0.3rem 0.5rem; font-size: 9.5pt; }
  .res-legend { margin-top: 1.2rem; }
  .res-result { margin-top: 0; padding: 0; border: 0; }
  .res-fix li, .res-bars li { break-inside: avoid; }
  .res-fix a, .res-disc a { color: var(--ink); text-decoration: none; }
  /* once a result exists, the printout is the result, not the questionnaire */
  .res-has-result .res-quiz, .res-has-result .res-legend, .res-has-result .res-scale { display: none; }
}

/* ═══ RESOURCES: templates, email capture, FAQs (2026-11-19) ═══
   Added after Fable's block. The resources section now collects a work email in return for a
   free Excel template, on the client's instruction. The form posts to /api/download, a
   Cloudflare Pages Function. Everything here stays prefixed .res. */

/* the download panel sits inside the 43rem article column */
.res-dl {
  margin: 3rem 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  scroll-margin-top: 1.5rem;
}
.res-dl__preview {
  position: relative; padding: 1.3rem 1.4rem 0; background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.res-dl__file {
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem;
  font-family: var(--mono); font-size: 0.68rem; color: var(--muted); letter-spacing: 0.02em;
}
.res-dl__xl {
  padding: 0.18rem 0.42rem; border-radius: 4px; background: var(--plum); color: var(--bg);
  font-size: 0.6rem; letter-spacing: 0.1em;
}
/* a real slice of the template's own columns, so the preview is honest */
.res-dl__grid {
  width: 100%; border-collapse: collapse; table-layout: fixed;
  font-family: var(--mono); font-size: 0.62rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 6px 6px 0 0; overflow: hidden;
}
.res-dl__grid th {
  padding: 0.45rem 0.5rem; text-align: left; font-weight: 500;
  background: var(--plum); color: var(--bg); letter-spacing: 0.04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.res-dl__grid td {
  padding: 0.42rem 0.5rem; border-top: 1px solid var(--line); height: 1.9em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.res-dl__grid tr:nth-child(even) td { background: var(--bg); }
.res-dl__grid tr:last-child td { opacity: 0.45; }
.res-dl__body { padding: 1.6rem 1.6rem 1.4rem; }
.res-prose .res-dl__t {
  margin: 0.45rem 0 0.8rem;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.3rem, 2.2vw, 1.65rem); line-height: 1.12; letter-spacing: -0.02em;
}
.res-prose .res-dl__in { margin: 0 0 1.3rem; padding: 0; list-style: none; font-size: 0.95rem; line-height: 1.55; }
.res-prose .res-dl__in li { position: relative; margin: 0 0 0.45rem; padding-left: 1.4rem; }
.res-prose .res-dl__in li::before {
  content: ""; position: absolute; left: 0; top: 0.42em;
  width: 0.62rem; height: 0.36rem; border-radius: 0; background: none;
  border: solid var(--plum); border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}

/* ── form ── */
.res-form__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; }
.res-form__lbl {
  flex: 1 0 100%;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}
.res-form__in {
  flex: 1 1 14rem; min-width: 0; height: 3.1rem; padding: 0 1.1rem;
  border: 1px solid rgba(44, 44, 52, 0.28); border-radius: 100px; background: var(--white);
  font: 400 1rem var(--sans); color: var(--ink);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.res-form__in::placeholder { color: var(--muted); opacity: 0.75; }
.res-form__in:focus { outline: none; border-color: var(--plum); box-shadow: 0 0 0 3px rgba(81, 52, 77, 0.18); }
.res-form__in[aria-invalid="true"] { border-color: var(--brick); }
.res-form__btn { height: 3.1rem; padding-block: 0; flex: 0 0 auto; }
.res-form__btn[disabled] { opacity: 0.6; cursor: progress; }
/* honeypot: off-screen, not display:none, so bots still fill it */
.res-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.res-prose .res-form__fine { margin: 0.9rem 0 0; font-size: 0.78rem; line-height: 1.55; color: var(--muted); }
.res-prose .res-form__fine a { color: var(--muted); }
.res-prose .res-form__msg { margin: 0.7rem 0 0; font-size: 0.92rem; line-height: 1.5; }
.res-form__msg:empty { display: none; }
.res-form__msg.is-error { color: var(--brick); }
.res-form__msg.is-ok {
  padding: 0.8rem 1rem; border-radius: 8px; background: var(--periwinkle); color: var(--ink);
}
.res-form__msg.is-ok a { color: var(--ink); font-weight: 500; }

/* ── FAQs ── */
.res-faq { margin-top: 3.4rem; }
.res-faq__item { padding: 1.2rem 0; border-top: 1px solid var(--line); }
.res-faq__item:last-child { border-bottom: 1px solid var(--line); }
.res-prose .res-faq__item h3 {
  margin: 0 0 0.45rem;
  font-family: var(--display); font-weight: 500; font-size: 1.08rem; line-height: 1.3; letter-spacing: -0.01em;
}
.res-prose .res-faq__item p { margin: 0; color: var(--muted); }

/* ── small additions to Fable's components ── */
.res-toc .res-toc__dl {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1.4rem;
  padding: 0.5rem 0.9rem; border: 0; border-radius: 100px; background: var(--plum); color: var(--bg);
  line-height: 1;
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none;
}
.res-toc .res-toc__dl:hover { background: var(--ink); color: var(--bg); }
.res-by a { color: var(--plum); text-decoration: underline; text-underline-offset: 0.2em; }

/* the hub's lead card: a date instead of the assessment readout */
.res-lead__date { align-items: flex-start; gap: 0.15rem; }
.res-lead__day {
  margin-top: 0.4rem;
  font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 0.95; letter-spacing: -0.03em; color: var(--ink);
}
.res-lead__yr {
  margin-bottom: 0.7rem;
  font-family: var(--serif); font-style: italic; font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1; color: var(--plum);
}

@media (max-width: 640px) {
  .res-dl__body { padding: 1.3rem 1.15rem 1.2rem; }
  .res-dl__preview { padding: 1rem 1rem 0; }
  .res-dl__grid th:nth-child(n+4), .res-dl__grid td:nth-child(n+4) { display: none; }
  .res-form__btn { flex: 1 1 100%; justify-content: center; }
}
@media print {
  .res-dl, .res-toc__dl { display: none !important; }
}

/* ═══ RESOURCES: the two-tab hub (Blog / Free templates), 2026-11-19 ═══
   The hub was cut down to two tabs on the client's instruction. Both panels are in the
   HTML; without JS they stack and the tabs act as jump links. resources.js adds
   .res-tabbed to <body> and hides the inactive panel. */

.res-hero--tabs { padding-bottom: 0; border-bottom: 1px solid var(--line); }
.res-hero--tabs .res-lede { max-width: 44ch; margin-top: 1.4rem; }

.res-tabs {
  display: flex; flex-wrap: wrap; gap: 0.5rem clamp(1.6rem, 4.5vw, 3.8rem);
  margin-top: clamp(2.6rem, 7vh, 4.4rem);
}
.res-tab {
  position: relative; padding: 0 0 1.1rem;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1; letter-spacing: -0.025em;
  color: var(--muted); text-decoration: none;
  transition: color 0.3s;
}
.res-tab sup {
  margin-left: 0.4rem; vertical-align: super;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 400; letter-spacing: 0.06em;
  color: var(--plum);
}
.res-tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--plum); transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}
.res-tab:hover, .res-tab[aria-selected="true"] { color: var(--ink); }
.res-tab[aria-selected="true"]::after { transform: scaleX(1); }
.res-tab:focus-visible { outline: 2px solid var(--plum); outline-offset: 6px; border-radius: 3px; }

.res-panel { padding: clamp(2.4rem, 6vh, 4rem) 0 clamp(4.5rem, 11vh, 7.5rem); }
/* the tabs label the panels once JS has made them tabs; without JS the heading shows */
.res-tabbed .res-panel__h {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.res-panel__h { margin-bottom: 1.4rem; }
.res-posts { list-style: none; margin: 0; padding: 0; }

/* ── Blog: editorial rows ── */
.res-post { border-top: 1px solid var(--line); }
.res-post:last-child { border-bottom: 1px solid var(--line); }
.res-post:first-child { border-top: 0; }          /* the hero already draws the rule under the tabs */
.res-post:first-child .res-post__link { padding-top: 0.4rem; }
.res-post__link {
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.4fr);
  align-items: center; gap: clamp(1.5rem, 4.5vw, 4.5rem);
  padding: clamp(1.6rem, 3.6vw, 2.8rem) 0;
  color: inherit; text-decoration: none;
}
.res-post__link:focus-visible { outline: 2px solid var(--plum); outline-offset: 6px; border-radius: 4px; }
.res-post__img { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 10px; background: var(--bg-2); }
.res-post__img img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.res-post__link:hover .res-post__img img { transform: scale(1.04); }
.res-post__body, .res-tpl__body { display: flex; flex-direction: column; gap: 0.75rem; }
.res-post__label { color: var(--plum); }
.res-post__title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.5rem, 2.7vw, 2.3rem); line-height: 1.07; letter-spacing: -0.025em;
  color: var(--ink); text-wrap: balance; transition: color 0.3s;
}
.res-post__link:hover .res-post__title, .res-tpl__link:hover .res-post__title { color: var(--plum); }
.res-post__dek { max-width: 46ch; font-size: 1.02rem; line-height: 1.6; color: var(--muted); }
.res-post__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem; margin-top: 0.3rem; }

/* ── Free templates: cards with a stacked-sheet preview ── */
.res-posts--tpl {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
.res-tpl__link {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  color: inherit; text-decoration: none;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.res-tpl__link:hover { transform: translateY(-4px); box-shadow: 0 24px 46px -30px rgba(44, 44, 52, 0.4); }
.res-tpl__link:focus-visible { outline: 2px solid var(--plum); outline-offset: 4px; }
.res-tpl__sheet {
  position: relative; isolation: isolate; display: block;
  padding: 1.9rem 1.7rem 0 1.4rem; background: var(--bg-2); border-bottom: 1px solid var(--line);
}
/* the sheet: real column names and sample rows from the template itself */
.res-xl {
  position: relative; display: block;
  background: var(--white); border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0;
  font-family: var(--mono); font-size: 0.6rem; color: var(--ink);
  transition: transform 0.5s var(--ease-out);
}
.res-xl::before {          /* a second sheet behind, slightly offset */
  content: ""; position: absolute; z-index: -1; inset: -8px -8px 0 8px;
  background: var(--white); border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0;
}
.res-tpl__link:hover .res-xl { transform: translateY(-3px); }
.res-xl b { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); font-weight: 400; }
.res-xl i {
  padding: 0.48rem 0.5rem; font-style: normal;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.res-xl i:first-child { border-left: 0; }
.res-xl .res-xl__h i { border-top: 0; border-left-color: rgba(247, 246, 242, 0.16); background: var(--plum); color: var(--bg); letter-spacing: 0.04em; }
.res-xl .res-xl__h i:first-child { border-radius: 5px 0 0 0; }
.res-xl .res-xl__h i:last-child { border-radius: 0 5px 0 0; }
.res-xl b:nth-child(3) i { background: var(--bg); }
.res-xl b:last-child { opacity: 0.5; }
.res-tpl__file {
  position: absolute; right: 1.4rem; top: 0.65rem;
  font-size: 0.58rem; letter-spacing: 0.04em; text-transform: none; color: var(--muted);
}
.res-tpl__body { flex: 1; padding: 1.4rem 1.6rem 1.6rem; }
.res-tpl .res-post__title { font-size: clamp(1.25rem, 1.9vw, 1.55rem); }
.res-tpl .res-post__dek { font-size: 0.94rem; }
.res-tpl__go {
  margin-top: auto; padding-top: 0.7rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--plum);
}
.res-tpl__go span { display: inline-block; transition: transform 0.35s var(--ease-out); }
.res-tpl__link:hover .res-tpl__go span { transform: translateX(4px); }
.res-panel__foot { margin-top: 2.2rem; }

@media (max-width: 768px) {
  .res-post__link { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .res-tpl__file { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .res-tab::after, .res-post__img img, .res-tpl__link, .res-xl, .res-tpl__go span { transition: none; }
}

/* ─── Blog card: co-author credit (2026-11-19) ───
   A named expert co-author is a credential, so it gets its own line, not the grey meta row. */
.res-post__coauthor {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.65rem;
  width: fit-content; max-width: 100%; margin-top: 0.35rem; padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--plum); border-radius: 0 6px 6px 0; background: var(--bg-2);
}
.res-post__coauthor .res-mono { color: var(--plum); }
.res-post__coauthor b {
  font-family: var(--display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; color: var(--ink);
}
.res-post__coauthor i { font-style: normal; font-size: 0.86rem; color: var(--muted); }
