/* topcompanies.live — one stylesheet, no build step. */
:root {
  --bg:        #fbf8f4;   /* warm off-white — the page ground */
  --bg-2:      #ffffff;   /* rows and cells sit above the ground */
  --panel:     #ffffff;
  --line:      #ece5db;
  --line-2:    #ddd4c6;
  --text:      #191713;
  --muted:     #6d675d;
  --gold:      #e2a013;   /* accent fill: buttons, the brand dot */
  --gold-ink:  #92650a;   /* the same accent, dark enough to read as text */
  --gold-soft: #fdf3dd;   /* tinted background for the #1 row */
  --silver:    #7d8794;
  --silver-soft:#f2f4f7;
  --bronze:    #a96a34;
  --bronze-soft:#fbf0e6;
  --green:     #0f9464;
  --red:       #cc3c28;
  --radius:    12px;
  --wrap:      1120px;
  --shadow:    0 1px 2px rgba(25,23,19,.05), 0 8px 24px -12px rgba(25,23,19,.12);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
main a:not(.btn):not(.chip):not(.cat):not(.name):not(.pg):not(.cat-card):not(.season-card):not(.back):not(.tab):not(.claim-rank):not(.pick) { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-2); }
main a:not(.btn):not(.tab):not(.claim-rank):not(.pick):hover { text-decoration-color: var(--gold-ink); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); font-weight: 700; }
p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.sm { font-size: .875rem; }
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin-bottom: .75rem; }
.err { color: var(--red); background: #fdeeeb; border: 1px solid #f3cdc5; padding: .7rem .9rem; border-radius: 10px; }
.ok  { color: var(--green); background: #e8f7f0; border: 1px solid #bfe6d6; padding: .7rem .9rem; border-radius: 10px; }
.warn { color: var(--gold-ink); }

/* --------------------------------------------------------------- header */
header.site { position: sticky; top: 0; z-index: 30; background: rgba(251,248,244,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
header .bar { display: flex; align-items: center; gap: 1.25rem; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; letter-spacing: -.02em; }
.brand .tld { color: var(--gold-ink); }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(226,160,19,.18); }
.links { display: flex; gap: 1.1rem; margin-left: auto; font-size: .9rem; }
.links a { color: var(--muted); }
.links a:hover, .links a.on { color: var(--text); }
header .btn { margin-left: 1rem; }

/* --------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1rem; border-radius: 10px; font-weight: 600; font-size: .9rem; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); cursor: pointer; transition: .15s ease; white-space: nowrap; font-family: inherit; }
.btn:hover { border-color: var(--muted); transform: translateY(-1px); }
.btn.primary { background: var(--gold); color: #2a1c02; border-color: var(--gold); box-shadow: var(--shadow); }
.btn.primary:hover { background: #ffd570; }
.btn.ghost { background: transparent; }
.btn.lg { padding: .85rem 1.5rem; font-size: 1rem; }
.btn.sm { padding: .4rem .75rem; font-size: .82rem; }
.btn.xs { padding: .25rem .55rem; font-size: .8rem; color: var(--muted); }
.btn.full { width: 100%; }
.btn.disabled, .btn[disabled] { opacity: .4; pointer-events: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 .75rem; }
.cta-row.center { justify-content: center; }

/* ------------------------------------------------------------ page copy */
.lede { font-size: clamp(1rem, 1.6vw, 1.15rem); color: #43403a; max-width: 62ch; }
.pledge-band { display: inline-block; margin-top: 1rem; padding: .6rem 1rem; border: 1px solid rgba(87,217,163,.3); background: rgba(87,217,163,.07); border-radius: 999px; font-size: .9rem; }
.pledge-badge { display: inline-block; margin-top: .5rem; font-size: .82rem; color: var(--green); }

/* ------------------------------------------------------- spots remaining */
.spots { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem;
  margin: 1.5rem 0; padding: 1.1rem 1.35rem; border-radius: var(--radius);
  border: 1px solid #f0dcae; background: linear-gradient(90deg, var(--gold-soft), #fffdf8); }
.spots.full { border-color: var(--line-2); background: var(--bg-2); }
.spots-head { font-size: 1.05rem; font-weight: 700; margin-bottom: .2rem; }
.spots-n { font-family: var(--mono); font-size: 1.6rem; color: var(--gold-ink); vertical-align: -2px; }
.spots.full .spots-n { color: var(--muted); }
.spots-copy { flex: 1 1 20rem; min-width: 0; }
.spots-copy p:last-child { margin: 0; max-width: 60ch; }
.spots-meter { position: relative; flex: none; width: 190px; height: 30px; border-radius: 999px; overflow: hidden;
  background: #f1ece2; border: 1px solid var(--line-2); }
.spots-fill { height: 100%; background: linear-gradient(90deg, #f0c765, var(--gold)); }
.spots.full .spots-fill { background: linear-gradient(90deg, var(--line-2), var(--muted)); }
.spots-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .82rem; font-weight: 700; color: #2a1c02; }
.spots.full .spots-count { color: var(--text); }
.spots.compact { padding: .7rem 1rem; margin: 1rem 0; }
.spots.compact .spots-head { font-size: .95rem; }
.spots.compact .spots-copy p:last-child, .spots.compact .btn { display: none; }
.spots-inline { display: inline-block; margin: .35rem 0 .75rem; padding: .5rem .9rem; border-radius: 999px;
  font-size: .9rem; border: 1px solid #f0dcae; background: var(--gold-soft); }
@media (max-width: 720px) {
  .spots { gap: .85rem; }
  .spots-copy, .spots-meter { flex: 1 1 100%; width: 100%; }
}

/* ----------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 2rem auto; }
.stat { padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .15rem; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.stat .k { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat .v { font-size: 1.5rem; font-weight: 700; font-family: var(--mono); letter-spacing: -.02em; }
.stat .s { font-size: .8rem; color: var(--muted); }
.stat.big .v { color: var(--green); }
.stats { box-shadow: var(--shadow); }

/* ------------------------------------------------------- presence + claim */
.presence-wrap { display: flex; justify-content: center; padding: 1.25rem 20px 0; }
.presence { display: inline-flex; align-items: center; gap: .45rem; flex-wrap: wrap; justify-content: center;
  margin: 0; padding: .45rem 1rem; border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; font-size: .85rem; color: var(--muted); box-shadow: var(--shadow); }
.presence strong { color: var(--text); font-family: var(--mono); font-weight: 700; }
.presence .sep { color: var(--line-2); }
.presence a { color: var(--gold-ink); font-weight: 600; }
/* Sits in a flex bar on the presence line and inline in an <h2> above the
   ticker and the current season, so it needs a box in both. */
.live-dot { display: inline-block; vertical-align: middle; margin-right: .4rem;
  width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none;
  box-shadow: 0 0 0 3px rgba(15,148,100,.15); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.bump { animation: bump .5s ease; }
@keyframes bump { 0% { transform: translateY(0); } 35% { transform: translateY(-3px); } 100% { transform: translateY(0); } }

.claim-bar { text-align: center; padding: 1.75rem 20px .5rem; max-width: 780px; }
.claim-bar h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
.stepper { display: inline-flex; align-items: center; gap: .5rem; vertical-align: middle; }
.stepper .price { display: inline-flex; align-items: baseline; color: var(--gold-ink);
  font-family: var(--mono); letter-spacing: -.03em; }
.price-input { font: inherit; color: inherit; letter-spacing: inherit; background: none; padding: 0;
  border: 0; border-bottom: 2px dashed rgba(226,160,19,.45); border-radius: 0; width: 6ch;
  text-align: left; -moz-appearance: textfield; }
.price-input:hover { border-bottom-color: var(--gold); }
.price-input:focus { outline: none; border-bottom-style: solid; border-bottom-color: var(--gold);
  box-shadow: none; }
.step { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel);
  color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; font-family: inherit; transition: .15s; }
.step:hover { border-color: var(--gold); color: var(--gold-ink); background: var(--gold-soft); }
.claim-sub { color: var(--muted); font-size: .95rem; max-width: 34rem; margin: 0 auto 1.25rem; }
.claim-sub strong { color: var(--gold-ink); }
.claim-quick { display: flex; gap: .6rem; align-items: stretch; justify-content: center; flex-wrap: wrap; }
.qc-url { display: flex; align-items: center; gap: .5rem; flex: 1 1 320px; max-width: 460px;
  border: 1px solid var(--line-2); background: var(--panel); border-radius: 999px; padding: 0 1rem; color: var(--muted); }
.qc-url input { border: 0; background: none; padding: .8rem 0; flex: 1; min-width: 0; color: var(--text); font-size: .95rem; }
.qc-url input:focus { outline: none; box-shadow: none; }
.qc-url:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226,160,19,.18); }
.claim-quick .btn { border-radius: 999px; padding: .8rem 1.8rem; }
.qc-hint { font-size: .82rem; color: var(--red); margin: .8rem 0 0; }
.qc-url:has(input[aria-invalid="true"]) { border-color: var(--red); }
.claim-note { font-size: .82rem; color: var(--muted); margin: .9rem 0 0; }

/* ------------------------------------------------------ category picker */
.dd { position: relative; flex: 0 1 250px; min-width: 0; }
/* The native select is what submits; it is only hidden once JS has put a
   listbox in front of it, so a no-JS page keeps a working control. */
.dd-native.dd-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%;
  padding: .8rem 1rem; border: 1px solid var(--line-2); background: var(--panel); color: var(--text);
  border-radius: 999px; font: inherit; font-size: .95rem; cursor: pointer; text-align: left; transition: .15s; }
.dd-btn:hover { border-color: var(--gold); }
.dd.is-open .dd-btn { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226,160,19,.18); }
.dd.is-empty .dd-btn { color: var(--muted); }
.dd-face { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.dd-face .cat-icon { flex: none; color: var(--gold-ink); }
.dd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-caret { flex: none; color: var(--muted); transition: transform .15s; }
.dd.is-open .dd-caret { transform: rotate(180deg); }

/* One long column of tight rows. No `display` is set here on purpose: an author
   `display` beats the UA's `[hidden] { display: none }`, which is what left this
   panel stuck open. The rule below makes that impossible to reintroduce. */
.dd-list { position: absolute; z-index: 40; top: calc(100% + .4rem); left: 0;
  width: max-content; min-width: 100%; max-width: min(22rem, calc(100vw - 2rem));
  max-height: min(80vh, 32rem); overflow-y: auto; list-style: none;
  margin: 0; padding: .4rem; background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 14px; box-shadow: 0 12px 32px -10px rgba(25,23,19,.28); text-align: left; }
.dd-list[hidden] { display: none; }
/* Anchored left by default; flipped by app.js when that would run off-screen. */
.dd-list.flip-right { left: auto; right: 0; }
.dd-list li { display: flex; align-items: center; gap: .55rem; padding: .32rem .6rem; border-radius: 9px;
  font-size: .875rem; line-height: 1.35; color: var(--text); cursor: pointer; }
.dd-list li .cat-icon { flex: none; color: var(--muted); }
.dd-list li span { flex: 1; min-width: 0; }
.dd-list li:hover, .dd-list li:focus-visible { background: var(--bg); outline: none; }
.dd-list li:focus-visible { box-shadow: inset 0 0 0 2px var(--gold); }
.dd-list li[aria-selected="true"] { background: var(--gold-soft); font-weight: 600; }
.dd-list li[aria-selected="true"] .cat-icon { color: var(--gold-ink); }
.dd-check { flex: none; opacity: 0; color: var(--gold-ink); }
.dd-list li[aria-selected="true"] .dd-check { opacity: 1; }

/* Inside the stacked claim form the picker is a full-width field, not a pill. */
.form .dd { flex: none; width: 100%; }
.form .dd-btn { border-radius: 10px; padding: .7rem .9rem; }

/* ------------------------------------------------------------- cat tabs */
.cat-tabs { display: flex; gap: .4rem; overflow-x: auto; padding: .25rem .25rem .75rem; margin: 1.5rem -0.25rem 0;
  scrollbar-width: none; -ms-overflow-style: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
/* Fade whichever end still has something behind it, so a mid-scroll strip
   reads as "there is more" instead of a chopped-off pill. */
.cat-tabs.fade-start { -webkit-mask-image: var(--fade-start); mask-image: var(--fade-start); }
.cat-tabs.fade-end   { -webkit-mask-image: var(--fade-end);   mask-image: var(--fade-end); }
.cat-tabs.fade-start.fade-end { -webkit-mask-image: var(--fade-both); mask-image: var(--fade-both); }
:root {
  --fade-start: linear-gradient(90deg, transparent 0, #000 48px);
  --fade-end:   linear-gradient(90deg, #000 calc(100% - 48px), transparent 100%);
  --fade-both:  linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
}
.cat-tabs .tab { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; flex: none;
  padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  font-size: .85rem; color: var(--muted); text-decoration: none; }
.cat-tabs .tab:hover { border-color: var(--gold); color: var(--text); background: var(--gold-soft); text-decoration: none; }
.cat-tabs .tab.on { background: var(--gold); border-color: var(--gold); color: #2a1c02; font-weight: 600; }
.cat-icon { flex: none; }
.cat-icon.xs { width: 15px; height: 15px; }
.cat-icon.lg { width: 30px; height: 30px; vertical-align: -4px; margin-right: .5rem; color: var(--gold-ink); }

.logo { width: 50px; height: 50px; border-radius: 9px; background: none; display: block; object-fit: contain; }
.logo.lg { width: 48px; height: 48px; margin: 0 auto; }
.logo.xl { width: 72px; height: 72px; border-radius: 14px; }

/* ----------------------------------------------------------------- board */
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 2rem 0 1rem; }
.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.rowli { display: grid; grid-template-columns: 54px 50px minmax(0,1fr) auto 184px; align-items: center;
  gap: .9rem; padding: .85rem 1.1rem; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.rowli:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
/* The whole row opens the company link, so it reads as one target. The anchors
   inside it still win the click — app.js lets them through. */
.rowli[data-open] { cursor: pointer; }
/* The archive has nothing to claim, so it keeps the plain four-column row. */
.board.archive .rowli { grid-template-columns: 54px 50px minmax(0,1fr) auto; }

/* The hover offer. The 184px column is held open at rest so revealing the note
   never reflows the row — only the note itself fades in. That width covers the
   whole live price range; a wider one ellipsizes rather than sliding over the
   amount beside it. */
.claim-rank { grid-column: 5; justify-self: end;
  display: inline-block; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: .3rem .6rem; border-radius: 999px;
  border: 1px solid var(--gold); background: var(--gold-soft); color: var(--gold-ink);
  font-size: .74rem; font-weight: 600; line-height: 1.3;
  opacity: 0; transform: translateX(4px); pointer-events: none;
  transition: opacity .15s, transform .15s, background-color .15s;
  text-decoration: none; }
.claim-rank strong { font-family: var(--mono); font-weight: 700; }
.rowli:hover .claim-rank, .claim-rank:focus-visible {
  opacity: 1; transform: none; pointer-events: auto; }
.claim-rank:hover { background: var(--gold); color: #2a1c02; text-decoration: none; }

/* The top three sit in the same list, lit up rather than lifted out. */
.rowli.gold   { background: var(--gold-soft);   border-color: #eccf8a; }
.rowli.silver { background: var(--silver-soft);  border-color: #d3dae3; }
.rowli.bronze { background: var(--bronze-soft);  border-color: #e6cbb1; }
.rowli.gold .rank   { background: var(--gold);   color: #2a1c02; border-color: transparent; }
.rowli.silver .rank { background: var(--silver); color: #fff; border-color: transparent; }
.rowli.bronze .rank { background: var(--bronze); color: #fff; border-color: transparent; }
.rowli.gold .amt, .rowli.silver .amt, .rowli.bronze .amt { font-size: 1.05rem; }
.rowli.dim { opacity: .72; }

.rank { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; padding: .25rem .1rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  font-family: var(--mono); font-size: .85rem; color: var(--muted); font-weight: 700; }
.who { display: flex; flex-direction: column; min-width: 0; gap: .1rem; }
.name-line { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.who .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .name:hover { color: var(--gold-ink); }
.who .tag { font-size: .875rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
.who .meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: .76rem;
  color: var(--muted); margin-top: .15rem; }
.who .meta .cat { display: inline-flex; align-items: center; gap: .3rem; border: 0; padding: 0; }
.who .meta .cat:hover { color: var(--gold-ink); }
.flag { font-size: .8rem; flex: none; line-height: 1; }
.cat { font-size: .75rem; color: var(--muted); border: 1px solid var(--line-2); padding: .18rem .55rem; border-radius: 999px; white-space: nowrap; }
.cat:hover { color: var(--text); border-color: var(--muted); }
.clicks { font-family: var(--mono); display: inline-flex; align-items: center; gap: .3rem; }
.clicks::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: #e5484d; box-shadow: 0 0 0 0 rgba(229, 72, 77, .5); animation: pulse-dot 1.4s ease-out infinite; }
@keyframes pulse-dot {
  0%   { opacity: 1;  box-shadow: 0 0 0 0 rgba(229, 72, 77, .5); }
  70%  { opacity: .35; box-shadow: 0 0 0 5px rgba(229, 72, 77, 0); }
  100% { opacity: 1;  box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); }
}
@media (prefers-reduced-motion: reduce) { .clicks::before { animation: none; } }
.amt { font-family: var(--mono); font-weight: 700; text-align: right; font-size: .98rem; }
.amt i { font-style: normal; font-size: .72rem; color: var(--muted); font-weight: 400; }
.amt.was { text-decoration: line-through; color: var(--muted); }

.empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* ------------------------------------------------------------- pagination */
.pager { display: flex; align-items: center; justify-content: center; gap: .4rem; margin: 2rem 0 3rem; flex-wrap: wrap; }
.pg { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid var(--line); font-family: var(--mono); font-size: .9rem; color: var(--muted); }
.pg:hover { color: var(--text); border-color: var(--muted); }
.pg.on { background: var(--gold); color: #2a1c02; border-color: var(--gold); font-weight: 700; }
.gap { color: var(--muted); padding: 0 .2rem; }

/* ---------------------------------------------------------------- panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin: 1.25rem 0; }
.band { text-align: center; padding: 3rem 20px; margin: 3rem auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band .lede { margin: 0 auto 1.5rem; }
.page-head { padding: 2.5rem 20px 1rem; }
.back { color: var(--muted); font-size: .875rem; display: inline-block; margin-bottom: 1rem; }
.back:hover { color: var(--text); }
.company-head { display: flex; gap: 1.25rem; align-items: flex-start; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.chip { font-size: .82rem; padding: .35rem .75rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); background: transparent; cursor: pointer; font-family: inherit; }
.chip:hover { color: var(--text); border-color: var(--gold); background: var(--gold-soft); }
.chip.warn { color: var(--gold-ink); border-color: #f0dcae; background: var(--gold-soft); }

/* Sits at the foot of the board, centred, as the page's closing pulse. */
.ticker { border: 1px solid var(--line); background: var(--panel); border-radius: 14px;
  padding: 1rem 1.25rem 1.1rem; margin: 0 auto 3.5rem; max-width: 560px; box-shadow: var(--shadow); }
.ticker .eyebrow { display: flex; align-items: center; justify-content: center; gap: .45rem; margin: 0 0 .5rem; }
.ticker ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ticker li { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap;
  padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.ticker li:last-child { border-bottom: 0; padding-bottom: 0; }
.ticker li .ev-when { margin-left: auto; padding-left: .5rem; }
.ticker .dotp { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none; }
.ticker .ev-name { color: var(--text); font-weight: 600; }
.ticker .ev-amt { font-family: var(--mono); color: var(--gold-ink); font-weight: 700; }
.ticker .ev-when { opacity: .75; }

/* ------------------------------------------------------------ categories */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 3rem; }
.cat-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; transition: .15s; display: block; }
.cat-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.cat-card-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; color: var(--gold-ink); }
.cat-card h3 { font-size: 1rem; margin: 0; color: var(--text); }
.cat-price { font-family: var(--mono); font-size: .85rem; color: var(--gold-ink); margin: 0; }
.cat-price .open { color: var(--green); }

/* ----------------------------------------------------------------- facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; box-shadow: var(--shadow); }
.fact { padding: 1rem; display: flex; flex-direction: column; gap: .1rem; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.fact .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fact .v { font-size: 1.25rem; font-family: var(--mono); }
.fact .s { font-size: .78rem; color: var(--muted); }

/* ----------------------------------------------------------------- forms */
.form { margin-bottom: 2rem; }
.form.inline { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .4rem; }
input, select, textarea { width: 100%; padding: .75rem .9rem; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; color: var(--text); font-family: inherit; font-size: 1rem; }
input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226,160,19,.18); }
.hint { font-size: .8rem; color: var(--muted); margin: .4rem 0 0; }
.amount-input { display: flex; align-items: center; gap: .5rem; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 0 .9rem; }
.amount-input:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226,160,19,.18); }
.amount-input span { color: var(--muted); font-family: var(--mono); }
.amount-input input { border: 0; background: transparent; padding-left: 0; font-family: var(--mono); font-size: 1.35rem; font-weight: 700; }
.amount-input input:focus { box-shadow: none; }
.presets { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }

/* ----------------------------------------------------------------- misc */
.rules { list-style: none; counter-reset: r; padding: 0; margin: 0 0 2rem; }
.rules li { display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.rules li:last-child { border: 0; }
.rules .num { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); display: grid; place-items: center; font-family: var(--mono); font-size: .85rem; font-weight: 700; }
.rules h3 { font-size: 1rem; margin-bottom: .25rem; }
.rules p { margin: 0; color: #43403a; font-size: .95rem; }
.steps { color: #43403a; padding-left: 1.2rem; }
.steps li { margin-bottom: .5rem; }
.ledger { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ledger th, .ledger td { text-align: left; padding: .7rem .5rem; border-bottom: 1px solid var(--line); }
.ledger th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ledger .r { text-align: right; font-family: var(--mono); }
.code { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .8rem; font-family: var(--mono); font-size: .78rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all; color: var(--muted); }
.badge-preview { display: block; margin: .5rem 0 1rem; }

/* ------------------------------------------------------------ badge builder */
/* The stage shows the badge against the ground it will actually sit on, so a
   light badge is never judged against a dark page. "Auto" gets both halves. */
/* A badge is judged against the ground it will sit on, so the stage supplies
   one. "Auto" shows both, because that is exactly what it does in the wild. */
.badge-stage { display: grid; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; }
.badge-stage .pane { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; min-height: 132px; padding: 1.5rem 1rem; }
.badge-stage img { display: block; }
.pane.light { background: var(--bg); }
.pane.dark  { background: #0e1014; }
.pane-note { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.pane.light .pane-note { color: var(--muted); }
.pane.dark .pane-note { color: #6e7683; }
/* Only the split view needs telling apart; a single pane speaks for itself. */
.badge-stage:not([data-theme="auto"]) .pane-note { display: none; }
.badge-stage[data-theme="light"] .pane.dark,
.badge-stage[data-theme="dark"] .pane.light { display: none; }
.badge-stage[data-theme="auto"] { grid-template-columns: 1fr 1fr; }
.stage-note { margin: .6rem 0 1.5rem; }

.picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1.5rem; }
.pick { display: block; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; }
.pick:hover { border-color: var(--line-2); }
.pick strong { display: block; font-size: .9rem; }
.pick span { display: block; font-size: .75rem; color: var(--muted); line-height: 1.35; margin-top: .15rem; }
.pick.on { border-color: var(--gold); background: var(--gold-soft); }
.pick.on strong { color: var(--gold-ink); }

.snip { margin-bottom: 1.75rem; }
.snip:last-of-type { margin-bottom: 1rem; }
.snip h3 { font-size: .95rem; margin: 0 0 .15rem; }
.snip p { margin: 0 0 .5rem; }
.snip .code { margin-bottom: .6rem; }

@media (max-width: 620px) {
  .picks { grid-template-columns: 1fr; }
  .badge-stage[data-theme="auto"] { grid-template-columns: 1fr; }
  .badge-stage .pane { min-height: 104px; padding: 1rem; }
}

/* ---------------------------------------------------------------- footer */
footer.site { border-top: 1px solid var(--line); margin-top: 4rem; padding: 3rem 0 2rem; background: var(--bg-2); }
.foot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 2.5rem; }
.foot-grid h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.foot-grid a { display: flex; align-items: center; gap: .4rem; font-size: .875rem; color: var(--muted); padding: .18rem 0; }
.foot-grid a:hover { color: var(--text); }
/* Board sits in the middle of the footer; About runs flush to the right edge,
   under "How it works" in the top nav. */
.foot-grid > div:nth-child(2) { justify-self: center; }
.foot-grid > div:nth-child(3) { justify-self: end; text-align: right; }
.foot-grid > div:nth-child(3) a { justify-content: flex-end; }
.foot-note { border-top: 1px solid var(--line); padding-top: 1.5rem; font-size: .85rem; color: var(--muted); }
.foot-note a { color: var(--gold-ink); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .foot-grid { grid-template-columns: 1fr; }
  .foot-grid > div:nth-child(2), .foot-grid > div:nth-child(3) { justify-self: start; text-align: left; }
  .foot-grid > div:nth-child(3) a { justify-content: flex-start; }
  .links { display: none; }
  .rowli, .board.archive .rowli { grid-template-columns: 44px 36px minmax(0,1fr) auto; row-gap: .35rem; padding: .75rem .85rem; }
  .claim-rank { display: none; }
  .who .meta .clicks, .who .meta .crown { display: none; }
}
@media (max-width: 480px) {
  .btn.lg { width: 100%; }
  .cta-row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .btn:hover, .cat-card:hover { transform: none; }
}

/* ------------------------------------------------- rules: allow/deny list */
.ruleset { list-style: none; margin: 0 0 2rem; padding: 0; }
.ruleset li { position: relative; padding: .9rem 0 .9rem 2rem; border-bottom: 1px solid var(--line); color: #43403a; font-size: .95rem; }
.ruleset li:last-child { border: 0; }
.ruleset li::before { position: absolute; left: 0; top: .85rem; font-size: 1rem; line-height: 1.2; }
.ruleset .allow::before { content: "✓"; color: var(--green); }
.ruleset .deny::before  { content: "✕"; color: var(--red); }
.ruleset strong { color: var(--text); }
.no-margin { margin-bottom: 0; }

/* The "this site is already listed" answer on the claim form. */
.existing-notice { border: 1px solid #f0dcae; background: var(--gold-soft); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.existing-notice p { margin: 0 0 .75rem; font-size: .92rem; }
.existing-notice .row { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ------------------------------------------------------- rank history */
.chart-wrap { width: 100%; overflow-x: auto; }
.chart-wrap svg { width: 100%; height: auto; max-width: 100%; }
.chart-empty { padding: 2rem 0; }

/* ------------------------------------------------------------ seasons */
.season-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 3rem; }
.season-card { display: flex; flex-direction: column; gap: .45rem; padding: 1.25rem; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s, transform .15s; }
.season-card:hover { border-color: var(--gold); box-shadow: var(--shadow); transform: translateY(-2px); }
.season-when { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.season-top { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: 1.05rem; }
.season-top .medal { font-size: 1.1rem; }
.season-live { border-color: #f0dcae; background: var(--gold-soft); }
.season-chip { display: inline-flex; align-items: center; gap: .4rem; }
.season-chip strong { color: var(--gold-ink); }

/* Movement against where a listing started the season. */
.move { font-variant-numeric: tabular-nums; font-size: .78rem; padding: .1rem .4rem; border-radius: 6px; }
.move.up   { color: var(--green); background: #e8f7f0; }
.move.down { color: var(--red);   background: #fdeeeb; }
.move.flat, .move.new { color: var(--muted); background: var(--silver-soft); }

/* --------------------------------------------------------- auto-defend */
.chip.on { color: var(--green); border-color: #bfe6d6; background: #e8f7f0; }
.check { display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem; font-size: .92rem; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--gold); }
.hint.warn { color: var(--gold-ink); background: var(--gold-soft); border: 1px solid #f0dcae;
  border-radius: 10px; padding: .6rem .8rem; }
