/* SQXray — designed stylesheet (design.md). Markup contract: spinup_site_build.py.
   Visual language from logo.svg: monoline strokes, round caps, true circles,
   ~57 degree diagonals, and one teal beam that crosses things. */

:root {
  --site-header-bg: var(--film-deep);
  --film: #0B222C;
  --beam: #00A3AD;
  --deep: #006B72;
  --lumen: #5FE0E6;
  --ink: #12212A;
  --plate: #E8EDEE;

  --film-deep: #071820;
  --panel: #F2F6F6;
  --plate-hi: #FFFFFF;
  --rule: rgba(18, 33, 42, 0.16);
  --rule-soft: rgba(18, 33, 42, 0.09);
  --rule-film: rgba(95, 224, 230, 0.18);
  --on-film-dim: rgba(232, 237, 238, 0.76);

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --sans: "IBM Plex Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --body: var(--sans);
  --mono: ui-monospace, "SFMono-Regular", "IBM Plex Mono", Menlo, Consolas, monospace;

  /* Centred 940px column inside full-bleed bands. */
  --gutter: max(22px, calc(50% - 470px));
  /* Height of the pinned header, as the offset an anchor jump has to clear. */
  --header-h: 75px;
  /* The X's angle, as atmosphere on dark grounds. */
  --hatch: repeating-linear-gradient(57deg,
    rgba(95, 224, 230, 0.045) 0 1px, transparent 1px 13px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
/* An anchor jump, focus or scrollIntoView lands below the pinned header. The
   clearance is each page element's scroll margin, not the page's scroll padding:
   the header's own search field sits inside that band, so with padding every
   keystroke in it would scroll the page to reveal the caret. */
:not(.site-header, .site-header *) { scroll-margin-top: var(--header-h); }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  background: var(--plate);
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.66;
  font-feature-settings: "kern" 1;
}

::selection { background: var(--beam); color: var(--film); }

a { color: var(--deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--film); }

img { max-width: 100%; }

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

/* --------------------------------------------------------------------------
   Prose defaults. :where() keeps these at zero specificity so every classed
   primitive below wins without !important.
   -------------------------------------------------------------------------- */

/* Reading order on the home page: hero, then the product thesis, and the
   client quote sits with the closing CTA rather than owning the whole screen
   below the hero. The builder emits the quote strip directly after the hero,
   so the running order is set here on body's flex column. */
.site-header { order: 0; }
.hero { order: 1; }
main { order: 2; }
.quote-strip { order: 3; }
.cta-band { order: 4; }
.site-footer { order: 5; }

main { flex: 1 0 auto; width: 100%; max-width: 940px; margin: 0 auto; padding: 46px 22px 8px; }

/* Lede: the first paragraph of a page carries the thesis, so it is set larger. */
main > p:first-child, main > h1 + p {
  font-size: clamp(1.06rem, 1.5vw, 1.16rem);
  line-height: 1.55;
  color: var(--film);
  margin-bottom: 22px;
}

main :where(h1) {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.85rem, 4.4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--film);
  max-width: 26ch;
  margin: 0 0 22px;
}
main :where(h2) {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.24rem, 2.2vw, 1.5rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--film);
  max-width: 32ch;
  margin: 46px 0 14px;
}
main :where(h3) {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 1.14rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--film);
  margin: 34px 0 10px;
}
/* Sub-heads take the beam inline, so they read above a bold run-in lead. */
main :where(h3)::before {
  content: "";
  display: inline-block;
  vertical-align: 0.22em;
  width: 16px;
  height: 4px;
  border-radius: 2px;
  background: var(--beam);
  margin-right: 10px;
}
main :where(h4) {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 24px 0 8px;
}

/* The beam: a round-capped stub entering every heading from the left. */
main :where(h1, h2)::before {
  content: "";
  display: block;
  height: 5px;
  border-radius: 3px;
  background: var(--beam);
  margin-bottom: 16px;
}
main :where(h1)::before { width: 54px; }
main :where(h2)::before { width: 30px; height: 4px; margin-bottom: 12px; }

main :where(p) { margin: 0 0 16px; }
main :where(ul, ol) { margin: 0 0 18px 20px; }
main :where(li) { margin-bottom: 8px; }
main :where(strong) { font-weight: 600; color: var(--film); }
main :where(em) { font-style: italic; }
main :where(code) {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--deep);
  background: var(--panel);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  padding: 0 4px;
}

/* Rule as a beam, not a hairline. */
main :where(hr) {
  border: 0;
  height: 4px;
  width: 76px;
  border-radius: 2px;
  background: var(--beam);
  margin: 42px 0;
}

/* --------------------------------------------------------------------------
   Header + nav
   -------------------------------------------------------------------------- */

/* Pinned: the nav (and its dropdown) stays reachable at any scroll depth, so
   it sits above every band and above the in-page anchors it scrolls to —
   hence --header-h below, which keeps a jumped-to heading clear of it. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--site-header-bg);
  border-bottom: 1px solid rgba(95, 224, 230, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px var(--gutter);
  flex-wrap: wrap;
}
/* logo.svg letterforms are fill: currentColor — color must contrast the
   dark header ground. */
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--plate);
}
.site-logo svg { height: 27px; width: auto; display: block; }
.site-logo:hover { color: #fff; }
.site-logo-name {
  font-family: var(--display);
  font-stretch: 112%;
  font-size: clamp(1.25rem, 0.5vw + 1.1rem, 1.45rem);
  line-height: 1;
  letter-spacing: -0.01em;
}
/* "SQX" bold and white, "ray" semibold in the favicon's teal. */
.site-logo-name .logo-strong { font-weight: 700; color: #fff; }
.site-logo-name .logo-light { font-weight: 600; color: var(--beam); }

.site-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.site-nav a {
  position: relative;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.77rem;
  letter-spacing: 0.01em;
  color: var(--on-film-dim);
  text-decoration: none;
  padding: 9px 9px 10px;
  border-radius: 5px;
  white-space: nowrap;
}
.site-nav a:hover { color: #fff; }
/* Current page marked by the beam, round caps and all. */
.site-nav a[aria-current="page"] { color: #fff; }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 3px;
  height: 3px;
  border-radius: 2px;
  background: var(--beam);
}
.site-nav .nav-cta {
  background: var(--beam);
  color: var(--film);
  margin-left: 8px;
  padding: 9px 15px 10px;
}
.site-nav .nav-cta:hover { background: var(--lumen); color: var(--film); }
.site-nav .nav-cta::after { content: none; }
/* Nav groups (brand.json nav items with children): dropdowns that open on
   hover and on keyboard focus inside the group; the mobile strip below
   flattens them back to plain links. Keyboard focus is :has(:focus-visible),
   not :focus-within — a MOUSE click also focuses, and :focus-within would
   then hold the panel open after the pointer left. */
.site-nav .nav-group { position: relative; display: inline-flex; align-items: center; }
.site-nav .nav-group-label {
  background: none;
  border: 0;
  line-height: inherit;
  cursor: pointer;
  user-select: none;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.77rem;
  letter-spacing: 0.01em;
  color: var(--on-film-dim);
  text-decoration: none;
  padding: 9px 9px 10px;
  border-radius: 5px;
  white-space: nowrap;
}
/* The caret marks whatever opens the panel: the label itself when the group is
   a pure disclosure (no page of its own), otherwise the toggle sitting beside
   a label that navigates. */
.site-nav button.nav-group-label::after { content: " ▾"; font-size: 0.72em; opacity: 0.7; }
.site-nav .nav-group-toggle {
  background: none;
  border: 0;
  line-height: inherit;
  cursor: pointer;
  user-select: none;
  color: var(--on-film-dim);
  padding: 9px 8px 10px 2px;
  border-radius: 5px;
}
.site-nav .nav-group-toggle::after { content: "▾"; font-size: 0.72em; opacity: 0.7; }
/* Label and toggle read as one control: the label gives up its right padding
   and the pair share a pill. */
.site-nav .nav-group-label:has(+ .nav-group-toggle) { padding-right: 3px; }
.site-nav .nav-group:hover .nav-group-label,
.site-nav .nav-group:has(:focus-visible) .nav-group-label,
.site-nav .nav-group[data-current] .nav-group-label,
.site-nav .nav-group:hover .nav-group-toggle,
.site-nav .nav-group:has(:focus-visible) .nav-group-toggle,
.site-nav .nav-group[data-current] .nav-group-toggle { color: #fff; position: relative; }
/* The beam marks the group holding the page being read, exactly as it marks a
   plain current link — the panel is closed most of the time, so the group is
   where that cue has to live. ::before, since ::after carries the caret. */
.site-nav .nav-group[data-current] .nav-group-label::before {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 3px;
  height: 3px;
  border-radius: 2px;
  background: var(--beam);
}
/* On the group's OWN page the label is the current link and already draws the
   beam through the plain-link rule — one mark, not two stacked. */
.site-nav .nav-group[data-current] .nav-group-label[aria-current="page"]::before {
  content: none;
}
/* The panel hangs flush off the label's box (padding, not offset, carries the
   visual gap) — a real gap drops the hover mid-travel and the menu collapses
   under the cursor.

   Closed means clipped and click-through, NOT display:none: a display:none
   panel takes its links out of the tab order, so Tab off the label fell past
   them to the next nav link. Clipped links keep their place in that order and
   the panel un-clips the moment one of them takes keyboard focus. */
.site-nav .nav-sub {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 80;
  min-width: 190px;
  padding: 12px 6px 6px;
  border-radius: 8px;
  background: var(--film-deep);
  border: 1px solid rgba(95, 224, 230, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 2px;
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  pointer-events: none;
}
.site-nav .nav-group:hover .nav-sub,
.site-nav .nav-group:has(:focus-visible) .nav-sub {
  clip-path: none;
  opacity: 1;
  pointer-events: auto;
}
.site-nav .nav-sub a { display: block; }
.site-nav .nav-sub a[aria-current="page"]::after { bottom: 6px; }

/* --------------------------------------------------------------------------
   Hero — the film plate, and the signature beam through the action row
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--film);
  background-image: var(--hatch);
  color: var(--plate);
  /* the bands above and below the headline scale with the window, so no
     breakpoint moves the headline */
  padding: clamp(62px, 0.8vw + 56px, 68px) var(--gutter) clamp(44px, 1.8vw + 30px, 56px);
  overflow: hidden;
}
.hero h1 {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(2.05rem, 5vw, 3.15rem);
  line-height: 1.06;
  letter-spacing: -0.028em;
  color: #fff;
  max-width: 21ch;
  margin: 0 0 20px;
  text-wrap: balance;
}
.hero p {
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  line-height: 1.55;
  color: var(--on-film-dim);
  margin: 0;
}
/* The beam: enters the primary button (same teal stroke), is interrupted by
   the buttons beside it, and runs out to a round cap at the column edge. */
.hero::after {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 80px;
  height: 5px;
  border-radius: 3px;
  background: var(--beam);
}
.hero .contact-actions { position: relative; z-index: 1; margin-top: 34px; }

/* --------------------------------------------------------------------------
   Action buttons (hero + contact page)
   -------------------------------------------------------------------------- */

.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.action-btn {
  font-family: var(--display);
  font-stretch: 112%;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 7px;
  padding: 12px 18px;
  color: var(--film);
  background: var(--plate-hi);
  white-space: nowrap;
}
.action-btn:hover { border-color: var(--deep); color: var(--deep); }
.action-primary {
  background: var(--beam);
  border-color: var(--beam);
  color: var(--film);
}
.action-primary:hover { background: var(--lumen); border-color: var(--lumen); color: var(--film); }
/* '[label](/x/){.site-btn}' in copy: the builder's button link, typeset as
   the primary action so an article's call to action matches the hero's. */
.site-btn {
  display: inline-block;
  font-family: var(--display);
  font-stretch: 112%;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid var(--beam);
  border-radius: 7px;
  padding: 12px 18px;
  color: var(--film);
  background: var(--beam);
  white-space: nowrap;
}
.site-btn:hover { background: var(--lumen); border-color: var(--lumen); color: var(--film); }
/* On the film ground the secondary buttons mask the beam. */
.hero .action-btn { background: var(--film); border-color: rgba(232, 237, 238, 0.34); color: var(--plate); }
.hero .action-btn:hover { border-color: var(--lumen); color: var(--lumen); }
.hero .action-primary { background: var(--beam); border-color: var(--beam); color: var(--film); }
.hero .action-primary:hover { background: var(--lumen); border-color: var(--lumen); color: var(--film); }

/* --------------------------------------------------------------------------
   Layout primitives (copy.md ':::' blocks)
   -------------------------------------------------------------------------- */

/* Callout: the beam entering from the left edge, round caps, drawn not filled. */
.site-callout {
  position: relative;
  background: var(--plate-hi);
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  padding: 22px 24px 22px 34px;
  margin: 34px 0;
}
.site-callout::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 22px;
  bottom: 22px;
  width: 5px;
  border-radius: 3px;
  background: var(--beam);
}
.site-callout p:last-child { margin-bottom: 0; }

/* Pull-quote: a film plate mid-page — the same surface as the hero. */
.site-pullquote {
  background: var(--film);
  background-image: var(--hatch);
  color: #fff;
  border-radius: 14px;
  padding: 30px 32px;
  margin: 40px 0;
  max-width: 100%;
}
.site-pullquote::before {
  content: "";
  display: block;
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: var(--beam);
  margin-bottom: 18px;
}
.site-pullquote p {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: clamp(1.16rem, 2.1vw, 1.5rem);
  line-height: 1.34;
  letter-spacing: -0.015em;
  color: #fff;
  max-width: 44ch;
  margin: 0;
}
.site-pullquote strong { color: #fff; }
.site-pullquote a { color: var(--lumen); }

/* Stats: each figure sits under its own beam. */
.stat-strip {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 34px 0;
  padding: 0;
  max-width: none;
}
.stat-strip li { margin: 0; }
.stat-strip li::before {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  border-radius: 2px;
  background: var(--beam);
  margin-bottom: 12px;
}
.stat-strip strong {
  display: block;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.32rem, 2.1vw, 1.68rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--film);
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.stat-strip span { display: block; font-size: 0.88rem; line-height: 1.45; color: rgba(18, 33, 42, 0.8); }

/* Split sections */
.section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: center;
  margin: 40px 0;
}
.section-split .site-figure { margin: 0; }
.section-split.flip .site-figure { order: 2; }
.section-split.wrap { display: block; }
.section-split.wrap .site-figure { float: left; width: 44%; margin: 6px 30px 14px 0; }
.section-split.wrap.flip .site-figure { float: right; margin: 6px 0 14px 30px; }
.section-split.wrap::after { content: ""; display: table; clear: both; }
.split-copy > :first-child { margin-top: 0; }
.split-copy h2, .split-copy h3 { margin-top: 0; }
.split-copy p:last-child { margin-bottom: 0; }

/* Steps: monoline rings, the mark's true circles at 30px. */
.step-flow ol { list-style: none; margin: 34px 0; padding: 0; counter-reset: step; max-width: 76ch; }
.step-flow li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  margin-bottom: 20px;
}
.step-flow li:last-child { margin-bottom: 0; }
.step-flow li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--beam);
  background: transparent;
  color: var(--deep);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.82rem;
  display: grid;
  place-items: center;
}
/* The flow itself: the beam running ring to ring, so the numbered list reads
   as the nightly pipeline rather than as an ordered list of paragraphs. */
.step-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 35px;
  bottom: -18px;
  width: 2px;
  border-radius: 1px;
  background: linear-gradient(to bottom, var(--beam), rgba(0, 163, 173, 0.22));
}
.step-flow li strong { display: block; margin-bottom: 2px; }

/* Feature cards */
.card-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 26px 0 30px;
  padding: 0;
  max-width: none;
}
/* Even rows: divide the cards instead of letting auto-fit orphan them. */
.card-grid.cards-2, .card-grid.cards-4 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cards-3, .card-grid.cards-6 { grid-template-columns: repeat(3, 1fr); }
.card-grid li {
  margin: 0;
  background: var(--plate-hi);
  border: 1px solid var(--rule-soft);
  border-top: 3px solid var(--beam);
  border-radius: 3px 3px 12px 12px;
  padding: 20px;
  font-size: 0.97rem;
}
/* The two answers, side by side: the one place a card pair IS the comparison,
   so the pair is set as two films on the light plate — the question in white,
   the file that answers it in read-on-film grey. Built from type, not baked
   into a raster: it scales, it selects, it reads to a screen reader. */
.card-grid.cards-2 li {
  background: var(--film);
  background-image: var(--hatch);
  border-color: var(--rule-film);
  border-radius: 3px 3px 12px 12px;
  padding: 22px 24px;
  color: var(--on-film-dim);
}
.card-grid.cards-2 li strong { color: #fff; font-size: 1.06rem; margin-bottom: 9px; }

.card-grid li strong {
  display: block;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.005em;
  color: var(--film);
  margin-bottom: 7px;
}

/* Figures: every image is a film in a mat, and the mat is film — the images
   are dark radiographs, so a white card would read as a stock photo frame.
   --rule-film is the dark-ground counterpart of --rule-soft (the same hairline
   weight and intent, at a lumen tint that is actually visible on film). */
.site-figure {
  margin: 36px 0;
  background: var(--film);
  border: 1px solid var(--rule-film);
  border-radius: 12px;
  padding: 8px;
}
/* Every generated asset is 3:2. Declaring it reserves the box before the
   bytes land, so a lazy figure can never collapse to a zero-height pill and
   nothing below it shifts. */
.site-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 7px;
  background: var(--film-deep);
}

/* --------------------------------------------------------------------------
   Quote strip (home)
   -------------------------------------------------------------------------- */

.quote-strip { max-width: 940px; margin: 52px auto 0; padding: 0 22px; }
.quote-strip h2 {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--deep);
  margin: 0 0 18px;
}
.quote { position: relative; margin: 22px 0; padding-left: 22px; }
.quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: var(--beam);
}
.quote blockquote {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.55;
  color: var(--film);
  max-width: 66ch;
}
.quote-attr {
  margin-top: 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(18, 33, 42, 0.66);
}

/* --------------------------------------------------------------------------
   Articles — evergreen explainers (spinup_site_build.py pages/: template
   listing + article). The index is a ledger of beams: one entry per piece,
   the date set in the display face as a label, the title carrying the link.
   -------------------------------------------------------------------------- */

.article-intro { max-width: 72ch; font-size: 1.05rem; }
.listing { list-style: none; padding: 0; margin: 34px 0 0; }
.listing-item {
  position: relative;
  padding: 22px 0 22px 26px;
  border-top: 1px solid var(--rule-soft);
}
.listing-item:last-child { border-bottom: 1px solid var(--rule-soft); }
.listing-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 26px;
  width: 4px;
  height: 34px;
  border-radius: 2px;
  background: var(--beam);
}
/* Article byline and hero (template: article). */
.article-byline {
  margin: 14px 0 0;
  font-family: var(--display);
  font-stretch: 112%;
  font-size: 0.85rem;
  color: rgba(18, 33, 42, 0.78);
}
.article-byline .article-author { font-weight: 700; color: var(--film); }
.article-byline .article-author a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule-soft); }
.article-byline .article-author a:hover { border-bottom-color: var(--beam); }
.article-hero { margin: 0 0 30px; }
.article-hero img { display: block; width: 100%; height: auto; border-radius: 10px; }
.article-body ol { padding-left: 1.4em; }
.article-body ol li { margin: 0 0 10px; line-height: 1.6; font-size: 0.95rem; color: rgba(18, 33, 42, 0.86); }
.listing-item h2 { margin: 4px 0 8px; font-size: 1.32rem; }
.listing-item h2::before { content: none; }
.listing-item h2 a { color: var(--film); text-decoration: none; }
.listing-item h2 a:hover { color: var(--deep); text-decoration: underline; }
.listing-date, .article-date {
  margin: 0;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--deep);
}
.listing-blurb { margin: 0; max-width: 72ch; color: rgba(18, 33, 42, 0.82); }

.site-article header { margin-bottom: 30px; }
.site-article header h1 { margin: 10px 0 12px; }
.article-kicker {
  font-size: 1.18rem;
  line-height: 1.5;
  color: var(--film);
  max-width: 66ch;
  margin: 0;
}
.article-body { max-width: 72ch; }
.article-body p { line-height: 1.68; }
.article-body h3 { margin-top: 38px; }
.listing-empty { color: rgba(18, 33, 42, 0.7); }

/* --------------------------------------------------------------------------
   Data dictionary — dense and scannable; the field list is the product
   -------------------------------------------------------------------------- */

.dict-intro { max-width: 72ch; font-size: 1.05rem; }
.dict-download { margin: 20px 0 4px; }
.dict-download-btn {
  display: inline-block;
  font-family: var(--display);
  font-stretch: 112%;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid var(--beam);
  border-radius: 7px;
  padding: 12px 18px;
  color: var(--film);
  background: var(--beam);
  white-space: nowrap;
}
.dict-download-btn:hover { background: var(--lumen); border-color: var(--lumen); color: var(--film); }
.dict-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 8px;
}
.dict-toc a {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--deep);
  background: var(--plate-hi);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 7px 13px;
}
.dict-toc a:hover { border-color: var(--deep); background: #fff; }

.dict-section { margin: 44px 0; }
.dict-section h2 { margin-top: 0; }
.dict-note { font-size: 0.92rem; color: rgba(18, 33, 42, 0.78); max-width: 72ch; margin-bottom: 16px; }

.dict-table, .fact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.5;
  display: block;
  overflow-x: auto;
  border-top: 3px solid var(--beam);
}
.dict-table thead th, .fact-table thead th {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--deep);
  padding: 10px 16px 8px 0;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.dict-table th, .dict-table td, .fact-table th, .fact-table td { text-align: left; vertical-align: top; }
.dict-table tbody th, .dict-table tbody td, .fact-table tbody th, .fact-table tbody td {
  padding: 9px 16px 9px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.dict-table tbody tr:hover th, .dict-table tbody tr:hover td, .fact-table tbody tr:hover th, .fact-table tbody tr:hover td { background: var(--panel); }
.dict-table tbody th, .fact-table tbody th { font-weight: 400; white-space: nowrap; }
.dict-table tbody th code, .fact-table tbody th code {
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--film);
  background: none;
  border: 0;
  padding: 0;
  font-weight: 500;
}
/* Field tables run Field | Type | Nullable | Description [| Example]; the
   appendix tables run Field | Values. Type and Nullable stay compact and
   unwrapped; Description gets room to breathe, and the .dict-enums override
   below gives the appendix Values column prose styling instead of Type's. */
.dict-table td:nth-child(2), .dict-table td:nth-child(3) {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: rgba(18, 33, 42, 0.7);
  white-space: nowrap;
}
.dict-table td:nth-child(4) { min-width: 32ch; }
.dict-enums .dict-table td:nth-child(2) {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  white-space: normal;
  min-width: 32ch;
}
.dict-table code { font-family: var(--mono); }

/* --------------------------------------------------------------------------
   Charts / sparklines — data marks only. No axes, gridlines or legend.
   (.chart-* is what the builder emits; .series-* and .sparkline are the same
   contract under its documented aliases.)
   -------------------------------------------------------------------------- */

.chart-panel, .series-panel { margin: 34px 0; max-width: 660px; }
.chart-caption, .series-caption {
  font-size: 0.92rem;
  color: rgba(18, 33, 42, 0.78);
  margin: 0 0 14px;
  max-width: 66ch;
}
.chart-row, .series-row {
  display: grid;
  grid-template-columns: minmax(9ch, 20ch) 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.chart-label, .series-label {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--film);
}
/* The builder draws a row's marks in a 100x24 viewBox and gives its line form
   vector-effect="non-scaling-stroke", so the marks are meant to be stretched
   across the row. An inline <svg> only fills its box when the box carries the
   viewBox's own ratio -- preserveAspectRatio is an attribute, not a CSS
   property -- so the box is declared at that ratio instead of at a fixed
   pixel height, which would letterbox every chart into a centred thumbnail. */
.chart-mark, .sparkline {
  width: 100%;
  height: auto;
  aspect-ratio: 100 / 24;
  overflow: visible;
  display: block;
}
/* One bar per row needs a fraction of the height a six-point series does, so
   the ranking form gets a shorter mark column rather than a taller box. */
.chart-compare .chart-row { grid-template-columns: minmax(9ch, 20ch) minmax(0, 210px) auto; }
.chart-mark .chart-spark, .sparkline polyline {
  fill: none;
  stroke: var(--film);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-mark .chart-bar, .sparkline .chart-bar { fill: rgba(11, 34, 44, 0.72); rx: 1px; }
.chart-mark .chart-last, .sparkline .chart-last, .sparkline .series-last { fill: var(--beam); stroke: none; }
/* Every bar in a ranking is the block's only value, so the builder marks them
   all 'chart-last'. Teal on all five would make a slab of what is meant to be
   a 5px beam; the ranking reads in film and keeps the accent for the series
   forms, where the last point genuinely is the latest one. */
.chart-compare .chart-mark .chart-bar { fill: rgba(11, 34, 44, 0.72); }
.chart-value, .series-value {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: var(--film);
}

/* Corpus-scale panels (scatter, network): one mark per entity, in a 100x66
   box. Same ratio rule as the row marks above. The network is the mark's own
   language at page scale -- a ring of film nodes with teal beams crossing
   between them -- so nothing here is a new visual idea, only the old one
   applied to data. */
.chart-panel-mark {
  width: 100%;
  height: auto;
  aspect-ratio: 100 / 66;
  overflow: visible;
  display: block;
  margin-top: 4px;
}
.chart-panel-mark .chart-point { fill: var(--film); fill-opacity: 0.6; }
.chart-panel-mark .chart-node { fill: var(--film); }
.chart-panel-mark .chart-edge { stroke: var(--beam); stroke-opacity: 0.42; stroke-linecap: round; }
.chart-panel-mark .chart-g0 { fill: var(--film); fill-opacity: 0.62; }
.chart-panel-mark .chart-g1 { fill: var(--beam); fill-opacity: 0.72; }
.chart-panel-mark .chart-g2 { fill: var(--deep); fill-opacity: 0.62; }
/* Grid form (entity lines x measure columns; the bar is the figure, the ink is
   the denominator share). Structure is inline from the builder; this is type
   and colour only. */
.chart-grid { max-width: none; }
.chart-mark .chart-ink { fill: var(--film); }
.chart-grid-table { font-size: 0.86rem; }
.chart-grid-head {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--film);
}
.chart-grid-table .chart-label { font-size: 0.8rem; }
.chart-grid-table .chart-label a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule-soft); }
.chart-grid-table .chart-label a:hover { border-bottom-color: var(--beam); }
.chart-grid-table .chart-value { font-size: 0.82rem; font-weight: 600; }
.chart-cell-value { font-family: var(--display); font-weight: 600; color: var(--film); }
.chart-legend { color: rgba(18, 33, 42, 0.78); }
.chart-panel-mark .chart-node-label,
.chart-panel-mark .chart-point-label {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 2.4px;
  fill: var(--deep);
  paint-order: stroke;
  stroke: var(--plate);
  stroke-width: 0.7px;
}
/* (Removed: a rule here hid every node label after the first, because a
   degree-ordered ring used to place the highest-degree nodes side by side and
   stack their labels. The builder now spaces its label choices around the ring,
   so all of them are legible and hiding them would throw away real labelling.
   Fixed upstream in spinup_site_build.py _network_marks.) */

/* --------------------------------------------------------------------------
   Team
   -------------------------------------------------------------------------- */

.team-grid {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
  max-width: none;
}
.team-card {
  margin: 0;
  background: var(--plate-hi);
  border: 1px solid var(--rule-soft);
  border-top: 3px solid var(--beam);
  border-radius: 3px 3px 12px 12px;
  padding: 22px;
}
.team-card h2 {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  color: var(--film);
  margin: 0 0 4px;
  max-width: none;
}
.team-card h2::before { content: none; }
.team-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--deep);
  margin: 0 0 12px;
}
.team-card p { font-size: 0.95rem; max-width: none; }
.team-link {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--deep);
}

/* --------------------------------------------------------------------------
   CTA band + footer — the dark bookend
   -------------------------------------------------------------------------- */

.cta-band {
  background: var(--film);
  background-image: var(--hatch);
  color: var(--plate);
  margin-top: 64px;
}
.cta-band .cta-inner {
  max-width: 984px;
  margin: 0 auto;
  padding: 40px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band p {
  margin: 0;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: clamp(1.04rem, 1.8vw, 1.24rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #fff;
  max-width: 46ch;
}
.cta-band .cta-btn {
  display: inline-block;
  background: var(--beam);
  color: var(--film);
  text-decoration: none;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 14px 26px;
  border-radius: 7px;
  white-space: nowrap;
}
.cta-band .cta-btn:hover { background: var(--lumen); }

.site-footer { background: var(--film-deep); color: var(--plate); }
.site-footer .footer-inner {
  max-width: 984px;
  margin: 0 auto;
  padding: 30px 22px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
.site-footer a { color: var(--lumen); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .footer-brand {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.site-footer .footer-meta { color: rgba(232, 237, 238, 0.6); font-size: 0.82rem; }
/* The column footer (brand.json "footer"): the wordmark, the contact lines stacked under
   their label, then the legal line (copyright, About) under a hairline. */
.site-footer .footer-columns { align-items: flex-start; padding-bottom: 18px; }
.site-footer .footer-contactcol { display: flex; flex-direction: column; gap: 4px; }
.site-footer .footer-contactcol h4 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-stretch: 112%;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--on-film-dim);
}
.site-footer .footer-bottom { padding-top: 16px; padding-bottom: 18px; border-top: 1px solid var(--rule-film); }
.site-footer .footer-legal { color: rgba(232, 237, 238, 0.6); font-size: 0.82rem; }

/* --------------------------------------------------------------------------
   Contact form
   -------------------------------------------------------------------------- */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 660px;
  margin-top: 30px;
  background: var(--plate-hi);
  border: 1px solid var(--rule-soft);
  border-radius: 14px;
  padding: 26px;
}
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label, .ccx-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--deep);
}
.contact-form input, .contact-form textarea, .ccx-form textarea, .ccx-form input[type="email"] {
  font-family: var(--body);
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
  background: var(--plate-hi);
  border: 1px solid var(--rule);
  border-radius: 7px;
  padding: 11px 13px;
}
.contact-form textarea { resize: vertical; }
.contact-form input:hover, .contact-form textarea:hover, .ccx-form textarea:hover, .ccx-form input[type="email"]:hover { border-color: var(--deep); }
.contact-form input:focus-visible, .contact-form textarea:focus-visible, .ccx-form textarea:focus-visible, .ccx-form input[type="email"]:focus-visible {
  outline: 3px solid var(--beam);
  outline-offset: 1px;
  border-color: var(--beam);
}
.contact-form button, .ccx-form button[type="submit"] {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--beam);
  color: var(--film);
  border: 0;
  border-radius: 7px;
  padding: 14px 28px;
  cursor: pointer;
  align-self: flex-start;
}
.contact-form button:hover, .ccx-form button[type="submit"]:hover { background: var(--lumen); }
.contact-form button:disabled { opacity: 0.65; cursor: wait; }

.form-note { font-size: 0.82rem; color: rgba(18, 33, 42, 0.7); max-width: 56ch; }
.form-success {
  background: var(--film);
  background-image: var(--hatch);
  color: #fff;
  border-radius: 14px;
  padding: 26px 28px;
  max-width: 660px;
}
.form-success h2 {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  color: #fff;
  font-size: 1.3rem;
  margin: 0 0 10px;
}
.form-success h2::before { content: none; }
.form-success p { color: var(--on-film-dim); margin: 0; }
.form-error { color: #B3261E; font-weight: 500; }
.form-error a { color: #B3261E; }

/* --------------------------------------------------------------------------
   Motion — one 120ms change, and nothing at all when reduced motion is asked for
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .site-nav a, .action-btn, .cta-band .cta-btn, .contact-form button,
  .dict-toc a, .site-logo, a {
    transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
  }
}

/* --------------------------------------------------------------------------
   Narrow viewports
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}

/* --header-h must never be smaller than the header's real height, or an
   in-page jump parks its heading underneath the pinned header. The height is
   set by how many rows the nav wraps into, which moves with the brand.json
   nav labels, so each band below is a measurement, not a design choice, and
   every boundary is rounded OUTWARD (the overshoot costs a little empty space
   above a jumped-to heading; an undershoot hides it). test_sqxray_nav_dropdowns.sh
   re-measures every width in a real browser and fails when a label change
   pushes a new row. */
/* The nav drops below the logo before the narrow layout takes over. */
@media (max-width: 870px) {
  :root { --header-h: 117px; }
}

@media (max-width: 760px) {
  /* Narrow screens get the same destinations, wrapped: the logo row carries
     the Contact pill (parked at the same coordinates on every page) and the
     links wrap over as many rows as they need, at 44px tap targets. Nothing
     is parked off-screen behind a horizontal scroll. */
  :root { --header-h: 147px; }
  .site-header {
    position: sticky;
    top: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 13px 20px 11px;
  }
  .site-nav {
    position: relative;
    width: 100%;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 -11px;
  }
  .site-nav a, .site-nav .nav-group-label, .site-nav .nav-group-toggle {
    flex: 0 0 auto;
    font-size: 0.85rem;
    line-height: 20px;
    padding: 12px 11px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  /* The caret is its own tap target, so it gets a finger's width of its own. */
  .site-nav .nav-group-label:has(+ .nav-group-toggle) { padding-right: 4px; }
  .site-nav .nav-group-toggle { padding-left: 4px; }
  .site-nav a[aria-current="page"]::after,
  .site-nav .nav-group[data-current] .nav-group-label::before { left: 11px; right: 11px; bottom: 5px; }
  /* Touch has no hover, so the panel opens on tap — a tap focuses the control,
     and :has(:focus) (not :focus-visible, which a tap never matches) is what
     that leaves behind. A group that owns a page puts that page on the label
     and the disclosure on the caret beside it, so one tap navigates and the
     other opens. Tapping anywhere else blurs it shut; a second tap on the
     caret does NOT close it, because CSS cannot toggle on a repeat activation
     and this nav carries no script. The panel spans the nav rather than its
     own label, so it can never hang off-screen: that means position:static on
     the group and the offsets on the nav. */
  .site-nav .nav-group { position: static; }
  /* The panel rides the pinned header, so page scroll cannot bring a link
     below the fold into reach: a group with enough children to outrun a
     landscape phone scrolls inside itself instead. */
  .site-nav .nav-sub {
    top: 100%;
    left: 0;
    right: 0;
    min-width: 0;
    margin-top: 2px;
    padding: 6px;
    max-height: calc(100dvh - var(--header-h) - 14px);
    overflow-y: auto;
    overscroll-behavior: contain;
    /* The default bar is light-on-white and sits on the film-dark panel. */
    scrollbar-width: thin;
    scrollbar-color: var(--beam) transparent;
  }
  .site-nav .nav-group:has(:focus) .nav-sub {
    clip-path: none;
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav .nav-sub a { padding: 12px 11px; }
}

/* Third and fourth nav rows: the links stop fitting two-up, then one-up. */
@media (max-width: 470px) {
  :root { --header-h: 191px; }
}

@media (max-width: 350px) {
  :root { --header-h: 235px; }
}

/* Touch-only narrow screens: hover is either absent or sticky (a tap leaves it
   behind until the next one), so tap-to-open is the ONLY thing that may open
   the group — otherwise a tapped-then-left group stays open under a phantom
   hover. Split out rather than nested so the cascade stays readable. */
@media (max-width: 760px) and (hover: none) {
  .site-nav .nav-group:hover .nav-sub {
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    pointer-events: none;
  }
  .site-nav .nav-group:has(:focus) .nav-sub {
    clip-path: none;
    opacity: 1;
    pointer-events: auto;
  }
  /* The pill wraps with the links instead of being parked over them: an
     absolutely-placed CTA sat on top of whichever link wrapped underneath it. */
  .site-nav .nav-cta {
    margin: 0;
    padding: 12px 17px;
  }

  .hero { padding-inline: 20px; }
  .hero h1 { max-width: none; }
  .hero p { max-width: none; }
  /* Buttons stack, so the beam becomes the stub above the headline. */
  .hero::after { top: 30px; bottom: auto; left: 20px; right: auto; width: 52px; }
  .hero .contact-actions { margin-top: 28px; }
  .hero .action-btn { width: 100%; text-align: center; }

  main { padding: 34px 20px 4px; }
  .quote-strip { padding: 0 20px; margin-top: 42px; }

  .section-split { grid-template-columns: 1fr; gap: 24px; }
  .section-split.flip .site-figure { order: 0; }
  .section-split.wrap .site-figure, .section-split.wrap.flip .site-figure { float: none; width: 100%; margin: 0 0 18px; }
  .card-grid, .card-grid.cards-2, .card-grid.cards-3,
  .card-grid.cards-4, .card-grid.cards-6 { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }

  .site-pullquote { padding: 26px 22px; border-radius: 12px; }
  .site-callout { padding: 20px 20px 20px 30px; }
  .site-callout::before { left: 14px; }

  .contact-form { padding: 20px; }
  .contact-form .form-row { grid-template-columns: 1fr; }
  .contact-form button { align-self: stretch; text-align: center; }

  .cta-band .cta-inner, .site-footer .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 20px;
  }
  .cta-band .cta-btn { align-self: stretch; text-align: center; }

  /* Placed explicitly, not auto-flowed: a full-width mark pushes the value
     onto a third line otherwise, and a row that reads label / mark / value
     down the page costs a whole scroll per series. */
  .chart-row, .series-row { grid-template-columns: 1fr auto; row-gap: 6px; }
  .chart-row .chart-label, .series-row .series-label { grid-area: 1 / 1; }
  .chart-row .chart-value, .series-row .series-value { grid-area: 1 / 2; }
  .chart-row .chart-mark, .series-row .sparkline { grid-area: 2 / 1 / 3 / -1; }
  /* A full-width ranking bar becomes a slab at this width. Capping the mark
     box (rather than its ratio -- see the note on .chart-mark) keeps every
     bar on one shared scale while dropping the height with it. */
  .chart-compare .chart-row { grid-template-columns: 1fr auto; }
  .chart-compare .chart-mark { max-width: 230px; }
}

@media (max-width: 430px) {
  .stat-strip { grid-template-columns: 1fr; gap: 18px; }
  .site-figure { padding: 5px; border-radius: 9px; }
  .dict-toc a { font-size: 0.76rem; padding: 6px 10px; }
  .step-flow li { padding-left: 42px; }
}

/* subsite overlay (spinup_config/<site>/subsite/site.css) */
/* The funds subsite's additions to sqxray's sheet (spinup_subsite.py appends this file).
   1. One header row, in the header's own film-and-beam language: the logo, the menu,
      then the utility menu (brand.json subsite.brand.header_actions: Fund Search,
      Coverage check, Contact). The row's layout is the builder's (subsite.brand
      header_layout: the menu folds behind the menu button below 1280px, and
      Coverage check and Contact join the open menu below 761px); this sheet sets
      its look. Contact opens /get-started/, so the menu's own Get started button
      (nav-cta) hides.
   2. The imported Explorer (sqx apps/explorer) lays out the list as main.results, a cell
      of the app's grid. sqxray's prose main (order 2 in the body's flex column, a 940px
      measure, its padding) would move the list out of its cell and squeeze it, so the
      list takes none of it. A fund's page (.detail-view) keeps the app's own measure,
      whose class rule outranks the site's bare main rule.
   3. The imported apps read the main site's tokens (spinup_config/sqx/site.css :root),
      set here in sqxray's teal, film and ink. The Explorer's type takes sqxray's
      Archivo and IBM Plex Sans: html:root outranks the app's own :root, which loads
      after this sheet and names a Roboto the site does not load.
   4. A fund's page (the Explorer's instrument page, body.view-detail) wears the Fund
      Explorer's plate, as /explorer/ draws it: see "The instrument page" below. */
:root {
  --header-h: 70px;
  --accent: var(--deep);
  --accent-deep: var(--film);
  --accent-wash: var(--panel);
  --accent-line: var(--rule);
  --navy: var(--film);
  --text: var(--ink);
  --muted: rgba(18, 33, 42, 0.78);
  --faint: rgba(18, 33, 42, 0.7);
  --label: rgba(18, 33, 42, 0.7);
  --line: var(--rule);
  --font-sans: var(--body);
  --fw-medium: 500;
  --fs-lead: 18px;
  --fs-ui: 14px;
  --fs-small: 13px;
  --sqx-ink: var(--ink);
  --sqx-body: var(--ink);
  --sqx-grey: rgba(18, 33, 42, 0.7);
  --sqx-line-soft: var(--rule-soft);
}
html:root {
  --head: var(--display);
  --body: var(--sans);
}
/* The instrument page: the Fund Explorer app's navy ground, panels and rules, its text
   scale (fund-map app.jsx TEXT) and its chart hues, validated on that ground (app.jsx
   SECTOR_COLORS), set as the tokens the Explorer's sheets read. They are set on the page's
   main, so the site header and footer keep the site's. A token the Explorer's :root
   derives from another (--blue from --accent, --u1 from --chart-1) is resolved there, so
   each is set here itself; test_sqxray_detail_plate.sh holds every colour token the
   page's sheets read to that. The film ground's tokens stay the site's, the beam the
   accent on both grounds:
   kept: --beam --lumen --film-deep --on-film-dim --rule-film --site-header-bg */
html:has(> body.view-detail) { color-scheme: dark; }
body.view-detail { background: #0A0E18; }
body.view-detail .detail-view {
  color-scheme: dark;
  color: var(--ink);
  --film: #F2F5FA; --navy: #F2F5FA; --accent-deep: #F2F5FA;
  --ink: #D8DFEA; --text: #D8DFEA; --sqx-ink: #D8DFEA; --sqx-body: #D8DFEA;
  --muted: #93A0B6; --cushion-k: #AEB6BF;
  --na: #7488AC; --faint: #7488AC; --label: #7488AC; --sqx-grey: #7488AC;
  --page: #0A0E18; --plate: #0A0E18;
  --panel: #111827; --plate-hi: #111827; --accent-wash: #111827;
  --panel-2: #151D30; --accent-bg: #131C30; --pin-bg: #131C30;
  --line: #1E2B42; --rule: #1E2B42; --accent-line: #1E2B42;
  --rule-soft: #151D30; --sqx-line-soft: #151D30;
  --accent: var(--beam); --blue: var(--beam); --kept: var(--beam); --focus: var(--beam); --deep: var(--beam);
  --removed: #46618F;
  --warn: #C98500; --warn-ink: #F09442;
  --good: #199E70; --bad: #E66767;
  --barrier: #C98500; --trigger: #9085E9; --eval: #9085E9;
  --u1: #3987E5; --u2: #D95926; --u3: #199E70; --u4: #9085E9;
  --u5: #C98500; --u6: #D55181; --u7: #687A84; --u8: #279FC4;
  --c-corporate_bond: #3987E5; --c-municipal_bond: #D95926; --c-government_bond: #B5813C;
  --c-structured_note: #199E70; --c-cd: #9085E9; --c-fund: #C98500;
  --c-alternative_investment: #D55181; --c-equity: #279FC4; --c-index: #687A84;
}
/* the API call box takes the ink as its ground (styles.css .api), which here is the text */
body.view-detail .detail-view .api { background: #131C30; color: var(--ink); border: 1px solid var(--line); }
.site-nav .nav-cta { display: none; }
/* the row: the header spans 1240px here, not sqxray's 940px column, so the menu, the
   search and both buttons fit on it; its side padding scales with the window */
.site-header {
  --header-row-h: var(--header-h);
  --control-h: 38px;
  --header-gap: 14px;
  padding: 0 max(clamp(16px, 2vw, 22px), calc(50% - 620px));
}
.header-search { position: relative; display: flex; align-items: center; }
.header-search-toggle { display: none; }
.header-search-input {
  font: 400 0.82rem/1.3 var(--body);
  color: var(--plate);
  background: rgba(232, 237, 238, 0.07);
  border: 1px solid var(--rule-film);
  border-radius: 5px;
  padding: 0 34px 0 11px;
}
.header-search-input::placeholder { color: var(--on-film-dim); }
.header-search-input:focus { outline: none; border-color: var(--beam); background: rgba(232, 237, 238, 0.12); }
.header-search-submit {
  position: absolute;
  right: 4px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235FE0E6' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.header-search-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(440px, calc(100vw - 40px));
  max-height: 62vh;
  overflow: auto;
  list-style: none;
  padding: 6px 0;
  background: var(--plate-hi);
  color: var(--ink);
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(7, 24, 32, 0.32);
  z-index: 200;
}
.header-search-list > li { display: flex; flex-direction: column; gap: 1px; padding: 8px 14px; cursor: pointer; }
.header-search-list > li[aria-selected="true"], .header-search-list > li:hover { background: var(--panel); }
.header-search-list .hs-name { font-weight: 600; font-size: 0.9rem; color: var(--film); }
.header-search-list .hs-meta { font-size: 0.74rem; color: rgba(18, 33, 42, 0.68); }
.header-search-list > .hs-all, .header-search-list > .hs-beyond { border-top: 1px solid var(--rule-soft); }
.header-search-list > .hs-all .hs-name, .header-search-list > .hs-beyond .hs-name { color: var(--deep); }
.header-search-list > .hs-all .hs-name::after, .header-search-list > .hs-beyond .hs-name::after { content: " \2192"; }
.header-action {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.77rem;
  letter-spacing: 0.01em;
  color: var(--on-film-dim);
  text-decoration: none;
  padding: 0 12px;
  border-radius: 5px;
  border: 1px solid var(--rule-film);
}
.header-action:hover { color: #fff; border-color: var(--beam); }
.header-action-button { color: var(--lumen); border-color: var(--beam); }

.layout > main.results { order: 0; max-width: none; width: auto; margin: 0; padding: 0; flex: none; }

/* The open menu (below 1280px) is a panel under the row, each group a label whose
   links open under it on a tap (sqxray's :has(:focus) rule). */
@media (max-width: 1279px) {
  .nav-menu-btn {
    border: 1px solid var(--rule-film);
    border-radius: 5px;
    background: none;
    color: var(--plate);
  }
  .nav-menu-btn:hover, .nav-open .nav-menu-btn { border-color: var(--beam); color: #fff; }
  .site-nav { gap: 0; padding: 2px 0 6px; overscroll-behavior: contain; }
  .site-nav > a, .site-nav .nav-group { border-top: 1px solid var(--rule-film); }
  .site-nav a, .site-nav .nav-group-label, .site-nav .nav-group-toggle {
    display: flex;
    align-items: center;
    padding: 0 4px;
    font-size: 0.85rem;
  }
  .site-nav .nav-group { position: static; display: flex; flex-wrap: wrap; }
  .site-nav .nav-group-label { flex: 1; }
  .site-nav .nav-group-toggle { width: 44px; justify-content: center; }
  .site-nav a[aria-current="page"]::after,
  .site-nav .nav-group[data-current] .nav-group-label::before { left: 4px; right: auto; width: 28px; bottom: 6px; }
  .site-nav .nav-sub {
    position: static;
    display: none;
    flex-basis: 100%;
    min-width: 0;
    max-height: none;
    margin: 0 0 6px;
    padding: 0 0 0 14px;
    background: none;
    border: 0;
    box-shadow: none;
    clip-path: none;
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav .nav-group:has(:focus) .nav-sub { display: flex; }
  .site-nav .nav-sub a { min-height: 40px; }
}

/* A phone: the field fills the row, so its suggestions open from its left edge. */
@media (max-width: 760px) {
  .header-search-list { left: 0; right: auto; }
}

/* The imported coverage check lays its page out (app.css) and takes its fields, labels
   and submit button from the site's contact form rules (site.css, .ccx-form beside
   .contact-form); its labels stand beside their fields, so the fields fill the column. */
.ccx-form label { margin: 14px 0 6px; }
.ccx-form textarea, .ccx-form input[type="email"] { display: block; width: 100%; }

/* The home page's graph (apps/fund-graph, the subsite overlay's live plate): the
   window's full width, edge to edge, one screen tall under the sticky header, as
   sqxray.com's /fund-explorer/ page draws it. 100vw reaches past main's 940px
   measure but counts a desktop scrollbar, so the fragment's script sets --sbw to the
   scrollbar's width and the plate takes the window less it; without the script the
   page clips the half scrollbar width the plate overhangs on each side. */
body.page-home { overflow-x: clip; }
.app-embed[data-app="fund-graph"] {
  width: calc(100vw - var(--sbw, 0px));
  margin: 0 0 44px calc(50% - 50vw + var(--sbw, 0px) / 2);
}
/* the plate meets the hero: main's top padding would leave a band of page between them */
.page-home main:has(> .app-embed[data-app="fund-graph"]) { padding-top: 0; }
.fx-stage { background: #0A0E18; }
.fx-stage #fx-root.fx-embed { height: calc(100svh - var(--header-h)); min-height: 560px; border-radius: 0; }
.fx-stage .fx-noscript { margin: 0; }

/* The "Search in Explorer" link above the plate is the legacy site's caption for its
   screenshot; the subsite's plate is the Explorer's graph itself. */
.page-home main > p:has(+ .app-embed[data-app="fund-graph"]) { display: none; }

/* an image in page content fits its column (spinup_site_build.py) */
:where(main img) { max-width: 100%; height: auto; }

/* the header search field shows its whole placeholder (spinup_site_build.py) */
.header-search { min-width: min-content; }
.header-search-input { min-width: min(calc(var(--placeholder-ch) * 0.85ch + 4em), calc(100vw - 4rem)); }

/* the header row (spinup_site_build.py header_layout_css) */
.site-header { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; column-gap: var(--header-gap, 12px); row-gap: 0; }
.site-header > .site-logo { order: 1; flex: none; display: flex; align-items: center; min-height: var(--header-row-h, 64px); }
.site-header > .header-actions { order: 3; flex: 1 1 auto; display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; }
.site-header > .header-actions > .header-search { flex: 0 1 600px; width: auto; max-width: none; height: var(--control-h, 42px); margin: 0 auto 0 0; }
.site-header > .header-actions .header-search-input { box-sizing: border-box; flex: 1 1 auto; width: 100%; height: var(--control-h, 42px); min-height: 0; margin: 0; }
.site-header > .header-actions > .header-action { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; height: var(--control-h, 42px); min-height: 0; margin: 0; white-space: nowrap; }
.site-header > :not(.nav-menu-btn, .site-logo, .header-actions, .site-nav) { order: 4; flex: none; }
.site-header > .site-nav { order: 2; flex: none; }
.site-header > .header-actions { flex-basis: 0; }
.site-header > .nav-menu-btn { display: none; }
@media (max-width: 1279px) {
  .site-header > .nav-menu-btn { order: 0; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: var(--control-h, 42px); height: var(--control-h, 42px); min-height: 0; margin: 0; padding: 0; font-size: 0; cursor: pointer; }
  /* three bars; the button's text stays its accessible name */
  .site-header > .nav-menu-btn::before { content: ""; width: 18px; height: 2px; background: currentColor; box-shadow: 0 -6px currentColor, 0 6px currentColor; }
  .site-header > .site-nav { order: 5; flex: 1 1 100%; display: none; flex-direction: column; align-items: stretch; height: auto; margin: 0; }
  .site-header.nav-open > .site-nav { display: flex; max-height: calc(100dvh - var(--header-row-h, 64px)); overflow-y: auto; }
  .site-header > .site-nav .nav-row { display: flex; flex-direction: column; align-items: stretch; }
  .site-header > .site-nav :is(a, .nav-group-label, .nav-group-toggle) { min-height: 44px; }
  .site-header > .site-nav .nav-group { display: flex; flex-wrap: wrap; align-items: stretch; }
  .site-header > .site-nav .nav-group > .nav-group-label { flex: 1; }
  .site-header > .site-nav .nav-group:hover > .nav-sub { display: none; }
  .site-header > .site-nav .nav-group:focus-within > .nav-sub { display: block; position: static; flex-basis: 100%; transform: none; box-shadow: none; }
}
@media (max-width: 760px) {
  .site-header > .header-actions .header-search[data-placeholder-narrow] .header-search-input { min-width: min(calc(var(--placeholder-narrow-ch) * 0.85ch + 4em), calc(100vw - 4rem)); }
  .site-header > .header-actions { display: contents; }
  .site-header > .header-actions > .header-search { order: 2; flex: 1 1 0; margin: 0; }
  .site-header > .header-actions > .header-action, .site-header > :not(.nav-menu-btn, .site-logo, .header-actions, .site-nav) { display: none; order: 6; }
  .site-header.nav-open > .header-actions > .header-action { display: inline-flex; flex: 1 1 0; margin-bottom: 16px; }
  .site-header.nav-open > :not(.nav-menu-btn, .site-logo, .header-actions, .site-nav) { display: flex; order: 7; flex: 1 1 100%; margin-bottom: 16px; }
}

/* text only a screen reader reads (spinup_site_build.py) */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* the footer's links to the other SQX sites (spinup_site_build.py) */
:where(.footer-family) { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 6px 18px; padding: 14px 16px 18px; font-size: 13px; }
:where(.footer-family-label) { font-weight: 600; }
:where(.footer-family ul) { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
:where(.footer-family a) { color: inherit; }

.site-header { position: sticky; top: 0; z-index: 100; }
.sqx-bar {
  position: relative; display: flex; justify-content: center; align-items: center;
  min-height: 28px; padding-inline: 2.25rem; text-align: center;
  background: var(--sqx-bar-bg, #abcdea); color: var(--sqx-bar-ink, #101820);
  font: 500 .75rem/1.25 system-ui, sans-serif;
}
.sqx-bar[hidden] { display: none; }
.sqx-bar a { color: inherit; text-decoration: underline; }
.sqx-bar button { position: absolute; right: .375rem; top: 50%; transform: translateY(-50%);
  width: 24px; min-height: 24px; padding: 0;
  background: transparent; border: 0; color: inherit; font: 1.125rem/1 system-ui; cursor: pointer; }
.sqx-bar :focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
@media print { .sqx-bar { display: none; } }
