/* Rivius sub-pages: about, contact, 404 and legal/* (agent E, v14 2026-10-01; v15 2026-10-04).
   Loaded after style.css + sections.css, so the nav, footer, frame lines (.frame/.frame-box), dots, .eyebrow, .h2,
   buttons (.btn-pill .roll) and .reveal/.appear motion all come from the homepage. Everything here is scoped to the
   page classes below (pg-, ab-, ct-, nf-, lg-) and never restyles a homepage section.
   Wording: IDRHealth/product/site/content/SITE-TEXT-FINAL-2026-09-28.md (PAGE /about, /contact, /404) and
   IDRHealth/product/site/legal/*.md (built by tools/rivius_legal_build.py). */

/* ---------------- shared ---------------- */
/* Placeholders. About, contact and 404 carry none any more: the identity values are on the page (brand/BRAND-FACTS.md)
   and tools/rivius_legal_build.py resolves anything the shared shell still holds. The gold highlighter (main .ph in
   sections.css) is therefore switched off here, so a stray bracket would read as plain text rather than a marked-up
   blank. The legal pages keep it: there the brackets are blanks a client fills at signing. */
.pg-about .ph, .pg-contact .ph, .pg-404 .ph {
  color: inherit; background: none; box-shadow: none; padding: 0; border-radius: 0; font-weight: inherit;
}
main a.ph { text-decoration: underline; text-decoration-color: rgba(138, 83, 16, .35); text-underline-offset: 2px; }
/* email addresses in running copy use the shared .mail-link from style.css (hairline underline, gold on hover). */
.dot-bl, .dot-br { top: auto; bottom: -3px; }
.dot-bl { left: -3px; }
.dot-br { right: -3px; left: auto; }

/* ---------------- page header (replaces the WebGL hero) ----------------
   A framed band: eyebrow, Hedvig h1, one short line. The faint dot grid is the same texture as the
   product views on the homepage, fading out from the top. */
.pg-head-box {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 120px 64px 104px;
  text-align: center;
  border-bottom: 1px solid var(--token-line);
  isolation: isolate;
}
.pg-head-box::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, .13) 1px, transparent 1.4px) 7px 7px / 14px 14px;
  -webkit-mask: radial-gradient(ellipse 46% 62% at 50% 46%, #000 0%, rgba(0, 0, 0, .45) 50%, transparent 100%);
  mask: radial-gradient(ellipse 46% 62% at 50% 46%, #000 0%, rgba(0, 0, 0, .45) 50%, transparent 100%);
}
.pg-head-copy { display: flex; flex-direction: column; align-items: center; }
.pg-title {
  max-width: 820px;
  margin-top: 20px;
  font-family: var(--font-serif);
  font-size: 56px; font-weight: 400; line-height: 1.08; letter-spacing: -0.025em;
  color: var(--token-ink);
  text-wrap: balance;
}
.pg-lede {
  max-width: 540px;
  margin-top: 22px;
  font-size: 17px; font-weight: 500; line-height: 1.5; letter-spacing: -0.035em;
  color: var(--token-grey-61);
  text-wrap: pretty;
}
.pg-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; }
.pg-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; line-height: 1.5; letter-spacing: -0.04em;
  color: var(--token-ink);
}
.pg-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-hover) var(--ease-hover); }
.pg-link:hover svg, .pg-link:focus-visible svg { transform: translateX(3px); }
.pg-link span { background: linear-gradient(var(--brand-accent), var(--brand-accent)) 0 100% / 0 2px no-repeat; transition: background-size .45s cubic-bezier(.44, 0, .56, 1); }
.pg-link:hover span, .pg-link:focus-visible span { background-size: 100% 2px; }
/* gold buttons on the light ground get a hairline so their edge reads */
main .btn-mint { box-shadow: inset 0 0 0 1px rgba(138, 83, 16, .14); }

/* ---------------- ABOUT: how we work ---------------- */
.ab-work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
}
.ab-work-label {
  grid-row: 1 / span 2;
  padding: 40px 32px;
  border-right: 1px solid var(--token-line);
}
.ab-work-label .eyebrow { position: sticky; top: calc(var(--nav-h) + 40px); }
.ab-item {
  position: relative;
  display: flex; flex-direction: column;
  min-width: 0;
  padding: 40px 40px 48px;
}
.ab-item:nth-of-type(even) { border-left: 1px solid var(--token-line); }
.ab-item:nth-of-type(n + 3) { border-top: 1px solid var(--token-line); }
.ab-n {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px; font-weight: 500; line-height: 1.5; letter-spacing: 0.02em;
  color: var(--token-grey-7a);
}
.ab-item h3 {
  margin: 56px 0 0;
  max-width: 17em;
  font-family: var(--font-serif);
  font-size: 30px; font-weight: 400; line-height: 1.14; letter-spacing: -0.02em;
  color: var(--token-ink);
  text-wrap: balance;
}
.ab-item p:last-child {
  position: relative;
  margin-top: 20px; padding-left: 14px;
  max-width: 40ch;
  font-size: 15px; font-weight: 500; line-height: 1.5; letter-spacing: -0.03em;
  color: var(--token-grey-61);
}
.ab-item p:last-child::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; background: var(--brand-accent); }

/* ---------------- ABOUT: a note from Rivius ----------------
   The founder slot, in the company's voice until there is a real name and photo (brand/BRAND-FACTS.md). The grid is
   the one built for that: .ab-founder-side holds the label and takes a <figure class="ab-photo"> underneath it,
   .ab-founder-body takes an .ab-founder-id block above the letter. Both are styled below and stay ready. */
.ab-founder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  border-top: 1px solid var(--token-line);
}
.ab-founder-side {
  display: flex; flex-direction: column; gap: 20px;
  padding: 64px 32px 72px;
  border-right: 1px solid var(--token-line);
  min-width: 0;
}
.ab-founder-side .eyebrow { position: sticky; top: calc(var(--nav-h) + 40px); }
/* for the real portrait, when there is one */
.ab-photo {
  margin: 0;
  width: min(100%, 320px);
  aspect-ratio: 4 / 5;
  padding: 6px;
  border: 1px solid rgba(38, 38, 38, .12);
  background: var(--token-bg);
}
.ab-photo-mat {
  height: 100%;
  display: grid; place-items: center;
  padding: 8px; text-align: center;
  background:
    radial-gradient(circle at 1px 1px, rgba(0, 0, 0, .07) 1px, transparent 1.4px) 0 0 / 14px 14px,
    var(--token-surface);
}
.ab-founder-body {
  display: flex; flex-direction: column; gap: 24px;
  padding: 64px 64px 80px;
  min-width: 0;
}
/* for the real name and role line, when there is one */
.ab-founder-id { display: flex; flex-direction: column; gap: 18px; }
.ab-founder-body .h2 { font-size: 40px; }
.ab-letter {
  max-width: 62ch;
  display: flex; flex-direction: column; gap: 16px;
  font-size: 17px; font-weight: 500; line-height: 1.6; letter-spacing: -0.03em;
  color: var(--token-ink-2);
}
/* what the company does, under a hairline so the note above it stays the note */
.ab-bio {
  max-width: 62ch;
  display: flex; flex-direction: column; gap: 14px;
  padding-top: 26px;
  border-top: 1px solid var(--token-line);
  font-size: 16px; font-weight: 500; line-height: 1.6; letter-spacing: -0.025em;
  color: var(--token-grey-61);
  text-wrap: pretty;
}

/* ---------------- ABOUT: questions first ---------------- */
.ab-cta-box {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 96px 32px 104px;
  border-top: 1px solid var(--token-line);
  border-bottom: 1px solid var(--token-line);
  text-align: center;
}
.ab-cta-box > p { font-size: 17px; font-weight: 500; line-height: 1.5; letter-spacing: -0.035em; color: var(--token-grey-61); }
.ab-cta-box .pg-actions { margin-top: 14px; }

/* ---------------- CONTACT ---------------- */
.ct-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  border-bottom: 1px solid var(--token-line);
}
.ct-side {
  display: flex; flex-direction: column; gap: 40px;
  padding: 48px 32px 64px;
  border-right: 1px solid var(--token-line);
  min-width: 0;
}
.ct-list { margin: 0; display: flex; flex-direction: column; }
.ct-list div { display: flex; flex-direction: column; gap: 6px; padding: 20px 0; border-top: 1px solid var(--token-line); }
.ct-list div:first-child { border-top: 0; padding-top: 0; }
.ct-list dd { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.45; letter-spacing: -0.035em; color: var(--token-ink); }
.ct-addr { font-size: 16px; line-height: 1.55; color: var(--token-ink-2); }
.ct-more { display: flex; flex-direction: column; gap: 12px; }
.ct-more ul { display: flex; flex-direction: column; gap: 10px; }

.ct-main { padding: 32px; min-width: 0; }
.ct-form {
  display: flex; flex-direction: column; gap: 20px;
  padding: 32px;
  border-radius: 16px;
  background: var(--token-surface);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
}
.ct-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.ct-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ct-field label { font-size: 14px; font-weight: 500; line-height: 1.4; letter-spacing: -0.03em; color: var(--token-ink-2); }
.ct-field label span { color: var(--token-grey-7a); }
/* Inputs: the hero NPI field's twin (white pill, hairline ring, evergreen focus ring) */
.ct-input {
  width: 100%; height: 44px; margin: 0;
  padding: 0 18px;
  border: 0; border-radius: 30px;
  background: var(--token-white);
  box-shadow: inset 0 0 0 1px var(--token-line), 0 1px 2px rgba(0, 0, 0, .03);
  font-family: var(--font-sans); font-size: 15px; font-weight: 500; line-height: 1.4; letter-spacing: -0.02em;
  color: var(--token-ink);
  caret-color: var(--brand-deep);
  -webkit-appearance: none; appearance: none;
  transition: box-shadow var(--dur-hover) var(--ease-hover);
}
textarea.ct-input { height: auto; min-height: 168px; padding: 14px 18px; border-radius: 20px; resize: vertical; line-height: 1.5; }
.ct-input::placeholder { color: var(--token-grey-ad); opacity: 1; }
.ct-input:hover { box-shadow: inset 0 0 0 1px var(--token-grey-ad); }
.ct-input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--brand-deep), 0 0 0 4px rgba(8, 21, 17, .1); }
.ct-field.is-invalid .ct-input { box-shadow: inset 0 0 0 1px #B06A12, 0 0 0 4px rgba(176, 106, 18, .1); }
.ct-err { font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: -0.02em; color: #8A520D; padding: 0 18px; }
.ct-err:empty { display: none; }
@media (pointer: coarse) { .ct-input { font-size: 16px; } }

.ct-note {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--token-bg);
  box-shadow: inset 0 0 0 1px var(--token-line);
  font-size: 14px; font-weight: 500; line-height: 1.45; letter-spacing: -0.03em;
  color: var(--token-ink-2);
}
.ct-note svg { flex: none; width: 16px; height: 16px; fill: none; stroke: #8A5310; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ct-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.ct-foot .btn-pill { height: 44px; padding: 0 22px; }
.ct-foot .btn-mint:hover, .ct-foot .btn-mint:focus-visible { padding: 0 28px; }
/* After a submit: a calm line saying the mail client is opening. It is never a "message sent". */
.ct-status {
  display: none;
  gap: 10px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--token-white);
  box-shadow: inset 0 0 0 1px var(--token-line);
  font-size: 14px; font-weight: 500; line-height: 1.5; letter-spacing: -0.03em;
  color: var(--token-ink-2);
}
.ct-status.is-shown { display: flex; }
.ct-status::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: #0E7A57; }

/* ---------------- 404 ---------------- */
.nf-box { border-bottom: 1px solid var(--token-line); }
.nf-inner {
  position: relative;
  min-height: calc(100vh - var(--nav-h) - 40px);
  min-height: calc(100svh - var(--nav-h) - 40px);
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
/* Sola's 404: the column grid shows through */
.nf-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); pointer-events: none; }
.nf-cols i + i { border-left: 1px solid var(--token-line); }
.nf-copy {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  width: 33.333%;
  margin-left: 33.333%;
  padding: 96px 32px 48px;
}
.nf-copy .pg-title { margin-top: 16px; font-size: 48px; text-align: left; }
.nf-copy .pg-lede { max-width: 300px; margin-top: 14px; font-size: 16px; text-align: left; }
.nf-copy .btn-pill { margin-top: 28px; }
.nf-num {
  position: relative;
  margin: 0 0 -0.12em;
  font-family: var(--font-serif);
  font-size: min(39vw, 600px); font-weight: 400; line-height: .8; letter-spacing: -0.04em;
  text-align: center;
  color: var(--brand-deep);
  user-select: none;
}

/* ---------------- LEGAL ---------------- */
.pg-legal .pg-head-box { padding-top: 104px; padding-bottom: 0; }
.pg-legal .pg-title { font-size: 52px; }
.lg-meta { margin-top: 20px; font-size: 13px; font-weight: 500; line-height: 1.5; letter-spacing: -0.02em; color: var(--token-grey-7a); }
.lg-meta strong { font-weight: 600; color: var(--token-grey-54); }

/* document switcher: the six drafts, as tabs along the band's lower edge */
.lg-switch { width: calc(100% + 128px); margin: 56px -64px 0; border-top: 1px solid var(--token-line); }
.lg-switch ul { display: flex; justify-content: center; flex-wrap: wrap; }
.lg-switch li { display: flex; }
.lg-switch a {
  position: relative;
  display: flex; align-items: center;
  height: 50px; padding: 0 16px;
  font-size: 13px; font-weight: 600; line-height: 1.5; letter-spacing: -0.035em;
  color: var(--token-grey-61);
  transition: color .3s;
}
.lg-switch a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  background: var(--brand-accent); box-shadow: var(--brand-accent-glow) 0 0 10px 1px;
  opacity: 0; transition: opacity .45s cubic-bezier(.44, 0, .56, 1);
}
.lg-switch a:hover { color: var(--token-ink); }
.lg-switch a[aria-current="page"] { color: var(--token-ink); }
.lg-switch a[aria-current="page"]::after, .lg-switch a:hover::after { opacity: 1; }

.lg-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  border-bottom: 1px solid var(--token-line);
}
/* right rail (desktop only): print + back to top, so the article column sits centred between two frame lines */
.lg-rail { border-left: 1px solid var(--token-line); min-width: 0; }
.lg-rail-in { position: sticky; top: var(--nav-h); display: flex; flex-direction: column; gap: 18px; padding: 48px 32px; }
.lg-rail ul { display: flex; flex-direction: column; gap: 10px; }
.lg-rail .pg-link { padding: 0; font-family: inherit; cursor: pointer; text-align: left; }
.lg-side { border-right: 1px solid var(--token-line); min-width: 0; }
.lg-toc {
  position: sticky; top: var(--nav-h);
  max-height: calc(100vh - var(--nav-h));
  overflow: auto; overscroll-behavior: contain;
  padding: 48px 24px 48px 32px;
  scrollbar-width: thin;
}
.lg-toc summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: default; }
.lg-toc summary::-webkit-details-marker { display: none; }
.lg-toc summary svg { display: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.lg-toc ol { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.lg-toc a {
  position: relative;
  display: block;
  padding: 5px 0 5px 14px;
  font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: -0.025em;
  color: var(--token-grey-7a);
  transition: color .25s;
}
.lg-toc a::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--brand-accent); opacity: 0; transition: opacity .25s; }
.lg-toc a:hover { color: var(--token-ink); }
.lg-toc a.is-active { color: var(--token-ink); }
.lg-toc a.is-active::before { opacity: 1; }

/* long-form text: ~68ch measure, 1.7 line height */
.lg-body {
  min-width: 0;
  width: 100%;
  max-width: calc(68ch + 128px);
  justify-self: center;
  padding: 56px 64px 96px;
  font-size: 16px; font-weight: 400; line-height: 1.7; letter-spacing: -0.011em;
  color: var(--token-ink-2);
  overflow-wrap: break-word;
  font-feature-settings: "cv11", "ss01";
}
.lg-body > :first-child { margin-top: 0; }
.lg-body p, .lg-body ul, .lg-body ol, .lg-body .lg-table, .lg-body blockquote { margin: 0 0 16px; }
.lg-body h2 {
  margin: 48px 0 16px;
  padding-top: 32px;
  border-top: 1px solid var(--token-line);
  font-family: var(--font-serif);
  font-size: 28px; font-weight: 400; line-height: 1.2; letter-spacing: -0.02em;
  color: var(--token-ink);
  scroll-margin-top: -12px;      /* html already has scroll-padding-top: nav height; the rule hides under the nav */
  text-wrap: balance;
}
.lg-body > h2:first-child { padding-top: 0; border-top: 0; }
.lg-body h3 {
  margin: 32px 0 8px;
  font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -0.03em;
  color: var(--token-ink);
  scroll-margin-top: 16px;
}
.lg-body strong { font-weight: 600; color: var(--token-ink); }
.lg-body ul, .lg-body ol { padding-left: 1.4em; }
.lg-body ul { list-style: disc; }
.lg-body ol { list-style: decimal; }
.lg-body li { padding-left: .2em; }
.lg-body li + li { margin-top: 8px; }
.lg-body li::marker { color: var(--token-grey-ad); }
.lg-body ol > li::marker { color: var(--token-grey-7a); font-feature-settings: "tnum"; font-size: .92em; }
.lg-body a:not(.ph) { color: var(--token-ink); text-decoration: underline; text-decoration-color: rgba(176, 106, 18, .5); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.lg-body a:not(.ph):hover { text-decoration-color: var(--brand-accent); text-decoration-thickness: 2px; }
.lg-body hr { height: 0; margin: 72px 0 56px; border: 0; border-top: 1px solid var(--token-ink); opacity: .5; }
.lg-body hr + h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.lg-body code { font-family: "Geist Mono", ui-monospace, monospace; font-size: .88em; }
/* "Rivius adaptation" boxes and sign-up notes in the drafts */
.lg-body blockquote.lg-note {
  margin: 24px 0;
  padding: 20px 24px;
  border-radius: 0 12px 12px 0;
  background: var(--token-surface);
  box-shadow: inset 2px 0 0 var(--brand-accent);
}
.lg-note > :last-child { margin-bottom: 0; }
/* tables scroll sideways inside their own box on phones */
.lg-table { overflow-x: auto; border-radius: 12px; box-shadow: inset 0 0 0 1px #e6e5df; }
.lg-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; letter-spacing: -0.015em; }
.lg-table th, .lg-table td { padding: 12px 16px; text-align: left; vertical-align: top; }
.lg-table th { font-size: 13px; font-weight: 600; color: var(--token-ink); background: var(--token-surface); border-bottom: 1px solid #e6e5df; }
.lg-table td { border-top: 1px solid #efeee8; }
.lg-table tr:first-child td { border-top: 0; }
.lg-table td + td, .lg-table th + th { border-left: 1px solid #efeee8; }
.lg-table table:not(:has(thead)) td:first-child { width: 36%; font-weight: 500; color: var(--token-grey-61); }
.lg-table table:has(thead) { min-width: 560px; }
/* Contract blanks the CLIENT fills at signing (brand/BRAND-FACTS.md): a ruled line with a small label, so the
   agreements read as ready to sign. Never the placeholder highlighter. */
.lg-fill {
  display: inline-flex; flex-direction: column; align-items: stretch;
  min-width: 148px; max-width: 100%;
  margin: 0 2px;
  vertical-align: -0.35em;
}
.lg-fill-rule { display: block; height: 15px; border-bottom: 1px solid rgba(26, 26, 24, .42); }
.lg-fill-lab {
  display: block; margin-top: 4px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px; font-weight: 500; line-height: 1.3; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--token-grey-7a);
  white-space: nowrap;
}
.lg-table td .lg-fill { min-width: 180px; }
.lg-body li .lg-fill, .lg-body p .lg-fill { min-width: 132px; }

/* Placeholder highlighter: no page should carry one any more (the build GATEs on it), kept so a regression is loud
   rather than invisible. A placeholder that runs across bold text is split into several spans by the converter; an
   opaque fill with a 2px spread (instead of padding) lets the pieces join into one highlight. */
.lg-body .ph { padding: 0; border-radius: 3px; background: #FBEDD0; box-shadow: 0 0 0 2px #FBEDD0; font-weight: 500; color: #7A4A0E; }
.ph.ph-tbp {
  font-size: .82em; font-weight: 600; letter-spacing: -0.01em;
  color: #8A5310;
  background: #FCF1E1;
  box-shadow: inset 0 0 0 1px rgba(176, 106, 18, .22);
  padding: .05em .4em;
  white-space: normal;
}
.lg-body .ph.ph-tbp { color: #8A5310; }

@media (prefers-reduced-motion: no-preference) { html:has(body.pg-legal) { scroll-behavior: smooth; } }

/* ---------------- tablet (810–1199) ---------------- */
@media (max-width: 1199px) {
  .pg-head-box { padding: 96px 48px 88px; }
  .pg-title { font-size: 48px; }
  .pg-legal .pg-title { font-size: 44px; }
  .pg-legal .pg-head-box { padding-top: 84px; }
  .lg-switch { width: calc(100% + 96px); margin: 48px -48px 0; }

  .ab-work-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto; }
  .ab-work-label { grid-row: auto; grid-column: 1 / -1; padding: 28px 32px; border-right: 0; border-bottom: 1px solid var(--token-line); }
  .ab-item { padding: 32px 32px 40px; }
  .ab-item h3 { margin-top: 40px; font-size: 26px; }
  .ab-founder-body { padding: 56px 40px 64px; }
  .ab-founder-side { padding: 56px 24px 64px; }
  .ab-founder-body .h2 { font-size: 34px; }
  .ab-founder-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); }

  .ct-grid { grid-template-columns: minmax(0, 1fr); }
  .ct-side { border-right: 0; border-bottom: 1px solid var(--token-line); padding: 40px 32px; flex-direction: row; gap: 48px; }
  .ct-side > * { flex: 1; min-width: 0; }

  .nf-cols { grid-template-columns: repeat(2, 1fr); }
  .nf-cols i:nth-child(n + 3) { display: none; }
  .nf-copy { margin-left: 0; width: 50%; padding-top: 80px; }

  .lg-grid { grid-template-columns: 240px minmax(0, 1fr); }
  .lg-rail { display: none; }
  .lg-toc { padding: 40px 20px 40px 24px; }
  .lg-body { padding: 48px 48px 80px; }
}

/* ---------------- legal below 1000px: the contents collapse above the text, which gets the full width ---------------- */
@media (max-width: 999px) {
  .lg-grid { grid-template-columns: minmax(0, 1fr); }
  .lg-side { border-right: 0; border-bottom: 1px solid var(--token-line); }
  .lg-toc { position: static; max-height: none; padding: 0; }
  .lg-toc summary { cursor: pointer; padding: 16px 32px; }
  .lg-toc summary svg { display: block; }
  .lg-toc[open] summary svg { transform: rotate(180deg); }
  .lg-toc ol { margin: 0; padding: 0 32px 24px; columns: 2; column-gap: 32px; }
  .lg-toc li { break-inside: avoid; }
  .lg-body { padding: 48px 48px 80px; }
}

/* ---------------- phone (<810) ---------------- */
@media (max-width: 809px) {
  .pg-head-box { padding: 64px 20px 56px; }
  .pg-title { margin-top: 16px; font-size: 36px; line-height: 1.1; }
  .pg-lede { margin-top: 16px; font-size: 16px; }
  .pg-legal .pg-head-box { padding-top: 56px; }
  .pg-legal .pg-title { font-size: 34px; }
  .lg-switch { width: calc(100% + 40px); margin: 36px -20px 0; }
  .lg-switch ul {
    justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 8px;
    -webkit-mask: linear-gradient(90deg, #000 85%, transparent); mask: linear-gradient(90deg, #000 85%, transparent);
  }
  .lg-switch ul::-webkit-scrollbar { display: none; }
  .lg-switch a { height: 46px; padding: 0 12px; white-space: nowrap; }

  .ab-work-grid { grid-template-columns: minmax(0, 1fr); }
  .ab-work-label { padding: 24px; }
  .ab-item { padding: 28px 24px 36px; }
  .ab-item:nth-of-type(even) { border-left: 0; }
  .ab-item:nth-of-type(n + 2) { border-top: 1px solid var(--token-line); }
  .ab-item h3 { margin-top: 28px; font-size: 24px; }
  /* phone: the label (and later a small portrait under it) above the note */
  .ab-founder-grid { grid-template-columns: minmax(0, 1fr); }
  .ab-founder-side {
    flex-direction: row; align-items: center; gap: 16px;
    padding: 22px 24px;
    border-right: 0; border-bottom: 1px solid var(--token-line);
  }
  .ab-founder-side .eyebrow { position: static; }
  .ab-photo { width: 92px; padding: 4px; }
  .ab-photo-mat { padding: 4px; background-size: 10px 10px; }
  .ab-founder-body { padding: 32px 24px 48px; gap: 20px; }
  .ab-founder-id { gap: 10px; }
  .ab-founder-body .h2 { font-size: 26px; }
  .ab-letter { font-size: 16px; }
  .ab-bio { font-size: 15px; padding-top: 22px; }
  .ab-cta-box { padding: 64px 24px 72px; }
  .ab-cta-box > p { font-size: 16px; }

  .ct-side { flex-direction: column; gap: 32px; padding: 32px 24px; }
  .ct-main { padding: 8px; }
  .ct-form { padding: 24px 16px; gap: 18px; border-radius: 14px; }
  .ct-row { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .ct-foot .btn-pill { width: 100%; }

  .nf-cols { display: none; }
  .nf-inner { min-height: 0; }
  .nf-copy { width: auto; min-width: 0; margin-left: 0; padding: 64px 24px 72px; }
  .nf-copy .pg-title { font-size: 36px; }
  .nf-num { font-size: 52vw; }

  .lg-toc ol { columns: 1; }
  .lg-toc summary { padding: 16px 24px; }
  .lg-toc ol { padding: 0 24px 20px; columns: 1; }
  .lg-body { padding: 36px 24px 64px; font-size: 16px; line-height: 1.68; }
  .lg-body h2 { margin-top: 44px; padding-top: 28px; font-size: 24px; }
  .lg-body h3 { font-size: 16px; }
  .lg-body blockquote.lg-note { padding: 16px 18px; }
  .lg-table th, .lg-table td { padding: 10px 12px; }
}

/* ---------------- print (legal pages first of all) ---------------- */
@media print {
  @page { margin: 18mm 16mm; }
  .nav-sticky, .foot-wrap, .lg-side, .lg-rail, .lg-switch, .pg-actions, .ct-main, .nf-cols { display: none !important; }
  body { background: #fff; color: #000; }
  .appear, .lines .w, .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .frame-box { width: 100%; max-width: none; border: 0 !important; }
  .dot { display: none; }
  .pg-head-box, .pg-legal .pg-head-box { padding: 0 0 16pt; border-bottom: 1px solid #999; text-align: left; align-items: flex-start; }
  .pg-head-box::before { display: none; }
  .pg-head-copy { align-items: flex-start; }
  .pg-title, .pg-legal .pg-title { font-size: 24pt; color: #000; }
  .lg-grid { display: block; border: 0; }
  .lg-body { max-width: none; padding: 12pt 0 0; font-size: 10.5pt; line-height: 1.5; color: #000; }
  .lg-body h2 { font-size: 14pt; margin: 18pt 0 6pt; padding-top: 0; border-top: 0; break-after: avoid; color: #000; }
  .lg-body h3 { font-size: 11pt; break-after: avoid; color: #000; }
  .lg-body p, .lg-body li, .lg-table tr { break-inside: avoid; orphans: 3; widows: 3; }
  .lg-fill-rule { border-bottom-color: #000; }
  .lg-fill-lab { color: #444; }
  .lg-body a:not(.ph) { color: #000; text-decoration: underline; }
  .lg-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
  .lg-table { overflow: visible; box-shadow: none; border: 1px solid #999; border-radius: 0; }
  .lg-table table:has(thead) { min-width: 0; }
  .lg-body blockquote.lg-note { background: none; box-shadow: none; border-left: 2pt solid #000; border-radius: 0; }
  main .ph, .lg-body .ph, .ph.ph-tbp, .lg-body .ph.ph-tbp { background: none; box-shadow: none; color: #000; border-bottom: 1px dotted #000; border-radius: 0; padding: 0; }
}
