:root {
  color-scheme: light;
  font-family: "Source Sans 3", "Apple SD Gothic Neo", system-ui, sans-serif;
  color: #17201c;
  background: #f6f7f4;
  --canvas: #f6f7f4;
  --surface: #ffffff;
  --surface-muted: #eef1ed;
  --ink: #17201c;
  --muted: #5c6861;
  --border: #d5dbd6;
  --accent: #087a5b;
  --accent-hover: #056348;
  --accent-soft: #ddf2e9;
  --danger: #b3261e;
  --danger-soft: #fce8e6;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--canvas); }
body { min-height: 100vh; margin: 0; }
button, input { font: inherit; }
button { min-height: 44px; border: 0; border-radius: 8px; padding: 0 18px; color: #f6fffa; background: var(--accent); font-weight: 700; cursor: pointer; transition: background 160ms cubic-bezier(.2,.8,.2,1), transform 160ms cubic-bezier(.2,.8,.2,1); }
button:hover { background: var(--accent-hover); }
button:active { transform: translateY(1px); }
button:disabled { cursor: wait; opacity: .58; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.secondary { color: var(--ink); background: var(--surface); border: 1px solid var(--border); }
.secondary:hover { background: var(--surface-muted); }
.compact { min-height: 38px; padding-inline: 14px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 10; transform: translateY(-160%); padding: 8px 12px; color: #f6fffa; background: var(--ink); }
.skip-link:focus { transform: none; }
.site-header { height: 72px; display: flex; align-items: center; justify-content: space-between; max-width: 1180px; margin: 0 auto; padding: 0 28px; border-bottom: 1px solid var(--border); }
.brand { color: var(--ink); font-size: 24px; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
main { max-width: 1180px; margin: 0 auto; padding: clamp(40px, 7vw, 84px) 28px 72px; }
h1, h2, p { margin: 0; }
h1 { font-family: "Source Serif 4", Georgia, serif; font-size: clamp(38px, 5.2vw, 64px); line-height: 1.08; letter-spacing: -.035em; }
h2 { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.25; letter-spacing: -.025em; }
.eyebrow { margin-bottom: 9px; color: var(--muted); font: 700 11px/1.3 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .11em; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: clamp(48px, 8vw, 112px); align-items: center; min-height: min(620px, calc(100vh - 184px)); }
.auth-intro > p:not(.eyebrow) { max-width: 580px; margin-top: 26px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.assurances { display: grid; gap: 12px; margin: 30px 0 0; padding: 26px 0 0; border-top: 1px solid var(--border); list-style: none; color: var(--muted); }
.assurances li { display: flex; gap: 10px; }
.assurances span { color: var(--accent); font-weight: 800; }
.auth-form { display: grid; gap: 15px; padding: clamp(26px, 4vw, 40px); border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.form-copy { margin-bottom: 10px; color: var(--muted); line-height: 1.55; }
label { color: var(--muted); font-size: 13px; font-weight: 700; }
input { width: 100%; min-height: 48px; border: 1px solid var(--border); border-radius: 8px; padding: 0 13px; color: var(--ink); background: var(--surface); }
input:user-invalid { border-color: var(--danger); }
.form-status, .page-status { min-height: 21px; color: var(--danger); font-size: 13px; line-height: 1.55; }
.message-view { min-height: min(620px, calc(100vh - 184px)); display: grid; place-items: center; }
.message-panel { width: min(560px, 100%); text-align: center; }
.message-panel h1 { font-size: clamp(34px, 5vw, 52px); }
.message-panel > p:not(.eyebrow) { margin: 18px auto 28px; color: var(--muted); line-height: 1.65; }
.status-mark { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 24px; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-size: 24px; font-weight: 800; }
.account-view { display: grid; gap: 34px; }
.account-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.account-heading h1 { font-size: clamp(36px, 4.4vw, 52px); }
.account-id { max-width: 280px; overflow: hidden; color: var(--muted); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.subscription-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(24px, 4vw, 38px) 0; border-block: 1px solid var(--border); }
.subscription-summary h2 { margin: 12px 0 8px; }
.subscription-summary p, .section-heading > p, .billing-note { color: var(--muted); line-height: 1.6; }
.status-chip { display: inline-flex; min-height: 28px; align-items: center; padding: 0 10px; border-radius: 999px; color: var(--accent-hover); background: var(--accent-soft); font-size: 12px; font-weight: 800; }
.plans, .devices { display: grid; gap: 22px; }
.section-heading { display: flex; justify-content: space-between; gap: 32px; align-items: end; }
.section-heading > p { max-width: 500px; }
.plan-list, .device-list { border-top: 1px solid var(--border); }
.plan-row, .device-row { display: grid; align-items: center; gap: 16px; min-height: 82px; border-bottom: 1px solid var(--border); }
.plan-row { grid-template-columns: minmax(160px, 1fr) minmax(120px, .55fr) auto; }
.device-row { grid-template-columns: minmax(160px, 1fr) minmax(100px, .5fr) minmax(120px, .6fr); }
.row-title { display: grid; gap: 3px; }
.row-title span, .device-row > span { color: var(--muted); font-size: 13px; }
.price { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.price span { color: var(--muted); font-size: 13px; font-weight: 500; }
.billing-note { font-size: 13px; }

@media (max-width: 760px) {
  .site-header, main { padding-inline: 20px; }
  .auth-layout { grid-template-columns: 1fr; gap: 42px; }
  .auth-intro h1 br { display: none; }
  .account-heading, .subscription-summary, .section-heading { align-items: start; flex-direction: column; }
  .plan-row, .device-row { grid-template-columns: 1fr; padding-block: 18px; }
  .price { text-align: left; }
  .plan-row button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --canvas: #111613; --surface: #18201c; --surface-muted: #202a25; --ink: #eef4f0; --muted: #aab8b0; --border: #344139; --accent: #54c69b; --accent-hover: #72d5af; --accent-soft: #173e31; }
  button { color: #102018; }
  .secondary { color: var(--ink); }
  .status-chip { color: #8adfbd; }
}
