/* XBRL Autopilot account pages. Colours, type and radii are the landing page's (docs/index.html):
   navy ink #061f3e, mint #17dca6, Outfit + DM Mono, sharp radii. Dark mode uses its inverse ground. */
:root {
  --bg: #ffffff; --surface: #f1f2f5; --ink: #061f3e; --muted: #5c6d84;
  --accent: #17dca6; --accent-ink: #111111; --action: #061f3e; --action-ink: #ffffff;
  --inv-bg: #061f3e; --inv-surface: #152d4a; --inv-ink: #ffffff; --inv-muted: #98a3b2;
  --line: rgb(6 31 62 / .12); --line-strong: rgb(6 31 62 / .28);
  --ok-bg: #dcf7ee; --ok-ink: #0a5a43; --bad-bg: #fde7e7; --bad-ink: #8a1f1f; --warn-bg: #fff4d6; --warn-ink: #6b4a00;
  --focus: #0b8f6c;
  --font: "Outfit", system-ui, sans-serif; --mono: "DM Mono", ui-monospace, Menlo, Consolas, monospace;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-btn: 4px;
  --dur: 180ms; --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 1px 0 rgb(6 31 62 / .04), 0 18px 40px -28px rgb(6 31 62 / .35);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #061f3e; --surface: #0c2747; --ink: #ffffff; --muted: #a9b3c1;
    --action: #17dca6; --action-ink: #111111;
    --line: rgb(255 255 255 / .12); --line-strong: rgb(255 255 255 / .28);
    --ok-bg: rgb(23 220 166 / .16); --ok-ink: #7ff0cf; --bad-bg: rgb(255 107 107 / .16); --bad-ink: #ffb3b3;
    --warn-bg: rgb(255 196 61 / .14); --warn-ink: #ffd98a; --focus: #17dca6;
    --shadow: 0 0 0 1px rgb(255 255 255 / .06);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2 { margin: 0; font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(28px, 4.2vw, 40px); }
h2 { font-size: 20px; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
img { display: block; }
.muted { color: var(--muted); }
.lead { margin-top: var(--s-2); max-width: 60ch; }
.break { overflow-wrap: anywhere; }
.warn { color: var(--warn-ink); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--s-4); top: -60px; z-index: 10; padding: var(--s-2) var(--s-4); background: var(--action); color: var(--action-ink); border-radius: var(--r-btn); }
.skip-link:focus { top: var(--s-3); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* the landing page's column (docs/assets/system.css): up to 1280 wide, side gutters 24 / 48 / 80 by screen size */
:root { --gut: 24px; --container: 1280px; }
@media (min-width: 640px) { :root { --gut: 48px; } }
@media (min-width: 1024px) { :root { --gut: 80px; } }
.wrap { width: min(100% - 2 * var(--gut), var(--container)); margin-inline: auto; padding-inline: 0; }

/* ---- top bar ---- */
.topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar__bar { display: flex; align-items: center; gap: var(--s-4); min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; letter-spacing: -0.01em; text-decoration: none; min-height: 44px; }
.topnav { display: flex; gap: var(--s-1); margin-inline-start: var(--s-4); }
.topnav__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3); border-radius: var(--r-btn); color: var(--muted); text-decoration: none; font-weight: 500; transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.topnav__link:hover { color: var(--ink); background: var(--surface); }
.topnav__link[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.topbar__out { display: flex; align-items: center; gap: var(--s-3); margin-inline-start: auto; min-width: 0; }
.topbar__who { color: var(--muted); font-size: 14px; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .topbar__bar { gap: 0 var(--s-2); padding-block: var(--s-1); }
  .topnav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .topbar__who { display: none; }
}

/* ---- buttons, links ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-5); border-radius: var(--r-btn); border: 1px solid transparent; font: 600 16px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform 80ms var(--ease); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--action); color: var(--action-ink); }
.btn--primary:hover { background: color-mix(in oklab, var(--action) 86%, var(--ink)); }
.btn--secondary { background: var(--bg); color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { background: var(--surface); border-color: color-mix(in oklab, var(--ink) 40%, transparent); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); }
.btn--sm { min-height: 40px; padding: 0 var(--s-4); font-size: 15px; }
.btn--block { width: 100%; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.link { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 500; }
.link:hover { text-decoration-color: currentColor; }

/* ---- page layout ---- */
.page { padding-block: var(--s-6) var(--s-8); }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-6); }
.eyebrow { font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: var(--s-3); }
.grid { display: grid; gap: var(--s-5); grid-template-columns: 1fr; }
@media (min-width: 880px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card--wide { grid-column: 1 / -1; } }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
@media (min-width: 768px) { .card { padding: var(--s-6); } }
.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }

/* ---- feedback ---- */
.notice, .alert, .banner { display: flex; gap: var(--s-2); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); font-size: 15px; }
.notice { background: var(--ok-bg); color: var(--ok-ink); margin-bottom: var(--s-5); }
.alert { background: var(--bad-bg); color: var(--bad-ink); }
.alert--warn { background: var(--warn-bg); color: var(--warn-ink); }
.banner { background: var(--surface); color: var(--muted); margin-bottom: var(--s-5); align-items: center; }
.banner svg { flex: none; }
.chip { display: inline-flex; align-items: center; gap: var(--s-1); padding: 4px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); font: 500 13px/1.2 var(--font); white-space: nowrap; }
.chip--ok { background: var(--ok-bg); color: var(--ok-ink); }
.chip--ok::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--bad { background: var(--bad-bg); color: var(--bad-ink); }

/* ---- facts ---- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s-4); margin: 0; }
.facts--stack { grid-template-columns: 1fr; gap: var(--s-3); }
.facts--stack > div { display: flex; justify-content: space-between; gap: var(--s-4); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.facts--stack > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.facts:not(.facts--stack) dd { font-size: 22px; letter-spacing: -0.02em; margin-top: 2px; }

/* ---- licence key ---- */
.keybox { display: flex; flex-direction: column; gap: var(--s-2); }
.keybox__label { font-size: 14px; color: var(--muted); }
.keybox__value { width: 100%; resize: vertical; min-height: 84px; padding: var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: 400 13px/1.5 var(--mono); word-break: break-all; }
.keybox__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.keybox__actions .btn[data-copied] { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 480px) { .keybox__actions .btn { flex: 1 1 100%; } }

/* ---- steps ---- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); }
.steps li { display: flex; gap: var(--s-3); align-items: flex-start; }
.steps li div { display: flex; flex-direction: column; }
.steps b { font-weight: 500; }
.steps span:not(.steps__n) { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.steps__n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ok-bg); color: var(--ok-ink); font: 500 14px/1 var(--mono); }

/* ---- empty / success ---- */
.empty { align-items: flex-start; }
.empty__title { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.success { max-width: 680px; margin-inline: auto; }
.success__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.success__sub { margin-top: var(--s-2); }
.success > .btn { align-self: flex-start; }

/* ---- plans ---- */
.plans { display: grid; gap: var(--s-5); grid-template-columns: 1fr; }
@media (min-width: 768px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan form { margin-top: auto; }
.plan--featured { border-color: var(--ink); box-shadow: inset 0 3px 0 var(--accent), var(--shadow); }
.plan__price { display: flex; align-items: baseline; gap: var(--s-2); }
.plan__amount { font-size: 40px; font-weight: 500; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.checks li { display: flex; gap: var(--s-2); align-items: flex-start; }
.checks svg { flex: none; margin-top: 4px; color: var(--ok-ink); }

/* ---- forms ---- */
.form { display: grid; gap: var(--s-4); margin-top: var(--s-5); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: 15px; }
.optional { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: var(--s-1); }
input[type=email], input[type=password], input[type=text], input[type=number], select {
  min-height: 48px; width: 100%; padding: 0 var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--bg); color: var(--ink); font: 400 16px var(--font); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
input:hover, select:hover { border-color: color-mix(in oklab, var(--ink) 45%, transparent); }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in oklab, var(--focus) 30%, transparent); }
.field--error input { border-color: var(--bad-ink); }
.field__help { font-size: 14px; color: var(--muted); }
.field__error { font-size: 14px; color: var(--bad-ink); }

/* ---- auth pages: navy panel + form (landing's inverse ground) ---- */
.auth__main { min-height: 100vh; min-height: 100dvh; }
.auth__grid { display: grid; min-height: inherit; grid-template-columns: 1fr; }
.auth__side { display: none; }
.auth__panel { display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 440px; margin-inline: auto; padding: var(--s-6) var(--s-4); }
.auth__brand-sm { margin-bottom: var(--s-6); }
.auth__title { font-size: 32px; margin-bottom: var(--s-2); }
.auth__switch { margin-top: var(--s-5); color: var(--muted); font-size: 15px; }
.auth__panel .alert { margin-top: var(--s-4); }
.auth__panel .notice { margin-bottom: var(--s-4); }
@media (min-width: 900px) {
  .auth__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .auth__side { display: flex; flex-direction: column; justify-content: space-between; padding: var(--s-7); background: var(--inv-bg); color: var(--inv-ink); position: relative; overflow: hidden; }
  .auth__side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgb(23 220 166 / .28), transparent 65%); pointer-events: none; }
  .auth__brand-sm { display: none; }
}
.brand--inv { color: var(--inv-ink); }
.auth__pitch { position: relative; z-index: 1; max-width: 420px; }
.auth__eyebrow { font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: var(--s-4); }
.auth__headline { font-size: 34px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 500; text-wrap: balance; }
.auth__points { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; gap: var(--s-3); color: var(--inv-muted); }
.auth__points li { display: flex; gap: var(--s-2); align-items: center; }
.auth__points svg { color: var(--accent); flex: none; }

/* ---- admin table (cards on phones) ---- */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: var(--s-4) var(--s-5); background: var(--surface); }
.table td { padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); vertical-align: middle; }
.table td > .muted { display: block; font-size: 14px; }
.grant { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.grant select { width: auto; min-width: 90px; }
.grant input[type=number] { width: 88px; }
.grant__unit { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: var(--s-4); border-top: 1px solid var(--line); }
  .table tr:first-child { border-top: 0; }
  .table td { border: 0; padding: var(--s-1) 0; }
  .table td::before { content: attr(data-label); display: block; font: 500 12px/1.6 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
}

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