/* MagpieFeed shared UI for server-rendered (Django) pages.
   Depends on tokens.css (always linked first). Page templates add their own
   {% block style %} AFTER this file, so a page can override anything here.

   Vocabulary (docs/specs/redesign-v3.md, "How to use the foundation"):
     type     .display-1 .display-2 .eyebrow .lede .muted
     buttons  .btn + .btn-primary (ink) | .btn-blue | .btn-secondary (sunk) | .btn-ghost
              size modifiers .btn-lg (hero, 52px) .btn-sm; .btn-block = full width
     forms    .field (input/select/textarea), .label, .hint, .field-error, .url-row
     surfaces .card .card-pad .band (dark band) .section .section-warm .wrap
     bits     .chip .chip-blue .alert(.alert-ok) .vh .skip
     logo     .mf-logo (from {% include "web/_logo.html" %})
     shell    header.top / footer.bottom (web/public_base.html) */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--canvas); color: var(--text);
  font-family: var(--sans); font-size: 1rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
/* Links inherit (page bodies style their own); opt into the blue link style
   with a.link or anything inside .prose. */
a { color: inherit; }
a.link, .prose a { color: var(--blue); text-underline-offset: 2px; }
a.link:hover, .prose a:hover { color: var(--ink); }
img, video, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }   /* 16px gutters on a phone */
.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: var(--s4); top: var(--s4); background: var(--paper); color: var(--ink);
  padding: .6rem .9rem; border-radius: var(--r-sm); z-index: 60; box-shadow: var(--shadow-lg);
}

/* ------------------------------------------------------------------ type */
.display-1, .display-2 {
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  margin: 0; text-wrap: balance;
}
.display-1 { font-size: var(--display-1); line-height: 1.02; letter-spacing: -.015em; }
.display-2 { font-size: var(--display-2); line-height: 1.05; letter-spacing: -.01em; }
.eyebrow { font-size: .875rem; font-weight: 600; color: var(--blue); letter-spacing: 0; }
.lede { font-size: 1.1875rem; line-height: 1.5; color: var(--text); max-width: 34em; text-wrap: pretty; }
.muted { color: var(--muted); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .55rem 1rem; border-radius: var(--r-sm);
  font: inherit; font-size: .9375rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { text-decoration: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--fill-ink); color: var(--on-fill-ink); }
.btn-primary:hover { background: var(--fill-ink-press); color: var(--on-fill-ink); }
.btn-blue { background: var(--fill-blue); color: var(--on-fill-blue); }
.btn-blue:hover { background: var(--blue-press); color: var(--on-fill-blue); }
.btn-secondary { background: var(--bg-sunk); color: var(--ink); }
.btn-secondary:hover { background: var(--line); color: var(--ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--field-line); color: var(--ink); }
.btn-lg { min-height: 52px; padding: .8rem 1.25rem; border-radius: var(--r-md); font-size: 1rem; }
.btn-sm { min-height: 36px; padding: .35rem .75rem; font-size: .875rem; }
.btn-block { display: flex; width: 100%; }

/* ------------------------------------------------------------------ forms */
.label, form label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink); margin: var(--s4) 0 .3rem; }
.field,
input[type=email], input[type=password], input[type=text], input[type=url], input[type=search] {
  width: 100%; min-height: 48px; padding: .7rem .9rem;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--field); border: 1.5px solid var(--field-line); border-radius: var(--r-md);
}
textarea.field { min-height: 6rem; }
.field::placeholder, input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
.field:focus, input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
.field[aria-invalid="true"], input[aria-invalid="true"] { border-color: var(--danger); }
.hint { margin: .35rem 0 0; font-size: .8125rem; color: var(--muted); }
.field-error { margin: .35rem 0 0; font-size: .8125rem; font-weight: 600; color: var(--danger); }
/* The hero/CTA shape: one field + one button, wrapping on a phone. */
.url-row { display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; }
.url-row > .field, .url-row > input { flex: 1 1 240px; width: auto; }

.alert {
  margin: var(--s4) 0 0; padding: .65rem .8rem; border-radius: var(--r-sm); font-size: .875rem;
  background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-line);
}
.alert p { margin: 0; } .alert p + p { margin-top: .35rem; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }

/* --------------------------------------------------------------- surfaces */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card-pad { padding: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600;
  padding: 3px 8px; border-radius: 5px; background: var(--bg-sunk); color: var(--ink);
}
.chip-blue { background: var(--blue-soft); color: var(--blue); }
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section-warm { background: var(--bg-warm); }
.band { background: var(--band); color: var(--on-band); }
.band .display-1, .band .display-2 { color: var(--on-band); }

/* ------------------------------------------------------------------- logo */
.mf-logo {
  display: inline-flex; align-items: center; gap: .55em; color: var(--ink);
  font-family: var(--sans); font-weight: 700; font-size: 1.125rem; letter-spacing: -.01em;
  text-decoration: none; line-height: 1;
}
.mf-logo svg { flex: none; display: block; }

/* =================================================================== shell
   header.top and footer.bottom of web/public_base.html */
header.top {
  position: sticky; top: 0; z-index: 50;
  background: var(--header); border-bottom: 1px solid var(--line-soft);
  backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
}
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: var(--head-h); }
.top .brand { min-height: 44px; flex: none; display: inline-flex; align-items: center; text-decoration: none; }
.top .brand:hover { text-decoration: none; }
.top nav { flex: 1 1 auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.top .nav-sections { display: none; gap: 28px; margin-inline: auto; }
.top .nav-account { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.top nav a { text-decoration: none; white-space: nowrap; font-size: .9375rem; min-height: 44px; display: inline-flex; align-items: center; }
.top .nav-sections a, .top .nav-signin { color: var(--text); }
.top .nav-sections a:hover, .top .nav-signin:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.top .nav-signin { padding: 8px 12px; }
.top .nav-cta {
  background: var(--fill-ink); color: var(--on-fill-ink); font-weight: 600;
  padding: 9px 16px; border-radius: var(--r-sm); min-height: 40px;
}
.top .nav-cta:hover { background: var(--fill-ink-press); color: var(--on-fill-ink); }
@media (min-width: 52rem) { .top .nav-sections { display: flex; } .top .nav-account { margin-left: 0; } }
@media (max-width: 26rem) {             /* phones: logo + Sign in + Start free on one row */
  .top .wrap { gap: 8px; }
  .top .nav-account { gap: 4px; }
  .top .nav-signin { padding-inline: 8px; }
  .top .nav-cta { padding-inline: 12px; }
}
@media (max-width: 22.5rem) {           /* 320-360px, even with fallback fonts */
  .top .mf-logo { font-size: 1rem; }
  .top .nav-account { gap: 0; }
  .top .nav-signin { padding-inline: 4px; font-size: .875rem; }
  .top .nav-cta { padding-inline: 8px; font-size: .875rem; }
}

footer.bottom {
  border-top: 1px solid var(--line-soft); background: var(--canvas);
  padding: var(--s7) 0; color: var(--muted); font-size: .875rem;
}
footer.bottom .wrap { display: grid; gap: var(--s5); }
footer.bottom .foot-brand { display: flex; flex-direction: column; gap: .5rem; max-width: 22rem; }
footer.bottom .foot-brand p { margin: 0; }
footer.bottom nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--s5); }
footer.bottom nav a {
  color: var(--text); text-decoration: none; font-weight: 500;
  min-height: 44px; display: inline-flex; align-items: center;
}
footer.bottom nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
footer.bottom .foot-legal { margin: 0; }
@media (min-width: 52rem) {
  footer.bottom .wrap { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  footer.bottom .foot-legal { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* === rdB: content === */
/* Content pages on the public shell: /pricing/, /features/, /for/<slug>/,
   /tutorials/, public /help/. Generic enough for any public page:
     layout   .page-head .sec-intro .card-grid (.card-grid-2) .cta-row .crumbs
     bits     .step-num .check-list .note-box .seg-toggle .yes-mark .no-mark
     media    .video-frame (+ .video-strip, figcaption)
     faq      .faq-list > details > summary + p
     band     .cta-band (inside .band) */
.page-head { padding: clamp(40px, 7vw, 88px) 0 clamp(8px, 2vw, 16px); }
.page-head .display-1 { max-width: 20ch; }
.page-head .eyebrow { margin: 0 0 14px; }
.page-head .lede { margin: 20px 0 0; }
.crumbs { margin: 0 0 18px; font-size: .875rem; color: var(--muted); }
.crumbs a { color: var(--text); font-weight: 600; text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.sec-intro { display: flex; flex-direction: column; gap: 12px; max-width: 46rem; margin: 0 0 clamp(24px, 3vw, 36px); }
.sec-intro p { margin: 0; }
.sec-intro .eyebrow { margin: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 28px; }
@media (max-width: 30rem) { .cta-row > .btn { flex: 1 1 100%; } }

.card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.card h3 { margin: 0 0 8px; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.card p { margin: 0; color: var(--text); font-size: .9375rem; line-height: 1.55; }
.card p + p { margin-top: 10px; }
.card .meta { margin-top: 12px; font-size: .8125rem; color: var(--muted); }
/* A whole card that is one link: the heading's <a> stretches over it. */
.card-link { position: relative; transition: border-color .12s ease; }
.card-link:hover { border-color: var(--field-line); }
.card-link h3 a { text-decoration: none; }
.card-link h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.card-link h3 a:focus-visible { outline: none; }
.card-link:has(h3 a:focus-visible) { outline: 2px solid var(--blue); outline-offset: 3px; }
.card-link .meta a { position: relative; z-index: 1; }

.step-num {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; border-radius: 999px; background: var(--blue-soft); color: var(--blue);
  font-family: var(--serif); font-size: 1.25rem; line-height: 1;
}
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 26px; color: var(--text); font-size: .9375rem; line-height: 1.5; }
.check-list li::before {
  content: ""; position: absolute; left: 3px; top: .38em; width: 11px; height: 6px;
  border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg);
}
.yes-mark, .no-mark { display: inline-block; vertical-align: middle; }
.yes-mark { width: 12px; height: 7px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: translateY(-2px) rotate(-45deg); }
.no-mark { width: 12px; height: 2px; background: var(--field-line); border-radius: 1px; }
.note-box {
  margin: 0; padding: 14px 16px; border-radius: var(--r-md); font-size: .9375rem; line-height: 1.55;
  background: var(--blue-soft); border: 1px solid var(--blue-line); color: var(--text);
}
.note-box b, .note-box strong { color: var(--ink); }
.note-box a { color: var(--blue); font-weight: 600; }

/* Two-way segmented control (e.g. Monthly | Yearly). Buttons carry aria-pressed. */
.seg-toggle { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--bg-sunk); }
.seg-toggle button {
  font: inherit; font-size: .9375rem; font-weight: 600; color: var(--muted); background: transparent;
  border: 0; border-radius: 7px; padding: 8px 14px; min-height: 40px; cursor: pointer;
}
.seg-toggle button:hover { color: var(--ink); }
.seg-toggle button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }

/* A recording on a dark bezel (dark in both schemes, like the band). */
.video-frame { margin: 0; background: var(--band); border: 1px solid var(--on-band-line); border-radius: var(--r-lg); overflow: hidden; color: var(--on-band-soft); }
.video-frame .video-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--on-band-line); font-size: .8125rem; line-height: 1.4;
}
.video-frame .video-strip b { color: var(--on-band); font-weight: 600; }
.video-frame .video-strip .len { margin-left: auto; white-space: nowrap; }
.video-frame video, .video-frame > img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; background: #0b0d11; }
.video-frame figcaption { padding: 10px 14px; border-top: 1px solid var(--on-band-line); font-size: .8125rem; line-height: 1.5; }
.video-frame :focus-visible { outline-color: var(--on-band); outline-offset: -3px; }
.video-frame video p { padding: 16px; margin: 0; }
.video-frame video p a { color: var(--on-band); }

.faq-list { border-top: 1px solid var(--line); max-width: 52rem; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; min-height: 44px; cursor: pointer; list-style: none;
  font-size: 1.0625rem; font-weight: 600; color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; font-size: 1.375rem; font-weight: 400; line-height: 1; color: var(--muted); }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details > :not(summary) { margin: 0 0 18px; max-width: 44rem; color: var(--text); }
.faq-list details a { color: var(--blue); }

/* Final call to action on the dark band: centred title + one URL field. */
.cta-band { padding: clamp(48px, 7vw, 88px) 0; text-align: center; }
.cta-band .wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.cta-band .url-row { width: 100%; justify-content: center; }
.cta-band .field { background: transparent; border-color: var(--on-band-line); color: var(--on-band); }
.cta-band .field::placeholder { color: var(--on-band-soft); }
.cta-band .btn-on-band { background: var(--on-band); color: var(--band); }
.cta-band .btn-on-band:hover { background: var(--on-band-soft); color: var(--band); }
.cta-band p { margin: 0; color: var(--on-band-soft); font-size: .875rem; }
.cta-band a { color: var(--on-band); }
@media (max-width: 30rem) { .cta-band .url-row > .btn { flex: 1 1 100%; } }
/* === end rdB === */
/* === rdC: auth === */
/* Auth, legal, billing and error pages (sign-in, signup, password reset, privacy,
   terms, billing*, 404/500). Generic pieces only; page layout stays in each page.

     notes     .alert-warn .alert-info .alert-quiet   (siblings of .alert / .alert-ok)
     chips     .chip-ok .chip-warn .chip-danger        (siblings of .chip / .chip-blue)
     auth      .auth-wrap > .auth-card (.auth-title .auth-sub) + .auth-after
               .auth-label-row (label + inline link)  .auth-divider ("or")
     shell     .nav-account .nav-btn (a POST form button that looks like a nav link)
     reading   .doc (title / toc / prose grid) .doc-title .doc-dateline .doc-toc .doc-prose
               .doc-note .doc-card .doc-table .sn (section permalink numbers)
     misc      .app-page-head (h1 + lede block)  .tabular */
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.alert-info { background: var(--blue-soft); color: var(--ink); border-color: var(--blue-line); }
.alert-quiet { background: var(--bg-warm); color: var(--text); border-color: var(--line); }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.tabular { font-variant-numeric: tabular-nums; }

.app-page-head { margin: 0 0 var(--s6); }
.app-page-head h1 { font-family: var(--serif); font-weight: 400; color: var(--ink); margin: 0;
  font-size: clamp(2.25rem, 4.4vw, 3rem); line-height: 1.04; letter-spacing: -.01em; text-wrap: balance; }
.app-page-head .lede { margin: var(--s3) 0 0; }

/* ---- auth: one focused card */
.auth-wrap { width: min(100% - 2rem, 27rem); margin: 0 auto; padding: clamp(32px, 7vw, 72px) 0 var(--s8); }
.auth-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: clamp(22px, 5vw, 36px); }
.auth-title { margin: 0; font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(2.25rem, 6vw, 2.75rem); line-height: 1.02; letter-spacing: -.01em; text-wrap: balance; }
.auth-sub { margin: var(--s2) 0 var(--s5); color: var(--muted); font-size: .9375rem; text-wrap: pretty; }
.auth-card form .btn[type=submit] { margin-top: var(--s5); }
.auth-card .alert { margin: 0 0 var(--s4); }
.auth-label-row { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s3);
  margin: .25rem 0 .3rem; }
.auth-label-row label { margin: 0; }
.auth-label-row a { font-size: .875rem; font-weight: 600; color: var(--blue); min-height: 44px;
  display: inline-flex; align-items: flex-end; padding-bottom: .1rem; text-underline-offset: 2px; }
.auth-label-row a:hover { color: var(--ink); }
.auth-after { margin: var(--s5) 0 0; text-align: center; color: var(--text); font-size: .9375rem; }
.auth-after a { color: var(--blue); font-weight: 600; display: inline-flex; min-height: 44px; align-items: center;
  text-underline-offset: 2px; }
.auth-after a:hover { color: var(--ink); }
.auth-divider { display: flex; align-items: center; gap: var(--s3); margin: var(--s4) 0 0;
  color: var(--muted); font-size: .8125rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }

/* ---- a POST form (sign out) sitting in the header next to links */
.top .nav-account form { margin: 0; display: inline-flex; }
.top .nav-btn {
  font: inherit; font-size: .9375rem; color: var(--text); background: none; border: 0; cursor: pointer;
  min-height: 44px; padding: 8px 12px; border-radius: var(--r-sm); white-space: nowrap;
}
.top .nav-btn:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.top .nav-account a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.top .nav-account:only-child { margin-left: auto; }
/* header.top-account (web/_account_header.html): three account links + the mark fit 320px */
@media (max-width: 26rem) {
  .top-account .mf-logo-word { display: none; }
  .top-account .nav-signin, .top-account .nav-btn { padding-inline: 8px; }
}

/* ---- reading layout (privacy, terms): ~68ch measure, serif headings, contents rail */
.doc { --measure: 68ch; display: grid; gap: var(--s6); align-items: start;
  padding: clamp(32px, 6vw, 64px) 0 var(--s8); }
.doc-title, .doc-prose { max-width: var(--measure); min-width: 0; }
.doc-title h1 { margin: 0; font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: var(--display-1); line-height: 1.02; letter-spacing: -.015em; text-wrap: balance; }
.doc-dateline { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: baseline;
  margin: var(--s4) 0 0; padding: 0 0 var(--s4); border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: .875rem; }
.doc-dateline b { color: var(--ink); font-weight: 600; }
.doc-title .lede { margin: var(--s5) 0 0; max-width: none; color: var(--ink); }

.doc-toc { background: var(--bg-warm); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4); }
.doc-toc h2 { margin: 0 0 var(--s2); font-size: .8125rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.doc-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 2px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.doc-toc li { counter-increment: toc; margin: 0; }
.doc-toc a { display: flex; gap: .6rem; align-items: center; min-height: 40px; padding: .35rem .5rem;
  border-radius: var(--r-sm); text-decoration: none; color: var(--text); font-size: .9375rem; line-height: 1.3; }
.doc-toc a::before { content: counter(toc); min-width: 1.2rem; text-align: right; color: var(--muted);
  font-variant-numeric: tabular-nums; font-size: .8125rem; font-weight: 600; }
.doc-toc a:hover { background: var(--bg-sunk); color: var(--ink); }
.doc-toc a[aria-current="true"] { background: var(--blue-soft); color: var(--ink); font-weight: 600; }
.doc-toc a[aria-current="true"]::before { color: var(--blue); }
@media (min-width: 62rem) {
  .doc { grid-template-columns: 14rem minmax(0, 1fr); column-gap: clamp(40px, 5vw, 72px); row-gap: var(--s5); }
  .doc-title, .doc-prose { grid-column: 2; }
  .doc-toc { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: calc(var(--head-h) + var(--s5));
    max-height: calc(100vh - var(--head-h) - 3rem); overflow-y: auto;
    background: none; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 0 0 0 var(--s3); }
  .doc-toc ol { grid-template-columns: 1fr; }
  .doc-toc a { min-height: 36px; font-size: .875rem; }
}

.doc-prose { font-size: 1.0625rem; line-height: 1.7; color: var(--text); overflow-wrap: break-word; }
.doc-prose h2 { position: relative; margin: var(--s6) 0 var(--s2); padding-top: var(--s5);
  border-top: 1px solid var(--line-soft); font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(1.75rem, 3vw, 2.125rem); line-height: 1.1; letter-spacing: -.005em; text-wrap: balance; }
.doc-prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.doc-prose h3 { margin: var(--s6) 0 .35rem; font-size: 1.0625rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.doc-prose p { margin: .9rem 0; }
.doc-prose ul { margin: .9rem 0; padding-left: 1.25rem; }
.doc-prose li { margin: .5rem 0; }
.doc-prose li::marker { color: var(--muted); }
.doc-prose strong { color: var(--ink); font-weight: 600; }
.doc-prose a { color: var(--blue); text-underline-offset: 2px; }
.doc-prose a:hover { color: var(--ink); }
.doc-prose code { font-size: .86em; color: var(--ink); background: var(--bg-sunk); border-radius: 5px; padding: .05rem .3rem; }
.sn { font-family: var(--sans); font-size: .9375rem; font-weight: 600; color: var(--blue);
  font-variant-numeric: tabular-nums; text-decoration: none; margin-right: .55rem; vertical-align: .35em; }
.sn:hover { text-decoration: underline; color: var(--ink); }
.doc-prose h2:target .sn { background: var(--blue-soft); border-radius: 5px; padding: 0 .25rem; }
@media (min-width: 62rem) {
  .sn { position: absolute; left: -3rem; top: calc(var(--s5) + .55rem); width: 2rem; margin: 0;
    text-align: right; vertical-align: 0; }
  .doc-prose h2:first-child .sn { top: .55rem; }
}
.doc-note { margin: var(--s5) 0; padding: var(--s4) var(--s5); border-radius: var(--r-md);
  background: var(--blue-soft); border: 1px solid var(--blue-line); border-left: 3px solid var(--blue); color: var(--ink); }
.doc-note p { margin: .25rem 0; }
.doc-card { margin: var(--s7) 0 0; padding: var(--s5); background: var(--bg-warm); border: 1px solid var(--line);
  border-radius: var(--r-lg); }
.doc-card h3 { margin-top: 0; }
.doc-card p:last-child { margin-bottom: 0; }
.doc-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: var(--s4) 0;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
.doc-table table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: .65rem .8rem; border-bottom: 1px solid var(--line-soft); }
.doc-table th:first-child, .doc-table td:first-child { padding-left: 1rem; }
.doc-table thead th { font-size: .8125rem; font-weight: 600; color: var(--ink); background: var(--bg-warm); border-bottom-color: var(--line); }
.doc-table tbody tr:last-child td { border-bottom: 0; }
@media print {
  header.top, footer.bottom nav, .doc-toc, .skip { display: none !important; }
  body { background: #fff; color: #000; }
  .doc { display: block; padding: 0; }
  .doc-title, .doc-prose { max-width: none; color: #000; font-size: 10.5pt; line-height: 1.45; }
  .doc-prose a { color: #000; text-decoration: underline; }
  .doc-prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 85%; word-break: break-all; }
  .doc-prose h2 { font-size: 15pt; break-after: avoid; page-break-after: avoid; }
  .doc-prose h3 { break-after: avoid; page-break-after: avoid; }
  .sn { position: static; color: #000; }
  .doc-note, .doc-card, .doc-table, .doc-prose li { break-inside: avoid; page-break-inside: avoid; }
  .doc-note, .doc-card { background: none; border: 1px solid #999; }
  .doc-table { overflow: visible; }
}
/* === end rdC === */
