  /* ── Design tokens ──────────────────────────────────────────────────────
     The rankings app (views, tables, charts, admin) in the look of the new
     site: gold on ink, the site's sans and mono, square corners. Two themes
     follow <html data-theme> (css/base.css; the switch is in the header).
     --primary is gold for text, rules and marks (darkened on white so it
     reads); a filled control uses --primary-fill with --on-primary-fill on it,
     like the site's gold buttons. The old raw names --ink / --paper are
     --app-ink / --app-paper here: base.css already uses --ink and --paper. */
  :root,
  [data-theme="dark"] {
    --app-paper: #121212;            /* = --bg-page */
    --surface:   #1c1c1c;
    --app-ink:   #ececec;

    --bg:       var(--app-paper);
    --text:     var(--app-ink);
    --text-rgb: 236, 236, 236;
    --muted:    #a3a3a3;
    --primary:  #ffc627;
    --primary-fill:    #ffc627;
    --on-primary-fill: #191919;
    --border:       rgba(255,255,255,0.14);
    --rule-strong:  rgba(255,255,255,0.30);
    --hover:        rgba(255,198,39,0.11);
    --hover-strong: rgba(255,198,39,0.20);
    --track:        rgba(255,255,255,0.10);
    --chart-bar:    rgba(255,198,39,0.32);
    --ai-badge:     var(--primary);

    /* Topic categories: gold, teal, rust, grey -- one warm family. */
    --topic-method: #ffc627;
    --topic-impact: #6fc3c7;
    --topic-policy: #e8875a;
    --topic-nonai:  #8f8f8f;
    --topic-method-bg: rgba(255,198,39,0.18);
    --topic-impact-bg: rgba(111,195,199,0.20);
    --topic-policy-bg: rgba(232,135,90,0.20);

    --cat-1: #ffc627;  /* Business */
    --cat-2: #6fc3c7;  /* Economics */
    --cat-3: #b9a3e8;  /* Computer Science */
    --cat-4: #e8875a;  /* Interdisciplinary */
    --cat-5: #e59aae;  /* Healthcare */
    --cat-6: #9ab6d8;  /* Statistics */
  }

  [data-theme="light"] {
    --app-paper: #ffffff;
    --surface:   #f6f5f1;
    --app-ink:   #191919;

    --text-rgb: 25, 25, 25;
    --muted:    #5f5f5f;
    --primary:  #8a6300;             /* gold dark enough for text on white */
    --border:       rgba(25,25,25,0.14);
    --rule-strong:  rgba(25,25,25,0.32);
    --hover:        rgba(255,198,39,0.16);
    --hover-strong: rgba(255,198,39,0.30);
    --track:        rgba(25,25,25,0.08);
    --chart-bar:    rgba(138,99,0,0.24);

    --topic-method: #8a6300;
    --topic-impact: #1f6f6b;
    --topic-policy: #a4471f;
    --topic-nonai:  #8a8a8a;
    --topic-method-bg: rgba(138,99,0,0.12);
    --topic-impact-bg: rgba(31,111,107,0.12);
    --topic-policy-bg: rgba(164,71,31,0.12);

    --cat-1: #8a6300;
    --cat-2: #1f6f6b;
    --cat-3: #6b4c9a;
    --cat-4: #a4471f;
    --cat-5: #9c3a52;
    --cat-6: #46617f;
  }

  :root {
    /* type */
    --font-display: var(--font);
    --font-body:    var(--font);
    --font-mono:    var(--mono);
    --font-serif:   var(--font);
    --fs-eyebrow: 10px;
    --fs-meta:    11px;
    --fs-sm:      13px;
    --fs-base:    16px;
    --fs-lg:      20px;
    --fs-h2:      27px;
    --fs-h1:      40px;

    /* space + rules */
    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
    --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
    --hairline: 1px;
    --header-h: var(--bar-h);        /* what stays on screen of the site header */
    --content-max: 860px;

    /* Three things pin under the header while you read a long faculty list:
       the ranking's own header, the expanded school row, and the faculty
       table's header. Each starts where the one above it ends. */
    --pin-rank-th: var(--bar-h);                     /* + 39px header */
    --pin-uni-row: calc(var(--bar-h) + 39px);        /* + 55px row    */
    --pin-fac-th:  calc(var(--bar-h) + 94px);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
  body { font-family: var(--font-body);
         background: var(--bg); color: var(--text); font-size: var(--fs-base);
         -webkit-font-smoothing: antialiased; }
  /* Every piece of metadata -- table headers, stat labels, eyebrows, filter
     keys -- is small uppercase mono. One rule, so "is this content or is this
     a label about content?" is answered by the typeface, everywhere. */
  .about-table th, .admin-table th,
  .filter-pill-key, .filter-pill-val,
  .cstat-label, .ustat-label, .pstat-label, .about-stat-label,
  .sources-card-label, .ac-group-label, .profile-inst-label,
  .compare-chart-title, .venue-breakdown-title,
  .trend-chart-title, .admin-card-title, .detail-section-title,
  .data-health-card h4 {
    font-family: var(--font-mono);
  }
  /* Numbers line up in columns or they are not a ranking. */
  .ranking-table td, .about-table td, .admin-table td,
  .num-cell, .pub-cell, .fac-cell, .rank-num,
  .about-stat-val, .ustat-val, .cstat-val, .pstat-val {
    font-variant-numeric: tabular-nums;
  }

  .subnav-bar {
    display: none; align-items: center; gap: 8px; min-height: 42px;
    padding: 6px var(--pad); background: var(--surface); border-bottom: 1px solid var(--border);
    position: sticky; top: var(--header-h); z-index: 90;
  }
  .subnav-bar.open { display: flex; }
  .subnav-link {
    border: 1px solid var(--border); background: var(--surface); color: var(--muted);
    border-radius: 0; padding: 5px 10px; font-size: 12px; font-weight: 600;
    cursor: pointer;
  }
  .subnav-link:hover, .subnav-link.active { color: var(--primary); border-color: var(--primary); background: var(--hover); }
  /* ── Layout ── */
  .layout { display: flex; flex-direction: column; position: relative; }

  /* ── Filter bar ──
     The filters used to be a 280px left rail. They now sit directly under the
     hero search as a row of pills, each opening its own popover, so the page
     is one centred column and the filter row reads as part of the search. */
  .filter-bar {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; flex-wrap: wrap; margin-top: 10px;
  }
  .filter-pop-wrap { position: relative; }
  .filter-pill {
    display: inline-flex; align-items: center; gap: 7px;
    min-height: 34px; padding: 0 11px;
    border: 1px solid var(--border); border-radius: 0;
    background: var(--surface); color: var(--text);
    font-family: inherit; font-size: 12px; cursor: pointer;
    transition: border-color .15s, background .15s;
  }
  .filter-pill:hover,
  .filter-pill[aria-expanded="true"] { border-color: var(--primary); background: var(--hover); }
  .filter-pill-key {
    font-size: 10px; font-weight: 700; letter-spacing: 0.8px;
    text-transform: uppercase; color: var(--muted);
  }
  .filter-pill-val { font-weight: 700; font-variant-numeric: tabular-nums; }
  .filter-pill-caret { font-size: 9px; color: var(--muted); }
  .filter-pop {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
    width: 300px; max-width: calc(100vw - 32px); max-height: 420px; overflow-y: auto;
    padding: 12px; text-align: left;
    background: var(--surface); border: 1px solid var(--border); border-radius: 0;
    box-shadow: 0 12px 30px rgba(15,23,42,0.16);
  }
  .filter-pop[hidden] { display: none; }
  /* Shown only to a signed-in admin (or only to everyone else): app.js
     flips `hidden` once the admin layer has said who is here. */
  [data-admin-only][hidden], [data-public-only][hidden] { display: none !important; }
  .filter-pop-wrap[data-filter="venues"] .filter-pop { width: 340px; }
  .filter-pop-wrap[data-filter="authors-year"] .filter-pop,
  .filter-pop-wrap[data-filter="authors-venues"] .filter-pop { width: 340px; }
  .filter-pop-note { font-size: 12px; color: var(--muted); margin-bottom: 8px; line-height: 1.5; }
  .filter-section { margin-bottom: 18px; }

  /* Year range slider */
  .range-wrap { padding: 4px 2px 0; }
  .dual-range { position: relative; height: 36px; display: flex; align-items: center; }
  .range-track { position: absolute; left: 0; right: 0; height: 4px; background: var(--border); border-radius: 0; pointer-events: none; }
  .range-fill  { position: absolute; height: 4px; background: var(--primary-fill); border-radius: 0; pointer-events: none; }
  .dual-range input[type=range] {
    position: absolute; width: 100%; height: 4px;
    background: transparent; -webkit-appearance: none; appearance: none;
    pointer-events: none; outline: none;
  }
  .dual-range input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 0;
    background: var(--primary-fill); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    pointer-events: all; cursor: grab; transition: transform 0.1s;
  }
  .dual-range input[type=range]::-webkit-slider-thumb:active { transform: scale(1.2); cursor: grabbing; }
  .dual-range input[type=range]::-moz-range-thumb {
    width: 16px; height: 16px; border-radius: 0; background: var(--primary-fill);
    border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.25); pointer-events: all; cursor: grab;
  }
  .range-ticks { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10px; color: var(--muted); }

  /* Topic checkboxes */
  .topic-grid { display: flex; flex-direction: column; gap: 5px; }
  .topic-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 0; cursor: pointer; transition: background 0.1s; }
  .topic-item:hover { background: var(--hover); }
  .topic-dot { width: 10px; height: 10px; border-radius: 0; flex-shrink: 0; }
  .dot-ai_technology { background: var(--topic-method); }
  .dot-ai_data_evaluation { background: var(--topic-impact); }
  .dot-ai_society { background: var(--topic-policy); }
  .dot-non_ai    { background: var(--topic-nonai); }
  .topic-label { font-size: 13px; }
  .mindful-filter-note { font-size: 12px; color: var(--muted); max-width: 230px; line-height: 1.4; margin-bottom: 2px; }

  /* Venue filters */
  .cat-header { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 4px 0; margin-bottom: 4px; }
  .cat-header input[type=checkbox] { cursor: pointer; accent-color: var(--primary); }
  .cat-label { font-size: 13px; font-weight: 600; flex: 1; }
  .cat-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 18px; padding: 0 6px;
    border: 1px solid var(--border); border-radius: 0;
    background: var(--bg); color: var(--muted);
    font-size: 11px; font-weight: 700; line-height: 1;
  }
  .cat-toggle { font-size: 10px; color: var(--muted); transition: transform 0.2s; }
  .cat-toggle.open { transform: rotate(90deg); }
  .venue-list { padding-left: 18px; display: flex; flex-direction: column; gap: 2px; }
  .venue-item { display: flex; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 0; cursor: pointer; transition: background 0.1s; }
  .venue-item:hover { background: var(--hover); }
  .venue-item input[type=checkbox] { cursor: pointer; accent-color: var(--primary); }
  .venue-name { font-size: 12px; }
  .venue-abbr { font-size: 11px; color: var(--muted); margin-left: auto; }
  .ctrl-row { display: flex; gap: 8px; margin-bottom: 10px; }
  .ctrl-btn { font-size: 11px; color: var(--primary); cursor: pointer; text-decoration: underline; background: none; border: none; padding: 0; }

  /* ── Main panel ── */
  #mainContent { padding: 72px var(--pad) 80px; }
  .ranking-hero-search {
    max-width: var(--content-max); margin: 0 auto 18px; padding: 4px 0 2px;
  }
  /* The ranking table lines up with the search box above it. */
  .ranking-body { max-width: var(--content-max); margin: 0 auto; }
  .ranking-hero-title {
    margin: 0 0 var(--sp-3); font-family: var(--font-display); font-size: var(--fs-h1);
    font-weight: 800; letter-spacing: -0.02em;
    line-height: 1.1; color: var(--text); text-align: center;
  }
  .ranking-main-search-wrap { position: relative; }
  .ranking-main-search-wrap .search-icon { left: 16px; }
  .ranking-main-search-wrap input {
    width: 100%; min-height: 50px; padding: 0 48px; border: 1px solid var(--border);
    border-radius: 0; background: var(--surface); color: var(--text); font-size: 15px;
    box-shadow: 0 10px 28px rgba(15,23,42,0.08); transition: border-color .15s, box-shadow .15s;
  }
  .ranking-main-search-wrap input:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 12px 34px rgba(26,60,107,0.16);
  }
  .ranking-search-submit {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border: 0; border-radius: 0; background: var(--primary-fill);
    color: var(--on-primary-fill); display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
  }
  .ranking-search-submit:hover { filter: brightness(1.06); }
  .ranking-search-error {
    min-height: 18px; margin-top: 7px; color: #b91c1c; font-size: 12px; text-align: center;
  }
  [data-theme="dark"] .ranking-search-error { color: #fca5a5; }
  .entity-asof {
    font-family: var(--font-mono); font-size: var(--fs-eyebrow); font-weight: 500;
    letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
    white-space: nowrap;
  }
  .entity-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
  .entity-actions { display: inline-flex; align-items: center; gap: var(--sp-3); }
  .share-btn {
    font-family: var(--font-mono); font-size: var(--fs-eyebrow); font-weight: 600;
    letter-spacing: 0.09em; text-transform: uppercase;
    padding: 5px 10px; border: var(--hairline) solid var(--border); border-radius: 0;
    background: var(--surface); color: var(--muted); cursor: pointer; white-space: nowrap;
    transition: color .15s, border-color .15s, background .15s;
  }
  .share-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--hover); }
  .share-btn.copied { border-color: var(--primary); color: var(--primary); }
  .main-header { display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; }
  .sort-row { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; }
  .sort-row select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 0; font-size: 12px; }

  /* Ranking table */
  .ranking-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  /* The three sticky offsets below (--pin-*) are a running total measured
     against a one-line header, so a heading that wraps puts the pinned school
     row through the header it is supposed to sit under. Every column here is
     wide enough for its label; this keeps it that way. Scoped to the ranking
     itself: .ranking-table is also the sources and research pages' table,
     where nine columns of longer labels do need to wrap. */
  .rank-main th { white-space: nowrap; }
  /* The site's own type, as in the header nav: the sans at 600, in sentence
     case. line-height is set so the row stays as tall as before, which the
     --pin-* offsets above are measured against. */
  .ranking-table th {
    padding: 11px 12px; text-align: left; font: 600 14px/18px var(--font);
    letter-spacing: .01em; color: var(--muted);
    border-bottom: var(--hairline) solid var(--rule-strong); background: var(--bg);
    position: sticky; top: var(--pin-rank-th); z-index: 5;
  }
  .ranking-table th.sortable { cursor: pointer; user-select: none; }
  .ranking-table th.sortable:hover { color: var(--primary); }
  .sort-icon { margin-left: 4px; opacity: 0.5; font-size: 10px; line-height: 1; }  /* or the arrow outgrows the 18px line */
  .uni-row td { padding: 14px 12px; border-bottom: var(--hairline) solid var(--border); vertical-align: middle; }
  .uni-row:hover td { background: var(--hover); }
  .uni-row.expanded td {
    /* A sticky row must be opaque: the tint is painted as an image layer over
       an opaque ground rather than as a translucent colour, so nothing scrolls
       through it. */
    background-color: var(--bg);
    background-image: linear-gradient(var(--hover-strong), var(--hover-strong));
    position: sticky; top: var(--pin-uni-row); z-index: 6;
    border-bottom: var(--hairline) solid var(--rule-strong);
  }
  .rank-num { font-size: 19px; font-weight: 700; color: var(--muted); text-align: right; padding-right: 16px; }
  .rank-cell-content { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
  .rank-cell-content.with-action { justify-content: space-between; }
  .rank-action-group { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .rank-action-spacer { width: 20px; height: 20px; flex-shrink: 0; }
  .uni-name-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
  /* The school's logo, as drawn; on the dark theme the copy ringed in white
     (static/schools/<slug>-dark.png), so navy and black marks stay visible.
     28px tall, no taller than the rank and the count beside it, so the row
     (and the --pin-* offsets measured from it) keeps its height. */
  .uni-logo { flex: none; display: grid; place-items: center; width: 28px; height: 28px; }
  .uni-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
  .uni-logo--wide img { transform: scale(1.3); }
  .uni-logo .uni-logo__img-dark,
  [data-theme="dark"] .uni-logo .uni-logo__img { display: none; }
  [data-theme="dark"] .uni-logo .uni-logo__img-dark { display: block; }
  .uni-logo.is-missing {
    border: 1px solid rgba(var(--text-rgb), .3); color: var(--text);
    font: 700 10px/1 var(--font); letter-spacing: .02em;
  }
  .uni-logo.is-missing img { display: none; }
  .uni-logo.is-missing::after { content: attr(data-initials); }

  /* Share: the bare icon in the blank between the University column and the
     Pubs count -- past the end of the cell (whose name, cut or not, ends
     there), over the two cells' 12px paddings and the room left of the
     digits -- so the icons line up down the table and showing one changes
     nothing else in the row. It shows on the row under the pointer or holding
     focus; where nothing hovers it is always there, faint. Drawn only on the
     default ranking (app.js filtersAreDefault). */
  .uni-name-cell { position: relative; }
  .row-share {
    position: absolute; right: -44px; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
    border: 0; background: none; color: var(--muted); cursor: pointer;
    opacity: 0; pointer-events: none; transition: opacity .15s, color .15s;
  }
  .row-share svg { display: block; width: 22px; height: 22px; }
  .uni-row:hover .row-share, .uni-row:focus-within .row-share { opacity: 1; pointer-events: auto; }
  .row-share:hover, .row-share:focus-visible { color: var(--primary); }
  .row-share:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
  /* A pinned (expanded) row's cells are stacked, each over the one before:
     lift the school's cell so the Pubs cell's ground does not cover the icon. */
  .uni-row.expanded td:has(.row-share) { z-index: 7; }
  @media (hover: none) {
    .row-share { opacity: .75; pointer-events: auto; }
  }
  /* Where the table is wider than the screen (it scrolls sideways), that
     blank is off screen: there the icon follows the name, and the name stops
     short enough to keep it in view. */
  @media (max-width: 768px) {
    .row-share { position: static; transform: none; flex: none; margin: -6px 0 -6px -6px; }
    .uni-name-cell:has(.row-share) > div { max-width: calc(100vw - 200px); }
  }

  /* The share dialog: the images, each with its download. */
  .share-open, .share-open body { overflow: hidden; }
  .share-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 32px; }
  .share-modal[hidden] { display: none; }
  .share-modal__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); }
  .share-modal__panel {
    position: relative; width: min(1120px, 100%); max-height: 100%; overflow: auto;
    padding: 32px 36px 36px; background: var(--bg); color: var(--text);
    border-top: 4px solid var(--primary-fill); box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  }
  .share-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
  .share-modal__eyebrow {
    margin: 0 0 6px; color: var(--primary); font: 700 12px/1 var(--font);
    letter-spacing: .12em; text-transform: uppercase;
  }
  .share-modal__title { margin: 0; font: 800 28px/1.15 var(--font); letter-spacing: -.01em; }
  .share-modal__close {
    flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -6px -10px 0 0;
    border: 0; background: none; color: var(--text); cursor: pointer;
  }
  .share-modal__close svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
  .share-modal__close:hover, .share-modal__close:focus-visible { color: var(--primary); }
  .share-modal__close:focus-visible { outline: 2px solid var(--primary); outline-offset: -4px; }
  /* The school's name and, on its line (under it, when there is no room), the tagline. */
  .share-modal__titlerow { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 32px; }
  /* The dialog's two taglines: the logo's typeface (as on the images) in a gold
     running across them at 45 degrees; on white, a deeper gold that reads. */
  .share-tagline {
    margin: 0; font: 700 18px/1.3 "AIB Logo Sans", var(--font); letter-spacing: .005em;
    background: linear-gradient(135deg, #FFE38F 0%, #FFC627 45%, #F2A900 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  [data-theme="light"] .share-tagline { background-image: linear-gradient(135deg, #B88A00 0%, #946C00 50%, #7A5300 100%); }
  .share-tagline--sm { font-size: 15px; }
  /* The ranking switch (a public school's) at the left, the Background (the images' ground) at the right. */
  .share-modal__intro { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-top: 18px; }
  .share-scope[hidden] { display: none; }
  .share-ground { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-left: auto; }
  .share-ground__label { color: var(--muted); font: 600 13px/1 var(--font); }
  .share-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border); }
  .share-seg button {
    height: 34px; padding: 0 16px; border: 0; border-right: 1px solid var(--border);
    background: var(--surface); color: var(--muted); font: 600 13px/1 var(--font);
    cursor: pointer; transition: background-color .15s, color .15s;
  }
  .share-seg button:last-child { border-right: 0; }
  .share-seg button:hover { background: var(--hover); color: var(--text); }
  .share-seg button[aria-checked="true"] { background: var(--primary-fill); color: var(--on-primary-fill); }
  .share-seg button:focus-visible { position: relative; outline: 2px solid var(--primary); outline-offset: 2px; }
  .share-fig.is-drawing img { opacity: .45; transition: opacity .2s; }
  .share-set { margin-top: 28px; }
  .share-set__title {
    margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
    font: 600 15px/1.4 var(--font); letter-spacing: .01em;
  }
  .share-set__grid { display: grid; grid-template-columns: 4fr 5fr; gap: 24px; align-items: start; }
  /* A public school's dialog: the ranking not chosen (All Schools / Only Public Schools). */
  .share-set__grid[hidden], .share-fig[hidden] { display: none; }
  /* Email signature: the title and its tagline, the Style choice at the right, then a banner per set. */
  .share-set__head {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px;
    margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
  }
  .share-set__lead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 24px; }
  .share-set__head .share-set__title { margin: 0; padding: 0; border: 0; }
  .share-sig-list { display: grid; gap: 24px; }
  .share-fig--sig .share-fig__frame { aspect-ratio: 5 / 1; }
  .share-fig { margin: 0; }
  .share-fig__frame { display: grid; place-items: center; background: #fff; border: 1px solid var(--border); }
  .share-fig--list .share-fig__frame { aspect-ratio: 4 / 5; }
  .share-fig--card .share-fig__frame { aspect-ratio: 1; }
  .share-fig__frame { position: relative; }
  .share-fig__pic { display: grid; place-items: center; width: 100%; }
  .share-fig__frame img { display: block; width: 100%; height: auto; }
  .share-fig__frame .spinner { margin: 0; }
  /* The image's own download button: half see-through over its top right corner, under the pointer. */
  .share-fig__quick {
    position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 44px; height: 44px;
    background: rgba(25, 25, 25, .5); color: #fff; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none; transition: opacity .2s, background-color .2s;
  }
  .share-fig__quick svg { width: 22px; height: 22px; }
  .share-fig__frame:hover .share-fig__quick { opacity: 1; pointer-events: auto; }
  .share-fig__quick:hover { background: rgba(25, 25, 25, .78); }
  .share-fig__frame:hover .share-fig__quick[aria-disabled="true"] { opacity: 0; pointer-events: none; }
  .share-fig figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
  .share-fig__cap { color: var(--muted); font-size: 13px; }
  .share-fig__dl {
    display: inline-flex; align-items: center; height: 36px; padding: 0 16px; flex: none;
    background: var(--primary-fill); color: var(--on-primary-fill);
    font: 600 14px/1 var(--font); text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s;
  }
  .share-fig__dl:hover, .share-fig__dl:focus-visible { background: #fff; }
  [data-theme="light"] .share-fig__dl:hover, [data-theme="light"] .share-fig__dl:focus-visible { background: var(--ink); color: #fff; }
  .share-fig__dl[aria-disabled="true"] { opacity: .4; pointer-events: none; }
  @media (max-width: 760px) {
    .share-modal { padding: 0; }
    .share-modal__panel { max-height: 100vh; height: 100%; padding: 24px 20px 28px; }
    .share-set__grid { grid-template-columns: 1fr; }
  }
  .expand-btn {
    width: 20px; height: 20px; border-radius: 0; background: var(--border); border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: var(--muted); flex-shrink: 0; transition: all 0.15s;
  }
  .expand-btn.open { background: var(--primary-fill); color: var(--on-primary-fill); }
  .uni-name-link {
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-weight: 600; font-size: 16px; color: var(--text); text-decoration: none;
    cursor: pointer;
  }
  .uni-name-link:hover { color: var(--primary); text-decoration: underline; }
  .pub-cell { font-size: 19px; font-weight: 700; color: var(--primary); text-align: right; }
  .fac-cell { font-size: 15px; color: var(--muted); text-align: right; }
  /* A numeric column heading sits over its digits, not over the gap. */
  .ranking-table th.num, .faculty-table th.num, .about-table th.num { text-align: right; }
  /* Trend and topic mix are the school page's own charts at table scale: the
     same bars, the same AI overlay colour, the same faded year-in-progress.
     A row is a preview of the page it links to, not a different widget. */
  .cell-empty { color: var(--muted); font-size: var(--fs-sm); }
  .spark-svg { display: block; margin-left: auto; overflow: visible; }

  /* The bar is the AI publications split three ways; the total is in every
     segment's hover, not printed beside it. Non-AI is deliberately not a
     fourth segment: it is 93% of the corpus, and a bar that is 93% grey shows
     nothing about the 6.5% anyone came for. */
  .topic-cell { display: flex; align-items: center; justify-content: flex-end; }
  .topic-bar {
    flex: 0 1 120px; min-width: 34px; display: flex; height: 9px;
    background: var(--track); overflow: hidden;
  }
  /* Two pixels is the floor for a segment that exists at all: AI Policy is
     0.3% of the corpus, and a sub-pixel segment is both invisible and
     impossible to put a pointer on. */
  .tb-seg { min-width: 2px; cursor: help; }
  .tb-ai_technology { background: var(--topic-method); }
  .tb-ai_data_evaluation { background: var(--topic-impact); }
  .tb-ai_society { background: var(--topic-policy); }

  /* One shared tooltip for every data mark. title= is the obvious choice and
     the wrong one: it waits about a second, cannot be styled, and on a segment
     two pixels wide the pointer has left before it appears. Ink on paper, so
     it inverts with the theme like everything else. */
  #hoverTip {
    position: fixed; z-index: 400; pointer-events: none; opacity: 0;   /* above the profile modal (200) */
    transition: opacity 0.08s; padding: 4px 8px; border-radius: 0;
    background: var(--app-ink); color: var(--app-paper); white-space: nowrap;
    font-family: var(--font-mono); font-size: var(--fs-meta); letter-spacing: 0.04em;
  }
  #hoverTip.on { opacity: 1; }
  #hoverTip.wrap { white-space: normal; max-width: min(420px, calc(100vw - 16px)); line-height: 1.45; letter-spacing: 0.01em; }
  @media (prefers-reduced-motion: reduce) { #hoverTip { transition: none; } }

  /* Faculty drilldown */
  .faculty-row td { padding: 0; border-bottom: var(--hairline) solid var(--border); background: var(--surface); }
  .faculty-inner { padding: 0 0 12px; }
  .faculty-loading { padding: 18px 12px; color: var(--muted); font-size: 13px; text-align: center; }
  .faculty-table { width: 100%; border-collapse: collapse; margin-top: 8px; table-layout: fixed; }
  /* School summary at the top of an expanded row: who the school is, then the
     numbers a reader asks next (how AI-heavy, how concentrated, which way it is
     moving), then where and by whom it publishes. Same filters as the row. */
  /* The school sits flat on the row's own grey, with no card around it
     (user decision 2026-11-16); the faculty label below separates the two. */
  .school-summary { display: flex; flex-direction: column; gap: var(--sp-3);
    margin: var(--sp-3) 0 0; padding: 0; }
  .ss-eyebrow { font-family: var(--font-mono); font-size: var(--fs-eyebrow); text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--primary); }
  .ss-fac-head { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap;
    margin: var(--sp-5) var(--sp-4) 0; padding-bottom: var(--sp-2); border-bottom: var(--hairline) solid var(--rule-strong); }
  .ss-fac-head .ss-eyebrow { color: var(--text); }
  .ss-fac-count { font-size: var(--fs-sm); color: var(--muted); }
  .ss-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-4); }
  .ss-school { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; color: var(--text); }
  .ss-updated { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--muted); letter-spacing: 0.04em; }
  .ss-link { margin-left: auto; font-size: var(--fs-sm); color: var(--primary); text-decoration: none; white-space: nowrap; }
  .ss-link:hover, .ss-link:focus-visible { text-decoration: underline; }
  .ss-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-2); }
  .ss-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: var(--sp-2) var(--sp-3);
    background: var(--surface); border-radius: 0; }
  .ss-val { font-family: var(--font-mono); font-size: var(--fs-base); font-weight: 500; color: var(--text);
    font-variant-numeric: tabular-nums; white-space: nowrap; }
  .ss-val .up { color: var(--topic-impact); } .ss-val .down { color: var(--topic-policy); }
  .ss-label { font-family: var(--font-mono); font-size: var(--fs-eyebrow); text-transform: uppercase;
    letter-spacing: 0.09em; color: var(--muted); }
  .ss-sub { font-size: var(--fs-meta); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ss-lists { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--sp-4); }
  .ss-list { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  .ss-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
  .ss-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 2px 8px; border-radius: 0;
    background: var(--surface); border: var(--hairline) solid var(--border); font-size: var(--fs-sm); color: var(--text); }
  .ss-chip b { font-family: var(--font-mono); font-weight: 500; font-size: var(--fs-meta); color: var(--muted); }
  .ss-people { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-sm); }
  .ss-people button { font: inherit; color: var(--primary); background: none; border: 0; padding: 0; cursor: pointer; }
  .ss-people button:hover, .ss-people button:focus-visible { text-decoration: underline; }
  .ss-pending { font-size: var(--fs-meta); color: var(--muted); }
  /* One strip of what the row cannot show: movement and comparison with the
     median school. Same filters as the row. */
  /* One centred row of metrics (user decision 2026-11-16). */
  .ss-strip { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: var(--sp-2) 28px; }
  /* Every cell as tall as the chart cells: the title on top, the last line on
     the bottom edge (level with the charts' bottoms), a number centred between. */
  .ss-strip > .ss-cell, .ss-strip > .ss-stack-item { justify-content: space-between; }
  .ss-strip > .ss-mini-cell .ss-mini, .ss-strip > .ss-mindful-cell .ss-mini { margin-top: auto; }
  .ss-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: var(--sp-2) 12px; }
  .ss-strip > .ss-cell, .ss-strip > .ss-click { align-items: center; text-align: center; }
  .ss-stack-item { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-2) 12px; }
  .ss-strip .ss-labs { justify-content: center; }
  .ss-mini-cell .ss-mini { width: 120px; }
  .ss-strip .ss-label { white-space: nowrap; }
  /* Every metric opens its detail panel: a quiet hover, a "›" that appears, and
     the open one stays tinted. */
  .ss-click { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; border-radius: 0;
    transition: background-color .15s; }
  .ss-click:hover, .ss-click:focus-visible { background: color-mix(in srgb, var(--text) 5%, transparent); }
  .ss-click.on { background: color-mix(in srgb, var(--primary) 9%, transparent); }
  .ss-click:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
  .ss-more { font-style: normal; margin-left: 4px; opacity: 0; transition: opacity .15s; }
  .ss-click:hover .ss-more, .ss-click:focus-visible .ss-more, .ss-click.on .ss-more { opacity: 1; }
    .ss-cell .ss-val { font-size: var(--fs-lg); line-height: 1.2; }
  .ss-cell .ss-val span { font-size: var(--fs-sm); margin-left: 4px; }
  /* Frontier labs: one brand mark per lab with the number of faculty there. */
  .ss-labs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; min-height: 28px; }
  .ss-lab { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono);
    font-size: var(--fs-md, 16px); font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
  .ss-lab svg { width: 16px; height: 16px; flex: none; }
  .ss-lab-none { font-size: var(--fs-sm); color: var(--muted); }
  .ss-mini { width: 100%; max-width: 140px; margin-top: 12px; display: flex; flex-direction: column; gap: 2px;
    opacity: 0.5; transition: opacity .15s; }
  .ss-click:hover .ss-mini, .ss-click:focus-visible .ss-mini, .ss-click.on .ss-mini { opacity: 0.9; }
  .ss-mini svg { width: 100%; height: 30px; display: block; }
  .ss-mini-years { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
  .ss-panel { display: flex; flex-direction: column; gap: 6px; padding: 0 12px 0 calc(9% + 12px); }
  .ss-panel:empty { display: none; }
  .ss-lab-rows { display: flex; flex-direction: column; gap: 6px; }
  .ss-lab-row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: baseline; font-size: var(--fs-sm); }
  .ss-lab-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
  .ss-lab-name svg { width: 14px; height: 14px; flex: none; }
  .ss-lab-people { display: flex; flex-wrap: wrap; gap: 2px 14px; }
  .ss-person { font: inherit; color: var(--primary); background: none; border: 0; padding: 0; cursor: pointer; }
  .ss-person:hover, .ss-person:focus-visible { text-decoration: underline; }
  .ss-area-close { margin-left: auto; font: inherit; font-size: 18px; line-height: 1; color: var(--muted); background: none;
    border: 0; padding: 2px 6px; cursor: pointer; }
  .ss-area-close:hover, .ss-area-close:focus-visible { color: var(--text); }
  .ss-area-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-height: 24px; }
  .ss-area-key, .ss-area-back { font: inherit; font-size: var(--fs-sm); color: var(--text); background: none; border: 0;
    padding: 2px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
  .ss-area-key:hover, .ss-area-key:focus-visible, .ss-area-back:hover, .ss-area-back:focus-visible { text-decoration: underline; }
  .ss-area-back { color: var(--primary); }
  .ss-area-key i, .ss-area-crumb i { width: 10px; height: 10px; border-radius: 0; display: inline-block; }
  .ss-area-crumb { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
  .ss-area-svg { width: 100%; height: auto; max-height: 150px; display: block; }
  .ss-band { cursor: pointer; } .ss-band:hover { fill-opacity: 1; }
  .ss-area-note { font-size: var(--fs-meta); color: var(--muted); }
  /* The two small charts: a title like the numbers beside them, and the same
     height (the area chart's 30px plot plus its year row), so they line up. */
  .ss-mini-cell .ss-mini, .ss-mindful-cell .ss-md-mini { margin-top: 6px; height: 44px; }
  .ss-mindful-cell .ss-md-mini { width: 160px; max-width: none; gap: 0; justify-content: space-between; padding: 2px 0; box-sizing: border-box; }
  .ss-md-row { display: grid; grid-template-columns: 78px 1fr 28px; align-items: center; gap: 6px; }
  .ss-md-name { font-size: 10px; color: var(--text); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ss-md-track { position: relative; height: 6px; background: var(--track); border-radius: 0; }
  .ss-md-val { font-family: var(--font-mono); font-size: 10px; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
  .md-rows { display: grid; gap: 7px; padding: 6px 4px 2px; width: 100%; max-width: 720px; margin: 0 auto; box-sizing: border-box; }
  .md-row { display: grid; grid-template-columns: 220px 1fr 70px; align-items: center; gap: 12px; cursor: help; }
  .md-name { font-size: var(--fs-sm); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .md-track { display: block; position: relative; height: 10px; min-width: 120px; background: var(--track); border-radius: 0; }
  .md-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0; background: var(--topic-nonai); }
  .md-fill.above { background: var(--topic-method); }
  .md-fill.below { background: color-mix(in srgb, var(--topic-method) 40%, var(--surface)); }
  .md-med { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--text); opacity: 0.7; }
  .md-val { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; text-align: right; color: var(--text); }
  .md-n { color: var(--muted); font-size: var(--fs-meta); margin-left: 6px; }
  @media (max-width: 640px) { .md-row { grid-template-columns: 1fr 56px; } .md-name { grid-column: 1 / -1; } }
  .profile-mindful { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
  .profile-mindful { justify-content: center; margin: -8px 0 14px; }
  .pub-mindful-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-right: 2px; }
  .pub-mindful-chip { font-size: 11px; padding: 1px 7px; border-radius: 0; border: 1px solid var(--border); color: var(--text); cursor: help; white-space: nowrap; }
  .ss-area-sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 6px; }
  .ss-area-sub .ss-area-crumb { font-weight: 500; }
  .ss-foot { display: flex; justify-content: flex-end; padding: 0 12px; }
  .ss-foot .ss-link { margin: 0; font-size: var(--fs-sm); }
  .up { color: var(--topic-impact); } .down { color: var(--topic-policy); }
    .faculty-table th {
    padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--muted);
    text-align: left; border-bottom: var(--hairline) solid var(--rule-strong);
    position: sticky; top: var(--pin-fac-th); background: var(--surface); z-index: 4;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    white-space: nowrap;
  }
  .faculty-table td { padding: 11px 10px; font-size: 16px; border-bottom: var(--hairline) solid var(--border); }
  .faculty-table tr:last-child td { border-bottom: none; }
  .faculty-table th:first-child,
  .faculty-table td:first-child { text-align: right; padding-right: 16px; }
  .faculty-table .col-rank { width: 11%; }
  .faculty-table .col-name { width: 34%; }
  .faculty-table .col-pubs { width: 9%; }
  .faculty-table .col-ai { width: 10%; }
  .faculty-table .col-hindex { width: 10%; }
  .faculty-table .col-works { width: 11%; }
  .faculty-table .col-venues { width: 15%; }
  .num-cell { white-space: nowrap; text-align: right; }
  .faculty-table td:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .clickable-row { cursor: pointer; }
  .clickable-row.row-active td { background: var(--hover-strong); }
  .fac-score { font-weight: 700; color: var(--primary); }
  .dept-tag { font-size: 11px; color: var(--muted); background: var(--border); padding: 1px 6px; border-radius: 0; }
  .ai-tag { font-size: 11px; color: var(--ai-badge); background: var(--topic-method-bg); padding: 1px 6px; border-radius: 0; }
  .oa-link { font-size: 13px; font-weight: 600; color: var(--primary); text-decoration: none; }
  .oa-link:hover { text-decoration: underline; }
  .venues-str {
    display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; font-size: 11px; color: var(--muted);
  }

  .cite-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-2); }
  .cite-label {
    font-family: var(--font-mono); font-size: var(--fs-eyebrow); font-weight: 600;
    letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
  }

  .table-scroll { overflow-x: visible; }
  @media (max-width: 768px) {
    .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-scroll > table { min-width: 760px; }
    /* Scrolling sideways makes this box the scroller its sticky headers stick
       in, so offsets meant for under the site header pushed the header row
       down over the first school. Measured from the box, they leave every row
       where it is: on a phone the table's headings scroll with the page. */
    .table-scroll { --pin-rank-th: 0px; --pin-uni-row: 39px; --pin-fac-th: 94px; }
  }

  /* Documentation prose */
  .page-lede { font-size: var(--fs-lg); line-height: 1.55; color: var(--text); margin-bottom: var(--sp-5); max-width: 68ch; }
  .page-view p { max-width: 72ch; }
  .mono-inline { font-family: var(--font-mono); font-size: 0.9em; }
  .spec-list { margin: var(--sp-4) 0 var(--sp-5); }
  .spec-row {
    display: flex; gap: var(--sp-5); align-items: baseline;
    padding: var(--sp-3) 0; border-top: var(--hairline) solid var(--border);
  }
  .spec-row dt {
    font-family: var(--font-mono); font-size: var(--fs-eyebrow); font-weight: 600;
    letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
    flex: 0 0 132px;
  }
  .spec-row dd { flex: 1; min-width: 0; margin: 0; max-width: 66ch; }
  .spec-note { display: block; margin-top: var(--sp-1); color: var(--muted); font-size: var(--fs-sm); }
  /* A numbered document, not an accordion: every answer is readable at once,
     and each question is addressable by its number. */
  .faq { margin: var(--sp-4) 0 var(--sp-5); }
  .faq-item {
    display: flex; gap: var(--sp-5); align-items: baseline;
    padding: var(--sp-4) 0; border-top: var(--hairline) solid var(--border);
  }
  .faq-num {
    font-family: var(--font-mono); font-size: var(--fs-eyebrow); font-weight: 600;
    letter-spacing: 0.09em; color: var(--muted); flex: 0 0 40px;
  }
  .faq-q { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; margin: 0 0 var(--sp-2); line-height: 1.25; }
  .faq-a { color: var(--text); max-width: 66ch; }
  @media (max-width: 640px) {
    .spec-row, .faq-item { flex-direction: column; gap: var(--sp-2); }
  }

  /* Pagination */
  .pagination { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 20px 0; font-size: 13px; }
  .page-btn { padding: 6px 12px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); cursor: pointer; font-size: 12px; color: var(--text); transition: all 0.15s; }
  .page-btn:hover:not(:disabled) { background: var(--hover); border-color: var(--primary); }
  .page-btn:disabled { opacity: 0.4; cursor: default; }
  .page-btn.active { background: var(--primary-fill); color: var(--on-primary-fill); border-color: var(--primary-fill); }
  .page-info { color: var(--muted); font-size: 12px; }

  /* Loading / empty */
  .loading { text-align: center; padding: 60px; color: var(--muted); font-size: 15px; }
  .spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 0; animation: spin 0.7s linear infinite; margin-bottom: 12px; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .empty { text-align: center; padding: 60px; color: var(--muted); }

  /* Search bar */
  .search-wrap { position: relative; margin-bottom: 16px; }
  .search-wrap input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--border); border-radius: 0; font-size: 14px; background: var(--surface); transition: border-color 0.15s; }
  .search-wrap input:focus { outline: none; border-color: var(--primary); }
  .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }
  .search-tabs { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 2px solid var(--border); }
  .search-tab { padding: 7px 16px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; background: none; border-top: none; border-left: none; border-right: none; transition: all 0.15s; }
  .search-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

  /* Source badges */
  .src-badges { display: inline-flex; gap: 3px; vertical-align: middle; }
  .src-badge { padding: 1px 5px; border-radius: 0; font-size: 10px; font-weight: 700; letter-spacing: 0.3px; }
  .src-oa    { background: #dbeafe; color: #1d4ed8; }
  .src-orcid { background: #d1fae5; color: #065f46; }
  .src-dblp  { background: #fef3c7; color: #92400e; }
  .src-bizdb { background: #ede9fe; color: #5b21b6; }
  .src-cv { background: #fef3c7; color: #92400e; }
  .src-openreview { background: #e0f2fe; color: #075985; }
  .verified-badge { display: inline-flex; vertical-align: -1px; margin-left: 4px; color: var(--muted); opacity: 0.55; }

  /* Main toolbar */
  .toolbar-tabs { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 0; overflow: hidden; }
  .toolbar-tab { padding: 6px 14px; font-size: 12px; font-weight: 500; background: var(--surface); border: none; cursor: pointer; color: var(--muted); transition: all 0.15s; }
  .toolbar-tab.active { background: var(--primary-fill); color: var(--on-primary-fill); }
  /* Comparison view */
  .compare-header-row { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
  .compare-uni-card { flex: 1; min-width: 240px; background: var(--surface); border: 2px solid var(--border); border-radius: 0; padding: 16px; }
  .compare-uni-card.card-0 { border-color: var(--topic-method); }
  .compare-uni-card.card-1 { border-color: var(--topic-impact); }
  .compare-uni-card.card-2 { border-color: var(--topic-policy); }
  .compare-uni-name { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
  .compare-stats { display: flex; gap: 16px; flex-wrap: wrap; }
  .cstat { text-align: center; }
  .cstat-val { font-size: 22px; font-weight: 800; }
  .cstat-label { font-size: 10px; color: var(--muted); text-transform: uppercase; }
  .compare-chart-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 0; padding: 16px; margin-bottom: 24px; }
  .compare-chart-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }

  /* Top papers */
  .top-paper-card { padding: 12px 14px; border: 1px solid var(--border); border-radius: 0; margin-bottom: 10px; transition: border-color 0.15s; }
  .top-paper-card:hover { border-color: var(--primary); }
  .top-paper-rank { font-size: 20px; font-weight: 800; color: var(--muted); min-width: 32px; }
  .top-paper-row { display: flex; align-items: flex-start; gap: 12px; }
  .top-paper-body { flex: 1; }
  .top-paper-title { font-size: 13px; font-weight: 600; margin-bottom: 5px; }
  .top-paper-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); align-items: center; }
  .citations-badge { font-size: 14px; font-weight: 800; color: var(--primary); text-align: right; min-width: 48px; }
  .citations-label { font-size: 10px; color: var(--muted); text-align: right; }

  /* Dark mode toggle */
  .dark-btn {
    background: var(--surface); border: var(--hairline) solid var(--border);
    color: var(--muted); font-size: 16px; cursor: pointer; padding: 5px 9px;
    border-radius: 0; line-height: 1; transition: all 0.15s; flex-shrink: 0;
    display: inline-flex; align-items: center;
  }
  .dark-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--hover); }

  /* Autocomplete */
  .autocomplete-wrap { position: relative; }
  .autocomplete-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 300; max-height: 360px; overflow-y: auto;
    display: none;
  }
  .autocomplete-dropdown.open { display: block; }
  .ac-group-label { font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.6px; color: var(--muted); padding: 8px 12px 4px; }
  .ac-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    cursor: pointer; transition: background 0.1s;
  }
  .ac-item:hover, .ac-item.focused { background: var(--hover); }
  .ac-icon { font-size: 14px; flex-shrink: 0; }
  .ac-name { font-size: 13px; font-weight: 500; }
  .ac-sub  { font-size: 11px; color: var(--muted); }
  .ac-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

  /* Department breakdown */
  .dept-topic-strip { display: flex; height: 4px; margin-top: 2px; border-radius: 0; overflow: hidden; gap: 1px; }

  /* Faculty year-grouped publications */
  .year-group { margin-bottom: 14px; }
  .year-group-header {
    width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 10px;
    background: var(--hover); border-radius: 0; margin-bottom: 8px;
    border: 1px solid var(--border); cursor: pointer; color: inherit; font: inherit;
  }
  .year-group-header::-webkit-details-marker { display: none; }
  .year-group-header::marker { content: ''; }
  .year-group-toggle {
    width: 14px; flex: 0 0 14px; color: var(--muted); font-size: 11px;
    transform: rotate(-90deg); transition: transform 0.15s;
  }
  .year-group[open] .year-group-toggle { transform: rotate(0deg); }
  .year-group-label { font-size: 14px; font-weight: 700; color: var(--primary); }
  .year-group-stats { margin-left: auto; display: inline-flex; align-items: center; justify-content: flex-end; gap: 12px; }
  .year-group-count { font-size: 12px; color: var(--muted); }
  .year-group-ai { font-size: 12px; color: var(--muted); }
  .year-group-body { display: flex; flex-direction: column; gap: 7px; }

  /* Venue breakdown bars */
  .venue-breakdown { margin-top: 0; }
  .venue-breakdown-title { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
  /* Modal */
  .modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: flex-start; justify-content: center; padding: clamp(16px, 6vh, 56px) 16px 16px; }
  .modal-bg.open { display: flex; }
  .modal { background: var(--surface); border-radius: 0; width: 860px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
  .modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
  .modal-title { font-size: 23px; font-weight: 700; flex: 1; }
  /* Previous / next faculty in the list the card was opened from; the arrow
     keys do the same while the card is open. */
  .modal-nav { display: inline-flex; align-items: center; gap: 6px; }
  .modal-nav-btn { width: 30px; height: 30px; border-radius: 0; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 15px; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; }
  .modal-nav-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: var(--hover); }
  .modal-nav-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
  .modal-nav-btn:disabled { opacity: .35; cursor: default; }
  .modal-nav-pos { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--muted);
    font-variant-numeric: tabular-nums; min-width: 52px; text-align: center; white-space: nowrap; }
  .modal-close { width: 28px; height: 28px; border-radius: 0; border: none; background: var(--border); cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; }
  .modal-profile-btn {
    font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none;
    padding: 6px 12px; border: 1px solid var(--border); border-radius: 0;
    color: var(--primary); background: var(--bg);
  }
  .modal-profile-btn:hover { border-color: var(--primary); background: var(--hover); }
  .modal-body { overflow-y: auto; padding: 16px 20px; flex: 1; }
  /* Paper card: the paper, then three fixed columns (topic, Mindful AI, source)
     under one header row per list, so a tag's column says what it is. */
  .pub-card, .pub-cols-head { display: grid; grid-template-columns: minmax(0, 1fr) 150px 112px 54px; column-gap: 14px; }
  .pub-card { padding: 7px 2px; border: 0; border-radius: 0; margin: 0; transition: background 0.15s; align-items: start; }
  .pub-main { min-width: 0; }
  .pub-main .pub-title { margin-bottom: 4px; }
  .pub-col { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; padding-top: 1px; }
  .pub-col .pub-topic-tag { white-space: normal; }
  .modal-body .pub-cols-head { position: sticky; top: -16px; z-index: 2; background: var(--surface); padding-top: 6px; }
  .pub-cols-head { padding: 0 2px 4px; margin-bottom: 2px; border-bottom: 1px solid var(--border);
    font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
  @media (max-width: 640px) {
    /* No room for columns: the attributes go under the paper, each with its name. */
    .pub-card { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
    .pub-cols-head { display: none; }
    .pub-col { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .pub-col:empty { display: none; }
    .pub-col::before { content: attr(data-col); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-right: 4px; }
  }
  .pub-card:hover { background: var(--hover); }
  .pub-title { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pub-title a { color: var(--text); text-decoration: none; }
  .pub-title a:hover { color: var(--primary); text-decoration: underline; }
  .pub-author-line { font-size: 13px; line-height: 1.4; color: var(--muted); }
  .pub-author-line strong { color: var(--text); font-weight: 600; }
  .pub-venue-line { font-size: 13px; line-height: 1.4; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pub-venue-line .pub-at { color: var(--muted); opacity: 0.75; }
  .pub-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }
  .pub-venue { color: var(--primary); font-weight: 600; }
  .pub-topic-tag { padding: 2px 7px; border-radius: 0; font-size: 12px; font-weight: 600; white-space: nowrap; }
  .tag-ai_technology { background: var(--topic-method-bg); color: var(--topic-method); }
  .tag-ai_data_evaluation { background: var(--topic-impact-bg); color: var(--topic-impact); }
  .tag-ai_society { background: var(--topic-policy-bg); color: var(--topic-policy); }
  .tag-non_ai    { background: var(--track); color: var(--topic-nonai); }
  .profile-card-note { font-size: 13px; color: var(--muted); margin: -6px 0 14px; }
  .profile-ai-breakdown { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: -6px 0 14px; }
  .profile-ai-chip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 0; background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
  .profile-inst-filter { border-top: 1px solid var(--border); margin: 14px 0 4px; padding-top: 14px; }
  .profile-inst-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
  .profile-inst-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .profile-inst-chip { font: inherit; font-size: 11px; line-height: 1.35; padding: 3px 9px; border-radius: 0; background: var(--bg); color: var(--text); border: 1px solid var(--border); cursor: pointer; }
  .profile-inst-chip:hover { border-color: var(--primary); }
  .profile-inst-chip.inst-current { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
  .profile-inst-chip.inst-active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface)); color: var(--primary); }
  .profile-inst-chip.inst-dimmed { opacity: 0.45; }
  .inst-years { color: var(--muted); margin-left: 5px; font-variant-numeric: tabular-nums; }
  .inst-count { color: var(--muted); margin-left: 5px; }
  .inst-badge { margin-left: 5px; font-weight: 700; color: var(--primary); }
  .profile-inst-note { font-size: 11px; color: var(--muted); margin-top: 7px; }
  .profile-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
  .profile-action-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
    border: 1px solid var(--border); border-radius: 0; background: var(--surface);
    color: var(--primary); font-size: 12px; font-weight: 700; cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
  }
  .profile-action-btn:hover { border-color: var(--primary); background: var(--hover); }
  .faculty-locate-hit td { background: var(--hover-strong) !important; }
  .faculty-locate-hit td:first-child { box-shadow: inset 3px 0 0 var(--primary); }

  /* ── University detail page ── */
  .uni-detail-header {
    background: var(--surface); border: 1px solid var(--border); border-radius: 0;
    padding: 24px; margin-bottom: 24px;
  }
  .uni-detail-name { font-family: var(--font-serif); font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 16px; }
  .uni-faculty-heading { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
  .uni-detail-stats { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
  .ustat { text-align: center; }
  .ustat-val { font-size: 28px; font-weight: 800; color: var(--primary); }
  .ustat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

  /* School facts that sit above the charts: which business school(s) the
     roster covers, and how fresh that roster is. */
  .uni-meta {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
    padding: 16px 0; margin-bottom: 20px;
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  }
  .uni-meta-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
  .uni-meta-list { list-style: none; margin: 0; padding: 0; }
  .uni-meta-list li { font-size: 14px; line-height: 1.5; margin-bottom: 2px; }
  .uni-meta-list a { color: var(--primary); text-decoration: none; }
  .uni-meta-list a:hover { text-decoration: underline; }
  .uni-meta-date { font-family: var(--font-mono); font-size: 14px; color: var(--text); }
  .uni-meta-note { font-size: 11px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
  /* Publications per year and Top Venues, half each: two short columns instead
     of one tall stack. */
  .uni-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  /* School page sections (2026-11-17 redesign). */
  .uni-tabs-card { background: var(--surface); border: 1px solid var(--border); border-radius: 0; margin-bottom: 20px; }
  .uni-tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
  .uni-tab { font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent;
    padding: 14px 14px 12px; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
  .uni-tab:hover { color: var(--text); }
  .uni-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
  .uni-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 0; }
  .uni-tab-n { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
  .uni-tabpanel { padding: 20px 24px; }
  .uni-section + .uni-section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
  .uni-fac-heading { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
  .page-view .uni-section-title { font-family: var(--font-serif); font-size: 18px; font-weight: 700; margin: 0 0 12px; padding: 0; border: 0; color: var(--text); }
  .uni-section-note { font-size: 12px; color: var(--muted); margin: -6px 0 12px; line-height: 1.5; }
  .uni-rank-pill { display: inline-block; vertical-align: middle; margin-left: 10px; font-family: var(--font-mono); font-size: 14px; font-weight: 600;
    padding: 2px 10px; border-radius: 0; background: var(--topic-method-bg); color: var(--primary); }
  .uni-rank-pill span { font-weight: 400; color: var(--muted); }
  .uni-detail-stats .ustat { min-width: 96px; }
  .ustat-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
  .uni-filter-line { font-size: 12px; color: var(--muted); }
  .uni-filter-line a { color: var(--primary); }
  .uni-ai-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 20px; align-items: start; }
  #uniAiArea .ss-area-svg { max-height: 220px; }
  .uni-people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; margin-bottom: 24px; }
  .uni-card { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
  .uni-card-title { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
  .uni-ai-grid .md-row { grid-template-columns: 210px 1fr 64px; }
  .uni-topic-table td:first-child { white-space: nowrap; }
  .uni-ai-grid .uni-topic-table { margin-top: 0; }
  .uni-topic-table td, .uni-topic-table th { padding: 5px 10px; }
  .uni-topic-group td { font-weight: 600; background: var(--bg); font-size: 12px; }
  .about-table .num { text-align: right; font-variant-numeric: tabular-nums; }
  .about-table .muted, .uni-top-list .muted { color: var(--muted); }
  .about-table td.pos { color: var(--primary); font-weight: 600; }
  .about-table td.neg { color: var(--muted); }
  .uni-top-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; }
  .uni-top-list li { display: flex; justify-content: space-between; gap: 8px; }
  .uni-sort button { font: inherit; color: inherit; text-transform: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
  .uni-sort button:hover { color: var(--text); }
  .uni-dept { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .uni-fac-table th, .uni-fac-table td { white-space: nowrap; }
  .uni-self td { background: var(--topic-method-bg); font-weight: 600; }
  .uni-more-btn { font: inherit; font-size: 13px; color: var(--primary); background: none; border: 1px solid var(--border); border-radius: 0; padding: 5px 14px; cursor: pointer; margin-top: 4px; }
  .uni-more-btn:hover { background: var(--hover); }
  @media (max-width: 820px) {
    .uni-ai-grid, .uni-people-grid, .uni-charts { grid-template-columns: 1fr; }
    .uni-tabpanel { padding: 16px; }
  }
  .trend-chart-wrap { margin-top: 0; }
  .trend-chart-title { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
  .trend-chart-svg { display: block; width: 100%; overflow: visible; }
  /* Rank & output: the two radars (rank by topic, by Mindful AI dimension), their
     note, then publications per year beside the scatter of all schools. */
  /* Drawn 410 wide like the bar chart, and scaled down whole on a narrow screen
     (the bar chart keeps its height and narrows instead). */
  .uni-fit-svg { height: auto; max-width: 410px; margin: 0 auto; }
  .uni-radar-note { margin: 4px 0 0; }
  .uni-radar-note + .uni-charts { margin-top: 28px; }
  .uni-radar-shape { fill: color-mix(in srgb, var(--primary) 22%, transparent); stroke: var(--primary); stroke-width: 1.8; stroke-linejoin: round; }
  .uni-radar-hit { fill: transparent; }
  .uni-radar-hit:hover { fill: color-mix(in srgb, var(--primary) 7%, transparent); }
  .uni-scatter-med { stroke: var(--muted); stroke-dasharray: 3 3; opacity: 0.7; }
  .uni-dot { fill: var(--muted); opacity: 0.45; cursor: pointer; }
  .uni-dot:hover { fill: var(--text); opacity: 1; }
  .uni-dot-self { fill: var(--primary); stroke: var(--surface); stroke-width: 1.5; }
  /* Labels over the dots, on a halo of the card's colour. */
  .uni-dot-label, .uni-scatter-medlabel { paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
  .uni-dot-label { fill: var(--text); }
  .uni-scatter-medlabel { fill: var(--muted); }

  /* ── About / Faculty profile page shared ── */
  .page-view { max-width: 900px; margin: 0 auto; padding: 32px 24px; }
  .page-view h1 { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--text); margin-bottom: var(--sp-3); }
  .page-view h2 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; color: var(--text); margin: var(--sp-6) 0 var(--sp-3); }
  .page-view h3 { font-size: 15px; font-weight: 600; color: var(--text); margin: 18px 0 6px; }
  .page-view p { font-size: 14px; line-height: 1.7; color: rgba(var(--text-rgb), 0.86); margin-bottom: 10px; }
  .page-view ul { padding-left: 20px; margin-bottom: 12px; }
  .page-view li { font-size: 14px; line-height: 1.8; color: rgba(var(--text-rgb), 0.86); }
  .topic-def { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .topic-def:last-child { border-bottom: none; }
  .topic-def-dot { width: 12px; height: 12px; border-radius: 0; flex-shrink: 0; margin-top: 3px; }
  .about-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 24px; }
  .about-stat-card { border: 1px solid var(--border); border-radius: 0; padding: 12px; background: var(--surface); }
  .about-stat-val { font-size: 22px; font-weight: 800; color: var(--primary); }
  .about-stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
  .about-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
  .about-table th { padding: 8px 12px; background: var(--bg); text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); border-bottom: var(--hairline) solid var(--rule-strong); }
  .about-table td { padding: 7px 12px; border-bottom: var(--hairline) solid var(--border); }
  .about-table tr:last-child td { border-bottom: none; }
  .back-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); text-decoration: none; font-size: 13px; font-weight: 500; padding: 6px 12px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); cursor: pointer; margin-bottom: 24px; transition: all 0.15s; }
  .back-btn:hover { background: var(--hover); border-color: var(--primary); }
  .profile-header { background: var(--surface); border: 1px solid var(--border); border-radius: 0; padding: 24px; margin-bottom: 24px; }

  /* ── Co-authorship network ──
     Four node colours for an ORDERED quantity (shared papers), so they read as
     one ramp rather than four categories -- but they are the existing topic
     scale, which already carries dark-mode values and stays in temperature. */
  .coauthor-net { background: var(--surface); border: 1px solid var(--border); border-radius: 0; padding: 20px 24px; margin-bottom: 24px; }
  .coauthor-net[open] > summary { margin-bottom: 14px; }
  .coauthor-net > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
  .coauthor-net > summary::-webkit-details-marker { display: none; }
  .coauthor-title { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .coauthor-count { font-size: 13px; color: var(--muted); }
  .coauthor-chevron { margin-left: auto; color: var(--muted); transition: transform .15s; }
  .coauthor-net[open] .coauthor-chevron { transform: rotate(180deg); }
  .coauthor-controls { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 10px; }
  .coauthor-search { font: inherit; font-size: 13px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 0; background: var(--bg); color: var(--text); min-width: 210px; }
  .coauthor-search:focus { outline: none; border-color: var(--primary); }
  .coauthor-slider { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
  .coauthor-slider input { accent-color: var(--primary); }
  .coauthor-slider-val { font-family: var(--font-mono); font-size: 13px; color: var(--text); min-width: 1.5em; }
  .coauthor-legend { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
  .coauthor-legend span { display: inline-flex; align-items: center; gap: 6px; }
  .coauthor-swatch { width: 10px; height: 10px; border-radius: 0; display: inline-block; }
  .coauthor-canvas { border: 1px solid var(--border); border-radius: 0; background: var(--bg); }
  .coauthor-canvas svg { display: block; width: 100%; height: auto; }
  .coauthor-node { cursor: default; transition: opacity .12s; }
  .coauthor-node.is-linked { cursor: pointer; }
  .coauthor-node.is-linked:hover circle { stroke: var(--primary); stroke-width: 2; }
  .coauthor-dim { opacity: 0.14; }
  .coauthor-label, .coauthor-label-focal {
    pointer-events: none; paint-order: stroke;
    stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round;
  }
  /* Kept in step with COAUTHOR_LABEL_FS below: the placement pass estimates
     each label's width from its character count, so changing one without the
     other makes the collision test wrong rather than merely ugly. */
  .coauthor-label { font-size: 10px; fill: var(--muted); }
  .coauthor-label-focal { font-size: 12px; font-weight: 700; fill: var(--text); }
  .coauthor-note { font-size: 11px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
  .coauthor-empty { font-size: 13px; color: var(--muted); padding: 8px 0; }
  .profile-name { font-family: var(--font-serif); font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
  .profile-sub { font-size: 15px; color: var(--muted); display: flex; justify-content: center; column-gap: 16px; row-gap: 8px; flex-wrap: wrap; }
  .profile-stats { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
  .pstat { text-align: center; }
  .pstat-val { font-size: 28px; font-weight: 800; color: var(--primary); }
  .pstat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
  .profile-section-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
  .profile-pubs-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
  .profile-pubs-header .profile-section-title { margin-bottom: 0; }
  .pub-source-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
  .pub-source-options { display: inline-flex; align-items: center; gap: 6px; }
  .pub-source-option { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); cursor: pointer; white-space: nowrap; }
  .pub-source-option input { accent-color: var(--primary); }
  .pub-source-mode { display: inline-flex; border: 1px solid var(--border); border-radius: 0; overflow: hidden; }
  .pub-source-mode button { border: 0; border-right: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 700; padding: 4px 8px; cursor: pointer; }
  .pub-source-mode button:last-child { border-right: 0; }
  .pub-source-mode button.active { background: var(--primary-fill); color: var(--on-primary-fill); }

  /* ── One step larger on the two detail pages ──
     A school page and a professor page are read the way a document is read, not
     scanned the way the ranking table is, and both had inherited the table
     view's compact scale. Scoped to the two page containers on purpose: most of
     these classes are also used by the faculty card in the modal and by the
     About and compare views, which stay compact -- the card is a dense summary
     and should not grow just because the page it summarises did.
     Sizes are named here rather than edited in place so the whole step is one
     block to read, adjust or drop. */
  #uniDetailContent .uni-detail-name,
  #profileContent   .profile-name          { font-size: 27px; }
  #uniDetailContent .ustat-val,
  #profileContent   .pstat-val             { font-size: 32px; }
  #uniDetailContent .ustat-label,
  #profileContent   .pstat-label           { font-size: 12px; }
  #profileContent   .profile-sub           { font-size: 16px; }
  #profileContent   .profile-ai-chip       { font-size: 13px; }
  #profileContent   .profile-section-title,
  #uniDetailContent .uni-faculty-heading   { font-size: 17px; }
  #uniDetailContent .uni-meta-label,
  #uniDetailContent .uni-meta-note,
  #profileContent   .profile-inst-label,
  #profileContent   .profile-inst-chip,
  #profileContent   .profile-inst-note     { font-size: 12px; }
  #uniDetailContent .uni-meta-list li,
  #uniDetailContent .uni-meta-date,
  #profileContent   .year-group-label      { font-size: 15px; }
  #uniDetailContent .trend-chart-title,
  #uniDetailContent .venue-breakdown-title { font-size: 13px; }
  #uniDetailContent .about-table           { font-size: 14px; }
  #uniDetailContent .about-table th        { font-size: 12px; }
  #profileContent   .pub-title             { font-size: 16px; }
  #profileContent   .pub-author-line,
  #profileContent   .pub-venue-line        { font-size: 14px; }
  #profileContent   .coauthor-title        { font-size: 12px; }
  #profileContent   .coauthor-count        { font-size: 14px; }
  #profileContent   .coauthor-legend       { font-size: 13px; }
  #profileContent   .coauthor-search       { font-size: 14px; }
  #profileContent   .coauthor-note         { font-size: 12px; }
  @media (max-width: 768px) {
    #uniDetailContent .ustat-val,
    #profileContent   .pstat-val           { font-size: 25px; }
  }

  /* Faculty search results */
  .fac-search-card {
    display: flex; align-items: center; gap: 12px; padding: 12px;
    border: 1px solid var(--border); border-radius: 0; margin-bottom: 8px;
    cursor: pointer; transition: all 0.15s;
  }
  .fac-search-card:hover, .fac-search-card.row-active { border-color: var(--primary); background: var(--hover-strong); }
  .fac-search-avatar {
    width: 36px; height: 36px; border-radius: 0; background: var(--primary-fill);
    color: var(--on-primary-fill); display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; flex-shrink: 0;
  }
  .fac-search-info { flex: 1; min-width: 0; }
  .fac-search-name { font-weight: 600; font-size: 14px; color: var(--primary); }
  .fac-search-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
  .fac-search-score { text-align: right; font-weight: 700; font-size: 16px; color: var(--primary); }

  /* ── Admin / Source portal ── */
  .admin-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 28px; }
  .admin-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 0;
    padding: 20px; transition: border-color 0.15s;
  }
  .admin-card:hover { border-color: var(--primary); }
  .admin-card-title {
    font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
    text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
  }
  .admin-stat-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 13px; }
  .admin-stat-label { color: var(--text); display: flex; align-items: center; gap: 6px; }
  .admin-stat-val { font-weight: 700; color: var(--primary); }
  .admin-stat-dot { width: 8px; height: 8px; border-radius: 0; flex-shrink: 0; }
  .admin-big-num { font-size: 32px; font-weight: 800; color: var(--primary); margin-bottom: 10px; }

  .admin-mode-tabs { display: flex; gap: 0; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 0; overflow: hidden; }
  .admin-mode-tab {
    flex: 1; padding: 10px 20px; font-size: 14px; font-weight: 600;
    background: var(--surface); border: none; cursor: pointer; color: var(--muted);
    transition: all 0.15s; text-align: center;
  }
  .admin-mode-tab.active { background: var(--primary-fill); color: var(--on-primary-fill); }
  .admin-mode-tab:not(.active):hover { background: var(--hover); }

  /* Agent review (Review Workbench third pane) */
  .ar-intro { color: var(--muted); font-size: 13px; margin: 0 0 12px; max-width: 780px; line-height: 1.5; }

  /* ── Admin console: side menu + page ── */
  .admin-shell-view { display: grid !important; grid-template-columns: 236px minmax(0, 1fr); align-items: start; }
  .admin-shell-view > .page-view { margin: 0; width: 100%; max-width: none !important; padding-left: 32px; padding-right: 32px; }
  .admin-shell-view .page-view p { max-width: none; }
  .admin-side {
    position: sticky; top: var(--header-h); align-self: start;
    height: calc(100vh - var(--header-h)); overflow-y: auto;
    padding: 22px 12px 24px; border-right: 1px solid var(--border); background: var(--surface);
    display: flex; flex-direction: column;
  }
  .admin-side[hidden] { display: none; }
  .admin-side-toggle { display: none; }
  .admin-side-head { margin: 0 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
  .admin-side-head:empty { display: none; }
  .admin-side-group + .admin-side-group { margin-top: 18px; }
  .admin-side-heading {
    font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .09em;
    text-transform: uppercase; color: var(--muted); padding: 0 10px 6px; margin: 0;
  }
  .admin-side-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
  .admin-side-link {
    position: relative; display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; border-radius: 0; font-size: 13.5px; font-weight: 500;
    color: var(--text); text-decoration: none; transition: background .12s, color .12s;
  }
  .admin-side-link svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted); }
  .admin-side-link:hover { background: var(--hover); }
  .admin-side-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
  .admin-side-link[aria-current="page"] { background: var(--hover); color: var(--primary); font-weight: 650; }
  .admin-side-link[aria-current="page"] svg { color: var(--primary); }
  .admin-side-link[aria-current="page"]::before {
    content: ""; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 3px;
    border-radius: 0; background: var(--primary-fill);
  }
  .admin-side-badge {
    margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 0; text-align: center;
    font-size: 11px; font-weight: 700; line-height: 18px; font-variant-numeric: tabular-nums;
    background: var(--primary-fill); color: var(--on-primary-fill);
  }
  .admin-side-badge[hidden] { display: none; }
  .admin-side-foot { margin-top: auto; padding-top: 18px; }
  .admin-side-foot .admin-side-link { color: var(--muted); font-size: 13px; }
  .page-view .admin-page-intro, .admin-page-intro { color: var(--muted); font-size: 14px; margin: 0 0 20px; max-width: 72ch; line-height: 1.5; }
  .admin-page-intro:empty { display: none; }
  .page-view .admin-page-note, .admin-page-note { color: var(--muted); font-size: 11.5px; margin: -12px 0 16px; }
  .admin-page-note:empty { display: none; }
  #adminView .page-view h1, #adminReviewTitle { margin-bottom: 6px; }
  .admin-shell-view .aib-page { max-width: none; margin: 0; padding: 0 0 48px; }
  .admin-shell-view .aib-page h1 { font-size: var(--fs-h1); margin: 0 0 6px; }

  /* ── Admin dashboard ── */
  .dash { display: grid; gap: 28px; }
  .dash-h { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; margin: 0 0 12px; color: var(--text); }
  .page-view .dash-h { margin: 0 0 12px; }
  .dash-hint { color: var(--muted); font-size: 13px; margin: -6px 0 12px; line-height: 1.5; }
  .page-view .dash-hint { color: var(--muted); font-size: 13px; }
  .dash-live {
    display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr); gap: 16px; align-items: stretch;
    padding: 20px; border: 1px solid var(--border); border-radius: 0; background: var(--surface);
  }
  .dash-eyebrow { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .dash-version { font-family: var(--font-display); font-size: 40px; font-weight: 800; line-height: 1.1; margin: 4px 0 6px; color: var(--text); }
  .dash-kind { font: 600 12px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); vertical-align: middle; margin-left: 6px; }
  .dash-meta { font-size: 13px; color: var(--muted); line-height: 1.5; }
  .dash-meta code { font-size: 12px; }
  .dash-live-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
  .dash-grid-5 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .dash-card {
    position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 112px;
    padding: 16px 18px; border: 1px solid var(--border); border-radius: 0; background: var(--surface);
    color: var(--text); text-decoration: none; transition: border-color .12s, background .12s, transform .12s;
  }
  .dash-card-flat { background: var(--bg); }
  .dash-card:hover { border-color: var(--primary); background: var(--hover); }
  .dash-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
  .dash-k { font-size: 13px; font-weight: 600; color: var(--muted); }
  .dash-v { font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
  .dash-s { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
  .dash-go { position: absolute; top: 14px; right: 16px; color: var(--muted); transition: transform .12s, color .12s; }
  .dash-card:hover .dash-go { color: var(--primary); transform: translateX(2px); }
  .dash-fresh { border: 1px solid var(--border); border-radius: 0; overflow: hidden; background: var(--surface); }
  .dash-fresh-row {
    display: grid; grid-template-columns: 14px minmax(150px, 1.2fr) 120px 110px minmax(0, 2fr); gap: 12px; align-items: center;
    padding: 11px 16px; color: var(--text); text-decoration: none; font-size: 13.5px;
  }
  .dash-fresh-row + .dash-fresh-row { border-top: 1px solid var(--border); }
  .dash-fresh-row:hover { background: var(--hover); }
  .dash-fresh-label { font-weight: 600; }
  .dash-fresh-date { font-variant-numeric: tabular-nums; }
  .dash-fresh-age { font-weight: 600; }
  .dash-fresh-note { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dash-dot { width: 9px; height: 9px; border-radius: 0; }
  .tone-ok { color: #047857; } .tone-warn { color: #b45309; } .tone-bad { color: #b91c1c; }
  .tone-bg-ok { background: #10b981; } .tone-bg-warn { background: #f59e0b; } .tone-bg-bad { background: #ef4444; }
  [data-theme="dark"] .tone-ok { color: #6ee7b7; } [data-theme="dark"] .tone-warn { color: #fcd34d; } [data-theme="dark"] .tone-bad { color: #fca5a5; }
  .dq-section + .dq-section { margin-top: 28px; }
  .dq-sub { font-weight: 400; font-size: 12px; color: var(--muted); }
  .dq-empty { color: var(--muted); font-size: 13px; }
  .dq-scroll { max-height: 220px; overflow-y: auto; }
  .admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 0; }
  .admin-table-wrap .admin-table { margin: 0; border: 0; }
  .admin-table th.num, .admin-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
  .admin-table td.mono { font-family: var(--font-mono); font-size: 11.5px; }
  .admin-table tr.row-link { cursor: pointer; }
  .admin-table td.cell-wide { min-width: 280px; }
  .review-last { margin-top: 6px; font-size: 12px; color: #059669; }
  .review-last.is-staged { color: #b45309; }
  [data-theme="dark"] .review-last { color: #6ee7b7; }
  [data-theme="dark"] .review-last.is-staged { color: #fcd34d; }
  .review-last-note { color: var(--muted); }
  .review-withdraw { margin-left: 6px; font-size: 12px; }
  .admin-table tr.row-link:hover td { background: var(--hover); }
  .admin-table-count { color: var(--muted); font-size: 12.5px; margin: 0 0 8px; }
  .pill { display: inline-block; padding: 1px 8px; border-radius: 0; font-size: 11.5px; font-weight: 600; background: var(--hover); color: var(--muted); }
  .pill-ok { background: rgba(16,185,129,.14); color: #047857; }
  [data-theme="dark"] .pill-ok { color: #6ee7b7; }
  .pill-bad { background: rgba(239,68,68,.12); color: #b91c1c; }
  [data-theme="dark"] .pill-bad { color: #fca5a5; }
  /* Decisions page */
  .dc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
  .dc-n { font-variant-numeric: tabular-nums; opacity: .75; margin-left: 4px; }
  .dc-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
  .dc-side { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 100px); overflow: auto; }
  .dc-side-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
  .dc-side input { padding: 6px 8px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; margin-bottom: 4px; }
  .dc-item { display: flex; justify-content: space-between; gap: 8px; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 0; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; }
  .dc-item:hover { background: var(--hover); }
  .dc-item.on { background: var(--hover); color: var(--primary); font-weight: 650; }
  .dc-item .dc-n { font-size: 12px; color: var(--muted); opacity: 1; }
  .dc-schools { display: flex; flex-direction: column; gap: 2px; }
  .dc-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 10px; }
  .dc-filters input { flex: 1 1 220px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
  .dc-k { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .dc-chooser { display: inline-flex; border: 1px solid var(--border); border-radius: 0; overflow: hidden; }
  .dc-chooser button { border: 0; background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; padding: 5px 10px; cursor: pointer; border-right: 1px solid var(--border); }
  .dc-chooser button:last-child { border-right: 0; }
  .dc-chooser button.on { background: var(--primary-fill); color: var(--on-primary-fill); }
  .dc-table td { vertical-align: top; font-size: 13px; }
  .dc-table td:first-child { min-width: 240px; padding-left: 40px; }
  .dc-table tr.dc-group td { min-width: 0; }
  .dc-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 150px; }
  .dc-table td.dc-src { white-space: nowrap; }
  .dc-sort { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0; text-transform: inherit; letter-spacing: inherit; }
  .dc-staged { background: rgba(245,158,11,.18); color: #b45309; }
  .dc-group td { padding: 6px 10px !important; }
  .dc-g-school td { background: var(--hover); }
  .dc-g-person td { padding-left: 24px !important; }
  .dc-g-person .dc-group-btn { font-weight: 600; }
  .dc-group-btn { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 650; color: var(--text); cursor: pointer; padding: 0; display: inline-flex; align-items: baseline; gap: 6px; }
  .dc-caret { color: var(--muted); width: 10px; }
  .dc-open { font-size: 12px; margin-left: 10px; color: var(--primary); }
  .dc-person { color: var(--text); font-weight: 650; text-decoration: none; }
  .dc-person:hover { color: var(--primary); text-decoration: underline; }
  .dc-table td.dc-act { white-space: nowrap; text-align: right; }
  .dc-table .pill { white-space: nowrap; }
  [data-theme="dark"] .dc-staged { color: #fcd34d; }
  @media (max-width: 900px) { .dc-layout { grid-template-columns: 1fr; } .dc-side { position: static; max-height: none; } }
  /* Risk queue: overview of problem types, one type's list, bulk bar */
  .rq-explain { border: 1px solid var(--border); border-radius: 0; background: var(--surface); padding: 14px 18px; margin: 0 0 16px; font-size: 14px; line-height: 1.55; }
  .rq-explain p { margin: 0; }
  .rq-totals { margin-top: 8px !important; color: var(--muted); font-size: 13px; }
  .rq-totals b { color: var(--text); font-variant-numeric: tabular-nums; }
  .rq-issues { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
  .rq-issue {
    display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 16px 18px; border: 1px solid var(--border);
    border-left: 4px solid var(--rq-tone, var(--border)); border-radius: 0; background: var(--surface); color: var(--text);
    font: inherit; cursor: pointer; transition: border-color .12s, box-shadow .12s;
  }
  .rq-issue:hover, .rq-issue:focus-visible { border-color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,.06); outline: none; }
  .rq-issue[disabled] { cursor: default; opacity: .55; box-shadow: none; }
  .rq-issue-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .rq-issue-title { font-weight: 700; font-size: 15px; }
  .rq-issue-n { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--rq-tone, var(--text)); white-space: nowrap; }
  .rq-issue-sub { font-size: 12.5px; color: var(--muted); }
  .rq-issue-why { font-size: 13px; line-height: 1.5; margin: 0; }
  .rq-issue-todo { font-size: 13px; line-height: 1.5; margin: 0; color: var(--muted); }
  .rq-issue-todo b { color: var(--text); font-weight: 600; }
  .rq-issue-go { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--primary); }
  .rq-tone-high { --rq-tone: #b91c1c; } .rq-tone-mid { --rq-tone: #b45309; } .rq-tone-low { --rq-tone: #4b5563; }
  [data-theme="dark"] .rq-tone-high { --rq-tone: #fca5a5; } [data-theme="dark"] .rq-tone-mid { --rq-tone: #fcd34d; } [data-theme="dark"] .rq-tone-low { --rq-tone: #cbd5e1; }
  .rq-level { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--rq-tone); }
  .rq-foot { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
  .rq-back { display: inline-block; font-size: 13px; color: var(--primary); text-decoration: none; margin-bottom: 10px; }
  .rq-back:hover { text-decoration: underline; }
  .rq-issue-head { border: 1px solid var(--border); border-left: 4px solid var(--rq-tone, var(--border)); border-radius: 0; background: var(--surface); padding: 14px 18px; margin: 0 0 14px; }
  .rq-issue-head h2 { margin: 2px 0 6px; font-size: 18px; }
  .rq-issue-head .rq-issue-why, .rq-issue-head .rq-issue-todo { font-size: 13.5px; }
  .rq-issue-head .rq-issue-todo { margin-top: 6px; }
  .rq-more { position: relative; }
  .rq-more > summary { cursor: pointer; font-size: 13px; color: var(--primary); list-style: none; padding: 6px 4px; }
  .rq-more > summary::-webkit-details-marker { display: none; }
  .rq-more-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 0 2px; }
  .rq-odd { font-size: 13px; min-width: 260px; line-height: 1.5; }
  .rv-tools { display: flex; justify-content: flex-end; margin: 0 0 6px; }
  .rv-sec { margin: 0 0 18px; }
  .rv-sec h3 { font-size: 16px; margin: 6px 0 4px; display: inline-flex; align-items: center; gap: 8px; }
  .rv-count { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 0; background: var(--hover); color: var(--muted); }
  .rv-sec-needs h3 .rv-count { background: rgba(245,158,11,.18); color: #b45309; }
  [data-theme="dark"] .rv-sec-needs h3 .rv-count { color: #fcd34d; }
  .rv-sub { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
  .rv-sec-fine > summary { cursor: pointer; list-style: none; padding: 8px 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
  .rv-sec-fine > summary::-webkit-details-marker { display: none; }
  .rv-sec-fine > summary h3::before { content: '▸'; color: var(--muted); font-size: 12px; transition: transform .15s; display: inline-block; }
  .rv-sec-fine[open] > summary h3::before { transform: rotate(90deg); }
  .rv-sec-fine .rv-sub { margin: 0; }
  .rv-group td { font-size: 12px; padding: 6px 8px !important; background: var(--bg); }
  .rv-group.rv-check td:first-child { box-shadow: inset 3px 0 0 var(--rg-check); }
  .rv-group.rv-wrong td:first-child { box-shadow: inset 3px 0 0 var(--rg-wrong); }
  .rv-table td.rv-title { max-width: 360px; }
  .rv-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rv-why { font-size: 12px; margin-top: 2px; white-space: normal; line-height: 1.4; }
  .rv-why b { font-weight: 600; }
  .rv-why-check { color: #b45309; } .rv-why-wrong { color: #b91c1c; }
  [data-theme="dark"] .rv-why-check { color: #fcd34d; } [data-theme="dark"] .rv-why-wrong { color: #fca5a5; }
  .rv-sec-needs .review-pub-row td:first-child { box-shadow: inset 3px 0 0 var(--rg-check); }
  .rv-sec-needs .review-pub-row.rv-row-wrong td:first-child { box-shadow: inset 3px 0 0 var(--rg-wrong); }
  .rq-odd b { font-weight: 600; }
  .rq-k { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-right: 4px; }
  .rq-n { display: inline-block; min-width: 22px; padding: 0 6px; margin-right: 6px; border-radius: 0; background: var(--hover); font-size: 11.5px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
  .rq-table .uni-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rq-table td.rq-act { text-align: right; white-space: nowrap; }
  @media (max-width: 640px) { .rq-issues { grid-template-columns: 1fr; } }
  .rq-filters { flex-wrap: wrap; gap: 8px 12px; }
  .rq-field { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
  .rq-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; cursor: pointer; }
  .rq-bulk {
    position: sticky; top: 64px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 10px 12px; margin: 4px 0 10px; border: 1px solid var(--border); border-radius: 0; background: var(--surface);
    font-size: 13px;
  }
  .rq-bulk[hidden] { display: none; }
  .rq-bulk-spacer { flex: 1; }
  .rq-table td.rq-cb, .rq-table th.rq-cb { width: 32px; text-align: center; }
  .rq-table tr.rq-sel td { background: var(--hover); }
  .rq-filters #adminReviewUniFilter { max-width: 240px; }
  .rq-filters #adminReviewSearchBox { flex: 1 1 200px; }
  .rq-risk { font-weight: 700; font-variant-numeric: tabular-nums; }
  .muted { color: var(--muted); }
  /* Dashboard: collapsible pipeline diagram */
  .dash-flow { border: 1px solid var(--border); border-radius: 0; background: var(--surface); margin-bottom: 24px; }
  .dash-flow > summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
  .dash-flow > summary::-webkit-details-marker { display: none; }
  .dash-flow > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; display: inline-block; }
  .dash-flow[open] > summary::before { transform: rotate(90deg); }
  .flow-sum-title { font-weight: 700; font-size: 15px; }
  .flow-sum-sub { color: var(--muted); font-size: 13px; }
  .flow-track {
    list-style: none; margin: 0; padding: 4px 18px 8px; display: grid; gap: 22px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); counter-reset: none;
  }
  .flow-stage {
    position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px;
    border: 1px solid var(--border); border-top: 3px solid var(--border); border-radius: 0; background: var(--bg);
  }
  /* arrows only where the order is one line: eight across on wide screens, one column on phones;
     in between the numbers carry the order */
  @media (min-width: 1700px) {
    .flow-track { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .flow-stage:not(:last-child)::after {
      content: '→'; position: absolute; right: -17px; top: 16px; color: var(--muted); font-weight: 700;
    }
  }
  .flow-out { border-top-color: #94a3b8; } .flow-work { border-top-color: #6366f1; }
  .flow-here { border-top-color: #f59e0b; background: var(--hover); } .flow-site { border-top-color: #10b981; }
  .flow-head { display: flex; align-items: center; gap: 8px; }
  .flow-n {
    width: 20px; height: 20px; border-radius: 0; display: inline-grid; place-items: center;
    background: var(--text); color: var(--surface); font: 700 11px/1 var(--font-mono);
  }
  .flow-title { font-weight: 700; font-size: 14px; }
  .flow-where { font: 600 10.5px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
  .flow-items { margin: 0; padding-left: 16px; font-size: 12.5px; line-height: 1.45; color: var(--text); }
  .flow-items li + li { margin-top: 3px; }
  .flow-link { margin-top: auto; font-size: 12.5px; font-weight: 600; color: var(--primary); text-decoration: none; }
  .flow-link:hover { text-decoration: underline; }
  .flow-foot { margin: 4px 18px 16px; padding: 10px 12px; border-radius: 0; background: var(--bg); font-size: 13px; color: var(--muted); line-height: 1.5; }
  .flow-foot b { color: var(--text); }
  /* beat the page-view's own li / p colours, which are fixed for the light theme */
  .page-view .dash-flow .flow-stage, .page-view .dash-flow .flow-items li,
  .page-view .dash-flow .flow-title, .page-view .dash-flow .flow-foot b { color: var(--text); }
  .page-view .dash-flow .flow-foot, .page-view .dash-flow .flow-where { color: var(--muted); }
  @media (max-width: 860px) {
    .flow-track { grid-template-columns: 1fr; gap: 18px; }
    .flow-stage:not(:last-child)::after { content: '↓'; right: auto; left: 18px; top: auto; bottom: -18px; }
    .rq-bulk { top: 56px; }
  }
  @media (max-width: 860px) {
    .dash-live { grid-template-columns: 1fr; }
    .dash-fresh-row { grid-template-columns: 14px minmax(0, 1fr) auto; }
    .dash-fresh-date, .dash-fresh-note { display: none; }
  }
  @media (max-width: 520px) { .dash-live-side { grid-template-columns: 1fr; } }
  @media (max-width: 860px) {
    .admin-shell-view { display: block !important; }
    .admin-shell-view > .page-view { padding-left: 16px; padding-right: 16px; }
    .admin-side {
      height: auto; z-index: 80; padding: 8px 16px; border-right: 0;
      border-bottom: 1px solid var(--border); background: var(--bg);
    }
    .admin-side-toggle {
      order: -1; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px;
      border: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--text);
      padding: 0 12px; font: inherit; font-size: 14px; cursor: pointer;
    }
    .admin-side-toggle .admin-side-toggle-key { color: var(--muted); font-size: 12px; }
    .admin-side-toggle .admin-side-caret { margin-left: auto; color: var(--muted); transition: transform .15s; }
    .admin-side.open .admin-side-caret { transform: rotate(180deg); }
    .admin-side-list, .admin-side-foot, .admin-side-head { display: none; }
    .admin-side.open .admin-side-head:not(:empty) { display: block; margin: 12px 0 0; padding-bottom: 12px; }
    .admin-side.open .admin-side-list { display: block; padding: 12px 0 4px; max-height: 70vh; overflow-y: auto; }
    .admin-side.open .admin-side-foot { display: block; padding: 4px 0 8px; }
    .admin-side-link { min-height: 40px; }
    .admin-side-link[aria-current="page"]::before { left: -4px; }
  }
  .ar-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; cursor: pointer; }
  .ar-summary { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--text); margin: 4px 0 14px; }
  .ar-muted { color: var(--muted); font-size: 12px; }
  .ar-card { border: 1px solid var(--border); border-radius: 0; background: var(--surface); padding: 14px 16px; margin-bottom: 12px; }
  .ar-card-done { opacity: .72; }
  .ar-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
  .ar-person { font-weight: 700; color: var(--text); text-decoration: none; }
  .ar-person:hover { text-decoration: underline; }
  .ar-verdict { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 0; border: 1px solid var(--border); color: var(--muted); }
  .ar-verdict-not_belongs { color: #b91c1c; border-color: #fca5a5; }
  .ar-title { font-weight: 600; line-height: 1.4; margin-bottom: 2px; }
  .ar-title a { color: var(--text); }
  .ar-summary-text { font-size: 13px; line-height: 1.5; margin: 8px 0 4px; }
  .ar-cand { font-size: 13px; margin: 6px 0; }
  .ar-cand a, .ar-evidence a, .ar-evidence a:visited { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
  .ar-evidence { font-size: 12px; margin: 6px 0 2px; }
  .ar-evidence summary { cursor: pointer; color: var(--muted); }
  .ar-evidence ul { margin: 6px 0 0; padding-left: 18px; }
  .ar-evidence li { margin-bottom: 4px; line-height: 1.45; overflow-wrap: anywhere; }
  .ar-quote { color: var(--muted); }
  .ar-ev-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin-right: 6px; color: var(--muted); }
  .ar-ev-not_belongs { color: #b91c1c; }
  .ar-ev-belongs { color: #15803d; }
  .ar-actions, .ar-staged { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
  .ar-btn { font-size: 12px; padding: 4px 12px; }
  .ar-reason, .ar-notes { font-size: 12px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 0; background: var(--bg); color: var(--text); }
  .ar-notes { flex: 1; min-width: 160px; }
  .ar-badge { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 0; background: var(--hover); color: var(--text); }
  .ar-badge-remove, .ar-badge-reassign { background: #fee2e2; color: #991b1b; }
  .ar-badge-keep { background: #dcfce7; color: #166534; }
  [data-theme="dark"] .ar-verdict-not_belongs, [data-theme="dark"] .ar-ev-not_belongs { color: #fca5a5; border-color: #7f1d1d; }
  [data-theme="dark"] .ar-ev-belongs { color: #86efac; }
  [data-theme="dark"] .ar-badge-remove, [data-theme="dark"] .ar-badge-reassign { background: #450a0a; color: #fecaca; }
  [data-theme="dark"] .ar-badge-keep { background: #052e16; color: #bbf7d0; }

  .uni-summary-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
  .uni-summary-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 0; font-size: 11px; font-weight: 600;
    background: var(--bg); color: var(--muted); border: 1px solid var(--border);
  }
  .uni-header-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 0;
    padding: 20px; margin-bottom: 20px;
  }
  .uni-header-card h2 { font-family: var(--font-serif); margin: 0 0 8px; font-size: 20px; font-weight: 800; color: var(--text); }
  .uni-header-card .uni-meta { font-size: 13px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
  .uni-header-card .uni-meta strong { color: var(--primary); }

  .review-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: #dc2626; color: #fff; border-radius: 0;
    font-size: 10px; font-weight: 700; margin-left: 4px;
  }
  .admin-mode-tab .review-badge { background: #fff; color: var(--primary); }
  .admin-mode-tab.active .review-badge { background: rgba(255,255,255,0.3); color: #fff; }

  .edit-form { background: var(--bg); border: 1px solid var(--border); border-radius: 0; padding: 16px; margin-top: 16px; }
  .edit-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
  .edit-row label { min-width: 120px; font-size: 12px; font-weight: 600; color: var(--muted); }
  .edit-row input {
    flex: 1; min-width: 200px; padding: 6px 10px; border: 1px solid var(--border);
    border-radius: 0; font-size: 13px; background: var(--surface); color: var(--text);
  }
  .edit-row input:focus { outline: none; border-color: var(--primary); }
  .edit-row .edit-old { font-size: 11px; color: var(--muted); min-width: 120px; }

  .action-btn {
    padding: 6px 14px; border-radius: 0; font-size: 12px; font-weight: 600;
    border: none; cursor: pointer; transition: all 0.15s;
  }
  .action-btn-primary { background: var(--primary-fill); color: var(--on-primary-fill); }
  .action-btn-primary:hover { opacity: 0.85; }
  .action-btn-danger { background: #dc2626; color: #fff; }
  .action-btn-danger:hover { opacity: 0.85; }
  .action-btn-warn { background: #d97706; color: #fff; }
  .action-btn-warn:hover { opacity: 0.85; }
  .action-btn-success { background: #059669; color: #fff; }
  .action-btn-success:hover { opacity: 0.85; }
  .action-btn-outline {
    background: var(--surface); color: var(--primary); border: 1px solid var(--primary);
  }
  .action-btn-outline:hover { background: var(--primary-fill); color: var(--on-primary-fill); }
  .action-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }

  .edit-approval-card {
    border: 1px solid var(--border); border-radius: 0; padding: 14px; margin-bottom: 10px;
    background: var(--surface);
  }
  .edit-approval-card .field-change {
    font-size: 13px; margin-bottom: 8px;
  }
  .edit-approval-card .old-val { text-decoration: line-through; color: #991b1b; }
  .edit-approval-card .new-val { color: #059669; font-weight: 600; }

  [data-theme="dark"] .edit-form { background: var(--surface); border-color: var(--border); }
  [data-theme="dark"] .edit-row input { background: var(--bg); color: var(--text); border-color: var(--border); }
  [data-theme="dark"] .edit-approval-card { background: var(--surface); border-color: var(--border); }
  [data-theme="dark"] .admin-mode-tab { background: var(--surface); }
  [data-theme="dark"] .admin-mode-tab:not(.active):hover { background: var(--hover); }
  [data-theme="dark"] .uni-header-card { background: var(--surface); border-color: var(--border); }
  [data-theme="dark"] .uni-summary-chip { background: var(--surface); border-color: var(--border); }

  .admin-auth-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 14px 16px; margin-bottom: 20px; border-radius: 0;
    border: 1px solid var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--surface));
  }
  .admin-auth-banner-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
  .admin-auth-banner code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
  [data-theme="dark"] .admin-auth-banner { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
  .admin-search-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
  .admin-search-bar input {
    flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid var(--border);
    border-radius: 0; font-size: 13px; background: var(--surface); color: var(--text);
  }
  .admin-search-bar input[type="checkbox"] { flex: none; min-width: unset; width: auto; padding: 0; border: none; background: none; }
  .admin-search-bar input:focus { outline: none; border-color: var(--primary); }
  .admin-search-bar select {
    padding: 8px 12px; border: 1px solid var(--border); border-radius: 0;
    font-size: 13px; background: var(--surface); color: var(--text);
  }

  .admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .admin-table th {
    padding: 8px 10px; text-align: left; font-size: 11px; font-weight: 700;
    text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--border);
    background: var(--bg); white-space: nowrap;
  }
  .admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
  .admin-table tr:hover td { background: var(--hover); cursor: pointer; }
  .admin-table .name-cell { font-weight: 600; color: var(--primary); white-space: nowrap; }
  .admin-table .uni-cell { color: var(--text); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .verdict-badge {
    display: inline-block; padding: 2px 8px; border-radius: 0;
    font-size: 11px; font-weight: 600; white-space: nowrap;
  }
  .verdict-confirmed_high { background: #d1fae5; color: #065f46; }
  .verdict-confirmed       { background: #dbeafe; color: #1d4ed8; }
  .verdict-weak_match      { background: #fef3c7; color: #92400e; }
  .verdict-suspect         { background: #fee2e2; color: #991b1b; }
  .verdict-single_source   { background: #f3f4f6; color: #6b7280; }
  .verdict-no_id           { background: #f3f4f6; color: #9ca3af; }
  .verdict-affiliation_mismatch { background: #fee2e2; color: #991b1b; }
  .verdict-unknown         { background: #f3f4f6; color: #9ca3af; }

  .conf-meter { display: inline-flex; align-items: center; gap: 6px; }
  .conf-bar { width: 60px; height: 6px; background: var(--border); border-radius: 0; overflow: hidden; }
  .conf-fill { height: 100%; border-radius: 0; }
  .conf-val { font-size: 12px; font-weight: 600; min-width: 32px; }

  .api-urls-panel { margin: 16px 0; }
  .api-url-row {
    display: flex; align-items: center; gap: 8px; padding: 6px 10px;
    border: 1px solid var(--border); border-radius: 0; margin-bottom: 6px;
    font-size: 12px; background: var(--bg);
  }
  .api-url-label { font-weight: 600; color: var(--text); min-width: 120px; flex-shrink: 0; }
  .api-url-link {
    flex: 1; font-family: monospace; font-size: 11px; color: var(--primary);
    text-decoration: none; word-break: break-all;
  }
  .api-url-link:hover { text-decoration: underline; }
  .api-copy-btn {
    background: var(--surface); border: 1px solid var(--border); border-radius: 0;
    padding: 2px 8px; font-size: 11px; cursor: pointer; color: var(--muted);
    flex-shrink: 0; transition: all 0.15s;
  }
  .api-copy-btn:hover { border-color: var(--primary); color: var(--primary); }
  .api-copy-btn.copied { background: #059669; border-color: #059669; color: #fff; }

  .source-tabs { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 0; overflow: hidden; margin-bottom: 16px; }
  .source-tab {
    padding: 8px 16px; font-size: 13px; font-weight: 500; background: var(--surface);
    border: none; cursor: pointer; color: var(--muted); transition: all 0.15s;
    display: flex; align-items: center; gap: 6px;
  }
  .source-tab.active { background: var(--primary-fill); color: var(--on-primary-fill); }
  .source-tab .tab-count { font-size: 11px; opacity: 0.7; }

  .overlap-grid { display: grid; grid-template-columns: 80px repeat(3, 1fr); gap: 0; font-size: 12px; margin: 12px 0; }
  .overlap-cell {
    padding: 6px 8px; text-align: center; border: 1px solid var(--border);
  }
  .overlap-header { font-weight: 700; background: var(--bg); color: var(--muted); font-size: 11px; }
  .overlap-val { font-weight: 600; color: var(--primary); }
  .overlap-diag { background: var(--bg); color: var(--muted); }

  .detail-section { margin-bottom: 28px; }
  .detail-section-title {
    font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
    text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
    padding-bottom: 6px; border-bottom: 1px solid var(--border);
  }
  .detail-header {
    background: var(--surface); border: 1px solid var(--border); border-radius: 0;
    padding: 24px; margin-bottom: 24px;
  }
  .detail-name { font-family: var(--font-serif); font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
  .detail-sub { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
  .detail-ids { display: flex; gap: 10px; flex-wrap: wrap; }
  .detail-id-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 0; font-size: 12px; font-weight: 500;
  }

  [data-theme="dark"] .admin-card { background: var(--surface); border-color: var(--border); }
  [data-theme="dark"] .admin-search-bar input { background: var(--surface); color: var(--text); border-color: var(--border); }
  [data-theme="dark"] .admin-search-bar select { background: var(--surface); color: var(--text); border-color: var(--border); }
  [data-theme="dark"] .admin-table th { background: var(--bg); }
  [data-theme="dark"] .api-url-row { background: var(--surface); border-color: var(--border); }
  [data-theme="dark"] .api-copy-btn { background: var(--surface); border-color: var(--border); }
  [data-theme="dark"] .detail-header { background: var(--surface); border-color: var(--border); }
  [data-theme="dark"] .overlap-header { background: var(--bg); }
  [data-theme="dark"] .overlap-cell { border-color: var(--border); }
  [data-theme="dark"] .source-tab { background: var(--surface); color: var(--muted); }
  [data-theme="dark"] .source-tab.active { background: var(--primary-fill); color: var(--on-primary-fill); }

  /* Dark-mode badge/tag overrides -- keep light-mode hue, lower-opacity bg + lightened text */
  [data-theme="dark"] .src-oa, [data-theme="dark"] .sid-oa     { background: rgba(29,78,216,0.28); color: #93c5fd; }
  [data-theme="dark"] .src-orcid, [data-theme="dark"] .sid-orcid { background: rgba(6,95,70,0.35);  color: #6ee7b7; }
  [data-theme="dark"] .src-dblp, [data-theme="dark"] .sid-dblp  { background: rgba(146,64,14,0.35); color: #fcd34d; }
  [data-theme="dark"] .src-bizdb { background: rgba(91,33,182,0.35); color: #c4b5fd; }
  [data-theme="dark"] .src-openreview { background: rgba(7,89,133,0.35); color: #7dd3fc; }
  [data-theme="dark"] .tag-non_ai     { background: rgba(107,114,128,0.35); color: #d1d5db; }
  [data-theme="dark"] .verdict-confirmed_high { background: rgba(5,150,105,0.28);  color: #6ee7b7; }
  [data-theme="dark"] .verdict-confirmed      { background: rgba(29,78,216,0.28);  color: #93c5fd; }
  [data-theme="dark"] .verdict-weak_match     { background: rgba(217,119,6,0.35);  color: #fcd34d; }
  [data-theme="dark"] .verdict-suspect,
  [data-theme="dark"] .verdict-affiliation_mismatch { background: rgba(220,38,38,0.28); color: #fca5a5; }
  [data-theme="dark"] .verdict-single_source,
  [data-theme="dark"] .verdict-no_id,
  [data-theme="dark"] .verdict-unknown        { background: rgba(148,163,184,0.22); color: #cbd5e1; }

  /* ── Mobile responsive ── */
  @media (max-width: 768px) {

    #mainContent { padding: 56px var(--pad) 64px; }
    .ranking-hero-title { font-size: var(--fs-h2); text-align: left; }
    .ranking-hero-search { max-width: none; margin-bottom: 14px; }
    .ranking-body { max-width: none; }
    .filter-bar { justify-content: flex-start; }
    .filter-pop,
    .filter-pop-wrap[data-filter="venues"] .filter-pop,
    .filter-pop-wrap[data-filter="authors-year"] .filter-pop,
    .filter-pop-wrap[data-filter="authors-venues"] .filter-pop { width: calc(100vw - 32px); }
    .faculty-inner { padding: 0 0 12px; }
    .ss-lists { grid-template-columns: 1fr; }
    .ss-link { margin-left: 0; }
    .uni-detail-stats { gap: 16px; }
    .coauthor-net { padding: 16px; }
    .coauthor-controls { flex-direction: column; align-items: stretch; gap: 12px; }
    .uni-meta, .uni-charts { grid-template-columns: 1fr; gap: 16px; }
  }

  /* ── Sources page ── */
  .source-bar { display:flex; height:8px; border-radius: 0; overflow:hidden; min-width:100px; background:#eee; }
  .source-bar .sb-oa { background:#1d4ed8; }
  .source-bar .sb-orcid { background:#065f46; }
  .source-bar .sb-dblp { background:#92400e; }
  [data-theme="dark"] .source-bar { background: #2a2d36; }

  .sources-overview-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
  .sources-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 0;
    padding: 16px; text-align: center; transition: border-color 0.15s;
  }
  .sources-card:hover { border-color: var(--primary); }
  .sources-card-val { font-size: 24px; font-weight: 800; color: var(--primary); }
  .sources-card-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
  .sources-card-accent { border-left: 3px solid; }
  .sources-card-oa { border-left-color: #1d4ed8; }
  .sources-card-orcid { border-left-color: #065f46; }
  .sources-card-dblp { border-left-color: #92400e; }
  .sources-card-multi { border-left-color: #7c3aed; }
  .sources-card-research { border-left-color: #059669; }
  .sources-card-cv { border-left-color: #b45309; }
  .sources-card-openreview { border-left-color: #0369a1; }
  /* Same width as the ranking (user decision 2026-11-17). */
  .page-view.sources-page { max-width: calc(var(--content-max) + 48px); }
  .sources-page .sources-overview-cards { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
  .sources-page .sources-overview-cards .sources-card { padding: 14px 6px; }
  .sources-page .sources-card-val { font-size: 20px; }
  .sources-table th, .sources-table td { padding: 6px 8px; white-space: nowrap; }
  .sources-table td:nth-child(n+3), .sources-table th:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
  .sources-table td:nth-child(2) { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
  .sources-fac td:nth-child(3), .sources-fac th:nth-child(3) { text-align: left; }
  .sources-fac td:last-child, .sources-fac th:last-child { text-align: left; }
  #sourcesTableContainer { overflow-x: auto; }

  .sources-id-badges { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
  .sources-id-badge {
    padding: 2px 6px; border-radius: 0; font-size: 10px; font-weight: 700;
  }
  .sid-oa { background: #dbeafe; color: #1d4ed8; }
  .sid-orcid { background: #d1fae5; color: #065f46; }
  .sid-dblp { background: #fef3c7; color: #92400e; }

  [data-theme="dark"] .sources-card { background: var(--surface); border-color: var(--border); }

  /* ── Admin enhanced: edit form grid ── */
  .admin-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .admin-edit-grid label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); font-weight: 600; }
  .admin-edit-grid input, .admin-edit-grid select {
    margin-top: 4px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 0;
    font-size: 14px; background: var(--surface); color: var(--text);
  }
  .admin-edit-grid input:focus, .admin-edit-grid select:focus { outline: none; border-color: var(--primary); }
  [data-theme="dark"] .admin-edit-grid input,
  [data-theme="dark"] .admin-edit-grid select { background: var(--surface); color: var(--text); border-color: var(--border); }
  .btn-primary {
    padding: 8px 18px; background: var(--primary-fill); color: var(--on-primary-fill); border: none; border-radius: 0;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity 0.15s;
  }
  .btn-primary:hover { opacity: 0.85; }
  .btn-secondary {
    padding: 8px 18px; background: var(--surface); color: var(--text); border: 1px solid var(--border);
    border-radius: 0; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s;
  }
  .btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

  .data-health-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .data-health-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 0; padding: 16px;
  }
  .data-health-card h4 { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
  [data-theme="dark"] .data-health-card { background: var(--surface); border-color: var(--border); }

  /* ── Guide page ── */
  .guide-section { margin-bottom: 16px; border: 1px solid var(--border); border-radius: 0; overflow: hidden; }
  .guide-header {
    padding: 16px 20px; font-weight: 600; cursor: pointer; display: flex;
    justify-content: space-between; align-items: center; background: var(--surface);
    font-size: 15px; color: var(--text); transition: background 0.15s;
  }
  .guide-header:hover { background: var(--hover); }
  .guide-chevron { transition: transform 0.3s; font-size: 12px; color: var(--muted); }
  .guide-chevron.open { transform: rotate(180deg); }
  .guide-body { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
  .guide-body.open { max-height: 2000px; padding: 16px 20px; }
  .guide-body p { font-size: 14px; line-height: 1.7; color: var(--text); margin-bottom: 10px; }
  .guide-body ul { padding-left: 20px; margin-bottom: 12px; }
  .guide-body li { font-size: 14px; line-height: 1.8; color: var(--text); }
  .guide-body h4 { font-size: 14px; font-weight: 700; color: var(--primary); margin: 14px 0 6px; }
  .guide-body code { background: var(--bg); padding: 2px 6px; border-radius: 0; font-size: 13px; }
  [data-theme="dark"] .guide-header { background: var(--surface); }
  [data-theme="dark"] .guide-section { border-color: var(--border); }
  [data-theme="dark"] .guide-body p,
  [data-theme="dark"] .guide-body li { color: var(--text); }
  [data-theme="dark"] .guide-body code { background: var(--hover); }

  .pipeline-flow { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin: 16px 0; }
  .pipeline-step {
    background: var(--surface); border: 1px solid var(--border); border-radius: 0;
    padding: 10px 14px; text-align: center; min-width: 100px;
  }
  .pipeline-step-num { font-size: 18px; font-weight: 800; color: var(--primary); }
  .pipeline-step-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
  .pipeline-arrow { font-size: 16px; color: var(--muted); }
  [data-theme="dark"] .pipeline-step { background: var(--surface); border-color: var(--border); }

  /* ── New-site frame ──────────────────────────────────────────────────── */
  /* The ranking view sits under the hero: the hero, then the rankings. */
  #rankingView { flex-direction: column; }
  .ranking-hero-title {
    margin-bottom: 32px;
    font-size: clamp(24px, 2.4vw, 32px);
  }
  .ranking-hero-title::before {
    content: ""; display: block; width: 40px; height: 4px; margin: 0 auto 16px;
    background: var(--gold);
  }
  @media (max-width: 768px) {
    .ranking-hero-title::before { margin-left: 0; }
  }
  /* Views other than the rankings start under the header bar. */
  .page-view { padding-top: 48px; }
  /* A wide table scrolls inside its own box on a phone instead of widening
     the page (the methodology venue list has no .table-scroll wrapper). */
  @media (max-width: 768px) {
    .page-view table.about-table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  }
  /* Links in prose take the accent. */
  .page-view a { color: var(--primary); }
