:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #111827;
  --muted: #5b6474;
  --border: #dde2ea;
  --accent: #0e7c66;
  --accent-ink: #ffffff;
  --flip: #0e7c66;  --flip-bg: #dcf3ec;
  --thin: #9a6400;  --thin-bg: #fbefd5;
  --skip: #b42318;  --skip-bg: #fde4e1;
  --live: #c2410c;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1318; --surface: #171c23; --surface-2: #1e252e; --text: #e8ecf1; --muted: #9aa4b2;
    --border: #2b333e; --accent: #34c3a0; --accent-ink: #062019;
    --flip: #4fd1ad; --flip-bg: #123a30; --thin: #f0b54a; --thin-bg: #3a2c10;
    --skip: #f2877b; --skip-bg: #3d1a17; --live: #fb923c;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1318; --surface: #171c23; --surface-2: #1e252e; --text: #e8ecf1; --muted: #9aa4b2;
  --border: #2b333e; --accent: #34c3a0; --accent-ink: #062019;
  --flip: #4fd1ad; --flip-bg: #123a30; --thin: #f0b54a; --thin-bg: #3a2c10;
  --skip: #f2877b; --skip-bg: #3d1a17; --live: #fb923c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; }
h1 em { color: var(--accent); font-style: normal; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.05rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 620px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0;
  padding: .7rem 1.2rem; border-radius: 999px; font-weight: 600; text-decoration: none;
  cursor: pointer; font-size: 1rem;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-sm { padding: .4rem .9rem; font-size: .9rem; }

.site-header { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 1rem; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }
.nav nav { display: flex; align-items: center; gap: 1.1rem; }
.nav nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav nav a:not(.btn):hover { color: var(--text); }
@media (max-width: 640px) { .nav nav a:not(.btn) { display: none; } }

.hero { padding: 4rem 0 3rem; }
.eyebrow { display: inline-block; font-weight: 600; font-size: .85rem; color: var(--live); margin: 0 0 1rem; }
.eyebrow::before { content: "● "; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.countdown { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; align-items: center; }
.countdown .unit { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .8rem; text-align: center; min-width: 64px; }
.countdown .unit b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.countdown .unit small { color: var(--muted); font-size: .75rem; }
.countdown .label { width: 100%; color: var(--muted); font-size: .9rem; }

.section { padding: 3.5rem 0; }
.section.alt { background: var(--surface-2); }
.section-head { margin-bottom: 1.5rem; }

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
select, input {
  font: inherit; font-size: .95rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: .5rem .6rem; width: 100%;
}
.settings { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem 1rem; margin-bottom: 1rem; }
.settings summary { cursor: pointer; font-size: .9rem; color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-top: .75rem; }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table.deals { width: 100%; border-collapse: collapse; font-size: .92rem; }
.deals th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); padding: .7rem .8rem; }
.deals th.num { text-align: right; }
.deals td { padding: .75rem .8rem; border-top: 1px solid var(--border); vertical-align: top; }
.deals .name { font-weight: 600; }
.deals .sub { color: var(--muted); font-size: .8rem; }
.deals .was { color: var(--muted); text-decoration: line-through; font-size: .8rem; display: block; }
.niche { display: inline-block; font-size: .7rem; font-weight: 700; padding: 0 .4rem; border-radius: 4px; margin-right: .25rem; background: var(--surface-2); color: var(--muted); }
.niche.beauty { color: #b0306a; }
.niche.audio { color: #2563c9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .niche.beauty { color: #f48fbf; } :root:not([data-theme="light"]) .niche.audio { color: #8db4f5; } }
:root[data-theme="dark"] .niche.beauty { color: #f48fbf; }
:root[data-theme="dark"] .niche.audio { color: #8db4f5; }
.was.asof { text-decoration: none; font-size: .72rem; }
.pos { color: var(--flip); font-weight: 700; }
.neg { color: var(--skip); font-weight: 700; }
.status { font-size: .75rem; font-weight: 600; display: block; }
.cell-line { display: block; }
.status.live { color: var(--live); }
.status.upcoming, .status.tba { color: var(--muted); }
.status.ended { color: var(--muted); }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; }
.pill.flip { color: var(--flip); background: var(--flip-bg); }
.pill.thin { color: var(--thin); background: var(--thin-bg); }
.pill.skip { color: var(--skip); background: var(--skip-bg); }

.locked-msg { color: var(--muted); font-style: italic; vertical-align: middle; }
.member-bar { margin-top: 1rem; }
.member-ok { color: var(--flip); font-weight: 600; }
.linkish { background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.key-form { max-width: 460px; }
.key-row { display: flex; gap: .5rem; margin-top: .3rem; }
tr.locked td:first-child .lock { display: inline-block; margin-top: .3rem; font-size: .8rem; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 2rem 0; }
.demo-toggle { flex-direction: row; align-items: center; gap: .5rem; margin-top: 1rem; font-weight: 500; }
.demo-toggle input { width: auto; }

@media (max-width: 760px) {
  .table-wrap { background: none; border: 0; }
  .deals thead { display: none; }
  .deals, .deals tbody, .deals tr, .deals td { display: block; width: 100%; }
  .deals tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .75rem; padding: .4rem 0; }
  .deals td { border: 0; padding: .3rem .9rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .deals td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; text-align: left; }
  .deals td:first-child { display: block; text-align: left; padding-top: .6rem; }
  .deals td:first-child::before { content: none; }
  tr.locked td.locked-msg { display: block; text-align: left; font-size: .85rem; padding-bottom: .7rem; }
  tr.locked td.locked-msg::before { content: none; }
}

.calendar { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .75rem; }
.calendar button {
  width: 100%; height: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem;
}
.calendar button:hover { border-color: var(--accent); }
.calendar li.live button { border-color: var(--live); }
.calendar li.ended button { opacity: .65; }
.calendar .ev-name { font-weight: 700; display: block; }
.calendar .ev-date { font-size: .85rem; color: var(--muted); }
.calendar .ev-tip { font-size: .85rem; margin: .4rem 0 0; color: var(--muted); }
.calendar .ev-count { font-size: .8rem; font-weight: 600; color: var(--accent); }

.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 760px) { .calc-layout { grid-template-columns: 1fr; } }
.calc-inputs { display: grid; gap: .75rem; margin-top: 1rem; }
.calc-result { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.calc-result .big { font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.calc-result dl { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 1rem 0 0; font-size: .92rem; }
.calc-result dt { color: var(--muted); }
.calc-result dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.steps > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.steps p { margin: 0; color: var(--muted); font-size: .92rem; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--accent); }
.plan .price { font-size: 2.2rem; font-weight: 800; margin: .25rem 0 1rem; }
.plan .price span { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan ul { padding-left: 1.1rem; margin: 0 0 1.5rem; color: var(--muted); flex: 1; }
.plan .btn { text-align: center; }

.signup { display: flex; gap: .5rem; margin-top: 1rem; }
.signup input { flex: 1; border-radius: 999px; padding: .7rem 1rem; }
@media (max-width: 480px) { .signup { flex-direction: column; } }

.legal h2 { font-size: 1.2rem; margin-top: 2rem; }
.legal li { margin-bottom: .4rem; }
.site-footer { padding: 2rem 0; border-top: 1px solid var(--border); font-size: .88rem; }
