:root {
  color-scheme: dark;
  --page: #0d1013;
  --surface: #15191e;
  --surface-raised: #1b2026;
  --line: #2b323a;
  --line-strong: #3a444e;
  --text: #f2f4f5;
  --muted: #99a2aa;
  --accent: #b8d8cc;
  --accent-ink: #10231d;
  --positive: #8fd4af;
  --danger: #e3a39d;
  --max-width: 1120px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; min-height: 100vh; background: var(--page); color: var(--text); }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }

.site-header, footer {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header { min-height: 76px; border-bottom: 1px solid var(--line); }
.site-header nav { display: flex; align-items: center; gap: 22px; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 650; }
.site-header nav a:hover { color: var(--text); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--accent); font-size: 14px; }

main { min-height: calc(100vh - 150px); }
.hero, .feature-section, .membership-panel, .account-shell { width: min(calc(100% - 40px), var(--max-width)); margin: 0 auto; }
.hero { padding: 112px 0 72px; }
.eyebrow, .card-label { display: block; color: var(--accent); font-size: 12px; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 790px; margin: 18px 0 22px; font-size: clamp(46px, 7vw, 82px); line-height: .98; letter-spacing: -.055em; }
.hero-copy { max-width: 660px; color: #bec4c9; font-size: clamp(18px, 2vw, 22px); line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 20px; margin-top: 34px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; border: 1px solid var(--accent); border-radius: 9px; padding: 0 20px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 780; }
.button:hover { background: #c8e2d8; border-color: #c8e2d8; }
.button-small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.button-secondary { border-color: var(--line-strong); background: transparent; color: var(--text); }
.button-secondary:hover { background: var(--surface-raised); border-color: #56616c; }
.text-link { color: var(--muted); font-size: 14px; font-weight: 650; }
.text-link:hover { color: var(--text); }

.product-frame { margin-top: 76px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.product-topline { display: flex; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 720; }
.live-dot { color: var(--positive); }
.live-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: currentColor; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.metric-grid div { padding: 28px 24px; border-right: 1px solid var(--line); }
.metric-grid div:last-child { border-right: 0; }
.metric-grid span, .metric-grid strong { display: block; }
.metric-grid span { margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.metric-grid strong { font-size: 17px; }

.feature-section { padding: 80px 0 110px; border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 1fr 2fr; align-items: start; }
.section-heading h2, .membership-panel h2 { max-width: 620px; font-size: clamp(32px, 5vw, 52px); line-height: 1.04; letter-spacing: -.04em; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 58px; border: 1px solid var(--line); background: var(--line); }
.feature-grid article { min-height: 260px; padding: 28px; background: var(--surface); }
.feature-number { color: var(--muted); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.feature-grid h3 { margin: 58px 0 12px; font-size: 20px; }
.feature-grid p, .membership-panel p { color: var(--muted); line-height: 1.65; }
.membership-panel { display: flex; align-items: end; justify-content: space-between; gap: 50px; margin-bottom: 100px; padding: 52px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); }
.membership-panel h2 { margin: 14px 0; }
.membership-panel p { max-width: 680px; margin-bottom: 0; }

.auth-shell, .message-shell { width: min(calc(100% - 40px), 520px); margin: 0 auto; padding: 72px 0 100px; }
.auth-card { padding: 38px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.auth-card h1 { margin: 14px 0 12px; font-size: 38px; line-height: 1.08; }
.auth-card > p { color: var(--muted); line-height: 1.55; }
.form-stack { display: grid; gap: 18px; margin-top: 28px; }
label { display: grid; gap: 8px; color: #d5d9dc; font-size: 13px; font-weight: 680; }
input { width: 100%; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 13px; outline: 0; background: #101419; color: var(--text); }
input:focus { border-color: var(--accent); }
.field-help { margin: -8px 0 0; color: var(--muted); font-size: 12px; }
.auth-switch { margin: 24px 0 0; font-size: 13px; }
.auth-switch a { color: var(--accent); }
.auth-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 16px; font-size: 12px; }
.auth-links a { color: var(--muted); }
.auth-links a:hover { color: var(--text); }
.alert, .dev-banner { margin: 20px 0; border: 1px solid currentColor; border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.5; }
.alert-error { color: var(--danger); background: #251918; }
.alert-success { color: var(--positive); background: #14221b; }
.dev-banner { color: #d8c48d; background: #211e15; }

.account-shell { padding: 72px 0 100px; }
.page-heading h1 { margin: 14px 0 38px; font-size: clamp(34px, 5vw, 54px); }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 26px; background: var(--surface); }
.card-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.card h2 { margin: 8px 0 0; font-size: 24px; letter-spacing: -.025em; text-transform: capitalize; }
.status-pill { display: inline-flex; border: 1px solid currentColor; border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 780; }
.status-active { color: var(--positive); }
.status-inactive { color: var(--danger); }
dl { margin: 34px 0 0; }
dl div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 13px; }
dt { color: var(--muted); }
dd { margin: 0; }
.billing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.billing-actions form { margin: 0; }
.billing-actions p { flex-basis: 100%; margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.activation-card p { color: var(--muted); }
.code-form { display: flex; gap: 10px; margin-top: 24px; }
.code-form input { font: 680 15px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.devices-card { margin-top: 18px; }
.device-list { margin: 20px 0 0; padding: 0; list-style: none; }
.device-list li { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.device-list strong, .device-list span { display: block; }
.device-list span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.device-list .empty-state { display: block; color: var(--muted); }
.logout-form { margin-top: 26px; }
.text-button { border: 0; padding: 0; background: transparent; color: var(--muted); text-decoration: underline; }
.activation-device { margin: 24px 0; border: 1px solid var(--line-strong); border-radius: 9px; padding: 18px; background: #101419; }
.activation-device span, .activation-device strong, .activation-device small { display: block; }
.activation-device span, .activation-device small { color: var(--muted); }
.activation-device strong { margin: 7px 0; font-size: 18px; }
.security-note { margin: 22px 0 0; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

footer { min-height: 74px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
  .site-header, footer, .hero, .feature-section, .membership-panel, .account-shell { width: min(calc(100% - 28px), var(--max-width)); }
  .site-header nav a:first-child { display: none; }
  .hero { padding-top: 76px; }
  .metric-grid, .feature-grid, .account-grid { grid-template-columns: 1fr; }
  .metric-grid div { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-grid div:last-child { border-bottom: 0; }
  .section-heading { grid-template-columns: 1fr; gap: 16px; }
  .feature-grid article { min-height: 220px; }
  .membership-panel { align-items: start; flex-direction: column; padding: 30px; }
  .auth-card { padding: 26px; }
  .code-form { flex-direction: column; }
  footer { align-items: start; flex-direction: column; justify-content: center; gap: 6px; }
}
