/* ==========================================================================
   SUSIE HQ — standalone stylesheet
   Part 1: the sortitoutsi 2026 design system (copy of routes-v2/style.css)
   Part 2: Susie HQ issue tracker layer (.hq-*)
   If routes-v2/style.css changes, re-copy Part 1.
   ========================================================================== */

/* ---------- Part 1 ---------- */
/* ==========================================================================
   SORTITOUTSI 2026 — site stylesheet (routes-v2)
   Built from fm-reader/v4/style.css: Part 1 is the v4 design system, Part 2
   the site chrome (masthead, brand, top bar) from v4's reader layer. The
   FM Reader-only components (headroom gauge, deck filters, column picker,
   squad chart…) stay in fm-reader/v4.

   Everything below the main nav uses one sans typeface (Inter, as used by
   the nav), flat cards with a 1px grey-blue border, 6px rounded controls and
   sentence-case labels. The masthead and main nav keep their original faces
   and metrics (section 5).
   ========================================================================== */

/* ##########################################################################
   PART 1 — sortitoutsi 2026 design system
   ########################################################################## */
/* ==========================================================================
   SORTITOUTSI — 2026 redesign (dual theme)
   Follows the device's light/dark setting, light when it has none; the
   pure-CSS toggle in the top bar (hidden checkbox + :root:has(:checked) — no
   JS) flips it. Brand blue and navy on flat grey-blue surfaces; FM colour
   grading is kept for data only.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   Every themed colour is a light-dark() pair, light value first. Which half
   is used follows color-scheme, set once in 1b.
   -------------------------------------------------------------------------- */
:root {
  --bg0: light-dark(#edf1f9, #070b14);
  --bg1: light-dark(#f6f8fd, #0c1322);
  --bg2: light-dark(#ffffff, #111a2e);
  --bg3: light-dark(#e7edf8, #19243f);
  --bg4: light-dark(#dbe4f480, #21305380);

  --line: light-dark(#d9e1f0, #22304f);
  --line2: light-dark(#bccbe6, #31426b);

  --ink: light-dark(#16203a, #eaf0ff);
  --ink-dim: light-dark(#3e4d72, #b3bedd);
  --muted: light-dark(#69769c, #7585ad);

  --blue: light-dark(#1b6ce6, #4da3ff);
  --blue-deep: light-dark(#1257c4, #2f7fe0);
  --blue-hover: light-dark(#3b82ec, #79bcff);
  --blue-ink: light-dark(#1257c4, #4da3ff);   /* blue text on a tinted surface */
  --on-blue: light-dark(#ffffff, #051528);
  --cyan: light-dark(#0d96b4, #53d9e9);
  --cyan-hover: light-dark(#0b7f99, #82e3ff);
  --on-cyan: light-dark(#ffffff, #04222e);
  --green: light-dark(#189d58, #45d483);
  --amber: light-dark(#b9790b, #ffc24b);
  --red: light-dark(#d8405c, #ff6478);
  --orange: light-dark(#e8821a, #ff9f1c);

  --pitch: #0d2018;
  --pitch-line: rgba(236, 248, 255, 0.24);

  /* one typeface below the nav: the nav's own sans */
  --font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-body: var(--font-sans);
  /* the masthead keeps its original faces (section 5) */
  --font-mast-body: "Archivo", "Helvetica Neue", sans-serif;
  --font-mast-mono: "Spline Sans Mono", "SFMono-Regular", monospace;

  --r: 8px;      /* cards and panels */
  --r-sm: 6px;   /* buttons, inputs, menus */
  --r-xs: 4px;   /* tags and small badges */
  /* chamfer kept only for position badges, attribute chips and the CA/PA bar */
  --notch-sm: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);

  --shadow: 0 18px 44px -16px light-dark(rgba(23, 43, 99, 0.22), rgba(2, 6, 16, 0.9));   /* popovers only */
  --wrap: 1240px;

  /* theme-dependent chrome */
  --nav-glass: light-dark(rgba(252, 253, 255, 0.88), rgba(12, 19, 34, 0.85));
  --accent-surface: light-dark(#ffffff, #19243f);
  --flag-border: light-dark(rgba(20, 40, 90, 0.18), rgba(255, 255, 255, 0.18));
  --flag-shadow: 0 2px 7px light-dark(rgba(23, 43, 99, 0.18), rgba(0, 0, 0, 0.4));
  --att-elite-ink: light-dark(#1257c4, #4da3ff);
  --post-side-bg: light-dark(rgba(234, 240, 250, 0.65), rgba(7, 11, 20, 0.4));
}

/* --------------------------------------------------------------------------
   1b. Theme — the device's setting first, light when it has none. The
   checkbox in the top bar flips whichever is showing. CSS only.
   -------------------------------------------------------------------------- */
:root { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root:has(#scheme:checked) { color-scheme: light; }
}
@media not (prefers-color-scheme: dark) {
  :root:has(#scheme:checked) { color-scheme: dark; }
}

/* the toggle itself: a hidden checkbox and a two-option segmented control;
   the option for the theme on screen is the raised one */
.scheme-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.scheme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  cursor: pointer;
  font-size: 13px;
  line-height: 22px;
  color: var(--muted);
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  user-select: none;
  transition: border-color 0.15s ease;
}
.scheme-toggle:hover { border-color: var(--blue); }
.scheme-toggle .st-opt {
  padding: 0 10px;
  border-radius: var(--r-xs);
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.scheme-toggle .st-opt-light {
  background: light-dark(#e7edf8, transparent);
  color: light-dark(#16203a, #7585ad);
}
.scheme-toggle .st-opt-dark {
  background: light-dark(transparent, #19243f);
  color: light-dark(#69769c, #eaf0ff);
}
:root:has(.scheme-input:focus-visible) .scheme-toggle {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg0);
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
}

h1 { font-size: 30px; letter-spacing: -0.015em; }
h2 { font-size: 20px; letter-spacing: -0.01em; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }

p { margin: 0 0 1em; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); }
/* links inside written text keep an underline so they read as links */
.prose a, .post-body a { text-decoration: underline; text-underline-offset: 2px; }

b, strong { font-weight: 600; }
strong { color: var(--ink); }

/* no monospace anywhere: code, IDs and figures use the sans with tabular digits */
code, kbd, samp, .mono {
  font-family: inherit;
  font-size: inherit;
  font-variant-numeric: tabular-nums;
}
.tnum { font-variant-numeric: tabular-nums; }

::selection { background: var(--blue); color: var(--on-blue); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--blue);
  color: var(--on-blue);
  font-weight: 600;
  border-radius: var(--r-sm);
}
.skip:focus { left: 12px; top: 12px; }

/* --------------------------------------------------------------------------
   3. Layout helpers
   -------------------------------------------------------------------------- */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { margin-block: 48px; }
.section-tight { margin-block: 28px; }

.cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.layout-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.rail { display: grid; gap: 20px; }

.stack { display: grid; gap: 20px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.section-head h2 { margin: 0; }
.section-head .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section-head .more {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.kicker {
  font-size: 13px;
  font-weight: 500;
  color: var(--blue-ink);
  margin: 0 0 6px;
}

.lede {
  font-size: 15px;
  color: var(--ink-dim);
  max-width: 70ch;
}

/* --------------------------------------------------------------------------
   4. Top bar — one compact utility row above the masthead
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 20px;
  min-height: 44px;
  padding-block: 6px;
}
.topbar a { color: var(--blue); }
.topbar a:hover { color: var(--blue-deep); }
.topbar label { font-weight: 500; }
.topbar-links, .topbar-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar-meta { color: var(--muted); }

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent);
  margin-right: 7px;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--blue) 5%, transparent); }
}

.topbar .topbar-join {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  background: var(--blue);
  color: var(--on-blue);
  font-weight: 500;
}
.topbar .topbar-join:hover { background: var(--blue-deep); color: var(--on-blue); }

/* --------------------------------------------------------------------------
   5. Masthead + nav
   The fixed reference for everything below. Both keep their original faces,
   sizes and line-heights, pinned here so the body type above can't reach them.
   -------------------------------------------------------------------------- */
.masthead {
  font-family: var(--font-mast-body);
  font-size: 15px;
  line-height: 1.6;
}
.masthead-in {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-block: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }

.crest {
  width: 54px;
  height: 54px;
  flex: none;
  filter: drop-shadow(0 6px 18px color-mix(in srgb, var(--blue) 25%, transparent));
  transition: transform 0.25s ease;
}
.brand:hover .crest { transform: rotate(-4deg) scale(1.04); }

/* the brand figure on the masthead's blue, as a small tile (footer, sign-in) */
.crest-tile {
  display: grid;
  justify-items: center;
  align-items: end;
  width: 56px;
  height: 56px;
  border-radius: var(--r);
  background: radial-gradient(circle at 1% 1%, #2a8af6, #0c3f98);
  overflow: hidden;
}
.crest-tile .crest { width: 54px; height: 54px; margin-bottom: -4px; filter: none; }


.brand-name {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
}
.brand-name em {
  font-style: normal;
  color: var(--blue);
}
.brand-sub {
  display: block;
  font-family: var(--font-mast-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--muted);
  margin-top: 4px;
}

.search {
  flex: 1;
  display: flex;
  max-width: 540px;
  margin-left: auto;
}
/* scope: what to search, defaulting to the section you're in */
.search select {
  flex: none;
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-mast-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  background-color: var(--bg3);
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) calc(50% - 1px), calc(100% - 10px) calc(50% - 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  padding: 0 30px 0 14px;
  cursor: pointer;
}
.search select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.search select option { color: #16203a; background: #ffffff; text-transform: none; }
.search select + input { border-radius: 0; }
.search input {
  flex: 1;
  min-width: 0;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-right: 0;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  padding: 10px 14px;
  border-radius: 8px 0 0 8px;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--blue); }
.search button {
  font-family: var(--font-mast-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--bg3);
  color: var(--ink-dim);
  border: 1px solid var(--line);
  padding: 0 16px;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
}
.search button:hover { background: var(--blue); color: var(--on-blue); border-color: var(--blue); }

.mainnav {
  font-size: 15px;
  line-height: 1.6;
  border-block: 1px solid var(--line);
  background: var(--nav-glass);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.mainnav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.mainnav ul::-webkit-scrollbar { display: none; }
.mainnav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-dim);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.mainnav a:hover { color: var(--ink); border-bottom-color: var(--line2); }
.mainnav a.is-active {
  color: var(--blue);
  font-weight: 600;
  border-bottom-color: var(--blue);
}
.nav-badge {
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  background: var(--blue);
  color: var(--on-blue);
  padding: 0 6px;
  border-radius: var(--r-xs);
}

/* --------------------------------------------------------------------------
   6. Transfer ticker
   -------------------------------------------------------------------------- */
.ticker {
  border-bottom: 1px solid var(--line);
  background: var(--bg2);
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.ticker-label {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--blue);
  color: var(--on-blue);
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
}
.ticker-viewport { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker-track {
  display: flex;
  gap: 56px;
  width: max-content;
  padding-left: 24px;
  animation: ticker 70s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker {
  to { transform: translateX(-50%); }
}
.ticker-item {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-dim);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ticker-item b { color: var(--ink); font-weight: 600; }
.ticker-item .tk-in { color: var(--green); }
.ticker-item .tk-out { color: var(--red); }
.ticker-item .tk-fee { color: var(--ink); }

/* --------------------------------------------------------------------------
   7. Buttons, chips, badges
   One button system: 6px corners, sans, medium weight, Title case labels.
   Primary = solid blue; secondary = white with a 1px border.
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  cursor: pointer;
  background: var(--bg2);
  color: var(--ink);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { border-color: var(--blue); color: var(--blue-ink); }

.btn-blue,
.btn-cyan { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.btn-blue:hover,
.btn-cyan:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--on-blue); }

.btn-ghost { background: var(--bg2); border-color: var(--line2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-ink); }

.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-xs { height: 30px; padding: 0 10px; font-size: 13px; }
/* unavailable actions fade back and stop reacting */
.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-block { width: 100%; }

.btn .btn-meta {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.75;
}

/* tags and pills: the same small rounded rectangle as the position badges */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: var(--r-xs);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0;
  text-transform: none;
  background: var(--bg3);
  color: var(--ink-dim);
  border: 1px solid var(--line2);
  white-space: nowrap;
}
.chip-blue {
  background: color-mix(in srgb, var(--blue) 10%, var(--bg2));
  color: var(--blue-ink);
  border-color: color-mix(in srgb, var(--blue) 30%, transparent);
}
/* the other colours keep their meaning (status, category): a light tint of
   the colour, with the label mixed towards the ink so it stays readable */
.chip-cyan, .chip-amber, .chip-green, .chip-red {
  background: color-mix(in srgb, var(--c) 10%, var(--bg2));
  color: color-mix(in srgb, var(--c) 75%, var(--ink));
  border-color: color-mix(in srgb, var(--c) 32%, transparent);
}
.chip-cyan { --c: var(--cyan); }
.chip-amber { --c: var(--amber); }
.chip-green { --c: var(--green); }
.chip-red { --c: var(--red); }

a.chip:hover { border-color: var(--blue); color: var(--blue-ink); }

/* --------------------------------------------------------------------------
   8. Cards / tiles — white, 1px grey-blue border, 8px radius, no shadow
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
/* a card holding a dropdown must not clip it */
.card:has(.menu) { overflow: visible; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.card-head h3, .card-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-head .more {
  font-size: 13px;
  font-weight: 500;
}
.card-body { padding: 16px; }
.card-body > :last-child { margin-bottom: 0; }
.card-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* link tile */
.tile {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  color: var(--ink);
  transition: border-color 0.15s ease;
  position: relative;
}
.tile:hover {
  border-color: var(--blue);
  color: var(--ink);
}

.tile-art {
  height: 120px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 600;
  color: var(--blue-ink);
  background: var(--bg3);
  border-bottom: 1px solid var(--line);
}
.tile-body { padding: 16px; display: grid; gap: 6px; }
.tile-body h3 { margin: 0; font-size: 16px; }
.tile-body p { margin: 0; color: var(--muted); font-size: 13px; }
.tile-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: auto;
  padding: 12px 16px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.tile-meta b { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   9. Hero + page header — flat, on the page background
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: 40px 12px;
}
.hero > .wrap { position: relative; z-index: 1; }

.hero-title { font-size: 32px; margin-bottom: 10px; }
.hero-title em { font-style: normal; color: var(--blue); }
.hero-lede { font-size: 16px; color: var(--ink-dim); max-width: 62ch; }
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  align-items: center;
}
.hero-note {
  font-size: 13px;
  color: var(--muted);
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 28px;
}
/* stat figures: one size, one colour */
.stat-num {
  display: block;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
}

/* staggered load-in */
.hero .kicker, .hero .hero-title, .hero .hero-lede,
.hero .hero-actions, .hero .hero-stats, .hero .hero-aside {
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero .hero-title { animation-delay: 0.05s; }
.hero .hero-lede { animation-delay: 0.1s; }
.hero .hero-actions { animation-delay: 0.15s; }
.hero .hero-stats { animation-delay: 0.2s; }
.hero .hero-aside { animation-delay: 0.15s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

/* compact page header for inner pages */
.pagehead {
  padding-block: 28px 0;
  position: relative;
}
.pagehead h1 { margin-bottom: 6px; }
.pagehead .lede { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   10. Breadcrumbs / pagination / notes
   -------------------------------------------------------------------------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
}
.crumbs li { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.crumbs li + li::before { content: "/"; color: var(--line2); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue); }

.pagination {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  margin-top: 24px;
}
.pagination a, .pagination span {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding-inline: 10px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  color: var(--ink-dim);
  font-weight: 500;
}
.pagination a:hover { border-color: var(--blue); color: var(--blue-ink); }
.pagination .is-current { background: var(--blue); color: var(--on-blue); border-color: var(--blue); font-weight: 600; }
.pagination .gap { background: transparent; border: 0; color: var(--muted); min-width: 20px; padding-inline: 2px; }

/* notices: a boxed message tinted with its colour — amber by default,
   blue for information, green for success, red for errors. The bold lead
   runs on into the text. */
.alert {
  --c: var(--amber);
  display: block;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--c) 8%, var(--bg2));
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink-dim);
  margin-block: 16px;
}
.alert b { color: color-mix(in srgb, var(--c) 70%, var(--ink)); font-weight: 600; }
.alert p { margin: 0; }
.alert-blue { --c: var(--blue); }
.alert-red { --c: var(--red); }

/* --------------------------------------------------------------------------
   11. Tables
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  padding: 10px 12px;
  background: var(--bg1);
  border-bottom: 1px solid var(--line2);
  white-space: nowrap;
}
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tbody tr { transition: background 0.15s ease; }
.table tbody tr:hover { background: color-mix(in srgb, var(--blue) 4%, transparent); }
.table tbody tr:last-child td { border-bottom: 0; }

.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
th.num { text-align: right; }
.num-strong { color: var(--blue-ink); font-weight: 600; }

.cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-main .sub { display: block; font-size: 12px; color: var(--muted); }
.cell-main a { color: var(--ink); font-weight: 500; }
.cell-main a:hover { color: var(--blue); }

/* league table row states */
.row-champ td { background: color-mix(in srgb, var(--blue) 5%, transparent); }
.row-champ td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.row-cl td:first-child { box-shadow: inset 3px 0 0 var(--cyan); }
.row-el td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.row-rel td { background: color-mix(in srgb, var(--red) 4.5%, transparent); }
.row-rel td:first-child { box-shadow: inset 3px 0 0 var(--red); }

.mv { font-size: 12px; font-variant-numeric: tabular-nums; }
.mv-up { color: var(--blue); }
.mv-down { color: var(--red); }
.mv-same { color: var(--muted); }

/* position badges (FM-style) — kept as they were, in the one sans */
.pos-chip {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  padding: 3px 7px;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--bg3);
  border: 1px solid var(--line2);
  clip-path: var(--notch-sm);
  color: var(--ink-dim);
  white-space: nowrap;
}
.pos-gk { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.pos-def { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 40%, transparent); }
.pos-mid { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, transparent); }
.pos-att { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }

/* form pips (W D L) */
.form-pips { display: inline-flex; gap: 3px; }
.form-pips i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  border-radius: var(--r-xs);
  background: var(--bg3);
  color: var(--muted);
}
.form-pips .w { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.form-pips .d { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.form-pips .l { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }

/* --------------------------------------------------------------------------
   12. Avatars, crests, flags
   -------------------------------------------------------------------------- */
.avatar {
  --av: var(--cyan);
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: light-dark(color-mix(in srgb, var(--av) 54%, #1c2a4d), var(--av));
  background: color-mix(in srgb, var(--av) 15%, var(--accent-surface));
  border: 1px solid color-mix(in srgb, var(--av) 38%, transparent);
}
.avatar-sm { width: 26px; height: 26px; font-size: 10px; border-radius: 7px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; border-radius: 14px; }
.avatar-xl { width: 92px; height: 92px; font-size: 30px; border-radius: 18px; }

.crest-mono {
  --c1: var(--bg3);
  --c2: var(--ink);
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--c2);
  background: linear-gradient(135deg, var(--c1) 50%, color-mix(in srgb, var(--c1) 72%, black) 50%);
  border: 1px solid var(--line2);
  border-radius: 8px 8px 12px 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.crest-mono-lg { width: 72px; height: 72px; font-size: 22px; border-radius: 14px 14px 22px 22px; }

.flag {
  display: inline-block;
  width: 30px;
  height: 20px;
  flex: none;
  border-radius: 3px;
  border: 1px solid var(--flag-border);
  box-shadow: var(--flag-shadow);
}
.flag-lg { width: 64px; height: 42px; border-radius: 6px; }
.flag-eng {
  background:
    linear-gradient(90deg, transparent calc(50% - 11%), #d6273a calc(50% - 11%) calc(50% + 11%), transparent 0),
    linear-gradient(0deg, transparent calc(50% - 16%), #d6273a calc(50% - 16%) calc(50% + 16%), transparent 0),
    #f4f6fb;
}
.flag-fra { background: linear-gradient(90deg, #2a4d9b 33.4%, #f4f6fb 33.4% 66.7%, #e0364a 66.7%); }
.flag-esp { background: linear-gradient(0deg, #d6273a 25%, #f7c948 25% 75%, #d6273a 75%); }
.flag-bra { background: radial-gradient(circle at 50% 50%, #2a4d9b 0 28%, #f7c948 28% 52%, #1f9d4d 52%); }
.flag-arg { background: linear-gradient(0deg, #7fc4e8 33%, #f4f6fb 33% 67%, #7fc4e8 67%); }
.flag-ger { background: linear-gradient(0deg, #f7c948 33%, #d6273a 33% 67%, #1a1a1a 67%); }
.flag-ned { background: linear-gradient(0deg, #2a4d9b 33%, #f4f6fb 33% 67%, #d6273a 67%); }
.flag-por { background: linear-gradient(90deg, #1f9d4d 40%, #d6273a 40%); }
.flag-swe {
  background:
    linear-gradient(90deg, transparent calc(38% - 8%), #f7c948 calc(38% - 8%) calc(38% + 8%), transparent 0),
    linear-gradient(0deg, transparent calc(50% - 14%), #f7c948 calc(50% - 14%) calc(50% + 14%), transparent 0),
    #2a4d9b;
}
.flag-ecu { background: linear-gradient(0deg, #d6273a 25%, #2a4d9b 25% 50%, #f7c948 50%); }
.flag-gre { background: repeating-linear-gradient(0deg, #2a4d9b 0 11%, #f4f6fb 11% 22%); }
.flag-mex { background: linear-gradient(90deg, #1f7a4d 33%, #f4f6fb 33% 67%, #d6273a 67%); }
.flag-usa {
  background:
    linear-gradient(135deg, #2a4d9b 0 38%, transparent 38%),
    repeating-linear-gradient(0deg, #d6273a 0 14%, #f4f6fb 14% 28%);
}

/* --------------------------------------------------------------------------
   13. FM attribute boxes & stat bars
   -------------------------------------------------------------------------- */
/* attribute value chips — kept as they were, in the one sans */
.att {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 26px;
  flex: none;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  clip-path: var(--notch-sm);
  background: var(--bg3);
  color: var(--muted);
}
.att-mid { background: color-mix(in srgb, var(--amber) 14%, transparent); color: var(--amber); }
.att-good { background: color-mix(in srgb, var(--cyan) 14%, transparent); color: var(--cyan); }
.att-elite {
  background: color-mix(in srgb, var(--blue) 16%, transparent);
  color: var(--att-elite-ink);
  text-shadow: 0 0 12px light-dark(color-mix(in srgb, var(--blue) 25%, transparent), color-mix(in srgb, var(--blue) 55%, transparent));
}

.att-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.att-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-dim);
}
.att-list li:last-child { border-bottom: 0; }
.att-list li:hover { background: color-mix(in srgb, var(--blue) 3%, transparent); color: var(--ink); }
.att-list .att-name { flex: 1; }

.att-col h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line2);
  margin-bottom: 4px;
}

.bar {
  flex: 1;
  height: 6px;
  background: var(--bg3);
  border-radius: 99px;
  overflow: hidden;
  min-width: 60px;
}
.bar b {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--blue);
}

.stars {
  font-size: 0.92rem;
  letter-spacing: 2px;
  color: var(--blue);
  white-space: nowrap;
}
.stars .off { color: var(--line2); }
.stars-pa { color: var(--amber); }

/* key-value list */
.kv {
  display: grid;
  gap: 0;
  margin: 0;
}
.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   14. Feeds (compact list rows in cards)
   -------------------------------------------------------------------------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.feed-item:last-child { border-bottom: 0; }
.feed-item:hover { background: color-mix(in srgb, var(--blue) 3%, transparent); }
.feed-main { min-width: 0; flex: 1; }
.feed-main a { color: var(--ink); font-weight: 600; font-size: 14px; line-height: 1.35; display: block; }
.feed-main a:hover { color: var(--blue); }
.feed-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.feed-time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
  margin-left: auto;
  flex: none;
}

/* --------------------------------------------------------------------------
   15. Forums
   -------------------------------------------------------------------------- */
.forum-group { margin-bottom: 32px; }
.forum-group-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 0 4px 10px;
}
.forum-group-head h2 { margin: 0; font-size: 18px; }
.forum-group-head small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.forum-list {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg2);
}
.forum-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 90px 90px 220px;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.forum-row:last-child { border-bottom: 0; }
.forum-row:hover { background: color-mix(in srgb, var(--blue) 3.5%, transparent); color: var(--ink); }

.forum-ico {
  --c: var(--cyan);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 600;
  color: light-dark(color-mix(in srgb, var(--c) 54%, #1c2a4d), var(--c));
  background: color-mix(in srgb, var(--c) 13%, var(--accent-surface));
  border: 1px solid color-mix(in srgb, var(--c) 33%, transparent);
  border-radius: var(--r);
}
.forum-main strong { display: block; font-size: 15px; }
.forum-row:hover .forum-main strong { color: var(--blue); }
.forum-main small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.forum-nums { text-align: right; }
.forum-nums .n {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}
.forum-nums small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.forum-last { font-size: 13px; color: var(--muted); min-width: 0; }
.forum-last b {
  display: block;
  color: var(--ink-dim);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.forum-row:hover .forum-last b { color: var(--blue); }

/* topic rows in a category */
.topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 90px 190px;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.topic-row:last-child { border-bottom: 0; }
.topic-row:hover { background: color-mix(in srgb, var(--blue) 3.5%, transparent); color: var(--ink); }
.topic-title-wrap { min-width: 0; }
.topic-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}
.topic-title b { font-size: 14px; font-weight: 600; }
.topic-row:hover .topic-title b { color: var(--blue); }
.topic-by { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.topic-row.is-pinned { background: color-mix(in srgb, var(--blue) 4%, transparent); }
.topic-row.is-pinned .topic-title b::before {
  content: "Pinned · ";
  color: var(--blue-ink);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   16. Posts (topic view) and text inputs
   -------------------------------------------------------------------------- */
.post {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg2);
  margin-bottom: 20px;
}
.post.is-op { border-color: var(--line2); }

.post-side {
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  background: var(--post-side-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.post-user { font-size: 15px; font-weight: 600; }
.post-side .chip { margin-top: 2px; }
.post-stats {
  margin: 10px 0 0;
  width: 100%;
  display: grid;
  gap: 4px;
  font-size: 12px;
}
.post-stats > div { display: flex; justify-content: space-between; gap: 8px; }
.post-stats dt { color: var(--muted); }
.post-stats dd { margin: 0; color: var(--ink-dim); font-variant-numeric: tabular-nums; }

.post-main { display: flex; flex-direction: column; min-width: 0; }
.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.post-anchor { color: var(--muted); font-weight: 600; }
.post-anchor:hover { color: var(--blue); }
.post-body { padding: 20px; flex: 1; }
.post-actions {
  display: flex;
  gap: 18px;
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
}
.post-actions a { color: var(--muted); }
.post-actions a:hover { color: var(--blue); }
.post-actions .react { color: var(--ink-dim); }

.quote {
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  background: var(--bg1);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-dim);
}
.quote cite {
  display: block;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.quote p:last-child { margin-bottom: 0; }

/* reply box */
.reply-box textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  padding: 12px;
}
.reply-box textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 15%, transparent); }

.input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
  padding: 8px 11px;
}
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 15%, transparent); }
.input:disabled { background: var(--bg1); color: var(--muted); cursor: not-allowed; }

/* file picker: the selector reads as the primary button */
input[type="file"] {
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  max-width: 100%;
}
input[type="file"]::file-selector-button {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  height: 38px;
  padding: 0 16px;
  margin-right: 12px;
  border: 1px solid var(--blue);
  border-radius: var(--r-sm);
  background: var(--blue);
  color: var(--on-blue);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
input[type="file"]::file-selector-button:hover { background: var(--blue-deep); border-color: var(--blue-deep); }

/* --------------------------------------------------------------------------
   17. Download page and file rows
   -------------------------------------------------------------------------- */
.dl-card {
  border: 1px solid var(--line);
  background: var(--bg2);
  border-radius: var(--r);
  padding: 24px;
  display: grid;
  gap: 16px;
}
.dl-file {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-dim);
  flex-wrap: wrap;
}
.dl-file .ext {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  background: color-mix(in srgb, var(--blue) 10%, var(--bg2));
  border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent);
  border-radius: var(--r-sm);
  color: var(--blue-ink);
  font-weight: 600;
  font-size: 12px;
}
.dl-file b { color: var(--ink); font-size: 14px; font-weight: 600; }
.dl-file small { display: block; color: var(--muted); font-size: 13px; }

.dl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* record bar W/D/L */
.record {
  display: flex;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--bg3);
}
.record .rw { background: var(--green); }
.record .rd { background: var(--amber); }
.record .rl { background: var(--red); }
.record-legend {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.record-legend .rw { color: var(--green); }
.record-legend .rd { color: var(--amber); }
.record-legend .rl { color: var(--red); }

/* --------------------------------------------------------------------------
   18. Formation pitch — kept as it was, in the one sans
   -------------------------------------------------------------------------- */
.pitch {
  position: relative;
  aspect-ratio: 68 / 92;
  border-radius: var(--r);
  border: 1px solid rgba(236, 248, 255, 0.18);
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent 0 11.5%, rgba(255, 255, 255, 0.025) 11.5% 23%),
    radial-gradient(360px 220px at 50% 0%, rgba(255, 255, 255, 0.05), transparent 70%),
    var(--pitch);
}
/* markings: halfway line + centre circle */
.pitch::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, transparent calc(50% - 1px), var(--pitch-line) calc(50% - 1px) calc(50% + 1px), transparent 0),
    radial-gradient(circle at 50% 50%, transparent 51px, var(--pitch-line) 51px 53px, transparent 53px);
  pointer-events: none;
}
.pitch .box-t, .pitch .box-b {
  position: absolute;
  left: 22%;
  width: 56%;
  height: 16%;
  border: 2px solid var(--pitch-line);
  pointer-events: none;
}
.pitch .box-t { top: -2px; border-top: 0; }
.pitch .box-b { bottom: -2px; border-bottom: 0; }

.spot {
  --x: 50%;
  --y: 50%;
  --c: var(--blue);
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  z-index: 2;
}
.spot i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-family: var(--font-sans);
  font-size: 0.66rem;
  font-weight: 700;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--on-blue);
  background: var(--c);
  border-radius: 50%;
  border: 2px solid rgba(7, 11, 20, 0.55);
  box-shadow: 0 6px 16px -4px color-mix(in srgb, var(--c) 60%, transparent);
}
.spot.spot-cyan { --c: var(--cyan); }
.spot.spot-dim { --c: #3a4a74; }
.spot.spot-dim i { color: #dfe6f5; }
.spot small {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(234, 240, 255, 0.85);
  background: rgba(7, 11, 20, 0.65);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   19. Timeline
   -------------------------------------------------------------------------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 30px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line2);
}
.tl-month {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 12px;
  position: relative;
}
.tl-month:first-child { margin-top: 0; }
.tl-month::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
}
.tl-item { position: relative; margin-bottom: 16px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 22px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg0);
  border: 2px solid var(--st, var(--line2));
}
.tl-item.st-ok { --st: var(--blue); }
.tl-item.st-pending { --st: var(--amber); }
.tl-item.st-no { --st: var(--red); }

.tl-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg2);
  padding: 16px;
  transition: border-color 0.15s ease;
}
.tl-card:hover { border-color: var(--line2); }
.tl-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.tl-head time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin-left: auto;
}
.tl-card h3 { font-size: 15px; margin-bottom: 6px; }
.tl-card p { font-size: 14px; color: var(--ink-dim); margin-bottom: 10px; }

.tl-diff {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-bottom: 10px;
}
.tl-diff .old { color: var(--muted); text-decoration: line-through; }
.tl-diff .arr { color: var(--muted); }
.tl-diff .new { color: var(--blue-ink); font-weight: 600; }

.tl-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.tl-foot .votes { font-size: 12px; font-variant-numeric: tabular-nums; margin-left: auto; }
.tl-foot .votes b { color: var(--ink); }

/* --------------------------------------------------------------------------
   20. Article / prose
   -------------------------------------------------------------------------- */
.prose { font-size: 15px; color: var(--ink-dim); }
.prose p { margin-bottom: 1.1em; }
.prose h2 { font-size: 20px; margin: 1.6em 0 0.5em; color: var(--ink); }
.prose h3 { font-size: 16px; margin: 1.4em 0 0.4em; color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--blue); }
.prose blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--blue);
  background: var(--bg1);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 16px;
  color: var(--ink);
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose code {
  background: var(--bg3);
  border: 1px solid var(--line2);
  border-radius: var(--r-xs);
  padding: 1px 6px;
  font-size: 0.92em;
  color: var(--ink);
}
.prose .check li::marker { content: "✓  "; color: var(--blue); }

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 0;
}
.article-meta b { color: var(--ink-dim); }

.byline { display: flex; align-items: center; gap: 10px; }

/* blog cards */
.post-card { text-align: left; }
.post-card .tile-art { font-size: 20px; }
.post-card time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.feature-post {
  position: relative;
  display: grid;
  align-content: end;
  gap: 10px;
  min-height: 320px;
  padding: 28px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  overflow: hidden;
  color: var(--ink);
  background: var(--bg2);
}
.feature-post h2 { font-size: 24px; margin: 0; }
.feature-post:hover h2 { color: var(--blue); }
.feature-post p { margin: 0; color: var(--ink-dim); max-width: 60ch; }

/* --------------------------------------------------------------------------
   21. Steps / leaderboard / misc widgets
   -------------------------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.steps li::before {
  content: counter(step);
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-ink);
  line-height: 1;
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--blue) 10%, var(--bg2));
  border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent);
  border-radius: var(--r-sm);
}
.steps b { display: block; font-size: 15px; }
.steps p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.lb { list-style: none; margin: 0; padding: 0; }
.lb li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.lb li:last-child { border-bottom: 0; }
.lb-rank {
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  width: 26px;
  flex: none;
  text-align: center;
}
.lb b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .n { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink); }

/* discord / promo panel */
.promo {
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--bg2);
  padding: 20px;
}
.promo h3 { font-size: 16px; }
.promo p { font-size: 14px; color: var(--ink-dim); }

/* filter chip row */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}
.filters .lbl {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-right: 4px;
}

/* tab bars match the main nav: text tabs, 2px blue underline on the active one */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 10px 14px;
  margin-bottom: -1px;
  font-size: 15px;
  color: var(--ink-dim);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.tabs a:hover { color: var(--ink); border-bottom-color: var(--line2); }
.tabs .is-active { color: var(--blue); font-weight: 600; border-bottom-color: var(--blue); }

/* details/summary FAQ — no JS accordion */
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg2);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { border-bottom: 1px solid var(--line); color: var(--blue); }
.faq .faq-body { padding: 14px 16px; font-size: 14px; color: var(--ink-dim); }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* stat strip */
.scoreline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg2);
}
.scoreline > div {
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}
.scoreline > div:last-child { border-right: 0; }

/* --------------------------------------------------------------------------
   22. Footer
   -------------------------------------------------------------------------- */
/* footer is the dark brand bookend in BOTH themes — it takes the dark half
   of every token, and a few are pinned */
.footer {
  color-scheme: dark;
  --ink: #eaf0ff;
  --ink-dim: #b3bedd;
  --muted: #7d89ad;
  --line: #232f4e;
  --line2: #31426b;
  --blue: #4da3ff;
  margin-top: 90px;
  border-top: 1px solid #1a2440;
  background: linear-gradient(180deg, #0c1322, #070b14);
  position: relative;
  overflow: hidden;
}
.footer-watermark {
  position: absolute;
  left: 50%;
  bottom: -0.22em;
  transform: translateX(-50%);
  font-weight: 600;
  font-size: clamp(64px, 12vw, 176px);
  letter-spacing: 0.02em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--blue) 10%, transparent);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 32px;
  padding-block: 48px 56px;
  position: relative;
  z-index: 1;
}
.footer-brand p {
  font-size: 14px;
  color: var(--muted);
  max-width: 30ch;
}
.footer-brand .crest-tile { margin-bottom: 14px; }
.footer h4 {
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 12px;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { color: var(--ink-dim); font-size: 14px; }
.footer-links a:hover { color: var(--blue); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  position: relative;
  z-index: 1;
}
.footer-bottom a { color: var(--ink-dim); }

/* --------------------------------------------------------------------------
   23. Player profile specifics
   -------------------------------------------------------------------------- */
.profile-head {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.profile-id { display: grid; gap: 6px; }
.profile-id h1 { margin: 0; }
.profile-id .meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--ink-dim);
  font-size: 14px;
}
/* squad number: a plain boxed figure, same size as the other stats */
.shirt-num {
  display: inline-grid;
  place-items: center;
  min-width: 56px;
  height: 56px;
  padding-inline: 10px;
  margin-left: auto;
  flex: none;
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--ink);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.ability-meter { display: grid; gap: 10px; }
.ability-meter .row {
  display: grid;
  grid-template-columns: 110px 1fr 46px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-dim);
}
.ability-meter .n {
  text-align: right;
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   24. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .layout-rail { grid-template-columns: 1fr; }
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-split { grid-template-columns: 1fr; }
  .forum-row { grid-template-columns: 52px minmax(0, 1fr) 90px 200px; }
  .forum-nums:nth-of-type(2) { display: none; }
}

@media (max-width: 800px) {
  .masthead-in { flex-wrap: wrap; gap: 16px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .cols-3 { grid-template-columns: 1fr; }
  .cols-2 { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; }
  .post-side {
    flex-direction: row;
    flex-wrap: wrap;
    text-align: left;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
  }
  .post-stats { display: none; }
  .forum-row { grid-template-columns: 46px minmax(0, 1fr) 80px; }
  .forum-last { display: none; }
  .topic-row { grid-template-columns: minmax(0, 1fr) 70px; }
  .topic-row .t-views, .topic-row .t-last { display: none; }
  .hero { padding-block: 32px 8px; }
  .hero-stats { gap: 28px; }
  .section { margin-block: 40px; }
  h1, .hero-title { font-size: 28px; }
}

@media (max-width: 540px) {
  .cols-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar-links { display: none; }
  .dl-row { flex-direction: column; align-items: stretch; }
  .dl-row .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   25. APPLICATION UI
   Forms, auth/confirmation slabs, dropdown menus, sub-nav, galleries, inbox
   rows, stat tiles, empty states.
   ========================================================================== */

/* 25.1 Forms ---------------------------------------------------------------
   Build forms from .form > .field. Use .form-row to put fields side by side.
   Native controls reuse .input; selects get a custom caret via select.input. */
.form { display: grid; gap: 18px; }
.form-narrow { max-width: 560px; }

.field { display: grid; gap: 6px; }
.field > label,
.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-dim);
}
.field > label .req { color: var(--red); margin-left: 3px; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.field .err {
  font-size: 13px;
  color: var(--red);
  margin: 0;
}
.field.is-error .input,
.field.is-error textarea,
.field.is-error select.input { border-color: var(--red); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }

/* native select with custom caret — matches .input chrome */
select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) calc(50% - 1px),
    calc(100% - 12px) calc(50% - 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select.input:hover { border-color: var(--blue); }
select.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 15%, transparent); }

/* checkbox / radio rows */
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  background: var(--bg2);
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-dim);
  transition: border-color 0.15s ease;
}
.check:hover { border-color: var(--blue); }
.check input { margin: 2px 0 0; accent-color: var(--blue); width: 16px; height: 16px; flex: none; }
.check.is-on { border-color: color-mix(in srgb, var(--blue) 45%, transparent); }
.check .check-main b { color: var(--ink); display: block; font-weight: 500; }
.check .check-main small { color: var(--muted); font-size: 13px; }
.check-group { display: grid; gap: 10px; }
.check-inline { display: flex; flex-wrap: wrap; gap: 10px; }
.check-inline .check { flex: 1 1 200px; }

/* file drop zone: an ordinary bordered surface, no dashed outline */
.dropzone {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg2);
  color: var(--ink-dim);
  font-size: 14px;
}
.dropzone b { color: var(--ink); font-size: 16px; font-weight: 600; }

/* fieldset grouping inside a form */
.fset { border: 0; margin: 0; padding: 0; display: grid; gap: 18px; }
.fset > legend {
  padding: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.form-actions .spacer { flex: 1; }

/* 25.2 Slab — centered narrow column for auth + confirmation pages --------- */
.slab {
  max-width: 460px;
  margin-inline: auto;
  padding-block: 56px;
}
.slab-wide { max-width: 720px; }
.slab .slab-head { text-align: center; margin-bottom: 24px; }
.slab .slab-head .crest-badge {
  width: 56px; height: 56px; margin: 0 auto 16px;
}
.slab .slab-head h1 { font-size: 28px; margin-bottom: 8px; }
.slab .slab-head p { color: var(--ink-dim); margin: 0; }
.slab .slab-alt {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

/* social / oauth buttons: secondary style, full width */
.btn-oauth {
  background: var(--bg2);
  border-color: var(--line2);
  color: var(--ink);
  width: 100%;
}
.btn-oauth:hover { border-color: var(--blue); color: var(--ink); }
.or-rule {
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; font-weight: 500; color: var(--muted); margin: 18px 0;
}
.or-rule::before, .or-rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* 25.3 Dropdown menu — CSS-only via <details> ------------------------------ */
.menu { position: relative; display: inline-block; }
.menu > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  white-space: nowrap;
  user-select: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: "▾"; color: var(--muted); font-size: 0.8em; }
.menu > summary:hover,
.menu[open] > summary { border-color: var(--blue); color: var(--blue-ink); }
.menu-pop {
  position: absolute;
  z-index: 60;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  padding: 4px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow);
  display: grid;
  gap: 1px;
}
.menu-pop.to-right { left: auto; right: 0; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: var(--r-xs);
  background: none;
  font: inherit;
  font-size: 14px;
  text-align: left;
  color: var(--ink-dim);
  white-space: nowrap;
  cursor: pointer;
}
.menu-item:hover { background: color-mix(in srgb, var(--blue) 8%, transparent); color: var(--blue-ink); }
.menu-item.is-active { color: var(--blue-ink); }
.menu-item .badge-n { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.menu-sep { height: 1px; background: var(--line); margin: 4px; }
.menu-label {
  padding: 8px 10px 4px;
  font-size: 12px; font-weight: 500; color: var(--muted);
}
/* icon-only trigger: the ⋯ "more actions" button beside a primary action */
.menu-more > summary {
  justify-content: center;
  width: 32px;
  height: 30px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  color: var(--ink-dim);
}
.menu-more > summary::after { content: none; }

/* 25.4 Sub-nav — section tabs, styled like the main nav --------------------- */
.subnav {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  padding: 10px 14px;
  margin-bottom: -1px;
  font-size: 15px;
  color: var(--ink-dim);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.subnav a:hover { color: var(--ink); border-bottom-color: var(--line2); }
.subnav a.is-active { color: var(--blue); font-weight: 600; border-bottom-color: var(--blue); }
/* a trailing link, not a tab */
.subnav .subnav-end {
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--blue);
}
.subnav .subnav-end:hover { color: var(--blue-deep); border-bottom-color: transparent; }

/* toolbar: filters on the left, controls (sort menu, view toggle) on the right */
.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar .toolbar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.result-count { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.result-count b { color: var(--ink); font-weight: 600; }

/* 25.5 Gallery — thumbnail grid for graphics (faces, kits, logos) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.gallery-sm { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 12px; }
.shot {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg2);
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.shot:hover { border-color: var(--blue); color: var(--ink); }
.shot-img {
  --c1: var(--bg3);
  --c2: var(--bg4);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 600;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
  background:
    radial-gradient(120% 120% at 50% 15%, var(--c1), var(--c2));
  border-bottom: 1px solid var(--line);
  position: relative;
}
.shot-img.is-kit { background: repeating-linear-gradient(90deg, var(--c1) 0 14px, var(--c2) 14px 28px); }
.shot-cap {
  padding: 8px 10px;
  display: grid;
  gap: 2px;
}
.shot-cap b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-cap small { font-size: 12px; color: var(--muted); }

/* 25.6 Inbox / message + notification rows --------------------------------- */
.inbox { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg2); }
.inbox-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.inbox-row:last-child { border-bottom: 0; }
.inbox-row:hover { background: color-mix(in srgb, var(--blue) 3.5%, transparent); color: var(--ink); }
.inbox-row.is-unread { background: color-mix(in srgb, var(--blue) 5.5%, transparent); }
.inbox-row.is-unread .inbox-subject { color: var(--ink); font-weight: 600; }
.inbox-row.is-unread .inbox-subject::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
  margin-right: 8px;
  vertical-align: 1px;
}
.inbox-subject { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-row:hover .inbox-subject { color: var(--blue); }
.inbox-snippet { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.inbox-time { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }

/* 25.7 Stat tiles (compact metric grid) ------------------------------------ */
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.statbox {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg2);
  padding: 16px;
  display: grid;
  gap: 4px;
}
.statbox .statbox-num { font-size: 26px; font-weight: 600; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.statbox .statbox-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.statbox .statbox-sub { font-size: 12px; color: var(--muted); }

/* 25.8 Empty state + inline confirmation -------------------------------------- */
.empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
  padding: 48px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg2);
}
.empty .empty-ico {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  font-size: 24px;
  border-radius: var(--r);
  background: color-mix(in srgb, var(--blue) 10%, var(--bg2));
  border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent);
  color: var(--blue-ink);
}
.empty h2, .empty h3 { margin: 0; }
.empty p { color: var(--muted); max-width: 46ch; margin: 0; }
.empty .empty-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* status mark for confirmation / result pages */
.status-mark {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  margin: 0 auto;
  font-size: 28px;
  border-radius: 50%;
  border: 2px solid var(--st, var(--blue));
  color: var(--st, var(--blue));
  background: color-mix(in srgb, var(--st, var(--blue)) 10%, transparent);
}
.status-mark.is-ok { --st: var(--green); }
.status-mark.is-warn { --st: var(--amber); }
.status-mark.is-err { --st: var(--red); }

/* 25.9 Small helpers ------------------------------------------------------- */
.muted { color: var(--muted); }
.mono-sm { font-size: 13px; font-variant-numeric: tabular-nums; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack-sm { display: grid; gap: 14px; }
.stack-sm > p { margin: 0; }
.stack-sm > [role="status"]:empty { display: none; }
.divider { height: 1px; background: var(--line); border: 0; margin: 24px 0; }
.cols-2-13 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.6fr); gap: 24px; align-items: start; }

@media (max-width: 800px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .cols-2-13 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   26. EXTRA VARIANTS  (chip/notice variants + more nation flags)
   ========================================================================== */

/* slate reads as the neutral tag */
.chip-slate { background: var(--bg3); color: var(--ink-dim); border-color: var(--line2); }

/* notice variants (amber is the default made explicit) */
.alert-amber { --c: var(--amber); }
.alert-green { --c: var(--green); }

/* additional national flags (World Cup 2026 nations) — same palette as base flags */
.flag-ita { background: linear-gradient(90deg, #1f9d4d 33%, #f4f6fb 33% 66%, #d6273a 66%); }
.flag-bel { background: linear-gradient(90deg, #1a1a1a 33%, #f7c948 33% 66%, #d6273a 66%); }
.flag-nga { background: linear-gradient(90deg, #1f9d4d 33%, #f4f6fb 33% 66%, #1f9d4d 66%); }
.flag-cmr { background: linear-gradient(90deg, #1f9d4d 33%, #d6273a 33% 66%, #f7c948 66%); }
.flag-civ { background: linear-gradient(90deg, #ff9f1c 33%, #f4f6fb 33% 66%, #1f9d4d 66%); }
.flag-pol { background: linear-gradient(0deg, #d6273a 50%, #f4f6fb 50%); }
.flag-aut { background: linear-gradient(0deg, #d6273a 33%, #f4f6fb 33% 66%, #d6273a 66%); }
.flag-egy { background: linear-gradient(0deg, #1a1a1a 33%, #f4f6fb 33% 66%, #d6273a 66%); }
.flag-svk { background: linear-gradient(0deg, #d6273a 33%, #2a4d9b 33% 66%, #f4f6fb 66%); }
.flag-cro { background: linear-gradient(0deg, #2a4d9b 33%, #f4f6fb 33% 66%, #d6273a 66%); }
.flag-srb { background: linear-gradient(0deg, #d6273a 33%, #2a4d9b 33% 66%, #f4f6fb 66%); }
.flag-col { background: linear-gradient(0deg, #d6273a 25%, #2a4d9b 25% 50%, #f7c948 50%); }
.flag-uru { background: linear-gradient(0deg, #7fc4e8 0 25%, #f4f6fb 25% 50%, #7fc4e8 50% 75%, #f4f6fb 75%); }
.flag-can {
  background:
    linear-gradient(90deg, #d6273a 26%, transparent 26% 74%, #d6273a 74%),
    #f4f6fb;
}
.flag-den {
  background:
    linear-gradient(90deg, transparent calc(38% - 7%), #f4f6fb 0 calc(38% + 7%), transparent 0),
    linear-gradient(0deg, transparent calc(50% - 12%), #f4f6fb 0 calc(50% + 12%), transparent 0),
    #d6273a;
}
.flag-ksa { background: #1f7a4d; }

/* ##########################################################################
   PART 2 — site chrome
   ########################################################################## */

/* S1. Brand — the sortitoutsi figure and wordmark, no tile */
/* the figure runs the full height of the masthead: it cancels the masthead's
   20px padding with negative margins, and its remaining 56px margin box is the
   tallest item on the row, so the row (and so the masthead) is sized by it */
.masthead { --mast-pad: 20px; --crest-h: 96px; }
.masthead-in { padding-block: var(--mast-pad); }
.masthead .crest.crest-man {
  height: var(--crest-h);
  width: auto;
  aspect-ratio: 1 / 1;
  margin-block: calc(-1 * var(--mast-pad));
  filter: none;
}
.brand:hover .crest.crest-man { transform: none; }
.crest-mini { width: 20px; height: 20px; flex: none; }
.brand-text { display: grid; gap: 7px; }
.logo-text { display: block; width: auto; height: 27px; }

/* S2. Top bar — selects match the form dropdowns */
/* any select in the utility bar matches the form dropdowns: same border,
   radius and caret */
.topbar select {
  appearance: none;
  -webkit-appearance: none;
  max-width: min(340px, 60vw);
  height: 28px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background-color: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  padding: 0 28px 0 10px;
  cursor: pointer;
  text-overflow: ellipsis;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) calc(50% - 1px), calc(100% - 10px) calc(50% - 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.topbar select:hover { border-color: var(--blue); }
.topbar select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* screen-reader-only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 800px) {
  /* the search wraps to a second row here, so the figure spans the top row only */
  .masthead { --crest-h: 80px; }
  .masthead .crest.crest-man { margin-block-end: 0; }
  .logo-text { height: 22px; }
}

/* S3. Masthead — the 2020 site header's background under the new layout:
   its corner-lit radial gradient (nudged towards this design's blues) and the
   ladder-right.svg stripes at 5%. Same in both themes. The logos keep their
   own colours; the search and strapline go translucent white on the blue. */
.masthead {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 1% 1%, #2a8af6, #0c3f98);
  border-bottom: 1px solid transparent;
}
.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(ladder-right.svg);
  opacity: 0.05;
  pointer-events: none;
}
.masthead-in { position: relative; z-index: 1; }
.masthead .brand-sub { color: rgba(255, 255, 255, 0.72); }
.masthead .search input {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}
.masthead .search input::placeholder { color: rgba(255, 255, 255, 0.72); }
.masthead .search input:focus { border-color: #ffffff; }
.masthead .search select,
.masthead .search button {
  background-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}
.masthead .search select:hover { background-color: rgba(255, 255, 255, 0.24); }
.masthead .search button:hover {
  background: #ffffff;
  color: #0d3b8c;
  border-color: #ffffff;
}
.masthead :focus-visible { outline-color: #ffffff; }

/* --------------------------------------------------------------------------
   27. Careers — save in review (career.review.html)
   A club-coloured summary band, stat tiles, and a trophy cabinet drawn in
   CSS. Each trophy stands on its own plank, so planks butt up into one shelf
   and every wrapped row gets a shelf of its own. Trophy art is an <img>.
   -------------------------------------------------------------------------- */
/* club banners: one per club managed, sharing the row equally (one club is
   full width, two are halves, and so on) and wrapping when they get narrow */
.save-heroes {
  --n: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(max(200px, calc(100% / var(--n) - 12px)), 1fr));
  gap: 12px;
}

.save-hero {
  --c1: var(--blue-deep);
  --c2: var(--blue);
  --ct: #ffffff;
  display: grid;
  grid-template-rows: auto auto 1fr auto;   /* eyebrow, name, sub, foot pinned to the bottom */
  gap: 0;
  min-width: 0;
  padding: 22px 24px 18px;
  border-radius: var(--r);
  border: 1px solid color-mix(in srgb, var(--c1) 70%, var(--line));
  color: var(--ct);
  background:
    radial-gradient(90% 140% at 100% 0%, color-mix(in srgb, var(--ct) 14%, transparent), transparent 60%),
    linear-gradient(135deg, var(--c1), var(--c2));
}

.save-hero .eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.82;
  margin-bottom: 6px;
}

.save-hero h2 { margin: 0; font-size: clamp(20px, 2.4vw, 30px); line-height: 1.1; color: inherit; overflow-wrap: anywhere; }
.save-hero .hero-sub { margin-top: 6px; font-size: 13px; opacity: 0.88; }
.save-hero .hero-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--ct) 26%, transparent);
}

.save-hero .hero-foot img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.35));
}

.save-hero .hero-foot b {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.save-hero .hero-foot span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.82;
}

.save-hero .hero-foot .chip {
  margin-left: auto;
  color: inherit;
  background: color-mix(in srgb, var(--ct) 16%, transparent);
  border-color: color-mix(in srgb, var(--ct) 36%, transparent);
}

.save-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 26px;
}

.save-chips .chip { font-size: 13px; padding: 5px 10px; gap: 7px; }

/* stat tiles: a double-width record tile, and a value with a small unit */
.statbox-wide { grid-column: span 2; }
.statbox .statbox-num small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 8px 0 3px;
}

.statbox .statbox-num small:last-child { margin-right: 0; }
.statbox .record { margin-top: 6px; }

/* the wide tiles (record, goals, transfers) take a row of their own above the small ones */
.statgrids { display: grid; gap: 16px; }
.statgrid-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.statgrid-wide .statbox-wide { grid-column: auto; }

/* a wide tile's headline row: the numbers on the left, one big figure on the right */
.statbox-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.statbox-pct { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.statbox-pct b { font-size: 26px; font-weight: 700; line-height: 1.15; color: var(--green); font-variant-numeric: tabular-nums; }
.statbox-pct small { font-size: 12px; font-weight: 500; color: var(--muted); }
.statbox-pct.is-down b { color: var(--red); }
.statbox-pct.is-up b { color: var(--green); }
.statbox .statbox-num small:last-child { margin-right: 0; }
.record .ri { background: var(--blue); }
.record .ro { background: var(--amber); }

/* a card whose body is a table: cells align with the card's own padding */
.card-table .table-wrap { margin: 0; }
.card-table .table th:first-child, .card-table .table td:first-child { padding-left: 16px; }
.card-table .table th:last-child, .card-table .table td:last-child { padding-right: 16px; }
.card-subhead {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 16px; font-size: 13px; font-weight: 600; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.card-note { padding: 10px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }

/* the cabinet: a wood case with a crown and plinth, a dark lined interior
   lit from above, thick shelves, brass plaques and a glass front */
.cabinet-wrap {
  --wood: light-dark(#9c6b3c, #4a2f1b);
  --wood-hi: light-dark(#c69463, #6a4529);
  --wood-lo: light-dark(#6b4423, #2a1a0e);
  --brass: light-dark(#d9b56a, #c9a455);
  --brass-ink: #3a2a0c;
  --interior: light-dark(#222c44, #0a0f1d);
  position: relative;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, var(--wood-hi), var(--wood) 28%, var(--wood) 72%, var(--wood-lo));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 14px 28px -14px rgba(0, 0, 0, 0.55);
}

/* crown moulding and plinth */
.cabinet-wrap::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 6px;
  bottom: 6px;
  pointer-events: none;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.cabinet-case {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 224, 170, 0.14), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 48px),
    var(--interior);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    inset 0 10px 24px -8px rgba(0, 0, 0, 0.8),
    inset 0 -8px 18px -10px rgba(0, 0, 0, 0.7);
}

/* the glass front: a single pane with two reflections */
.cabinet-case::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(108deg, transparent 6%, rgba(255, 255, 255, 0.09) 10%, rgba(255, 255, 255, 0.03) 24%, transparent 30%),
    linear-gradient(108deg, transparent 56%, rgba(255, 255, 255, 0.09) 60%, rgba(255, 255, 255, 0.03) 74%, transparent 80%);
}

/* door handles: the case is a single pane now, so these stay hidden */
.cabinet-handles { display: none; }
.cabinet-handles-old {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 22px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background:
    linear-gradient(180deg, #f3dc9a, var(--brass) 45%, #8a6a28) left center / 7px 100% no-repeat,
    linear-gradient(180deg, #f3dc9a, var(--brass) 45%, #8a6a28) right center / 7px 100% no-repeat;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6));
}

/* bays flex so a short last row still runs wall to wall */
.cabinet {
  list-style: none;
  margin: 0;
  padding: 10px 10px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

/* each bay: a downlight on the trophy, then the shelf, then its plaque */
.cabinet .trophy {
  flex: 1 1 132px;
  min-width: 0;
  display: grid;
  gap: 0;
  align-content: start;
  padding-bottom: 20px;
  background: radial-gradient(55% 60% at 50% 0%, rgba(255, 226, 170, 0.22), transparent 70%);
}

.cabinet .trophy-stand {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 24px 8px 16px;
}

/* the shelf: lit top edge, wood body with grain, shaded front, shadow below */
.cabinet .trophy-stand::after {
  content: "";
  position: absolute;
  left: -10px;
  right: -10px;
  bottom: 0;
  height: 16px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0 2px, transparent 2px 9px),
    linear-gradient(180deg,
      color-mix(in srgb, var(--wood-hi) 70%, #fff) 0 2px,
      var(--wood-hi) 2px 5px,
      var(--wood) 5px 11px,
      var(--wood-lo) 11px);
  box-shadow: 0 12px 16px -6px rgba(0, 0, 0, 0.7);
}

/* the shadow the trophy throws on the shelf */
.cabinet .trophy-stand::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 76px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent);
}

.cabinet .trophy-stand img {
  position: relative;
  z-index: 1;
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: -2px;
  filter: drop-shadow(0 8px 6px rgba(0, 0, 0, 0.45));
  transition: transform 0.2s ease;
}

.cabinet .trophy:hover .trophy-stand img { transform: translateY(-6px) scale(1.14); }
.cabinet .trophy-n {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: calc(50% + 26px);
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.cabinet .trophy-n small { font-size: 11px; font-weight: 500; opacity: 0.8; margin-left: 1px; }

/* brass plaque under the shelf */
.cabinet .trophy-cap {
  justify-self: center;
  display: grid;
  gap: 1px;
  margin: 10px 6px 0;
  padding: 5px 10px;
  max-width: 100%;
  text-align: center;
  border-radius: 3px;
  color: var(--brass-ink);
  background: linear-gradient(180deg, #f1d894, var(--brass) 55%, #a98738);
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 2px 4px rgba(0, 0, 0, 0.5);
}

.cabinet .trophy-cap b {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  color: inherit;
}

.cabinet .trophy-cap small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* segmented view toggle, same look as the theme switch in the top bar */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
}

.seg button {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 22px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.seg button:hover { color: var(--ink); }
.seg button.is-active { background: var(--bg3); color: var(--ink); }

/* the cabinet's controls sit on a bar above the case: club filter, then the view toggle */
.cabinet-bar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.cabinet-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cabinet-tools select.input { width: auto; padding: 3px 30px 3px 10px; font-size: 13px; line-height: 20px; }
.cabinet-empty {
  flex: 1;
  padding: 40px 16px 48px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

/* every win shown: smaller bays so 74 trophies fit the case */
.cabinet.is-all .trophy { flex-basis: 118px; }
.cabinet.is-all .trophy-stand { padding-top: 14px; }
.cabinet.is-all .trophy-stand img { width: 72px; height: 72px; }
.cabinet.is-all .trophy-stand::before { width: 56px; }
.cabinet.is-all .trophy-cap { margin-top: 8px; padding: 3px 7px; }
.cabinet.is-all .trophy-cap b { font-size: 10px; }

/* a season managed at two clubs shares its number and season cells, which
   stay neutral rather than taking the first spell's row tint */
.table td[rowspan] { background: transparent; box-shadow: none; }

/* a season's wins, inline: small trophy art plus name */
.win-list { display: flex; flex-wrap: wrap; gap: 6px; min-width: 460px; }
.win {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 3px;
  border-radius: var(--r-xs);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-dim);
  background: var(--bg3);
  border: 1px solid var(--line2);
}

.win img { width: 18px; height: 18px; object-fit: contain; }

/* nations loaded in the save */
.nation-list { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 640px) {
  .cabinet-handles { display: none; }
}

@media (max-width: 540px) {
  .statbox-wide { grid-column: auto; }
  .save-hero { padding: 20px; }
  .save-hero h2 { font-size: 26px; }
}

/* --------------------------------------------------------------------------
   28. Careers — hall of fame variants (hall-of-fame/career.review.*.html)
   One block per human manager found in a save, each with its own banners,
   stat tiles, cabinet, seasons (with a Best XI), clubs, transfers and awards.
   -------------------------------------------------------------------------- */
.hof-stack { gap: 40px; }
.hof-career { display: grid; gap: 20px; scroll-margin-top: 16px; }
.hof-career .save-heroes { margin-top: 4px; }
.hof-head { margin-bottom: 0; }
.hof-head h2 { font-size: 22px; }
.statbox .statbox-num.is-missing { color: var(--muted); }

/* a season with no club */
.row-gap td { color: var(--muted); }
.row-gap .cell-main .muted { font-style: italic; }

/* best XI: opened from the season row into a dialog, so the page keeps its scroll */
.xi-modal {
  width: min(820px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line2);
  border-radius: var(--r);
  background: var(--bg2);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.xi-modal::backdrop { background: rgba(7, 11, 20, 0.6); }
.xi-modal .card-head { gap: 10px; }
.xi-modal .card-head h3 { font-size: 16px; flex: 1; min-width: 0; }
.xi-modal .xi-nav { display: flex; gap: 6px; flex: none; }
.xi-modal .xi-prev, .xi-modal .xi-next { width: 32px; padding: 0; font-size: 20px; line-height: 1; }
.xi-body { padding: 16px; }
.xi-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.xi-pitch { width: 250px; }
.xi-pitch .spot { gap: 2px; }
.xi-pitch .spot i { width: 24px; height: 24px; font-size: 0.5rem; border-width: 1px; }
.xi-pitch .spot small { font-size: 0.46rem; padding: 0 4px; }
.xi-modal .card-foot { margin: 0; }

/* transfers: in and out side by side, tables flush with the card */
.xfer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.xfer-grid > div + div { border-left: 1px solid var(--line); }

/* the save facts in two columns */
.kv-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }

.manager-switch { max-width: 320px; }

/* floating contents: plain text, no box, collapsed to one word until opened */
.toc {
  position: fixed;
  z-index: 20;
  /* just left of the content column on wide screens, at the edge otherwise */
  left: max(14px, calc(50% - var(--wrap) / 2 - 232px));
  top: var(--toc-top, 12px);
  max-height: calc(100vh - var(--toc-top, 12px) - 16px);
  max-width: 200px;
  overflow: auto;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.5;
  background: color-mix(in srgb, var(--bg0) 92%, transparent);
  scrollbar-width: thin;
}
.toc summary { cursor: pointer; font-weight: 600; color: var(--muted); list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::before { content: "▸ "; }
.toc[open] > summary::before { content: "▾ "; }
.toc ul { list-style: none; margin: 6px 0 0; padding: 0; }
.toc ul ul { margin: 0 0 4px 12px; }
.toc li { margin: 0; }
.toc a { color: var(--ink-dim); display: inline-block; padding: 1px 0; }
.toc a:hover { color: var(--blue); }
.toc a.is-active { color: var(--blue); font-weight: 600; }
.toc .toc-mgr { display: block; margin-top: 6px; font-weight: 600; color: var(--ink); }
.toc .toc-mgr.is-active { color: var(--blue); }
[id^="m-"], #managers, #save { scroll-margin-top: 16px; }

@media (max-width: 1000px) { .toc { display: none; } }

@media (max-width: 800px) {
  .statgrid-wide { grid-template-columns: 1fr; }
  .xi-grid { grid-template-columns: 1fr; }
  .xfer-grid { grid-template-columns: 1fr; }
  .xfer-grid > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .kv-cols { grid-template-columns: 1fr; }
}

/* ---------- Part 2 ---------- */
/* ==========================================================================
   SUSIE HQ — issue tracker layer
   Loads after ../routes-v2/style.css and uses only its tokens (--bg*, --line*,
   --ink*, --blue…, --r*). Everything here is prefixed .hq-.
   ========================================================================== */

.hq-wrap { max-width: none; padding-inline: 24px; }

/* views (tabs) ----------------------------------------------------------- */
.hq-views { margin: 20px 0 14px; }
.hq-views a { display: inline-flex; align-items: center; gap: 8px; }
.hq-views .badge-n {
  font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums;
  color: var(--muted); background: var(--bg3); border-radius: var(--r-xs); padding: 0 6px; line-height: 18px;
}
.hq-views a.is-active .badge-n { color: var(--blue-ink); background: color-mix(in srgb, var(--blue) 12%, var(--bg2)); }

/* toolbar ---------------------------------------------------------------- */
.hq-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.hq-toolbar .toolbar-end { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hq-search { position: relative; width: 240px; max-width: 100%; }
.hq-search .input { height: 32px; padding: 5px 10px 5px 30px; font-size: 13px; }
.hq-search svg { position: absolute; left: 9px; top: 50%; translate: 0 -50%; width: 14px; height: 14px; color: var(--muted); pointer-events: none; }
.hq-tb-btn.is-on { border-color: color-mix(in srgb, var(--blue) 45%, transparent); color: var(--blue-ink); background: color-mix(in srgb, var(--blue) 8%, var(--bg2)); }
.hq-tb-btn .n {
  font-size: 11px; font-variant-numeric: tabular-nums; min-width: 18px; line-height: 18px; text-align: center;
  border-radius: var(--r-xs); background: var(--blue); color: var(--on-blue);
}
.hq-ico { width: 14px; height: 14px; flex: none; }

/* active filter + sort rules, shown as pills under the toolbar */
.hq-rules { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.hq-rules:empty { display: none; }
.hq-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 10px;
  font: inherit; font-size: 13px; color: var(--blue-ink); cursor: pointer;
  background: color-mix(in srgb, var(--blue) 8%, var(--bg2));
  border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); border-radius: 999px;
}
.hq-pill b { font-weight: 600; }
.hq-pill .x {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  border: 0; background: none; color: inherit; cursor: pointer; font-size: 14px; line-height: 1;
}
.hq-pill .x:hover { background: color-mix(in srgb, var(--blue) 16%, transparent); }
.hq-pill-sort { color: var(--ink-dim); background: var(--bg2); border-color: var(--line2); }
.hq-pill-sort .x:hover { background: var(--bg3); }
.hq-rules .hq-link { font-size: 13px; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 0 6px; font: inherit; font-size: 13px; }
.hq-rules .hq-link:hover { color: var(--blue); }

/* bulk bar --------------------------------------------------------------- */
.hq-bulk {
  display: none; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; padding: 6px 8px 6px 14px;
  background: color-mix(in srgb, var(--blue) 7%, var(--bg2)); border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); border-radius: var(--r-sm);
  font-size: 13px; color: var(--blue-ink);
}
.hq-bulk.is-on { display: flex; }
.hq-bulk b { font-weight: 600; margin-right: 6px; }
.hq-bulk .hq-bulk-end { margin-left: auto; display: flex; gap: 8px; }

/* the grid: spreadsheet-style table -------------------------------------- */
.hq-grid-wrap {
  position: relative; overflow: auto; max-height: max(420px, calc(100vh - 230px));
  background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r);
  overscroll-behavior: contain;
}
.hq-grid-wrap:focus { outline: none; }
.hq-grid-wrap:focus-visible { border-color: var(--blue); }
.hq-grid {
  border-collapse: separate; border-spacing: 0; table-layout: fixed; width: max-content; min-width: 100%;
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.hq-grid th, .hq-grid td {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 0; height: 34px; text-align: left; vertical-align: middle; background: var(--bg2);
}
.hq-grid thead th {
  position: sticky; top: 0; z-index: 3; background: var(--bg1); border-bottom-color: var(--line2);
  font-size: 12px; font-weight: 500; color: var(--muted); user-select: none;
}
.hq-grid tfoot td {
  position: sticky; bottom: 0; z-index: 3; background: var(--bg1); border-top: 1px solid var(--line2); border-bottom: 0;
  font-size: 12px; color: var(--muted);
}
.hq-grid .hq-rowhead, .hq-grid .hq-frz {
  position: sticky; z-index: 2;
}
.hq-grid thead .hq-rowhead, .hq-grid thead .hq-frz, .hq-grid tfoot .hq-rowhead, .hq-grid tfoot .hq-frz { z-index: 4; }
.hq-grid .hq-frz-last { box-shadow: 1px 0 0 var(--line2), 6px 0 8px -6px light-dark(rgba(23, 43, 99, 0.14), rgba(0, 0, 0, 0.5)); }

/* row header (Excel row numbers; a checkbox on hover or when selected) */
.hq-rowhead { left: 0; width: 46px; background: var(--bg1) !important; color: var(--muted); font-size: 11px; text-align: center !important; }
.hq-rowhead .rn { display: block; }
.hq-rowhead input { display: none; margin: 0; width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; }
tr:hover > .hq-rowhead .rn, tr.is-selected > .hq-rowhead .rn, .hq-grid thead .hq-rowhead .rn { display: none; }
tr:hover > .hq-rowhead input, tr.is-selected > .hq-rowhead input, .hq-grid thead .hq-rowhead input { display: inline-block; vertical-align: middle; }

.hq-grid tbody tr:hover > td { background: color-mix(in srgb, var(--blue) 3.5%, var(--bg2)); }
.hq-grid tbody tr.is-selected > td { background: color-mix(in srgb, var(--blue) 8%, var(--bg2)); }
.hq-grid tbody tr.is-open > td { background: color-mix(in srgb, var(--blue) 6%, var(--bg2)); }
.hq-grid tbody tr.is-open > .hq-rowhead { box-shadow: inset 3px 0 0 var(--blue); }

/* header cell */
.hq-th { position: relative; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px 0 10px; cursor: pointer; }
.hq-th:hover { color: var(--ink); background: var(--bg3); }
.hq-th .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hq-th .ty { width: 13px; height: 13px; flex: none; opacity: 0.7; }
.hq-th .sort { margin-left: auto; font-size: 11px; color: var(--blue-ink); display: inline-flex; align-items: center; gap: 1px; }
.hq-th .sort small { font-size: 9px; }
.hq-th .flt { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex: none; }
.hq-th .sort + .flt, .hq-th .flt:first-of-type { margin-left: auto; }
.hq-th .sort + .flt { margin-left: 4px; }
th.is-sorted, th.is-filtered { color: var(--blue-ink); }
.hq-num .hq-th { justify-content: flex-end; }
.hq-num .hq-th .sort { margin-left: 0; order: -1; margin-right: auto; }

.hq-resize {
  position: absolute; top: 0; right: -4px; width: 8px; height: 100%; z-index: 2; cursor: col-resize;
}
.hq-resize:hover, .hq-resize.is-drag { background: linear-gradient(var(--blue), var(--blue)) center / 2px 100% no-repeat; }

/* body cell */
.hq-cell {
  display: flex; align-items: center; gap: 6px; height: 33px; padding: 0 10px; min-width: 0;
  overflow: hidden; white-space: nowrap; cursor: default; outline: none;
}
.hq-cell > .t { overflow: hidden; text-overflow: ellipsis; }
.hq-num .hq-cell { justify-content: flex-end; }
.hq-empty { color: var(--muted); opacity: 0.6; }
td.is-active { box-shadow: inset 0 0 0 2px var(--blue); }
td.is-active.is-ro { box-shadow: inset 0 0 0 2px var(--line2); }
.hq-grid-wrap:not(:focus-within) td.is-active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 50%, transparent); }

/* inline editor: fills the cell */
.hq-cell-edit {
  width: 100%; height: 33px; border: 0; padding: 0 10px; margin: 0; font: inherit; font-size: 13px; color: var(--ink);
  background: var(--bg2); outline: none; box-shadow: inset 0 0 0 2px var(--blue);
}
.hq-num .hq-cell-edit { text-align: right; }

/* title cell: the link (opens the issue) + comment count */
.hq-title { font-weight: 500; color: var(--ink); }
.hq-title-cell { padding-right: 6px; }
.hq-ccount { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; flex: none; font-size: 11px; color: var(--muted); }
.hq-ccount svg { width: 12px; height: 12px; }

.hq-id { font-size: 12px; color: var(--muted); font-weight: 500; }
.hq-date-over { color: var(--red); font-weight: 500; }
.hq-date-soon { color: var(--amber); font-weight: 500; }

.hq-add-row td { height: 34px; }
.hq-add-row button {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 33px; padding: 0 12px;
  border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; text-align: left;
}
.hq-add-row button:hover { color: var(--blue-ink); background: color-mix(in srgb, var(--blue) 4%, transparent); }

.hq-noresults { padding: 48px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.hq-noresults b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* property values ------------------------------------------------------- */
.hq-status { --c: var(--muted); }
.hq-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.hq-status.chip { background: color-mix(in srgb, var(--c) 10%, var(--bg2)); color: color-mix(in srgb, var(--c) 72%, var(--ink)); border-color: color-mix(in srgb, var(--c) 30%, transparent); }
.st-backlog { --c: var(--muted); }
.st-todo { --c: var(--ink-dim); }
.st-progress { --c: var(--blue); }
.st-review { --c: var(--amber); }
.st-done { --c: var(--green); }
.st-cancelled { --c: var(--muted); }
.st-cancelled.chip { text-decoration: line-through; opacity: 0.8; }

.hq-pri { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-dim); }
.hq-pri svg { width: 14px; height: 14px; flex: none; }
.pri-urgent { color: var(--red); font-weight: 500; }
.pri-high { color: color-mix(in srgb, var(--amber) 80%, var(--ink)); }
.pri-none { color: var(--muted); }

.hq-person { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--ink); }
.hq-person .avatar { width: 22px; height: 22px; font-size: 9px; border-radius: 6px; }
.hq-person .t { overflow: hidden; text-overflow: ellipsis; }
.hq-labels { display: flex; gap: 4px; min-width: 0; overflow: hidden; }

/* popovers (filter editor, sort editor, select editors, column menu) ---- */
.hq-pop {
  position: fixed; z-index: 120; min-width: 200px; max-width: min(420px, calc(100vw - 24px)); max-height: min(420px, calc(100vh - 24px));
  overflow: auto; padding: 4px; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r-sm);
  box-shadow: var(--shadow); font-size: 14px;
}
.hq-pop[hidden] { display: none; }
.hq-pop .menu-item { font-size: 13px; padding: 6px 8px; }
.hq-pop .menu-item.is-kb { background: color-mix(in srgb, var(--blue) 8%, transparent); color: var(--blue-ink); }
.hq-pop .menu-item .tick { margin-left: auto; color: var(--blue); font-size: 13px; visibility: hidden; }
.hq-pop .menu-item.is-active .tick { visibility: visible; }
.hq-pop-search { padding: 4px 4px 6px; }
.hq-pop-search .input { height: 30px; padding: 4px 9px; font-size: 13px; }
.hq-pop-body { padding: 10px; display: grid; gap: 10px; }
.hq-pop-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hq-pop-row .input, .hq-pop select.input { height: 30px; padding: 4px 8px; font-size: 13px; width: auto; }
.hq-pop .hint { font-size: 12px; }
.hq-pop-foot { display: flex; gap: 6px; justify-content: space-between; padding: 6px 4px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.hq-pop-foot .btn { height: 28px; padding: 0 10px; font-size: 12px; }
.hq-optlist { display: grid; gap: 1px; max-height: 240px; overflow: auto; }
.hq-optlist label { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: var(--r-xs); cursor: pointer; font-size: 13px; color: var(--ink-dim); }
.hq-optlist label:hover { background: color-mix(in srgb, var(--blue) 6%, transparent); }
.hq-optlist input { accent-color: var(--blue); margin: 0; }
.hq-sortrow { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto 28px; gap: 6px; align-items: center; }
.hq-sortrow .grip { color: var(--muted); font-size: 12px; text-align: center; }
.hq-sortrow select.input { width: 100%; }
.hq-iconbtn {
  display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: var(--r-xs);
  border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 16px; line-height: 1;
}
.hq-iconbtn:hover { background: var(--bg3); color: var(--ink); }
.hq-iconbtn svg { width: 16px; height: 16px; }
.hq-colrow { display: flex; align-items: center; gap: 8px; }
.hq-colrow label { flex: 1; }
.hq-seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--bg3); border-radius: var(--r-sm); }
.hq-seg button { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 500; color: var(--muted); padding: 3px 10px; border-radius: var(--r-xs); cursor: pointer; }
.hq-seg button.is-active { background: var(--bg2); color: var(--ink); box-shadow: 0 1px 2px light-dark(rgba(23, 43, 99, 0.12), rgba(0, 0, 0, 0.4)); }

/* the issue panel: a side peek that can expand to a full page ---------- */
.hq-scrim {
  position: fixed; inset: 0; z-index: 90; background: light-dark(rgba(22, 32, 58, 0.18), rgba(2, 6, 16, 0.55));
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.hq-scrim.is-on { opacity: 1; pointer-events: auto; }
.hq-peek {
  position: fixed; z-index: 100; top: 0; right: 0; bottom: 0; width: min(max(960px, 70vw), 100vw);
  display: flex; flex-direction: column; background: var(--bg2); border-left: 1px solid var(--line2);
  box-shadow: var(--shadow); translate: 100% 0; transition: translate 0.22s ease, width 0.22s ease; visibility: hidden;
}
.hq-peek.is-on { translate: 0 0; visibility: visible; }
.hq-peek.is-full { width: 100vw; border-left: 0; }
.hq-peek-bar {
  display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex: none;
  font-size: 13px; color: var(--muted);
}
.hq-peek-bar .crumb { display: flex; align-items: center; gap: 6px; margin-inline: 6px; min-width: 0; }
.hq-peek-bar .crumb b { color: var(--ink); font-weight: 500; }
.hq-peek-bar .grow { flex: 1; }
.hq-peek-scroll { flex: 1; overflow: auto; overscroll-behavior: contain; }
.hq-peek-in { max-width: 820px; margin-inline: auto; padding: 28px 40px 48px; }
.hq-peek.is-full .hq-peek-in { padding-top: 48px; }

.hq-ptitle {
  display: block; width: 100%; margin: 4px 0 18px; padding: 2px 0; border: 0; resize: none; overflow: hidden; background: none;
  font: inherit; font-size: 28px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); outline: none;
}
.hq-ptitle::placeholder { color: var(--muted); opacity: 0.6; }
.hq-pid { font-size: 13px; font-weight: 500; color: var(--muted); }

.hq-props { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 2px 8px; margin-bottom: 22px; font-size: 14px; }
.hq-props dt { display: flex; align-items: center; gap: 8px; min-height: 34px; color: var(--muted); font-size: 13px; }
.hq-props dt svg { width: 14px; height: 14px; }
.hq-props dd { margin: 0; min-width: 0; }
.hq-pval {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 100%; min-height: 34px; padding: 5px 8px;
  border: 0; border-radius: var(--r-xs); background: none; font: inherit; font-size: 14px; color: var(--ink); text-align: left; cursor: pointer;
}
.hq-pval:hover { background: var(--bg3); }
.hq-pval.is-ro { cursor: default; color: var(--ink-dim); }
.hq-pval.is-ro:hover { background: none; }
.hq-pval input { width: 100%; border: 0; outline: none; background: none; font: inherit; color: inherit; padding: 0; }

.hq-sec { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 4px; }
.hq-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hq-sec-head h3 { margin: 0; font-size: 15px; }
.hq-sec-head .grow { flex: 1; }

.hq-rt code { font-size: 0.88em; padding: 1px 5px; border-radius: var(--r-xs); background: var(--bg3); color: var(--ink); }
.hq-rt strong { color: var(--ink); font-weight: 600; }
.hq-rt .mention { color: var(--blue-ink); font-weight: 500; background: color-mix(in srgb, var(--blue) 9%, transparent); border-radius: var(--r-xs); padding: 0 3px; }
.hq-rt .ref { font-weight: 500; }

/* activity + comments */
.hq-feed { display: grid; gap: 2px; margin: 0 0 16px; padding: 0; list-style: none; }
.hq-ev { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; color: var(--muted); }
.hq-ev .dot { width: 22px; display: grid; place-items: center; flex: none; }
.hq-ev .dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line2); }
.hq-ev b { color: var(--ink-dim); font-weight: 500; }
.hq-ev time { margin-left: auto; white-space: nowrap; font-size: 12px; }
.hq-cmt { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 12px 0; }
.hq-cmt + .hq-cmt, .hq-ev + .hq-cmt, .hq-cmt + .hq-ev { border-top: 1px solid var(--line); }
.hq-cmt .avatar { width: 30px; height: 30px; font-size: 11px; border-radius: 8px; }
.hq-cmt-head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; margin-bottom: 3px; }
.hq-cmt-head b { color: var(--ink); font-weight: 600; }
.hq-cmt-head time, .hq-cmt-head .ed { color: var(--muted); font-size: 12px; }
.hq-cmt-acts { margin-left: auto; display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.hq-cmt:hover .hq-cmt-acts, .hq-cmt:focus-within .hq-cmt-acts { opacity: 1; }
.hq-cmt-acts button { border: 0; background: none; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: var(--r-xs); }
.hq-cmt-acts button:hover { background: var(--bg3); color: var(--ink); }
.hq-cmt-acts button.danger:hover { color: var(--red); }
.hq-cmt-body { font-size: 14px; line-height: 1.6; color: var(--ink-dim); overflow-wrap: anywhere; }
.hq-cmt-body textarea { min-height: 80px; }
.hq-compose { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.hq-compose .avatar { width: 30px; height: 30px; font-size: 11px; border-radius: 8px; }
.hq-compose textarea { min-height: 44px; resize: vertical; font-size: 14px; line-height: 1.5; }
.hq-compose .hq-edit-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 8px; }
.hq-empty-feed { font-size: 13px; color: var(--muted); padding: 6px 0 14px; }

/* toast ----------------------------------------------------------------- */
.hq-toast {
  position: fixed; z-index: 140; left: 50%; bottom: 24px; translate: -50% 16px; opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 16px; font-size: 14px;
  background: var(--ink); color: var(--bg2); border-radius: var(--r-sm); box-shadow: var(--shadow); transition: opacity 0.18s, translate 0.18s;
}
.hq-toast.is-on { opacity: 1; translate: -50% 0; pointer-events: auto; }
.hq-toast button { border: 0; background: color-mix(in srgb, var(--bg2) 16%, transparent); color: inherit; font: inherit; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-xs); cursor: pointer; }

.hq-kbd { display: inline-block; font: 500 11px/16px var(--font-sans); padding: 0 5px; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: var(--r-xs); color: var(--muted); background: var(--bg1); }
.hq-help { margin: 14px 0 0; font-size: 12px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .hq-wrap { padding-inline: 16px; }
  .hq-search { width: 100%; }
  .hq-toolbar .toolbar-end { margin-left: 0; }
  .hq-peek-in { padding: 20px 16px 40px; }
  .hq-props { grid-template-columns: 110px minmax(0, 1fr); }
  .hq-ptitle { font-size: 22px; }
  .hq-grid-wrap { max-height: calc(100vh - 160px); }
  /* frozen ID + Title would fill a phone: only the row numbers stay pinned */
  .hq-grid .hq-frz { position: static; }
  .hq-grid thead .hq-frz { position: sticky; top: 0; left: auto !important; }
  .hq-grid tfoot .hq-frz { position: sticky; bottom: 0; left: auto !important; }
  .hq-grid .hq-frz-last { box-shadow: none; }
}
