/* ==========================================================================
   NapBet — page-level blocks.
   main.css holds the system; this holds the layouts built out of it.
   ========================================================================== */

/* --- Home: hero --------------------------------------------------------- */
.hero {
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero::before {
  /* Soft vignette so the black logo lockup has something to sit in */
  content: "";
  position: absolute;
  inset: -40% 20% auto;
  height: 520px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.07), transparent 65%);
  pointer-events: none;
}
:root[data-theme="light"] .hero::before {
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.05), transparent 65%);
}
.hero__inner { position: relative; text-align: center; }
.hero__lockup { height: 84px; width: auto; margin: 0 auto 28px; }
:root[data-theme="light"] .hero__lockup { filter: invert(1); }
.hero h1 {
  max-width: 17ch;
  margin: 0 auto 16px;
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.4rem);
  letter-spacing: -0.035em;
}
.hero p { max-width: 52ch; margin: 0 auto 28px; font-size: 1.0625rem; }
.hero__cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.hero__ticker {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hero__ticker div { text-align: center; }
.hero__ticker strong {
  display: block;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.hero__ticker span { font-size: 0.75rem; color: var(--text-faint); }

/* --- Home: section headers ---------------------------------------------- */
.section { padding-block: 56px; }
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.section__head p { margin-top: 4px; font-size: 0.9375rem; }

/* --- Category strip ----------------------------------------------------- */
.cat-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.cat-strip a {
  padding: 16px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.cat-strip a:hover { border-color: var(--border-strong); background: var(--surface-2); }
.cat-strip strong { display: block; font-size: 0.875rem; margin-bottom: 3px; }
.cat-strip span { font-size: 0.75rem; color: var(--text-faint); line-height: 1.4; display: block; }

/* --- How it works steps ------------------------------------------------- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 52px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.step h3 { margin-bottom: 5px; font-size: 1rem; }
.step p { font-size: 0.9375rem; }

/* --- Browse: filter bar ------------------------------------------------- */
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.filters .search { position: relative; flex: 1; min-width: 220px; }
.filters .search .input { padding-left: 36px; }
.filters .search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  transition: all 0.15s var(--ease);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  font-weight: 600;
}

.result-count { font-size: 0.8125rem; color: var(--text-faint); }

/* --- Market detail ------------------------------------------------------ */
.market-head { margin-bottom: 22px; }
.market-head__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.market-head h1 {
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem);
  line-height: 1.25;
  max-width: 24ch;
  margin-bottom: 14px;
}
.market-head__stats {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.market-head__stats div span {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 2px;
}
.market-head__stats div strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.price-display { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.price-display__big {
  font-size: 3.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.price-display__delta { font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.price-chart { width: 100%; height: auto; display: block; }

.chart-card { padding: 20px; }
.chart-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.tabs button {
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.tab-panel[hidden] { display: none; }

/* --- Trade ticket ------------------------------------------------------- */
.ticket { padding: 18px; }
.ticket h3 { font-size: 0.9375rem; margin-bottom: 14px; }

.ticket__sides { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.ticket__side {
  padding: 13px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  text-align: left;
  transition: all 0.15s var(--ease);
}
.ticket__side span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-faint);
  margin-bottom: 3px;
}
.ticket__side strong {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.ticket__side[aria-pressed="true"][data-side="YES"] {
  background: var(--yes-soft); border-color: var(--yes); color: var(--yes);
}
.ticket__side[aria-pressed="true"][data-side="YES"] span,
.ticket__side[aria-pressed="true"][data-side="YES"] strong { color: var(--yes); }
.ticket__side[aria-pressed="true"][data-side="NO"] {
  background: var(--no-soft); border-color: var(--no); color: var(--no);
}
.ticket__side[aria-pressed="true"][data-side="NO"] span,
.ticket__side[aria-pressed="true"][data-side="NO"] strong { color: var(--no); }

.ticket__presets { display: flex; gap: 6px; margin-top: 8px; }
.ticket__presets button {
  flex: 1;
  padding: 6px 0;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: all 0.15s var(--ease);
}
.ticket__presets button:hover { border-color: var(--border-strong); color: var(--text); }

.ticket__summary {
  margin: 16px 0;
  padding: 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 0.8125rem;
}
.ticket__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-variant-numeric: tabular-nums;
}
.ticket__row span { color: var(--text-dim); }
.ticket__row strong { font-weight: 600; }
.ticket__row--total {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}

.ticket__note {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.5;
}

/* --- Stat tiles --------------------------------------------------------- */
.stat-tile {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
}
.stat-tile__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 7px;
}
.stat-tile__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-tile__sub { display: block; margin-top: 4px; font-size: 0.75rem; color: var(--text-faint); }

/* --- Leaderboard -------------------------------------------------------- */
.rank {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.rank[data-medal="1"] { background: rgba(240, 180, 41, 0.16); border-color: var(--warn); color: var(--warn); }
.rank[data-medal="2"] { background: rgba(190, 196, 204, 0.16); border-color: #bec4cc; color: #bec4cc; }
.rank[data-medal="3"] { background: rgba(196, 130, 84, 0.16); border-color: #c48254; color: #c48254; }

tr[data-you="true"] { background: var(--info-soft); }
tr[data-you="true"]:hover { background: var(--info-soft); }

.accuracy-bar {
  position: relative;
  width: 64px;
  height: 4px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
}
.accuracy-bar div { position: absolute; inset: 0 auto 0 0; background: var(--text-dim); border-radius: 99px; }

/* --- Wallet ------------------------------------------------------------- */
.balance-hero {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
}
.balance-hero__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.balance-hero__amount {
  display: block;
  margin: 8px 0 4px;
  font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.balance-hero__actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.ledger-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
}
.ledger-type::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
}
.ledger-type[data-type="deposit"]::before    { background: var(--yes); }
.ledger-type[data-type="withdrawal"]::before { background: var(--warn); }
.ledger-type[data-type="trade"]::before      { background: var(--info); }
.ledger-type[data-type="settlement"]::before { background: var(--yes); }

/* --- Create market ------------------------------------------------------ */
.form-section { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.form-section:last-of-type { border-bottom: 0; margin-bottom: 0; }
.form-section > h2 { font-size: 1.0625rem; margin-bottom: 4px; }
.form-section > p { font-size: 0.875rem; margin-bottom: 18px; }

.preview-card { position: sticky; top: calc(var(--header-h) + 24px); }

/* --- Settings ----------------------------------------------------------- */
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 2px; }
.settings-nav a {
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  color: var(--text-dim);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.settings-nav a:hover { background: var(--surface-2); color: var(--text); }
.settings-nav a[aria-current="true"] { background: var(--surface-2); color: var(--text); font-weight: 600; }

.danger-zone { border-color: var(--no-line); }
.danger-zone h3 { color: var(--no); }

/* --- 404 ---------------------------------------------------------------- */
.error-page {
  min-height: calc(100vh - var(--header-h) - 200px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 64px 20px;
}
.error-page__code {
  font-size: clamp(4rem, 2rem + 10vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--surface-3);
}

/* --- Legal pages -------------------------------------------------------- */
.legal-meta {
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: 32px;
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1000px) {
  .cat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-layout { grid-template-columns: 1fr; gap: 20px; }
  .settings-nav {
    position: static;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .preview-card { position: static; }
}

@media (max-width: 640px) {
  .cat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 48px 0 40px; }
  .hero__lockup { height: 62px; }
  .hero__ticker { gap: 20px; }
  .market-head__stats { gap: 18px; }
  .price-display__big { font-size: 2.5rem; }
  .section { padding-block: 40px; }
}

/* --- People: search results and follow lists ---------------------------- */
.person-list {
  display: grid;
  gap: 8px;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.person:hover { border-color: var(--border-strong); background: var(--surface-2); }

.person__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.person__avatar--initials {
  display: grid;
  place-items: center;
  background: var(--surface-3);
  font-size: 0.8125rem;
  font-weight: 650;
}

.person__body { flex: 1; min-width: 0; }
.person__body strong {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.3;
  /* A long display name must not push the follow button off the row */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person__handle { display: block; font-size: 0.8125rem; color: var(--text-faint); }
.person__meta   { display: block; font-size: 0.75rem; color: var(--text-faint); margin-top: 2px; }

/* --- Profile ------------------------------------------------------------ */
.profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.profile__avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.profile__avatar--initials {
  display: grid;
  place-items: center;
  background: var(--surface-3);
  font-size: 2.25rem;
  font-weight: 700;
}
.profile-head__body { flex: 1; min-width: 220px; }
.profile-head__body h1 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.875rem); }
.profile-head__handle { font-size: 0.9375rem; color: var(--text-faint); margin-top: 2px; }

/* --- Home: signed-in dashboard ------------------------------------------ */
.hero--compact { padding: 36px 0 32px; text-align: left; }
.hero--compact::before { display: none; }

.people-quick {
  display: flex;
  gap: 10px;
  align-items: center;
}
.people-quick .search { position: relative; flex: 1; }
.people-quick .search .input { padding-left: 36px; }
.people-quick .search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

/* --- Feed --------------------------------------------------------------- */
.feed { display: grid; }
.feed__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.feed__row:last-child { border-bottom: 0; }
.feed__row:hover { background: var(--surface-2); }

.feed__body { flex: 1; min-width: 0; font-size: 0.875rem; }
.feed__who { font-weight: 600; }
.feed__who:hover { text-decoration: underline; }
.feed__market {
  display: block;
  margin-top: 2px;
  font-size: 0.8125rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed__market:hover { color: var(--text); }
.feed__when { font-size: 0.75rem; white-space: nowrap; flex-shrink: 0; }

@media (max-width: 560px) {
  .people-quick { flex-direction: column; align-items: stretch; }
  .profile-head { gap: 14px; }
  .profile__avatar { width: 84px; height: 84px; }
  .profile__avatar--initials { font-size: 1.75rem; }
  .feed__when { display: none; }
}

/* --- Signed-in home: fit the board above the fold ----------------------- */
/*
   The point of the signed-in home page is the market board. On a 1366x768
   laptop — still one of the most common sizes — a full-height hero pushed the
   first row of cards entirely out of view. Everything below trims the space
   above the board without dropping any information from it.
*/
.hero--compact { padding: 26px 0 22px; }

/* The section immediately after the hero sits closer to it. */
.hero--compact + .section { padding-top: 28px; }

/* Denser stat tiles, used only in the signed-in hero. */
.hero--compact .stat-tile { padding: 11px 14px; }
.hero--compact .stat-tile__label { margin-bottom: 4px; font-size: 0.625rem; }
.hero--compact .stat-tile__value { font-size: 1.25rem; }
.hero--compact .stat-tile__sub { margin-top: 2px; font-size: 0.6875rem; }

.hero--compact .people-quick { margin-top: 16px; }
.hero--compact .people-quick .input { padding-top: 8px; padding-bottom: 8px; }

/* The greeting row does not need the full section heading rhythm. */
.hero--compact .row--between { margin-bottom: 16px !important; }

/* --- Home: the signed-in greeting carries your avatar ------------------- */
.home-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.home-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  display: block;
  transition: border-color 0.15s var(--ease);
}
a:hover > .home-avatar { border-color: var(--border-strong); }

@media (max-width: 560px) {
  .home-avatar { width: 44px; height: 44px; }
  .home-identity { gap: 11px; }
}

/* --- Crypto deposit ----------------------------------------------------- */
.chain-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: var(--r);
  background: var(--warn-soft);
  font-size: 0.8125rem;
  color: var(--text-dim);
}
.chain-banner strong { color: var(--text); }

.address-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.75rem;
  word-break: break-all;
}
.address-box span { flex: 1; min-width: 0; }

.crypto-steps { display: grid; gap: 16px; }
.crypto-step__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
}
.tx-row:last-child { border-bottom: 0; }
.tx-row a { font-family: var(--mono); font-size: 0.75rem; }

/* --- Wallet picker ------------------------------------------------------ */
.wallet-picker { display: grid; gap: 8px; }
.wallet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
}
.wallet-btn__icon { border-radius: 4px; flex-shrink: 0; }

/* --- Deposit tutorial --------------------------------------------------- */

.method-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.method-switch__btn {
  flex: 1;
  padding: 9px 12px;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--text-dim);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}
.method-switch__btn.is-active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.16);
}

.calc {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}
.calc__arrow {
  padding-bottom: 12px;
  font-size: 1.125rem;
  color: var(--text-faint);
}
.calc__result {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}
.calc__coins {
  font-family: var(--mono);
  font-size: 1.0625rem;
  color: var(--text);
}

/* Phones: the arrow reads wrong once the columns stack, so it goes. */
@media (max-width: 520px) {
  .calc { flex-direction: column; align-items: stretch; gap: 14px; }
  .calc__arrow { display: none; }
  .calc__result { align-items: stretch; }
}

.faq {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.faq summary {
  font-size: 0.9375rem;
  font-weight: 550;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  float: right;
  margin-left: 12px;
  font-weight: 400;
  color: var(--text-faint);
}
.faq[open] summary::after { content: '\2212'; }
.faq p {
  margin: 10px 0 0;
  font-size: 0.9375rem;
  color: var(--text-dim);
}

/* Guide link inside the deposit panel. Sits above the form, so it reads as an
   offer of help rather than an apology after something has already failed. */
.help-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.875rem;
  color: var(--text-dim);
  text-decoration: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.help-link:hover { border-color: var(--border-strong); }
.help-link strong { color: var(--text); }
.help-link__icon { flex-shrink: 0; margin-top: 1px; color: var(--text); }
.help-link__go { margin-left: auto; padding-left: 8px; color: var(--text-faint); }

/* --- Invite strip -------------------------------------------------------- */

.invite-bar {
  background: var(--yes-soft);
  border-bottom: 1px solid var(--border);
}
.invite-bar__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.invite-bar__text {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  color: var(--text-dim);
}
.invite-bar__text strong { color: var(--text); }
.invite-bar__close {
  flex-shrink: 0;
  padding: 4px;
  color: var(--text-faint);
  background: none;
  border: 0;
  cursor: pointer;
  line-height: 0;
}
.invite-bar__close:hover { color: var(--text); }

/* Phones: the sentence wraps, so the button goes under it rather than
   squeezing both onto one line. */
@media (max-width: 640px) {
  .invite-bar__inner { flex-wrap: wrap; gap: 10px; }
  .invite-bar__text { flex-basis: 100%; }
  .invite-bar .btn { flex: 1; }
  .invite-bar__close { order: 3; }
}

.hero__referral {
  max-width: 52ch;
  /* Enough air that the green block reads as its own thing rather than as
     part of the buttons above it. The hero's own CTA row carries a bottom
     margin on some breakpoints, so this is set high enough to clear it. */
  margin-top: 56px;
  padding: 14px 16px;
  font-size: 0.9375rem;
  color: var(--text-dim);
  /* The same green the site uses for a win, so the offer reads as good news
     rather than as another notice. yes-soft is already theme-aware, so this
     stays legible in light mode without a second rule. */
  background: var(--yes-soft);
  border: 1px solid color-mix(in srgb, var(--yes) 28%, transparent);
  border-radius: var(--r);
}

/* Centred hero on the signed-out page, so the block does not sit off to one
   side of the text above it. */
.hero__inner .hero__referral { margin-inline: auto; text-align: left; }
.hero__referral strong { color: var(--text); }
.hero__referral em { font-style: normal; color: var(--yes); font-weight: 600; }

/* --- Invite list (admins send more than one) ----------------------------- */

.invite-list { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; }
.invite-list__head { margin-bottom: 8px; }
.invite-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.invite-row:last-child { border-bottom: 0; }
.invite-row__who { flex: 1; min-width: 0; font-size: 0.875rem; }
.invite-row__who strong { font-family: var(--mono); font-size: 0.8125rem; }

/* --- Cash-out ------------------------------------------------------------ */

.cashout-readout { font-size: 1.375rem; font-variant-numeric: tabular-nums; }
.cashout-bounds { font-size: 0.75rem; color: var(--text-faint); margin-top: 6px; }

/* The slider. Styled per-engine because range inputs have no shared shadow
   DOM, and left alone iOS draws its own blue pill that ignores the theme. */
.cashout-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  margin-top: 12px;
  background: transparent;
  /* Space for the thumb to reach a 44px tap target without a huge track. */
  padding: 12px 0;
}
.cashout-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
}
.cashout-slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
}
.cashout-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;           /* centres it on a 6px track */
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--bg);
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
  cursor: grab;
}
.cashout-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--bg);
  cursor: grab;
}
.cashout-slider:active::-webkit-slider-thumb { cursor: grabbing; }
.cashout-slider:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--yes); }

.cashout-progress__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.cashout-progress__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--yes);
  transition: width 0.3s var(--ease);
}

.cashout-history { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; }
.cashout-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.cashout-row:last-child { border-bottom: 0; }
.cashout-row__main { display: flex; align-items: center; gap: 10px; }
.cashout-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* --- Admin cash-out queue ------------------------------------------------ */

.cq-row {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cq-row:last-child { border-bottom: 0; }
.cq-row__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cq-row__amount { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.cq-row__addr {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  word-break: break-all;
}
.cq-row__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.75rem;
  color: var(--text-faint);
}
.cq-row__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cq-uncovered { color: var(--no); font-weight: 600; }
