/* ==========================================================================
   Side Hustle Index
   Hand-written. Neutral dark base, Cisco blue as the only accent, real data
   table. Self-hosted fonts, no framework, no build step.
   ========================================================================== */

/* --- fonts (self-hosted, latin subsets) ---------------------------------- */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* --- tokens ------------------------------------------------------------- */

:root {
  color-scheme: dark;

  --bg:      #26272b;   /* lifted charcoal, arena's canvas tone */
  --bg-2:    #2f3136;   /* hover fills, raised surfaces */
  --bg-3:    #3a3c42;   /* pressed, tags, skeleton */
  --card:    #2b2c31;   /* table body, panels, controls */
  --thead:   #323439;   /* table header band */
  --line:    #3a3c41;   /* row hairlines */
  --line-2:  #47494f;   /* borders, controls */

  --ink:     #f1f1f2;   /* 12.4:1 */
  --ink-2:   #c7cad0;   /*  8.5:1 */
  --ink-3:   #a6abb3;   /*  6.1:1 - smallest metadata sits here */

  --blue:    #049fd9;   /* Cisco blue: fills, bars, the pulse */
  --blue-2:  #3cc0f0;   /* links, accents as text */
  --blue-bg: #143349;   /* tint fills */
  --on-blue: #06181f;   /* text on bright blue */

  --warn:    #e0b174;
  --warn-bg: #322818;
  --focus:   #3cc0f0;

  --font-ui: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI",
             Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", "Manrope", -apple-system, BlinkMacSystemFont,
                  "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --shell: 1080px;
  --gut: 20px;
}

/* --- reset -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--blue-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 9px 14px; border-radius: 6px;
}
.skip:focus { left: 8px; top: 8px; }

.vh {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--gut); }

.num { font-variant-numeric: tabular-nums; }

/* --- header --------------------------------------------------------------- */

.top { border-bottom: 1px solid var(--line); background: var(--card); }
.top__in { display: flex; align-items: center; gap: 12px; min-height: 54px; }

.wordmark {
  font-family: var(--font-serif);
  font-size: 19px; font-weight: 400; letter-spacing: .002em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.wordmark span { color: var(--blue-2); font-style: italic; }
.wordmark:hover { text-decoration: none; color: var(--blue-2); }

/* the brand lives in the slide-away panel; the tabs stay up top at every size */
.pagetabs { display: flex; gap: 2px; }
.pagetabs a {
  padding: 6px 12px; border-radius: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-decoration: none;
  white-space: nowrap;
}
.pagetabs a:hover { background: var(--bg-2); color: var(--ink); text-decoration: none; }
.pagetabs a[aria-current="page"] { color: var(--ink); background: var(--bg-3); }

.top .menu-btn { border-color: transparent; background: none; }
.top .menu-btn:hover { background: var(--bg-2); }

/* --- mobile menu panel ----------------------------------------------------- */

.mscrim {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(5, 6, 8, .55);
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.mscrim[data-open="true"] { opacity: 1; pointer-events: auto; }

.menu {
  position: fixed; z-index: 80; inset: 0 auto 0 0;
  width: min(300px, 84vw);
  background: var(--card);
  border-right: 1px solid var(--line-2);
  transform: translateX(-100%);
  transition: transform .18s cubic-bezier(.32, .72, 0, 1);
  visibility: hidden;
  display: flex; flex-direction: column;
  padding: 0 18px 24px;
}
.menu[data-open="true"] { transform: none; visibility: visible; }
body[data-lock="true"] { overflow: hidden; }

.menu__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 0 14px;
  padding-top: calc(12px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
}
.menu__nav { display: flex; flex-direction: column; padding: 10px 0; }
.menu__nav a {
  padding: 11px 8px; border-radius: 7px;
  font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.menu__nav a:hover { background: var(--bg-2); text-decoration: none; }
.menu__nav a[aria-current="page"] { color: var(--blue-2); }
.menu__label {
  margin: 12px 0 2px; padding: 8px 8px 0;
  border-top: 1px solid var(--line);
  font-size: 12px; font-weight: 700; color: var(--ink-3);
}
.menu__nav--sub a { font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 8px; }

/* --- page head (compact, left-aligned) -------------------------------------- */

.pagehead { padding: 24px 0 0; }
.pagehead h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4.8vw, 38px);
  line-height: 1.12; letter-spacing: .002em; font-weight: 400;
  margin: 0 0 7px;
}

/* the arena move: one italic word on a solid accent block */
.hl {
  font-style: italic;
  background: var(--blue); color: var(--on-blue);
  padding: 0 .2em .07em .12em; border-radius: 4px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.pagehead__desc { margin: 0; color: var(--ink-2); font-size: 14.5px; max-width: 78ch; }

.live {
  display: flex; align-items: center; gap: 7px;
  flex-wrap: wrap;
  margin: 10px 0 0; font-size: 13px; color: var(--ink-2);
}
.live b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.live a { color: var(--ink-2); }
.live a:hover { color: var(--ink); }
.live__sep { color: var(--line-2); }
.dot {
  position: relative; width: 7px; height: 7px; flex: none;
  border-radius: 50%; background: #049fd9;
}
.dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: inherit; animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  from { transform: scale(1); opacity: .6; }
  to   { transform: scale(2.8); opacity: 0; }
}

/* --- controls: search + quick tabs ------------------------------------------- */

.controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 16px 0 4px;
}
.search { position: relative; flex: 1 1 250px; max-width: 380px; min-width: 200px; }
.search input {
  width: 100%; height: 42px;
  padding: 0 36px 0 38px;
  border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--card); color: var(--ink);
  font-size: 16px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
@media (min-width: 680px) { .search input { font-size: 14px; } }
.search input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(4, 159, 217, .22);
}
.search input::placeholder { color: var(--ink-3); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search__clear {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; background: none; color: var(--ink-3);
  cursor: pointer; display: none; align-items: center; justify-content: center; border-radius: 6px;
}
.search__clear:hover { color: var(--ink); background: var(--bg-3); }
.search--filled .search__clear { display: flex; }

.tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.tab {
  display: inline-flex; align-items: center;
  min-height: 34px; padding: 5px 14px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--card); color: var(--ink-2);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.tab:hover { border-color: var(--ink-3); color: var(--ink); }
.tab[aria-pressed="true"] {
  background: var(--blue); border-color: var(--blue);
  color: var(--on-blue); font-weight: 700;
}

/* the full filter set opens from the end of the quick-tab row */
.tab--more { border-style: dashed; gap: 6px; }
.tab--more:hover { border-style: solid; }
.tab--more[aria-expanded="true"] { background: var(--bg-3); border-style: solid; color: var(--ink); }

/* --- featured ideas: a small labeled index that holds one or several -----------
   Same visual vocabulary as the main table (header band, hairline rows,
   score bars), so it reads as data with a button, not a marketing card. */

.featured {
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--card);
  margin: 10px 0 4px;
  overflow: hidden;
}
.featured__head {
  margin: 0; padding: 8px 16px;
  background: var(--thead); border-bottom: 1px solid var(--line-2);
  font-size: 12px; font-weight: 700; color: var(--blue-2);
}
.fitem { display: flex; align-items: center; gap: 16px; padding: 13px 16px; }
.fitem + .fitem { border-top: 1px solid var(--line); }
.fitem__score { flex: none; }
.fitem__score b {
  display: block; font-family: var(--font-display);
  font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.fitem__score i {
  display: block; width: 44px; height: 3px; margin-top: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--blue) var(--p, 0%), var(--line-2) 0);
}
.fitem__body { flex: 1 1 auto; min-width: 0; }
.fitem__name {
  margin: 0; font-family: var(--font-display);
  font-size: 17px; font-weight: 700; letter-spacing: -.01em;
}
.fitem__sub { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.fitem__cta { flex: none; display: flex; align-items: center; gap: 14px; }
.fitem__more { font-size: 13px; color: var(--ink-3); }
.fitem__more:hover { color: var(--ink-2); }

@media (max-width: 679px) {
  .fitem { flex-wrap: wrap; gap: 8px 14px; }
  .fitem__body { flex: 1 1 180px; }
  .fitem__cta { flex: 1 1 100%; }
  .fitem__cta .btn { flex: 1 1 auto; }
}

/* --- buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; min-height: 40px;
  border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--card); color: var(--ink);
  font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--bg-3); text-decoration: none; }
.btn--primary { background: var(--blue); border-color: var(--blue); color: var(--on-blue); font-weight: 800; }
.btn--primary:hover { background: var(--blue-2); border-color: var(--blue-2); }
.btn--sm { padding: 6px 12px; min-height: 33px; font-size: 13px; }
.btn--wide { min-width: 250px; min-height: 46px; font-size: 14.5px; }

/* text-style controls, arena's "Hide Filters" pattern */
.btn--ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn--ghost:hover { background: var(--bg-2); color: var(--ink); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: none;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--card); color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { color: var(--ink); background: var(--bg-3); }

/* --- list bar ---------------------------------------------------------------- */

.listbar {
  display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap;
  padding: 8px 0;
  font-size: 13px; color: var(--ink-2);
}
.listbar strong { color: var(--ink); font-weight: 700; }
.listbar__right { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }

#filter-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 4px; margin-left: 3px;
  background: var(--blue); color: var(--on-blue); border-radius: 9px;
  font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
}

.sort select {
  height: 33px; padding: 0 26px 0 10px;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--card) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239aa0a8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center;
  -webkit-appearance: none; appearance: none;
  font-size: 13px; cursor: pointer; color: var(--ink-2);
}
@media (min-width: 680px) { .sort { display: none; } } /* column headers sort on desktop */

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 27px;
  padding: 3px 9px 3px 11px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--card);
  font-size: 12.5px; color: var(--ink-2); cursor: pointer;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip b { font-weight: 700; color: var(--ink); }
.chip svg { flex: none; opacity: .6; }
.chip--reset { border-style: dashed; }

/* --- inline filter panel -------------------------------------------------------- */

.filterbar {
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--card);
  margin: 0 0 12px;
}
.filterbar__in {
  columns: 4 200px; column-gap: 30px;
  padding: 8px 18px 10px;
}
.filterbar__in .fgroup { break-inside: avoid; }
.filterbar__foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 8px 18px 14px;
  border-top: 1px solid var(--line);
}

.fgroup { padding: 11px 0; }
.fgroup > h3 {
  margin: 0 0 5px; font-size: 12.5px; font-weight: 700;
  color: var(--ink); letter-spacing: .01em;
}

.opt {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 0; cursor: pointer; font-size: 13.5px; color: var(--ink-2);
  min-height: 31px;
}
.opt:hover { color: var(--ink); }
.opt input {
  flex: none; margin: 0; width: 15px; height: 15px;
  accent-color: var(--blue); cursor: pointer;
}
.opt input:checked ~ .opt__label { color: var(--ink); font-weight: 600; }
.opt__label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt__n { flex: none; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.fgroup__more {
  border: 0; background: none; padding: 5px 0; margin: 0;
  color: var(--ink-3); font-size: 12.5px; cursor: pointer; text-decoration: underline;
  text-underline-offset: 2px;
}
.fgroup__more:hover { color: var(--ink-2); }

/* --- the table ------------------------------------------------------------------- */

.lb {
  width: 100%;
  /* fixed layout so the flexible name column can never push the table wider
     than the page; long subtitles ellipsize instead */
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  font-size: 14px;
}
.lb thead th:first-child { border-top-left-radius: 9px; }
.lb thead th:last-child { border-top-right-radius: 9px; }
.lb tbody tr:last-child td:first-child { border-bottom-left-radius: 9px; }
.lb tbody tr:last-child td:last-child { border-bottom-right-radius: 9px; }

.lb thead th {
  text-align: left; font-weight: 700; font-size: 12px;
  color: var(--ink-2);
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-2);
  background: var(--thead);
  white-space: nowrap;
  position: sticky; top: 0; z-index: 5;
}
.th-sort {
  border: 0; background: none; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.th-sort:hover { color: var(--ink); }
th[aria-sort] .th-sort { color: var(--ink); }
th[aria-sort="descending"] .th-sort::after { content: "↓"; font-size: 11px; color: var(--blue-2); }
th[aria-sort="ascending"] .th-sort::after { content: "↑"; font-size: 11px; color: var(--blue-2); }

.lb tbody tr[data-i] { cursor: pointer; transition: background-color .1s ease; }
.lb tbody tr.alt { background: rgba(255, 255, 255, .02); }
.lb tbody tr[data-i]:hover { background: var(--bg-2); }
.lb tbody tr.is-open { background: var(--bg-2); }

/* the featured idea is a highlighted row, arena style, not a box */
.lb tbody tr.row--featured { background: var(--blue-bg); }
.lb tbody tr.row--featured:hover { background: #1a405e; }
.sub .feat { color: var(--blue-2); font-weight: 700; }

.lb td { padding: 12px; vertical-align: middle; border-bottom: 1px solid var(--line); }
.lb tbody tr:last-child td { border-bottom: 0; }

.c-rank { width: 46px; }
td.c-rank { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
td.c-rank.topthree { color: var(--blue-2); font-weight: 800; }

/* votes column: hidden until the votes API wakes up after deployment */
.c-votes { width: 72px; }
html:not([data-votes="on"]) .c-votes { display: none; }
/* a real upvote: bare arrow over the count, no box, blue once cast */
.vote {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 34px; padding: 3px 6px;
  border: 0; border-radius: 6px;
  background: none; color: var(--ink-3);
  cursor: pointer; line-height: 1;
  transition: color .12s ease, background-color .12s ease;
}
.vote svg { width: 14px; height: 14px; }
.vote:hover { color: var(--blue-2); background: var(--bg-2); }
.vote b { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); min-height: 13px; }
.vote:hover b { color: var(--ink); }
.vote[aria-pressed="true"] { color: var(--blue-2); }
.vote[aria-pressed="true"] b { color: var(--blue-2); }
.vote[aria-pressed="true"]:hover { color: var(--blue); }
.vote[aria-pressed="true"]:hover b { color: var(--blue); }

.sub .vcount { color: var(--blue-2); font-weight: 700; }
@media (min-width: 680px) { .sub .vcount { display: none; } } /* the column shows it there */
html:not([data-votes="on"]) .sub .vcount { display: none; }

.x__vote { margin: 12px 0 0; }
.x__vote .btn { width: 100%; gap: 8px; }
.vote-x.is-voted { background: var(--blue-bg); border-color: var(--blue); color: var(--blue-2); }
@media (max-width: 679px) { .c-votes { display: none !important; } } /* vote via the expansion on phones */

.c-name { min-width: 0; }
td.c-name { overflow: hidden; }
.rowbtn {
  display: inline; border: 0; background: none; padding: 0; margin: 0;
  font-size: 14.5px; font-weight: 700; color: var(--ink);
  letter-spacing: -.01em; cursor: pointer; text-align: left;
}
.lb tbody tr:hover .rowbtn, .lb tbody tr.is-open .rowbtn { color: var(--blue-2); }
.sub {
  display: block; margin-top: 2px;
  font-size: 12px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 100%;
}

.rowcta {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: 10px; padding: 3px 11px;
  vertical-align: 1px;
  background: var(--blue); color: var(--on-blue);
  border-radius: 999px;
  font-size: 12px; font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .12s ease;
}
.rowcta:hover { background: var(--blue-2); text-decoration: none; }
@media (max-width: 679px) { .rowcta { margin-left: 8px; padding: 2px 9px; font-size: 11.5px; } }

.c-ease { width: 74px; }
.score b { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.score i {
  display: block; width: 40px; height: 3px; margin-top: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--blue) var(--p, 0%), var(--line-2) 0);
}

.c-pay { width: 118px; }
.c-cost { width: 108px; }
.c-payout { width: 102px; }
td.c-pay, td.c-cost, td.c-payout {
  font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--ink-2);
}
td.c-pay { color: var(--ink); font-weight: 600; }

.c-diff { width: 92px; }
td.c-diff { font-size: 13px; color: var(--ink-2); white-space: nowrap; }

.c-where { width: 88px; }
td.c-where { font-size: 13px; color: var(--ink-3); white-space: nowrap; }

@media (max-width: 1023px) { .c-where { display: none; } }
@media (max-width: 899px)  { .c-diff { display: none; } }
@media (max-width: 679px)  {
  .c-cost, .c-payout { display: none; }
  .lb td, .lb thead th { padding-left: 9px; padding-right: 9px; }
  .c-rank { width: 33px; }
  .c-pay { width: 96px; }
  .c-ease { width: 56px; }
  .rowbtn { font-size: 14px; }
  .score i { width: 32px; }
}

/* show-more lives inside the table as its last row, so it can never misalign */
tr.morerow td { padding: 0; border-bottom: 0; }
#more-btn {
  display: block; width: 100%;
  border: 0; border-top: 1px solid var(--line-2);
  background: var(--thead); cursor: pointer;
  padding: 13px 10px;
  text-align: center;
  font-size: 13.5px; font-weight: 700; color: var(--blue-2);
  border-radius: 0 0 9px 9px;
}
#more-btn:hover { background: var(--bg-3); }
#more-btn small { color: var(--ink-3); font-weight: 500; font-size: 12.5px; }

/* --- inline row expansion ---------------------------------------------------------- */

.xrow td { padding: 0; background: var(--bg); cursor: default; }
.x { padding: 20px 14px 24px; }
.x__grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 880px) {
  .x { padding: 24px 22px 28px; }
  .x__grid { grid-template-columns: 320px minmax(0, 1fr); gap: 36px; }
}

.x .dsec { border-bottom: 1px solid var(--line); padding: 14px 0; }
.x .dsec:first-child { padding-top: 0; }
.x .dsec:last-child { border-bottom: 0; }
.x .dsec > h3 {
  margin: 0 0 8px; font-size: 12.5px; font-weight: 700;
  color: var(--ink); letter-spacing: .01em;
}
.x .dsec p { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.x .dsec p:last-child { margin-bottom: 0; }
.x .dsec ol, .x .dsec ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.x .dsec li { margin-bottom: 6px; }
.x .dsec li:last-child { margin-bottom: 0; }

.x__cta { margin: 14px 0 2px; }
.x__cta .btn { width: 100%; }
.x__note { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); }
.x__note a { color: var(--ink-3); }

.dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dgrid div { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.dgrid div:nth-last-child(-n+2) { border-bottom: 0; }
.dgrid dt { font-size: 11px; color: var(--ink-3); margin: 0 0 1px; }
.dgrid dd { margin: 0; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }

.callout { background: var(--warn-bg); padding: 12px 14px; border-radius: 8px; }
.callout p { color: var(--ink); font-size: 13.5px; margin: 0; }
.callout h4 { margin: 0 0 5px; font-size: 12px; font-weight: 700; color: var(--warn); }

.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-size: 12.5px; padding: 3px 9px; border-radius: 6px;
  background: var(--bg-3); color: var(--ink-2);
}

.meter { display: inline-flex; gap: 2px; vertical-align: -1px; margin-right: 6px; }
.meter i { display: block; width: 5px; height: 10px; border-radius: 2px; background: var(--line-2); }
.meter i.on { background: var(--blue); }

/* --- empty / footer line --------------------------------------------------------------- */

.empty { padding: 46px 16px 56px; text-align: center; color: var(--ink-2); }
.empty h2 { font-size: 17px; margin: 0 0 6px; color: var(--ink); font-weight: 700; }
.empty p { margin: 0 0 16px; font-size: 13.5px; }

.updated {
  text-align: center; font-size: 12.5px; color: var(--ink-3);
  padding: 20px 0 48px; margin: 0;
}
.updated a { color: var(--ink-3); }
.updated a:hover { color: var(--ink-2); }

.skeleton { padding: 6px 0; }
.skeleton div {
  height: 12px; background: var(--bg-3); border-radius: 5px;
  margin-bottom: 10px; max-width: 100%;
}
.skeleton div:nth-child(2n) { max-width: 62%; }
.skeleton div:nth-child(3n) { max-width: 84%; }

/* --- prose pages -------------------------------------------------------------------------- */

.masthead { border-bottom: 1px solid var(--line); background: var(--card); }
.masthead .shell { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; }
.masthead .nav { display: flex; gap: 4px; }
.masthead .nav a {
  padding: 6px 12px; border-radius: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
.masthead .nav a:hover { background: var(--bg-2); color: var(--ink); }
.masthead .nav a[aria-current="page"] { color: var(--ink); background: var(--bg-3); }

.prose { max-width: 68ch; padding: 28px 0 70px; }
.prose h1 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.1; letter-spacing: .002em; margin: 0 0 14px; font-weight: 400;
}
.prose h2 {
  font-size: clamp(17px, 3.6vw, 20px);
  line-height: 1.3; margin: 32px 0 10px; font-weight: 700;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.prose h3 { font-size: 15.5px; margin: 22px 0 6px; font-weight: 700; }
.prose p, .prose li { font-size: 15px; color: var(--ink-2); }
.prose p { margin: 0 0 13px; }
.prose ul, .prose ol { margin: 0 0 15px; padding-left: 22px; }
.prose li { margin-bottom: 7px; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose .standfirst { font-size: 16.5px; color: var(--ink); margin-bottom: 20px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.prose code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .85em;
  background: var(--bg-3); border-radius: 4px;
  padding: 1px 5px;
}
.prose pre {
  background: var(--card) !important; border: 1px solid var(--line-2) !important;
  border-radius: 8px !important;
}

.prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 13.5px; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-size: 12px; color: var(--ink-3); font-weight: 700; }
.prose td { color: var(--ink-2); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 18px; }

.note {
  background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: 8px;
  padding: 13px 15px; margin: 0 0 18px;
}
.note p:last-child { margin-bottom: 0; }
.note h3 { margin-top: 0; }

.strip {
  background: var(--bg-2); border-bottom: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.45; color: var(--ink-2);
}
.strip .shell { display: flex; gap: 7px; align-items: baseline; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.strip b { color: var(--ink); font-weight: 700; }

/* --- footer ----------------------------------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--line); background: #212226;
  padding: 28px 0 38px; font-size: 13px; color: var(--ink-2);
}
.foot__cols { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .foot__cols { grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; } }
.foot h4 { margin: 0 0 8px; font-size: 12.5px; color: var(--ink); font-weight: 700; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 5px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot__legal { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.foot__legal p { margin: 0 0 7px; max-width: 84ch; }
.foot__legal p:last-child { margin-bottom: 0; }

/* --- utility ------------------------------------------------------------------------------------ */

.nojs {
  padding: 16px 18px; margin: 8px 0 20px;
  background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: 8px;
}
[hidden] { display: none !important; }
