/* Editique — one stylesheet for the public site, dashboard and admin. */

:root {
  --bg: #101012;
  --surface: #18181b;
  --surface-2: #202024;
  --surface-3: #2a2a30;
  --border: #2a2a2f;
  --border-strong: #3a3a40;
  --text: #f4f3ee;
  --text-2: #c9c9cf;
  --muted: #a3a3aa;
  --muted-2: #8a8a93;
  --accent: #ff5a1f;
  --accent-hover: #ff7340;
  --accent-ink: #101012;
  --success: #3dd68c;
  --success-bg: rgba(61, 214, 140, 0.12);
  --warn: #f5b83d;
  --warn-bg: rgba(245, 184, 61, 0.12);
  --danger: #ff6b6b;
  --danger-bg: rgba(255, 107, 107, 0.12);
  --info: #7aa2ff;
  --info-bg: rgba(122, 162, 255, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
code, .mono { font-family: var(--mono); }
[hidden] { display: none !important; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 999px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.container-sm { max-width: 520px; }
.container-md { max-width: 820px; }
.section { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); }
.section-tight { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(32px, 5vw, 56px); }
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 32px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted-2);
}
.display, .h1, .h2 {
  font-weight: 800; font-stretch: 125%; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.98;
}
.display { font-size: clamp(36px, 6vw, 80px); }
.h1 { font-size: clamp(30px, 4.4vw, 56px); }
.h2 { font-size: clamp(26px, 3.4vw, 44px); }
.h3 { font-size: 20px; font-weight: 700; }
.h4 { font-size: 17px; font-weight: 700; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 620px; line-height: 1.55; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.accent { color: var(--accent); }
.prewrap { white-space: pre-line; overflow-wrap: anywhere; }
.break { overflow-wrap: anywhere; word-break: break-word; }
.num { font-variant-numeric: tabular-nums; }
.prose { color: var(--text-2); line-height: 1.65; }
.prose h2 { font-size: 22px; margin: 32px 0 10px; color: var(--text); }
.prose p, .prose ul { margin: 0 0 14px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose.rich { overflow-wrap: anywhere; }
.prose h3 { font-size: 13px; font-family: var(--mono); letter-spacing: .08em; color: var(--text); margin: 26px 0 8px; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: 15px; font-weight: 700; line-height: 1; text-decoration: none;
  cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s, transform .12s ease, box-shadow .2s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--text-2); color: #fff; }
.btn-quiet { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-quiet:hover { background: var(--surface-3); color: #fff; }
.btn-success { background: var(--success); color: #0b1f15; }
.btn-success:hover { filter: brightness(1.08); color: #0b1f15; }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255, 107, 107, .45); }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 8px 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }
.inline-form { display: inline; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(18px, 2.4vw, 24px); }
.card-flush { padding: 0; overflow: hidden; }
.card-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.card-accent .muted, .card-accent .eyebrow { color: rgba(16, 16, 18, .72); }
.card h2 + p, .card h3 + p { margin-top: 6px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }

/* ---------- Badges & pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1.3; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.badge-plain::before { display: none; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-accent { background: rgba(255, 90, 31, .14); color: #ff8a5c; }
.pill { display: inline-flex; padding: 6px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); display: inline-block; flex: none; }

/* ---------- Alerts ---------- */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 15px; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { background: var(--success-bg); border-color: rgba(61, 214, 140, .35); color: #b6f5d5; }
.alert-error { background: var(--danger-bg); border-color: rgba(255, 107, 107, .4); color: #ffd0d0; }
.alert-info { background: var(--info-bg); border-color: rgba(122, 162, 255, .35); color: #d6e1ff; }
.alert-warn { background: var(--warn-bg); border-color: rgba(245, 184, 61, .35); color: #fbe3b3; }
.flash-wrap { padding-top: 16px; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
label, .label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 13px; color: var(--muted-2); }
.error-text { font-size: 13.5px; color: var(--danger); }
input[type='text'], input[type='email'], input[type='password'], input[type='url'], input[type='number'],
input[type='date'], input[type='search'], select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); border: 1px solid var(--border-strong);
  font: inherit; font-size: 16px; line-height: 1.4;
}
textarea { min-height: 120px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a3a3aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 90, 31, .22); }
input::placeholder, textarea::placeholder { color: #6e6e76; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--text-2); font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.check-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg); font-weight: 600; font-size: 14.5px; cursor: pointer; }
.check-chip input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.radio-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.radio-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg); cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.radio-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.radio-card strong { font-size: 15px; }
.radio-card span { font-size: 13px; color: var(--muted); }
.input-group { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.input-group input { flex: 1 1 120px; width: auto; }
.honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Site header ---------- */
.site-header { border-bottom: 1px solid var(--border); background: rgba(16, 16, 18, .92); position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 8px 0; }
.brand:hover { color: var(--text); }
.brand-dot { width: 12px; height: 12px; border-radius: 999px; background: var(--accent); flex: none; }
.brand-word { font-size: 19px; font-weight: 800; font-stretch: 125%; letter-spacing: 0.05em; }
.brand-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; padding: 3px 7px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }
.nav-links { display: none; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 15px; padding: 10px 0; }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: #fff; }
.nav-actions { display: none; align-items: center; gap: 8px; }
.nav-actions .link { color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px; }
.mnav { position: relative; }
.mnav > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); cursor: pointer; }
.mnav > summary::-webkit-details-marker { display: none; }
.mnav > summary svg { width: 22px; height: 22px; }
.mnav .icon-close { display: none; }
.mnav[open] .icon-open { display: none; }
.mnav[open] .icon-close { display: block; }
.mnav-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(88vw, 320px); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.mnav-panel a:not(.btn), .mnav-panel button.link-btn { display: block; padding: 13px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 16px; font-weight: 600; text-align: left; width: 100%; }
.mnav-panel a:not(.btn):hover { background: var(--surface-2); }
.mnav-panel .btn { margin-top: 8px; }
.mnav-panel hr { margin: 8px 0; }
@media (min-width: 900px) {
  .nav-links, .nav-actions { display: flex; }
  .mnav { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: auto; }
.site-footer .container { padding-top: 48px; padding-bottom: 32px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 48px; }
.footer-about { flex: 1 1 260px; max-width: 360px; }
.footer-cols { flex: 2 1 480px; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.footer-cols nav { display: flex; flex-direction: column; }
.footer-cols a { color: var(--text-2); text-decoration: none; font-size: 15px; padding: 8px 0; }
.footer-cols a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 40px; padding-top: 20px; font-size: 13px; color: var(--muted-2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------- Home ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero-copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-visual { flex: 1 1 380px; min-width: 0; }
.hero-solo .hero-copy { max-width: 820px; }
.ticks { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; font-size: 14.5px; color: var(--text-2); }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.platform-strip { display: flex; flex-wrap: wrap; gap: 10px 36px; font-size: clamp(15px, 1.8vw, 21px); font-weight: 700; font-stretch: 125%; text-transform: uppercase; color: var(--text-2); }
.steps { list-style: none; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); counter-reset: none; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.step-num { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--accent); }
.step p { font-size: 15px; color: var(--muted); }
.cycle { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.cycle svg { width: 16px; height: 16px; color: var(--muted-2); }
.feature-list { list-style: none; display: flex; flex-direction: column; }
.feature-list li { display: flex; gap: 16px; padding: 20px 0; border-top: 1px solid var(--border-strong); }
.feature-list li:last-child { border-bottom: 1px solid var(--border-strong); }
.icon-tile { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--bg); border: 1px solid var(--border-strong); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.icon-tile svg { width: 20px; height: 20px; }
.faq details { border-top: 1px solid var(--border-strong); }
.faq details:last-child { border-bottom: 1px solid var(--border-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-size: 17px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; color: var(--muted); flex: none; transition: transform .2s; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: 640px; }

/* ---------- Campaign cards ---------- */
.ccard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 18px; text-decoration: none; color: var(--text); transition: border-color .15s; min-width: 0; }
a.ccard:hover { border-color: var(--border-strong); color: var(--text); }
.ccard-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.logo-tile { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--surface-3); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; font-stretch: 125%; font-size: 15px; overflow: hidden; }
.logo-tile img { width: 100%; height: 100%; object-fit: cover; }
.logo-tile-lg { width: 64px; height: 64px; border-radius: 16px; font-size: 20px; }
.ccard-title { font-size: 18px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.rate { display: flex; flex-direction: column; gap: 2px; }
.rate-value { font-size: 30px; font-weight: 800; font-stretch: 125%; line-height: 1; }
.ccard-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.meter { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.empty { text-align: center; padding: 40px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--muted); }
.empty .h4 { color: var(--text); margin-bottom: 6px; }

/* ---------- Campaign page ---------- */
.cpage { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .cpage { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .cpage-side { position: sticky; top: 88px; } }
@media (max-width: 959px) { .cpage-side { order: -1; } } /* phones: pay + Join button before the long brief */
.kv { display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; text-align: right; }
.leader { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); font-size: 15px; }
.leader:first-child { border-top: 0; }
.leader .rank { font-family: var(--mono); color: var(--muted-2); font-size: 13px; }

/* ---------- App shell (dashboard + admin) ---------- */
.app-top { border-bottom: 1px solid var(--border); background: var(--bg); }
.app-top .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.app-top-actions { display: flex; align-items: center; gap: 6px; }
.tabs-wrap { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 40; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 14px 12px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current='page'] { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { font-family: var(--mono); font-size: 11.5px; padding: 2px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 20px; }
.page-head h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; font-stretch: 112%; }
.page-body { padding-bottom: 64px; display: flex; flex-direction: column; gap: 20px; }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; text-decoration: none; color: var(--text); }
a.stat:hover { border-color: var(--border-strong); color: var(--text); }
.stat-value { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; font-stretch: 112%; line-height: 1.05; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-hot { border-color: rgba(255, 90, 31, .5); }
.stat-hot .stat-value { color: var(--accent); }
.stat-main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stat-main .eyebrow, .stat-main .muted { color: rgba(16, 16, 18, .72); }

.checklist { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.checklist li:first-child { border-top: 0; }
.checklist .tick { width: 26px; height: 26px; border-radius: 999px; border: 1.5px solid var(--border-strong); display: flex; align-items: center; justify-content: center; flex: none; color: transparent; }
.checklist .tick svg { width: 14px; height: 14px; }
.checklist li.done .tick { background: var(--success); border-color: var(--success); color: #0b1f15; }
.checklist li.done .ctext { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.checklist .ctext { flex: 1; min-width: 0; font-weight: 600; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); }
td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
.td-strong { font-weight: 700; }

/* Mobile-friendly list items (used instead of tables on dense screens) */
.items { display: flex; flex-direction: column; gap: 10px; }
.item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; scroll-margin-top: 80px; }
.item:target { border-color: var(--accent); }
.item-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; align-items: flex-start; }
.item-title { font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted); }
.item-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.item-num { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.item-num .v { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding-top: 12px; border-top: 1px solid var(--border); }
.item-actions .field { flex: 1 1 140px; }
.item-actions input { min-height: 40px; padding: 8px 12px; font-size: 15px; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .field { flex: 1 1 160px; }
.filters select, .filters input { min-height: 42px; padding-top: 8px; padding-bottom: 8px; }
.seg { display: inline-flex; flex-wrap: nowrap; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; max-width: 100%; overflow-x: auto; scrollbar-width: none; align-self: flex-start; }
.seg::-webkit-scrollbar { display: none; }
.seg a { white-space: nowrap; padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.seg a[aria-current='true'] { background: var(--surface-3); color: var(--text); }
.bell { position: relative; padding: 0 12px; }
.bell-count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
a.note:hover { border-color: var(--border-strong); color: var(--text); }
.note.unread { border-color: rgba(255, 90, 31, .45); }
.note .dot { margin-top: 7px; }
.note.read .dot { background: var(--surface-3); }
.board { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.board-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.board-row.me { border-color: var(--accent); }
.board-rank { font-family: var(--mono); font-weight: 600; color: var(--muted-2); font-size: 15px; }
.board-row.top .board-rank { color: var(--accent); font-size: 20px; font-weight: 700; }
.board-name { font-weight: 700; }
.board-views { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 17px; }
.pager { display: flex; justify-content: space-between; gap: 12px; }
.folders { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.folder { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); min-width: 0; }
.folder::before { content: ''; width: 22px; height: 16px; border-radius: 3px 3px 4px 4px; background: var(--surface-3); box-shadow: inset 0 3px 0 var(--border-strong); margin-bottom: 4px; }
.folder:hover { border-color: var(--border-strong); color: var(--text); }
.folder[aria-current='true'] { border-color: var(--accent); }
.folder[aria-current='true']::before { background: var(--accent); box-shadow: none; }
.folder-name { font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.code-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--bg); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; }
.code-box code { font-size: 16px; font-weight: 600; color: var(--text); letter-spacing: .04em; overflow-wrap: anywhere; }
.copy-btn { margin-left: auto; }

.auth-card { max-width: 440px; margin: clamp(32px, 8vw, 80px) auto; }
.auth-card .h2 { margin-bottom: 6px; }
.divider-text { text-align: center; font-size: 14px; color: var(--muted); }

.report-hero { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

@media (max-width: 520px) {
  .hide-sm { display: none !important; }
  .app-top .brand-tag { display: none; }
  .app-top .brand-word { font-size: 17px; }
  .btn-lg { width: 100%; }
}
@media (min-width: 521px) { .show-sm { display: none !important; } }


/* Bulk approve */
.bulk-bar { position: sticky; top: 64px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.bulk-bar .check { align-items: center; font-size: 14px; }
.bulk-bar [data-bulk-count] { flex: 1; min-width: 120px; }
.bulk-check { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: -4px 0 0 -6px; flex: none; cursor: pointer; }
.bulk-check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }

/* Earnings chart (colors validated for CVD on the dark surface) */
:root { --chart-approved: #e8541d; --chart-review: #5b7fd6; }
.chart-hero .num { font-size: clamp(26px, 5vw, 34px); font-weight: 800; letter-spacing: -.02em; }
.chart-legend { display: flex; gap: 16px; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.key-approved { background: var(--chart-approved); }
.key-review { background: var(--chart-review); }
.chart { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 180px auto; column-gap: 10px; row-gap: 6px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; text-align: right; line-height: 1; margin: -5px 0; }
.chart-plot { position: relative; min-width: 0; }
.chart-grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid i { display: block; height: 0; border-top: 1px solid var(--border); }
.chart-grid i:last-child { border-top-color: var(--border-strong); }
.chart-bars { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 4px; }
.chart-bars.dense { gap: 2px; }
.chart-col { -webkit-tap-highlight-color: transparent; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 4px 4px 0 0; }
.chart-col:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--border-strong); }
.chart-bars:has(.chart-col[aria-pressed='true']) .chart-col:not([aria-pressed='true']) .bar { opacity: .4; }
.bar { display: block; width: 100%; max-width: 28px; margin: 0 auto; min-height: 2px; }
.bar:first-child { border-radius: 4px 4px 0 0; }
.bar-approved { background: var(--chart-approved); }
.bar-review { background: var(--chart-review); }
.chart-x { grid-column: 2; display: flex; justify-content: space-between; }
.chart-tip { position: absolute; top: 0; z-index: 2; padding: 8px 10px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text); font-size: 13px; line-height: 1.45; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
.chart-tip strong { display: block; }
.chart-tip span { display: block; color: var(--text-2); }
.chart-table summary { cursor: pointer; color: var(--muted); }

/* ---------- Sound toggle ---------- */
.sound-toggle { padding: 0 12px; }
.sound-toggle .i-off { display: none; }
.sound-toggle[aria-pressed='false'] .i-on { display: none; }
.sound-toggle[aria-pressed='false'] .i-off { display: block; }
.sound-toggle[aria-pressed='false'] { color: var(--muted); }
.sound-mob { margin-left: auto; width: 44px; padding: 0; border-color: var(--border-strong); border-radius: 12px; }
@media (min-width: 900px) { .sound-mob { display: none !important; } }

/* ---------- Motion ---------- */
main { animation: page-in .35s ease-out backwards; }
@keyframes page-in { from { opacity: 0; } }

.btn:active { transform: scale(.96); }
.btn-primary:hover { box-shadow: 0 10px 30px -10px rgba(255, 90, 31, .7); }
a.item, a.stat, a.card, .board-row { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
@media (hover: hover) {
  a.item:hover, a.stat:hover, a.card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .8); }
  .board-row:hover { transform: translateX(4px); }
}

/* Hero: words rise in, "pay." shines, the main button breathes. */
.hero .display .w { display: inline-block; opacity: 0; transform: translateY(.5em) rotate(3deg); animation: word-in .75s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes word-in { to { opacity: 1; transform: none; } }
.hero .display .accent { background: linear-gradient(100deg, var(--accent) 38%, #ffd9c7 50%, var(--accent) 62%) 0 0 / 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 3.6s ease-in-out 1.4s infinite; }
@keyframes shine { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0 0; } }
.hero .btn-primary { position: relative; }
.hero .btn-primary::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; animation: breathe 2.8s ease-out 1.6s infinite; }
@keyframes breathe { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 31, .45); } 70%, 100% { box-shadow: 0 0 0 10px rgba(255, 90, 31, 0); } }

/* Scroll reveal (added by JS only to blocks below the fold). */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* Stat cards and leaderboard rows pop in, one after another. */
.stats > *, .board > li { animation: rise .55s cubic-bezier(.2, .8, .2, 1) backwards; }
.stats > :nth-child(2), .board > li:nth-child(2) { animation-delay: .06s; }
.stats > :nth-child(3), .board > li:nth-child(3) { animation-delay: .12s; }
.stats > :nth-child(4), .board > li:nth-child(4) { animation-delay: .18s; }
.stats > :nth-child(5), .board > li:nth-child(5) { animation-delay: .24s; }
.board > li:nth-child(n+6) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.board > li:first-child.top { border-color: rgba(255, 90, 31, .55); box-shadow: 0 12px 40px -18px rgba(255, 90, 31, .8); background: linear-gradient(120deg, rgba(255, 90, 31, .12), var(--surface) 55%); }
.stat-value, .chart-hero .num, .board-views strong { font-variant-numeric: tabular-nums; }

/* Flash messages slide in; errors give a little shake. */
.flash-wrap .alert { animation: drop-in .45s cubic-bezier(.2, .9, .3, 1.25) backwards; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-12px) scale(.98); } }
.alert-error { animation: shake .42s ease .15s; }
.flash-wrap .alert-error { animation: drop-in .45s cubic-bezier(.2, .9, .3, 1.25) backwards, shake .42s ease .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* Notification bell rings when there's something new. */
.bell-count { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) .25s backwards; }
@keyframes pop { from { transform: scale(0); } }
.bell:has(.bell-count) svg { transform-origin: 50% 12%; animation: ring 1.1s ease .5s 2; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-13deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }

/* Earnings chart bars grow up from the baseline. */
.chart-col { transform-origin: bottom; animation: grow .7s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes grow { from { transform: scaleY(0); } }

.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 200; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .hero .display .w, .reveal { opacity: 1; transform: none; }
}
