/*
  Amplify Intelligence brand tokens, v2.0 (11 Nov 2026)

  Two layers.
  1. FAMILY CORE. Identical in amplify-intelligence-brand and colin-scotland-brand.
     If a value here changes, change it in both files on the same day.
  2. BRAND LAYER. Amplify Intelligence only. Dark led, mono for labels.

  Offline fonts: link fonts.css before this file (DM Mono, Outfit and Inter are bundled in fonts/).
  Web fonts:
  https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Inter:wght@400;500;600&family=Outfit:wght@300..700&display=swap
*/

/* ---------- 1. FAMILY CORE ---------- */
:root {
  /* color */
  --ink: #0d0d0d;
  --white: #ffffff;
  --valencia: #d14b28;         /* marks, rules, and type at 24px and up */
  --valencia-fill: #c44420;    /* fills that carry white text, 5.01 to 1 */
  --valencia-bright: #e8603c;  /* small text on ink, 5.71 to 1 */

  /* type families shared by both brands */
  --font-sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* type scale, eight steps. Steps 4 to 8 are fluid from a 390px to a 1440px viewport. */
  --step-1: 0.8125rem;                                    /* 13 */
  --step-2: 0.9375rem;                                    /* 15 */
  --step-3: 1.0625rem;                                    /* 17 */
  --step-4: clamp(1.1875rem, 1.141rem + 0.19vw, 1.3125rem);  /* 19 to 21 */
  --step-5: clamp(1.5rem, 1.407rem + 0.381vw, 1.75rem);      /* 24 to 28 */
  --step-6: clamp(1.875rem, 1.643rem + 0.952vw, 2.5rem);     /* 30 to 40 */
  --step-7: clamp(2.25rem, 1.693rem + 2.286vw, 3.75rem);     /* 36 to 60 */
  --step-8: clamp(2.75rem, 1.543rem + 4.952vw, 6rem);        /* 44 to 96 */

  /* space, 4px base */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --space-11: 160px;

  /* layout */
  --page-max: 1320px;
  --page-margin: clamp(20px, 4vw, 40px);
  --grid-columns: 12;
  --grid-gap: 24px;
  --measure: 40rem;      /* 640px. Reading text at step 4 sets about 67 characters a line. */
  --measure-ui: 35rem;   /* 560px. Inter at step 3 sets about 66 characters a line. */
  --hairline: 1px;

  /* motion */
  --dur-1: 120ms;   /* hover, press */
  --dur-2: 240ms;   /* reveal, menu */
  --dur-3: 480ms;   /* one entrance per page */
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* ---------- 2. BRAND LAYER, AMPLIFY INTELLIGENCE ---------- */
:root {
  --font-mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --bg: #0d0d0d;
  --bg-raised: #151515;      /* panels that sit above the page */
  --text: #f2f2f2;           /* 17.36 to 1 on ink */
  --text-2: #a8a8a8;         /* 8.17 to 1 on ink, 7.68 on a raised panel */
  --text-3: #8a8a8a;         /* 5.63 to 1 on ink, 5.29 on a raised panel */
  --rule: #2b2b2b;           /* dividers only, never the edge of a control */
  --rule-strong: #f2f2f2;

  --line: #8a8a8a;           /* diagram strokes, 5.63 to 1 */
  --ridge: #343434;          /* ridge lines, decoration only */
  --human: var(--valencia);          /* the human element, as a stroke or as type at 24px and up */
  --human-text: var(--valencia-bright);  /* the human element as small text */

  --action: #f2f2f2;
  --on-action: #0d0d0d;
  --radius: 0;
  --focus: #f2f2f2;
}

/* The light variant, for print and for a figure quoted on a light page. */
.on-paper {
  --bg: #ffffff;
  --bg-raised: #f5f5f5;
  --text: #0d0d0d;           /* 19.44 to 1 */
  --text-2: #4d4d4d;         /* 8.45 to 1 */
  --text-3: #6b6b6b;         /* 5.33 to 1 */
  --rule: #dcdcdc;
  --rule-strong: #0d0d0d;
  --line: #6b6b6b;
  --ridge: #e3e3e3;
  --human: var(--valencia);
  --human-text: var(--valencia-fill);   /* 5.01 to 1 on white */
  --action: #0d0d0d;
  --on-action: #ffffff;
  --focus: #0d0d0d;
  background: var(--bg);
  color: var(--text);
}

/* ---------- 3. BASE RULES EVERY PAGE CARRIES ---------- */
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--step-3);
  line-height: 1.6;
}
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

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

::selection { background: var(--white); color: var(--ink); }
.on-paper ::selection { background: var(--ink); color: var(--white); }

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

/* =====================================================================
   amplifyintelligence.io site styles
   Everything above this line is the brand skill's tokens.css, unchanged.
   Everything below is built from those tokens. Square corners, one accent,
   eight type sizes. Bump the ?v= tag on the stylesheet link with every change:
   production caches this file for four hours.
   ===================================================================== */

/* ---------- 4. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; border-radius: var(--radius); }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 88px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-delay: 0s !important; transition-delay: 0s !important; }
}

/* ---------- 5. TYPE ROLES ---------- */
h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 400; }
.display { font-family: var(--font-sans); font-weight: 300; font-size: var(--step-8); line-height: 0.96; letter-spacing: -0.035em; color: var(--text); }
.title { font-family: var(--font-sans); font-weight: 300; font-size: var(--step-7); line-height: 1; letter-spacing: -0.03em; color: var(--text); }
.heading { font-family: var(--font-sans); font-weight: 400; font-size: var(--step-6); line-height: 1.08; letter-spacing: -0.025em; color: var(--text); }
.subhead { font-family: var(--font-sans); font-weight: 400; font-size: var(--step-5); line-height: 1.2; letter-spacing: -0.015em; color: var(--text); }
.clause { font-family: var(--font-sans); font-weight: 400; font-size: var(--step-4); line-height: 1.3; letter-spacing: -0.01em; color: var(--text); text-wrap: balance; }
.lede { font-size: var(--step-4); line-height: 1.5; color: var(--text-2); max-width: var(--measure-ui); }
.prose { color: var(--text-2); max-width: var(--measure-ui); }
.prose p + p { margin-top: var(--space-4); }
.small { font-size: var(--step-2); line-height: 1.5; }
.label {
  font-family: var(--font-mono); font-weight: 400; font-size: var(--step-1); line-height: 1.4;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3);
}
.human { color: var(--human); }

/* Links in running text keep the underline from the tokens. The padding widens the
   touch target without moving the line. */
.prose a, .note a, .form__consent a, .cookie-banner a { padding-block: 13px; }

/* ---------- 6. LAYOUT ---------- */
.wrap { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--page-margin); }
.flow > * + * { margin-top: var(--space-5); }
.flow-lg > * + * { margin-top: var(--space-7); }
.skip {
  position: absolute; left: var(--page-margin); top: -100px; z-index: 100;
  background: var(--action); color: var(--on-action); padding: 12px 16px; font-family: var(--font-sans); font-weight: 500;
}
.skip:focus { top: 8px; }

.section { padding-bottom: var(--space-8); }
.section__in { border-top: var(--hairline) solid var(--rule-strong); padding-top: var(--space-5); display: grid; gap: var(--space-6) var(--grid-gap); }
.section__label { display: flex; gap: var(--space-3); }
.section__label span { color: var(--text-2); }
.section__main { min-width: 0; }
.section__main > .title { max-width: 18ch; }
.section__main > .title--wide { max-width: 24ch; }
@media (min-width: 60em) {
  .section { padding-bottom: var(--space-10); }
  .section__in { grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr)); padding-top: var(--space-6); }
  .section__label { grid-column: 1 / span 2; flex-direction: column; gap: var(--space-1); }
  .section__main { grid-column: 3 / -1; }
}
.split { display: grid; gap: var(--space-6) var(--grid-gap); align-items: start; }
@media (min-width: 75em) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); }
  .split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.cols { display: grid; gap: var(--space-6) var(--grid-gap); }
@media (min-width: 48em) {
  .cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.cols .prose, .cols .lede { max-width: 30rem; }
.block-head { margin-bottom: var(--space-3); }
.rule-top { border-top: var(--hairline) solid var(--rule); padding-top: var(--space-5); }

/* ---------- 7. NAVIGATION ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: var(--hairline) solid var(--rule); }
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); min-height: 48px; text-decoration: none; color: var(--text); }
.brand img { width: 40px; height: 40px; flex: none; }
.brand__name { font-family: var(--font-sans); font-weight: 500; font-size: var(--step-2); line-height: 1.25; letter-spacing: 0.2em; text-transform: uppercase; }
.nav__links { display: flex; flex-wrap: wrap; column-gap: var(--space-2); }
.nav__links a {
  display: inline-flex; align-items: center; min-height: 48px; padding-inline: var(--space-3);
  font-family: var(--font-mono); font-size: var(--step-1); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2); text-decoration: none; transition: color var(--dur-1) var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__toggle {
  display: none; min-width: 64px; min-height: 48px; padding-inline: var(--space-3); background: none;
  border: var(--hairline) solid var(--line); cursor: pointer; color: var(--text);
}
@media (max-width: 59.99em) {
  .brand__name { letter-spacing: 0.16em; }
  .nav__links { width: 100%; flex-direction: column; border-top: var(--hairline) solid var(--rule); padding-block: var(--space-2); }
  .nav__links a { padding-inline: 0; border-bottom: var(--hairline) solid var(--rule); }
  .nav__links li:last-child a { border-bottom: 0; }
  .js .nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .js .nav__links { display: none; }
  .js .nav__links.is-open { display: flex; }
}
@media (max-width: 24.99em) { .brand__name { max-width: 9.5em; } }

/* ---------- 8. BUTTONS AND LINKS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 15px 26px; border: var(--hairline) solid var(--action);
  background: var(--action); color: var(--on-action);
  font-family: var(--font-sans); font-weight: 500; font-size: var(--step-3); line-height: 1;
  text-decoration: none; cursor: pointer; transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.btn:hover { background: var(--bg); color: var(--text); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.link-strong {
  display: inline-flex; align-items: center; min-height: 48px;
  font-family: var(--font-sans); font-weight: 500; font-size: var(--step-3); line-height: 1.3; color: var(--text);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em;
}
.link-strong:hover { text-decoration-thickness: 2px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6); }

/* ---------- 9. HERO ---------- */
.hero { position: relative; overflow: hidden; }
.hero__in { position: relative; z-index: 1; padding-block: var(--space-7) var(--space-7); }
.hero h1 { display: grid; gap: var(--space-2); }
.hero__pre { font-family: var(--font-sans); font-weight: 300; font-size: var(--step-6); line-height: 1.08; letter-spacing: -0.025em; color: var(--text-3); }
.hero .lede { margin-top: var(--space-5); }
.lede .hi { color: var(--text); }
.hero .actions { margin-top: var(--space-6); }
.hero__for { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: 0 var(--space-5); }
.hero__for a { display: inline-flex; align-items: center; min-height: 48px; color: var(--text-3); text-decoration-thickness: 1px; text-underline-offset: 0.35em; }
.hero__for a:hover { color: var(--text); }
.ridge { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ridge svg { position: absolute; overflow: visible; width: 250px; max-width: none; right: -118px; top: -78px; }
.js .ridge svg { animation: ridge-in var(--dur-3) var(--ease) both; }
@keyframes ridge-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 47.99em) { .hero .btn { width: 100%; } }
@media (min-width: 48em) {
  .ridge svg { width: 560px; right: -150px; top: -150px; }
}
@media (min-width: 60em) {
  .hero__in { padding-block: var(--space-9) var(--space-8); }
  .ridge svg { width: max(54vw, 700px); right: -9vw; top: -13vw; }
}

/* ---------- 10. CLAUSE LIST ---------- */
.clauses { border-top: var(--hairline) solid var(--rule); max-width: 46rem; }
.clauses > li { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: baseline; padding-block: var(--space-5); border-bottom: var(--hairline) solid var(--rule); }
.clauses--named { max-width: none; }
.clauses--named .prose { margin-top: var(--space-2); grid-column: 2; }
@media (min-width: 48em) { .clauses > li { grid-template-columns: 64px minmax(0, 1fr); } }
@media (min-width: 75em) {
  .clauses--named > li { grid-template-columns: 64px minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--grid-gap); }
  .clauses--named .prose { margin-top: 0; grid-column: auto; }
}
.clauses--compact > li { padding-block: var(--space-4); }
.coda { max-width: 20ch; }

/* ---------- 11. FRAMES AND FIGURES ---------- */
.frame { border: var(--hairline) solid var(--rule); padding: var(--space-5) var(--space-4); }
.frame--raised { background: var(--bg-raised); }
.frame__head { display: flex; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.figure { border: var(--hairline) solid var(--rule); padding: var(--space-5) var(--space-1); }
.figure__head, .figure__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-4); padding-inline: var(--space-3); }
.figure__head { margin-bottom: var(--space-5); }
.figure__foot { margin-top: var(--space-5); }
.figure__body { container-type: inline-size; }
.figure__body svg { margin-inline: auto; height: auto; }
.fig--wide { display: none; }
@container (min-width: 680px) {
  .fig--wide { display: block; }
  .fig--stack { display: none; }
}
@media (max-width: 21.24em) { .figure { margin-inline: -5px; } }
@media (min-width: 48em) {
  .figure, .frame { padding: 30px; }
  .figure__head, .figure__foot { padding-inline: 0; }
}
/* the one line language */
.fig-ln { fill: none; stroke: var(--line); stroke-width: 1.25; }
.fig-hu { fill: none; stroke: var(--human); stroke-width: 1.5; }
.fig-ch { fill: none; stroke: var(--line); stroke-width: 1.1; }
.fig-t { font-family: var(--font-sans); font-weight: 500; font-size: var(--step-4); fill: var(--text); }
.fig-t2 { font-family: var(--font-sans); font-weight: 500; font-size: 17px; fill: var(--text); }
.fig-s { font-family: var(--font-ui); font-weight: 400; font-size: 13px; fill: var(--text-2); }
.fig-m { font-family: var(--font-mono); font-weight: 400; font-size: 13px; letter-spacing: 0.09em; text-transform: uppercase; fill: var(--text-3); }

/* ---------- 12. INDEX TABLES ---------- */
.index { width: 100%; border-collapse: collapse; text-align: left; }
.index th, .index td { padding: var(--space-4) var(--space-4) var(--space-4) 0; vertical-align: top; border-bottom: var(--hairline) solid var(--rule); }
.index thead th { padding-block: var(--space-3); font-family: var(--font-mono); font-weight: 400; font-size: var(--step-1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); border-bottom-color: var(--rule-strong); }
.index tbody th { font-family: var(--font-sans); font-weight: 500; font-size: var(--step-4); line-height: 1.3; color: var(--text); width: 13rem; padding-right: var(--grid-gap); }
.index tbody th .label { display: block; margin-top: var(--space-1); }
.index td { color: var(--text-2); }
.index td > p { max-width: var(--measure-ui); }
@media (max-width: 29.99em) {
  .index tbody th { width: 34%; padding-right: var(--space-3); }
}

/* Pathways: a table that becomes stacked rows on a phone */
.routes { border-top: var(--hairline) solid var(--rule-strong); }
.routes > .routes__head { display: none; }
.routes > li { display: grid; gap: var(--space-2); padding-block: var(--space-5); border-bottom: var(--hairline) solid var(--rule); }
.routes .prose { max-width: 30rem; }
.routes .link-strong { justify-self: start; }
@media (min-width: 60em) {
  .routes > li { grid-template-columns: 13rem 17rem minmax(0, 1fr) 10rem; column-gap: var(--grid-gap); align-items: baseline; }
  .routes > .routes__head { display: grid; padding-block: var(--space-3); border-bottom: var(--hairline) solid var(--rule-strong); }
  .routes { border-top: 0; }
  .routes .link-strong { justify-self: end; white-space: nowrap; }
}

/* ---------- 13. FOUNDER CREDIT ---------- */
.credit { display: grid; gap: var(--space-6) var(--grid-gap); align-items: start; }
.credit__who { display: flex; align-items: center; gap: var(--space-4); }
.credit__who img { width: 96px; height: 96px; flex: none; filter: grayscale(1); }
.facts { border-top: var(--hairline) solid var(--rule); max-width: var(--measure-ui); }
.facts li { padding-block: var(--space-3); border-bottom: var(--hairline) solid var(--rule); color: var(--text-2); }
.note { color: var(--text-3); font-size: var(--step-2); line-height: 1.5; max-width: 30rem; }
@media (min-width: 60em) { .credit { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); } .credit__who { flex-direction: column; align-items: flex-start; } }

/* ---------- 14. FORM ---------- */
.form { display: grid; gap: var(--space-4); max-width: 46rem; }
.form__fields { display: grid; gap: var(--space-4); }
.field { display: grid; gap: var(--space-2); }
.field input {
  width: 100%; min-height: 52px; padding: 14px 16px; background: transparent; color: var(--text);
  border: var(--hairline) solid var(--line); font-family: var(--font-ui); font-size: var(--step-3); line-height: 1.3;
}
.field input:hover { border-color: var(--text); }
.form .btn { justify-self: start; }
.form__consent { color: var(--text-3); max-width: 30rem; }
.form__success p + p { margin-top: var(--space-2); color: var(--text-2); }
@media (min-width: 48em) {
  .form__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form--row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .form--row .form__consent { grid-column: 1 / -1; }
}

/* ---------- 15. FOOTER ---------- */
.footer { border-top: var(--hairline) solid var(--rule); padding-block: var(--space-7) var(--space-8); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5) var(--space-6); }
.footer__logo img { width: 250px; height: auto; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); }
.footer__links a, .footer__links .cookie-settings {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0; background: none; border: 0; cursor: pointer;
  font-family: var(--font-mono); font-size: var(--step-1); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2); text-decoration: none; transition: color var(--dur-1) var(--ease);
}
.footer__links a:hover, .footer__links .cookie-settings:hover { color: var(--text); }
.footer__legal { margin-top: var(--space-5); padding-top: var(--space-5); border-top: var(--hairline) solid var(--rule); }
.footer__company { font-size: var(--step-1); line-height: 1.5; color: var(--text-3); max-width: 27rem; }

/* ---------- 16. COOKIE BAR (markup is injected by /cookie-consent.js) ---------- */
html.has-cookie-banner { scroll-padding-bottom: var(--cookie-banner-offset, 0px); }
html.has-cookie-banner body { padding-bottom: var(--cookie-banner-offset, 0px); }
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 800; background: var(--bg-raised); color: var(--text-2);
  border-top: var(--hairline) solid var(--rule-strong); font-size: var(--step-2); line-height: 1.5;
  padding: var(--space-3) var(--page-margin) calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__inner { width: 100%; max-width: calc(var(--page-max) - 2 * var(--page-margin)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-5); }
.cookie-banner__copy { min-width: 0; }
.cookie-banner__title { font-family: var(--font-mono); font-size: var(--step-1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.cookie-banner__copy p { margin: 0; }
.cookie-banner__actions { display: flex; flex-shrink: 0; gap: var(--space-2); }
.cookie-banner__btn {
  min-width: 108px; min-height: 48px; padding: 10px 20px; background: transparent; color: var(--text);
  border: var(--hairline) solid var(--line); cursor: pointer;
  font-family: var(--font-sans); font-weight: 500; font-size: var(--step-2); line-height: 1.2;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.cookie-banner__btn:hover { background: var(--action); color: var(--on-action); border-color: var(--action); }
@media (max-width: 47.99em) {
  .cookie-banner__inner { flex-direction: column; align-items: stretch; }
  .cookie-banner__btn { flex: 1 1 0; }
}

/* ---------- 17. SMALL PARTS ---------- */
.ridge-ln { stroke: var(--ridge); }
.ridge-hu { stroke: var(--human); }
.figure__body text { text-anchor: middle; }
.figure__body text.fig-end { text-anchor: end; }
.figure__body text.fig-start { text-anchor: start; }
.invite { display: grid; gap: var(--space-5) var(--grid-gap); border: var(--hairline) solid var(--rule); padding: var(--space-5) var(--space-4); }
.invite__text { display: grid; gap: var(--space-2); align-content: start; }
.invite__text .clause { max-width: 24rem; }
.pair { display: grid; gap: var(--space-7) var(--grid-gap); align-items: start; }
@media (max-width: 47.99em) { .invite { border-width: var(--hairline) 0 0; padding-inline: 0; } .form .btn { width: 100%; padding-inline: var(--space-4); } }
@media (min-width: 48em) { .invite { padding: 30px; } }
@media (min-width: 75em) {
  .pair { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .pair .clauses { max-width: none; }
  .invite { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .invite .form { max-width: none; }
}

/* ---------- 18. LEGAL DOCUMENTS AND 404 ---------- */
.doc { padding-block: var(--space-7) var(--space-9); }
.doc__head { padding-bottom: var(--space-7); }
.doc__grid { display: grid; gap: var(--space-7) var(--grid-gap); align-items: start; }
.doc__toc ol { counter-reset: toc; border-top: var(--hairline) solid var(--rule); margin-top: var(--space-3); }
.doc__toc li { counter-increment: toc; border-bottom: var(--hairline) solid var(--rule); }
.doc__toc a { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); align-items: center; min-height: 48px; padding-block: var(--space-2); font-size: var(--step-2); line-height: 1.4; color: var(--text-2); text-decoration: none; }
.doc__toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-mono); font-size: var(--step-1); letter-spacing: 0.08em; color: var(--text-3); }
.doc__toc a:hover { color: var(--text); }
@media (min-width: 75em) {
  .doc__grid { grid-template-columns: minmax(0, 17rem) minmax(0, var(--measure-ui)); column-gap: var(--space-9); }
  .doc__grid--plain { grid-template-columns: minmax(0, var(--measure-ui)); }
  .doc__toc { position: sticky; top: 88px; max-height: calc(100vh - 112px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
}
.doc__body { counter-reset: sec; color: var(--text-2); max-width: var(--measure-ui); }
.doc__body h2 { counter-increment: sec; margin: var(--space-8) 0 var(--space-4); font-weight: 400; font-size: var(--step-5); line-height: 1.2; letter-spacing: -0.015em; color: var(--text); }
.doc__body h2::before { content: counter(sec, decimal-leading-zero); display: block; margin-bottom: var(--space-2); font-family: var(--font-mono); font-size: var(--step-1); line-height: 1.4; letter-spacing: 0.08em; color: var(--text-3); }
.doc__body > h2:first-child, .doc__body hr + h2 { margin-top: 0; }
.doc__body h3 { margin: var(--space-6) 0 var(--space-3); font-weight: 400; font-size: var(--step-4); line-height: 1.3; letter-spacing: -0.01em; color: var(--text); }
.doc__body p, .doc__body ul, .doc__body ol { margin-bottom: var(--space-4); }
.doc__body ul, .doc__body ol { padding-left: 1.25rem; }
.doc__body ul { list-style: disc; }
.doc__body ol { list-style: decimal; }
.doc__body li { margin-bottom: var(--space-2); }
.doc__body li::marker { color: var(--text-3); }
.doc__body strong { font-weight: 600; color: var(--text); }
.doc__body a { padding-block: 13px; }
.doc__body hr { border: 0; border-top: var(--hairline) solid var(--rule); margin: var(--space-7) 0; }
.doc__body blockquote { margin: var(--space-6) 0; padding-left: var(--space-5); border-left: var(--hairline) solid var(--rule-strong); color: var(--text); }
.doc__routes { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); border-top: var(--hairline) solid var(--rule); padding-top: var(--space-3); }
.doc__routes a { display: inline-flex; align-items: center; min-height: 48px; color: var(--text-2); text-decoration-thickness: 1px; text-underline-offset: 0.35em; }
.doc__routes a:hover { color: var(--text); }
