/* Surveys section. These are the preview's colours, shown where no white-label applies.
   Each white-label brings its own through `theme` in server/sites.js: the variables below are then
   overridden by the stylesheet /api/brand, which index.html links after this one. Coins stay gold everywhere. */
:root {
  --accent: #FF4C00;
  --accent-strong: #C93C00;      /* small text and small buttons on light pages */
  --accent-on-dark: #FF7A40;     /* small text on dark cards */
  --accent-2: #F6C73B;           /* focus rings */
  --soft: #FFF3EC;               /* the tinted "Hot right now" card */
  --soft-line: #FFD3BC;
  --ink: #232425;
  --ink-2: #3A3E41;
  --muted: #5E6266;
  --bg: #F7F9FA;
  --card: #FFFFFF;
  --line: #EDEFF1;
  --line-strong: #D5D8DA;
  --stage: #18191A;
  --stage-2: #232425;
  --stage-3: #2B2D2F;
  --stage-line: #3A3E41;
  --stage-muted: #A4A8AB;
  --stage-text: #F7F9FA;
  --gold: #F6C73B;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body.dark { background: var(--stage); color: var(--stage-text); }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- page frame ---------- */
.page { max-width: 1160px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 20px; }
.page.narrow { max-width: 560px; min-height: 100vh; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.logo { display: block; height: 22px; width: auto; max-width: min(300px, 60vw); }     /* the DesireDate logo is 412 tall, letters 313: 22px gives 17px letters */
.wordmark { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.chip-me { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 600; min-width: 0; }
.chip-me b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.sex-m { color: #3B6FD8; font-weight: 700; }
.sex-f { color: #C2398A; font-weight: 700; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 5px; background: var(--line); color: var(--ink-2); }
.round-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); cursor: pointer; text-decoration: none; }
body.dark .round-btn { background: var(--stage-3); border-color: var(--stage-3); }
.intro { display: flex; flex-direction: column; gap: 6px; }
.intro h1 { font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.intro p { font-size: 15px; line-height: 22px; color: var(--muted); }
.notice { padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px dashed var(--line-strong); font-size: 14px; line-height: 20px; }
.notice b { font-weight: 700; }

@media (max-width: 420px) {            /* phones: a wide logo and a name share one row */
  .logo { height: 19px; }
  .chip-me { padding: 0 10px; gap: 5px; }
  .chip-me b { max-width: 96px; }
  .tag { padding: 2px 4px; letter-spacing: 0.03em; }
}

/* ---------- buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--accent); color: #FFFFFF; font-size: 19px; font-weight: 800; text-decoration: none; cursor: pointer; }
.btn small { font-size: 15px; font-weight: 700; opacity: 0.9; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--line-strong); font-size: 16px; font-weight: 700; min-height: 50px; }
body.dark .btn.ghost { background: transparent; color: var(--stage-text); border-color: #4A4F53; }
.btn.small { min-height: 44px; border-radius: 12px; background: var(--accent-strong); font-size: 15px; font-weight: 700; padding: 0 18px; }
.link-help { align-self: center; font-size: 12px; color: var(--muted); }
.link-quiet { background: none; border: 0; padding: 6px; font-size: 13px; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* ---------- the coins card ---------- */
.bank { border-radius: 20px; padding: 20px; color: var(--stage-text); display: flex; flex-direction: column; gap: 14px;
  background: var(--stage);
  background: radial-gradient(ellipse 80% 90% at 85% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%), var(--stage); }
.bank-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bank-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stage-muted); }
.bank-total { display: flex; align-items: center; gap: 10px; font-size: 42px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; margin-top: 4px; }
.pill-way { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; background: var(--stage-3); font-size: 13px; font-weight: 600; color: var(--gold); white-space: nowrap; }
.bank-foot { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: #C9CCCE; }
.bank-foot button { background: none; border: 0; padding: 4px 0; color: var(--accent-on-dark); font-weight: 700; cursor: pointer; font-size: 14px; }

/* ---------- the highlighted survey ---------- */
.hot { border-radius: 20px; padding: 18px; background: var(--soft); border: 1.5px solid var(--soft-line); display: flex; flex-direction: column; gap: 12px; }
.hot-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-strong); }
.cat { font-size: 13px; color: var(--muted); }
.big-reward { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.big-reward .n { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.big-reward .unit { font-size: 16px; font-weight: 600; color: var(--muted); align-self: flex-end; padding-bottom: 4px; }
.was { text-decoration: line-through; color: var(--muted); font-weight: 600; }
.boost { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: var(--ink); color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: 0.04em; }
.meta { display: flex; align-items: center; gap: 16px; font-size: 14px; font-weight: 600; flex-wrap: wrap; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- the list ---------- */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.list-head h2 { font-size: 20px; font-weight: 800; }
.sorts { display: flex; gap: 8px; flex-wrap: wrap; }
.sorts button { height: 40px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); }
.sorts button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #FFFFFF; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.tile .cat { font-size: 12px; font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }
.tile .reward { display: flex; align-items: center; gap: 7px; font-size: 27px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; flex-wrap: wrap; }
.tile .reward .was { font-size: 15px; }
.tile .meta { gap: 10px; font-size: 13px; color: var(--ink-2); }
.tile .btn.small { margin-top: 3px; }
.sample-tag { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; background: var(--line); color: var(--ink-2); }

/* ---------- first visit ---------- */
.start { border-radius: 24px; padding: 22px 20px 20px; background: var(--soft); border: 1.5px solid var(--soft-line); display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.start h2 { font-size: 24px; font-weight: 800; line-height: 1.15; }
.start p { font-size: 15px; line-height: 22px; color: var(--ink-2); max-width: 420px; }
.start .btn { align-self: stretch; }
.coin-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 15px; font-weight: 800; }
.ghost-tile { background: var(--card); border: 1.5px dashed var(--line-strong); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ghost-tile i { display: block; height: 10px; border-radius: 6px; background: var(--line); }
.ghost-tile i.b { height: 40px; border-radius: 12px; background: #F1F3F5; }

/* ---------- how it works ---------- */
.how { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.how h2 { font-size: 18px; font-weight: 800; }
.how ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.how li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 20px; }
.how li > span:first-child { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--accent-strong); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.foot { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; line-height: 18px; color: var(--muted); text-align: center; }

/* ---------- full-page messages (empty, members only, not eligible, not a match) ---------- */
.message { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px 12px; }
.message h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
.message p { font-size: 15px; line-height: 22px; color: var(--muted); max-width: 340px; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.picks { display: flex; flex-direction: column; gap: 10px; }
.picks h2 { font-size: 18px; font-weight: 800; }
.pick { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.pick > div { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pick b { font-size: 20px; font-weight: 800; line-height: 1; }
.pick span { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- coins on the way ---------- */
body.dark .page { min-height: 100vh;
  background: radial-gradient(ellipse 90% 55% at 50% 28%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%); }
.burst { position: relative; height: 250px; display: flex; align-items: center; justify-content: center; }
.burst .c { position: absolute; animation: float 2.6s ease-in-out infinite; }
.burst .main { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: pop 0.6s cubic-bezier(.2,.9,.3,1.3) both; }
.burst .main b { font-size: 64px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--gold); }
.done-text { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.done-text h1 { font-size: 28px; font-weight: 800; }
.done-text p { font-size: 15px; line-height: 22px; color: #C9CCCE; max-width: 320px; }
.total { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 16px; background: var(--stage-2); border: 1px solid var(--stage-line); font-size: 14px; color: var(--stage-muted); }
.total b { font-size: 18px; font-weight: 800; color: var(--stage-text); }
.total b em { font-style: normal; color: var(--gold); }
.grow { flex: 1; }
@keyframes pop { 0% { transform: scale(.4) translateY(14px); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: none; opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .burst .c, .burst .main { animation: none; } }

/* ---------- panels: history, the sample survey ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(24, 25, 26, 0.55); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.sheet { width: 100%; max-width: 560px; max-height: 86vh; overflow: auto; background: var(--card); color: var(--ink); border-radius: 24px 24px 0 0; padding: 20px 18px 28px; display: flex; flex-direction: column; gap: 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-size: 20px; font-weight: 800; }
.hist { display: flex; flex-direction: column; }
.hist div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hist div span:first-child { display: flex; flex-direction: column; gap: 2px; }
.hist small { color: var(--muted); font-size: 12px; }
.hist b { font-weight: 800; white-space: nowrap; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 24px; } }

/* ---------- loading and the staging tag ---------- */
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60vh; color: var(--muted); font-size: 15px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-tag { position: fixed; left: 10px; bottom: 10px; z-index: 30; padding: 4px 8px; border-radius: 6px; background: var(--stage); color: var(--gold); font-size: 12px; font-weight: 700; }

/* ---------- wider screens ---------- */
@media (min-width: 900px) {
  .page { padding: 28px 24px 64px; gap: 28px; }
  .logo { height: 34px; }
  .intro h1 { font-size: 44px; }
  .intro p { font-size: 17px; line-height: 26px; }
  .top-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
  .top-main, .top-side { display: flex; flex-direction: column; gap: 20px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
  .big-reward .n { font-size: 54px; }
}
/* phones: one column, in the order intro, coins, highlighted survey, the rest */
@media (max-width: 899px) {
  .top-grid, .top-main, .top-side { display: contents; }
  .intro, .notice { order: 1; } .bank { order: 2; } .hot, .start { order: 3; } .after { order: 4; }
}
