/* Vespr's sign-in screens: the app's own design (web/src/index.css and components/ui): Inter, shadcn/ui's zinc
   colours, pill buttons, softly rounded inputs. One calm column on the page itself, no boxes around anything. Light or
   dark follows the device. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/InterVariable.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --background: #ffffff; --foreground: #09090b; --card: #ffffff; --muted: #f4f4f5; --muted-foreground: #71717a;
  --border: #e4e4e7; --primary: #18181b; --primary-foreground: #fafafa; --ring: #a1a1aa;
  --destructive: #dc2626; --success: #16a34a; --warning: #b45309;
}
/* Auto follows the device; signed in, your Light or Dark choice (the dashboard's, saved with your settings) wins. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #09090b; --foreground: #fafafa; --card: #0c0c0f; --muted: #18181b; --muted-foreground: #a1a1aa;
    --border: #27272a; --primary: #fafafa; --primary-foreground: #18181b; --ring: #52525b;
    --destructive: #f87171; --success: #4ade80; --warning: #fbbf24;
  }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #09090b; --foreground: #fafafa; --card: #0c0c0f; --muted: #18181b; --muted-foreground: #a1a1aa;
  --border: #27272a; --primary: #fafafa; --primary-foreground: #18181b; --ring: #52525b;
  --destructive: #f87171; --success: #4ade80; --warning: #fbbf24;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* a layout rule (flex, grid) would otherwise win over hidden */
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font: 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- the column */
.shell {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: clamp(40px, 14vh, 120px) 20px 64px;
  animation: rise 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wordmark {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 40px;
  color: var(--foreground); text-decoration: none;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
}
.mark {
  width: 18px; height: 18px; border-radius: 6px;
  background: linear-gradient(145deg, var(--foreground), color-mix(in srgb, var(--foreground) 55%, var(--background)));
}

.intro { margin-bottom: 28px; }
h1 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; }
.lede { margin: 8px 0 0; color: var(--muted-foreground); }
.lede strong { color: var(--foreground); font-weight: 500; }

/* The person Access let in: the email is Access's, so it's shown, not asked for. Changing it means signing out of
   Access, which then asks for an email and sends it a code (Cloudflare handles /cdn-cgi/access/logout itself). */
.identity {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 24px;
  color: var(--foreground); font-weight: 500;
  overflow-wrap: anywhere;
}
.identity .who { min-width: 0; }
.edit {
  margin-left: auto; flex: none; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 999px;
  color: var(--muted-foreground);
}
.edit:hover { background: var(--muted); color: var(--foreground); }
.edit:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.edit .icon { width: 14px; height: 14px; }
button.edit { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.field-head .edit { align-self: center; margin: -6px -6px -6px 0; }
.edit[aria-expanded="true"] .edit-closed, .edit:not([aria-expanded="true"]) .edit-open { display: none; }
.edit span { display: grid; }
.avatar {
  flex: none; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--muted); color: var(--muted-foreground);
  font-size: 12px; font-weight: 600;
}

/* ---------------------------------------------------------------- fields */
.stack { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
/* Under the password box, to its right, where people look once they've tried (2026-11-04). */
.forgot-link { align-self: flex-end; font-size: 13px; }
label { font-size: 13px; font-weight: 500; }
.input {
  width: 100%; height: 40px; padding: 0 12px;
  font: inherit; color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--border); border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:hover { border-color: var(--ring); }
.input:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 30%, transparent); }
.input.invalid, .input.invalid:hover { border-color: var(--destructive); }
.input.invalid:focus { border-color: var(--destructive); box-shadow: 0 0 0 3px color-mix(in srgb, var(--destructive) 22%, transparent); }
.field-error { margin: 0; font-size: 13px; color: var(--destructive); }
/* Show / Hide inside the password field (the sign-in screen) and the account number fields. */
.password-wrap, .number-wrap { position: relative; }
.password-wrap .input, .number-wrap .input.masked { padding-right: 68px; }
.reveal {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent;
  font: inherit; font-size: 13px; font-weight: 500; color: var(--muted-foreground); cursor: pointer;
}
.reveal:hover { background: var(--muted); color: var(--foreground); }
.reveal:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.field-note { margin: 0; font-size: 13px; color: var(--muted-foreground); }
/* Account numbers: shown as dots, in a plain text field, so no password manager saves or fills one. */
.input.masked { -webkit-text-security: disc; font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.input.masked.shown { -webkit-text-security: none; } /* Show: the digits as typed */

.check { display: flex; align-items: center; gap: 10px; font-weight: 400; color: var(--foreground); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.muted { color: var(--muted-foreground); }
.hint { margin: -4px 0 0; font-size: 13px; color: var(--muted-foreground); }

/* ---------------------------------------------------------------- buttons and links (the app's pill buttons) */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 40px; padding: 0 16px;
  font: inherit; font-weight: 500;
  border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.button:focus-visible, .link:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.button:disabled { opacity: 0.5; cursor: default; }
.button.primary { background: var(--primary); color: var(--primary-foreground); }
.button.primary:hover:not(:disabled) { opacity: 0.9; }
.button.outline { background: var(--card); color: var(--foreground); border-color: var(--border); }
.button.outline:hover:not(:disabled) { border-color: var(--ring); }
.button.ghost { background: transparent; color: var(--foreground); }
.button.ghost:hover:not(:disabled) { background: var(--muted); }
.button.danger { color: var(--destructive); }
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon circle { fill: currentColor; }

.link {
  padding: 0; border: 0; background: none;
  font: inherit; font-weight: 500; color: var(--foreground);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border);
  cursor: pointer;
}
.link:hover { text-decoration-color: currentColor; }
.link.quiet { font-size: 13px; font-weight: 400; color: var(--muted-foreground); text-decoration: none; }
.link.quiet:hover { color: var(--foreground); }
.link:disabled { color: var(--muted-foreground); cursor: default; text-decoration: none; }
.back { display: inline-flex; align-items: center; gap: 6px; }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted-foreground); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.aside { margin: 20px 0 0; font-size: 13px; color: var(--muted-foreground); }
/* Forgot password, once the link is on its way: a paper airplane, then what to do, with Send it again under it, given
   room to breathe (2026-11-01: it was cramped), more on a taller screen. */
.sent {
  display: grid; justify-items: center; gap: 10px; padding-top: clamp(8px, 4vh, 40px); text-align: center;
  animation: rise 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.sent-art {
  display: grid; place-items: center; width: 112px; height: 112px; margin-bottom: 20px; border-radius: 999px;
  background: var(--muted); color: var(--foreground);
}
.sent-art .icon { width: 50px; height: 50px; stroke-width: 1.5; animation: fly 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes fly { from { opacity: 0; transform: translate(-10px, 10px); } to { opacity: 1; transform: none; } }
/* After Sign up: an envelope that settles in from above, then the code under it. */
.sent.arrived { padding-top: 0; }
.sent.arrived .sent-art { margin-bottom: 12px; }
.sent.arrived .sent-art .icon { animation-name: arrive; }
.sent.arrived + .stack { margin-top: 28px; }
@keyframes arrive { from { opacity: 0; transform: translateY(-8px) scale(0.96); } to { opacity: 1; transform: none; } }
.sent-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.sent .lede { margin: 0; text-wrap: pretty; }
.resend { margin: 20px 0 0; font-size: 13px; color: var(--muted-foreground); }
/* Back to sign in: a button under Email me a link, and the one way on once it's sent. */
.back-button { margin-top: 12px; text-decoration: none; }
.sent:not([hidden]) + .back-button { margin-top: clamp(32px, 7vh, 64px); }
/* A leaked password (decision 65): told plainly, then the person's choice. */
.leaked {
  display: grid; gap: 10px; margin-top: 16px; padding: 16px; border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--warning) 40%, var(--border)); background: color-mix(in srgb, var(--warning) 8%, var(--card));
  animation: rise 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.leaked-title { margin: 0; font-weight: 600; }
.leaked .hint { margin: 0; }
ul.plain { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.resend .link:disabled { color: var(--muted-foreground); text-decoration: none; }

/* ---------------------------------------------------------------- the 6-digit code: six slots over one real input, so
   paste, the phone's autofill and screen readers all work on the input itself */
.otp { position: relative; }
.otp-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; border: 0; font-size: 16px; /* 16px: phones don't zoom in */
  cursor: text;
}
.otp-slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.slot {
  display: grid; place-items: center; height: 52px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--card);
  font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.otp:hover .slot { border-color: var(--ring); }
.slot.active { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 30%, transparent); }
.slot.active.empty::after {
  content: ""; width: 1.5px; height: 22px; background: var(--foreground);
  animation: caret 1.1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* ---------------------------------------------------------------- what a password must have (decision 54) */
.rules { list-style: none; margin: -6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--muted-foreground); }
.rules li { display: flex; align-items: center; gap: 8px; transition: color 0.2s ease; }
.rules li::before {
  content: ""; flex: none; display: grid; place-items: center;
  width: 14px; height: 14px; border-radius: 999px; border: 1.5px solid var(--border);
  font-size: 9px; font-weight: 700; line-height: 1; color: var(--background);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.rules li.met { color: var(--success); }
.rules li.met::before { content: "\2713"; background: var(--success); border-color: var(--success); } /* ✓, not colour alone */

/* ---------------------------------------------------------------- the account page */
.group { margin-top: 32px; }
.group h2, .group h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted-foreground); text-transform: uppercase; }
.group .hint { margin: 0 0 12px; }
.rows { list-style: none; margin: 0 0 12px; padding: 0; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.rows li:last-child { border-bottom: 1px solid var(--border); }
.rows li .button { width: auto; height: 30px; padding: 0 12px; font-size: 13px; flex: none; white-space: nowrap; }
.row-actions { display: flex; flex-direction: column; gap: 8px; }
.rows .what { min-width: 0; }
.row-name { font-weight: 500; overflow-wrap: anywhere; }
.row-sub { font-size: 13px; color: var(--muted-foreground); }
a.button { text-decoration: none; }
.dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 999px; vertical-align: 1px;
  background: var(--success); }
.dot.warn { background: var(--warning); }

/* ---------------------------------------------------------------- your banks (C4 stage E) */
.points { margin: 0 0 24px; padding: 0 0 0 18px; display: grid; gap: 8px; color: var(--muted-foreground); }
.points li::marker { color: var(--border); }
#linked:empty { display: none; }
#linked { margin: 0 0 20px; }

/* ---------------------------------------------------------------- status, waiting */
.status { min-height: 1.5em; margin: 16px 0 0; font-size: 13px; color: var(--muted-foreground); }
.status.bad { color: var(--destructive); }
.spinner {
  width: 22px; height: 22px; border-radius: 999px;
  border: 2px solid var(--border); border-top-color: var(--foreground);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cf-turnstile:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- signed in: the top bar and the profile icon */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1040px; margin: 0 auto;
  padding: 18px 24px;
}
.topbar .wordmark { margin: 0; }
.topbar-end { display: flex; align-items: center; gap: 10px; }
/* Light or dark, one press each way (2026-11-01): the sun or moon is the look the page has now. */
.round-button {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted-foreground); box-shadow: 0 0 0 1px var(--border);
}
.round-button:hover { color: var(--foreground); box-shadow: 0 0 0 1px var(--ring); }
.round-button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
/* The sun and moon sit on each other and turn into one another; the one showing is the page's look. */
.round-button { position: relative; overflow: hidden; }
.round-button > span {
  position: absolute; inset: 0; display: grid; place-items: center;
  transition: opacity 0.5s cubic-bezier(0.32, 0.72, 0, 1), transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}
.round-button .when-dark { opacity: 0; transform: rotate(90deg) scale(0.5); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .round-button .when-light { opacity: 0; transform: rotate(-90deg) scale(0.5); }
  :root:not([data-theme="light"]) .round-button .when-dark { opacity: 1; transform: none; }
}
:root[data-theme="dark"] .round-button .when-light { opacity: 0; transform: rotate(-90deg) scale(0.5); }
:root[data-theme="dark"] .round-button .when-dark { opacity: 1; transform: none; }
/* Changing the look crossfades the whole page, as macOS does. */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1); }
.profile-button {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px;
  background: var(--muted); color: var(--foreground); text-decoration: none;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 0 0 1px var(--border);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.profile-button:hover { box-shadow: 0 0 0 1px var(--ring), 0 0 0 4px color-mix(in srgb, var(--ring) 22%, transparent); }
.profile-button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.profile-button.current { background: var(--primary); color: var(--primary-foreground); box-shadow: none; }

.signed-in main { max-width: 1040px; margin: 0 auto; padding: 24px 24px 64px; animation: rise 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ---------------------------------------------------------------- the dashboard, on its way */
.welcome { margin: 24px 0 32px; }
.welcome h1 { font-size: 28px; letter-spacing: -0.025em; text-wrap: balance; }
.ticker { display: flex; align-items: center; gap: 10px; min-height: 1.5em; }
.welcome .ticker { margin-top: 16px; }
#ticker { transition: opacity 0.25s ease, transform 0.25s ease; }
#ticker.out { opacity: 0; transform: translateY(-3px); }
.pulse { width: 8px; height: 8px; border-radius: 999px; background: var(--success); flex: none; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 45%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }

.preview { display: grid; gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile, .chart { border: 1px solid var(--border); border-radius: 16px; background: var(--card); padding: 18px; min-width: 0; }
.tile { display: grid; gap: 10px; }
.tile-label { font-size: 12px; font-weight: 500; color: var(--muted-foreground); }
.shimmer {
  display: block; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--muted) 0%, color-mix(in srgb, var(--muted) 40%, var(--card)) 45%, var(--muted) 90%);
  background-size: 220% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}
.shimmer.value { height: 26px; width: 68%; }
.shimmer.sub { width: 44%; animation-delay: 0.2s; }
.tile:nth-child(2) .shimmer { animation-delay: 0.15s; }
.tile:nth-child(3) .shimmer { animation-delay: 0.3s; }
.tile:nth-child(4) .shimmer { animation-delay: 0.45s; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -100% 0; } }

.charts { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.chart { display: grid; gap: 14px; }
.line { width: 100%; height: 140px; overflow: visible; }
.line .grid line { stroke: var(--border); stroke-width: 1; }
.line .stroke { fill: none; stroke: var(--foreground); stroke-width: 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 520; stroke-dashoffset: 520; animation: draw 3.6s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.line .area { fill: color-mix(in srgb, var(--foreground) 7%, transparent); opacity: 0; animation: fill 3.6s ease infinite; }
@keyframes draw { 0% { stroke-dashoffset: 520; } 55%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes fill { 0%, 35% { opacity: 0; } 60%, 85% { opacity: 1; } 100% { opacity: 0; } }

.bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; }
.bars span {
  flex: 1; border-radius: 6px 6px 3px 3px;
  background: color-mix(in srgb, var(--foreground) 14%, var(--card));
  transform-origin: bottom; animation: grow 3.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.bars span:nth-child(1) { height: 62%; }
.bars span:nth-child(2) { height: 38%; animation-delay: 0.08s; }
.bars span:nth-child(3) { height: 80%; animation-delay: 0.16s; background: var(--foreground); }
.bars span:nth-child(4) { height: 54%; animation-delay: 0.24s; }
.bars span:nth-child(5) { height: 30%; animation-delay: 0.32s; }
.bars span:nth-child(6) { height: 70%; animation-delay: 0.40s; }
.bars span:nth-child(7) { height: 44%; animation-delay: 0.48s; }
@keyframes grow { 0% { transform: scaleY(0.04); } 45%, 85% { transform: scaleY(1); } 100% { transform: scaleY(0.04); } }


@media (max-width: 760px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts { grid-template-columns: minmax(0, 1fr); }
  .topbar, .signed-in main { padding-left: 16px; padding-right: 16px; }
  .welcome h1 { font-size: 24px; }
}

/* ---------------------------------------------------------------- your profile */
.signed-in .back { margin-bottom: 20px; font-size: 14px; font-weight: 500; color: var(--foreground); }
.signed-in .back:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 761px) { .signed-in .back { margin-left: -22px; } } /* the arrow hangs left of the column */
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.profile-head .lede { margin-top: 2px; overflow-wrap: anywhere; }
.avatar.large { width: 52px; height: 52px; font-size: 20px; }
.facts { margin: 0; display: grid; }
.facts div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.facts div:last-child { border-bottom: 1px solid var(--border); }
.facts dt { color: var(--muted-foreground); font-size: 13px; }
.facts dd { margin: 0; }
.button.fit { width: auto; align-self: flex-start; }

/* ---------------------------------------------------------------- account numbers: by bank, two across on wide screens */
.signed-in main.numbers-page { max-width: 880px; }
/* While real banks are the owner's only (decision 81): said plainly, in place of the button. */
.soon { margin: 0 0 8px; padding: 14px 16px; border-radius: 14px; background: var(--muted); color: var(--muted-foreground); }
.soon strong { color: var(--foreground); font-weight: 600; }
/* Connect your banks: one short step, in a column like the sign-in screens', so its button isn't a page wide. */
.signed-in main.connect-page { max-width: 448px; padding-top: clamp(32px, 10vh, 96px); }
.numbers-count { margin: 12px 0 0; font-size: 13px; color: var(--muted-foreground); }
.bank { padding: 20px 0 24px; border-top: 1px solid var(--border); }
.bank h2 { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted-foreground); text-transform: uppercase; }
/* Each account a row (2026-11-01): what it is on the left, its field or "Protected" on the right. */
.account-rows { display: grid; }
/* A bank with more than seven accounts scrolls inside its card (about seven rows show), so the page stays short. */
.account-rows.scrolls { max-height: 31rem; overflow-y: auto; overscroll-behavior: contain; margin-right: -16px; padding-right: 16px; }
.account-rows.scrolls:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.account-row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(0, 300px); gap: 4px 14px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--border);
}
.account-row:first-child { border-top: 0; }
.account-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--muted); color: var(--muted-foreground); }
.account-id { min-width: 0; }
.account-name { display: block; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.account-meta { font-size: 12.5px; color: var(--muted-foreground); }
.account-meta .mask { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.account-end { display: grid; gap: 4px; min-width: 0; }
.protected-status { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.protected-status .status-text { font-size: 13px; color: var(--muted-foreground); }
.is-protected .account-end:has(.number-wrap:not([hidden])) .protected-status { justify-content: space-between; }
.ok-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success);
}
.ok-chip .icon { width: 13px; height: 13px; }
.protected-status .edit { margin-left: 0; }
.meter { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; }
.meter .bar { width: 72px; height: 6px; border: 0; border-radius: 999px; overflow: hidden; appearance: none; background: var(--muted); }
.meter .bar::-webkit-progress-bar { background: var(--muted); border-radius: 999px; }
.meter .bar::-webkit-progress-value { background: var(--success); border-radius: 999px; }
.meter .bar::-moz-progress-bar { background: var(--success); border-radius: 999px; }
.readback { margin: 0; font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.readback.ok { color: var(--success); }
.readback.bad { color: var(--destructive); }
.numbers-hint { margin: 0; }
/* Save stays in reach however long the list, on every screen. */
.numbers-actions {
  position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 8px;
  background: var(--background); padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.numbers-actions { justify-content: flex-end; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.numbers-actions .button { width: auto; }

/* ---------------------------------------------------------------- your profile, in two parts (2026-10-22) */
.profile { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.profile-side { position: sticky; top: 24px; display: grid; gap: 20px; }
.profile-side .profile-head { margin: 0; }
.profile-side h1 { font-size: 20px; }
.profile-side .avatar.large { width: 40px; height: 40px; font-size: 16px; }
.profile-nav { display: grid; gap: 2px; }
.profile-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 500; color: var(--muted-foreground); text-decoration: none; white-space: nowrap;
}
.profile-nav a:hover { color: var(--foreground); }
.profile-nav a[aria-current="true"] { background: var(--muted); color: var(--foreground); }
.profile-nav a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.badge {
  min-width: 20px; padding: 0 6px; border-radius: 999px; font-size: 11px; line-height: 18px; text-align: center;
  background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning);
}
.tab-title { margin: 0 0 4px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.profile-tab > .hint { margin: 0; max-width: 72ch; }
.profile-tab > .group { margin-top: 40px; }
.profile-tab > .group:first-of-type { margin-top: 20px; }
.banks { display: grid; gap: 8px; margin: 16px 0; }
.bank-card { border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.bank-card summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: 14px; cursor: pointer; list-style: none;
}
.bank-card summary::-webkit-details-marker { display: none; }
.bank-card summary:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.bank-card .what { display: grid; min-width: 0; }
.chevron { flex: none; color: var(--muted-foreground); transition: transform 0.15s ease; }
.bank-card[open] .chevron { transform: rotate(90deg); }
.bank-body { padding: 0 16px; border-top: 1px solid var(--border); overflow: hidden; } /* clipped while it slides */
.bank-card.closing .chevron { transform: none; }
.bank-body > .hint { margin: 0; padding: 14px 0; }
/* Each bank's own Save (2026-11-04), at the foot of its card, once something's typed in it; it saves that bank only. */
.bank-save {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0 14px; border-top: 1px solid var(--border); font-size: 13px;
}
.bank-save .buttons { display: flex; gap: 8px; flex: none; }
.bank-save .button { width: auto; height: 34px; }
.ready.bad { color: var(--destructive); }
@media (max-width: 760px) {
  .account-row { grid-template-columns: 36px minmax(0, 1fr); }
  .account-end { grid-column: 1 / -1; }
  .protected-status { justify-content: flex-start; }
  .meter .bar { width: 48px; }
  .numbers-actions .button { flex: 1; }
  .profile { display: block; }
  .profile-side { display: contents; } /* so the tabs below can stay pinned the whole way down */
  .profile-nav {
    position: sticky; top: 0; z-index: 3; display: flex; gap: 4px; overflow-x: auto;
    margin: 16px -16px 0; padding: 8px 16px; background: var(--background); border-bottom: 1px solid var(--border);
  }
  .profile-nav a { border-radius: 999px; padding: 6px 12px; }
  .tab-title { margin-top: 20px; }
}
@media (max-width: 480px) { .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

@media (prefers-reduced-motion: reduce) {
  .round-button > span { transition: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .shell, .spinner, .slot.active.empty::after, .signed-in main, .pulse, .shimmer, .bars span, .sent, .sent-art .icon { animation: none; }
  .line .stroke { animation: none; stroke-dashoffset: 0; }
  .line .area { animation: none; opacity: 1; }
  * { transition: none !important; }
}
