/* Result-panel styling, shared by the site and by the extension.
 *
 * Only the atoms that render a resolver result: badges, IPS figures, the
 * candidate list. Page shell (#results-band, #status, .scope*, .panels) stays
 * in index.html — the extension supplies its own container.
 *
 * Requires tokens.css.
 */

  .badge {
    font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    padding: 4px 9px; border-radius: 999px; white-space: nowrap;
  }
  .badge.official { color: var(--green); background: var(--green-pill); }
  .badge.multi    { color: var(--amber); background: var(--amber-pill); }
  .badge.estimate,
  .badge.none     { color: var(--muted); background: var(--track); }

  .ips-row { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
  .ips-v { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
  .ips-y { font-size: 13px; color: var(--muted); }
  .bar { position: relative; height: 8px; background: var(--track); border-radius: 5px; margin-bottom: 8px; }
  .bar-fill { height: 100%; background: var(--blue); border-radius: 5px; }
  .bar-ref { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--ink); }
  .bench { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }

  .spinner {
    display: inline-block; width: .85em; height: .85em; vertical-align: -1px;
    border: 2px solid var(--line); border-top-color: var(--blue);
    border-radius: 50%; animation: spin .7s linear infinite; margin-right: 6px;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  .panel {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 16px; padding: 26px 28px;
    animation: rise .5s cubic-bezier(.22, 1, .36, 1) both;
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }

  .panel > header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
  .panel h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
  .reason { font-size: 14.5px; line-height: 1.55; color: var(--muted); margin-bottom: 18px; max-width: 62em; }
  .reason.calib { background: var(--surface-2); border-radius: 12px; padding: 13px 15px; color: var(--ink-2); }
  .reason.calib strong { color: var(--ink); font-weight: 700; }

  .cands { list-style: none; margin: 0; padding: 0; }
  .cand { border-top: 1px solid var(--line-2); padding: 18px 0; }
  .cand:first-child { border-top: 0; padding-top: 0; }
  .cand-head { display: flex; gap: 16px; align-items: baseline; }
  .prob { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 20px; color: var(--blue); min-width: 3.4rem; flex: none; }
  .rank {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 999px; font-size: 13px;
    background: var(--surface-2); color: var(--muted); font-weight: 700;
  }
  .cand-name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
  .cand-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }

  .ips { margin: 14px 0 0 4.9rem; }
  /* Private rows carry no probability gutter, so nothing to align under. */
  .cands-flat .ips, .cands-flat .results { margin-left: 0; }
  .ips.none { color: var(--muted); font-size: 14px; margin-top: 10px; }
  .ips .hint { display: block; font-size: 12.5px; margin-top: 2px; }
  .trend { font-size: 13px; margin-top: 6px; color: var(--muted); }
  .trend.up strong { color: var(--green); }
  .trend.down strong { color: var(--amber); }

  .results { margin: 14px 0 0 4.9rem; padding-top: 14px; border-top: 1px solid var(--line-2); }
  .results .bench b { color: var(--ink); }
  .va { font-weight: 700; }
  .va.up { color: var(--green); }
  .va.down { color: var(--amber); }
  .va.flat { color: var(--muted); }
  .va-note { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin-top: 8px; max-width: 60em; }
  .va-note strong { color: var(--ink); }

  .grp { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; }
  .grp:first-of-type { margin-top: 6px; }

  .verify { font-size: 14px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); color: var(--muted); }
  .verify strong { color: var(--ink); font-weight: 700; }
  .verify a { color: var(--blue); font-weight: 600; }
  .verify a:hover { text-decoration: underline; }

  .empty { color: var(--muted); font-size: 14.5px; }

/* The extension panel is always this narrow; the site applies the same below 620px. */
@media (max-width: 620px) {
  .panel { padding: 22px 20px; }
  .ips, .results { margin-left: 0; }
}
