/* Soul Tune website.  Same palette and type as the app (app/ui/theme.py, app/web/static/css/app.css): dark first,
   one teal accent, Geist with an italic accent word, Geist Mono for numbers.
   Layout: one 1120 px column of app-like cards; each section opens with the app's "• EYEBROW" label. */

:root {
  --bg: #0C0E10;
  --sunken: #08090B;
  --surface: #121518;
  --raised: #171B1F;
  --strong: #1E2328;
  --line: #1D2125;
  --line-strong: #2A3036;
  --ink: #EEF2F3;
  --ink-2: #B4BEC4;
  --muted: #8A959C;
  --accent: #59DEC5;
  --accent-hover: #7FE8D4;
  --accent-soft: #0F2B26;
  --accent-line: #1F5249;
  --on-accent: #072823;
  --warning: #F5C04A;
  --danger: #FF9A5C;
  --glow: rgba(89, 222, 197, .16);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);

  --font: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --col: 1120px;
  --r: 12px; --r-sm: 8px; --r-tag: 4px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F6F8F9; --sunken: #EEF1F3; --surface: #FFFFFF; --raised: #F3F6F7; --strong: #E6EBED;
    --line: #E3E8EB; --line-strong: #CFD7DB; --ink: #12191C; --ink-2: #3B484E; --muted: #56646B;
    --accent: #067265; --accent-hover: #055D53; --accent-soft: #E0F3EE; --accent-line: #9FD8CC; --on-accent: #FFFFFF;
    --warning: #7A5200; --danger: #9A3F00; --glow: rgba(6, 114, 101, .10); --shadow: 0 30px 70px -36px rgba(18, 25, 28, .35);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F6F8F9; --sunken: #EEF1F3; --surface: #FFFFFF; --raised: #F3F6F7; --strong: #E6EBED;
  --line: #E3E8EB; --line-strong: #CFD7DB; --ink: #12191C; --ink-2: #3B484E; --muted: #56646B;
  --accent: #067265; --accent-hover: #055D53; --accent-soft: #E0F3EE; --accent-line: #9FD8CC; --on-accent: #FFFFFF;
  --warning: #7A5200; --danger: #9A3F00; --glow: rgba(6, 114, 101, .10); --shadow: 0 30px 70px -36px rgba(18, 25, 28, .35);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
em.accent { font-style: italic; font-weight: 400; color: var(--accent); }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.wrap {
  max-width: calc(var(--col) + 2 * 40px); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap { padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px)); }
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r-sm);
  font: 500 15px/1 var(--font); white-space: nowrap; border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: var(--strong); color: var(--ink); }
.btn-secondary:hover { background: var(--line-strong); color: var(--ink); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---- eyebrow, the app's "• SAFE" label ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 12px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ---- header ---- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink); font-weight: 600; font-size: 17px; }
.brand:hover { color: var(--ink); }
.brand img { width: 34px; height: 34px; }
.brand em { color: var(--accent); font-weight: 400; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink-2); font-size: 14px; padding: 8px 12px; border-radius: var(--r-sm); }
.nav a:hover { color: var(--ink); background: var(--raised); }
.site-header .btn { min-height: 38px; padding: 0 16px; font-size: 14px; }
.nav-signin { color: var(--ink-2); font-size: 14px; padding: 8px 4px; white-space: nowrap; }
.nav-signin:hover { color: var(--ink); }
@media (max-width: 860px) { .nav { display: none; } }

/* ---- hero ---- */
.hero { padding-block: 72px 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto 30%; height: 760px; pointer-events: none;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
}
.hero .wrap { position: relative; display: grid; gap: 48px; }
.hero-copy { max-width: 760px; display: grid; gap: 22px; }
.hero h1 { font-size: clamp(40px, 6.4vw, 72px); line-height: 1.02; letter-spacing: -0.035em; }
.hero-sub { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { font-size: 13px; color: var(--muted); }
.hero-shot {
  border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow); background: var(--surface);
}
.hero-shot .bar { height: 32px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: var(--sunken); border-bottom: 1px solid var(--line); }
.hero-shot .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--strong); }
.hero-shot .bar span { margin-left: 8px; font-size: 12px; color: var(--muted); }

/* ---- fact strip ---- */
.facts { border-block: 1px solid var(--line); background: var(--sunken); }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.facts li { padding: 22px 20px; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts b { font: 500 22px/1.2 var(--mono); letter-spacing: -0.02em; }
.facts span { font-size: 14px; color: var(--muted); }
@media (max-width: 860px) {
  .facts ul { grid-template-columns: 1fr 1fr; }
  .facts li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---- sections ---- */
section.block { padding-block: 96px 0; }
.section-head { display: grid; gap: 14px; max-width: 720px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; }
.section-head p { color: var(--ink-2); font-size: 17px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }

/* ---- results: range chart ---- */
.results { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; align-items: start; }
.chart { padding: 28px; display: grid; gap: 6px; min-width: 0; }
.chart-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; flex-wrap: wrap; margin-bottom: 14px; }
.chart-head h3 { font-size: 17px; }
.chart-head span { font-size: 13px; color: var(--muted); }
.row { display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); gap: 20px; align-items: center; padding-block: 14px; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; }
.row-label { display: grid; gap: 2px; min-width: 0; }
.row-label b { font-weight: 500; font-size: 15px; line-height: 1.3; }
.row-label small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.plan-tag { display: inline-block; font: 500 10px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; padding: 4px 6px; border-radius: var(--r-tag); margin-right: 6px; vertical-align: 1px; }
.plan-tag.free { background: var(--strong); color: var(--ink-2); }
.plan-tag.premium { background: var(--accent-soft); color: var(--accent); }
.track { position: relative; height: 34px; }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line-strong); }
.range {
  position: absolute; top: 50%; height: 10px; transform: translateY(-50%); border-radius: 5px;
  left: calc(var(--lo) / 20 * 100%); width: max(10px, calc((var(--hi) - var(--lo)) / 20 * 100%));
  background: linear-gradient(90deg, var(--accent-line), var(--accent));
}
.range-val {
  position: absolute; top: 50%; transform: translateY(-50%); left: calc(var(--hi) / 20 * 100% + 10px);
  font: 500 13px/1 var(--mono); color: var(--ink); white-space: nowrap;
}
.range-val.flip { left: auto; right: calc(100% - var(--lo) / 20 * 100% + 10px); }
.axis { display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); gap: 20px; margin-top: 6px; }
.axis .ticks { position: relative; height: 16px; font: 400 11px/1 var(--mono); color: var(--muted); }
.axis .ticks span { position: absolute; transform: translateX(-50%); }
.axis .ticks span:first-child { transform: none; }
.axis .ticks span:last-child { transform: translateX(-100%); }
.chart-foot { font-size: 13px; color: var(--muted); margin-top: 14px; }
.chart-foot a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
@media (max-width: 640px) {
  .chart { padding: 20px; }
  .row, .axis { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .axis > span:first-child { display: none; }
}

.measure { padding: 24px; display: grid; gap: 16px; }
.measure h3 { font-size: 20px; }
.measure p { color: var(--ink-2); font-size: 15px; }
.measure img { border-radius: var(--r-sm); border: 1px solid var(--line); }
.sources { font-size: 13px; color: var(--muted); display: grid; gap: 6px; margin: 0; padding-left: 18px; }
.sources a { color: var(--ink-2); }
@media (max-width: 960px) { .results { grid-template-columns: minmax(0, 1fr); } }

/* ---- features ---- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 24px; display: grid; gap: 10px; align-content: start; }
.feature-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.feature-icon svg { width: 20px; height: 20px; }
.feature h3 { font-size: 18px; margin-top: 6px; }
.feature p { color: var(--ink-2); font-size: 15px; }
.feature .plan-tag { justify-self: start; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } }

.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.shot { overflow: hidden; }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.shot figcaption { padding: 14px 18px; font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--line); }
@media (max-width: 760px) { .shots { grid-template-columns: 1fr; } }
.tour { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tour .shot.wide { grid-column: 1 / -1; }
.tour .shot.wide img { aspect-ratio: 16 / 9; }
.tour figcaption b { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .tour { grid-template-columns: 1fr; } .tour .shot.wide img { aspect-ratio: 16 / 10; } }

/* ---- the tweaker's bill ---- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.bill { padding: 28px; display: grid; gap: 4px; align-content: start; font-family: var(--mono); font-size: 14px; }
.bill h3 { font-family: var(--font); font-size: 17px; margin-bottom: 4px; }
.bill .who { font-family: var(--font); font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.bill .line { display: flex; gap: 12px; align-items: baseline; padding-block: 7px; color: var(--ink-2); }
.bill .line::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted var(--line-strong); transform: translateY(-4px); }
.bill .line span:last-child { order: 2; color: var(--ink); font-variant-numeric: tabular-nums; }
.bill .total { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line-strong); display: flex; justify-content: space-between; gap: 12px; color: var(--ink); font-weight: 500; }
.bill .fine { font-family: var(--font); font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.bill.ours { background: var(--accent-soft); border-color: var(--accent-line); }
.bill.ours .total span:last-child { color: var(--accent); font-size: 22px; }
.bill.ours .line span:last-child { color: var(--accent); }
.vs { margin-top: 24px; overflow-x: auto; }
.vs table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.vs th, .vs td { text-align: left; padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.vs thead th { border-top: 0; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vs td:first-child { color: var(--ink); font-weight: 500; }
.vs td { color: var(--ink-2); }
.vs tr.us td { color: var(--ink); background: var(--accent-soft); }
.vs tr.us td:first-child { color: var(--accent); }
@media (max-width: 860px) { .compare { grid-template-columns: minmax(0, 1fr); } }

/* ---- pricing ---- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.plan { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.plan.best { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line), var(--shadow); }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 22px; }
.plan-top .eyebrow { color: var(--ink-2); }
.badge { font: 500 11px/1 var(--font); padding: 5px 8px; border-radius: 6px; background: var(--accent); color: var(--on-accent); }
.price { display: flex; align-items: baseline; gap: 8px; }
.price b { font: 500 44px/1 var(--mono); letter-spacing: -0.04em; }
.price span { color: var(--muted); font-size: 15px; }
.plan > p { color: var(--ink-2); font-size: 15px; min-height: 72px; }
.plan ul { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 14.5px; color: var(--ink-2); flex: 1; align-content: start; }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.plan li svg { width: 16px; height: 16px; margin-top: 3px; color: var(--accent); }
.plan li.head { display: block; color: var(--ink); font-weight: 500; }
.plan .btn { width: 100%; }
.plans-note { margin-top: 20px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 20px 24px; color: var(--ink-2); font-size: 14.5px; }
.plans-note svg { width: 20px; height: 20px; color: var(--accent); margin-top: 2px; }
.plans-note b { color: var(--ink); font-weight: 500; }
@media (max-width: 1100px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .plans { grid-template-columns: minmax(0, 1fr); } .plan > p { min-height: 0; } }

/* ---- faq ---- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; display: flex; justify-content: space-between; gap: 16px; font-weight: 500; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 20px/1 var(--mono); color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; color: var(--ink-2); font-size: 15px; max-width: 68ch; }

/* ---- end ---- */
.cta { margin-top: 96px; padding: 56px 40px; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: center; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: auto -10% -60% 40%; height: 400px; background: radial-gradient(closest-side, var(--glow), transparent 70%); pointer-events: none; }
.cta h2 { font-size: clamp(28px, 3.6vw, 40px); position: relative; }
.cta p { color: var(--ink-2); margin-top: 10px; position: relative; }
.cta .hero-actions { position: relative; }
@media (max-width: 760px) { .cta { grid-template-columns: minmax(0, 1fr); padding: 32px 22px; } }

.site-footer { margin-top: 72px; border-top: 1px solid var(--line); padding-block: 36px 48px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--ink-2); }

/* ---- account page ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.acct { padding-block: 72px 0; min-height: calc(100vh - 220px); }
.acct .wrap { display: grid; justify-items: center; gap: 16px; }
.acct-card { width: 100%; max-width: 460px; padding: 32px; display: grid; gap: 18px; }
.acct-card.wide { max-width: 760px; }
.acct-card h1 { font-size: clamp(30px, 5vw, 38px); line-height: 1.1; }
.acct-lead { color: var(--ink-2); font-size: 15px; margin-top: -6px; }
.acct-lead b { color: var(--ink); font-weight: 500; }
.acct-card form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); min-width: 0; }
.field small { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.field input {
  width: 100%; min-height: 44px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--raised); color: var(--ink); border: 1px solid var(--line-strong);
  font: 400 15px var(--font);
}
.field input.mono { font-family: var(--mono); letter-spacing: .04em; }
.field input:hover { border-color: var(--muted); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.acct-card form .btn { width: 100%; margin-top: 4px; }
.acct-card .btn:disabled { opacity: .6; cursor: progress; }
.form-msg { font-size: 14px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--raised); color: var(--ink-2); }
.form-msg.error { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.form-msg.ok { background: var(--accent-soft); color: var(--accent); }
.acct-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 14px; }
.acct-note { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--sunken); color: var(--ink-2); font-size: 14px; }
.acct-note svg { width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
.buy-note { width: 100%; max-width: 460px; }
.acct-off { max-width: 460px; text-align: center; color: var(--muted); font-size: 14px; }

.acct-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.acct-head > div { display: grid; gap: 10px; min-width: 0; }
.acct-email { font-size: clamp(22px, 4vw, 30px); overflow-wrap: anywhere; }
.acct-head .btn { min-height: 38px; font-size: 14px; }
.acct-facts { margin: 0; display: grid; grid-template-columns: auto 1.6fr auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--sunken); }
.acct-facts > div { padding: 16px 18px; display: grid; gap: 4px; align-content: start; border-left: 1px solid var(--line); min-width: 0; }
.acct-facts > div:first-child { border-left: 0; }
.acct-facts dt { font: 500 11px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.acct-facts dd { margin: 0; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.acct-facts dd.sub { font-size: 13px; font-weight: 400; color: var(--muted); line-height: 1.45; }
.plan-chip { display: inline-block; font: 500 13px/1 var(--font); padding: 6px 9px; border-radius: 6px; background: var(--strong); color: var(--ink-2); }
.plan-chip.premium { background: var(--accent-soft); color: var(--accent); }
.acct-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.key-form { padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.key-form h2 { font-size: 17px; }
.key-form > p { color: var(--ink-2); font-size: 14.5px; }
.key-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.acct-card .key-row .btn { width: auto; margin-top: 0; }
@media (max-width: 640px) {
  .acct { padding-block: 40px 0; }
  .acct-card { padding: 22px; }
  .acct-facts { grid-template-columns: minmax(0, 1fr); }
  .acct-facts > div { border-left: 0; border-top: 1px solid var(--line); }
  .acct-facts > div:first-child { border-top: 0; }
  .key-row { grid-template-columns: minmax(0, 1fr); }
  .acct-card .key-row .btn { width: 100%; }
}
