/*
  Aggregate Finance design system. Precise and quiet: ink and slate neutrals, one emerald accent for actions and
  positive states, hairline borders, small radii, and tabular figures wherever numbers appear. Mobile first, light and
  dark (dark mode has its own tuned values, not an inversion).
*/

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --surface-sunken: #eef2f6;
  --text: #0b1f33;
  --text-2: #3c4f63;
  --muted: #66788a;
  --border: #e2e8ef;
  --border-strong: #cdd6e0;
  --accent: #087a5b;
  --accent-strong: #06654b;
  --accent-soft: #e6f3ee;
  --accent-text: #ffffff;
  --ink: #0b1f33;
  --ink-text: #f5f8fb;
  --warning: #8a5300;
  --warning-soft: #fdf3e1;
  --warning-border: #f1d49c;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --danger-border: #f5c2bd;
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
  --shadow-sm: 0 1px 2px rgb(11 31 51 / 0.05);
  --shadow: 0 1px 2px rgb(11 31 51 / 0.04), 0 2px 8px rgb(11 31 51 / 0.04);
  --shadow-lifted: 0 1px 3px rgb(11 31 51 / 0.08), 0 16px 40px -12px rgb(11 31 51 / 0.24);
  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --page: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07111b;
    --surface: #0c1824;
    --surface-muted: #0f1d2b;
    --surface-sunken: #0a1520;
    --text: #e8eef4;
    --text-2: #b6c3cf;
    --muted: #8698a9;
    --border: #1b2b3a;
    --border-strong: #2a3d4f;
    --accent: #2fbf8a;
    --accent-strong: #5ad3a6;
    --accent-soft: #0f2b22;
    --accent-text: #03140e;
    --ink: #e8eef4;
    --ink-text: #07111b;
    --warning: #f2b75b;
    --warning-soft: #2a1f0d;
    --warning-border: #4d3a16;
    --danger: #f3877d;
    --danger-soft: #2e1412;
    --danger-border: #55231f;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 2px 8px rgb(0 0 0 / 0.2);
    --shadow-lifted: 0 1px 3px rgb(0 0 0 / 0.4), 0 16px 40px -12px rgb(0 0 0 / 0.6);
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; color: var(--text); font-weight: 600; letter-spacing: -0.018em; line-height: 1.2; }
h1 { font-size: clamp(1.5rem, 4.5vw, 1.75rem); }
h2 { font-size: 1.0625rem; letter-spacing: -0.01em; }
h3 { font-size: 0.9375rem; letter-spacing: -0.005em; }
p { margin: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
code { font-family: var(--mono); font-size: 0.85em; background: var(--surface-sunken); border: 1px solid var(--border); padding: 0.05em 0.35em; border-radius: 4px; }
strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.numbers, .price-amount, .stat-value, .quantity-value { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stack > * + * { margin-top: var(--gap, 1rem); }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* Page frame */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header-inner { max-width: calc(var(--page) + 2.5rem); margin: 0 auto; height: 60px; padding: 0 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 650; font-size: 0.975rem; letter-spacing: -0.015em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 26px; height: 26px; flex: none; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.header-link { color: var(--text-2); text-decoration: none; font-size: 0.875rem; font-weight: 500; }
.header-link:hover { color: var(--text); }
main { flex: 1; width: 100%; padding: 2rem 1.25rem 3.5rem; }
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding-bottom: env(safe-area-inset-bottom, 0px); }
.site-footer-inner { max-width: calc(var(--page) + 2.5rem); margin: 0 auto; padding: 1.25rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; font-size: 0.8125rem; color: var(--muted); }
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.column { max-width: 34rem; margin: 0 auto; }
.column-wide { max-width: 48rem; margin: 0 auto; }
.page { max-width: var(--page); margin: 0 auto; }
.page-title { font-size: clamp(1.5rem, 4.5vw, 1.75rem); }
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-header p { margin-top: 0.35rem; }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.25rem, 4vw, 1.75rem); }
.card + .card { margin-top: 1rem; }
.card-flush { padding: 0; }
.card-section { padding: 1.1rem clamp(1.25rem, 4vw, 1.5rem); }
.card-section + .card-section { border-top: 1px solid var(--border); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.section-title p { margin-top: 0.2rem; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.1rem 0.45rem; border-radius: 4px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid transparent; white-space: nowrap; }
.badge-sandbox { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-border); }
.badge-production, .badge-recommended { background: var(--accent-soft); color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.badge-neutral { background: var(--surface-sunken); color: var(--text-2); border-color: var(--border); }
.badge-recommended, .badge-neutral { text-transform: none; letter-spacing: 0; font-size: 0.75rem; font-weight: 550; }

/* Buttons */
.btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 40px; padding: 0 1rem;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-size: 0.9375rem; font-weight: 550; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 120ms, border-color 120ms, box-shadow 120ms, color 120ms, transform 80ms;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--accent-text); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 1px 2px rgb(11 31 51 / 0.18); }
.btn-primary:hover:not(:disabled) { background: var(--accent-strong); color: var(--accent-text); }
.btn-ink { background: var(--ink); color: var(--ink-text); }
.btn-ink:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 86%, var(--accent)); color: var(--ink-text); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-muted); color: var(--text); border-color: color-mix(in srgb, var(--text) 25%, var(--border-strong)); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--surface-sunken); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger-border); }
.btn-danger:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }
.btn-small { min-height: 32px; padding: 0 0.7rem; font-size: 0.8125rem; }
.btn-large { min-height: 46px; padding: 0 1.25rem; font-size: 1rem; }
.btn-google { background: #ffffff; color: #1f1f1f; border-color: #d4d9de; box-shadow: var(--shadow-sm); }
.btn-google:hover:not(:disabled) { background: #f7f8f9; color: #1f1f1f; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-small svg { width: 15px; height: 15px; }
.btn .spinner { width: 16px; height: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.actions-stacked { display: grid; gap: 0.6rem; }

/* Forms */
.form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.field { display: grid; gap: 0.35rem; }
.field-label { font-size: 0.8125rem; font-weight: 550; color: var(--text-2); }
.field-hint { justify-self: end; }
.field-row { display: grid; gap: 1rem; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field-static { padding: 0.65rem 0.8rem; border-radius: var(--radius-sm); background: var(--surface-muted); border: 1px solid var(--border); font-size: 0.875rem; color: var(--text-2); }
.form-footnote { margin-top: 1rem; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.input {
  flex: 1; min-width: 0; min-height: 40px; padding: 0 0.75rem; width: 100%;
  font: inherit; font-size: 0.9375rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  transition: border-color 120ms, box-shadow 120ms;
}
textarea.input { padding: 0.6rem 0.75rem; resize: vertical; line-height: 1.5; }
select.input { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input:hover { border-color: color-mix(in srgb, var(--text) 22%, var(--border-strong)); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.rename { display: flex; gap: 0.5rem; width: 100%; }

/* Alerts */
.alert { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.8rem 0.95rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid; font-size: 0.875rem; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 0.05rem; }
.alert-body { flex: 1; display: grid; gap: 0.6rem; color: var(--text); }
.alert-warning { background: var(--warning-soft); border-color: var(--warning-border); color: var(--warning); }
.alert-danger { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
.alert .btn { justify-self: start; }

/* Account menu */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; border-radius: 50%; }
.menu > summary::-webkit-details-marker { display: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--ink-text); font-size: 0.8125rem; font-weight: 600; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 232px; z-index: 20;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lifted);
  padding: 0.35rem; animation: rise 140ms var(--ease);
}
.menu-panel .menu-email { padding: 0.55rem 0.65rem 0.65rem; border-bottom: 1px solid var(--border); margin-bottom: 0.3rem; font-size: 0.8125rem; color: var(--muted); overflow-wrap: anywhere; }
.menu-panel .btn { width: 100%; justify-content: flex-start; min-height: 34px; font-size: 0.875rem; font-weight: 500; }

/* Dialog */
dialog.confirm { border: 1px solid var(--border); padding: 1.35rem; border-radius: var(--radius); width: min(26rem, calc(100vw - 2rem)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lifted); }
dialog.confirm::backdrop { background: rgb(7 17 27 / 0.5); }
dialog.confirm[open] { animation: rise 160ms var(--ease); }
dialog.confirm p { margin: 0.45rem 0 1.35rem; color: var(--muted); font-size: 0.9rem; }
dialog.confirm .actions { justify-content: flex-end; }

/* Toast */
.toast-region { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; display: grid; gap: 0.5rem; width: min(26rem, calc(100vw - 2rem)); }
.toast { padding: 0.75rem 0.95rem; border-radius: var(--radius-sm); background: var(--ink); color: var(--ink-text); box-shadow: var(--shadow-lifted); font-size: 0.875rem; animation: rise 200ms var(--ease); }
.toast.error { background: var(--danger); color: #fff; }

/* Motion */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(0.8); } 100% { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.spinner { border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; display: inline-block; }

/* Homepage */
.home { max-width: var(--page); margin: -2rem auto 0; }
.home-hero { display: grid; gap: 2.5rem; align-items: center; padding: clamp(2rem, 7vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
@media (min-width: 960px) { .home-hero { grid-template-columns: 1fr 1.1fr; gap: 3.5rem; } }
.home-hero h1 { font-size: clamp(2.1rem, 5.6vw, 3.25rem); line-height: 1.07; letter-spacing: -0.035em; font-weight: 650; max-width: 16ch; }
.home-hero .lede { margin-top: 1.1rem; font-size: clamp(1rem, 2.4vw, 1.125rem); color: var(--text-2); max-width: 40ch; }
.home-hero .eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 1.1rem; color: var(--accent); }
.home-hero .eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.home-cta { margin-top: 1.75rem; display: grid; gap: 0.75rem; max-width: 22rem; }
.home-cta .muted { font-size: 0.8125rem; }
.home-proof { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.8125rem; color: var(--muted); }
.home-proof span { display: inline-flex; align-items: center; gap: 0.4rem; }
.home-proof svg { width: 14px; height: 14px; color: var(--accent); }
.home-section { padding: clamp(2.5rem, 6vw, 4rem) 0; border-top: 1px solid var(--border); }
.home-section-header { max-width: 36rem; margin-bottom: 2rem; }
.home-section-header h2 { font-size: clamp(1.4rem, 3.4vw, 1.85rem); letter-spacing: -0.025em; margin-top: 0.5rem; }
.home-section-header p { margin-top: 0.6rem; color: var(--text-2); }
.home-steps { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; list-style: none; padding: 0; margin: 0; }
@media (min-width: 760px) { .home-steps { grid-template-columns: repeat(3, 1fr); } }
.home-steps li { background: var(--surface); padding: 1.35rem 1.25rem 1.5rem; }
.home-steps .step-number { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); }
.home-steps h3 { margin: 0.6rem 0 0.35rem; font-size: 1rem; }
.home-steps p { color: var(--text-2); font-size: 0.9rem; }
.home-pricing { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 900px) { .home-pricing { grid-template-columns: 1fr 26rem; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.65rem; }
.checklist li { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--text-2); font-size: 0.925rem; }
.checklist svg { width: 16px; height: 16px; flex: none; margin-top: 0.2rem; color: var(--accent); }
.security-grid { display: grid; gap: 1rem; }
@media (min-width: 760px) { .security-grid { grid-template-columns: repeat(3, 1fr); } }
.security-grid > div { padding: 1.1rem 0 0; border-top: 2px solid var(--ink); }
.security-grid h3 { font-size: 0.975rem; }
.security-grid p { margin-top: 0.4rem; color: var(--text-2); font-size: 0.9rem; }
.signin-card { max-width: 26rem; }

/* Product preview (a spreadsheet mock on the homepage) */
.sheet-preview { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lifted); overflow: hidden; font-size: 0.8125rem; }
.sheet-preview-bar { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--border); background: var(--surface-muted); }
.sheet-preview-bar .dots { display: flex; gap: 5px; }
.sheet-preview-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.sheet-preview-bar .title { font-weight: 550; color: var(--text-2); }
.sheet-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); overflow: hidden; font-size: 0.75rem; }
.sheet-tabs span { padding: 0.45rem 0.8rem; color: var(--muted); border-right: 1px solid var(--border); white-space: nowrap; }
.sheet-tabs span[aria-current] { color: var(--accent-strong); background: var(--surface); box-shadow: inset 0 -2px 0 var(--accent); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--border); }
.kpis > div { padding: 0.8rem 0.85rem; }
.kpis > div + div { border-left: 1px solid var(--border); }
.kpis dt { font-size: 0.6875rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.kpis dd { margin: 0.25rem 0 0; font-size: clamp(0.95rem, 2.6vw, 1.2rem); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mini-chart { display: flex; align-items: flex-end; gap: 6px; height: 72px; padding: 0.85rem 0.85rem 0; border-bottom: 1px solid var(--border); }
.mini-chart i { flex: 1; background: color-mix(in srgb, var(--accent) 30%, var(--surface)); border-radius: 3px 3px 0 0; }
.mini-chart i:last-child { background: var(--accent); }
.sheet-table-wrap { overflow-x: auto; }
.sheet-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sheet-table th { text-align: left; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; padding: 0.5rem 0.85rem; background: var(--surface-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.sheet-table td { padding: 0.55rem 0.85rem; border-bottom: 1px solid var(--border); white-space: nowrap; color: var(--text); }
.sheet-table tr:last-child td { border-bottom: 0; }
.sheet-table .amount { text-align: right; }
.status { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; font-weight: 550; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-paid { color: var(--accent); }
.status-due { color: var(--warning); }

/* Setup: progress */
.stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0 0 1.25rem; list-style: none; padding: 0; counter-reset: step; }
.stepper li { counter-increment: step; display: grid; gap: 0.5rem; font-size: 0.8125rem; color: var(--muted); font-weight: 500; }
.stepper li::before { content: ""; height: 3px; border-radius: 2px; background: var(--border); transition: background-color 300ms var(--ease); }
.stepper li[data-state="active"] { color: var(--text); font-weight: 600; }
.stepper li[data-state="active"]::before { background: linear-gradient(90deg, var(--accent) 50%, var(--border) 50%); }
.stepper li[data-state="done"]::before { background: var(--accent); }
#setup[data-step="plan"] { max-width: 58rem; }
.step { animation: rise 240ms var(--ease) both; }
.step-header { margin-bottom: 1.5rem; }
.step-header p { margin-top: 0.45rem; color: var(--text-2); }
.step-header .eyebrow { display: block; margin-bottom: 0.6rem; }
.step-icon { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-sunken); border: 1px solid var(--border); color: var(--text-2); margin-bottom: 1rem; }
.step-icon svg { width: 20px; height: 20px; }
.step-back { margin: -0.4rem 0 0.9rem -0.6rem; }
.trust { display: flex; align-items: center; gap: 0.45rem; margin-top: 1.1rem; color: var(--muted); font-size: 0.8125rem; }
.trust svg { width: 14px; height: 14px; flex: none; }

/* Plan step */
.plan-grid { display: grid; gap: 1rem; align-items: stretch; }
@media (min-width: 820px) { .plan-grid { grid-template-columns: 1fr 1fr; } }
.plan-option { display: flex; flex-direction: column; gap: 1rem; padding: 1.35rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.plan-option h2 { font-size: 1rem; }
.plan-option > p { color: var(--text-2); font-size: 0.9rem; margin-top: -0.5rem; }
.plan-option .price-amount { font-size: 2.25rem; }
.options-divider { display: none; }

/* Connected banks */
.bank-list { list-style: none; padding: 0; margin: 0 0 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.bank-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.85rem; animation: rise 200ms var(--ease) both; }
.bank-list li + li { border-top: 1px solid var(--border); }
.bank-avatar { width: 32px; height: 32px; border-radius: 6px; flex: none; display: grid; place-items: center; background: var(--ink); color: var(--ink-text); font-size: 0.8125rem; font-weight: 600; }
.bank-name { font-weight: 550; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Choices */
.options { display: grid; gap: 0.6rem; margin: 0 0 1.25rem; border: 0; padding: 0; }
.option {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 0.15rem 0.85rem; align-items: start;
  padding: 0.95rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface);
  cursor: pointer; transition: border-color 120ms, box-shadow 120ms, background-color 120ms;
}
.option::after { content: ""; grid-column: 3; grid-row: 1 / span 2; align-self: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); transition: border 120ms; }
.option:hover { border-color: color-mix(in srgb, var(--text) 25%, var(--border-strong)); }
.option-static, .option-static:hover { cursor: default; }
.option-static::after { display: none; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option-icon { grid-row: span 2; width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-sunken); color: var(--text-2); }
.option-icon svg { width: 18px; height: 18px; }
.option-title { font-weight: 600; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.9375rem; }
.option-description { color: var(--muted); font-size: 0.85rem; }
.option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent-soft) 35%, var(--surface)); }
.option:has(input:checked)::after { border: 5px solid var(--accent); }
.option:has(input:focus-visible) { box-shadow: 0 0 0 1px var(--accent), var(--focus); }

/* Setup progress checklist */
.tasks { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.task { display: grid; grid-template-columns: 24px 1fr; gap: 0.8rem; align-items: center; padding: 0.85rem 0.95rem; }
.task + .task { border-top: 1px solid var(--border); }
.task-status { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--border-strong); color: transparent; transition: all 200ms var(--ease); }
.task-status svg { width: 13px; height: 13px; stroke-width: 2.5; }
.task-label { font-weight: 550; color: var(--muted); font-size: 0.9rem; transition: color 200ms; }
.task-detail { display: block; font-size: 0.8125rem; font-weight: 400; color: var(--muted); }
.task[data-state="running"] .task-status { border-color: var(--border); border-top-color: var(--accent); animation: spin 700ms linear infinite; }
.task[data-state="running"] .task-label, .task[data-state="done"] .task-label { color: var(--text); }
.task[data-state="done"] .task-status { background: var(--accent); border-color: var(--accent); color: var(--accent-text); animation: pop 200ms var(--ease); }
.task[data-state="done"] .task-status path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 300ms 60ms var(--ease) forwards; }
.task[data-state="failed"] .task-status { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.task[data-state="failed"] .task-label { color: var(--danger); }

/* Completion */
.celebrate .step-icon { background: var(--accent); border-color: var(--accent); color: var(--accent-text); animation: pop 240ms var(--ease); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* Figures */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 1.5rem 0; overflow: hidden; }
.stat { padding: 0.8rem 0.95rem; background: var(--surface); box-shadow: -1px 0 0 var(--border), 0 -1px 0 var(--border); }
.stat strong, .stat .stat-value { display: block; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat > span:not(.stat-value), .stat-label { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 0.15rem; }

/* Dashboard */
.dashboard-grid { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 960px) { .dashboard-grid { grid-template-columns: minmax(0, 1fr) 20rem; } }
.dashboard-grid > * { min-width: 0; }
.dashboard-grid .card + .card { margin-top: 1rem; }
.aside .card { padding: 1.15rem 1.25rem; }
.hero { display: grid; gap: 1.1rem; }
.hero-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.hero-title { min-width: 0; }
.hero-title h1 { font-size: 1.25rem; }
.hero-title p { font-size: 0.8125rem; margin-top: 0.3rem; display: flex; align-items: center; }
.hero .stats { margin: 0; }
.rows { list-style: none; padding: 0; margin: 0; }
.rows > li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.8rem 0; border-top: 1px solid var(--border); }
.rows > li:first-child { border-top: 0; padding-top: 0.2rem; }
.row-main { flex: 1 1 10rem; min-width: 0; }
.row-main .muted { font-size: 0.8125rem; }
.row-actions { display: flex; gap: 0.25rem; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 0.45rem; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.status-dot.warning { background: var(--warning); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 18%, transparent); }
.sync-status { font-size: 0.8125rem; color: var(--muted); }
.sync-status:empty { display: none; }
.plan-line { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.plan-line strong { font-size: 0.9375rem; }
.definition { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; margin: 0.85rem 0 0; font-size: 0.8125rem; }
.definition dt { color: var(--muted); }
.definition dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
details.disclosure > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform 160ms var(--ease); margin-right: 0.35rem; flex: none; }
details.disclosure[open] > summary::after { transform: rotate(-135deg); }
details.disclosure[open] > summary { margin-bottom: 1rem; }
details.disclosure summary p { margin-top: 0.2rem; }

/* Admin */
.message-body { margin-top: 0.5rem; white-space: pre-wrap; color: var(--text); font-size: 0.9rem; }
.message[data-status="resolved"] .row-main { opacity: 0.6; }

/* Legal pages */
.prose { line-height: 1.7; color: var(--text-2); }
.prose h1 { margin-bottom: 0.35rem; }
.prose h2 { margin: 2.25rem 0 0.6rem; padding-top: 1.25rem; border-top: 1px solid var(--border); font-size: 1.05rem; }
.prose h3 { margin: 1.35rem 0 0.35rem; }
.prose strong { color: var(--text); }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 0.75rem; }
.prose ul { padding-left: 1.2rem; margin: 0.5rem 0 0; }
.prose li + li { margin-top: 0.4rem; }
.placeholder { background: var(--warning-soft); color: var(--warning); border-radius: 3px; padding: 0 0.25rem; font-weight: 600; }

/* Pricing */
.plan-card { display: grid; gap: 1.1rem; padding: 1.35rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.plan-card-emphasis { border-color: var(--border-strong); box-shadow: var(--shadow); margin-top: 1rem; }
.plan-card-header { display: flex; align-items: center; gap: 0.75rem; }
.plan-card-header .option-icon { grid-row: auto; flex: none; background: var(--ink); color: var(--ink-text); }
.plan-card-title { font-size: 1rem; }
.price-calculator { display: grid; gap: 0.75rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.price { display: flex; align-items: baseline; gap: 0.25rem; }
.price-amount { font-size: clamp(2.25rem, 8vw, 2.75rem); font-weight: 650; letter-spacing: -0.04em; line-height: 1; color: var(--text); }
.price-amount[data-bump] { animation: price-bump 220ms var(--ease); }
.price-interval { color: var(--muted); font-weight: 500; }
.price-caption strong { color: var(--text); font-weight: 600; }
.bank-picker { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding: 0.45rem 0.45rem 0.45rem 0.8rem; border-radius: var(--radius-sm); background: var(--surface-muted); border: 1px solid var(--border); }
.bank-picker-label { font-size: 0.875rem; font-weight: 550; color: var(--text-2); }
.quantity { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.quantity-button { appearance: none; width: 34px; height: 32px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1.05rem; line-height: 1; cursor: pointer; transition: background-color 120ms; }
.quantity-button:hover:not(:disabled) { background: var(--surface-sunken); }
.quantity-button:disabled { color: var(--border-strong); cursor: default; }
.quantity-value { min-width: 2.5rem; height: 32px; display: grid; place-items: center; font-weight: 600; font-size: 0.9375rem; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.bank-meter { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.bank-meter-slot { height: 6px; border-radius: 2px; background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--border); transition: background-color 160ms var(--ease); }
.bank-meter-slot svg { display: none; }
.bank-meter-slot[data-filled] { background: var(--accent); box-shadow: none; }
.plan-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.plan-features li { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.875rem; color: var(--text-2); }
.plan-features svg { width: 15px; height: 15px; flex: none; margin-top: 0.2rem; color: var(--accent); stroke-width: 2.4; }
@keyframes price-bump { 0% { opacity: 0.4; transform: translateY(3px); } 100% { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .task[data-state="running"] .task-status { animation: none; }
}
.plan-grid .plan-card { margin-top: 0; }
.alert-success { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent); }
dialog.confirm .delete-list { margin: 0 0 0.9rem; gap: 0.4rem; }
dialog.confirm .delete-list li { font-size: 0.875rem; }
dialog.confirm .delete-list li::before { content: "–"; color: var(--muted); }
dialog.confirm .field { margin: 1rem 0 1.25rem; }
