/* ardregistry.net — design system
   ---------------------------------------------------------------------------
   The holographic identity is kept and spent deliberately. The spectral ramp
   appears in five places: the ambient wash behind the hero, the rail on the
   answer block, the rail on the active nav item, the underline a link grows on
   hover, and the hairline under a measured figure. Everywhere else is ink on
   paper with hairline borders. Colour used everywhere is decoration; colour
   used five times is an identity.

   Surfaces separate with 1px borders, not shadow. Radii are small. Type is a
   precise neo-grotesque set tight and dense, because a reference is read rather
   than admired. */

:root {
  color-scheme: light;

  --paper:    #ffffff;
  --ground:   #fcfcfd;
  --ground-2: #f4f4f6;
  --ground-3: #ededf1;

  --ink:   #09090b;
  --ink-2: #52525b;
  --ink-3: #71717a;
  --ink-4: #a1a1aa;

  --rule:   #ececef;
  --rule-2: #dcdce2;
  --rule-3: #c4c4cd;

  /* the spectral ramp: the identity, used sparingly */
  --sp-1: #2fe0d4;
  --sp-2: #4d8bff;
  --sp-3: #7c5cff;
  --sp-4: #ff5fa2;
  --sp-5: #ffb86b;
  --spectral-line: linear-gradient(90deg,
      var(--sp-1), var(--sp-2), var(--sp-3), var(--sp-4), var(--sp-5));
  --dichroic: conic-gradient(from 210deg at 50% 50%,
      var(--sp-1), var(--sp-2), var(--sp-3), var(--sp-4), var(--sp-5), var(--sp-1));

  /* interactive is ink, not a colour */
  --accent:      #09090b;
  --accent-ink:  #ffffff;
  --accent-soft: #f4f4f6;

  --ok:   #15803d; --ok-bg:   #f0fdf4; --ok-edge:   #bbf7d0;
  --warn: #b45309; --warn-bg: #fffbeb; --warn-edge: #fde68a;
  --bad:  #be123c; --bad-bg:  #fff1f2; --bad-edge:  #fecdd3;

  --sh-1: 0 1px 2px rgba(9, 9, 11, .04);
  --sh-2: 0 1px 2px rgba(9, 9, 11, .05), 0 8px 24px -12px rgba(9, 9, 11, .12);

  --f-display: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-body:    "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --f-mono:    "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --measure: 70ch;
  --nav-w: 15.5rem;
  --toc-w: 14.5rem;
  --r: 8px;
  --r-sm: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:    #0e0e11;
    --ground:   #08080a;
    --ground-2: #151519;
    --ground-3: #1c1c22;
    --ink:   #fafafa;
    --ink-2: #a1a1aa;
    --ink-3: #82828c;
    --ink-4: #5f5f68;
    --rule:   #1e1e24;
    --rule-2: #2a2a32;
    --rule-3: #3f3f4a;
    --accent: #fafafa; --accent-ink: #09090b; --accent-soft: #1c1c22;
    --ok:   #4ade80; --ok-bg:   #0c1f14; --ok-edge:   #14532d;
    --warn: #fbbf24; --warn-bg: #1f1708; --warn-edge: #78350f;
    --bad:  #fb7185; --bad-bg:  #1f0d12; --bad-edge:  #881337;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
    --sh-2: 0 1px 2px rgba(0, 0, 0, .6), 0 12px 32px -16px rgba(0, 0, 0, .9);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:    #0e0e11;
  --ground:   #08080a;
  --ground-2: #151519;
  --ground-3: #1c1c22;
  --ink:   #fafafa;
  --ink-2: #a1a1aa;
  --ink-3: #82828c;
  --ink-4: #5f5f68;
  --rule:   #1e1e24;
  --rule-2: #2a2a32;
  --rule-3: #3f3f4a;
  --accent: #fafafa; --accent-ink: #09090b; --accent-soft: #1c1c22;
  --ok:   #4ade80; --ok-bg:   #0c1f14; --ok-edge:   #14532d;
  --warn: #fbbf24; --warn-bg: #1f1708; --warn-edge: #78350f;
  --bad:  #fb7185; --bad-bg:  #1f0d12; --bad-edge:  #881337;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
  --sh-2: 0 1px 2px rgba(0, 0, 0, .6), 0 12px 32px -16px rgba(0, 0, 0, .9);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: color-mix(in srgb, var(--sp-3) 20%, transparent); }

/* ---------- identity primitives ---------- */

.rim {
  border: 1px solid transparent;
  border-radius: var(--r);
  background-image: linear-gradient(var(--paper), var(--paper)), var(--dichroic);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* The ambient wash. Faint on purpose: it should read as light in the room. */
.wash { position: relative; isolation: isolate; }
.wash::before {
  content: "";
  /* Contained to the element it sits behind. An earlier version bled across
     the sidebar and the contents rail and made both look hazy: an ambient
     glow that tints the navigation is no longer ambient. */
  position: absolute; inset: -6% -2% -10%; z-index: -1;
  background: var(--dichroic);
  filter: blur(56px) saturate(1.15);
  opacity: .13;
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wash::before { opacity: .22; filter: blur(80px) saturate(1); }
}
:root[data-theme="dark"] .wash::before { opacity: .22; filter: blur(80px) saturate(1); }

.spectral-rule { height: 1px; border: 0; margin: 0; background: var(--spectral-line); opacity: .7; }
.aberrate { text-shadow: -0.012em 0 0 rgba(47, 224, 212, .22), 0.012em 0 0 rgba(255, 95, 162, .18); }

/* ---------- type ---------- */

h1, h2, h3, h4 {
  font-family: var(--f-display); color: var(--ink);
  line-height: 1.2; text-wrap: balance; margin: 0 0 .5em;
}
h1 {
  font-size: clamp(1.95rem, 1.3rem + 2.2vw, 2.85rem);
  font-weight: 600; letter-spacing: -0.045em; line-height: 1.08;
}
h2 {
  font-size: clamp(1.3rem, 1.12rem + .6vw, 1.55rem);
  font-weight: 600; letter-spacing: -0.028em; margin-top: 3em; padding-top: .2em;
}
h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.016em; margin-top: 2.2em; }
h4 { font-size: .9375rem; font-weight: 600; color: var(--ink-2); margin-top: 1.8em; }
h2 + h3, h3 + h4 { margin-top: 1.3em; }

p { margin: 0 0 1.1em; max-width: var(--measure); color: var(--ink-2); }
main li { max-width: calc(var(--measure) - 1.6rem); color: var(--ink-2); margin-bottom: .35em; }
main ol, main ul { padding-left: 1.3rem; }

strong { font-weight: 600; color: var(--ink); }

/* Links are ink with a hairline underline; the spectrum arrives on hover. The
   identity shows up once, at the moment of intent. */
a { color: var(--ink); text-decoration: none; }
main p > a, main li > a, .qa a, .note a, .submitbox a, td a, .foot-legal a, dd a {
  background-image: linear-gradient(var(--rule-3), var(--rule-3));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  padding-bottom: .09em;
  transition: background-size .18s ease, background-image .18s ease;
}
main p > a:hover, main li > a:hover, .qa a:hover, .note a:hover,
.submitbox a:hover, td a:hover, .foot-legal a:hover, dd a:hover {
  background-image: var(--spectral-line);
  background-size: 100% 2px;
}

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

code, kbd, samp { font-family: var(--f-mono); font-size: .86em; }
:not(pre) > code {
  background: var(--ground-2); border: 1px solid var(--rule);
  border-radius: 4px; padding: .1em .32em; color: var(--ink); word-break: break-word;
}

.eyebrow {
  font-family: var(--f-mono); font-size: .6875rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4);
  margin: 0 0 .85rem;
}

.lede {
  font-size: 1.0625rem; line-height: 1.58; color: var(--ink-2);
  max-width: 60ch; letter-spacing: -0.011em;
}

/* The answer block: first thing read, and the thing an answer engine lifts. */
.answer {
  position: relative;
  margin: 0 0 2.2rem;
  padding: 1.1rem 1.25rem 1.1rem 1.45rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  max-width: var(--measure);
  overflow: hidden;
  box-shadow: var(--sh-1);
}
.answer::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--spectral-line);
}
.answer > :last-child { margin-bottom: 0; }
.answer p { font-size: .96rem; color: var(--ink-2); }
.answer strong { color: var(--ink); }

/* ---------- shell ---------- */

.masthead {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.masthead.scrolled { border-bottom-color: var(--rule); }
.masthead-in {
  max-width: 88rem; margin: 0 auto; padding: .7rem 1.5rem;
  display: flex; align-items: center; gap: 1.25rem;
}

.wordmark {
  display: inline-flex; align-items: baseline;
  font-family: var(--f-mono); font-weight: 500; font-size: .875rem;
  letter-spacing: -.02em; color: var(--ink); text-decoration: none;
}
.wordmark .tld { color: var(--ink-4); }

.mast-nav { display: flex; gap: .15rem; margin-left: auto; align-items: center; }
.mast-nav a {
  font-size: .8125rem; color: var(--ink-3); text-decoration: none;
  padding: .35rem .55rem; border-radius: var(--r-sm);
  transition: color .15s, background-color .15s;
}
.mast-nav a:hover { color: var(--ink); background: var(--ground-2); }
.mast-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }

.layout {
  max-width: 88rem; margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr);
  gap: 3rem; align-items: start;
}
.layout.with-toc { grid-template-columns: var(--nav-w) minmax(0, 1fr) var(--toc-w); }
.layout.wide { grid-template-columns: minmax(0, 1fr); }

.sidenav {
  position: sticky; top: 4.2rem;
  max-height: calc(100vh - 5.5rem); overflow-y: auto;
  padding: 2rem 0 3rem; font-size: .84rem; scrollbar-width: thin;
}
.sidenav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sidenav a {
  display: block; padding: .32rem .7rem;
  color: var(--ink-3); text-decoration: none;
  border-left: 1px solid var(--rule);
  transition: color .14s, border-color .14s;
}
.sidenav a:hover { color: var(--ink); border-left-color: var(--rule-3); }
.sidenav a[aria-current="page"] {
  color: var(--ink); font-weight: 500;
  border-left-color: transparent;
  background-image: var(--spectral-line);
  background-size: 1px 100%;
  background-repeat: no-repeat;
  background-position: 0 0;
}

.navgroup { margin: 0; }
.navgroup > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--f-mono); font-size: .625rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4);
  padding: .4rem .7rem .35rem; margin: 1.5rem 0 .3rem;
  transition: color .15s;
}
.navgroup:first-child > summary { margin-top: 0; }
.navgroup > summary::-webkit-details-marker { display: none; }
.navgroup > summary::marker { content: ""; }
.navgroup > summary:hover { color: var(--ink-2); }
.ng-label { flex: 1 1 auto; }
.ng-chev {
  width: .4rem; height: .4rem; flex: none;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform .22s cubic-bezier(.4, .01, .2, 1);
  opacity: .6;
}
.navgroup[open] > summary .ng-chev { transform: rotate(-135deg) translate(-1px, -1px); }

main { padding: 2.6rem 0 6rem; min-width: 0; }

.toc {
  position: sticky; top: 4.2rem;
  max-height: calc(100vh - 5.5rem); overflow-y: auto;
  padding: 3.1rem 0 2rem; font-size: .78rem; scrollbar-width: thin;
}
.toc h5 {
  font-family: var(--f-mono); font-size: .625rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4);
  margin: 0 0 .6rem; padding-left: .7rem;
}
.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.toc a {
  display: block; padding: .25rem .7rem;
  color: var(--ink-4); text-decoration: none; line-height: 1.45;
  border-left: 1px solid var(--rule);
  transition: color .14s, border-color .14s;
}
.toc a:hover { color: var(--ink-2); border-left-color: var(--rule-3); }
.toc a.lvl3 { padding-left: 1.4rem; }

/* ---------- hero ---------- */

.hero { padding: 3.5rem 0 2rem; }
.hero h1 { max-width: 17ch; }
.hero .lede { font-size: 1.125rem; max-width: 56ch; }
.prism { width: 100%; aspect-ratio: 16 / 7; border-radius: var(--r); display: block; background: var(--ground-2); }
.hero-media { border: 1px solid var(--rule); border-radius: 10px; }

/* ---------- components ---------- */

.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--f-mono); font-size: .6875rem; font-weight: 500;
  padding: .12rem .45rem; border-radius: 4px;
  background: var(--ground-2); border: 1px solid var(--rule);
  color: var(--ink-3); white-space: nowrap;
}
.pill.ok   { background: var(--ok-bg);   border-color: var(--ok-edge);   color: var(--ok); }
.pill.warn { background: var(--warn-bg); border-color: var(--warn-edge); color: var(--warn); }
.pill.bad  { background: var(--bad-bg);  border-color: var(--bad-edge);  color: var(--bad); }
.pill .dot { width: .35rem; height: .35rem; border-radius: 999px; background: currentColor; flex: none; }

.specbar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 1.6rem; }

.grid { display: grid; gap: .75rem; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem;
}
.card h3 { margin: 0; font-size: .9375rem; letter-spacing: -.01em; }
.card p { margin: 0; font-size: .86rem; color: var(--ink-3); max-width: none; line-height: 1.55; }
a.card { text-decoration: none; color: inherit; transition: border-color .16s; }
a.card:hover { border-color: var(--rule-3); }
a.card::after {
  content: "\2192"; font-family: var(--f-mono); font-size: .8rem; color: var(--ink-4);
  margin-top: .15rem; align-self: flex-start;
  transition: transform .16s, color .16s;
}
a.card:hover::after { transform: translateX(2px); color: var(--ink-2); }

.stat {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r);
  padding: .85rem .95rem .8rem; position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: var(--spectral-line); opacity: .55;
}
.stat .n {
  font-family: var(--f-display); font-weight: 600; font-size: 1.5rem;
  line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: tabular-nums;
  display: block; color: var(--ink);
}
.stat .k { font-size: .75rem; color: var(--ink-4); display: block; margin-top: .15rem; }

pre {
  background: var(--ground-2); border: 1px solid var(--rule); border-radius: var(--r);
  padding: .9rem 1rem; overflow-x: auto; font-size: .8125rem; line-height: 1.6;
  margin: 0 0 1.3rem; color: var(--ink-2);
}
pre code { font-size: inherit; background: none; border: 0; padding: 0; color: inherit; }
.codehead {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--ground-2); border: 1px solid var(--rule); border-bottom: 0;
  border-radius: var(--r) var(--r) 0 0; padding: .4rem .8rem;
  font-family: var(--f-mono); font-size: .6875rem; color: var(--ink-4);
}
.codehead + pre { border-radius: 0 0 var(--r) var(--r); margin-top: 0; }
.codehead span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tok-k { color: var(--sp-3); } .tok-s { color: var(--ok); }
.tok-n { color: var(--sp-4); } .tok-c { color: var(--ink-4); font-style: italic; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tok-k { color: #b3a4ff; }
  :root:not([data-theme="light"]) .tok-s { color: #6ee7a5; }
}
:root[data-theme="dark"] .tok-k { color: #b3a4ff; }
:root[data-theme="dark"] .tok-s { color: #6ee7a5; }
pre::-webkit-scrollbar { height: 6px; }
pre::-webkit-scrollbar-thumb { background: var(--rule-2); border-radius: 6px; }
pre::-webkit-scrollbar-track { background: transparent; }

.tablewrap {
  overflow-x: auto; margin: 0 0 1.5rem;
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--paper); position: relative;
}
table { border-collapse: collapse; width: 100%; font-size: .84rem; }
th, td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th {
  font-family: var(--f-mono); font-size: .625rem; font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-4);
  background: var(--ground-2); white-space: nowrap;
}
td { color: var(--ink-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .12s; }
tbody tr:hover { background: var(--ground-2); }
td.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; color: var(--ink); }
.tablewrap::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 2rem;
  pointer-events: none; opacity: 0; transition: opacity .2s;
  background: linear-gradient(90deg, transparent, var(--paper));
}
.tablewrap.scrolls::after { opacity: 1; }

.note {
  border: 1px solid var(--rule); border-left: 2px solid var(--rule-3);
  background: var(--paper); border-radius: 0 var(--r) var(--r) 0;
  padding: .8rem 1rem; margin: 0 0 1.4rem;
  max-width: var(--measure); font-size: .9rem;
}
.note.warn { border-left-color: var(--warn); background: var(--warn-bg); border-color: var(--warn-edge); }
.note.bad  { border-left-color: var(--bad);  background: var(--bad-bg);  border-color: var(--bad-edge); }
.note > :last-child { margin-bottom: 0; }
.note p { color: var(--ink-2); }
.note strong:first-child { color: var(--ink); font-weight: 600; }

.qa { border-top: 1px solid var(--rule); max-width: var(--measure); }
.qa details { border-bottom: 1px solid var(--rule); }
.qa summary {
  cursor: pointer; padding: .85rem 2rem .85rem 0;
  font-family: var(--f-display); font-weight: 500; font-size: .9375rem;
  line-height: 1.45; letter-spacing: -.012em; position: relative; list-style: none;
  color: var(--ink);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; position: absolute; right: .45rem; top: 1.15rem;
  width: .4rem; height: .4rem;
  border-right: 1.5px solid var(--ink-4); border-bottom: 1.5px solid var(--ink-4);
  transform: rotate(45deg); transition: transform .2s, border-color .2s;
}
.qa details[open] summary::after { transform: rotate(-135deg); border-color: var(--ink-2); }
.qa summary:hover::after { border-color: var(--ink-2); }
.qa .a { padding: 0 2rem 1.1rem 0; color: var(--ink-2); font-size: .9rem; }
.qa .a > :last-child { margin-bottom: 0; }

.terms { display: flex; flex-direction: column; margin: 0; }
.terms .term { border-bottom: 1px solid var(--rule); padding: 1rem 0; scroll-margin-top: 5.5rem; }
.terms dt { font-family: var(--f-display); font-weight: 600; font-size: .9375rem; margin: 0 0 .3rem; letter-spacing: -.012em; }
.terms dd { margin: 0; color: var(--ink-2); font-size: .9rem; max-width: var(--measure); }
.terms .alsocalled { font-family: var(--f-mono); font-size: .6875rem; color: var(--ink-4); }
.terms .term:target { background: var(--ground-2); box-shadow: -1rem 0 0 var(--ground-2), 1rem 0 0 var(--ground-2); }

.submitbox { padding: 1.1rem 1.2rem; margin: 1.7rem 0; max-width: var(--measure); }
.submitbox .sb-k {
  font-family: var(--f-mono); font-size: .625rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-4); margin: 0 0 .55rem;
}
.submitbox .sb-lead { margin: 0 0 .9rem; font-size: .9rem; color: var(--ink-2); }
.submitbox pre { margin-bottom: .9rem; }
.submitbox .sb-note { font-size: .8125rem; color: var(--ink-3); margin: 0 0 .5rem; line-height: 1.55; }
.submitbox .sb-note:last-child { margin-bottom: 0; }
.submitbox .sb-note strong { color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--f-body); font-weight: 500; font-size: .85rem;
  padding: .45rem .9rem; border-radius: var(--r-sm);
  background: var(--accent); color: var(--accent-ink);
  text-decoration: none; border: 1px solid var(--accent); cursor: pointer;
  transition: opacity .15s, border-color .15s, background-color .15s;
}
.btn:hover { opacity: .88; }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--rule-2); }
.btn.ghost:hover { opacity: 1; border-color: var(--rule-3); background: var(--ground-2); }
.btnrow { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.6rem 0 0; }

.foot { border-top: 1px solid var(--rule); background: var(--paper); margin-top: 4rem; }
.foot-in {
  max-width: 88rem; margin: 0 auto; padding: 2.6rem 1.5rem 2rem;
  display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  font-size: .84rem;
}
.foot h5 {
  font-family: var(--f-mono); font-size: .625rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-4); margin: 0 0 .7rem;
}
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.foot a { color: var(--ink-3); text-decoration: none; transition: color .15s; }
.foot a:hover { color: var(--ink); }
.foot-legal { max-width: 88rem; margin: 0 auto; padding: 0 1.5rem 3rem; color: var(--ink-4); font-size: .775rem; }
.foot-legal p { max-width: 78ch; color: var(--ink-4); line-height: 1.6; }

.updated {
  font-family: var(--f-mono); font-size: .6875rem; color: var(--ink-4);
  margin: 3.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--rule);
  max-width: var(--measure);
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: .6rem; top: .6rem; z-index: 100; background: var(--paper);
  padding: .5rem .8rem; border-radius: var(--r-sm); border: 1px solid var(--rule-2);
}

/* ---------- mobile drawer ---------- */

.menu-btn { display: none; }
.drawer-toc { display: none; }

.scrim {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(9, 9, 11, .32);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .22s ease;
}
.drawer-open .scrim { opacity: 1; }
.drawer-open .masthead { z-index: 95; }

@media (max-width: 68rem) {
  .layout.with-toc { grid-template-columns: var(--nav-w) minmax(0, 1fr); }
  .toc { display: none; }
}

@media (max-width: 54rem) {
  .layout, .layout.with-toc, .layout.wide { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .layout { padding: 0 1.15rem; }

  .mast-nav { display: none; }
  .masthead-in { padding: .55rem .9rem .55rem 1.15rem; gap: .6rem; }
  .masthead { border-bottom-color: var(--rule); }

  .menu-btn {
    display: inline-flex; align-items: center; gap: .45rem; margin-left: auto;
    min-height: 40px; padding: .35rem .65rem;
    background: transparent; color: var(--ink);
    border: 1px solid var(--rule-2); border-radius: var(--r-sm);
    font-family: var(--f-mono); font-size: .6875rem; font-weight: 500;
    letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  }
  .menu-btn .bars { display: grid; gap: 3.5px; width: 13px; }
  .menu-btn .bars i {
    display: block; height: 1.5px; width: 100%; border-radius: 2px; background: var(--ink);
    transition: transform .26s cubic-bezier(.4, .01, .2, 1), opacity .16s;
    transform-origin: center;
  }
  .drawer-open .menu-btn .bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .drawer-open .menu-btn .bars i:nth-child(2) { opacity: 0; }
  .drawer-open .menu-btn .bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

  .drawer {
    position: fixed; z-index: 90; top: 0; right: 0; bottom: 0;
    width: min(19.5rem, 84vw);
    background: var(--paper); border-left: 1px solid var(--rule);
    box-shadow: -20px 0 60px -30px rgba(9, 9, 11, .5);
    padding: 4.4rem 1.25rem 2.5rem;
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    transform: translateX(101%);
    transition: transform .3s cubic-bezier(.32, .72, 0, 1);
    visibility: hidden;
  }
  .drawer-open .drawer { transform: none; visibility: visible; }
  .drawer-open, .drawer-open body { overflow: hidden; }

  .sidenav { position: static; max-height: none; padding: 0; font-size: .9rem; }
  .sidenav ul { padding: .1rem 0 .4rem; }
  .sidenav a { padding: .5rem .8rem; min-height: 40px; display: flex; align-items: center; }
  .sidenav a[aria-current="page"] { background-size: 2px 100%; }

  .navgroup { border-bottom: 1px solid var(--rule); }
  .navgroup:last-child { border-bottom: 0; }
  .navgroup > summary {
    margin: 0; padding: .9rem .3rem; min-height: 46px;
    font-size: .65rem; color: var(--ink-3);
  }
  .navgroup[open] > summary { color: var(--ink); }
  .ng-chev { width: .45rem; height: .45rem; }

  .drawer-toc { display: block; margin-top: 1.7rem; padding-top: 1.3rem; border-top: 1px solid var(--rule); }
  .drawer-toc h5 {
    font-family: var(--f-mono); font-size: .625rem; letter-spacing: .1em;
    text-transform: uppercase; color: var(--ink-4); margin: 0 0 .5rem; font-weight: 500;
  }
  .drawer-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .drawer-toc a {
    display: block; padding: .45rem .8rem; color: var(--ink-3); text-decoration: none;
    font-size: .85rem; line-height: 1.45; border-left: 1px solid var(--rule);
  }
  .drawer-toc a.lvl3 { padding-left: 1.5rem; }

  main { padding: 1.8rem 0 4rem; }
  .hero { padding: 1.6rem 0 1rem; }
  h1 { font-size: clamp(1.7rem, 1.2rem + 2.6vw, 2.05rem); }
  h2 { margin-top: 2.4em; }
  .lede, .hero .lede { font-size: 1rem; }
  .answer { padding: .95rem 1rem .95rem 1.15rem; }
  .grid.c2, .grid.c3 { grid-template-columns: minmax(0, 1fr); }
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  pre { font-size: .765rem; }
  table { font-size: .8rem; }
  th, td { padding: .5rem .6rem; }
  .btnrow .btn { min-height: 40px; flex: 1 1 auto; justify-content: center; }
  .foot-in { padding: 2rem 0 1.6rem; gap: 1.5rem; }
  .foot-legal { padding: 0 0 2.2rem; }
}

@media (max-width: 26rem) {
  .menu-btn .menu-word { display: none; }
  .grid.c4 { grid-template-columns: minmax(0, 1fr); }
  .layout { padding: 0 .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  .drawer, .scrim, .menu-btn .bars i { transition: none; }
  .hero-media { display: none; }
  .wash:has(> .hero-media) {
    background-image: url("/media/prism-poster.jpg");
    background-size: cover; background-position: center;
    border: 1px solid var(--rule); border-radius: 10px; aspect-ratio: 16 / 9;
  }
}
