:root {
      --bg: #05070d;
      --card-bg: #0d1220;
      --header-bg: #0a0e18;
      --text: #eef2f8;
      --text-muted: #6b7684;
      --border: #1b2436;
      --border-accent: #2a4a7a;
      --accent: #3b82f6;
      --accent-glow: rgba(59, 130, 246, 0.35);
      --orange: #f59e0b;
      --orange-glow: rgba(245, 158, 11, 0.35);
      --green: #4ade80;
      --amber: #f59e0b;
      --purple: #7c93ff;
      --red: #f87171;
      --row-padding: 0.85rem 1rem;
      --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
      --font-display: "Orbitron", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    }

    @keyframes pulse-glow { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

    body.compact-mode { --row-padding: 0.45rem 0.75rem; }
    * { box-sizing: border-box; }

    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      background-color: var(--bg);
      background-image:
        radial-gradient(ellipse 900px 500px at 100% 0%, rgba(59, 130, 246, 0.06), transparent 60%),
        radial-gradient(ellipse 700px 400px at 0% 100%, rgba(245, 158, 11, 0.04), transparent 60%);
      color: var(--text);
      margin: 0;
      padding: 2rem 1rem;
      display: flex;
      justify-content: center;
    }

    .container { width: 100%; max-width: 1150px; }
    header { margin-bottom: 1.25rem; }

    .hud-eyebrow {
      font-family: var(--font-mono);
      font-size: 0.7rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 0.4rem;
      display: block;
    }
    .hud-eyebrow::before { content: "// "; color: var(--orange); }

    h1 {
      margin: 0 0 0.5rem 0; font-size: clamp(28px,4.4vw,48px); font-weight: 800; letter-spacing: -.005em;
      font-family: var(--font-display); text-transform: uppercase;
      
    }

    .header-subtitle {
      margin: 0; max-width: 520px; font-size: 0.85rem; line-height: 1.5;
      color: var(--text-muted);
    }

    .header-top-row {
      display: flex; justify-content: space-between; align-items: flex-start;
      flex-wrap: wrap;
      /*gap: 1.5rem; */
    }

    .header-title-block { flex: 1 1 360px; min-width: 0; }

    .header-subtitle-row {
      display: flex; justify-content: space-between; align-items: flex-end;
      gap: 1.5rem; flex-wrap: wrap; margin-top: 0.5rem;
    }

    .embed-btn {
      background: transparent; border: 1px solid var(--border-accent); color: var(--accent);
      border-radius: 3px; padding: 0.5rem 0.9rem; font-size: 0.72rem; font-weight: 600;
      cursor: pointer; display: flex; align-items: center; gap: 0.4rem; white-space: nowrap;
      font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em;
      transition: all 0.2s; flex-shrink: 0;
    }
    .embed-btn:hover { background: rgba(59, 130, 246, 0.1); border-color: var(--accent); }
    .embed-btn-icon { font-size: 0.85rem; opacity: 0.8; }

    .model-count-line {
      color: var(--text-muted); font-size: 0.8rem; font-family: var(--font-mono);
      text-transform: uppercase; letter-spacing: 0.03em; margin-top: 0.6rem;
    }
    .controls-row.controls-row-tabs {
      justify-content: flex-start;
      gap: 1rem;
      margin-bottom: 0;
      flex-wrap: nowrap;
      align-items: flex-end;
    }
    .controls-row-tabs .model-count-line {
      margin-top: 0; white-space: nowrap; flex-shrink: 0; padding-bottom: 0.55rem;
    }
    .controls-row-tabs .category-tabs {
      flex: 0 1 auto;
      margin-bottom: -1px;
      margin-left: auto;
    }
    .controls-row-tabs-icons {
      display: flex; align-items: stretch; gap: 0.4rem; flex-shrink: 0; margin-left: 0.4rem;
      height: 2.5rem; box-sizing: border-box; padding-bottom: 1px;
    }
    .controls-row-tabs-icons .chart-icon-btn {
      width: auto; height: 85%; padding: 0 0.35rem;
    }

    @media (max-width: 900px) {
      .controls-row-tabs { flex-wrap: wrap; }
    }

    .status-chips {
      display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem;
      margin: 0;
    }
    .status-chips-hero { margin-bottom: 0.6rem; }
    .status-chip {
      display: inline-flex; align-items: center; gap: 0.4rem;
      background: var(--card-bg); border: 1px solid var(--border);
      border-radius: 3px; padding: 0.3rem 0.65rem; font-size: 0.68rem;
      color: var(--text-muted); font-family: var(--font-mono);
      text-transform: uppercase; letter-spacing: 0.03em;
    }
    /* Amber warning variant — same tone as .stale-mark's icon, for visual
       consistency between the two staleness indicators (this header chip
       and the per-cell/per-card marks in table.js/benchmarks.js). */
    .status-chip-warning {
      color: rgb(245, 158, 11, 0.85);
      border-color: rgba(245, 158, 11, 0.35);
    }
    .chip-dot {
      width: 6px; height: 6px; border-radius: 50%; background: var(--green);
      box-shadow: 0 0 6px var(--green); flex-shrink: 0;
      animation: pulse-glow 2s ease-in-out infinite;
    }

    /* ---------- Hero card (HUD panel with corner brackets) ---------- */
    .hero-card {
      display: grid;
      grid-template-columns: auto auto 1fr auto;
      gap: 1.5rem;
      align-items: center;
      background: linear-gradient(180deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.01));
      border: 1px solid var(--border-accent);
      border-radius: 4px;
      padding: 1.25rem 1.5rem;
      margin-bottom: 1.25rem;
      position: relative;
    }
    .hero-card.clickable { cursor: pointer; }
    .hero-card::before, .hero-card::after {
      content: ""; position: absolute; width: 18px; height: 18px;
      border-color: var(--orange); border-style: solid; border-width: 0;
    }
    .hero-card::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
    .hero-card::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
    .hero-rank {
      font-size: 2.5rem; font-weight: 800; color: var(--orange); line-height: 1;
      font-family: var(--font-display); text-shadow: 0 0 20px var(--orange-glow);
    }
    .hero-rank-label { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.3rem; }
    .hero-logo { display: flex; align-items: center; justify-content: center; }
    .hero-logo .provider-icon,
    .hero-logo .provider-icon-fallback { opacity: 0.95; }
    .hero-name { font-size: 1.3rem; font-weight: 700; margin: 0 0 0.15rem 0; }
    .hero-sub { color: var(--text-muted); font-size: 0.8rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.03em; }
    .hero-stats { display: flex; gap: 1.75rem; flex-wrap: wrap; }
    .hero-stat { text-align: right; }
    .hero-stat-value { font-size: 1.15rem; font-weight: 700; color: var(--orange); font-family: var(--font-mono); }
    .hero-stat-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--font-mono); }
    .hero-empty { color: var(--text-muted); font-size: 0.85rem; padding: 0.5rem 0; }

    .controls-stack { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 1rem; }
    .controls-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; }

    .search-input {
      width: 100%; min-width: 160px; padding: 0 1rem 0 3.2rem; height: 2.5rem; box-sizing: border-box;
      border-radius: 3px; border: 1px solid var(--border); background-color: transparent;
      color: var(--text); font-size: 0.85rem; outline: none; transition: border-color 0.2s;
      font-family: var(--font-mono);
    }
    .search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-glow); }
    .search-input::placeholder { color: var(--text-muted); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.03em; }

    .search-input-wrap { position: relative; flex: 1; min-width: 160px; }
    .search-input-icon {
      position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
      color: var(--text-muted); font-size: 0.9rem; pointer-events: none;
      transition: color 0.2s;
    }
    .search-input-wrap:focus-within .search-input-icon { color: var(--accent); }

    .search-row { width: 100%; align-items: stretch; flex-wrap: nowrap; }
    .search-row > * { height: 2.5rem; box-sizing: border-box; }
    .search-row .dropdown { display: flex; }
    .search-input-full { max-width: none; width: 100%; }

    @media (max-width: 720px) {
      .search-row { flex-wrap: wrap; }
      .search-row .search-input-wrap { flex-basis: 100%; order: -1; }
    }

    .refine-row { align-items: flex-start; }
    .refine-spacer { flex: 1; min-width: 0; }

    .dropdown { position: relative; }
    .search-row .dropdown-trigger { height: 2.5rem; box-sizing: border-box; }
    .dropdown-trigger {
      background: transparent; border: 1px solid var(--border); color: var(--text);
      border-radius: 3px; padding: 0.5rem 0.8rem; font-size: 0.72rem; font-weight: 600;
      cursor: pointer; display: flex; align-items: center; gap: 0.4rem;
      font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.03em;
      transition: border-color 0.2s;
    }
    .dropdown-trigger:hover { border-color: var(--accent); }
    .dropdown.open .dropdown-trigger { border-color: var(--accent); color: var(--accent); }
    .dropdown-trigger-icon { padding: 0.5rem 0.7rem; }
    .dd-label { color: var(--text-muted); }
    .dropdown.open .dd-label { color: var(--accent); }
    .dd-value { color: var(--text); }
    .dropdown.open .dd-value { color: var(--accent); }
    .dd-caret { font-size: 0.6rem; color: var(--text-muted); }

    .dropdown-menu {
      display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 30;
      background: var(--card-bg); border: 1px solid var(--border-accent); border-radius: 4px;
      padding: 0.35rem; min-width: 200px; flex-direction: column; gap: 0.15rem;
      box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    }
    .dropdown-menu-right { left: auto; right: 0; }
    .dropdown.open .dropdown-menu { display: flex; }
    .dd-item {
      background: transparent; border: none; color: var(--text-muted); text-align: left;
      padding: 0.5rem 0.6rem; border-radius: 3px; font-size: 0.75rem; cursor: pointer;
      font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.02em;
      transition: all 0.15s;
    }
    .dd-item:hover { background: rgba(59, 130, 246, 0.08); color: var(--text); }
    .dd-item.active { color: var(--accent); background: rgba(59, 130, 246, 0.1); }

    .pill-btn {
      background-color: transparent; color: var(--text-muted); border: 1px solid var(--border);
      border-radius: 3px; padding: 0.35rem 0.8rem; font-size: 0.72rem; font-weight: 600;
      cursor: pointer; transition: all 0.2s ease;
      font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em;
    }
    .pill-btn:hover { color: var(--text); border-color: var(--accent); }
    .pill-btn.active { background-color: rgba(59, 130, 246, 0.12); color: var(--accent); border-color: var(--accent); }
    .pill-btn.frontier-active { background-color: rgba(245, 158, 11, 0.12); color: var(--orange); border-color: var(--orange); }

    /* ---------- Category tabs ---------- */
    .category-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: flex-end; }
    .cat-tab {
      background: transparent; border: 1px solid var(--border); color: var(--text-muted);
      border-radius: 4px 4px 0 0; padding: 0 0.5rem; font-size: 0.72rem; font-weight: 600;
      cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 0.4rem;
      font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em;
      height: calc(2.5rem - 1px); box-sizing: border-box;
    }
    .cat-tab:hover { color: var(--text); border-color: var(--accent); }
    .cat-tab.active { background-color: var(--accent); color: #05070d; border-color: var(--accent); }

    .btn-toggle-group { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 3px; overflow: hidden; background-color: transparent; }
    .search-row .btn-toggle-group { height: 2.5rem; box-sizing: border-box; }
    .search-row .tgl-btn { height: calc(2.5rem - 2px); box-sizing: border-box; display: flex; align-items: center; padding-top: 0; padding-bottom: 0; }
    .tgl-btn {
      background: transparent; color: var(--text-muted); border: none; padding: 0.5rem 0.8rem;
      font-size: 0.72rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
      font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em;
    }
    .tgl-btn:hover { color: var(--text); }
    .tgl-btn.active { background-color: var(--accent); color: #05070d; }

    .action-btn {
      background-color: transparent; border: 1px solid var(--border); color: var(--text-muted);
      border-radius: 3px; padding: 0.5rem 0.8rem; font-size: 0.72rem; font-weight: 600; cursor: pointer;
      display: flex; align-items: center; gap: 0.35rem; transition: all 0.2s;
      font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em;
    }
    .action-btn:hover { color: var(--text); border-color: var(--accent); }
    .action-btn.active { background-color: rgba(59, 130, 246, 0.12); color: var(--accent); border-color: var(--accent); }

    .legend-box {
      background-color: rgba(59, 130, 246, 0.04); border: 1px solid transparent; border-radius: 4px;
      padding: 0 1.25rem; margin: 0; max-height: 0; opacity: 0; overflow: hidden;
      transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease, margin 0.25s ease, border-color 0.2s ease;
    }
    .legend-box.visible { max-height: 240px; opacity: 1; padding: 1rem 1.25rem; margin: 0 0 0.85rem; border-color: var(--border); }
    .legend-header { font-size: 0.7rem; font-weight: 700; color: var(--accent); margin-bottom: 0.75rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }
    .legend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
    .legend-item { display: flex; flex-direction: column; gap: 0.25rem; }
    .legend-title-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; font-weight: 600; }
    .legend-desc { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }

    .mode-tag { font-size: 0.62rem; padding: 2px 6px; border-radius: 3px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-mono); }
    .mode-standard { background: transparent; color: var(--accent); border: 1px solid rgba(59, 130, 246, 0.4); }
    .mode-batch { background: transparent; color: var(--orange); border: 1px solid rgba(245, 158, 11, 0.4); }
    .mode-fast { background: transparent; color: var(--purple); border: 1px solid rgba(124, 147, 255, 0.4); }

    /* ---------- Chart card ---------- */
    .chart-card {
      background-color: var(--card-bg); border: 1px solid var(--border); border-radius: 4px;
      padding: 1rem 1.25rem 0.5rem; margin-bottom: 1rem;
    }
    .chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
    .chart-title { font-size: 0.7rem; font-weight: 700; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
    .chart-header-right { display: flex; align-items: center; gap: 0.6rem; }
    .chart-sub { font-size: 0.68rem; color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.03em; }
    .chart-icon-btn {
      display: inline-flex; align-items: center; justify-content: center;
      width: 22px; height: 22px; border-radius: 3px;
      background: transparent; border: 1px solid var(--border); color: var(--text-muted);
      font-size: 0.75rem; line-height: 1; cursor: pointer; transition: all 0.15s;
    }
    .chart-icon-btn:hover { color: var(--text); border-color: var(--accent); }
    .chart-icon-btn.active { background: var(--accent); color: #05070d; border-color: var(--accent); }
    .chart-wrap { height: 260px; position: relative; }
    .chart-wrap svg { display: block; width: 100%; height: 100%; }
    .chart-empty-state {
      display: none; position: absolute; inset: 0; align-items: center; justify-content: center;
      text-align: center; padding: 0 2rem; color: var(--text-muted); font-family: var(--font-mono);
      font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.6;
    }
    .chart-empty-state.visible { display: flex; }

    /* Adaptive x-axis controls */
    .chart-axis-controls {
      display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem;
      padding: 0.55rem 0.1rem 0.7rem; margin-bottom: 0.35rem;
      border-bottom: 1px solid var(--border);
    }
    .chart-axis-controls-bottom {
      margin-bottom: 0; margin-top: 0.7rem;
      padding: 0.7rem 0.1rem 0.1rem;
      border-bottom: none;
      border-top: 1px solid var(--border);
      justify-content: center;
    }
    .axis-ctl-group { display: flex; align-items: center; gap: 0.5rem; }
    .axis-ctl-label {
      font-size: 0.64rem; color: var(--text-muted); font-family: var(--font-mono);
      text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
    }
    .axis-ctl-val {
      font-size: 0.64rem; color: var(--accent); font-family: var(--font-mono);
      min-width: 2.6em; display: inline-block;
    }
    .axis-scale-toggle {
      display: flex; border: 1px solid var(--border); border-radius: 3px; overflow: hidden;
    }
    .axis-scale-btn {
      background: transparent; color: var(--text-muted); border: none;
      padding: 0.3rem 0.65rem; font-size: 0.64rem; font-weight: 600; cursor: pointer;
      font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.03em;
      transition: all 0.15s;
    }
    .axis-scale-btn:hover { color: var(--text); }
    .axis-scale-btn.active { background-color: var(--accent); color: #05070d; }
    .chart-axis-controls input[type="range"] {
      width: 100px; accent-color: var(--accent); cursor: pointer;
    }
    .axis-density-toggle { cursor: pointer; }
    .axis-density-toggle input[type="checkbox"] {
      accent-color: var(--accent); cursor: pointer; width: 13px; height: 13px;
    }
    #warp-ctl-group.disabled, #bandwidth-ctl-group.disabled { opacity: 0.35; pointer-events: none; }

    @media (max-width: 720px) {
      .chart-axis-controls { gap: 0.75rem 1rem; }
    }

    /* D3 chart internals */
    .chart-axis-label { fill: var(--text-muted); font-size: 10px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.03em; }
    .chart-tick text { fill: var(--text-muted); font-size: 10px; font-family: var(--font-mono); }
    .chart-grid-line { stroke: rgba(148, 163, 184, 0.1); }
    .chart-density-path { fill: rgba(59, 130, 246, 0.08); stroke: rgba(59, 130, 246, 0.35); stroke-width: 1; }
    .chart-dot { fill: rgba(59, 130, 246, 0.75); stroke: rgba(148, 197, 255, 0.9); stroke-width: 1; transition: fill 0.12s, stroke-width 0.12s; }
    .chart-dot:hover { fill: var(--orange); stroke: #ffd8a3; stroke-width: 1.5; }
    .chart-dot.is-coding { fill: rgba(245, 158, 11, 0.7); stroke: rgba(245, 158, 11, 0.95); }
    .chart-dot.is-coding:hover { fill: var(--orange); stroke: #fff; }

    .chart-tooltip {
      position: fixed; pointer-events: none; z-index: 60;
      background: #0a0e18; border: 1px solid var(--border-accent, var(--border)); border-radius: 4px;
      padding: 0.45rem 0.65rem; font-size: 0.68rem; color: var(--text); font-family: var(--font-mono);
      box-shadow: 0 8px 24px rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.1s;
      max-width: 220px; line-height: 1.5;
    }
    .chart-tooltip.visible { opacity: 1; }
    .chart-tooltip-name-row { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.15rem; }
    .chart-tooltip-name-row .provider-icon,
    .chart-tooltip-name-row .provider-icon-fallback { flex-shrink: 0; opacity: 0.95; }
    .chart-tooltip-name { color: var(--accent); font-weight: 700; }
    .chart-tooltip-stale { color: var(--text-muted); }

    .table-container { overflow-x: auto; background-color: var(--card-bg); border-radius: 4px 4px 0 0; border: 1px solid var(--border); border-bottom: none; }
    table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; }
    /* table-layout: fixed (tried earlier) forces EVERY column to the exact
       width implied by percentages set here, regardless of actual content —
       that's fine for the Provider column (always exactly one small icon)
       but wrong for Model (names range from ~8 to 40+ characters) and Arena
       Score (sometimes just a number, sometimes number + stale-mark icon +
       rank-delta arrow), which need to size to their real content. Forcing
       those to a guessed percentage caused overflow/wrapping that made row
       heights inconsistent row-to-row, which is what broke the border-
       bottom line's visual continuity across columns (confirmed: removing
       the Provider column's fixed width alone fixed it). Back to auto
       layout — the Provider column's width is constrained directly via
       .provider-icon-wrap's fixed size instead, which doesn't have this
       problem since it's sized in px, not as a table-wide percentage. */
    th, td { padding: var(--row-padding); border-bottom: 1px solid var(--border); white-space: nowrap; transition: padding 0.15s ease; }
    th {
      background-color: var(--header-bg); color: var(--text-muted); font-weight: 600; font-size: 0.68rem;
      text-transform: uppercase; letter-spacing: 0.08em; cursor: pointer; user-select: none;
      font-family: var(--font-mono);
      text-align: center;
    }
    th:hover { color: var(--text); }
    th.sort-active { color: var(--accent); }
    tr.data-row { cursor: pointer; }
    tr.data-row:hover td { background-color: rgba(59, 130, 246, 0.04); }

    .model-cell { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; min-width: 0; }
    /* Safety net for unusually long model names — harmless under normal
       auto table layout (only engages if a name is wide enough to need
       it), kept from the earlier fixed-layout attempt. */
    .model-cell > span:first-child {
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
    }
    .provider-cell { display: flex; justify-content: center; align-items: center; }
    .provider-icon-wrap {
      display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .provider-icon {
      display: block; object-fit: contain; opacity: 0.85;
      transition: opacity 0.15s ease;
    }
    tr.data-row:hover .provider-icon { opacity: 1; }
    .provider-icon-fallback {
      display: flex; align-items: center; justify-content: center; box-sizing: border-box;
      border-radius: 50%; background-color: var(--card-bg); border: 1px solid var(--border);
      color: var(--text-muted); font-family: var(--font-mono); font-weight: 700;
      line-height: 1;
    }
    .score-cell { font-weight: 700; color: var(--orange); font-family: var(--font-mono); text-align: center;}
    .score-cell.no-score { color: var(--text-muted); font-weight: 400; font-style: normal; text-align: center;}
    .score-cell-suffix { color: var(--text-muted); font-size: 0.65rem; }
    .stale-mark { color: var(--text-muted); font-size: 0.68rem; margin-right: 0.3rem; cursor: help; text-align: center;}
    .mono-cell { font-family: var(--font-mono); font-size: 0.85rem; text-align: center;}

    .rank-delta { font-size: 0.7rem; font-weight: 700; margin-left: 0.35rem; font-family: var(--font-mono); }
    .rank-delta.up { color: var(--green); }
    .rank-delta.down { color: var(--red); }
    .rank-delta.same { color: var(--text-muted); }

    .pagination-bar {
      display: flex; justify-content: space-between; align-items: center; background-color: var(--header-bg);
      border: 1px solid var(--border); border-radius: 0 0 4px 4px; padding: 0.75rem 1rem; font-size: 0.72rem;
      color: var(--text-muted); flex-wrap: wrap; gap: 0.75rem;
      font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.03em;
    }
    .pagination-controls { display: flex; align-items: center; gap: 0.5rem; }
    .pg-btn {
      background-color: transparent; border: 1px solid var(--border); color: var(--text); padding: 0.35rem 0.75rem;
      border-radius: 3px; font-size: 0.7rem; cursor: pointer; font-weight: 600;
      font-family: var(--font-mono); text-transform: uppercase;
    }
    .pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
    .pg-btn:not(:disabled):hover { border-color: var(--accent); color: var(--accent); }
    .pageSize-select {
      background: transparent; color: var(--text); border: 1px solid var(--border); padding: 0.3rem 0.5rem;
      border-radius: 3px; font-size: 0.7rem; outline: none; font-family: var(--font-mono);
    }
    .empty-state { text-align: center; padding: 3rem; color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.03em; }

    /* New-visitor explainer note (model-count + chart-coverage), placed
       right after the table/pagination. Styled to match .footer-fineprint
       exactly (same markup shape, same muted small-print treatment) per
       user request. */
    .listing-note {
      display: flex;
      flex-direction: column;
      gap: 0.8rem;
      font-size: 0.7rem;
      color: rgba(110, 118, 129, 0.6);
      margin-top: 1.25rem;
    }
    .listing-note p { margin: 0; }
    .listing-note strong { color: #8b949e; }
    .listing-note-link {
      background: none; border: none; padding: 0; margin: 0; font: inherit;
      color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
    }
    .listing-note-link:hover { color: #8b949e; }

    /* ---------- Detail drawer ---------- */
    .drawer-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.65); display: none;
      align-items: flex-start; justify-content: flex-end; z-index: 50;
    }
    .drawer-overlay.open { display: flex; }
    .drawer {
      width: 100%; max-width: 420px; height: 100%; background: var(--card-bg);
      border-left: 1px solid var(--border-accent); padding: 1.5rem; overflow-y: auto;
      position: relative;
    }
    .drawer-close {
      position: absolute; top: 1.1rem; right: 1.1rem; z-index: 1;
      display: flex; align-items: center; justify-content: center;
      width: 1.9rem; height: 1.9rem;
      background: transparent; border: 1px solid var(--border); color: var(--text-muted); border-radius: 3px;
      font-size: 0.95rem; cursor: pointer; padding: 0;
    }
    .drawer-close:hover { color: var(--text); border-color: var(--accent); }
    .drawer-header { display: flex; align-items: flex-start; gap: 0.85rem; margin: 1.9rem 0 1.25rem 0; }
    .drawer-header-logo { flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
    .drawer-header-logo .provider-icon,
    .drawer-header-logo .provider-icon-fallback { opacity: 0.95; }
    .drawer-header-text { min-width: 0; flex: 1; }
    .drawer-title { font-size: 1.25rem; font-weight: 700; line-height: 1.3; margin: 0 0 0.2rem 0; }
    .drawer-provider { color: var(--text-muted); font-size: 0.78rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.03em; }
    .drawer-section { margin-bottom: 1.25rem; }
    .drawer-section.hidden { display: none; }
    .drawer-placeholder-text { color: var(--text-muted); font-size: 0.85rem; }
    .drawer-section-title { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 700; margin-bottom: 0.5rem; font-family: var(--font-mono); }
    .drawer-section-title::before { content: "// "; color: var(--orange); }
    .drawer-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .drawer-stat { background: var(--header-bg); border: 1px solid var(--border); border-radius: 3px; padding: 0.6rem 0.8rem; }
    .drawer-stat-value { font-size: 1.1rem; font-weight: 700; font-family: var(--font-mono); color: var(--orange); }
    .drawer-stat-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-family: var(--font-mono); }
    .drawer-variant-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.82rem; }
    .drawer-variant-row:last-child { border-bottom: none; }

    .empty-state a, .drawer a { color: var(--accent); }

    /* ==========================================
       Commercial Fineprint Footer with Brand Logo
       ========================================== */
    .site-footer {
      margin-top: 4rem;
      padding: 3rem 0 0 0;
      border-top: 1px solid var(--border-accent, #21262d);
      /*background-color: #090b0e;*/
      color: var(--text-muted, #8b949e);
      font-size: 0.78rem;
      line-height: 1.5;
    }
    
    .footer-container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 1rem;
    }
    
    .footer-top {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      gap: 2rem;
      margin-bottom: 2rem;
    }
    
    /* Brand Section & Logo Handling */
    .footer-brand {
      max-width: 360px;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.75rem;
    }
    
    .footer-logo-link {
      display: inline-block;
      text-decoration: none;
      transition: opacity 0.2s ease;
    }
    
    .footer-logo-link:hover {
      opacity: 0.85;
    }
    
    .footer-logo-img {
      height: 48px;   /* Constrains vertical size neatly */
      width: auto;
      max-width: 220px;
      object-fit: contain;
      display: block;
    }
    
    .footer-tagline {
      margin: 0;
      font-size: 0.75rem;
      color: #6e7681;
      line-height: 1.45;
    }
    
    /* Navigation Links Grid */
    .footer-nav-grid {
      display: flex;
      gap: 3rem;
      flex-wrap: wrap;
    }
    
    .footer-col {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      position: relative;
      z-index: 1;
    }

    /* Groups "Regional Reach" + "Utilities" so the map can sit behind both
       as a background layer, filling the trailing empty space without
       adding its own row or affecting the flex row's height. */
    .footer-col-group {
      position: relative;
      display: flex;
      gap: 3rem;
      flex: 1 1 auto;
    }
    .footer-map-bg {
      position: absolute;
      bottom: -1.5rem; left: 50%;
      transform: translateX(-50%);
      width: 325px;
      max-width: none;
      height: auto;
      object-fit: contain;
      opacity: 0.4;
      filter: grayscale(0.1);
      pointer-events: none;
      z-index: 0;
    }

    .footer-col-title {
      font-weight: 600;
      color: var(--text, #f0f6fc);
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.2em;
      margin-bottom: 0.25rem;
    }
    
    .footer-col a {
      color: #8b949e;
      text-decoration: none;
      transition: color 0.2s ease;
    }
    
    .footer-col a:hover {
      color: var(--text, #f0f6fc);
    }
    .footer-col p {
      font-weight: 600;
      color: var(--text, #f0f6fc);
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.2em;
      margin-bottom: 0.25rem;
    }
    
    /* Dividers & Fineprint Legal Text */
    .footer-divider {
      border: 0;
      border-top: 1px solid #161b22;
      margin: 1.5rem 0;
    }
    
    .footer-fineprint {
      display: flex;
      flex-direction: column;
      gap: 0.8rem;
      font-size: 0.7rem;
      color: rgba(110, 118, 129, 0.6);
    }
    
    .footer-fineprint p {
      margin: 0;
    }
    
    .footer-fineprint strong {
      color: #8b949e;
    }
    
    /* Footer Bottom / Copyright Row */
    .footer-bottom {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 1rem;
      font-size: 0.7rem;
      color: #484f58;
    }
    
    .footer-meta {
      font-family: monospace;
    }

    .drawer-badge-preview { display: block; margin-bottom: 0.6rem; height: 28px; }
    .drawer-embed-textarea {
      width: 100%; background: var(--header-bg); color: var(--text); border: 1px solid var(--border);
      border-radius: 8px; padding: 0.6rem; font-family: ui-monospace, monospace;
      font-size: 0.72rem; resize: none;
    }
    .action-btn-full { margin-top: 0.5rem; width: 100%; justify-content: center; }

    /* ---------- Benchmarks & Model Insights: header + Quick Insights
       (always visible) ---------- */
    .benchmarks-insights-section { margin-top: 2rem; }
    .benchmarks-section-header { margin-bottom: 1.1rem; }
    .benchmarks-eyebrow { margin-bottom: 0.3rem;  margin-top: 4rem; padding: 3rem 0 0 0; border-top: 1px solid var(--border-accent, #21262d); }
    .benchmarks-section-title {
      margin: 0 0 0.4rem 0; font-size: 1.8rem; font-weight: 800; letter-spacing: 0.2em; font-family: var(--font-display); text-transform: uppercase; color: var(--text);
    }
    .benchmarks-section-subtitle {
      margin: 0 0 4rem 0; max-width: 620px; font-size: 0.8rem; line-height: 1.55; color: var(--text-muted);
    }

    /* ---------- Benchmarks grid (horizontal bar cards) — separately
       toggleable by renderBenchmarks() (benchmarks.js) from the always-
       visible wrapper above; own top margin for spacing from Quick
       Insights when visible, own bottom margin for spacing before the
       footer, so both survive independent of the wrapper's own
       margins. ---------- */
    .benchmarks-section { margin-top: 1.25rem; margin-bottom: 1.25rem; }
    .benchmarks-section.hidden { display: none; }
    .benchmarks-grid {
      display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 1rem;
    }
    .bench-card {
      background-color: var(--card-bg); border: 1px solid var(--border);
      border-radius: 4px; padding: 1rem 1.1rem;
      display: flex; flex-direction: column;
    }
    .bench-card-title {
      font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
      text-transform: uppercase; letter-spacing: 0.04em; color: var(--text);
      margin-bottom: 0.3rem;
    }
    .bench-card-category {
      display: inline-flex; align-items: center; gap: 0.3rem;
      font-family: var(--font-mono); font-size: 0.62rem; color: var(--accent);
      text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.6rem;
    }
    .bench-card-category::before { content: "●"; font-size: 0.5rem; }
    .bench-card-sep {
      margin-bottom: 0.7rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--border);
    }
    .bench-card-sep.tight { margin-bottom: 0.4rem; padding-bottom: 0; border-bottom: none; }
    /* Outer wrapper has overflow: visible so tooltips can pop out */
    .bench-card-desc-wrapper {
      position: relative;
      display: block;
      outline: none;
    }
    
    .bench-card-desc {
      font-size: 0.72rem;
      color: var(--text-muted, #888);
      line-height: 1.45;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      cursor: pointer;
    }
    
    /* Supports BOTH hover (desktop) and tap/focus (DuckDuckGo Mobile/Safari) */
    .bench-card-desc-wrapper[data-title]:hover::after,
    .bench-card-desc-wrapper[data-title]:focus::after {
      content: attr(data-title);
      position: absolute;
      top: 100%; /* Position below so top containers won't clip it */
      left: 0;
      width: 250px;
      padding: 8px 12px;
      background-color: #1a1d24; /* Hardcoded solid color */
      color: #ffffff;
      border: 1px solid #333d4d;
      border-radius: 6px;
      font-size: 0.72rem;
      line-height: 1.4;
      font-weight: normal;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
      z-index: 99999;
      white-space: normal;
      pointer-events: none;
      display: block;
    }
    .bench-rows { flex: 1; }
    .bench-card-footer {
      margin-top: 0.75rem; padding-top: 0.6rem; border-top: 1px solid var(--border);
      font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted);
      text-transform: uppercase; letter-spacing: 0.03em;
    }
    .bench-row {
      display: grid;
      grid-template-columns: 1.1rem 1.1rem 1fr auto;
      grid-template-rows: auto auto;
      column-gap: 0.5rem;
      cursor: pointer;
      padding: 0.4rem 0;
    }
    .bench-row + .bench-row { border-top: 1px solid var(--border); }
    .bench-row:hover .bench-name { color: var(--accent); }
    .bench-rank {
      grid-column: 1; grid-row: 1 / 3; align-self: center;
      font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); text-align: center;
    }
    .bench-row .provider-icon,
    .bench-row .provider-icon-fallback {
      grid-column: 2; grid-row: 1 / 3; align-self: center; justify-self: center;
    }
    .bench-name {
      grid-column: 3; grid-row: 1;
      font-size: 0.78rem; font-weight: 600; white-space: nowrap; overflow: hidden;
      text-overflow: ellipsis; transition: color 0.15s;
    }
    .bench-score {
      grid-column: 4; grid-row: 1;
      font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; color: var(--orange);
    }
    .bench-bar-track {
      grid-column: 3 / 5; grid-row: 2; margin-top: 0.35rem;
      height: 5px; background: var(--accent-glow); border-radius: 3px; overflow: hidden;
    }
    .bench-bar-fill {
      height: 100%; width: var(--bar-pct, 0%);
      background: var(--accent); opacity: 0.55;
      border-radius: 3px;
    }

    /* ---------- Fastest & Most Affordable — 3-card row (quickpanels.js) ---------- */
    .quickpanel-row {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
      margin-top: 1.25rem;
    }
    @media (max-width: 900px) { .quickpanel-row { grid-template-columns: 1fr; } }
    /* Same muted small-print treatment as .listing-note/.footer-fineprint,
       for visual consistency between this page's various disclosure/
       context footnotes. Placed directly under the row (not inside any
       one card) since it applies to Fastest+Latency jointly, not
       Cheapest — see index.php's comment above this row for why this
       exists (fastest_ranking/lowest_latency_ranking rank across
       OpenRouter's full catalog, not just the major labs shown
       elsewhere on the page). */
    .quickpanel-footnote {
      font-size: 0.7rem; color: rgba(110, 118, 129, 0.6);
      margin: 0.6rem 0 0; line-height: 1.5;
    }
    .quickpanel-card {
      background-color: var(--card-bg); border: 1px solid var(--border);
      border-radius: 4px; padding: 1rem 1.1rem; margin-top: 0;
      display: flex; flex-direction: column;
    }
    .quickpanel-card-header {
      display: flex; align-items: flex-start; justify-content: space-between;
      gap: 0.6rem; margin-bottom: 0.85rem; padding-bottom: 0.75rem;
      border-bottom: 1px solid var(--border);
    }
    .quickpanel-card-heading { display: flex; align-items: flex-start; gap: 0.55rem; }
    .quickpanel-card-icon {
      flex: none; width: 1.6rem; height: 1.6rem; border-radius: 5px;
      display: flex; align-items: center; justify-content: center;
      background: var(--accent-glow); color: var(--accent); font-size: 0.85rem;
      margin-top: 0.05rem;
    }
    .quickpanel-card-title {
      font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
      text-transform: uppercase; letter-spacing: 0.04em; color: var(--text);
    }
    .quickpanel-card-sub {
      display: block; font-weight: 400; text-transform: none; letter-spacing: 0;
      color: var(--text-muted); font-size: 0.68rem; margin-top: 0.15rem;
    }
    .quickpanel-card-link {
      flex: none; font-size: 0.68rem; color: var(--accent); text-decoration: none;
      white-space: nowrap; display: inline-flex; align-items: center; gap: 0.2rem;
      font-family: var(--font-mono);
    }
    .quickpanel-card-link:hover { text-decoration: underline; }
    .quickpanel-card-footer {
      margin-top: auto; padding-top: 0.7rem; border-top: 1px solid var(--border);
      font-size: 0.68rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.35rem;
    }
    .quickpanel-card-footer i { font-size: 0.85rem; }

    /* Fastest / Lowest Latency / Cheapest rows all share this one set of
       classes — numbered rank badge (gold/silver/bronze for #1-3, neutral
       gray for #4-5), model name, a thin progress bar scaled against the
       highest value IN THIS TOP-5 (same "relative to this top-5, not a
       fixed ceiling" logic used throughout), and the real value
       right-aligned when available — see renderRankOnlyPanel()'s and
       renderCheapestPanel()'s doc comments in quickpanels.js for the
       real-number-vs-rank-only fallback logic this markup needs to
       support (no bar/value when a model has no real data for it yet).
       One divider border between each row — same convention as the
       unrelated Benchmarks grid's own .bench-row + .bench-row — instead
       of relying on gap-only whitespace to separate items. */
    .quickpanel-rank-rows { display: flex; flex-direction: column; }
    .quickpanel-rank-row {
      display: grid; grid-template-columns: 1.4rem 1.1rem 1fr auto;
      align-items: center; column-gap: 0.55rem; cursor: pointer;
      padding: 0.55rem 0; transition: background 0.12s;
    }
    .quickpanel-rank-row + .quickpanel-rank-row { border-top: 1px solid var(--border); }
    .quickpanel-rank-row:hover { background: rgba(255,255,255,0.03); }
    .quickpanel-rank-row:hover .bench-name { color: var(--accent); }
    .quickpanel-rank-badge {
      grid-column: 1; grid-row: 1 / 3; justify-self: start;
      width: 1.4rem; height: 1.4rem; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
      background: rgba(255,255,255,0.06); color: var(--text-muted);
    }
    /* Ranks 1-3: no circle background — the rosette-number icon itself
       (rankBadgeContent() in quickpanels.js) carries the gold/silver/
       bronze color directly, sized up to occupy roughly the same visual
       footprint the removed 1.4rem circle used to. Ranks 4-5 keep the
       original circled plain-number treatment entirely unchanged (no
       .rank-4/.rank-5 class exists — rankBadgeClass in quickpanels.js
       only ever applies rank-1/2/3). */
    .quickpanel-rank-badge.rank-1,
    .quickpanel-rank-badge.rank-2,
    .quickpanel-rank-badge.rank-3 {
      background: none; width: auto; height: auto;
    }
    .quickpanel-rank-badge.rank-1 i { color: #f5b942; }
    .quickpanel-rank-badge.rank-2 i { color: #d7dbe2; }
    .quickpanel-rank-badge.rank-3 i { color: #c97b3f; }
    /* Ranks 4-5's plain-number badge stays at the default 0.68rem set
       above. Ranks 1-3's icon is sized separately, up from that, to fill
       the space the removed circle occupied. */
    .quickpanel-rank-badge.rank-1 i,
    .quickpanel-rank-badge.rank-2 i,
    .quickpanel-rank-badge.rank-3 i { font-size: 1.4rem; }
    .quickpanel-rank-row .provider-icon,
    .quickpanel-rank-row .provider-icon-fallback { grid-column: 2; grid-row: 1 / 3; justify-self: center; }
    .quickpanel-rank-row .bench-name {
      grid-column: 3; grid-row: 1; font-size: 0.78rem; font-weight: 600;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.15s;
    }
    .quickpanel-rank-value {
      grid-column: 4; grid-row: 1; margin-left: 0.4rem; font-family: var(--font-mono);
      font-size: 0.72rem; color: var(--green); font-weight: 600; white-space: nowrap;
    }
    /* Stale speed data (past SPEED_DATA_MAX_AGE_HOURS, quickpanels.js) —
       dimmed from the normal fresh-value green so a "last known" number
       reads visually distinct from a live one, same idea as .stale-mark's
       own muted amber elsewhere on the page, without needing a second
       color that would compete with the badge/bar accent colors already
       in this card. */
    .quickpanel-rank-value-stale { color: var(--text-muted); }
    /* No speed value ever recorded for this model yet (distinct from
       stale above — this one has never had ANY measurement, fresh or
       old). Shown as a small "Pending" label + hourglass icon rather
       than empty space, so a top-5-ranked row never reads as visually
       broken/incomplete next to its 4 siblings that do have numbers.
       Lower weight and no mono font (it isn't a number) to read clearly
       as a status label, not a measurement. */
    .quickpanel-rank-value-pending {
      font-family: inherit; font-weight: 500; font-style: italic;
      color: var(--text-muted); opacity: 0.75; cursor: help;
      display: inline-flex; align-items: center; gap: 0.25rem;
      position: relative;
    }
    .quickpanel-rank-value-pending i { font-size: 0.85rem; }
    .quickpanel-rank-bar-track {
      grid-column: 3 / 5; grid-row: 2; margin-top: 0.32rem;
      height: 4px; background: var(--accent-glow); border-radius: 3px; overflow: hidden;
    }
    .quickpanel-rank-bar-fill {
      height: 100%; width: var(--bar-pct, 0%); background: var(--accent);
      opacity: 0.55; border-radius: 3px;
    }

    /* ---------- Compare Models (quickpanels.js) ---------- */
    .compare-card {
      background-color: var(--card-bg); border: 1px solid var(--border-accent);
      border-radius: 4px; padding: 1.1rem 1.2rem; margin-top: 1.25rem;
    }
    .compare-card-header {
      margin-bottom: 1.1rem; display: flex; align-items: flex-start;
      justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    }
    .compare-card-heading { display: flex; align-items: flex-start; gap: 0.6rem; }
    .compare-card-icon {
      flex: none; width: 1.7rem; height: 1.7rem; border-radius: 5px;
      display: flex; align-items: center; justify-content: center;
      background: var(--accent-glow); color: var(--accent); font-size: 0.9rem;
      margin-top: 0.05rem;
    }
    .compare-card-title {
      font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
      text-transform: uppercase; letter-spacing: 0.04em; color: var(--text);
    }
    .compare-card-subtitle { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
    /* Purely decorative context badges from the approved design — no data
       behind them, just reinforcing what the tool does at a glance. Hidden
       on narrow screens where they'd otherwise wrap awkwardly above the
       selects rather than sitting inline with the title. */
    .compare-card-badges { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
    .compare-card-badge {
      display: inline-flex; align-items: center; gap: 0.35rem;
      font-size: 0.72rem; color: var(--text-muted); white-space: nowrap;
    }
    .compare-card-badge i { color: var(--accent); font-size: 0.95rem; }
    @media (max-width: 780px) { .compare-card-badges { display: none; } }

    .compare-selects-row {
      display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
    }
    .compare-select-group { flex: 1; min-width: 220px; }
    .compare-select-group .dropdown { width: 100%; }
    /* Two-line trigger: "SELECT MODEL A/B" sits inside the same bordered
       box as the search placeholder/selected model name, stacked above
       it — matching the approved design where the label is part of the
       dropdown control itself rather than an external caption above it.
       Taller than the default .dropdown-trigger to fit both lines
       comfortably, with the dropdown-arrow icon vertically centered
       against the whole two-line block rather than just the first line. */
    .compare-selects-row .dropdown-trigger.compare-dropdown-trigger {
      width: 100%; justify-content: space-between; align-items: center;
      height: 3.6rem; box-sizing: border-box;
    }
    .compare-dropdown-trigger-text {
      display: flex; flex-direction: column; gap: 0.2rem; align-items: flex-start;
      overflow: hidden;
    }
    .compare-select-label {
      font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
      text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted);
      line-height: 1;
    }
    .compare-dropdown-trigger .dd-value {
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
    }
    .compare-vs {
      flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      border: 1px solid var(--border-accent);
      font-family: var(--font-display); font-size: 0.72rem; color: var(--text-muted);
      letter-spacing: 0.05em;
    }
    @media (max-width: 700px) { .compare-vs { align-self: center; } }
    /* Searchable dropdown variant — reuses .dropdown/.dropdown-menu/.dd-item
       chrome from the static filter dropdowns (filters.js) but adds a
       search input + taller scrollable list, since a plain static button
       list isn't practical across ~350 model names. */
    .dropdown-menu-searchable { min-width: 260px; max-height: 320px; }
    .dd-search-input {
      background: var(--header-bg); border: 1px solid var(--border); color: var(--text);
      border-radius: 3px; padding: 0.45rem 0.6rem; font-size: 0.75rem;
      font-family: var(--font-mono); outline: none; margin-bottom: 0.3rem;
    }
    .dd-search-input:focus { border-color: var(--accent); }
    .dd-item-list { overflow-y: auto; max-height: 260px; display: flex; flex-direction: column; gap: 0.1rem; }
    .compare-dd-item { display: flex; align-items: center; gap: 0.5rem; text-transform: none; letter-spacing: 0; }

    /* Compare Models button — a deliberate manual trigger per the approved
       design (button + lock-icon "Pick two models..." helper text), sitting
       below the two selects rather than auto-rendering the comparison the
       instant both are picked. Disabled/dim until both selects have a
       value; quickpanels.js still re-renders compare-body reactively on
       each select change under the hood, this button is a visual
       confirmation step layered on top, not a new data-fetch trigger. */
    .compare-action-row { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
    .compare-btn {
      display: inline-flex; align-items: center; gap: 0.5rem;
      background: var(--accent); color: #fff; border: none; border-radius: 5px;
      padding: 0.65rem 1.4rem; font-size: 0.82rem; font-weight: 600;
      font-family: inherit; cursor: pointer; transition: filter 0.15s;
    }
    .compare-btn:hover { filter: brightness(1.1); }
    .compare-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
    .compare-hint {
      display: inline-flex; align-items: center; gap: 0.35rem;
      font-size: 0.7rem; color: var(--text-muted);
    }

    /* Empty when nothing is selected — renderCompareBody() (quickpanels.js)
       only toggles this element's .hidden class as a functional hook
       alongside #compare-body; the "pick two models" messaging already
       lives in .compare-hint right above (with the lock icon), so this no
       longer holds its own duplicate text. Near-zero padding since it's
       not framing any content of its own anymore — just enough so the
       card doesn't end abruptly right at the hint line when nothing is
       selected. */
    .compare-empty-state {
      padding: 0.4rem 0 0;
    }
    .compare-empty-state.hidden { display: none; }
    .compare-body.hidden { display: none; }

    /* Two-column layout matching the reference: spec table on the left,
       benchmark comparison bars on the right, side by side — not stacked
       as two separate full-width blocks. Collapses to one column on
       narrow screens since two columns of a 260px+ minimum each won't fit
       comfortably below ~700px. */
    .compare-body {
      display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.3fr);
      gap: 1.5rem; align-items: start;
    }
    @media (max-width: 700px) { .compare-body { grid-template-columns: 1fr; } }

    .compare-spec-table { width: 100%; border-collapse: collapse; }
    .compare-spec-table td {
      padding: 0.4rem 0.5rem; font-size: 0.74rem; border-bottom: 1px solid var(--border);
    }
    .compare-spec-label { color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; font-size: 0.64rem; letter-spacing: 0.03em; }
    .compare-spec-header-row td { font-weight: 700; color: var(--text); border-bottom: 1px solid var(--border-accent); padding-bottom: 0.5rem; }
    .compare-spec-header-row td span { margin-left: 0.35rem; }

    /* Metric bars: compact — model name sits INSIDE the bar itself
       (overlaid on the fill), value sits outside to the right in its own
       column. One metric = a label line + two short stacked bars, no
       separate name column eating horizontal width. This is the layout
       change that actually saves the vertical space asked for — the
       previous version gave each bar its own label + a 110px name column,
       roughly doubling the height per metric versus this. */
    .compare-metrics { display: flex; flex-direction: column; gap: 0.7rem; }
    .compare-metric-block { padding-top: 0.5rem; border-top: 1px solid var(--border); }
    .compare-metric-block:first-child { border-top: none; padding-top: 0; }
    .compare-metric-label {
      font-family: var(--font-mono); font-size: 0.64rem; text-transform: uppercase;
      letter-spacing: 0.03em; color: var(--text-muted); margin-bottom: 0.3rem;
    }
    .compare-metric-bar-row {
      display: grid; grid-template-columns: 1fr 44px; align-items: center;
      gap: 0.4rem; margin-bottom: 0.22rem;
    }
    .compare-metric-bar-row:last-child { margin-bottom: 0; }
    .compare-metric-bar-track {
      height: 20px; background: rgba(255,255,255,0.04); border-radius: 3px;
      overflow: hidden; position: relative;
    }
    .compare-metric-bar-fill {
      height: 100%; width: var(--bar-pct, 0%);
      background: var(--accent); opacity: 0.55; border-radius: 3px;
      display: flex; align-items: center; padding-left: 0.4rem;
      min-width: fit-content; box-sizing: border-box;
    }
    .compare-metric-bar-fill-b { background: var(--purple); }
    .compare-metric-bar-winner { opacity: 0.95; background: var(--green); }
    .compare-metric-bar-name {
      font-size: 0.66rem; color: var(--text); white-space: nowrap;
      font-weight: 500;
    }
    .compare-metric-value { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text); text-align: right; }

    /* ---------- Quick Insights stats strip — 4-up summary row below the
       Quick Insights section (3-card row + Compare Models), per the
       approved design concept. "Models Tracked" is wired to the real live
       model count (rawModels.length, set from renderQuickStats() in
       quickpanels.js) — the other 3 are static descriptive copy, not data
       pulled from anywhere, since there's no real per-metric source for
       "Real-time Data"/"Open & Transparent"/"Updated Daily" beyond what
       the page already generally is. ---------- */
    .quickstats-row {
      display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
      border: 1px solid var(--border-accent); border-radius: 6px;
      margin-top: 1.25rem; margin-bottom: 1.25rem; overflow: hidden;
      background: linear-gradient(180deg, rgba(59,130,246,0.03), transparent 40%);
    }
    @media (max-width: 900px) { .quickstats-row { grid-template-columns: repeat(2, 1fr); } }
    @media (max-width: 520px) { .quickstats-row { grid-template-columns: 1fr; } }
    .quickstat-item {
      display: flex; align-items: flex-start; gap: 0.75rem;
      padding: 1.25rem 1.4rem; border-right: 1px solid var(--border);
    }
    .quickstats-row .quickstat-item:last-child { border-right: none; }
    @media (max-width: 900px) {
      .quickstat-item:nth-child(2n) { border-right: none; }
      .quickstat-item:nth-child(n+3) { border-top: 1px solid var(--border); }
    }
    @media (max-width: 520px) {
      .quickstat-item { border-right: none !important; }
      .quickstat-item:not(:first-child) { border-top: 1px solid var(--border); }
    }
    .quickstat-icon {
      flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      background: var(--accent-glow); color: var(--accent); font-size: 1.1rem;
    }
    /* "Models Tracked" gets a plain number instead of an icon, matching
       the approved design (big blue numeral, no circle/badge behind it) —
       visually distinct from the other 3 stats since it's the one real
       live figure among otherwise-static descriptive items. */
    .quickstat-number {
      flex: none; text-align: center;
      font-family: var(--font-display); font-size: 1.6rem; font-weight: 700;
      color: var(--accent); line-height: 1;
    }
    .quickstat-body { display: flex; flex-direction: column; gap: 0.15rem; }
    .quickstat-title { font-size: 0.85rem; font-weight: 700; color: var(--text); }
    .quickstat-desc { font-size: 0.72rem; color: var(--text-muted); line-height: 1.4; }

    /* Capability breakdown bars (drawer): reuses .bench-name/.bench-bar-track/
       .bench-bar-fill/.bench-score from the benchmark cards above for visual
       consistency, but these rows are static data display (not clickable
       drill-through to another model), so no cursor:pointer / hover / rank
       column — those are specific to .bench-row's click-through behavior. */
    .drawer-capability-row {
      display: grid;
      grid-template-columns: 1fr auto;
      grid-template-rows: auto auto;
      column-gap: 0.5rem;
      padding: 0.4rem 0;
    }
    .drawer-capability-row + .drawer-capability-row { border-top: 1px solid var(--border); }
    .drawer-capability-row .bench-name { grid-column: 1; grid-row: 1; }
    .drawer-capability-row .bench-score { grid-column: 2; grid-row: 1; }
    .drawer-capability-row .bench-bar-track { grid-column: 1 / 3; grid-row: 2; }
    .drawer-capability-more {
      font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted);
      text-align: center; padding-top: 0.6rem; margin-top: 0.3rem;
      border-top: 1px solid var(--border);
    }

    /* Tabler webfont icons: normalize size/line-height so they align cleanly
       with surrounding text regardless of the parent button's font-size. */
    [class^="ti-"], [class*=" ti-"] {
      font-size: 1.75em;
      line-height: 1;
      vertical-align: -0.05em;
    }

    /* Stale Icon Base */
    .stale-mark {
      font-size: 10px;
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: rgb(245, 158, 11, 0.5);
      cursor: help;
      vertical-align: middle;
      margin-left: 4px;
      text-transform: initial;
    }

    .stale-mark .ti {
      font-size: 1.1rem;
      line-height: 1;
    }

    /* Tooltip Main Box — High-Contrast Glassmorphism. Shared by .stale-mark
       (per-cell/per-card staleness marks) and .status-chip-warning (the
       header source-health chip, Phase D) — both use the same
       data-tooltip-driven pattern, so the tooltip visuals live in one
       place rather than being duplicated per element type. */
    .stale-mark::after,
    .quickpanel-rank-value-pending::after,
    .status-chip-warning[data-tooltip]::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: calc(100% + 8px);
      left: 50%;
      transform: translateX(-50%);
      width: max-content;
      max-width: 260px;
      padding: 8px 12px;

      /* Lowered base opacity to 0.45 for real transparency */
      background: rgba(15, 23, 42, 0.25);
      -webkit-backdrop-filter: blur(16px) saturate(180%);
      backdrop-filter: blur(16px) saturate(180%);

      /* Glass Border + Top Inner Edge Reflection */
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 3px;
      color: rgb(255,255,255,0.5);
      font-size: 0.65rem;
      font-weight: 500;
      line-height: 1.4;
      white-space: normal;
      text-align: left;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.15s ease-in-out;
      z-index: 100;
    }

    /* Tooltip Arrow */
    .stale-mark::before,
    .quickpanel-rank-value-pending::before,
    .status-chip-warning[data-tooltip]::before {
      content: '';
      position: absolute;
      bottom: calc(100% + 3px);
      left: 50%;
      transform: translateX(-50%);
      width: 10px;
      height: 6px;

      /* Matches reduced opacity and higher blur */
      background: rgba(15, 23, 42, 0.25);
      -webkit-backdrop-filter: blur(16px) saturate(180%);
      backdrop-filter: blur(16px) saturate(180%);
      clip-path: polygon(0 0, 100% 0, 50% 100%);
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.15s ease-in-out;
      z-index: 100;
    }

    /* Trigger on Hover & Focus */
    .stale-mark:hover::after,
    .stale-mark:hover::before,
    .stale-mark:focus::after,
    .stale-mark:focus::before,
    .quickpanel-rank-value-pending:hover::after,
    .quickpanel-rank-value-pending:hover::before,
    .quickpanel-rank-value-pending:focus::after,
    .quickpanel-rank-value-pending:focus::before,
    .status-chip-warning[data-tooltip]:hover::after,
    .status-chip-warning[data-tooltip]:hover::before,
    .status-chip-warning[data-tooltip]:focus::after,
    .status-chip-warning[data-tooltip]:focus::before {
      opacity: 1;
      visibility: visible;
    }
    
    /*drawer main menu*/
    
    /* Menu Trigger Button - matches existing embed button style */
  .menu-trigger-btn {
    background: transparent; border: 1px solid rgba(42, 74, 122, 0); color: var(--accent);
    border-radius: 3px; padding: 0.5rem 0.9rem; font-size: 0.72rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 0.4rem; white-space: nowrap;
    font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em;
    transition: all 0.2s; flex-shrink: 0;
  }
  .menu-trigger-btn:hover {
    background: rgba(59, 130, 246, 0.1); border-color: var(--accent);
  }

  /* Menu Drawer Internal Layout */
  .menu-nav-grid {
    display: flex; flex-direction: column; gap: 2rem; padding-bottom: 2rem;
  }
  .menu-col {
    display: flex; flex-direction: column; gap: 0.6rem;
  }
  .menu-col-title, .menu-col-subtitle {
    font-weight: 600; color: var(--text, #f0f6fc); font-size: 0.75rem; 
    text-transform: uppercase; letter-spacing: 0.2em;
  }
  .menu-col-subtitle {
    margin-top: 0.75rem;
  }
.menu-col a {
  display: block;
  color: #8b949e;
  text-decoration: none;
  font-size: 0.85rem;
  
  /* Fixed border position at the left edge */
  border-left: 5px solid transparent;
  padding-left: 0.5rem;
  margin-left: 1rem;

  /* Animate color, border fade, and text shift independently */
  transition: color 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease;
}

.menu-col a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
  
  /* Gently shifts only the text to the right, keeping border pinned */
  padding-left: 1.25rem;
}