/* SportStatsAPI account site. Tokens and components from the design board
   (claude.ai/design, "AccountSite"): the marketing site's brand, Archivo. */
:root {
  --bg: #F2F3F6; --surface: #FFFFFF; --surface-2: #F7F8FA;
  --fg: #0D1330; --fg-2: #535C78; --fg-3: #5E6683;
  --line: #D7DBE4; --line-strong: #B4BACB;
  --accent: #2340F5; --accent-deep: #1529B8; --accent-fg: #FFFFFF; --accent-soft: #EEF1FF;
  --btn: #2340F5; --btn-fg: #FFFFFF; --brand: #2340F5; --brand-line: #2340F5;
  --ok: #13734A; --ok-soft: #E3F4EA; --warn: #7A5200; --warn-soft: #FFF3D6; --err: #B3261E; --err-soft: #FDEBEA;
  --focus: #2340F5; --amber: #FFB81C; --ink: #0D1330;
  --font: 'Archivo', 'Helvetica Neue', Helvetica, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 8px; --r-lg: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #060A1F; --surface: #0D1330; --surface-2: #161E45;
    --fg: #FFFFFF; --fg-2: #C3C8D9; --fg-3: #9AA2B8;
    --line: #232A52; --line-strong: #3A4372;
    --accent: #93A2FF; --accent-deep: #B8C2FF; --accent-fg: #060A1F; --accent-soft: #18215A;
    --btn: #FFB81C; --btn-fg: #0D1330; --brand: #0D1330; --brand-line: #232A52;
    --ok: #5BD49B; --ok-soft: #0F2A22; --warn: #FFC94D; --warn-soft: #2E2410; --err: #FF8A80; --err-soft: #3A1418;
    --focus: #FFB81C;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-height: 100vh; }
body { margin: 0; display: flex; flex-direction: column; background: var(--bg); color: var(--fg); font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, p, dl, dd, ul, ol, pre, figure { margin: 0; }
strong { font-weight: 600; }
code { font-family: var(--mono); font-size: 13px; padding: 2px 6px; border-radius: 5px; background: var(--surface-2);
  border: 1px solid var(--line); }

/* Header and footer */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; height: 64px;
  background: var(--brand); color: #FFF; border-bottom: 1px solid var(--brand-line); }
.brand { display: flex; align-items: center; gap: 10px; color: #FFF; text-decoration: none; }
.brand:hover { color: #FFF; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--amber); color: var(--ink); display: grid;
  place-items: center; flex: none; }
.brand-name { font-size: 19px; font-stretch: 118%; font-weight: 800; letter-spacing: -0.03em; }
.brand-api { font-size: 11px; font-stretch: 80%; font-weight: 800; letter-spacing: 0.04em; padding: 0 5px;
  border: 1.5px solid currentColor; border-radius: 5px; opacity: .85; line-height: 1.5; }
.top-logout { font: inherit; font-size: 15px; font-weight: 600; background: none; border: 0; padding: 8px 4px; color: #FFF;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
main { flex: 1; padding: 40px 20px 56px; }
.foot { background: var(--ink); color: rgba(255,255,255,.78); border-top: 1px solid var(--brand-line); }
.foot-in { max-width: 1040px; margin: 0 auto; padding: 24px 20px 32px; font-size: 14px; display: flex; flex-wrap: wrap;
  gap: 12px 24px; align-items: center; justify-content: space-between; }
.foot .brand-mark { width: 22px; height: 22px; }
.foot .brand-name { font-size: 15px; }
.foot a { color: #FFF; }

/* Page widths and stacks */
.narrow { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.slim { max-width: 420px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 20px; }
.wide { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-s { display: flex; flex-direction: column; gap: 6px; }
.stack-l { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.between { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }

/* Type */
.title { font-size: 26px; line-height: 1.2; font-weight: 800; font-stretch: 118%; letter-spacing: -0.03em; }
.title-xl { font-size: 32px; line-height: 1.15; font-weight: 800; font-stretch: 122%; letter-spacing: -0.035em; }
.h2 { font-size: 19px; font-weight: 750; font-stretch: 108%; letter-spacing: -0.01em; }
.h3 { font-size: 14px; font-weight: 600; }
.lead { color: var(--fg-2); }
.text-2 { color: var(--fg-2); font-size: 15px; }
.small { color: var(--fg-3); font-size: 13px; }
.center { text-align: center; }
.eyebrow { font-size: 13px; color: var(--fg-3); font-weight: 500; }
.mono { font-family: var(--mono); font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px;
  display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card-lg { padding: 28px 24px; gap: 22px; }
.card-plain { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: flex;
  flex-direction: column; gap: 8px; font-size: 14px; }
.card-plain ul { padding-left: 18px; color: var(--fg-2); display: flex; flex-direction: column; gap: 4px; }
.empty { border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: 28px 22px; display: flex;
  flex-direction: column; gap: 6px; align-items: flex-start; }
.empty-title { font-weight: 600; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; height: 44px;
  padding: 0 20px; border-radius: var(--r); border: 1px solid var(--btn); background: var(--btn); color: var(--btn-fg);
  font: inherit; font-weight: 700; font-stretch: 108%; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn:hover { color: var(--btn-fg); filter: brightness(1.08); }
.btn-lg { height: 48px; font-size: 16px; width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-xs { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 7px; }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--line-strong); font-weight: 500; font-stretch: normal; }
.btn-secondary:hover { color: var(--fg); filter: none; background: var(--surface-2); }
.btn-quiet { background: none; border: 0; color: var(--fg-2); font-weight: 400; font-stretch: normal; padding: 0 6px;
  text-decoration: underline; text-underline-offset: 2px; }
.btn-quiet:hover { color: var(--fg); filter: none; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--surface-2); border-color: var(--line); color: var(--fg-3);
  cursor: not-allowed; filter: none; }
.btn-block { width: 100%; }
form.inline { display: inline; }

/* Forms */
label { font-size: 14px; font-weight: 500; }
input[type=email], input[type=text], input[type=password], select { height: 44px; padding: 0 12px; border: 1px solid var(--line-strong);
  border-radius: var(--r); background: var(--surface); color: var(--fg); font: inherit; font-size: 15px; width: 100%; }
input[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }

/* Alerts and notes */
.note { padding: 10px 14px; border-radius: var(--r); font-size: 14px; }
.note-warn { background: var(--warn-soft); }
.note-err { background: var(--err-soft); color: var(--err); font-weight: 500; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); font-size: 15px; }
.alert-title { font-weight: 600; }
.alert-text { color: var(--fg-2); font-size: 14px; }
.alert-icon { padding-top: 2px; flex: none; }
.alert-info { background: var(--accent-soft); }
.alert-warn { background: var(--warn-soft); } .alert-warn .alert-icon { color: var(--warn); }
.alert-err { background: var(--err-soft); } .alert-err .alert-icon { color: var(--err); }
.alert-neutral { background: var(--surface-2); border: 1px solid var(--line); } .alert-neutral .alert-icon { color: var(--fg-2); }
.alert-ok { background: var(--ok-soft); font-weight: 600; align-items: center; padding: 12px 16px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px;
  font-weight: 600; white-space: nowrap; color: var(--fg-2); background: var(--surface-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-ok { color: var(--ok); background: var(--ok-soft); }
.b-warn { color: var(--warn); background: var(--warn-soft); }
.b-err { color: var(--err); background: var(--err-soft); }
.b-info { color: var(--accent); background: var(--accent-soft); }

/* Tables */
.table-wrap { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 16px; font-size: 12px; font-weight: 600; color: var(--fg-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
th.num, td.num { text-align: right; }
.muted { color: var(--fg-2); }

/* Definition lists */
.terms { display: grid; grid-template-columns: auto minmax(0, 1fr); border-top: 1px solid var(--line); font-size: 14px; }
.terms dt { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); color: var(--fg-3); }
.terms dd { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 24px; font-size: 14px; }
.facts dt { color: var(--fg-3); font-size: 13px; }
.facts dd { margin-top: 2px; }

/* Checkout */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 13px; color: var(--fg-2); }
.step-dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; border: 1px solid var(--line-strong); color: var(--fg-3); }
.steps .done .step-dot { background: var(--ok); border-color: var(--ok); color: var(--surface); font-size: 0; }
.steps .done .step-dot::after { content: "✓"; font-size: 14px; }
.steps .current .step-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.dot-base { width: 14px; height: 14px; border-radius: 50%; background: #0052FF; display: inline-block; vertical-align: -2px; }
.dot-usdc { width: 14px; height: 14px; border-radius: 50%; background: #2775CA; color: #FFF; font-size: 9px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: center; font-size: 13px; color: var(--fg-3); }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust strong { color: var(--fg-2); }
#checkout #status:empty { display: none; }
#checkout[data-state="busy"] #pay,
#checkout[data-state="paid"] #pay, #checkout[data-state="settling"] #pay { display: none; }
#checkout[data-state="paid"] .pay-hint, #checkout[data-state="busy"] .pay-hint,
#checkout[data-state="settling"] .pay-hint, #checkout[data-state="approving"] .pay-hint { display: none; }
.waiting { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 6px;
  animation: ssa-pulse 1.4s ease-in-out infinite; }
.spinner { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong);
  border-top-color: var(--fg); animation: ssa-spin .8s linear infinite; }
.progress { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 12px; }
.progress span { display: block; width: 40%; height: 100%; background: var(--accent); border-radius: 3px; animation: ssa-slide 1.6s ease-in-out infinite; }
@keyframes ssa-spin { to { transform: rotate(360deg); } }
@keyframes ssa-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
@keyframes ssa-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .waiting, .spinner, .progress span { animation: none; } }
.ok-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: var(--surface); display: inline-flex;
  align-items: center; justify-content: center; flex: none; }

/* Key reveal */
.secret { padding: 16px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface-2);
  font-family: var(--mono); font-size: 15px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; user-select: all; cursor: text; }

/* Plan page */
.plan-grid { max-width: 960px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.plan-info { flex: 1 1 380px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.plan-buy { flex: 1 1 320px; max-width: 440px; }
.price { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.price-amount { font-size: 40px; line-height: 1; font-weight: 800; font-stretch: 72%; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.checks { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.checks li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.checks li::before { content: "✓"; color: var(--ok); font-weight: 700; flex: none; }

/* Account page */
.section { display: flex; flex-direction: column; gap: 14px; }
.sub-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px;
  display: flex; flex-direction: column; gap: 16px; }
.sub-name { font-size: 19px; font-weight: 750; font-stretch: 108%; letter-spacing: -0.01em; }
.sub-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 20px 14px;
  display: flex; flex-direction: column; gap: 8px; }
.chart { height: 140px; }
.chart svg { display: block; width: 100%; height: 100%; }
.chart .bar { fill: var(--accent); }
.chart .bar-today { fill: var(--fg-2); }
.chart .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-axis { display: flex; justify-content: space-between; color: var(--fg-3); font-size: 12px; font-variant-numeric: tabular-nums; }
details.usage-table { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 14px; }
details.usage-table summary { cursor: pointer; color: var(--fg-2); }
details.usage-table td { padding: 8px 16px; }

/* Message page */
.message { max-width: 480px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.msg-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; color: var(--fg-2); background: var(--surface-2); }
.tone-ok { color: var(--ok); background: var(--ok-soft); }
.tone-warn { color: var(--warn); background: var(--warn-soft); }
.tone-err { color: var(--err); background: var(--err-soft); }
.tone-info { color: var(--accent); background: var(--accent-soft); }
.sent-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: flex;
  align-items: center; justify-content: center; }

@media (max-width: 480px) {
  main { padding: 28px 16px 44px; }
  .card { padding: 20px 18px; }
  .title-xl { font-size: 28px; }
}
#checkout[data-state="paid"] ~ .help, #checkout[data-state="busy"] ~ .help, #checkout[data-state="settling"] ~ .help { display: none; }
