:root {
  color-scheme: light;
  --brand-primary: #14213d;
  --brand-hover: #1e325c;
  --accent-action: #0f766e;
  --accent-hover: #0d5e58;
  --pro-gold: #c59b27;
  --pro-subtle: #fef9c3;
  --surface-canvas: #f8fafc;
  --surface-card: #fff;
  --border-subtle: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --status-error: #dc2626;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--surface-canvas);
  color: var(--text-primary);
  font: 15px/1.45 "Segoe UI Variable", "Segoe UI", sans-serif;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px max(24px, calc((100vw - 1080px) / 2));
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
}
.brand {
  text-decoration: none;
  color: var(--brand-primary);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.8px;
}
.brand span { color: var(--accent-action); }
.privacy, .hint, footer { color: var(--text-secondary); font-size: 13px; }
main { max-width: 1080px; margin: 24px auto; padding: 0 24px; }
.eyebrow { color: var(--accent-action); font-size: 12px; font-weight: 700; letter-spacing: 2px; }
h1 { font-size: clamp(28px, 3.5vw, 36px); line-height: 1.15; letter-spacing: -1px; margin: 8px 0; }
h2 { font-size: 18px; margin: 0 0 14px; }
.intro { color: var(--text-secondary); margin: 0 0 16px; }
.features { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.features span {
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 10px;
  background: var(--surface-card);
  font-size: 13px;
}
#checkout-form { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
legend { font-weight: 600; margin-bottom: 10px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan {
  position: relative;
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-card);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.plan:has(input:checked) { border-color: var(--accent-action); }
.plan input { position: absolute; right: 12px; top: 14px; accent-color: var(--accent-action); }
.plan > span { padding-right: 24px; }
.plan strong { font-size: clamp(19px, 2vw, 23px); margin-top: 8px; letter-spacing: -.6px; }
.plan small { color: var(--text-secondary); font-size: 13px; }
.billing { margin: 0; padding: 20px; background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: 8px; }
label { display: block; font-size: 14px; font-weight: 600; }
input[type=email] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font: inherit;
}
.hint { margin: 10px 0 0; }
.total { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; border-top: 1px solid var(--border-subtle); margin: 14px 0; padding-top: 12px; }
.total strong { font-size: 22px; }
button { border: 0; border-radius: 6px; padding: 12px 18px; width: 100%; background: var(--accent-action); color: #fff; font: 600 15px "Segoe UI", sans-serif; cursor: pointer; }
button:hover { background: var(--accent-hover); }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--pro-gold); outline-offset: 3px; }
.notice { padding: 10px 14px; margin: 0 0 16px; border-radius: 6px; background: var(--pro-subtle); color: var(--text-primary); }
.notice.error { color: var(--status-error); background: var(--surface-card); border: 1px solid var(--border-subtle); }
footer { margin-top: 16px; }
a { color: var(--accent-action); }
.success-mark { color: var(--accent-action); font-size: 42px; font-weight: 700; }
[hidden] { display: none !important; }

@media (min-width: 781px) and (max-height: 650px) {
  main { margin: 16px auto 8px; }
  .features { margin-bottom: 14px; }
}
@media (max-width: 780px) {
  header { padding: 12px 20px; }
  .privacy { display: none; }
  main { margin: 24px auto; padding: 0 18px; }
  #checkout-form { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .billing { padding: 20px; }
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --brand-primary: #0b132b;
    --brand-hover: #1c2541;
    --accent-action: #14b8a6;
    --accent-hover: #0d9488;
    --pro-gold: #eab308;
    --pro-subtle: #422006;
    --surface-canvas: #0f172a;
    --surface-card: #1e293b;
    --border-subtle: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --status-error: #f87171;
  }
  button { color: var(--brand-primary); }
  .brand { color: var(--text-primary); }
}
