:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --card: #ffffff;
  --text: #16181d;
  --muted: #5b6270;
  --line: #e2e6ee;
  --link: #1f5fe0;
  --accent: #2f6df0;
  --accent-text: #ffffff;
  --mark: #f5c42c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --bg-soft: #171a20;
    --card: #1b1e25;
    --text: #eceef2;
    --muted: #a3a9b6;
    --line: #2a2f39;
    --link: #8db2ff;
    --accent: #4b82f5;
    --accent-text: #ffffff;
    --mark: #f5c42c;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--link); }
main { max-width: 720px; margin: 0 auto; padding: 32px 16px 64px; }
.wide { max-width: 1040px; }

header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--text); text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
nav { display: flex; gap: 20px; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--text); }

h1 { font-size: 32px; line-height: 1.2; margin: 40px 0 8px; }
h2 { font-size: 20px; margin: 32px 0 8px; }
.muted { color: var(--muted); }
ul { padding-left: 20px; }

/* Shared by the landing and checkout */
.note { font-size: 14px; color: var(--muted); margin-top: 14px; }
.note.upgrade { padding: 16px 20px; border: 1px solid var(--accent); border-radius: 14px; background: var(--bg-soft); color: var(--text); font-size: 15px; }
.note.upgrade p { margin: 0 0 12px; }
.note.upgrade [hidden] { display: none; }
.note .error { color: #d33a2c; }
.plans { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--card); }
.plan.featured { border: 2px solid var(--accent); }
.plan h3 { margin: 0; font-size: 18px; }
.price { font-size: 32px; font-weight: 700; margin: 6px 0 0; }
.price small { font-size: 15px; font-weight: 400; color: var(--muted); }
.plan ul { margin: 0; padding-left: 18px; }
.plan li { margin: 4px 0; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

/* Checkout */
button.btn { font: inherit; font-weight: 600; cursor: pointer; background: transparent; margin-top: 16px; width: 100%; }
button.btn.primary { background: var(--accent); }
button.btn:disabled { opacity: .5; cursor: default; }
.plan .price { margin-bottom: 12px; }
.period { display: inline-flex; gap: 4px; padding: 4px; margin: 8px 0 24px; border: 1px solid var(--line); border-radius: 12px; }
.period button { font: inherit; padding: 8px 16px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.period button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.period small { opacity: .85; }

footer { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

@media (max-width: 480px) { nav { gap: 14px; } }
