/* ---------------------------------------------------------------------------
   Top of the List
   Brand green is #6EE787 — a bright mint, used verbatim and never darkened or
   lightened. It is luminous, so it works as a FILL in both themes (dark ink on
   top of it) but as a text colour only against a dark background. Light mode
   therefore carries no green text at all: --accent-text falls back to the
   normal ink there, and green appears as a fill or an underline instead.
--------------------------------------------------------------------------- */

:root {
  --brand: #6EE787;

  --bg: #FBFDFB;
  --surface: #FFFFFF;
  --surface-2: #F4F8F5;
  --border: #E3EBE5;
  --border-strong: #CFDCD3;

  --text: #0B1410;
  --muted: #5D6E63;
  --faint: #8B9A90;

  /* #6EE787 is used verbatim and is the only green in the file. The tints below
     are that exact hex at reduced alpha, so no second green ever creeps in. */
  --accent: #6EE787;
  --accent-ink: #05210D;
  --accent-soft: rgba(110, 231, 135, .16);
  --accent-line: rgba(110, 231, 135, .50);

  /* Light mode carries no green *text*: #6EE787 on white measures about 1.5:1,
     which is unreadable. Here the green appears only as a fill or an underline
     and text keeps the normal ink colour. Dark mode overrides this to #6EE787. */
  --accent-text: var(--text);

  --danger: #C2402F;
  --danger-soft: #FDECEA;

  --shadow-sm: 0 1px 2px rgba(11, 20, 16, .06), 0 1px 3px rgba(11, 20, 16, .04);
  --shadow-md: 0 4px 12px rgba(11, 20, 16, .07), 0 2px 4px rgba(11, 20, 16, .04);
  --shadow-lg: 0 24px 60px rgba(11, 20, 16, .16);
  --glow: 0 0 0 4px rgba(110, 231, 135, .22);

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Pure black ground. Surfaces step up in neutral greys so cards read as
       lifted panels rather than a second green. */
    --bg: #000000;
    --surface: #0A0A0A;
    --surface-2: #141414;
    --border: #1F1F1F;
    --border-strong: #303030;

    /* Text is neutral grey, never pure white. Muted and faint step down from it
       in the same neutral family so nothing picks up a green cast. */
    --text: #D9D9D9;
    --muted: #949494;
    --faint: #6B6B6B;

    --accent-text: #6EE787;
    --accent-soft: rgba(110, 231, 135, .12);
    --accent-line: rgba(110, 231, 135, .34);

    --danger: #FF8A78;
    --danger-soft: rgba(255, 138, 120, .12);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, .5);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, .7);
  }
}

:root[data-theme="dark"] {
  /* Pure black ground. Surfaces step up in neutral greys so cards read as
     lifted panels rather than a second green. */
  --bg: #000000;
  --surface: #0A0A0A;
  --surface-2: #141414;
  --border: #1F1F1F;
  --border-strong: #303030;

  /* Text is neutral grey, never pure white. Muted and faint step down from it
     in the same neutral family so nothing picks up a green cast. */
  --text: #D9D9D9;
  --muted: #949494;
  --faint: #6B6B6B;

  --accent-text: #6EE787;
  --accent-soft: rgba(110, 231, 135, .12);
  --accent-line: rgba(110, 231, 135, .34);

  --danger: #FF8A78;
  --danger-soft: rgba(255, 138, 120, .12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, .5);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

h1, h2, h3 { margin: 0; letter-spacing: -.022em; line-height: 1.15; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }

/* --- top bar -------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
  font-size: 1.02rem;
}

/* The mark ships with its own transparent background, so it needs no plate
   behind it and sits correctly on both themes. */
.mark {
  width: 30px; height: 30px;
  object-fit: contain;
  flex: none;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-mark { width: 22px; height: 22px; object-fit: contain; }

/* Live presence, centred in the bar. The pulsing dot is the one place the
   brand green is allowed to move. */
.presence {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: .82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.presence-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.presence b { color: var(--text); font-weight: 700; }

.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: live-pulse 2.4s ease-out infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
}

.topbar-actions { display: flex; align-items: center; gap: 6px; }

.ghost-link {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
}
.ghost-link:hover { color: var(--text); background: var(--surface-2); }
.ghost-link.is-active { color: var(--text); background: var(--surface-2); }

/* Timezone picker. It changes only how the reset instant is displayed — the
   board still flips at the same moment for everyone. */
.tz-select {
  max-width: 138px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}
.tz-select:hover { color: var(--text); border-color: var(--accent-line); }
.tz-select:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--glow); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.theme-toggle:hover { color: var(--accent-text); border-color: var(--accent-line); }
.theme-toggle svg { width: 18px; height: 18px; }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}

/* --- layout --------------------------------------------------------------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 96px;
}

/* --- hero ----------------------------------------------------------------- */
/* Tight on purpose: the board is the product, so the hero has to end early
   enough that the first ranked sites are on screen without scrolling. */
.hero {
  padding: 26px 0 30px;
  /* Wide enough that the headline holds one line on desktop — wrapping it cost
     over a hundred pixels, which is the difference between the board being on
     the first screen and not. */
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.hero-tight { padding: 40px 0 30px; }

.hero h1 {
  margin: 0 0 11px;
  font-size: clamp(1.8rem, 3.7vw, 2.6rem);
  font-weight: 800;
  text-wrap: balance;
}
/* Light mode gets #6EE787 as a fat underline behind readable ink; dark mode can
   afford the green as the text colour itself. Same hex either way. */
.hero h1 em {
  font-style: normal;
  color: var(--accent-text);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% .2em;
  background-position: 0 92%;
  background-repeat: no-repeat;
}
:root[data-theme="dark"] .hero h1 em { background-image: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero h1 em { background-image: none; }
}

.lede {
  color: var(--muted);
  font-size: .98rem;
  max-width: 62ch;
  margin: 0 auto;
}
.lede strong { color: var(--text); font-weight: 700; }

/* The price of #1 is the single most useful number on the page, so it is the
   largest thing in the hero rather than a footnote beside the button. */
.crown {
  display: grid;
  justify-items: center;
  gap: 1px;
  margin-top: 18px;
}
.crown-label {
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--faint);
}
.crown-price {
  font-size: clamp(2.6rem, 6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.045em;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}
.btn-lg { padding: 12px 24px; font-size: .97rem; margin-top: 10px; }

/* The reset clock rides under the CTA instead of taking a tile of its own, so
   the board starts higher up the page. */
.hero-reset {
  margin-top: 12px;
  font-size: .8rem;
  color: var(--faint);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-reset .countdown { font-size: .86rem; color: var(--muted); gap: 4px; }
.hero-reset .cd-seg i { font-size: .6em; }

/* --- buttons -------------------------------------------------------------- */
.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s ease, background .2s, box-shadow .2s, border-color .2s;
}
.btn:active { transform: translateY(1px); }

/* Hover keeps the same fill and adds the glow, so the hex never changes. */
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { box-shadow: var(--glow); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-sm { padding: 9px 15px; font-size: .875rem; }
.btn-block { width: 100%; }

/* --- stat strip ----------------------------------------------------------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 34px;
}
.stat-strip-under { margin: 14px 0 0; }
.stat-strip-under .stat { padding: 14px 18px; }
.stat-strip-under .stat-value { font-size: 1.3rem; }
.stat {
  background: var(--surface);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stat-label { color: var(--faint); font-size: .82rem; font-weight: 500; }

/* Live countdown. Only the segment whose value changed animates, so the clock
   reads as ticking rather than flickering all at once. */
.countdown {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 1.42rem;
}
.cd-seg { display: inline-flex; align-items: baseline; }
.cd-seg b { font-weight: 800; letter-spacing: -.02em; }
.cd-seg i {
  font-style: normal;
  font-size: .52em;
  font-weight: 700;
  color: var(--faint);
  margin-left: 2px;
}
.cd-seg.is-ticking b { animation: cd-tick .5s ease-out; }
@keyframes cd-tick {
  0%   { color: var(--accent); transform: translateY(-2px); }
  55%  { color: var(--accent); }
  100% { color: inherit; transform: none; }
}

/* --- panels --------------------------------------------------------------- */
.panel { margin-bottom: 56px; scroll-margin-top: 84px; }

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.panel-head h2 { font-size: 1.32rem; }
.panel-sub { color: var(--muted); font-size: .9rem; margin-top: 5px; max-width: 66ch; }

/* --- economics table ------------------------------------------------------ */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.econ-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.econ-table th {
  text-align: left;
  padding: 13px 18px;
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--faint);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}
.econ-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  font-size: .94rem;
}
.econ-table tr:last-child td { border-bottom: none; }
.econ-table tr.is-top td { background: var(--accent-soft); }

.pos-badge {
  display: inline-grid;
  place-items: center;
  min-width: 26px; height: 26px;
  padding: 0 7px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: .82rem;
}
tr.is-top .pos-badge {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.cpc-good { color: var(--accent-text); font-weight: 700; }
.cell-dim { color: var(--faint); }

.verify-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: .88rem;
}
.verify-note code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .84em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
}

/* --- board ---------------------------------------------------------------- */
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.row {
  display: grid;
  grid-template-columns: 52px 40px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s, transform .12s;
}
.row:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.row.rank-1 {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-md);
}

.rank {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-weight: 800;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.rank-1 .rank {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.row-main { min-width: 0; }
.row-title {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.row-title a {
  font-weight: 700;
  font-size: 1.03rem;
  text-decoration: none;
  letter-spacing: -.012em;
}
.row-title a:hover {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.host {
  color: var(--faint);
  font-size: .82rem;
  font-weight: 500;
}
/* The site's own favicon, proxied through /icon/. Contained rather than cropped
   so wordmark-shaped icons are not sliced. */
.logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px;
}

.row-about {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
  margin-top: 3px;
  max-width: 78ch;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-meta {
  display: flex;
  gap: 14px;
  margin-top: 4px;
  font-size: .78rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.row-meta b { color: var(--muted); font-weight: 700; }

.row-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bid-amount {
  text-align: right;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bid-amount small {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  color: var(--faint);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.empty {
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
}

/* --- steps ---------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.step-n {
  display: grid;
  place-items: center;
  width: 27px; height: 27px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: .82rem;
  margin-bottom: 13px;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .9rem; }

/* --- hall of fame --------------------------------------------------------- */
.fame-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.fame-week { color: var(--faint); font-size: .82rem; font-variant-numeric: tabular-nums; }

/* --- footer --------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 24px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-brand { font-weight: 800; margin-bottom: 8px; }
.footer-fine { color: var(--faint); font-size: .82rem; max-width: 54ch; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
}
.footer-links a:hover { color: var(--accent-text); }

/* --- modal ---------------------------------------------------------------- */
.modal {
  width: min(440px, calc(100vw - 32px));
  max-height: min(92vh, 760px);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);

  /* Content is sized to fit, so no bar should ever appear. Scrolling stays
     available for very short viewports — it just does not draw a scrollbar. */
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal::-webkit-scrollbar { width: 0; height: 0; display: none; }
.modal::backdrop { background: rgba(0, 0, 0, .66); backdrop-filter: blur(3px); }
.modal-sm { width: min(390px, calc(100vw - 32px)); text-align: center; }

.modal-close-form { position: absolute; top: 14px; right: 14px; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--faint);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }

.modal h2 { font-size: 1.18rem; padding-right: 28px; }
.modal-sub { color: var(--muted); font-size: .88rem; margin-top: 5px; }

.bid-form { display: grid; gap: 13px; margin-top: 18px; }

.field { display: grid; gap: 6px; }
.field > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: .83rem;
  font-weight: 700;
}
/* Counters and hints ride on the label row instead of taking their own line. */
.field > span em {
  color: var(--faint);
  font-style: normal;
  font-weight: 500;
  font-size: .76rem;
  text-align: right;
}
.field-hint { font-size: .8rem; color: var(--faint); }

/* Logo pulled live from the site being listed. */
.name-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
}
.logo-preview {
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.logo-letter { font-weight: 800; color: var(--faint); font-size: 1.05rem; }
.logo-preview.is-loading { animation: logo-wait 1.1s ease-in-out infinite; }
@keyframes logo-wait { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

input[type="text"], input[type="number"], input[type="url"], textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: .95rem;
}
textarea { resize: vertical; min-height: 58px; line-height: 1.45; }
input:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.bid-input {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
  align-items: center;
}
.stepper {
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
}
.stepper:hover { border-color: var(--accent); color: var(--accent-text); }

.amount { position: relative; }
.amount .cur {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  font-weight: 700;
  pointer-events: none;
}
.amount input {
  padding-left: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.amount input::-webkit-outer-spin-button,
.amount input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount input { -moz-appearance: textfield; }

.legal-note {
  font-size: .75rem;
  color: var(--faint);
  line-height: 1.45;
  padding: 9px 11px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* The demo notice rides inside the submit button rather than adding a row. */
#submitBtn { flex-direction: column; gap: 1px; padding: 11px 20px; }
.btn-note {
  font-style: normal;
  font-size: .68rem;
  font-weight: 600;
  opacity: .6;
}

.form-error {
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: .88rem;
  font-weight: 600;
}

.done-mark {
  width: 54px; height: 54px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}
.done-mark svg { width: 27px; height: 27px; }
.done-actions { display: grid; gap: 8px; margin-top: 18px; }

/* --- first-visit welcome -------------------------------------------------- */
.modal-welcome { width: min(478px, calc(100vw - 32px)); }

.welcome-badge {
  display: block;
  width: 44px; height: 44px;
  object-fit: contain;
  margin-bottom: 13px;
}

.welcome-points {
  list-style: none;
  margin: 17px 0 0;
  padding: 0;
  display: grid;
  gap: 11px;
}
.welcome-points li {
  display: grid;
  grid-template-columns: 23px 1fr;
  gap: 10px;
  align-items: start;
  font-size: .86rem;
  line-height: 1.48;
  color: var(--muted);
}
.welcome-points b { color: var(--text); font-weight: 700; }

.wp-n {
  display: grid;
  place-items: center;
  width: 23px; height: 23px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .72rem;
  font-weight: 800;
  margin-top: 1px;
}

.welcome-foot {
  margin-top: 15px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: .78rem;
  line-height: 1.45;
  color: var(--faint);
}

/* --- charts --------------------------------------------------------------- */
/* Single-series magnitude bars: one hue, no legend, the value printed on every
   row. #6EE787 measures under 3:1 against a light surface, so those visible
   labels and the table beneath each chart are required relief, not decoration.
   The track outline gives the bar a readable extent even where the fill is low
   contrast. */
.chart {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
}

.bars { display: grid; gap: 2px; } /* 2px surface gap between adjacent bars */

.bar-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(84px, 200px) 1fr 54px;
  align-items: center;
  gap: 14px;
  padding: 5px 8px;
  border-radius: 8px;
  transition: background .15s ease;
}
.bar-row:hover { background: var(--surface-2); }

.bar-label {
  font-size: .86rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-row.is-top .bar-label { color: var(--text); }

.bar-track {
  height: 22px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  min-width: 3px;
  border-radius: 4px;
  background: var(--accent);
  transition: width .4s ease;
}

.bar-value {
  text-align: right;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Hover surfaces the price behind the bar without crowding the resting state. */
.bar-hint {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--muted);
  font-size: .76rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
  box-shadow: var(--shadow-sm);
}
.bar-row:hover .bar-hint { opacity: 1; }

.site-cell { display: inline-flex; align-items: center; gap: 9px; }
.logo-sm { width: 24px; height: 24px; border-radius: 7px; padding: 2px; flex: none; }

.site-link { font-weight: 700; text-decoration: none; }
.site-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.inline-link {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  white-space: nowrap;
}

/* --- long-form pages ------------------------------------------------------ */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.4rem); margin-bottom: 8px; }
.prose h2 {
  font-size: 1.08rem;
  margin: 34px 0 10px;
  letter-spacing: -.012em;
}
.prose p, .prose li { color: var(--muted); line-height: 1.68; }
.prose p + p { margin-top: 12px; }
.prose ul { margin: 12px 0; padding-left: 20px; }
.prose li { margin-bottom: 7px; }
.prose strong { color: var(--text); font-weight: 700; }
.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .86em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
}
.prose-meta { font-size: .84rem; color: var(--faint); margin-bottom: 6px; }

/* Deliberately loud: these are the operator details that must be filled in
   before the pages are fit to publish, and a blank would look finished. */
.fill {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px dashed currentColor;
  border-radius: 5px;
  padding: 0 6px;
  font-size: .82em;
  font-weight: 700;
  letter-spacing: .04em;
}

/* --- responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
  .presence-total { display: none; }
}

@media (max-width: 640px) {
  .bar-row { grid-template-columns: minmax(64px, 120px) 1fr 44px; gap: 10px; }
  .bar-hint { display: none; }
  .presence { font-size: .78rem; }
  .tz-select { max-width: 116px; font-size: .76rem; padding: 7px 8px; }
  .countdown { font-size: 1.25rem; gap: 4px; }
  .modal { padding: 20px; }
  main { padding: 0 16px 72px; }
  .topbar { padding: 12px 16px; }
  .hero { padding: 48px 0 36px; }
  .row { grid-template-columns: 44px 36px 1fr; gap: 12px; }
  .logo { width: 36px; height: 36px; }
  .row-right { grid-column: 1 / -1; justify-content: space-between; }
  .ghost-link { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
