      :root {
        --bg: #ffffff;
        --panel: #f8f9fa;        /* infoboxes, table heads (Wikipedia gray) */
        --ink: #202122;
        --muted: #54595d;
        --line: #c8ccd1;         /* light hairline */
        --rule: #a2a9b1;         /* stronger border (h1 underline, infobox) */
        --link: #3366cc;
        --hl: #eaf3ff;           /* row hover */
        --mark-bg: #fff1a8;      /* search-match highlight */
        --ok: #14866d;
        --warn: #b32424;
        --serif: 'Linux Libertine', Georgia, 'Times New Roman', serif;
        --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
        --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
        /* Aliases kept for pages styled against earlier token names. */
        --paper: var(--bg);
        --card: var(--panel);
        --accent: var(--link);
        --accent-weak: var(--hl);
        --mark: var(--ink);
        --mark-weak: var(--panel);
        --cond: var(--serif);
      }
      * { box-sizing: border-box; }
      /* Author display rules (.vf-form { display: flex } etc.) silently beat
         the UA's [hidden] { display: none }, which leaked reviewer-only
         controls to everyone. hidden must always win. */
      [hidden] { display: none !important; }
      html { -webkit-text-size-adjust: 100%; }
      body {
        margin: 0;
        font-family: var(--sans);
        color: var(--ink);
        background: var(--bg);
        font-size: 14px;
        line-height: 1.55;
      }
      a { color: var(--link); text-decoration: none; }
      a:hover { text-decoration: underline; }
      main { max-width: 1220px; margin: 0 auto; padding: 20px 24px 64px; }
      body.immersive { overflow: hidden; background: #020504; }
      body.immersive main { max-width: none; min-height: 100svh; margin: 0; padding: 0; }

      /* Wide content tables scroll horizontally on narrow screens instead of
         forcing the whole page to scroll sideways. The item infobox (narrow
         key/value) stays a normal table. */
      @media (max-width: 760px) {
        main table { display: block; overflow-x: auto; max-width: 100%; }
        main .infobox table { display: table; overflow: visible; }
      }

      /* ── Header ──────────────────────────────────────────────────── */
      header.site {
        display: grid; grid-template-columns: minmax(170px, 220px) minmax(320px, 760px) minmax(180px, 280px);
        align-items: center; justify-content: center; gap: 18px;
        padding: 10px 24px;
        position: sticky; top: 0; z-index: 50;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(8px);
        border-bottom: 1px solid var(--line);
      }
      .brand { display: flex; flex-direction: column; line-height: 1.1; color: var(--ink); flex: none; }
      .brand:hover { text-decoration: none; }
      .b-name { font-family: var(--serif); font-size: 24px; }
      .b-sub { font-family: var(--serif); font-style: italic; font-size: 11px; color: var(--muted); }
      .rev { justify-self: end; flex: none; font-size: 12px; color: var(--muted); text-align: right; }
      a.rev:hover { color: var(--link); text-decoration: none; }

      /* ── Search ──────────────────────────────────────────────────── */
      .search { position: relative; width: 100%; max-width: none; min-width: 0; }
      .search input {
        position: relative; z-index: 1;
        width: 100%; min-height: 40px; font: inherit; font-size: 14px; padding: 8px 58px 8px 13px;
        border: 1px solid var(--rule); border-radius: 4px; background: var(--bg);
        outline: none; appearance: none; -webkit-appearance: none;
      }
      .search input:focus { border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
      /* Scan button: the right segment of the header search pill. Its left
         border is the divider (the input drops its right border). */
      .scan-entry {
        flex: none; width: 42px;
        display: inline-flex; align-items: center; justify-content: center;
        border: 1px solid var(--line); border-radius: 0 16px 16px 0; color: var(--muted); background: var(--panel);
        text-decoration: none; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
      }
      .scan-entry:hover, .scan-entry:focus-visible { color: var(--link); text-decoration: none; background: var(--hl); outline: 0; }
      .scan-glyph {
        position: relative; width: 20px; height: 15px; border: 1.75px solid currentColor; border-radius: 3px;
        display: inline-block; pointer-events: none;
      }
      .scan-glyph::before {
        content: ''; position: absolute; left: 3px; top: -5px; width: 8px; height: 5px;
        border: 1.75px solid currentColor; border-bottom: 0; border-radius: 3px 3px 0 0;
      }
      .scan-glyph::after {
        content: ''; position: absolute; left: 6px; top: 3px; width: 5px; height: 5px;
        border: 1.75px solid currentColor; border-radius: 50%;
      }
      .results {
        position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 60;
        background: var(--bg); border: 1px solid var(--rule); border-radius: 2px;
        box-shadow: 0 2px 6px rgba(0,0,0,.12); overflow-y: auto; max-height: 70vh;
      }
      .results a {
        display: grid; grid-template-columns: 1fr auto; gap: 1px 14px; align-items: center;
        padding: 7px 11px; border-bottom: 1px solid #eaecf0; color: var(--ink);
      }
      .results a:last-child { border-bottom: 0; }
      .results a:hover, .results a.active { background: var(--hl); text-decoration: none; }
      .results .rt { font-size: 13.5px; }
      .results .rc { grid-column: 1; font-size: 11.5px; color: var(--muted); }
      .results .rp { grid-row: 1 / span 2; text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
      .results .hint, .results .empty { padding: 9px 12px; color: var(--muted); font-size: 12px; }
      .results mark { background: var(--mark-bg); color: inherit; }
      .stock { font-size: 11px; }
      .in-stock { color: var(--ok); }
      .backorder { color: var(--warn); }
      @media (max-width: 680px) {
        header.site { display: flex; flex-wrap: wrap; gap: 6px 12px; }
        .rev { display: none; }
        .search { order: 3; max-width: none; flex-basis: 100%; }
      }

      /* ── Footer ──────────────────────────────────────────────────── */
      footer.site {
        border-top: 1px solid var(--line); padding: 16px 24px;
        color: var(--muted); font-size: 12px; max-width: 1220px; margin: 0 auto;
      }

      /* ── Shared wiki idiom ───────────────────────────────────────── */
      .crumbs { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
      .crumbs a { color: var(--muted); }
      h1 {
        font-family: var(--serif); font-weight: 400; font-size: 28px;
        margin: 2px 0 10px; padding-bottom: 4px; border-bottom: 1px solid var(--rule);
      }
      h2 {
        font-family: var(--serif); font-weight: 400; font-size: 20px;
        margin: 24px 0 8px; padding-bottom: 3px; border-bottom: 1px solid var(--line);
      }
      .blurb { color: var(--muted); max-width: 72ch; margin: 0 0 14px; }
      table { border-collapse: collapse; width: 100%; }
      th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid #eaecf0; vertical-align: top; }
      th { font-size: 12px; color: var(--ink); font-weight: 600; background: var(--panel); }
      tbody tr:hover { background: var(--hl); }
      td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
      .pill, .tag {
        display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 2px;
        background: var(--panel); color: var(--muted); border: 1px solid var(--line);
      }
      .grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
      .card { border: 1px solid var(--line); border-radius: 2px; padding: 14px; background: var(--bg); }
      .card:hover { border-color: var(--rule); }
      .card h3 { margin: 0 0 6px; font-size: 15px; }
      .card p { margin: 0; color: var(--muted); font-size: 12.5px; }
      .mono { font-family: var(--mono); font-size: 12px; }

      /* Mobile */
      img, svg, video, canvas, table { max-width: 100%; }
      @media (max-width: 680px) {
        main { padding: 14px 14px 48px; }
        header.site { padding: 6px 14px 8px; }
        .rev { display: none; } /* stats don't fit beside brand+search on mobile */
        .b-name { font-size: 21px; }
        .search input { font-size: 16px; min-height: 39px; padding: 6px 58px 6px 10px; } /* 16px stops iOS zoom-on-focus */
        .scan-entry { width: 46px; border-radius: 0 18px 18px 0; }
        h1 { font-size: 24px; }
        .grid-cards { grid-template-columns: 1fr; }
        table { font-size: 12px; }
        th, td { padding: 6px 8px; }
      }

/* Engine header nav (not part of the original site CSS) */
.site-nav { display: flex; gap: 12px; font-size: 12.5px; white-space: nowrap; }
.site-nav a { color: var(--link); }
@media (max-width: 640px) { .site-nav { font-size: 12px; gap: 8px; } }
@media (max-width: 680px) {
  /* Search + scan button get the full row; nav wraps to its own centered line. */
  .site-mid { flex-wrap: wrap; gap: 6px 12px; }
  .site-mid .site-nav { flex: 0 0 100%; }
  .hdr-search input { font-size: 16px; min-height: 36px; border-radius: 18px 0 0 18px; } /* 16px stops iOS zoom-on-focus */
}

/* Page action row */
.page-actions { flex-wrap: wrap; align-items: flex-start; }
.page-actions .pa-btn { white-space: nowrap; }
.site-nav { justify-content: center; }
.site-mid { display: flex; align-items: center; gap: 16px; min-width: 0; }
.hdr-search { flex: 1; min-width: 120px; position: relative; display: flex; }
.hdr-search input { flex: 1; min-width: 0; box-sizing: border-box; font: inherit; font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); border-right: 0; border-radius: 16px 0 0 16px; background: var(--panel); }
.hdr-search input:focus { outline: 0; background: var(--bg); }
/* Focusing the input highlights the whole pill, divider included. */
.hdr-search:focus-within input, .hdr-search:focus-within .scan-entry { border-color: var(--link); }
.site-nav { flex: none; }

/* Project footer */
.proj-footer { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; }
.pf-brand { margin: 0; display: flex; gap: 8px; align-items: center; font-size: 13px; }
.pf-brand img { vertical-align: -3px; }
.pf-motto { color: var(--muted); font-style: italic; }
.pf-links, .pf-credit { margin: 0; font-size: 12px; color: var(--muted); }
