/* ==========================================================================
   Parallel Machines / components.css
   Every component reads the semantic surface variables from tokens.css
   (--fg, --fg-2, --fg-3, --line, --line-strong, --accent, --focus, --btn-*),
   so the same markup works on paper and on blue.
   Index:
     01 icons            08 KPI tiles            15 data table
     02 dot motifs       09 figure frame         16 footnotes
     03 header / nav     10 specimen card        17 pull quote, drop cap
     04 mobile sheet     11 issue card           18 data note
     05 footer           12 drawer               19 form controls
     06 buttons, links   13 tooltip              20 scattered title, dot text
     07 tags, chips      14 segmented control    21 misc (live chip, plate, kbd hints)
   ========================================================================== */

/* ---------- 01 icons: <i class="i i-arrow" aria-hidden="true"></i> ----------
   Drawn as CSS masks, so they take currentColor and need no font glyphs
   (the latin font subsets have no arrows). */
.i {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  vertical-align: -.14em;
  background-color: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
  font-style: normal;
}
.i-arrow { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 8h12M9 3.5 13.5 8 9 12.5' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); }
.i-arrow-left { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M14.5 8h-12M7 3.5 2.5 8 7 12.5' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); }
.i-arrow-ne { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 12.5 12 4M5 3.75h7.25V11' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); }
.i-arrow-down { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5v12M3.5 9 8 13.5 12.5 9' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); }
.i-arrow-up { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 14.5v-12M3.5 7 8 2.5 12.5 7' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); }
.i-search { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='4.75' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='M10.5 10.5 14.25 14.25' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); }
.i-close { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3 3 13' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); }
.i-menu { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5.25h13M1.5 10.75h13' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); }
.i-plus { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2.5v11M2.5 8h11' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); }
.i-minus { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8h11' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); }
.i-check { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5 6 12l7.5-8' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); }
.i-chevron { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6 8 10.5 12.5 6' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); }
.i-download { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5v9M4 6.75 8 10.75l4-4M2 14h12' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E"); }
.i-info { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.25' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='M8 7v4.5' stroke='%23000' stroke-width='1.5'/%3E%3Crect x='7.25' y='4' width='1.5' height='1.5'/%3E%3C/svg%3E"); }
.i-square { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='4' y='4' width='8' height='8'/%3E%3C/svg%3E"); }
.i-dots { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 2h3v3H2zM6.5 2h3v3h-3zM11 2h3v3h-3zM2 6.5h3v3H2zM11 6.5h3v3h-3zM2 11h3v3H2zM6.5 11h3v3h-3zM11 11h3v3h-3z'/%3E%3C/svg%3E"); }

/* ---------- 02 dot motifs (dots = the twin / the record) ---------- */
/* a dotted rule of square dots */
.rule-dots {
  display: block;
  height: var(--dot);
  border: 0;
  background-image: repeating-linear-gradient(90deg, var(--dot-color) 0 var(--dot), transparent var(--dot) calc(var(--dot) + var(--dot-gap)));
  background-repeat: repeat-x;
  opacity: .9;
}
.rule-dots--faint { opacity: .45; }
/* a field of square dots (decor): set size with width/height, cell with --dot-cell */
.dotfield {
  background-color: var(--dot-color);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3'%3E%3Crect width='1' height='1'/%3E%3C/svg%3E") 0 0 / var(--dot-cell) var(--dot-cell) repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3'%3E%3Crect width='1' height='1'/%3E%3C/svg%3E") 0 0 / var(--dot-cell) var(--dot-cell) repeat;
  pointer-events: none;
}
/* dotted box border (the record): add to any box with a hairline */
.border-dots {
  border-color: transparent !important;
  background-image:
    repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(180deg, var(--line-strong) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(180deg, var(--line-strong) 0 1px, transparent 1px 3px);
  background-size: 100% 1px, 100% 1px, 1px 100%, 1px 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: no-repeat;
}

/* ---------- 03 header / nav ----------
   <header class="site-header" data-site-header data-theme="sky|paper">
   Transparent over the first section; .is-moved (sky theme, page scrolled) = blue glass, so white text
   stays legible over copy scrolling beneath; .is-scrolled = solid paper + hairline. */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  height: var(--header-h);
  color: var(--fg);
  background-color: transparent;
  border-bottom: var(--hair) solid transparent;
  transition:
    background-color var(--dur-1) var(--ease),
    border-color var(--dur-1) var(--ease),
    color var(--dur-1) var(--ease),
    transform var(--dur-2) var(--ease);
}
.site-header[data-theme="sky"]:not(.is-scrolled),
.site-header.menu-open {
  --fg: var(--white); --fg-2: rgba(255,255,255,.9); --fg-3: rgba(255,255,255,.75);
  --line: var(--line-on-blue); --line-strong: var(--line-on-blue-strong);
  --focus: var(--white); --accent: var(--white); --well: rgba(255,255,255,.08);
  --btn-bg: var(--white); --btn-fg: var(--ink); --btn-bg-hover: var(--mist); --btn-fg-hover: var(--ink);
  --selection-bg: var(--white); --selection-fg: var(--ink);
}
.site-header.is-scrolled:not(.menu-open) {
  background-color: rgba(245,247,255,.9);
  border-bottom-color: var(--line-on-paper);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  backdrop-filter: saturate(1.3) blur(12px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.is-scrolled:not(.menu-open) { background-color: var(--paper); }
}
.site-header[data-theme="sky"].is-moved:not(.is-scrolled):not(.menu-open) {
  background-color: rgba(11,58,156,.72);
  background-color: color-mix(in srgb, var(--deep) 72%, transparent);
  border-bottom-color: var(--line-on-blue);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  backdrop-filter: saturate(1.2) blur(14px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header[data-theme="sky"].is-moved:not(.is-scrolled):not(.menu-open) { background-color: var(--deep); }
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: 100%;
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  height: 40px;
  color: var(--fg);
  border-radius: var(--r-1);
}
.wordmark { display: block; height: 22px; width: auto; overflow: visible; }
.wordmark .wm-twin { transition: transform var(--dur-2) var(--ease); }
.site-header__brand:hover .wm-twin,
.site-footer__brand:hover .wm-twin { transform: translate(1.5px, -1.5px); }

.site-nav { display: flex; align-items: center; gap: clamp(20px, 2.4vw, 36px); }
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 32px);
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--fg);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-2) var(--ease);
}
.site-nav__link:hover::after { transform: scaleX(1); }
.site-nav__link[aria-current]::after { transform: scaleX(1); }
.site-nav__link[aria-current]::before {
  /* the solid square: "you are here" */
  content: "";
  width: 5px; height: 5px;
  background: currentColor;
  flex: none;
}
.site-nav__index { display: none; }
.site-nav__cta { margin-left: 4px; }
.site-header__toggle {
  display: none;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 4px 0 12px;
  margin-right: -4px;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  border-radius: var(--r-1);
}
.site-header__toggle .i { width: 18px; height: 18px; }
.site-header__toggle .toggle-close { display: none; }
.site-header.menu-open .site-header__toggle .toggle-open { display: none; }
.site-header.menu-open .site-header__toggle .toggle-close { display: inline-block; }

/* ---------- 04 mobile sheet (< 900 px): the same <nav> becomes a full-screen sheet ---------- */
.site-nav__sheet-foot { display: none; }
@media (max-width: 899.98px) {
  .site-header__toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: var(--space-7);
    padding: calc(var(--header-h) + var(--space-6)) var(--page-margin) calc(var(--space-6) + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    color: var(--white);
    background-color: var(--ink);
    background-image: var(--deep-surface);
    visibility: hidden;
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transition:
      clip-path var(--dur-2) var(--ease),
      opacity var(--dur-1) var(--ease),
      visibility 0s linear var(--dur-2);
  }
  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transition: clip-path var(--dur-2) var(--ease), opacity var(--dur-1) var(--ease);
  }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav__list > li { border-bottom: var(--hair) solid var(--line-on-blue); }
  .site-nav__list > li:first-child { border-top: var(--hair) solid var(--line-on-blue); }
  .site-nav__link {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 14px 0 12px;
    color: var(--white);
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 11vw, 3.5rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -.01em;
  }
  .site-nav__link::after { display: none; }
  .site-nav__link[aria-current]::before { display: none; }
  .site-nav__link[aria-current] .site-nav__index::after { content: " \00B7  here"; }
  .site-nav__index {
    display: inline-block;
    min-width: 2.5em;
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    font-weight: 500;
    letter-spacing: var(--tr-label);
    color: rgba(255,255,255,.66);
    transform: translateY(-.4em);
  }
  .site-nav__cta { margin: 0; align-self: flex-start; }
  .site-nav .site-nav__cta {
    --btn-bg: var(--white); --btn-fg: var(--ink); --line-strong: var(--line-on-blue-strong); --fg: var(--white); --well: rgba(255,255,255,.08);
  }
  .site-nav__sheet-foot {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    line-height: 1.6;
    letter-spacing: .04em;
    color: rgba(255,255,255,.66);
  }
  /* the mark above the tagline: the solid square (the machine) beside its 3x3 dot twin (the record), as in the closing band */
  .site-nav__mark { --mark: 28px; display: flex; align-items: flex-end; gap: calc(var(--mark) * .26); margin-bottom: 14px; }
  .site-nav__mark-solid, .site-nav__mark-twin { width: var(--mark); height: var(--mark); }
  .site-nav__mark-solid { background: var(--white); }
  .site-nav__mark-twin {
    --c: calc(var(--mark) / 4);
    background:
      linear-gradient(var(--white), var(--white)) 0 0 / var(--c) var(--c) no-repeat,
      linear-gradient(var(--white), var(--white)) 50% 0 / var(--c) var(--c) no-repeat,
      linear-gradient(var(--white), var(--white)) 100% 0 / var(--c) var(--c) no-repeat,
      linear-gradient(var(--white), var(--white)) 0 50% / var(--c) var(--c) no-repeat,
      linear-gradient(var(--white), var(--white)) 50% 50% / var(--c) var(--c) no-repeat,
      linear-gradient(var(--white), var(--white)) 100% 50% / var(--c) var(--c) no-repeat,
      linear-gradient(var(--white), var(--white)) 0 100% / var(--c) var(--c) no-repeat,
      linear-gradient(var(--white), var(--white)) 50% 100% / var(--c) var(--c) no-repeat,
      linear-gradient(var(--white), var(--white)) 100% 100% / var(--c) var(--c) no-repeat;
    opacity: .9;
    transform: translate(0, 0);
    transition: transform var(--dur-3) var(--ease) 120ms;
  }
  .site-nav:not(.is-open) .site-nav__mark-twin { transform: translate(-6px, 6px); }
  .site-nav__sheet-top { display: flex; flex-direction: column; gap: var(--space-7); }
  .site-nav { --focus: var(--white); }
  html.menu-is-open, html.menu-is-open body { overflow: hidden; }
  /* reveal the sheet links one by one */
  .site-nav .site-nav__list > li { opacity: 0; transform: translateY(10px); transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
  .site-nav.is-open .site-nav__list > li { opacity: 1; transform: none; }
  .site-nav.is-open .site-nav__list > li:nth-child(2) { transition-delay: 50ms; }
  .site-nav.is-open .site-nav__list > li:nth-child(3) { transition-delay: 100ms; }
  .site-nav.is-open .site-nav__list > li:nth-child(4) { transition-delay: 150ms; }
}
@media (min-width: 900px) {
  .site-nav__sheet-top { display: contents; }
}

/* ---------- 05 footer ---------- */
.site-footer {
  position: relative;
  isolation: isolate;
  padding: clamp(56px, 7vw, 96px) 0 calc(28px + env(safe-area-inset-bottom));
  background-color: var(--ink);
  background-image: var(--deep-surface);
  color: var(--fg);
}
.site-footer__top {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: var(--space-7);
}
.site-footer__intro { grid-column: 1 / -1; display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
.site-footer__brand { display: inline-flex; color: var(--fg); border-radius: var(--r-1); }
.site-footer__brand .wordmark { height: 30px; }
.site-footer__blurb { max-width: 34ch; color: var(--fg-2); font-size: .9375rem; line-height: 1.55; }
.site-footer__nav {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6) var(--gutter);
}
.site-footer__h {
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg-3);
}
.site-footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  font-size: .9375rem;
  color: var(--fg);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 calc(100% - 4px);
  background-repeat: no-repeat;
  transition: background-size var(--dur-2) var(--ease);
}
.site-footer__links a:hover { background-size: 100% 1px; }
.site-footer__links a[aria-current] { background-size: 100% 1px; }
.site-footer__links .i { width: .8em; height: .8em; opacity: .8; }
.site-footer__rule { margin: clamp(40px, 6vw, 72px) 0 var(--space-4); }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--fg-3);
}
.site-footer__note,
.site-footer__disclaimer { color: var(--fg-2); max-width: 80ch; }
.site-footer__meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
@media (min-width: 768px) {
  .site-footer__nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .site-footer__intro { grid-column: 1 / span 4; }
  .site-footer__nav { grid-column: 6 / -1; }
}

/* ---------- 06 buttons and links ----------
   .btn.btn--primary  solid; hover: its dotted twin steps out behind it
   .btn.btn--ghost    hairline outline
   .link-arrow        text link with an arrow; underline draws in */
.btn {
  --btn-h: 46px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--btn-h);
  padding: 0 18px;
  border: var(--hair) solid transparent;
  border-radius: var(--r-1);
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.005em;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--dur-1) var(--ease),
    color var(--dur-1) var(--ease),
    border-color var(--dur-1) var(--ease),
    transform var(--dur-1) var(--ease);
}
.btn .i { width: 15px; height: 15px; transition: transform var(--dur-1) var(--ease); }
.btn:hover .i-arrow { transform: translateX(3px); }
.btn:hover .i-arrow-ne { transform: translate(2px, -2px); }
.btn:hover .i-arrow-down { transform: translateY(2px); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.btn--primary { background-color: var(--btn-bg); color: var(--btn-fg); }
.btn--primary:hover { background-color: var(--btn-bg-hover); color: var(--btn-fg-hover); }
/* the dotted twin */
.btn--primary::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background-color: var(--btn-bg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1'/%3E%3C/svg%3E") 0 0 / 4px 4px repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1'/%3E%3C/svg%3E") 0 0 / 4px 4px repeat;
  opacity: 0;
  transform: translate(0, 0);
  transition: transform var(--dur-2) var(--ease), opacity var(--dur-1) var(--ease);
  pointer-events: none;
}
.btn--primary:hover::before, .btn--primary:focus-visible::before { opacity: .9; transform: translate(var(--twin-step), calc(-1 * var(--twin-step))); }

.btn--ghost {
  background-color: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--fg); background-color: var(--well); }
.btn--quiet { background: transparent; color: var(--fg); padding-inline: 10px; }
.btn--quiet:hover { background-color: var(--well); }

.btn--sm { --btn-h: 36px; padding: 0 13px; font-size: .875rem; gap: 8px; }
.btn--sm .i { width: 13px; height: 13px; }
.btn--lg { --btn-h: 56px; padding: 0 24px; font-size: 1.0625rem; }
.btn--icon { width: var(--btn-h); padding: 0; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 4px 0;
  font-weight: 500;
  color: var(--fg);
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--line-strong), var(--line-strong));
  background-size: 0% 1px, 100% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--dur-2) var(--ease), color var(--dur-1) var(--ease);
}
.link-arrow .i { width: .95em; height: .95em; transition: transform var(--dur-1) var(--ease); }
.link-arrow:hover { background-size: 100% 1px, 100% 1px; }
.link-arrow:hover .i-arrow { transform: translateX(4px); }
.link-arrow:hover .i-arrow-ne { transform: translate(2px, -2px); }
.link-arrow--mono {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
}
/* stretch a card's main link over the whole card */
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-1); }
.above-card-link { position: relative; z-index: 2; }

/* ---------- 07 tags, chips, status ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;      /* never stretched by a column flex/grid parent */
  height: 24px;
  padding: 0 8px;
  border: var(--hair) solid var(--line-strong);
  border-radius: var(--r-1);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  line-height: 1;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tag--solid { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.tag--plain { border-color: transparent; padding: 0; height: auto; }
.tag--lg { height: 30px; padding: 0 11px; font-size: var(--fs-label); }
/* LIVE: solid border + a square that blinks; SNAPSHOT: dotted border + a hollow square */
.tag--live::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--live-dot);
  animation: live-blink 2.4s steps(1, end) infinite;
}
.tag--snapshot {
  border-color: transparent;
  background-image:
    repeating-linear-gradient(90deg, var(--fg) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, var(--fg) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(180deg, var(--fg) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(180deg, var(--fg) 0 1px, transparent 1px 3px);
  background-size: 100% 1px, 100% 1px, 1px 100%, 1px 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: no-repeat;
}
.tag--snapshot::before { content: ""; width: 6px; height: 6px; box-shadow: inset 0 0 0 1px currentColor; }
.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* status by shape, never by colour: live = filled square, building = half, announced = outline */
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .04em;
  color: var(--fg-2);
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 8px; height: 8px;
  flex: none;
  box-shadow: inset 0 0 0 1px currentColor;
}
.status[data-status="live"]::before { background: currentColor; }
.status[data-status="building"]::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.status[data-status="announced"]::before {
  box-shadow: none;
  background-image:
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 2px),
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 2px),
    repeating-linear-gradient(180deg, currentColor 0 1px, transparent 1px 2px),
    repeating-linear-gradient(180deg, currentColor 0 1px, transparent 1px 2px);
  background-size: 100% 1px, 100% 1px, 1px 100%, 1px 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: no-repeat;
}
.status[data-status="offline"]::before { background: none; box-shadow: inset 0 0 0 1px currentColor; transform: rotate(45deg) scale(.8); }

/* filter chips: <button class="chip" aria-pressed="false">Mobility <span class="chip__count">4</span></button> */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 11px 0 10px;
  border: var(--hair) solid var(--line-strong);
  border-radius: var(--r-1);
  background: transparent;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.chip::before {
  content: "";
  width: 7px; height: 7px;
  flex: none;
  box-shadow: inset 0 0 0 1px currentColor;
  transition: background-color var(--dur-1) var(--ease);
}
.chip:hover { border-color: var(--fg); background-color: var(--well); }
.chip[aria-pressed="true"], .chip.is-active {
  background-color: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-fg);
}
.chip[aria-pressed="true"]::before, .chip.is-active::before { background-color: currentColor; }
.chip__count { opacity: .62; font-variant-numeric: tabular-nums; }
.chip--plain::before { display: none; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- 08 KPI tiles ----------
   <div class="kpi-strip"> <article class="kpi"> ... </article> x4 </div> */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(var(--kpi-cols, 4), minmax(0, 1fr));
  border-top: var(--hair) solid var(--line-strong);
  border-bottom: var(--hair) solid var(--line);
}
.kpi-strip > .kpi { border-left: var(--hair) solid var(--line); }
.kpi-strip > .kpi:first-child { border-left: 0; padding-left: 0; }
@media (max-width: 1023.98px) {
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-strip > .kpi:nth-child(odd) { border-left: 0; padding-left: 0; }
  .kpi-strip > .kpi:nth-child(n+3) { border-top: var(--hair) solid var(--line); }
}
@media (max-width: 479.98px) {
  .kpi-strip { grid-template-columns: 1fr; }
  .kpi-strip > .kpi { border-left: 0; padding-left: 0; }
  .kpi-strip > .kpi + .kpi { border-top: var(--hair) solid var(--line); }
}
.kpi {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  min-width: 0;
  padding: 18px 20px 16px;
  color: var(--fg);
}
.kpi--boxed { border: var(--hair) solid var(--line); border-radius: var(--r-1); background: var(--card-bg); }
.kpi p + p { margin-top: 0; }   /* base.css spaces prose paragraphs; a tile's <p> rows sit on its own grid gap */
.kpi__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg-2);
}
.kpi__value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 .3em;
  min-width: 0;
}
.kpi__num {
  font-family: var(--font-dots);
  font-size: var(--fs-num);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kpi__num--serif { font-family: var(--font-serif); font-weight: 400; letter-spacing: -.01em; }
.kpi__unit {
  font-family: var(--font-mono);
  font-size: .875rem;
  color: var(--fg-2);
  letter-spacing: .02em;
}
.kpi__spark { position: relative; height: 44px; min-height: 32px; color: var(--fg); }
.kpi__spark > svg, .kpi__spark > canvas { width: 100%; height: 100%; overflow: visible; }
.kpi__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  padding-top: 10px;
  border-top: var(--hair) solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .03em;
  line-height: 1.5;
  color: var(--fg-3);
}
.kpi.is-loading .kpi__num { opacity: .35; }

/* source line with a status dot (live strip, figure footers) */
.source-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .02em;
  color: var(--fg-2);
}
.status-dot {
  width: 7px; height: 7px;
  flex: none;
  background: var(--live-dot);
}
.status-dot[data-state="live"] { animation: live-blink 2.4s steps(1, end) infinite; }
.status-dot[data-state="snapshot"] { background: none; box-shadow: inset 0 0 0 1px currentColor; }
.status-dot[data-state="connecting"] { animation: live-blink .8s steps(1, end) infinite; opacity: .7; }
.status-dot[data-state="offline"] { background: none; box-shadow: inset 0 0 0 1px currentColor; transform: rotate(45deg) scale(.8); }

/* ---------- 09 figure frame ----------
   <figure class="fig"> .fig__head (.fig__no + .fig__title) .fig__body .fig__cap .fig__foot (.legend + .fig__src) */
.fig {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* wide content (tables, long legend keys) never widens the figure */
  align-content: start;                    /* in a taller grid row the rows stay packed at the top */
  gap: 14px;
  min-width: 0;
  padding-top: 14px;
  border-top: var(--hair) solid var(--line-strong);
  color: var(--fg);
}
.fig__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.fig__no {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--fg-2);
  white-space: nowrap;
}
.fig__title {
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 1.7vw, 1.75rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.005em;
}
.fig__actions { margin-left: auto; display: flex; gap: 6px; }
.fig__body { position: relative; min-height: 120px; min-width: 0; }
.fig__body > svg { width: 100%; height: auto; overflow: visible; }
.fig__cap { max-width: 62ch; font-size: .9375rem; line-height: 1.5; color: var(--fg-2); }
.fig__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 10px;
  border-top: var(--hair) solid var(--line);
}
.fig__src {
  min-width: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  line-height: 1.5;
  letter-spacing: .03em;
  color: var(--fg-3);
  overflow-wrap: anywhere;   /* long method names and URLs wrap on phones */
}
.surface-sky .fig__src, .surface-deep .fig__src, .surface-ultra .fig__src, .on-blue .fig__src { color: var(--fg-2); }
.fig__src a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.fig__src a:hover { text-decoration-color: currentColor; }
.fig--boxed { padding: 18px 20px 16px; border: var(--hair) solid var(--line); border-radius: var(--r-1); background: var(--card-bg); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .03em;
  color: var(--fg-2);
}
/* a key stays on one line unless it is wider than its container (then the label wraps beside its swatch) */
.legend__item { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
/* swatches: solid = the machine / live; dots = the twin / the record */
.sw { display: inline-block; flex: none; width: 22px; height: 2px; background: currentColor; color: var(--fg); }
.sw--dots { background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 5px); }
.sw--bar { width: 10px; height: 10px; }
.sw--dotbar {
  width: 10px; height: 10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1'/%3E%3C/svg%3E") 0 0 / 4px 4px repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1'/%3E%3C/svg%3E") 0 0 / 4px 4px repeat;
}
.sw--outline { width: 10px; height: 10px; background: none; box-shadow: inset 0 0 0 1px currentColor; }
.sw--soft { opacity: .45; }

/* chart text defaults for SVG charts placed in a .fig */
.chart-axis { stroke: var(--line-strong); stroke-width: 1; shape-rendering: crispEdges; fill: none; }
.chart-grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; fill: none; }
.chart-tick { fill: var(--fg-3); font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em; }
.chart-line { fill: none; stroke: var(--fg); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.chart-twin { fill: var(--fg); }
.chart-area { fill: var(--fg); opacity: .08; }

/* ---------- 10 specimen card (atlas plate) ----------
   .specimen > .specimen__plate (img.specimen__solid + img.specimen__twin + .specimen__id) + .specimen__body */
.specimen {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: var(--hair) solid var(--line);
  border-radius: var(--r-1);
  background: var(--card-bg);
  color: var(--fg);
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-1) var(--ease);
}
.specimen:hover, .specimen:focus-within { transform: translateY(-2px); border-color: var(--line-strong); }
.specimen__plate {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-1) var(--r-1) 0 0;
  background: var(--sky);
  color: var(--white);
}
.specimen__plate > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.specimen__twin { transition: transform var(--dur-2) var(--ease); }
.specimen:hover .specimen__twin, .specimen:focus-within .specimen__twin { transform: translate(var(--twin-step-lg), calc(-1 * var(--twin-step-lg))); }
/* plate corner marks */
.specimen__plate::before, .specimen__plate::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 10px; height: 10px;
  border: 0 solid rgba(255,255,255,.75);
  pointer-events: none;
}
.specimen__plate::before { top: 8px; right: 8px; border-top-width: 1px; border-right-width: 1px; }
.specimen__plate::after { bottom: 8px; left: 8px; border-bottom-width: 1px; border-left-width: 1px; }
.specimen__id {
  position: absolute;
  z-index: 2;
  top: 10px; left: 10px;
  padding: 3px 6px 2px;
  border-radius: var(--r-1);
  background: rgba(5,10,42,.62);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: var(--tr-label);
  color: var(--white);
  text-transform: uppercase;
}
.specimen__body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 16px 18px 16px; }
.specimen__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.specimen__name {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.01em;
}
.specimen__line { font-size: .9375rem; line-height: 1.5; color: var(--fg-2); }
.specimen__facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  margin: 2px 0 0;
  font-size: .875rem;
}
.specimen__facts dt {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg-3);
  padding-top: 2px;
}
.specimen__facts dd { margin: 0; color: var(--fg); }
.specimen__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: auto;
  padding-top: 12px;
  border-top: var(--hair) solid var(--line);
}
.specimen__links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .04em;
  color: var(--fg);
}
.specimen__links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.specimen__links .i { width: 11px; height: 11px; }

/* ---------- 11 issue card ---------- */
.issue-card { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; color: var(--fg); }
.issue-card__cover {
  position: relative;
  isolation: isolate;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-1);
  background: var(--sky);
  color: var(--white);
}
.issue-card__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  transition: transform var(--dur-2) var(--ease);
}
/* its dotted twin waits behind the print and steps out up and to the right on hover (as the research rows) */
.issue-card__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--dot-color, var(--ink));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3'%3E%3Crect width='2' height='2'/%3E%3C/svg%3E") 0 0 / 5px 5px repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3'%3E%3Crect width='2' height='2'/%3E%3C/svg%3E") 0 0 / 5px 5px repeat;
  opacity: 0;
  transform: translate(0, 0);
  transition: transform var(--dur-2) var(--ease), opacity var(--dur-1) var(--ease);
  pointer-events: none;
}
.issue-card:hover .issue-card__cover::before,
.issue-card:focus-within .issue-card__cover::before { opacity: .55; transform: translate(var(--twin-step-lg), calc(-1 * var(--twin-step-lg))); }
.issue-card:hover .issue-card__cover img { transform: translateY(-2px); }
.issue-card__no {
  position: absolute;
  z-index: 2;
  top: 12px; left: 12px;
  padding: 4px 7px 3px;
  border-radius: var(--r-1);
  background: rgba(5,10,42,.62);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .06em;
}
.issue-card__kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg-3);
}
.issue-card__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 2.2vw, 2.25rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.issue-card__title a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 92%;
  background-repeat: no-repeat;
  transition: background-size var(--dur-2) var(--ease);
}
.issue-card:hover .issue-card__title a { background-size: 100% 1px; }
.issue-card__abstract { font-size: .9375rem; line-height: 1.55; color: var(--fg-2); }
.issue-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding-top: 10px;
  border-top: var(--hair) solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .04em;
  color: var(--fg-3);
}

/* ---------- 12 drawer ----------
   <div class="drawer-backdrop" data-drawer-backdrop></div>
   <aside class="drawer" role="dialog" aria-modal="true" aria-labelledby="..."> head / body / foot
   core/drawer.js handles open/close, focus trap, Esc. Bottom sheet under 768 px. */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-drawer) - 1);
  background: rgba(7,14,58,.42);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
  pointer-events: none;            /* while it fades out after a close, clicks reach the page (no swallowed first click) */
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity var(--dur-2) var(--ease); }
.drawer {
  --bg: var(--paper); --fg: var(--ink); --fg-2: var(--ink-2); --fg-3: var(--ink-3);
  --line: var(--line-on-paper); --line-strong: var(--line-on-paper-strong); --focus: var(--electric); --accent: var(--electric);
  --btn-bg: var(--ink); --btn-fg: var(--white); --btn-bg-hover: var(--electric); --btn-fg-hover: var(--white);
  --well: rgba(7,14,58,.035); --well-strong: rgba(7,14,58,.07); --card-bg: var(--white); --dot-color: var(--ink); --live-dot: var(--electric);
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  width: min(480px, 100%);
  background: var(--paper);
  color: var(--fg);
  box-shadow: var(--shadow-float);
  border-left: var(--hair) solid var(--line);
  transform: translateX(104%);
  visibility: hidden;
  transition: transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
  outline: none;
}
.drawer.is-open { transform: none; visibility: visible; transition: transform var(--dur-2) var(--ease); }
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 56px;
  padding: 10px 12px 10px 20px;
  border-bottom: var(--hair) solid var(--line);
}
.drawer__kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg-2);
}
.drawer__close { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-1); color: var(--fg); }
.drawer__close:hover { background: var(--well-strong); }
.drawer__close .i { width: 16px; height: 16px; }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 20px; }
.drawer__title { font-family: var(--font-serif); font-size: 2.25rem; line-height: 1; letter-spacing: -.01em; margin-bottom: 12px; }
.drawer__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: var(--hair) solid var(--line);
}
.drawer--static { position: relative; inset: auto; z-index: auto; transform: none; visibility: visible; width: 100%; max-width: 480px; height: auto; border: var(--hair) solid var(--line); }
@media (max-width: 767.98px) {
  .drawer:not(.drawer--static) {
    top: auto; left: 0;
    width: 100%;
    max-height: 88svh;
    border-left: 0;
    border-top: var(--hair) solid var(--line);
    border-radius: var(--r-3) var(--r-3) 0 0;
    transform: translateY(104%);
  }
  .drawer:not(.drawer--static).is-open { transform: none; }
  .drawer:not(.drawer--static) .drawer__head::before {
    content: "";
    position: absolute;
    top: 6px; left: 50%;
    width: 36px; height: 3px;
    margin-left: -18px;
    background: var(--line-strong);
    border-radius: 2px;
  }
}

/* ---------- 13 tooltip ----------
   JS: core/tooltip.js -> createTooltip(). CSS-only hint: <span class="hint" tabindex="0" data-hint="text">i</span> */
.tooltip {
  position: fixed;
  left: 0; top: 0;
  z-index: var(--z-tooltip);
  max-width: min(300px, calc(100vw - 24px));
  padding: 10px 12px 11px;
  border-radius: var(--r-1);
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow-float);
  font-size: .8125rem;
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-micro) var(--ease);
}
.tooltip.is-visible { opacity: 1; }
.tooltip__title { font-weight: 600; font-size: .875rem; margin-bottom: 4px; }
.tooltip__kicker {
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: rgba(255,255,255,.66);
}
.tooltip__rows { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 6px 0 0; font-family: var(--font-mono); font-size: var(--fs-micro); }
.tooltip__rows dt { color: rgba(255,255,255,.66); }
.tooltip__rows dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.hint { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--fg-2); cursor: help; }
.hint .i { width: 14px; height: 14px; }
.hint::after {
  content: attr(data-hint);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: var(--z-tooltip);
  width: max-content;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: var(--r-1);
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow-float);
  font-family: var(--font-sans);
  font-size: .8125rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  white-space: normal;
  transform: translate(-50%, 0);
  display: none;              /* not just hidden: a hidden bubble near an edge would still widen the page */
  pointer-events: none;
}
.hint:hover::after, .hint:focus-visible::after { display: block; animation: fade-in var(--dur-micro) var(--ease) both; }
.hint--left::after { left: auto; right: -6px; transform: none; }
.hint--right::after { left: -6px; transform: none; }

/* ---------- 14 segmented control (chart / table toggles) ---------- */
.seg {
  display: inline-flex;
  padding: 2px;
  border: var(--hair) solid var(--line-strong);
  border-radius: var(--r-2);
  gap: 2px;
}
.seg__btn {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-1);
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.seg__btn:hover { color: var(--fg); background: var(--well); }
.seg__btn[aria-pressed="true"], .seg__btn[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-fg); }

/* ---------- 15 data table ---------- */
.table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-top: var(--hair) solid var(--line-strong);
}
.table-wrap:focus-visible { outline-offset: 2px; }
.table {
  width: 100%;
  font-size: .875rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}
.table caption {
  caption-side: top;
  padding: 0 0 10px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .02em;
  color: var(--fg-3);
}
/* column labels only: a <th scope="row"> in tbody is data (see .table tbody th) */
.table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 14px 9px;
  border-bottom: var(--hair) solid var(--line-strong);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  color: var(--fg-2);
}
.table td,
.table tbody th {
  padding: 10px 14px;
  border-bottom: var(--hair) solid var(--line);
  vertical-align: top;
}
.table tbody th { font-weight: 500; text-align: left; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table .num, .table [data-num] { text-align: right; font-family: var(--font-mono); font-size: .8125rem; white-space: nowrap; }
.table th.num { font-family: var(--font-mono); font-size: var(--fs-micro); }
.table .mono { font-size: .8125rem; }
.table tbody tr { transition: background-color var(--dur-micro) var(--ease); }
.table tbody tr:hover { background: var(--well); }
.table--compact td { padding-top: 6px; padding-bottom: 6px; }
.table--boxed { border: var(--hair) solid var(--line); }
.table th[aria-sort] button { display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.table th[aria-sort="ascending"] button::after { content: ""; width: 9px; height: 9px; background: currentColor; -webkit-mask: var(--i-up) center / contain no-repeat; mask: var(--i-up) center / contain no-repeat; }
.table th[aria-sort="descending"] button::after { content: ""; width: 9px; height: 9px; background: currentColor; -webkit-mask: var(--i-down) center / contain no-repeat; mask: var(--i-down) center / contain no-repeat; }
.table { --i-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3 14 12H2z'/%3E%3C/svg%3E"); --i-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 13 2 4h12z'/%3E%3C/svg%3E"); }

/* ---------- 16 footnotes ----------
   in text: <sup><a class="fn-ref" href="#fn-1" id="fnref-1" aria-describedby="footnotes-label">1</a></sup>
   list:    <section class="footnotes" aria-labelledby="footnotes-label"><h2 class="footnotes__h" id="footnotes-label">Notes</h2><ol>
            <li id="fn-1">... <a class="fn-back" href="#fnref-1" aria-label="Back to reference 1">&#8593;</a></li> */
.fn-ref {
  display: inline-block;
  min-width: 1.4em;
  padding: 0 .2em;
  margin-left: .05em;
  border-radius: var(--r-1);
  font-family: var(--font-mono);
  font-size: .72em;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  color: var(--accent);
  background: var(--well-strong);
  vertical-align: .35em;
  text-decoration: none;
}
sup:has(> .fn-ref) { vertical-align: baseline; top: 0; font-size: 1em; }
.fn-ref:hover { background: var(--accent); color: var(--bg); }
.surface-sky .fn-ref:hover, .surface-deep .fn-ref:hover { color: var(--ink); }
.footnotes {
  padding-top: var(--space-4);
  border-top: var(--hair) solid var(--line-strong);
  font-size: .875rem;
  line-height: 1.55;
  color: var(--fg-2);
}
.footnotes__h {
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg-2);
}
.footnotes ol { list-style: none; padding: 0; margin: 0; counter-reset: fn; display: grid; gap: 10px; }
.footnotes li {
  position: relative;
  counter-increment: fn;
  padding: 2px 0 2px 2.25em;
  border-radius: var(--r-1);
  scroll-margin-top: calc(var(--header-h) + 32px);
}
.footnotes li::before { content: counter(fn); position: absolute; left: 0; top: 3px; font-family: var(--font-mono); font-size: .8125rem; color: var(--fg-3); }
.footnotes li:target { background: var(--well-strong); box-shadow: -6px 0 0 var(--well-strong), 6px 0 0 var(--well-strong); }
.footnotes a { overflow-wrap: anywhere; }
.fn-back {
  margin-left: .4em;
  padding: 0 .3em;
  font-family: var(--font-mono);
  color: var(--accent);
  border-radius: var(--r-1);
  text-decoration: none;
}
.fn-back:hover { background: var(--well-strong); }

/* ---------- 17 pull quote, drop cap ---------- */
.pullquote {
  position: relative;
  margin: var(--space-7) 0;
  padding: 30px 0 4px;
  border-top: var(--hair) solid var(--line-strong);
  color: var(--fg);
}
.pullquote::before {
  /* the dotted twin of the rule, a beat to the right and a step below */
  content: "";
  position: absolute;
  top: 7px; left: 14px;
  width: 96px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--dot-color) 0 2px, transparent 2px 5px);
  opacity: .8;
}
.pullquote p, .pullquote__text {
  font-family: var(--font-serif);
  font-size: var(--fs-quote);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance;
  text-indent: -.32em;
}
.pullquote--italic p, .pullquote--italic .pullquote__text { font-style: italic; text-indent: -.28em; }
.pullquote cite, .pullquote footer {
  display: block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-style: normal;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg-3);
}
.dropcap::first-letter {
  -webkit-initial-letter: 3;
  initial-letter: 3;
  font-family: var(--font-serif);
  font-weight: 400;
  margin-right: .12em;
  color: var(--fg);
}
@supports not ((initial-letter: 3) or (-webkit-initial-letter: 3)) {
  .dropcap::first-letter {
    float: left;
    font-size: 4.25em;
    line-height: .82;
    margin: .1em .09em 0 -.02em;
  }
}

/* ---------- 18 data note (about the record, so its edge is dotted) ---------- */
.note {
  position: relative;
  display: block;
  padding: 16px 18px 16px 22px;
  border: var(--hair) solid var(--line);
  border-left-color: transparent;
  border-radius: var(--r-1);
  background: var(--well);
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--fg-2);
}
.note::before {
  content: "";
  position: absolute;
  top: -1px; bottom: -1px; left: -1px;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--dot-color) 0 2px, transparent 2px 5px);
}
.note__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg);
}
.note__label::before { content: ""; width: 6px; height: 6px; box-shadow: inset 0 0 0 1px currentColor; }
.note a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.note a:hover { text-decoration-color: currentColor; }

/* ---------- 19 form controls ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field__label {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg-2);
}
.field__help { font-size: .8125rem; color: var(--fg-3); }
.input, .select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: var(--hair) solid var(--line-strong);
  border-radius: var(--r-1);
  background-color: var(--card-bg);
  color: var(--fg);
  font-size: .9375rem;
  line-height: 1.2;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.input::placeholder { color: var(--fg-3); opacity: 1; }
.input:hover, .select:hover { border-color: var(--fg-2); }
.input:focus-visible, .select:focus-visible { border-color: var(--focus); outline: 1px solid var(--focus); outline-offset: 0; }
.search { position: relative; display: block; min-width: 0; }
.search > .i { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--fg-2); pointer-events: none; }
.search .input { padding-left: 38px; padding-right: 64px; }
.search__kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--fg-3); pointer-events: none; }
.input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
.input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background-color: var(--fg-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3 3 13' fill='none' stroke='%23000' stroke-width='1.75'/%3E%3C/svg%3E") center / contain no-repeat;
  cursor: pointer;
}
.select-wrap { position: relative; display: block; min-width: 0; }
.select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 12px; top: 50%;
  width: 14px; height: 14px;
  margin-top: -7px;
  background-color: var(--fg-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6 8 10.5 12.5 6' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6 8 10.5 12.5 6' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}
.select option { color: var(--ink); background: var(--white); }
/* range: square thumb on a hairline track; site.js keeps --fill in sync */
.range {
  --fill: 50%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(90deg, var(--fg) 0 var(--fill), var(--line-strong) var(--fill) 100%);
}
.range::-moz-range-track { height: 2px; background: var(--line-strong); }
.range::-moz-range-progress { height: 2px; background: var(--fg); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  margin-top: -6px;
  border: 0;
  border-radius: 1px;
  background: var(--fg);
  box-shadow: 0 0 0 3px var(--bg);
  transition: transform var(--dur-micro) var(--ease);
}
.range::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 1px; background: var(--fg); box-shadow: 0 0 0 3px var(--bg); }
.range:hover::-webkit-slider-thumb { transform: scale(1.15); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--focus); outline-offset: 3px; }
.range:focus-visible::-moz-range-thumb { outline: 2px solid var(--focus); outline-offset: 3px; }
.range-field { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 14px; }
.range-field output { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--fg); font-variant-numeric: tabular-nums; min-width: 4ch; text-align: right; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9375rem; }
.check input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border: var(--hair) solid var(--line-strong); border-radius: 1px; display: grid; place-items: center; margin: 0; }
.check input::after { content: ""; width: 8px; height: 8px; background: var(--fg); transform: scale(0); transition: transform var(--dur-micro) var(--ease); }
.check input:checked::after { transform: scale(1); }
.check input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- 20 scattered title + dot text ----------
   <h1 class="scatter" data-scatter aria-label="Every machine has a twin.">
     <span class="scatter__w" data-col="0" data-row="0">Every</span> ...
   Words sit on a stepped grid: --scatter-col / --scatter-row (em, from the banner's 120/70 grid).
   data-col / data-row: 0-11 / 0-7. Under 768 px: data-col-sm / data-row-sm (fall back to the desktop values)
   and a tighter column step. scatter.js fits the block to its container and reveals word by word. */
.scatter {
  --scatter-size: var(--fs-display);
  --scatter-step: var(--scatter-col);
  position: relative;
  display: grid;
  grid-template-columns: none;
  grid-auto-columns: var(--scatter-step);
  grid-auto-rows: var(--scatter-row);
  max-width: 100%;
  padding-bottom: .16em;
  font-family: var(--font-serif);
  font-size: calc(var(--scatter-size) * var(--scatter-fit, 1));
  font-weight: 400;
  line-height: 1;
  letter-spacing: var(--tr-display);
  color: var(--fg);
}
.scatter--h1 { --scatter-size: var(--fs-h1); }
.scatter--h2 { --scatter-size: var(--fs-h2); }
.scatter__w {
  position: relative;
  grid-column-start: var(--cl, 1);
  grid-row-start: var(--rl, 1);
  justify-self: start;
  align-self: start;
  width: max-content;
  white-space: nowrap;
}
.scatter__w em, .scatter__w i { font-style: italic; }
.scatter__w[data-col="0"] { --cl: 1; } .scatter__w[data-col="1"] { --cl: 2; } .scatter__w[data-col="2"] { --cl: 3; } .scatter__w[data-col="3"] { --cl: 4; }
.scatter__w[data-col="4"] { --cl: 5; } .scatter__w[data-col="5"] { --cl: 6; } .scatter__w[data-col="6"] { --cl: 7; } .scatter__w[data-col="7"] { --cl: 8; }
.scatter__w[data-col="8"] { --cl: 9; } .scatter__w[data-col="9"] { --cl: 10; } .scatter__w[data-col="10"] { --cl: 11; } .scatter__w[data-col="11"] { --cl: 12; }
.scatter__w[data-row="0"] { --rl: 1; } .scatter__w[data-row="1"] { --rl: 2; } .scatter__w[data-row="2"] { --rl: 3; } .scatter__w[data-row="3"] { --rl: 4; }
.scatter__w[data-row="4"] { --rl: 5; } .scatter__w[data-row="5"] { --rl: 6; } .scatter__w[data-row="6"] { --rl: 7; } .scatter__w[data-row="7"] { --rl: 8; }
@media (max-width: 767.98px) {
  .scatter { --scatter-step: calc(var(--scatter-col) * .55); }
  .scatter__w[data-col-sm="0"] { --cl: 1; } .scatter__w[data-col-sm="1"] { --cl: 2; } .scatter__w[data-col-sm="2"] { --cl: 3; } .scatter__w[data-col-sm="3"] { --cl: 4; }
  .scatter__w[data-col-sm="4"] { --cl: 5; } .scatter__w[data-col-sm="5"] { --cl: 6; } .scatter__w[data-col-sm="6"] { --cl: 7; } .scatter__w[data-col-sm="7"] { --cl: 8; }
  .scatter__w[data-row-sm="0"] { --rl: 1; } .scatter__w[data-row-sm="1"] { --rl: 2; } .scatter__w[data-row-sm="2"] { --rl: 3; } .scatter__w[data-row-sm="3"] { --rl: 4; }
  .scatter__w[data-row-sm="4"] { --rl: 5; } .scatter__w[data-row-sm="5"] { --rl: 6; } .scatter__w[data-row-sm="6"] { --rl: 7; } .scatter__w[data-row-sm="7"] { --rl: 8; }
}
/* the dot-matrix twin canvas (dot-text.js) sits behind its word. It is sized in px by dot-text and must never be
   squeezed by base.css's `canvas { max-width: 100% }` (the word is narrower than its twin's canvas: the dots
   would turn into 0.72:1 rectangles). The lockup's print-over / split runs on its transform (dot-text.js). */
.dot-twin {
  position: absolute;
  z-index: -1;
  max-width: none;
  max-height: none;
  pointer-events: none;
  image-rendering: pixelated;
}
.has-dot-twin { position: relative; isolation: isolate; }
.dot-only { color: transparent !important; }
.dot-only::selection { color: transparent; }

/* ---------- print-like seams ----------
   Where a blue band (sky, deep, ultra) meets paper, its last 12 px dissolve into the paper like a printed dither: paper-
   coloured 4 px squares on a 6 px grid, three rows at 75%, 50% and 25% coverage (densest next to the paper). A mask on
   ::after inside the band: no layout change; off in print and forced colours. Bands: direct children of <main>, and the
   footer when the page ends on paper. */
:root {
  --seam-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Cpath d='M0 8h4v4H0zM6 8h4v4H6zM12 8h4v4h-4zM3 4h4v4H3zM15 4h4v4h-4zM9 0h4v4H9z'/%3E%3C/svg%3E") left bottom / 24px 12px repeat-x;
  --seam-t: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Cpath d='M0 0h4v4H0zM6 0h4v4H6zM12 0h4v4h-4zM3 4h4v4H3zM15 4h4v4h-4zM9 8h4v4H9z'/%3E%3C/svg%3E") left top / 24px 12px repeat-x;
}
main > :is(.surface-sky, .surface-deep, .surface-ultra):has(+ .surface-paper) { --seam: var(--seam-b); }
main > .surface-paper + :is(.surface-sky, .surface-deep, .surface-ultra) { --seam: var(--seam-t); }
main > .surface-paper + :is(.surface-sky, .surface-deep, .surface-ultra):has(+ .surface-paper) { --seam: var(--seam-t), var(--seam-b); }
main:has(> .surface-paper:last-child) + .site-footer { --seam: var(--seam-t); }
main > :is(.surface-sky, .surface-deep, .surface-ultra):has(+ .surface-paper)::after,
main > .surface-paper + :is(.surface-sky, .surface-deep, .surface-ultra)::after,
main:has(> .surface-paper:last-child) + .site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--paper);
  -webkit-mask: var(--seam);
  mask: var(--seam);
  pointer-events: none;
}
@media print, (forced-colors: active) {
  main > :is(.surface-sky, .surface-deep, .surface-ultra)::after, .site-footer::after { content: none; }
}

/* ---------- 21 misc ---------- */
/* "peaq" never renders in capitals: inside an uppercase label (mono tags, kickers, table heads), wrap the name in
   <span class="nocase">peaq</span>. tools/shoot.mjs fails a page that renders "PEAQ" or "Peaq". */
.nocase { text-transform: none; }
/* live chip: "No. 001 · LIVE · block #12,422,392 · 6.5 s" */
.live-chip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 0;
  width: fit-content;      /* hugs its text even as a flex/grid child (a column flex parent would stretch it) */
  max-width: 100%;
  min-height: 30px;
  padding: 0 10px;
  border: var(--hair) solid var(--line-strong);
  border-radius: var(--r-1);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.live-chip > * + *::before { content: "\00B7"; margin: 0 .6em; opacity: .6; }
.live-chip .status-dot { margin-right: .5em; }
.live-chip .status-dot + *::before { content: none; }
/* compact chip (mountLiveChip compact: under 340 px): one line, tighter separators */
.live-chip[data-compact] { flex-wrap: nowrap; white-space: nowrap; letter-spacing: .02em; padding: 0 8px; }
.live-chip[data-compact] > * + *::before { margin: 0 .45em; }
.live-chip[data-state="snapshot"] {
  border-color: transparent;
  background-image:
    repeating-linear-gradient(90deg, var(--fg) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, var(--fg) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(180deg, var(--fg) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(180deg, var(--fg) 0 1px, transparent 1px 3px);
  background-size: 100% 1px, 100% 1px, 1px 100%, 1px 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: no-repeat;
}

/* plate: an image framed like a printed plate, with a mono caption under it */
.plate { position: relative; margin: 0; }
.plate__img { position: relative; overflow: hidden; border-radius: var(--r-1); background: var(--sky); }
.plate__img img { width: 100%; height: 100%; object-fit: cover; }
.plate__cap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .03em;
  color: var(--fg-3);
}

/* folio: the small mono index line ("No. 001", "§ 02", "fig. 01") */
.folio {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--fg-2);
}

/* keyboard hint */
.kbd-hint { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--fg-3); letter-spacing: .04em; }

/* skeleton block while data loads (dotted, since it is not real yet) */
.skeleton {
  display: block;
  min-height: 1em;
  border-radius: var(--r-1);
  background: var(--fg);
  opacity: .14;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1'/%3E%3C/svg%3E") 0 0 / 4px 4px repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1'/%3E%3C/svg%3E") 0 0 / 4px 4px repeat;
  animation: skeleton-pulse 1.6s var(--ease-in-out) infinite;
}
