/* Site styles. Colour, type, spacing and motion come from tokens.css (shared with the app). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg-canvas); color: var(--text-secondary);
  font: var(--text-md)/var(--leading-loose) var(--font-ui);
  overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--accent-vod-400); text-underline-offset: 3px; }
a:hover { color: var(--text-primary); }
h1, h2, h3 { color: var(--text-primary); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); margin: 0 0 var(--space-3); }
h1 { font-size: clamp(32px, 7vw, 56px); font-weight: 700; }
h2 { font-size: clamp(26px, 4.5vw, 36px); font-weight: 650; }
h3 { font-size: var(--text-lg); font-weight: 600; }
p { margin: 0 0 var(--space-4); }
code, pre { font-family: var(--font-mono); }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent-neutral-600); color: #fff; padding: var(--space-2) var(--space-4); z-index: 100; }
.skip:focus { left: var(--space-2); top: var(--space-2); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--space-4); }
.narrow { max-width: 760px; }
.section { padding: var(--space-16) 0; }
.section.alt { background: var(--bg-rail); border-block: 1px solid var(--border-subtle); }
.eyebrow { font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--accent-live-400); font-weight: 600; margin-bottom: var(--space-3); }
.lede { font-size: var(--text-lg); color: var(--text-secondary); max-width: 56ch; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10,11,13,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-subtle); }
.bar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-1) var(--space-4); padding: var(--space-2) var(--space-4); max-width: 1120px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--text-primary); font-weight: 700; text-decoration: none; font-size: var(--text-md); padding: var(--space-2) 0; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.nav a { color: var(--text-secondary); text-decoration: none; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); font-size: var(--text-base); transition: background var(--dur-fast), color var(--dur-fast); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text-primary); background: var(--bg-surface-2); }
.nav a.cta { background: var(--accent-neutral-600); color: #fff; }
.nav a.cta:hover { background: var(--accent-neutral-600); filter: brightness(.88); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: var(--space-2) var(--space-5); border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--bg-surface-2); color: var(--text-primary); font: 600 var(--text-base)/1.2 var(--font-ui); text-decoration: none; cursor: pointer; transition: background var(--dur-fast), border-color var(--dur-fast); }
.btn:hover { background: var(--bg-surface-4); color: var(--text-primary); }
.btn.primary { background: var(--accent-live-600); border-color: var(--accent-live-600); color: #fff; }
.btn.primary:hover { background: var(--accent-live-600); filter: brightness(.88); }
.btn.violet { background: var(--accent-neutral-600); border-color: var(--accent-neutral-600); color: #fff; }
.btn.violet:hover { background: var(--accent-neutral-600); filter: brightness(.88); }
.btn.danger { border-color: var(--accent-live-600); color: var(--accent-live-400); }
.btn.small { min-height: 36px; padding: var(--space-1) var(--space-3); font-size: var(--text-sm); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

/* Hero */
.hero { position: relative; padding: var(--space-16) 0 var(--space-12); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto -10%; height: 90%; background: radial-gradient(60% 60% at 70% 20%, rgba(155,140,255,.18), transparent 70%), radial-gradient(40% 50% at 15% 10%, rgba(239,68,68,.14), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: var(--space-10); align-items: center; grid-template-columns: 1fr; }
.hero p.lede { margin-bottom: 0; }
.fine { font-size: var(--text-sm); color: var(--text-tertiary); margin-top: var(--space-4); }

/* CSS-only TV mockup */
.tv { position: relative; }
.tv-screen { position: relative; aspect-ratio: 16/9; border-radius: var(--radius-lg); border: 6px solid var(--bg-surface-3); background: #05060a; box-shadow: var(--shadow-3), 0 0 80px rgba(155,140,255,.12); overflow: hidden; display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; padding: 4px; }
.tile { border-radius: var(--radius-sm); position: relative; overflow: hidden; }
.tile::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 2px, transparent 2px 4px); }
.t1 { grid-row: span 2; background: linear-gradient(135deg, #1d2a5a, #5b3a8f 55%, #ef4444 140%); }
.t2 { background: linear-gradient(135deg, #12343a, #2c6f6a); }
.t3 { background: linear-gradient(135deg, #3a2412, #a8622b); }
.pill { position: absolute; font-size: var(--text-2xs); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; padding: 3px 8px; border-radius: var(--radius-full); z-index: 2; }
.pill.live { top: 12px; left: 12px; background: var(--accent-live-600); color: #fff; }
.progress { position: absolute; left: 12px; right: calc(33.3% + 12px); bottom: 12px; height: 4px; background: rgba(255,255,255,.2); border-radius: 2px; z-index: 2; }
.progress i { display: block; height: 100%; width: 62%; background: var(--accent-live-500); border-radius: 2px; }
.chip { position: absolute; z-index: 3; right: -4px; bottom: -18px; display: inline-flex; align-items: center; gap: var(--space-2); background: var(--bg-surface-3); border: 1px solid var(--border-strong); border-radius: var(--radius-full); padding: var(--space-2) var(--space-4); font-size: var(--text-sm); color: var(--text-primary); box-shadow: var(--shadow-2); max-width: 94%; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success-500); flex: none; box-shadow: 0 0 8px var(--success-500); }

/* Cards */
.grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; margin-top: var(--space-8); }
.card { background: var(--bg-surface-2); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-6); }
.card h3 { margin-bottom: var(--space-2); }
.card p:last-child { margin-bottom: 0; }
.ico { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--bg-surface-4); display: grid; place-items: center; margin-bottom: var(--space-4); color: var(--accent-neutral-500); }
.ico svg { width: 22px; height: 22px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: var(--space-8) 0 0; display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
.steps li { counter-increment: s; background: var(--bg-surface-2); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-6); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-neutral-600); color: #fff; font-weight: 700; margin-bottom: var(--space-3); }
.steps h3 { margin-bottom: var(--space-1); }

/* Pricing */
.plans { display: grid; gap: var(--space-4); grid-template-columns: 1fr; margin-top: var(--space-8); text-align: left; }
.plan { display: flex; flex-direction: column; background: var(--bg-surface-2); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-6); }
.plan.featured { border-color: var(--accent-neutral-500); box-shadow: 0 0 0 1px var(--accent-neutral-500), var(--shadow-2); }
.plan .tag { align-self: flex-start; font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--accent-neutral-500); font-weight: 700; margin-bottom: var(--space-2); }
.price { color: var(--text-primary); font-size: 40px; font-weight: 700; line-height: 1.1; margin: var(--space-3) 0 var(--space-1); }
.price small { font-size: var(--text-base); font-weight: 400; color: var(--text-tertiary); }
.plan ul { list-style: none; padding: 0; margin: var(--space-4) 0 var(--space-6); flex: 1; }
.plan li { position: relative; padding-left: 26px; margin-bottom: var(--space-2); font-size: var(--text-base); }
.plan li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 10px; height: 6px; border-left: 2px solid var(--success-500); border-bottom: 2px solid var(--success-500); transform: rotate(-45deg); }
.plan .btn { width: 100%; }
.plan .alt-price { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--text-tertiary); text-align: center; }
.compare-wrap { overflow-x: auto; margin-top: var(--space-8); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: var(--text-base); }
th, td { padding: var(--space-3) var(--space-4); text-align: left; border-bottom: 1px solid var(--border-subtle); }
th { color: var(--text-primary); background: var(--bg-surface-2); }
tr:last-child td { border-bottom: 0; }

/* FAQ */
details { background: var(--bg-surface-2); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); margin-bottom: var(--space-3); }
summary { cursor: pointer; padding: var(--space-4) var(--space-5); color: var(--text-primary); font-weight: 600; list-style: none; position: relative; padding-right: 48px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: var(--space-5); top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--text-tertiary); }
details[open] summary::after { content: "\2212"; }
details > div { padding: 0 var(--space-5) var(--space-4); }
details > div p:last-child { margin-bottom: 0; }

/* Download */
.dl { display: grid; gap: var(--space-4); grid-template-columns: 1fr; margin-top: var(--space-6); }
.dl .card h3 { display: flex; align-items: center; gap: var(--space-2); }
.badge-play { display: inline-flex; align-items: center; gap: var(--space-3); min-height: 48px; padding: var(--space-2) var(--space-5); background: #000; border: 1px solid #a6a6a6; border-radius: var(--radius-md); color: #fff; text-decoration: none; }
.badge-play:hover { color: #fff; border-color: #fff; }
.badge-play svg { width: 26px; height: 26px; flex: none; }
.badge-play small { display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.1; }
.badge-play strong { display: block; font-size: 20px; line-height: 1.1; }
.codebox { position: relative; background: var(--bg-canvas); border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: var(--space-4); margin: var(--space-3) 0; }
.codebox pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--text-sm); color: var(--text-primary); }
.codebox .btn { margin-top: var(--space-3); }
.note { font-size: var(--text-sm); color: var(--text-tertiary); }

/* Forms & account */
.box { background: var(--bg-surface-2); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-6); margin-bottom: var(--space-4); }
.auth { max-width: 440px; margin: 0 auto; }
.tabs { display: flex; gap: var(--space-1); background: var(--bg-surface-1); border-radius: var(--radius-md); padding: var(--space-1); margin-bottom: var(--space-5); }
.tabs button { flex: 1; min-height: 40px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); font: 600 var(--text-base) var(--font-ui); cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--bg-surface-4); color: var(--text-primary); }
label { display: block; color: var(--text-primary); font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-1); }
input[type=email], input[type=password] { width: 100%; min-height: 44px; padding: var(--space-2) var(--space-3); background: var(--bg-canvas); color: var(--text-primary); border: 1px solid var(--border-strong); border-radius: var(--radius-md); font: var(--text-md) var(--font-ui); margin-bottom: var(--space-4); }
input:focus-visible { outline-offset: 0; border-color: var(--accent-neutral-500); }
.msg { border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); font-size: var(--text-base); }
.msg.err { background: rgba(239,68,68,.12); border: 1px solid var(--accent-live-600); color: #ffb4ad; }
.msg.warn { background: rgba(240,180,41,.1); border: 1px solid var(--amber-500); color: var(--text-primary); }
.msg.warn p { margin: 0 0 var(--space-3); }
.msg.warn .verify-note { margin: var(--space-3) 0 0; color: var(--text-secondary); }
.msg.ok { background: rgba(62,207,126,.1); border: 1px solid var(--success-500); color: var(--success-500); }
.acct-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-6); }
.acct-head h1 { font-size: 30px; margin: 0; }
.acct-head p { margin: 0; overflow-wrap: anywhere; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--border-subtle); }
.rows li:last-child { border-bottom: 0; }
.rows .main { min-width: 0; overflow-wrap: anywhere; }
.rows .main strong { color: var(--text-primary); display: block; }
.rows .meta { font-size: var(--text-sm); color: var(--text-tertiary); }
.status { display: inline-block; font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: var(--tracking-label); font-weight: 700; padding: 3px 10px; border-radius: var(--radius-full); background: var(--bg-surface-4); color: var(--text-secondary); }
.status.active { background: rgba(62,207,126,.15); color: var(--success-500); }
.status.trial { background: rgba(155,140,255,.18); color: var(--accent-neutral-500); }
.status.lapsed { background: rgba(240,180,41,.15); color: var(--amber-500); }
.buy { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
.buy .opt { display: flex; flex-direction: column; gap: var(--space-2); background: var(--bg-surface-1); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: var(--space-4); }
.buy .opt strong { color: var(--text-primary); }
.box h2 { font-size: var(--text-xl); }
.empty { color: var(--text-tertiary); margin: 0; }

/* Legal text */
.legal h2 { font-size: var(--text-xl); margin-top: var(--space-8); }
.legal li { margin-bottom: var(--space-2); }

/* 404 */
.nf { text-align: center; padding: var(--space-16) 0; }
.nf .big { font-size: clamp(72px, 22vw, 160px); font-weight: 800; line-height: 1; color: var(--text-primary); letter-spacing: -0.04em; }
.nf .big span { color: var(--accent-live-500); }
.snow { height: 6px; width: 120px; margin: var(--space-4) auto var(--space-6); border-radius: 3px; background: repeating-linear-gradient(90deg, var(--bg-surface-4) 0 6px, var(--bg-surface-2) 6px 12px); }

/* Footer */
.site-footer { border-top: 1px solid var(--border-subtle); background: var(--bg-rail); padding: var(--space-10) 0 var(--space-8); margin-top: auto; font-size: var(--text-sm); }
.foot { display: flex; flex-wrap: wrap; gap: var(--space-6) var(--space-12); justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.foot a { color: var(--text-secondary); padding: var(--space-1) 0; }
.foot p { margin: 0 0 var(--space-2); color: var(--text-tertiary); max-width: 52ch; }
[hidden] { display: none !important; }

@media (min-width: 640px) {
  .grid.c2, .dl, .buy { grid-template-columns: repeat(2, 1fr); }
  .plans, .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; }
  .grid.c3 { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: repeat(3, 1fr); }
  .plans.two { grid-template-columns: repeat(2, 1fr); max-width: 820px; margin-inline: auto; }
  .section { padding: 96px 0; }
}

.center .btn-row { justify-content: center; }
h2.section-sub { font-size: var(--text-xl); margin-top: var(--space-10); }
.meta { font-size: var(--text-sm); color: var(--text-tertiary); font-weight: 400; }
.linkbtn { background: none; border: 0; padding: var(--space-2); color: var(--accent-vod-400); font: inherit; font-size: var(--text-sm); text-decoration: underline; cursor: pointer; }
.linkbtn:hover { color: var(--text-primary); }
.gap-top { margin-top: var(--space-6); }
.ver { color: var(--text-tertiary); font-size: var(--text-sm); }
