/* Sovereign Frontier — shared design system
 * Used by all 8 category pages.
 */

:root {
  --bg-base: #FAFAF8;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1EFE8;
  --text-primary: #1A1A1A;
  --text-secondary: #5F5E5A;
  --text-tertiary: #888780;
  --border-subtle: rgba(0,0,0,0.06);
  --border-default: rgba(0,0,0,0.14);
  --border-strong: rgba(0,0,0,0.28);

  --sealed-bg: #E1E9F8;
  --sealed-fg: #26215C;
  --sealed-accent: #26215C;
  --hardened-bg: #E1F5EE;
  --hardened-fg: #04342C;
  --hardened-accent: #0F6E56;
  /* Closed: a third-party listing of a closed-weight model, nothing held.
     Deliberately the most neutral of the tier colours — it is an absence of
     evidence, not a warning, so it must not borrow quarantine's amber. */
  --closed-bg: #ECEEF2;
  --closed-fg: #3F4754;
  --closed-accent: #6B7484;
  --quarantine-bg: #FAEEDA;
  --quarantine-fg: #412402;
  --quarantine-accent: #BA7517;
  --interdicted-bg: #FCEBEB;
  --interdicted-fg: #501313;
  --interdicted-accent: #A32D2D;
  /* "Favourited" state. Its own pair rather than borrowing --quarantine-*,
     which is a security tier and would read as a warning on a starred item.
     Light values preserve the previous hardcoded appearance exactly. */
  --fav-fg: #B8860B;
  --fav-border: #E3C766;

  --info-bg: #E6F1FB;
  --info-fg: #26215C;

  /* Interactive/brand accent — the theme blue (info family). Used for
     primary buttons, the search control, the agent FAB, links, and focus
     rings. Distinct from the Sealed-tier purple, which stays semantic. */
  --accent: #26215C;
  --accent-contrast: #ffffff;
  --accent-glow: rgba(38,33,92,0.32);
  --accent-ring: rgba(38,33,92,0.16);

  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.55;
  /* A single overflowing element (a long hash, a wide table, a code block)
     otherwise makes the entire page pan sideways on a phone, which reads as
     a broken site. Wide content scrolls inside its own container instead —
     see .table-scroll and the pre/code rules. */
  overflow-x: hidden;
}

/* Long unbroken strings are everywhere here — SHA-256 digests, model ids,
   rekor URLs — and each one is a candidate for blowing out the layout. */
code, kbd, samp, .handle, .av-row .v { overflow-wrap: anywhere; }
img, svg, video, canvas { max-width: 100%; height: auto; }
pre { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Opt-in wrapper for wide tables: scrolls itself rather than the page. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

h1 { font-size: 32px; font-weight: 500; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; margin: 0; }
h3 { font-size: 16px; font-weight: 500; margin: 0; }

.app { max-width: 1440px; margin: 0 auto; }

/* TOP NAV */
.top-nav {
  display: flex; align-items: center; gap: 28px;
  padding: 12px 24px;
  border-bottom: 0.5px solid var(--border-subtle);
  background: var(--bg-surface);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 16px; letter-spacing: 0.5px; text-decoration: none; color: inherit; }
.brand svg { flex-shrink: 0; }
.nav-tabs { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.nav-tab {
  padding: 6px 12px; font-size: 13px;
  color: var(--text-secondary); text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.12s, color 0.12s; cursor: pointer;
}
.nav-tab:hover { background: var(--bg-subtle); color: var(--text-primary); }
.nav-tab.active { color: var(--text-primary); font-weight: 500; background: var(--bg-subtle); }
.nav-right { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.clearance-pill { background: var(--info-bg); color: var(--info-fg); padding: 3px 9px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 500; }

/* SF·R (restricted) dark nav — emitted by SF.renderNav when the page is
   a restricted-tier page. Strict B&W on a black canvas, mono uppercase.   */
.sfr-nav {
  display: flex; align-items: center; gap: 24px;
  padding: 12px 24px;
  background: #000000;
  border-bottom: 1px solid #2a2a2a;
  position: sticky; top: 0; z-index: 10;
}
.sfr-nav .brand {
  display: flex; align-items: center; gap: 10px;
  color: #ffffff; text-decoration: none;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 11px; letter-spacing: 0.2em; font-weight: 700;
  flex-shrink: 0;
}
.sfr-nav .brand svg { color: #ffffff; }
.sfr-nav .nav-tabs { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; margin-left: 8px; }
.sfr-nav .nav-tab {
  padding: 6px 10px;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #b8b8b8; text-decoration: none;
  border: 1px solid transparent; border-radius: 0;
  background: transparent;
}
.sfr-nav .nav-tab:hover { color: #ffffff; background: transparent; border-color: rgba(255,255,255,0.18); }
.sfr-nav .nav-tab.active {
  color: #000000; background: #ffffff; border-color: #ffffff; font-weight: 700;
}
.sfr-nav .nav-right { flex-shrink: 0; }
.sfr-nav .sfr-pill {
  background: #ffffff; color: #000000;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  padding: 4px 10px;
}

/* SF·R CUI banner — top + fixed-bottom marking; injected on every SF·R page
   for consistent classification chrome. */
.cui-banner {
  background: #ffffff;
  color: #000000;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-align: center;
  padding: 6px 12px;
  text-transform: uppercase;
  border-bottom: 1px solid #000000;
}
.cui-banner-bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  border-top: 1px solid #000000;
  border-bottom: none;
}

/* SF·R chrome-bar — session / org / tier strip that sits between the
   top CUI banner and the dark nav on every Government page. Emitted
   globally by SF.renderNav so all 9 SF·R pages share identical chrome. */
.chrome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: #000000;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 11px;
  color: #b8b8b8;
}
.chrome-bar .left  { display: flex; gap: 16px; align-items: center; }
.chrome-bar .right { display: flex; gap: 12px; align-items: center; }
.chrome-bar .chrome-val { color: #ffffff; }
.chrome-bar a { color: #b8b8b8; text-decoration: none; }
.chrome-bar a:hover { color: #ffffff; }
.sfr-badge {
  padding: 3px 8px;
  background: #ffffff; color: #000000;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  font-size: 11px;
}
.tier-badge {
  padding: 3px 8px;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  letter-spacing: 0.18em; font-weight: 700;
  font-size: 11px;
}

/* SF·R body canvas — every Government page gets the same dark grid canvas
   as the Overview page. theme.js adds body.sfr-page on URL-regex match. */
body.sfr-page {
  background: #0a0a0a;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px;
  min-height: 100vh;
  padding-bottom: 52px;
}

/* PAGE HEADER */
.page-header { padding: 36px 24px 20px; }
.eyebrow { font-size: 11px; letter-spacing: 0.8px; color: var(--text-tertiary); text-transform: uppercase; font-weight: 500; margin-bottom: 10px; }
.page-header p { color: var(--text-secondary); max-width: 640px; margin: 10px 0 0; }

/* METRIC STRIP */
.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 24px 24px; }
.metric-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.1s, filter 0.1s;
  border: 0.5px solid transparent;
}
.metric-card:hover { transform: translateY(-1px); filter: brightness(0.98); }
.metric-card.active { outline: 2px solid currentColor; outline-offset: -2px; }
.metric-card .label { font-size: 11px; letter-spacing: 0.5px; font-weight: 500; margin-bottom: 4px; opacity: 0.82; text-transform: uppercase; }
.metric-card .value { font-size: 26px; font-weight: 500; line-height: 1.1; }
.metric-card.tier-sealed { background: var(--sealed-bg); color: var(--sealed-fg); }
.metric-card.tier-hardened { background: var(--hardened-bg); color: var(--hardened-fg); }
.metric-card.tier-closed { background: var(--closed-bg); color: var(--closed-fg); }
.metric-card.tier-quarantine { background: var(--quarantine-bg); color: var(--quarantine-fg); }
.metric-card.tier-interdicted { background: var(--interdicted-bg); color: var(--interdicted-fg); }

/* LAYOUT */
.layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding: 0 24px 48px; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } .filter-sidebar { position: static !important; max-height: none !important; } }

/* FILTER SIDEBAR */
.filter-sidebar {
  position: sticky; top: 68px;
  align-self: start;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  padding-right: 4px;
}
.filter-section { padding: 16px 0; border-bottom: 0.5px solid var(--border-subtle); }
.filter-section:first-child { padding-top: 0; }
.filter-section:last-child { border-bottom: none; }
.filter-section h4 {
  font-size: 11px; letter-spacing: 0.8px;
  color: var(--text-tertiary);
  margin: 0 0 10px; font-weight: 500;
  text-transform: uppercase;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  padding: 5px 10px; font-size: 12px;
  border-radius: 999px;
  border: 0.5px solid var(--border-default);
  background: transparent;
  cursor: pointer;
  transition: all 0.12s;
  font-family: inherit;
  color: inherit;
}
.chip:hover { background: var(--bg-subtle); }
.chip.active { background: var(--text-primary); color: var(--bg-surface); border-color: var(--text-primary); }

/* RESULTS AREA */
.results-area { min-width: 0; }
.controls-row { display: flex; gap: 8px; margin-bottom: 20px; align-items: center; }
.search-input {
  flex: 1; padding: 8px 12px 8px 34px;
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  font-family: inherit; font-size: 13px;
  background: var(--bg-surface) url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='6' cy='6' r='4.5' fill='none' stroke='%23888780' stroke-width='1.2'/%3E%3Cline x1='9.5' y1='9.5' x2='12.5' y2='12.5' stroke='%23888780' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 10px center;
}
.search-input:focus { outline: none; border-color: var(--text-primary); }
.sort-select {
  padding: 8px 12px;
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  font-family: inherit; font-size: 13px;
  background: var(--bg-surface);
  cursor: pointer;
}

/* SOTA SECTION */
.sota-section {
  padding: 20px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; flex-wrap: wrap; gap: 10px; }
.section-title { font-size: 11px; letter-spacing: 0.8px; color: var(--text-tertiary); text-transform: uppercase; font-weight: 500; margin: 0; }
.section-link { font-size: 12px; color: var(--text-secondary); text-decoration: none; cursor: pointer; }
.section-link:hover { color: var(--text-primary); }
.sota-desc { font-size: 13px; color: var(--text-secondary); margin: 0 0 14px; line-height: 1.55; }
.sota-table { background: var(--bg-base); border-radius: var(--radius-md); font-family: var(--font-mono); }
.sota-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px; padding: 10px 14px;
  border-top: 0.5px solid var(--border-subtle);
  align-items: baseline;
}
.sota-row:first-of-type { border-top: none; }
.sota-rank { color: var(--text-tertiary); font-size: 12px; }
.sota-row.top .sota-rank { color: var(--text-primary); font-weight: 500; }
.sota-row.top .sota-name { font-weight: 500; }
.sota-name { font-size: 13px; margin-bottom: 1px; }
.sota-meta { font-size: 10px; color: var(--text-tertiary); }
.sota-score { font-size: 13px; white-space: nowrap; }
.sota-row.top .sota-score { font-weight: 500; }

/* FEATURED CARD */
.featured-card {
  background: var(--sealed-bg);
  border: 2px solid var(--sealed-accent);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}
.featured-label { font-size: 11px; letter-spacing: 0.8px; color: var(--sealed-fg); font-weight: 500; margin-bottom: 8px; text-transform: uppercase; }
.featured-name { font-size: 20px; font-weight: 500; color: var(--sealed-fg); margin: 0 0 2px; letter-spacing: -0.01em; }
.featured-publisher { font-family: var(--font-mono); font-size: 12px; color: var(--sealed-fg); opacity: 0.72; margin: 0 0 10px; }
.featured-desc { font-size: 13px; color: var(--sealed-fg); margin: 0 0 12px; line-height: 1.55; }
.featured-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.featured-tag { background: rgba(255,255,255,0.78); color: var(--sealed-fg); font-size: 10px; padding: 3px 8px; border-radius: var(--radius-sm); font-weight: 500; font-family: var(--font-mono); letter-spacing: 0.3px; }

/* CARDS / LIST */
.list-header { display: flex; justify-content: space-between; margin-bottom: 10px; align-items: baseline; font-size: 12px; color: var(--text-secondary); }
.artifact-grid { display: flex; flex-direction: column; gap: 8px; }
.artifact-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.artifact-card:hover { border-color: var(--border-default); }
.artifact-card.expanded { border-color: var(--border-default); }
.card-header { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.card-main { min-width: 0; }
.card-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.card-name { font-size: 15px; font-weight: 500; margin: 0; letter-spacing: -0.005em; }
.card-handle { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); margin: 0 0 6px; }
.card-desc { font-size: 12px; color: var(--text-secondary); margin: 0 0 8px; line-height: 1.5; }
.card-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag { background: var(--bg-subtle); color: var(--text-secondary); font-size: 10px; padding: 2px 7px; border-radius: var(--radius-sm); font-family: var(--font-mono); letter-spacing: 0.3px; }
.card-meta { text-align: right; font-size: 10px; color: var(--text-tertiary); white-space: nowrap; font-family: var(--font-mono); }
.card-meta p { margin: 0 0 2px; }
/* Per-model download-format dropdown (native <details>) */
.dl-dd { position: relative; display: inline-block; margin-top: 7px; }
/* Uses var(--accent), not a literal — the accent flips to a lighter blue in
   dark mode, and a hardcoded value left these buttons dark purple there while
   the rest of the page had already switched. Also lightened from a solid fill
   to an outline: a card can carry several of these, and nine solid dark
   buttons down a page pulled the eye away from the content they belong to. */
.dl-dd > summary {
  list-style: none; cursor: pointer; font-family: var(--font-mono); font-size: 10px;
  padding: 4px 10px; border-radius: 4px; white-space: nowrap; user-select: none;
  border: 0.5px solid color-mix(in srgb, var(--accent) 42%, transparent);
  background: transparent; color: var(--accent); font-weight: 600;
  transition: background .12s, border-color .12s, color .12s;
}
.dl-dd > summary::-webkit-details-marker { display: none; }
.dl-dd > summary:hover,
.dl-dd[open] > summary { background: var(--accent); border-color: var(--accent); color: #fff; }
.dl-menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 230px; text-align: left; background: var(--bg-surface); border: 0.5px solid var(--border-default); border-radius: 7px; box-shadow: 0 10px 28px rgba(0,0,0,0.18); z-index: 1000; overflow: hidden; }
/* Lift the card whose download dropdown is open above its grid siblings so the
   popup overlays them instead of being painted under the next card. */
.artifact-card { position: relative; }
.artifact-card:has(.dl-dd[open]) { z-index: 1000; }
.dl-menu a { display: block; padding: 8px 12px; font-size: 12px; font-family: var(--font-sans); color: var(--text-primary); text-decoration: none; border-bottom: 0.5px solid var(--border-subtle); white-space: normal; }
.dl-menu a:last-child { border-bottom: 0; }
.dl-menu a:hover { background: var(--bg-base); color: var(--accent); }
.dl-menu a .fmt-sub { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--text-tertiary); margin-top: 1px; }

/* TIER BADGE */
.tier-badge {
  display: inline-block;
  font-size: 10px; padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-weight: 500; letter-spacing: 0.3px;
  font-family: var(--font-mono);
  text-transform: uppercase;
}
.tier-badge.sealed { background: var(--sealed-bg); color: var(--sealed-fg); }
.tier-badge.hardened { background: var(--hardened-bg); color: var(--hardened-fg); }
.tier-badge.closed { background: var(--closed-bg); color: var(--closed-fg); }
.tier-badge.quarantine { background: var(--quarantine-bg); color: var(--quarantine-fg); }
.tier-badge.interdicted { background: var(--interdicted-bg); color: var(--interdicted-fg); }

/* EXPANDED CARD */
.expanded-content {
  margin-top: 14px; padding-top: 14px;
  border-top: 0.5px solid var(--border-subtle);
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 720px) { .expanded-content { grid-template-columns: 1fr; } }
.expanded-section h5 { font-size: 10px; letter-spacing: 0.8px; color: var(--text-tertiary); margin: 0 0 8px; font-weight: 500; text-transform: uppercase; }
.attest-block {
  font-family: var(--font-mono); font-size: 10.5px; line-height: 1.8;
  color: var(--text-secondary);
  background: var(--bg-base);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}
/* Field name / value pairs.
   This was `display: inline-block; width: 110px`, which at 10.5px monospace is
   about 17 characters — so any longer key ran straight into its own value.
   Eleven keys in the registry exceed it, including ones on every artifact
   (attestation_method) and most models (aa_intelligence_index,
   weight_manifest_sha256). A two-track grid cannot collide: the name column
   sizes to its content, the value takes the rest and wraps. */
.attest-block .kv {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
  column-gap: 14px;
  align-items: baseline;
}
.attest-block .k { color: var(--text-primary); white-space: nowrap; }
.attest-block .v { color: var(--text-secondary); overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 640px) {
  /* Long keys plus a hash leave no usable value column on a phone. */
  .attest-block .kv { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .attest-block .kv .v { padding-bottom: 4px; }
}
.prov-block { font-family: var(--font-mono); font-size: 11px; line-height: 1.7; color: var(--text-secondary); }
.prov-label { font-size: 10px; color: var(--text-tertiary); margin-bottom: 4px; letter-spacing: 0.3px; }
.prov-chip {
  display: inline-block;
  background: var(--hardened-bg);
  color: var(--hardened-fg);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  margin: 2px 3px 2px 0;
  font-size: 10px; font-weight: 500;
}
.prov-chip.sealed { background: var(--sealed-bg); color: var(--sealed-fg); }
.prov-chip.dataset { background: #FDF1E0; color: #5B3E14; }

/* ACTIONS */
.expanded-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.btn {
  padding: 6px 14px; font-size: 12px;
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  background: transparent;
  font-family: inherit; cursor: pointer;
  color: inherit;
  transition: background 0.1s, border-color 0.1s;
}
.btn:hover { background: var(--bg-subtle); }
.btn.primary { background: var(--text-primary); color: var(--bg-surface); border-color: var(--text-primary); }
.btn.primary:hover { background: #333; }

/* EMPTY STATE */
.empty-state {
  padding: 56px 24px; text-align: center;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 0.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
.empty-state h3 { color: var(--text-primary); margin-bottom: 4px; font-weight: 500; }
.empty-state p { margin: 0; font-size: 13px; }

/* FOOTER */
.footer {
  padding: 32px 24px 48px;
  font-size: 11px; color: var(--text-tertiary);
  border-top: 0.5px solid var(--border-subtle);
  font-family: var(--font-mono);
  line-height: 1.7;
}
.footer a { color: var(--text-secondary); }

/* CATEGORY-SPECIFIC EXTENSIONS */

/* Datasets: subset viz + PII scan */
.subset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin-top: 8px; }
.subset-tile {
  padding: 8px 10px;
  background: var(--bg-base);
  border-left: 2px solid var(--hardened-accent);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 10px;
}
.subset-tile.flagged { border-left-color: var(--quarantine-accent); }
.subset-tile.passed { border-left-color: var(--hardened-accent); }
.subset-tile .sub-name { font-weight: 500; color: var(--text-primary); font-size: 10px; }
.subset-tile .sub-meta { color: var(--text-tertiary); font-size: 9px; }
.pii-scan {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px;
}
.pii-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--hardened-bg);
  color: var(--hardened-fg);
}
.pii-chip.flagged { background: var(--quarantine-bg); color: var(--quarantine-fg); }
.pii-chip.interdicted { background: var(--interdicted-bg); color: var(--interdicted-fg); }

/* Architectures: paradigm tag */
.paradigm-pill {
  display: inline-block;
  padding: 2px 7px; font-size: 10px;
  background: #F2EDF7; color: #3B2259;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-weight: 500;
  letter-spacing: 0.3px;
}

/* Protocols: interop matrix */
.interop-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
}
.interop-cell {
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  text-align: center;
  background: var(--hardened-bg);
  color: var(--hardened-fg);
}
.interop-cell.partial { background: var(--quarantine-bg); color: var(--quarantine-fg); }
.interop-cell.none { background: var(--bg-subtle); color: var(--text-tertiary); }

/* Processors: supply chain */
.supply-chain { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; font-family: var(--font-mono); font-size: 10px; }
.supply-node {
  padding: 3px 8px;
  background: var(--bg-base);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-sm);
}
.supply-arrow { color: var(--text-tertiary); }

/* ═══════════════════════════════════════════════════════════════════════
   Marketing surface — used by /products-live.html and /product/*.html.
   Same color tokens as the engineering pages, looser spacing, bigger
   typography. The product pages should feel like marketing, not docs.
   ═══════════════════════════════════════════════════════════════════════ */

/* Hero — for product detail pages */
.mkt-hero { padding: 96px 24px 80px; max-width: 1100px; margin: 0 auto; }
.mkt-hero .eyebrow { color: var(--text-secondary); margin-bottom: 18px; font-size: 12px; letter-spacing: 1px; }
.mkt-hero h1 { font-size: 56px; line-height: 1.05; max-width: 880px; letter-spacing: -0.02em; font-weight: 500; }
.mkt-hero .lede { font-size: 19px; max-width: 680px; margin: 24px 0 0; color: var(--text-secondary); line-height: 1.55; }
@media (max-width: 720px) { .mkt-hero { padding: 56px 24px 48px; } .mkt-hero h1 { font-size: 38px; } .mkt-hero .lede { font-size: 16px; } }

.mkt-hero .cta-row { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.btn-primary, .btn-ghost { font-size: 14px; padding: 12px 22px; border-radius: var(--radius-md); text-decoration: none; font-weight: 500; transition: all 0.1s; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--text-primary); color: var(--bg-base); border: 0.5px solid var(--text-primary); }
.btn-primary:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--text-primary); border: 0.5px solid var(--border-default); }
.btn-ghost:hover { background: var(--bg-subtle); border-color: var(--border-strong); }
.btn-arrow { font-family: var(--font-mono); font-size: 12px; }

/* Marketing section — tight spacing, big anchor text */
.mkt-section { padding: 72px 24px; max-width: 1100px; margin: 0 auto; }
.mkt-section + .mkt-section { padding-top: 0; }
.mkt-section .label { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.mkt-section h2 { font-size: 36px; line-height: 1.15; max-width: 720px; letter-spacing: -0.01em; font-weight: 500; }
.mkt-section .lede { font-size: 16px; color: var(--text-secondary); max-width: 640px; margin: 16px 0 0; line-height: 1.6; }
@media (max-width: 720px) { .mkt-section { padding: 48px 24px; } .mkt-section h2 { font-size: 28px; } }

/* Big quote / pull-quote */
.mkt-quote { padding: 96px 24px; background: var(--bg-subtle); border-top: 0.5px solid var(--border-subtle); border-bottom: 0.5px solid var(--border-subtle); }
.mkt-quote blockquote { max-width: 880px; margin: 0 auto; font-size: 32px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 400; color: var(--text-primary); }
.mkt-quote cite { display: block; max-width: 880px; margin: 24px auto 0; font-style: normal; font-size: 13px; color: var(--text-tertiary); font-family: var(--font-mono); letter-spacing: 0.5px; }
@media (max-width: 720px) { .mkt-quote { padding: 56px 24px; } .mkt-quote blockquote { font-size: 22px; } }

/* Three / four column feature grid for product pages */
.mkt-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; }
@media (max-width: 880px) { .mkt-features { grid-template-columns: 1fr; gap: 32px; } }
.mkt-feature h3 { font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.mkt-feature p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0; }
.mkt-feature .icon-line { width: 28px; height: 1px; background: var(--text-primary); margin-bottom: 18px; }

/* Big numbers */
.mkt-numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 48px 0; border-top: 0.5px solid var(--border-subtle); border-bottom: 0.5px solid var(--border-subtle); margin-top: 48px; }
@media (max-width: 720px) { .mkt-numbers { grid-template-columns: repeat(2, 1fr); padding: 32px 0; } }
.mkt-number .big { font-size: 40px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.mkt-number .label-sm { font-family: var(--font-mono); font-size: 10px; color: var(--text-tertiary); letter-spacing: 0.5px; text-transform: uppercase; margin-top: 10px; }
.mkt-number .desc { font-size: 13px; color: var(--text-secondary); margin-top: 8px; line-height: 1.5; max-width: 220px; }

/* Pricing card */
.mkt-pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
@media (max-width: 880px) { .mkt-pricing { grid-template-columns: 1fr; } }
.price-card { padding: 32px 28px; background: var(--bg-surface); border: 0.5px solid var(--border-subtle); border-radius: var(--radius-lg); display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--text-primary); background: var(--bg-base); position: relative; }
.price-card.featured::before { content: 'RECOMMENDED'; position: absolute; top: -10px; left: 28px; padding: 3px 10px; background: var(--text-primary); color: var(--bg-base); font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px; border-radius: var(--radius-sm); }
.price-card .tier { font-size: 13px; color: var(--text-tertiary); font-family: var(--font-mono); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 12px; }
.price-card .price { font-size: 42px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.price-card .price .unit { font-size: 13px; color: var(--text-tertiary); font-weight: 400; letter-spacing: normal; margin-left: 4px; }
.price-card .desc { font-size: 14px; color: var(--text-secondary); margin: 16px 0 24px; line-height: 1.55; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 28px; flex: 1; }
.price-card ul li { font-size: 13px; color: var(--text-primary); padding: 8px 0; border-top: 0.5px solid var(--border-subtle); display: flex; gap: 10px; align-items: baseline; }
.price-card ul li::before { content: '+'; color: var(--text-tertiary); font-family: var(--font-mono); font-size: 11px; }
.price-card ul li:first-child { border-top: none; }
.price-card .btn-primary, .price-card .btn-ghost { width: 100%; justify-content: center; }

/* Product cards (grid on /products-live.html) */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 48px; }
@media (max-width: 880px) { .product-grid { grid-template-columns: 1fr; } }
.product-card { padding: 36px 32px; background: var(--bg-surface); border: 0.5px solid var(--border-subtle); border-radius: var(--radius-lg); text-decoration: none; color: inherit; transition: all 0.15s; display: flex; flex-direction: column; min-height: 280px; }
.product-card:hover { border-color: var(--text-primary); transform: translateY(-2px); }
.product-card .product-eyebrow { font-family: var(--font-mono); font-size: 10px; color: var(--text-tertiary); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 14px; }
.product-card h3 { font-size: 26px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; margin-bottom: 10px; }
.product-card p { font-size: 14px; color: var(--text-secondary); margin: 0; flex: 1; line-height: 1.55; }
.product-card .product-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 16px; border-top: 0.5px solid var(--border-subtle); font-family: var(--font-mono); font-size: 11px; }
.product-card .product-meta .price-from { color: var(--text-primary); font-weight: 500; }
.product-card .product-meta .arrow { color: var(--text-tertiary); }

/* Status pill on product cards */
.status-pill { padding: 3px 8px; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; display: inline-block; }
.status-pill.shipping { background: var(--hardened-bg); color: var(--hardened-fg); }
.status-pill.preview  { background: var(--quarantine-bg); color: var(--quarantine-fg); }
.status-pill.private  { background: var(--sealed-bg); color: var(--sealed-fg); }

/* Final CTA section */
.mkt-cta { padding: 96px 24px; text-align: center; }
.mkt-cta h2 { font-size: 44px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; max-width: 780px; margin: 0 auto; }
.mkt-cta .lede { font-size: 18px; max-width: 560px; margin: 24px auto 36px; color: var(--text-secondary); line-height: 1.55; }
.mkt-cta .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 720px) { .mkt-cta { padding: 64px 24px; } .mkt-cta h2 { font-size: 30px; } }

/* ═══════════════════════════════════════════════════════════════════════
   Blog surface — used by /blog-live.html and /blog/*.html.
   The blog is the canonical landing page for new model releases:
   indexed, filterable, with attestation blocks embedded in every post.
   ═══════════════════════════════════════════════════════════════════════ */

/* ---------- INDEX page ---------- */
.blog-hero { padding: 56px 24px 32px; max-width: 1100px; margin: 0 auto; }
.blog-hero .eyebrow { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 14px; }
.blog-hero h1 { font-size: 44px; line-height: 1.1; max-width: 820px; letter-spacing: -0.02em; font-weight: 500; }
.blog-hero .lede { font-size: 16px; max-width: 680px; margin: 18px 0 0; color: var(--text-secondary); line-height: 1.55; }
@media (max-width: 720px) { .blog-hero h1 { font-size: 32px; } }

/* Filter strip on index */
.blog-filters { max-width: 1100px; margin: 0 auto; padding: 0 24px 12px; display: flex; gap: 24px; flex-wrap: wrap; align-items: baseline; border-bottom: 0.5px solid var(--border-subtle); }
.blog-filters .group { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.blog-filters .group-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-tertiary); letter-spacing: 0.8px; text-transform: uppercase; margin-right: 4px; }
.blog-filters .filter-chip { padding: 4px 10px; border-radius: var(--radius-sm); border: 0.5px solid var(--border-subtle); background: var(--bg-surface); font-size: 12px; cursor: pointer; transition: all 0.1s; font-family: var(--font-mono); letter-spacing: 0.3px; }
.blog-filters .filter-chip:hover { background: var(--bg-subtle); }
.blog-filters .filter-chip.active { background: var(--text-primary); color: var(--bg-base); border-color: var(--text-primary); }

/* Featured post (top of index) */
.blog-featured { max-width: 1100px; margin: 0 auto; padding: 32px 24px 16px; }
.blog-featured a { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; padding: 32px; background: var(--bg-surface); border: 0.5px solid var(--border-subtle); border-radius: var(--radius-lg); text-decoration: none; color: inherit; transition: all 0.15s; }
.blog-featured a:hover { border-color: var(--text-primary); }
@media (max-width: 880px) { .blog-featured a { grid-template-columns: 1fr; } }
.blog-featured .feat-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; font-family: var(--font-mono); font-size: 11px; }
.blog-featured .feat-pill { padding: 3px 8px; border-radius: var(--radius-sm); background: var(--text-primary); color: var(--bg-base); letter-spacing: 0.5px; }
.blog-featured h2 { font-size: 30px; line-height: 1.15; letter-spacing: -0.01em; font-weight: 500; margin-bottom: 14px; }
.blog-featured .feat-summary { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.blog-featured .feat-side { display: flex; flex-direction: column; gap: 14px; align-self: center; }
.blog-featured .feat-side-stat { padding: 14px 16px; background: var(--bg-subtle); border-radius: var(--radius-md); }
.blog-featured .feat-side-stat .v { font-family: var(--font-mono); font-size: 16px; font-weight: 500; }
.blog-featured .feat-side-stat .l { font-family: var(--font-mono); font-size: 10px; color: var(--text-tertiary); letter-spacing: 0.5px; text-transform: uppercase; margin-top: 4px; }

/* Post list */
.blog-list { max-width: 1100px; margin: 0 auto; padding: 16px 24px 80px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 880px) { .blog-list { grid-template-columns: 1fr; } }
.blog-list a { padding: 24px; background: var(--bg-surface); border: 0.5px solid var(--border-subtle); border-radius: var(--radius-md); text-decoration: none; color: inherit; transition: all 0.15s; display: flex; flex-direction: column; min-height: 200px; }
.blog-list a:hover { border-color: var(--text-primary); transform: translateY(-1px); }
.blog-list .post-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-family: var(--font-mono); font-size: 10px; color: var(--text-tertiary); letter-spacing: 0.5px; }
.blog-list h3 { font-size: 18px; line-height: 1.25; font-weight: 500; margin-bottom: 8px; }
.blog-list p { font-size: 13px; color: var(--text-secondary); line-height: 1.55; margin: 0; flex: 1; }
.blog-list .post-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-top: 12px; border-top: 0.5px solid var(--border-subtle); font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); }
.blog-list .post-foot .arrow { color: var(--text-primary); }

/* Tier pill on posts */
.tag-pill { padding: 2px 8px; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.5px; }
.tag-pill.sealed    { background: var(--sealed-bg); color: var(--sealed-fg); }
.tag-pill.hardened  { background: var(--hardened-bg); color: var(--hardened-fg); }
.tag-pill.closed{ background: var(--closed-bg); color: var(--closed-fg); }
.tag-pill.quarantine{ background: var(--quarantine-bg); color: var(--quarantine-fg); }
.tag-pill.editorial { background: var(--bg-base); color: var(--text-secondary); border: 0.5px solid var(--border-default); }
.tag-pill.family { background: var(--bg-subtle); color: var(--text-primary); border: 0.5px solid var(--border-subtle); }

/* ---------- POST page ---------- */
.post-hero { max-width: 760px; margin: 0 auto; padding: 64px 24px 32px; }
.post-hero .post-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); letter-spacing: 0.5px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.post-hero h1 { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 500; margin-bottom: 16px; }
.post-hero .post-lede { font-size: 17px; line-height: 1.6; color: var(--text-secondary); }
@media (max-width: 720px) { .post-hero { padding: 40px 24px 24px; } .post-hero h1 { font-size: 30px; } }

/* Tldr box */
.post-tldr { max-width: 760px; margin: 24px auto 0; padding: 22px 28px; background: var(--bg-subtle); border-left: 2px solid var(--text-primary); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.post-tldr .tldr-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 8px; }
.post-tldr p { font-size: 14px; line-height: 1.6; margin: 0; color: var(--text-primary); }

/* Article body */
.post-body { max-width: 760px; margin: 0 auto; padding: 40px 24px 16px; }
.post-body h2 { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; margin: 48px 0 16px; }
.post-body h3 { font-size: 17px; font-weight: 500; margin: 32px 0 10px; }
.post-body p { font-size: 15px; line-height: 1.7; color: var(--text-primary); margin: 0 0 16px; }
.post-body ul, .post-body ol { font-size: 15px; line-height: 1.7; color: var(--text-primary); margin: 0 0 16px; padding-left: 22px; }
.post-body li { margin-bottom: 6px; }
.post-body a { color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--border-default); text-underline-offset: 3px; }
.post-body a:hover { text-decoration-color: var(--text-primary); }
.post-body code { font-family: var(--font-mono); font-size: 13px; background: var(--bg-subtle); padding: 1px 6px; border-radius: var(--radius-sm); }
.post-body pre { background: var(--bg-subtle); border: 0.5px solid var(--border-subtle); border-radius: var(--radius-md); padding: 18px 20px; overflow-x: auto; font-family: var(--font-mono); font-size: 13px; line-height: 1.5; margin: 16px 0; }
.post-body pre code { background: none; padding: 0; }

/* Spec block — "what you need to know" data sheet at top of every post */
.post-specs { max-width: 760px; margin: 32px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border-subtle); border: 0.5px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; }
@media (max-width: 720px) { .post-specs { grid-template-columns: repeat(2, 1fr); } }
.post-specs .cell { padding: 14px 16px; background: var(--bg-surface); display: flex; flex-direction: column; gap: 4px; }
.post-specs .cell .l { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.8px; color: var(--text-tertiary); text-transform: uppercase; }
.post-specs .cell .v { font-family: var(--font-mono); font-size: 13px; color: var(--text-primary); }

/* Deploy block — shows the runtime/quant/platform options for this model */
.post-deploy { max-width: 760px; margin: 32px auto; }
.post-deploy h3 { font-size: 14px; font-weight: 500; font-family: var(--font-mono); letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 16px; }
.deploy-table { display: grid; grid-template-columns: 1.2fr 0.7fr 0.6fr 1fr 1fr; gap: 1px; background: var(--border-subtle); border: 0.5px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; font-size: 13px; }
.deploy-table > div { background: var(--bg-surface); padding: 10px 14px; }
.deploy-table .head { background: var(--bg-subtle); font-family: var(--font-mono); font-size: 10px; color: var(--text-tertiary); letter-spacing: 0.5px; text-transform: uppercase; padding: 8px 14px; }
.deploy-table .platform { font-weight: 500; }
.deploy-table .quant, .deploy-table .size, .deploy-table .runtime, .deploy-table .target { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }
.deploy-table .target { color: var(--text-primary); }
@media (max-width: 720px) {
  .deploy-table { grid-template-columns: 1fr 1fr; }
  .deploy-table .head:nth-child(n+3):nth-child(-n+5) { display: none; }
  .deploy-table > div:not(.head):nth-child(5n+2),
  .deploy-table > div:not(.head):nth-child(5n+3),
  .deploy-table > div:not(.head):nth-child(5n+4) { display: none; }
}

/* Attestation block — the unique-to-us payload */
.post-attest { max-width: 760px; margin: 32px auto; padding: 24px 28px; background: var(--bg-base); border: 0.5px solid var(--border-default); border-radius: var(--radius-md); }
.post-attest .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.post-attest .label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #10A150; box-shadow: 0 0 0 3px rgba(16,161,80,0.18); }
.post-attest dl { display: grid; grid-template-columns: 130px 1fr; gap: 10px 18px; font-family: var(--font-mono); font-size: 12px; margin: 0; }
.post-attest dt { color: var(--text-tertiary); }
.post-attest dd { color: var(--text-primary); margin: 0; word-break: break-all; }
@media (max-width: 720px) { .post-attest dl { grid-template-columns: 1fr; } .post-attest dt { color: var(--text-tertiary); margin-top: 4px; } }
.post-attest .sig-row { margin-top: 14px; padding-top: 14px; border-top: 0.5px solid var(--border-subtle); display: flex; gap: 8px; flex-wrap: wrap; }
.post-attest .sig-row .panel-pill { padding: 3px 8px; border-radius: var(--radius-sm); background: var(--bg-surface); border: 0.5px solid var(--border-subtle); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.3px; }

/* Bottom of post — related links and back to index */
.post-related { max-width: 760px; margin: 48px auto; padding: 32px 0; border-top: 0.5px solid var(--border-subtle); }
.post-related h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 16px; }
.post-related ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 720px) { .post-related ul { grid-template-columns: 1fr; } }
.post-related li a { display: block; padding: 14px 18px; background: var(--bg-surface); border: 0.5px solid var(--border-subtle); border-radius: var(--radius-md); text-decoration: none; color: inherit; transition: all 0.1s; }
.post-related li a:hover { border-color: var(--text-primary); }
.post-related li .title { font-size: 14px; font-weight: 500; line-height: 1.3; margin-bottom: 4px; }
.post-related li .desc { font-size: 12px; color: var(--text-secondary); font-family: var(--font-mono); }


/* FEATURED SEALED STRIP (auto-rendered above category grids) */
#featured-sealed { margin-bottom: 22px; }
.sealed-strip-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.sealed-strip-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--sealed-bg);
  border: 1px solid var(--sealed-accent);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.sealed-strip-card:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.22); }
.sealed-strip-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sealed-strip-pulls { font-family: var(--font-mono); font-size: 10px; color: var(--sealed-fg); opacity: 0.7; }
.sealed-strip-name { font-size: 13.5px; font-weight: 500; color: var(--sealed-fg); margin: 2px 0 2px; line-height: 1.25; }
.sealed-strip-pub { font-family: var(--font-mono); font-size: 10.5px; color: var(--sealed-fg); opacity: 0.78; }
.sealed-strip-hash { font-family: var(--font-mono); font-size: 10px; color: var(--sealed-fg); opacity: 0.55; margin-top: 4px; }


/* ═══════════════════════════════════════════════════════════════════════
   UI refinements (M59) — focus rings, smooth color transitions,
   reduced-motion respect. Tokens unchanged; behavior only.
   ═══════════════════════════════════════════════════════════════════════ */

html { color-scheme: light dark; }

body,
.top-nav,
.metric-card,
.artifact-card,
.featured-card,
.sota-section,
.cat-card,
.product-card,
.price-card,
.mkt-quote,
.btn,
.btn-primary,
.btn-ghost,
.chip,
.search-input,
.sort-select,
.attest-block,
.deploy-table > div,
.post-specs .cell {
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
.chip:focus-visible,
.nav-tab:focus-visible,
.metric-card:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

/* Theme toggle button (rendered by SF.renderNav) */
.theme-toggle {
  appearance: none;
  background: transparent;
  border: 0.5px solid var(--border-default);
  color: var(--text-secondary);
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.theme-toggle:hover { background: var(--bg-subtle); color: var(--text-primary); border-color: var(--border-strong); }
.theme-toggle svg { display: block; }
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ═══════════════════════════════════════════════════════════════════════
   DARK MODE (M59) — explicit via [data-theme="dark"] and implicit via
   OS preference unless user has chosen light. Token overrides only;
   no layout changes. Add token overrides for the few hard-coded colors
   used inline in legacy rules.
   ═══════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] {
  color-scheme: dark;
  --bg-base:        #0E0F11;
  --bg-surface:     #16181B;
  --bg-subtle:      #1E2024;
  --text-primary:   #ECEAE3;
  --text-secondary: #A6A49E;
  --text-tertiary:  #6E6C66;
  --border-subtle:  rgba(255,255,255,0.07);
  --border-default: rgba(255,255,255,0.16);
  --border-strong:  rgba(255,255,255,0.30);

  --sealed-bg:        #17233F;
  --sealed-fg:        #AFC8F2;
  --sealed-accent:    #6E9AE0;
  --hardened-bg:      #0F2D24;
  --hardened-fg:      #7BE3BD;
  --hardened-accent:  #2EBE93;
  --closed-bg:    #23262C;
  --closed-fg:    #AEB6C2;
  --closed-accent:#7E8899;
  --quarantine-bg:    #3A280F;
  --quarantine-fg:    #F0C079;
  --quarantine-accent:#DDA050;
  --interdicted-bg:   #3A1414;
  --interdicted-fg:   #F2A0A0;
  --interdicted-accent:#DA6262;
  --fav-fg:          #E3C766;
  --fav-border:      #8A6B1F;

  --info-bg:        #122B45;
  --info-fg:        #95C8F4;
  --accent:         #5C90DB;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg-base:        #0E0F11;
    --bg-surface:     #16181B;
    --bg-subtle:      #1E2024;
    --text-primary:   #ECEAE3;
    --text-secondary: #A6A49E;
    --text-tertiary:  #6E6C66;
    --border-subtle:  rgba(255,255,255,0.07);
    --border-default: rgba(255,255,255,0.16);
    --border-strong:  rgba(255,255,255,0.30);

    --sealed-bg:        #17233F;
    --sealed-fg:        #AFC8F2;
    --sealed-accent:    #6E9AE0;
    --hardened-bg:      #0F2D24;
    --hardened-fg:      #7BE3BD;
    --hardened-accent:  #2EBE93;
    --closed-bg:    #23262C;
    --closed-fg:    #AEB6C2;
    --closed-accent:#7E8899;
    --quarantine-bg:    #3A280F;
    --quarantine-fg:    #F0C079;
    --quarantine-accent:#DDA050;
    --interdicted-bg:   #3A1414;
    --interdicted-fg:   #F2A0A0;
    --interdicted-accent:#DA6262;
    --fav-fg:          #E3C766;
    --fav-border:      #8A6B1F;

    --info-bg:        #122B45;
    --info-fg:        #95C8F4;
    --accent:         #5C90DB;
  }
}

/* Overrides for hard-coded color literals in legacy rules. */
[data-theme="dark"] .btn.primary:hover { background: #d6d4cd; }
[data-theme="dark"] .btn-primary:hover { background: #ffffff; }
[data-theme="dark"] .featured-tag      { background: rgba(0,0,0,0.35); }
[data-theme="dark"] .prov-chip.dataset { background: #3A2D14; color: #F0C079; }
[data-theme="dark"] .paradigm-pill     { background: #2A1E40; color: #D0BCF0; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn.primary:hover { background: #d6d4cd; }
  :root:not([data-theme="light"]) .btn-primary:hover { background: #ffffff; }
  :root:not([data-theme="light"]) .featured-tag      { background: rgba(0,0,0,0.35); }
  :root:not([data-theme="light"]) .prov-chip.dataset { background: #3A2D14; color: #F0C079; }
  :root:not([data-theme="light"]) .paradigm-pill     { background: #2A1E40; color: #D0BCF0; }
}

/* Search-input SVG icon — recolor the stroke for dark mode so the
   magnifier remains visible against the dark surface. */
[data-theme="dark"] .search-input {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='6' cy='6' r='4.5' fill='none' stroke='%23A6A49E' stroke-width='1.2'/%3E%3Cline x1='9.5' y1='9.5' x2='12.5' y2='12.5' stroke='%23A6A49E' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .search-input {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='6' cy='6' r='4.5' fill='none' stroke='%23A6A49E' stroke-width='1.2'/%3E%3Cline x1='9.5' y1='9.5' x2='12.5' y2='12.5' stroke='%23A6A49E' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  }
}

/* ─────────────────────────────────────────────────────────────────────
   M60 — UI refinements continued.
   1) nav: horizontal scroll with fade edges (no more 2-3 row wrap)
   2) cards: gentle hover lift + ring
   3) buttons: refined hover/active microstates
   4) skeletons: shimmer loading state to replace "loading..." text
   5) scrollbars: thin, themed
   6) tables: subtle zebra + better row dividers
   7) section headers: refined hierarchy
   ───────────────────────────────────────────────────────────────────── */

/* === 1) Nav: horizontal scroll with fade edges ===
   The .nav-tabs container becomes a single-row horizontal scroller; the
   .top-nav wrapper holds gradient overlays on left/right that fade out
   when the user scrolls to the corresponding end. Works in both themes. */
.nav-tabs {
  flex: 1;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/old Edge */
  scroll-behavior: smooth;
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.nav-tabs::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.nav-tabs .nav-tab { flex: 0 0 auto; white-space: nowrap; }

/* === 2) Cards: gentle hover lift + tier-tinted ring === */
.artifact-card,
.featured-card,
.cat-card,
.product-card,
.price-card,
.metric-card {
  transition: background-color 0.18s ease, border-color 0.18s ease,
              color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.artifact-card:hover,
.featured-card:hover,
.cat-card:hover,
.product-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-default);
  box-shadow: 0 1px 0 var(--border-subtle), 0 8px 24px -12px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .artifact-card:hover,
[data-theme="dark"] .featured-card:hover,
[data-theme="dark"] .cat-card:hover,
[data-theme="dark"] .product-card:hover {
  box-shadow: 0 1px 0 var(--border-default), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .artifact-card:hover,
  :root:not([data-theme="light"]) .featured-card:hover,
  :root:not([data-theme="light"]) .cat-card:hover,
  :root:not([data-theme="light"]) .product-card:hover {
    box-shadow: 0 1px 0 var(--border-default), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  }
}

/* === 3) Button microstates === */
.btn, .btn-primary, .btn-ghost {
  position: relative;
  transition: background-color 0.15s ease, border-color 0.15s ease,
              color 0.15s ease, transform 0.08s ease;
}
.btn:active,
.btn-primary:active,
.btn-ghost:active { transform: translateY(0.5px); }
.btn:disabled,
.btn-primary:disabled,
.btn-ghost:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* === 4) Skeleton loading shimmer ===
   Replace plain "loading..." text with .sf-skeleton block.
   Use in JS by setting innerHTML to `<div class="sf-skeleton"></div>`
   or by adding the class to any block that should show a shimmer. */
@keyframes sf-skeleton-shimmer {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.sf-skeleton {
  display: block;
  position: relative;
  background: var(--bg-subtle);
  background-image: linear-gradient(
    90deg,
    transparent 0,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 100%
  );
  background-repeat: no-repeat;
  background-size: 200px 100%;
  background-position: -200px 0;
  border-radius: var(--radius-sm);
  min-height: 12px;
  animation: sf-skeleton-shimmer 1.4s ease-in-out infinite;
}
.sf-skeleton + .sf-skeleton { margin-top: 6px; }
.sf-skeleton.line-sm { height: 10px; }
.sf-skeleton.line-md { height: 14px; }
.sf-skeleton.line-lg { height: 20px; }
.sf-skeleton.w-25 { width: 25%; }
.sf-skeleton.w-40 { width: 40%; }
.sf-skeleton.w-60 { width: 60%; }
.sf-skeleton.w-80 { width: 80%; }
[data-theme="dark"] .sf-skeleton {
  background-image: linear-gradient(
    90deg,
    transparent 0,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 100%
  );
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sf-skeleton {
    background-image: linear-gradient(
      90deg,
      transparent 0,
      rgba(255, 255, 255, 0.06) 50%,
      transparent 100%
    );
  }
}
@media (prefers-reduced-motion: reduce) {
  .sf-skeleton { animation: none; background-image: none; }
}

/* === 5) Custom scrollbars (WebKit) === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 8px;
  border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover { background: var(--border-default); }
* { scrollbar-color: var(--border-subtle) transparent; scrollbar-width: thin; }

/* === 6) Table refinements === */
table.sf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.sf-table th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  padding: 10px 12px;
  border-bottom: 0.5px solid var(--border-default);
  background: transparent;
}
table.sf-table td {
  padding: 10px 12px;
  border-bottom: 0.5px solid var(--border-subtle);
  color: var(--text-secondary);
}
table.sf-table tbody tr:hover td { background: var(--bg-subtle); }
table.sf-table tbody tr:last-child td { border-bottom: none; }

/* === 7) Section header hierarchy === */
.section-title {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin: 0 0 8px 0;
}

/* Larger headings: tighten optical kerning */
h1, h2, h3 {
  letter-spacing: -0.01em;
}

/* === 8) Tighten clearance / live pill === */
.clearance-pill {
  background: var(--info-bg);
  color: var(--info-fg);
  font-size: 10.5px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
/* ─────────────────────────────────────────────────────────────────────
   M61 — Grouped nav dropdowns.
   Replaces the 35-tab horizontal scroll with 6 dropdown groups.
   Container `.nav-tabs.nav-grouped` reuses nav-tabs flex layout but
   does NOT need overflow-x scroll — 6 groups fit on every viewport.
   ───────────────────────────────────────────────────────────────────── */

.nav-tabs.nav-grouped {
  overflow: visible;                /* allow dropdowns to escape */
  mask-image: none;
  -webkit-mask-image: none;
  gap: 2px;
  flex-wrap: nowrap;
}

.nav-group {
  position: relative;
  flex: 0 0 auto;
}

.nav-group-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 8px 12px;
  margin: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
/* ── Hardware jump banner ──────────────────────────────────────────────────
   Shown on pages that list models globally (catalogue, leaderboard). Those
   answer "what exists" and "what is best"; this hands the visitor asking
   "what can I actually run" to the picker, pre-filled when we know their
   hardware. Rendered by SF.hwJump() so the markup stays in one place. */
/* No horizontal margin of its own: this site insets full-width blocks with
   `padding: 0 24px` on the container rather than centering a max-width box,
   so the banner takes its alignment from whatever it is mounted in. Pages
   without their own inset add .hw-jump-inset on the mount. */
.hw-jump-inset { padding: 0 24px; }
.hw-jump {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  margin: 0 0 18px; padding: 11px 16px;
  border: 0.5px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border-radius: var(--radius-md);
  font-size: 13px; color: var(--text-secondary);
  transition: border-color .12s, background .12s;
}
.hw-jump:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, transparent); }
.hw-jump b { color: var(--accent); font-weight: 600; white-space: nowrap; }
.hj-icon { display: inline-flex; color: var(--accent); flex-shrink: 0; }
@media (max-width: 620px) { .hw-jump { align-items: flex-start; } }

/* Government flat tab — match trigger padding so it sits on the same baseline */
.nav-tabs.nav-grouped .nav-tab-top {
  padding: 8px 12px;
}
/* "Find a model" — the leading flat tab. Given a quiet accent outline so the
   primary journey reads as the primary action without shouting over the
   wordmark; fills in on hover and when it is the active page. */
.nav-tabs.nav-grouped .nav-tab-primary {
  color: var(--accent);
  border: 0.5px solid color-mix(in srgb, var(--accent) 42%, transparent);
  font-weight: 600;
  margin-right: 4px;
}
.nav-tabs.nav-grouped .nav-tab-primary:hover,
.nav-tabs.nav-grouped .nav-tab-primary:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.nav-tabs.nav-grouped .nav-tab-primary.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.nav-group-trigger .nav-caret {
  opacity: 0.55;
  transition: transform 0.18s ease, opacity 0.15s ease;
}
.nav-group-trigger:hover,
.nav-group-trigger:focus-visible {
  color: var(--text-primary);
  background: var(--bg-subtle);
}
.nav-group-trigger:hover .nav-caret,
.nav-group-trigger:focus-visible .nav-caret { opacity: 0.9; }
.nav-group-trigger.active {
  color: var(--text-primary);
  font-weight: 500;
}
.nav-group-trigger.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 1px;
}
.nav-group.open .nav-group-trigger .nav-caret,
.nav-group:hover .nav-group-trigger .nav-caret,
.nav-group:focus-within .nav-group-trigger .nav-caret {
  transform: rotate(180deg);
}

.nav-group-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 184px;
  background: var(--bg-base);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 0 var(--border-subtle), 0 12px 32px -16px rgba(0, 0, 0, 0.18);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.14s ease, visibility 0.12s ease;
  z-index: 100;
}
[data-theme="dark"] .nav-group-menu {
  box-shadow: 0 1px 0 var(--border-default), 0 16px 40px -20px rgba(0, 0, 0, 0.65);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-group-menu {
    box-shadow: 0 1px 0 var(--border-default), 0 16px 40px -20px rgba(0, 0, 0, 0.65);
  }
}

/* Open on hover (desktop) OR focus-within (keyboard) OR explicit .open (tap/click) */
.nav-group:hover > .nav-group-menu,
.nav-group:focus-within > .nav-group-menu,
.nav-group.open > .nav-group-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu-item {
  display: block;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.nav-menu-item:hover,
.nav-menu-item:focus-visible {
  background: var(--bg-subtle);
  color: var(--text-primary);
}
.nav-menu-item.active {
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 500;
}

/* Right-edge groups: flip the dropdown to align right so it doesn't overflow */
.nav-group:nth-last-child(-n+2) > .nav-group-menu {
  left: auto;
  right: 0;
}

@media (max-width: 720px) {
  .nav-group-trigger { padding: 8px 10px; font-size: 12px; }
  .nav-group-menu { min-width: 168px; }
}

/* ── Mobile navigation ─────────────────────────────────────────────────────
   The grouped nav is a nowrap flex row. That was fine when it held six
   groups, but it now carries seven plus two flat tabs, so on a phone it
   overflowed the viewport and dragged the whole page sideways. Below the
   breakpoint it becomes a slide-down drawer behind a burger.
   The burger itself is always in the markup and hidden here, so the nav does
   not depend on viewport width at render time. */
.nav-burger { display: none; }

@media (max-width: 880px) {
  .top-nav {
    gap: 12px;
    padding: 10px 16px;
    flex-wrap: wrap;
    position: relative;
  }
  .nav-burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    order: 3; margin-left: auto;
    width: 44px; height: 44px; padding: 0 11px;   /* 44px: minimum comfortable touch target */
    background: transparent; border: 0.5px solid var(--border-default);
    border-radius: var(--radius-sm); cursor: pointer;
  }
  .nav-burger .nb-bar {
    display: block; height: 1.5px; width: 100%;
    background: var(--text-primary); border-radius: 2px;
    transition: transform .18s ease, opacity .18s ease;
  }
  .nav-burger[aria-expanded="true"] .nb-bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] .nb-bar:nth-child(2) { opacity: 0; }
  .nav-burger[aria-expanded="true"] .nb-bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

  .nav-right { order: 2; margin-left: auto; }
  .brand { order: 1; font-size: 14px; }
  .brand svg { width: 26px; height: 26px; }

  /* The drawer. Collapsed by default; `display` is toggled rather than height
     so a closed drawer is fully removed from the tab order. */
  .top-nav .nav-tabs.nav-grouped {
    display: none;
    order: 4;
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 0.5px solid var(--border-subtle);
    max-height: min(70vh, 480px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.nav-open .top-nav .nav-tabs.nav-grouped { display: flex; }

  /* Groups become plain stacked sections — a hover dropdown is meaningless on
     touch, so every destination is visible once the drawer is open. */
  .nav-tabs.nav-grouped .nav-group { width: 100%; }
  .nav-tabs.nav-grouped .nav-group-trigger {
    width: 100%; justify-content: flex-start; gap: 6px;
    padding: 11px 4px 5px; font-size: 10.5px;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--text-tertiary); pointer-events: none;   /* label, not a control */
  }
  .nav-tabs.nav-grouped .nav-caret { display: none; }
  .nav-tabs.nav-grouped .nav-group-menu {
    position: static; display: block; opacity: 1; visibility: visible;
    transform: none; box-shadow: none; border: 0; background: transparent;
    min-width: 0; padding: 0; margin: 0;
  }
  .nav-tabs.nav-grouped .nav-menu-item {
    padding: 11px 10px; font-size: 14px; border-radius: var(--radius-sm);
  }
  .nav-tabs.nav-grouped .nav-tab-top {
    padding: 12px 10px; font-size: 14px; margin: 4px 0 0; text-align: left;
  }
  .nav-tabs.nav-grouped .nav-tab-primary { margin-right: 0; }
}
/* ── M117 · Design polish ────────────────────────────────────────────────
   Measured refinements only — no layout changes:
   · elevation tokens + hover lift on interactive cards
   · crisper button states (hover border, pressed nudge)
   · tabular numerals so data columns align (stats, leaderboards, meta)
   · brand-tinted text selection
   All motion is suppressed under prefers-reduced-motion. */

:root {
  --shadow-card: 0 1px 2px rgba(26,26,26,0.04), 0 2px 8px rgba(26,26,26,0.04);
  --shadow-lift: 0 2px 4px rgba(26,26,26,0.05), 0 6px 18px rgba(26,26,26,0.07);
}
[data-theme="dark"] {
  --shadow-card: 0 1px 2px rgba(0,0,0,0.40), 0 2px 8px rgba(0,0,0,0.30);
  --shadow-lift: 0 2px 4px rgba(0,0,0,0.45), 0 8px 22px rgba(0,0,0,0.40);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --shadow-card: 0 1px 2px rgba(0,0,0,0.40), 0 2px 8px rgba(0,0,0,0.30);
    --shadow-lift: 0 2px 4px rgba(0,0,0,0.45), 0 8px 22px rgba(0,0,0,0.40);
  }
}

body { font-variant-numeric: tabular-nums; }

::selection { background: var(--sealed-bg); color: var(--sealed-fg); }
[data-theme="dark"] ::selection { background: #3A3670; color: #E6E4FA; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) ::selection { background: #3A3670; color: #E6E4FA; }
}

/* Cards: the border already responds on hover; add a soft lift so
   clickability reads at a glance. */
.artifact-card:hover { box-shadow: var(--shadow-lift); }
.artifact-card.expanded { box-shadow: var(--shadow-card); }

/* Buttons: hover sharpens the border, press nudges down 0.5px. */
.btn:hover { border-color: var(--border-strong); }
.btn:active,
.btn-primary:active,
.btn-ghost:active,
.btn.primary:active { transform: translateY(0.5px); }

@media (prefers-reduced-motion: reduce) {
  .artifact-card, .btn, .btn-primary, .btn-ghost { transition: none; }
  .btn:active, .btn-primary:active, .btn-ghost:active, .btn.primary:active { transform: none; }
}

/* ── Brand: compass mark + dark-blue wordmark ────────────────────────────
   Single navy wordmark (matches the disc in the mark). On dark surfaces
   (dark theme + the always-dark SF·R nav) it lightens to a steel-blue so
   it stays legible. */
.brand-word { display: inline-flex; gap: 5px; }
.brand-gold, .brand-steel {
  font-weight: 600;
  letter-spacing: 0.7px;
  color: #1C2B4A;
  -webkit-text-fill-color: currentColor;
}
.brand-r { color: var(--text-secondary); font-weight: 500; margin-left: 5px; }

[data-theme="dark"] .brand-gold,
[data-theme="dark"] .brand-steel,
.sfr-nav .brand-gold,
.sfr-nav .brand-steel {
  color: #9DB2D8;
  -webkit-text-fill-color: currentColor;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-gold,
  :root:not([data-theme="light"]) .brand-steel {
    color: #9DB2D8;
    -webkit-text-fill-color: currentColor;
  }
}

/* ── Phone layout ──────────────────────────────────────────────────────────
   Below 640px the desktop grids collapse, spacing tightens, and anything the
   user taps is brought up to a comfortable target size. iOS zooms the page
   when a focused input is under 16px, so form controls are set to 16px here
   rather than inheriting the denser desktop sizing. */
@media (max-width: 640px) {
  h1 { font-size: 26px; }
  h2 { font-size: 19px; }

  .page-header { padding: 24px 16px 14px; }
  .page-header p { font-size: 14px; }
  .hero { padding: 32px 16px 26px; }
  .layout { padding: 0 16px 32px; gap: 20px; }
  .results-area, .metric-strip { padding-left: 16px; padding-right: 16px; }

  /* Four metric cards at 375px leave ~78px each — unreadable. */
  .metric-strip { grid-template-columns: repeat(2, 1fr); gap: 6px; }

  /* The filter sidebar is sticky and tall on desktop; stacked above the
     results on a phone it must not pin or eat the viewport. */
  .filter-sidebar { position: static !important; max-height: none !important; }

  /* Stack search + sort; both full width and tappable. */
  .controls-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-input, .sort-select { width: 100%; font-size: 16px; min-height: 44px; }

  input, select, textarea { font-size: 16px; }

  /* Comfortable targets for the small mono chips used across the site. */
  .nav-tab, .btn, .card-dl, .filter-chip, .tag-pill { min-height: 36px; }
  .btn, .card-dl { display: inline-flex; align-items: center; }

  .table-scroll table, table { min-width: 0; }
  .app { max-width: 100%; }
}

/* Respect users who ask for less motion — the drawer and hover lifts animate. */
@media (prefers-reduced-motion: reduce) {
  .nav-burger .nb-bar { transition: none; }
}

/* Country flag chips (flags.js). Inline SVG rather than emoji: Windows has no
   glyphs for regional-indicator sequences, so emoji flags render as bare
   letter pairs there. vertical-align keeps the chip on the text baseline. */
.flag-chip { display: inline-block; vertical-align: -0.14em; border-radius: 3px; flex-shrink: 0; }
.flag-none {
  font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: .04em;
  padding: 1px 4px; border-radius: 3px; background: var(--bg-subtle);
  color: var(--text-tertiary); border: 0.5px solid var(--border-subtle);
  vertical-align: -0.05em;
}
