/* Gassner Bank: layout, tokens and the calm banking skin.
   Layout switches use container queries on .page measured in rem, so they follow the font size. */

:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-2: #f0f0f0;
  --text: #1a1a1a;
  --muted: #555555;
  --border: #d0d0d0;
  --primary: #1f3a5f;
  --on-primary: #ffffff;
  --credit: #0b7a3e;
  --debit: #b42318;
  --credit-bg: #e7f5ec;
  --debit-bg: #fdecea;
  --credit-fill: var(--credit);
  --debit-fill: var(--debit);
  --on-fill: #ffffff;
  --pending: #8a5a00;
  --pending-bg: #fff4d6;
  --focus: #1a73e8;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --font-body: system-ui, sans-serif;
  --font-head: var(--font-body);
  --avatar-s: 55%;
  --avatar-l: 38%;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button {
  appearance: none;
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  text-align: inherit;
  cursor: pointer;
}
img, svg { max-inline-size: 100%; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  inline-size: 1.25em;
  block-size: 1.25em;
  flex: none;
  vertical-align: -0.25em;
}
[dir="rtl"] .icon--flip { transform: scaleX(-1); }

bdi { unicode-bidi: isolate; }
.amt { font-variant-numeric: tabular-nums; }
.amt > bdi { white-space: nowrap; }
.amt--credit { color: var(--credit); }
.amt--debit, .amt.is-negative { color: var(--debit); }

/* Page frame */

.app-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
}
.app-bar__brand {
  flex: 1 1 8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.125rem;
}
.app-bar__role { display: inline-flex; align-items: center; gap: 0.5rem; }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 3rem;
  min-block-size: 3rem;
  border-radius: 999px;
  text-decoration: none;
}
.icon-btn .icon { inline-size: 1.5rem; block-size: 1.5rem; }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 1.4em;
  padding: 0 0.35em;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  background: var(--debit-fill);
  color: var(--on-fill);
}
.icon-btn .badge { position: absolute; inset-block-start: 0.25rem; inset-inline-end: 0.125rem; }

.page {
  container: page / inline-size;
  max-inline-size: 40rem;
  margin-inline: auto;
  padding: 1rem 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.page-title { font-size: 1.5rem; }
.section-title { font-size: 1.25rem; margin-block-start: 0.5rem; }
.month-title { font-size: 1rem; color: var(--muted); }

.tab-bar { display: none; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  inline-size: 3rem;
  block-size: 3rem;
  border-radius: 50%;
  background: hsl(var(--hue, 210) var(--avatar-s) var(--avatar-l));
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
}
.avatar--small { inline-size: 2rem; block-size: 2rem; font-size: 0.9rem; }

.notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  min-block-size: 3rem;
  text-decoration: none;
}
.notice > span { flex: 1; }

.chip {
  display: inline-block;
  font-size: 0.8125rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}

.status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.status--pending { color: var(--pending); background: var(--pending-bg); }
.status--settled { color: var(--credit); }
.status--rejected { color: var(--debit); }

/* Buttons */

.btn, .btn-round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-block-size: 3rem;
  min-inline-size: 3rem;
  padding: 0.5rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn-round { padding: 0.5rem; border-radius: 999px; }
.btn-block { inline-size: 100%; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-credit, .btn-approve { background: var(--credit-fill); color: var(--on-fill); }
.btn-debit, .btn-reject, .btn-danger { background: var(--debit-fill); color: var(--on-fill); }
.btn-label { }
.btn-round .btn-label {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.form-actions > .btn { flex: 1 1 8rem; }

/* Dashboard */

.child { display: flex; flex-direction: column; gap: 0.5rem; }
.child__head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.child__who { flex: 1 1 6rem; }
.child__name { font-size: 1.25rem; }
.child__total { color: var(--muted); }

.account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.75rem 1rem;
}
.account__link {
  flex: 1 1 14rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  min-block-size: 3rem;
  text-decoration: none;
}
.account__icon { display: inline-flex; }
.account__info { flex: 1 1 8rem; display: flex; flex-direction: column; align-items: flex-start; }
.account__name { font-weight: 600; }
.account__cat { color: var(--muted); font-size: 0.875rem; }
.account__balance { font-weight: 700; font-size: 1.125rem; }
.account__actions { flex: 1 1 100%; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }
.child__settings { padding-inline: 0.375rem; }

/* Balance hero */

.balance-hero { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem; }
.balance-hero__owner, .balance-hero__account { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.balance-hero__account { font-size: 1.25rem; }
.balance-hero__label { color: var(--muted); }
.balance-hero__amount { font-size: clamp(1.25rem, 13cqi, 3rem); font-weight: 700; line-height: 1.1; }
.balance-hero__pending { display: flex; align-items: center; gap: 0.5rem; color: var(--pending); }
.balance-hero__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-start: 0.5rem; }
.balance-hero__actions > .btn { flex: 1 1 7rem; }

/* Transactions */

.tx-list { display: flex; flex-direction: column; }
.tx__link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 0.25rem 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  min-block-size: 3rem;
}
.tx__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-inline-size: 3.25rem;
  line-height: 1.2;
}
.tx__wd, .tx__mon { font-size: 0.75rem; color: var(--muted); }
.tx__day { font-size: 1.25rem; font-weight: 700; }
.tx__body { display: flex; flex-direction: column; gap: 0.125rem; min-inline-size: 0; }
.tx__desc { font-weight: 600; }
.tx__note { font-size: 0.875rem; color: var(--muted); font-style: italic; }
.tx__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; font-size: 0.875rem; color: var(--muted); }
.tx__dir { display: inline-flex; color: var(--muted); }
.tx__amount { font-weight: 700; text-align: end; white-space: nowrap; }

/* Dialog */

.sheet {
  inline-size: min(36rem, 100vw - 2rem);
  max-block-size: 90vh;
  overflow: auto;
  padding: 1.25rem;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
}
.sheet::backdrop { background: rgb(0 0 0 / 0.5); }
.sheet__title { font-size: 1.25rem; margin-block-end: 1rem; }
.details { display: flex; flex-direction: column; gap: 0.75rem; margin-block-end: 1.25rem; }
.detail-row { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.detail-row dt { flex: 0 1 9rem; color: var(--muted); }
.detail-row dd { flex: 1 1 12rem; font-weight: 600; }
.detail-row .visually-hidden { position: static !important; inline-size: auto; block-size: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; }
.detail-amount { font-size: 1.25rem; }

/* Forms */

.form { display: flex; flex-direction: column; gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.375rem; border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.field__label { font-weight: 600; padding: 0; }
.field__optional { font-weight: 400; color: var(--muted); }
.field__help, .field__balance { font-size: 0.875rem; color: var(--muted); }
.field__balance { font-size: 1rem; }
.field-group { display: flex; flex-direction: column; gap: 1rem; }

.input {
  display: block;
  inline-size: 100%;
  min-block-size: 3rem;
  padding: 0.625rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
}
textarea.input { resize: vertical; field-sizing: content; }
.input--line { resize: none; min-block-size: 3rem; }
select.input { padding-inline-end: 0.5rem; max-inline-size: 100%; }
.input--short { max-inline-size: 10rem; }

.input-money { position: relative; display: flex; align-items: stretch; }
.input-money__symbol {
  display: inline-flex;
  align-items: center;
  padding-inline: 0.75rem;
  border: 2px solid var(--border);
  border-inline-end: 0;
  border-start-start-radius: var(--radius);
  border-end-start-radius: var(--radius);
  background: var(--surface-2);
  font-weight: 600;
}
.input-money .input { border-start-start-radius: 0; border-end-start-radius: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.seg__option { position: relative; flex: 1 1 7rem; }
.seg__option input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg__option > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-block-size: 3rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}
.seg__option--credit input:checked + span { background: var(--credit-fill); border-color: var(--credit-fill); color: var(--on-fill); }
.seg__option--debit input:checked + span { background: var(--debit-fill); border-color: var(--debit-fill); color: var(--on-fill); }
.seg__option input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.check, .switch {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-block-size: 3rem;
  padding-block: 0.625rem;
  cursor: pointer;
}
.check input, .switch input {
  flex: none;
  inline-size: 1.5rem;
  block-size: 1.5rem;
  margin: 0;
  accent-color: var(--accent-text);
}

.hint { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--surface-2); }
.hint--approval { background: var(--pending-bg); color: var(--pending); }
.error { color: var(--debit); font-weight: 600; }

.summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.summary__value { font-weight: 700; font-size: 1.125rem; }

.target { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 1rem; }
.target__info { flex: 1 1 10rem; }
.target__owner { color: var(--muted); }
.target__account { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.125rem; }
.target__balance { display: flex; flex-wrap: wrap; gap: 0 0.5rem; }
.target__balance .amt { font-weight: 700; }

.swap-btn { align-self: center; }

.choice-list { display: flex; flex-direction: column; gap: 0.5rem; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.choice__body {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-block-size: 3rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.choice__text { display: flex; flex-direction: column; min-inline-size: 0; }
.choice__name { font-weight: 600; }
.choice__balance { color: var(--muted); }
.choice input:checked + .choice__body { border-color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); }
.choice input:checked + .choice__body::after { content: "✓"; margin-inline-start: auto; font-weight: 700; color: var(--accent-text); }
.choice input:focus-visible + .choice__body { outline: 3px solid var(--focus); outline-offset: 2px; }

.greeting { font-size: 1.125rem; color: var(--muted); }
.page-subtitle { color: var(--muted); margin-block-start: -0.5rem; }

/* Transfer requests */

.request-list { display: flex; flex-direction: column; gap: 0.75rem; }
.request { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem; }
.request__who { display: flex; align-items: center; gap: 0.75rem; }
.request__name { font-weight: 700; font-size: 1.125rem; }
.request__amount { font-weight: 700; font-size: 1.5rem; }
.request__route { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; font-weight: 600; }
.request__meta, .request__after { font-size: 0.875rem; color: var(--muted); }
.request__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
.request__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block-start: 0.5rem; }
.request__actions > .btn { flex: 1 1 8rem; }
.request__result { align-self: flex-start; font-size: 0.875rem; }
.request-list--compact .request__amount { font-size: 1.125rem; }

.settings-list { display: flex; flex-direction: column; gap: 0.5rem; }
.setting-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.75rem 1rem; }
.setting-row__label { flex: 1 1 5rem; font-weight: 600; }
.setting-row .seg { flex: 1 1 14rem; }
.seg--small .seg__option > span { font-weight: 500; }
.seg__option:not(.seg__option--credit):not(.seg__option--debit) input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* Settings */

.panel { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem; }
.panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.panel__title { display: flex; align-items: center; gap: 0.5rem; font-size: 1.125rem; }
.calc { display: flex; flex-direction: column; gap: 0.5rem; }
.calc-list { display: flex; flex-direction: column; gap: 0.5rem; }
.calc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.125rem 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.calc-row__date { font-weight: 600; flex: 1 1 8rem; }
.calc-row__note { color: var(--muted); font-size: 0.875rem; flex: 1 1 10rem; }
.calc-row__interest { font-weight: 700; }
.calc-row__balance { flex: 1 1 100%; font-size: 0.875rem; color: var(--muted); }

/* Large text: layout switches */

@container page (max-width: 17.5rem) {
  .account__link { flex-basis: 100%; }
  .account__actions { flex: 1 1 100%; }
  .account__actions > .btn-round { flex: 1 1 6rem; border-radius: var(--radius); padding-inline: 0.75rem; }
  .account__actions .btn-label { position: static; inline-size: auto; block-size: auto; overflow: visible; clip: auto; white-space: normal; }
  .account__balance { flex-basis: 100%; }
}

@container page (max-width: 17rem) {
  .tx__link { display: flex; flex-direction: column; gap: 0.25rem; }
  .tx__date { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 0.375rem; min-inline-size: 0; }
  .tx__wd, .tx__day, .tx__mon { font-size: 0.875rem; font-weight: 700; color: var(--muted); }
  .tx__amount { text-align: start; white-space: normal; font-size: 1.125rem; }
  .form-actions, .request__actions, .balance-hero__actions { flex-direction: column; }
  .form-actions > .btn, .request__actions > .btn, .balance-hero__actions > .btn { flex: none; inline-size: 100%; }
  .swap-btn { align-self: stretch; }
  .input--short { max-inline-size: none; }
}

@container page (max-width: 12rem) {
  .account__actions { flex-direction: column; }
  .account__actions > .btn-round { flex: none; inline-size: 100%; }
  .page-title { font-size: 1.25rem; }
}

/* Calm banking: a restrained, trustworthy look, like a real bank app. */

:root {
  --bg: #eef1f3;
  --surface: #ffffff;
  --surface-2: #e4e9ef;
  --text: #16202f;
  --muted: #55637a;
  --border: #d7dee6;
  --border-strong: #7c8aa0;
  --primary: #16305c;
  --accent-text: var(--primary);
  --on-primary: #ffffff;
  --credit: #0a6b39;
  --debit: #a3241d;
  --credit-bg: #e2f3e8;
  --debit-bg: #fbe7e5;
  --credit-fill: var(--credit);
  --debit-fill: var(--debit);
  --on-fill: #ffffff;
  --pending: #8a5a00;
  --pending-bg: #fdedc4;
  --focus: #1a56db;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --font-body: 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-head: 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --avatar-s: 50%;
  --avatar-l: 32%;
  --teal: #0f7a72;
  --shadow-card: 0 1px 2px rgba(20, 32, 50, 0.07), 0 6px 16px -10px rgba(20, 32, 50, 0.18);
  --shadow-bar: 0 1px 3px rgba(10, 18, 32, 0.18);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a0e16;
  --surface: #10151f;
  --surface-2: #171d2b;
  --text: #eef2f7;
  --muted: #9aa7bb;
  --border: #2a3344;
  --border-strong: #5c6f8f;
  --primary: #1d4a86;
  --accent-text: #6ea8ff;
  --on-primary: #ffffff;
  --credit: #2ebd6e;
  --debit: #eb695a;
  --credit-bg: #0e2417;
  --debit-bg: #2a1310;
  --credit-fill: #0a6b39;
  --debit-fill: #a3241d;
  --on-fill: #ffffff;
  --pending: #ffcf66;
  --pending-bg: #3a2a05;
  --focus: #6ea8ff;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --font-body: 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-head: 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --avatar-s: 50%;
  --avatar-l: 32%;
  --teal: #3fb3a8;
  --shadow-card: none;
  --shadow-bar: 0 1px 0 rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0e16;
    --surface: #10151f;
    --surface-2: #171d2b;
    --text: #eef2f7;
    --muted: #9aa7bb;
    --border: #2a3344;
    --border-strong: #5c6f8f;
    --primary: #1d4a86;
    --accent-text: #6ea8ff;
    --on-primary: #ffffff;
    --credit: #2ebd6e;
    --debit: #eb695a;
    --credit-bg: #0e2417;
    --debit-bg: #2a1310;
    --credit-fill: #0a6b39;
    --debit-fill: #a3241d;
    --on-fill: #ffffff;
    --pending: #ffcf66;
    --pending-bg: #3a2a05;
    --focus: #6ea8ff;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --font-body: 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
    --font-head: 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
    --avatar-s: 50%;
    --avatar-l: 32%;
    --teal: #3fb3a8;
    --shadow-card: none;
    --shadow-bar: 0 1px 0 rgba(255, 255, 255, 0.06);
    color-scheme: dark;
  }
}

body { background: var(--bg); }

/* App bar */

.app-bar {
  position: sticky;
  inset-block-start: 0;
  z-index: 10;
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-bar);
  --focus: var(--on-primary);
}
.app-bar__brand { color: var(--on-primary); }
.brand-logo { color: var(--teal); }
.icon-btn { color: var(--on-primary); }
.icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
.app-bar__role {
  padding: 0.25rem 0.75rem 0.25rem 0.375rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}
[dir="rtl"] .app-bar__role { padding: 0.25rem 0.375rem 0.25rem 0.75rem; }

/* Cards, in general */

.child,
.tx-list,
.balance-hero,
.panel,
.request,
.form:not(.settings-form),
.target,
.settings-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.child, .panel, .form:not(.settings-form), .target { padding: 1rem; }
.request { padding: 1rem; }

/* Dashboard */

.child__name { font-family: var(--font-head); }
.child__total { font-weight: 500; }

.accounts { display: flex; flex-direction: column; }
.account { padding: 0.875rem 0; }
.accounts > li + li { border-block-start: 1px solid var(--border); }
.account__name { color: var(--text); }
.account__balance { text-align: end; }

.btn-credit, .btn-debit {
  background: transparent;
  font-weight: 700;
}
.btn-credit { color: var(--credit); border-color: var(--credit); }
.btn-debit { color: var(--debit); border-color: var(--debit); }
.btn-credit:hover { background: var(--credit-bg); }
.btn-debit:hover { background: var(--debit-bg); }

.chip { border: 1px solid var(--border); font-weight: 600; }

.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  color: var(--text);
}
.notice--pending svg { color: var(--pending); }
.notice__chevron { color: var(--muted); }

/* The child's invitation to turn on notifications (templates/push-prompt.php) */

.push-prompt__text { margin: 0; font-weight: 600; }
.push-prompt__denied { display: flex; flex-direction: column; gap: 0.375rem; }

/* Balance hero */

.balance-hero { overflow: hidden; padding: 0 0 1rem; gap: 0.375rem; }
.balance-hero__owner {
  margin: 0 0 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}
.balance-hero__account,
.balance-hero__label,
.balance-hero__amount,
.balance-hero__pending,
.balance-hero__actions {
  padding-inline: 1rem;
}
.balance-hero__account { color: var(--text); }
.balance-hero__amount { color: var(--accent-text); }
.balance-hero__pending {
  align-self: flex-start;
  margin-inline: 1rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--pending-bg);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Status pills: small and quiet */

.status { border: 0; font-weight: 600; }
.status--pending { color: var(--pending); background: var(--pending-bg); }
.status--settled { color: var(--credit); background: var(--credit-bg); }
.status--rejected { color: var(--debit); background: var(--debit-bg); }

/* Transaction list: calendar-tile dates */

.month-title { text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; font-size: 0.8125rem; }

.tx-list { overflow: hidden; }
.tx + .tx { border-block-start: 1px solid var(--border); }

.tx__date {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 0.25rem 0.375rem 0.375rem;
  gap: 0;
}
.tx__wd {
  inline-size: 100%;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding-block-end: 0.1875rem;
  margin-block-end: 0.1875rem;
  border-block-end: 1px solid var(--border);
}
.tx__day { color: var(--accent-text); font-size: 1.375rem; }
.tx__mon { text-transform: uppercase; letter-spacing: 0.03em; }

@container page (max-width: 17rem) {
  .tx__date { padding: 0.1875rem 0.625rem; }
  .tx__wd { inline-size: auto; border-block-end: 0; margin-block-end: 0; padding-block-end: 0; }
}

/* Forms */

.target__account { color: var(--accent-text); }
.field__label { font-family: var(--font-head); }

.input {
  border-width: 1px;
  border-color: var(--border-strong);
}
.input:focus-visible { border-color: var(--focus); }
.input-money__symbol { border-color: var(--border-strong); color: var(--muted); font-weight: 700; }

.seg__option > span { border-color: var(--border-strong); background: var(--surface); }

.choice__body { border-color: var(--border-strong); background: var(--surface-2); }
.choice__text { min-inline-size: 0; }
.choice input:checked + .choice__body { background: var(--surface); }

.hint { border: 1px solid var(--border); }
.hint--approval { border-color: transparent; }

.summary { border: 1px solid var(--border); }
.summary__value { color: var(--accent-text); }

/* Transfer requests, approvals */

.request { gap: 0.375rem; }
.request__amount { color: var(--accent-text); }
.request-list--compact .request {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  padding: 0.75rem 1rem;
}

.settings-list { overflow: hidden; padding: 0; }
.setting-row + .setting-row { border-block-start: 1px solid var(--border); }
.setting-row { padding: 0.75rem 1rem; }
.seg--small .seg__option > span { padding: 0.375rem 0.875rem; min-block-size: 3rem; }

/* Settings panels */

.panel__title { font-family: var(--font-head); }
.panel--interest .panel__title svg,
.panel__title svg { color: var(--teal); }
.calc-row { border: 1px solid var(--border); }
.calc-row__interest { color: var(--credit); }

/* Dialog */

.sheet { box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.35); }

/* App additions */

.app-bar__form { margin: 0; }
.btn-small { min-block-size: 3rem; padding: 0.375rem 0.875rem; }
.login { display: flex; flex-direction: column; gap: 1rem; padding-block: 1.5rem; }
.login__button { min-block-size: 3rem; }
.login__lang { display: flex; flex-wrap: wrap; column-gap: 1.5rem; }
.login__lang a { display: inline-flex; align-items: center; min-block-size: 3rem; font-weight: 600; }
.app-bar .btn-secondary { color: inherit; border-color: currentColor; background: transparent; }

/* Font scale steps (CSP forbids inline style attributes) */

html[data-font-scale="70"] { font-size: 70%; }
html[data-font-scale="75"] { font-size: 75%; }
html[data-font-scale="80"] { font-size: 80%; }
html[data-font-scale="85"] { font-size: 85%; }
html[data-font-scale="90"] { font-size: 90%; }
html[data-font-scale="95"] { font-size: 95%; }
html[data-font-scale="100"] { font-size: 100%; }
html[data-font-scale="105"] { font-size: 105%; }
html[data-font-scale="110"] { font-size: 110%; }
html[data-font-scale="115"] { font-size: 115%; }
html[data-font-scale="120"] { font-size: 120%; }
html[data-font-scale="125"] { font-size: 125%; }
html[data-font-scale="130"] { font-size: 130%; }
html[data-font-scale="135"] { font-size: 135%; }
html[data-font-scale="140"] { font-size: 140%; }

/* Flash messages */

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--credit-bg);
  color: var(--credit);
  font-weight: 600;
}

/* Form field errors */

.field__required { color: var(--debit); }
.field__error { margin: 0; color: var(--debit); font-size: 0.875rem; font-weight: 600; }
.input[aria-invalid="true"] { border-color: var(--debit); }

/* A form nested inside .form-actions (e.g. the delete button) sizes like its siblings */

.form-actions__item { display: flex; flex: 1 1 8rem; }

/* Loan interest chip: same shape as the interest chip, debit-toned */

.chip--loan { color: var(--debit); border-color: var(--debit); }

/* Transfers */

.request__memo { font-size: 0.875rem; color: var(--muted); white-space: pre-line; }
.request__after { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.375rem; }
.request__after .amt { font-weight: 600; color: var(--text); }
.request__after .amt.is-negative { color: var(--debit); }
.request__actions { margin: 0; }
.request-list--compact .request__actions > .btn { flex: 0 1 auto; }
.settings-list > li + li { border-block-start: 1px solid var(--border); }
.settings-list > li > .setting-row { margin: 0; }
.setting-row .btn-small { flex: none; }
.transfer-child { align-items: center; text-decoration: none; color: var(--text); }
.transfer-child .choice__name { flex: 1; }

@container page (max-width: 17rem) {
  .request-list--compact .request__actions > .btn { flex: none; inline-size: 100%; }
  .setting-row .btn-small { inline-size: 100%; }
}

/* Settings */

.avatar--large { inline-size: 6rem; block-size: 6rem; font-size: 2.5rem; }
.avatar--photo { object-fit: cover; background: var(--surface-2); }

.switch__label { font-weight: 600; }
.panel--danger .panel__title { color: var(--debit); }
.panel > .form-actions, .panel > .btn { margin-block-start: 0.25rem; }

.member-list > li { display: block; }
.member-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-block-size: 3rem;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
}
a.member-row:hover { background: var(--surface-2); }
.member-row__info { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.25rem; min-inline-size: 0; }
.member-row__name { font-weight: 700; }
.member-row__you { font-weight: 400; color: var(--muted); }
.member-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; font-size: 0.875rem; color: var(--muted); }
.member-row__email { overflow-wrap: anywhere; }
.member-row__chevron { color: var(--muted); }
.member-row--archived .member-row__name { color: var(--muted); }

.hue-picker { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hue-picker__option { position: relative; display: inline-flex; cursor: pointer; }
.hue-picker__option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hue-picker__swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 3rem;
  block-size: 3rem;
  border-radius: 50%;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
  background: hsl(var(--hue, 210) var(--avatar-s) var(--avatar-l));
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
}
.hue-picker__option input:checked + .hue-picker__swatch { box-shadow: 0 0 0 3px var(--text); }
.hue-picker__option input:focus-visible + .hue-picker__swatch { outline: 3px solid var(--focus); outline-offset: 3px; }

.link-list { display: flex; flex-direction: column; }
.link-list > li + li { border-block-start: 1px solid var(--border); }
.link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  min-block-size: 3rem;
  padding-block: 0.625rem;
  color: var(--text);
  text-decoration: none;
}
.link-row__text { flex: 1 1 8rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; min-inline-size: 0; }
.link-row__name { font-weight: 600; }
.link-row .amt { font-weight: 700; }
.link-row__chevron { color: var(--muted); }

.avatar--animal { background: var(--surface-2); }

.animal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(3.5rem, 40%), 1fr)); gap: 0.5rem; }
.animal-choice { position: relative; display: block; cursor: pointer; }
.animal-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.animal-choice__card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.animal-choice__card img { display: block; inline-size: 100%; max-inline-size: 4rem; block-size: auto; aspect-ratio: 1; border-radius: 50%; }
.animal-choice:hover .animal-choice__card { border-color: var(--border-strong); }
.animal-choice input:checked + .animal-choice__card { border-color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); background: var(--surface-2); }
.animal-choice input:checked + .animal-choice__card::after {
  content: "✓";
  position: absolute;
  inset-block-start: -0.375rem;
  inset-inline-end: -0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 1.375rem;
  block-size: 1.375rem;
  border-radius: 50%;
  background: var(--accent-text);
  color: var(--surface);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
}
.animal-choice input:focus-visible + .animal-choice__card { outline: 3px solid var(--focus); outline-offset: 2px; }
.input--file { padding-block: 0.5rem; }

/* Profile card: picture and name, with one pencil for a single edit mode (avatar.js). Without
   the script the pencil reloads the page with the form open and the pictures are radio chips. */

.profile-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  min-inline-size: 0;
  padding: 1.5rem 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-align: center;
}
.profile-card.is-editing { border-color: var(--accent-text); box-shadow: 0 0 0 1px var(--accent-text), var(--shadow-card); }
.profile-card__open { position: absolute; inset-block-start: 0.25rem; inset-inline-end: 0.25rem; }
.profile-card__edit {
  display: inline-grid;
  place-items: center;
  inline-size: 3rem;
  block-size: 3rem;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent-text);
  cursor: pointer;
}
.profile-card__edit:hover { background: var(--border); }
.profile-card__edit .icon { inline-size: 1.375rem; block-size: 1.375rem; vertical-align: 0; }

.profile-card__avatar {
  flex: none;
  inline-size: 6rem;
  block-size: 6rem;
  margin-block-end: 0.5rem;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--border), 0 0 0 5px var(--surface-2);
}
.profile-card__pic { display: block; inline-size: 100%; block-size: 100%; border-radius: 50%; }
.profile-card__pic > .avatar { inline-size: 100%; block-size: 100%; font-size: 2.75rem; }
.profile-card__name {
  max-inline-size: 100%;
  min-block-size: 2rem;
  font-size: 1.5rem;
  overflow-wrap: anywhere;
}
.profile-card__role { color: var(--muted); font-size: 0.9375rem; }
.profile-card__saved { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--credit); }

.profile-card__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  inline-size: 100%;
  margin-block-start: 0.75rem;
  text-align: start;
}
.profile-card__fields { display: flex; flex-direction: column; gap: 1rem; min-inline-size: 0; }
.profile-card__field { display: flex; flex-direction: column; gap: 0.375rem; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.profile-card__label { padding: 0; font-weight: 600; font-size: 0.9375rem; color: var(--muted); }
.profile-card__field > .profile-card__label { margin-block-end: 0.375rem; }
.profile-card__field > label.profile-card__label { margin-block-end: 0; }
.profile-card__input { font-size: 1.125rem; font-weight: 600; text-align: start; }
.profile-card__input:focus-visible { outline-offset: 0; }
.profile-card__file { display: flex; flex-direction: column; gap: 0.375rem; margin-block-start: 0.75rem; }
.profile-card__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.profile-card__actions > .btn { flex: 1 1 6rem; min-inline-size: 0; padding-inline: 0.5rem; }

/* The pictures: a row that scrolls sideways with the script, radio chips that wrap without it */

.profile-card__options { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-block: 0.375rem; }
.profile-option { position: relative; display: block; cursor: pointer; }
.profile-option__input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.profile-card__chips {
  display: flex;
  gap: 0.5rem;
  margin-inline: -1rem;
  padding: 0.375rem 1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 1rem;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 0.75rem, #000 calc(100% - 0.75rem), transparent);
  mask-image: linear-gradient(to right, transparent, #000 0.75rem, #000 calc(100% - 0.75rem), transparent);
}
.profile-card__chips::-webkit-scrollbar { display: none; }

.profile-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  flex: none;
  inline-size: 4rem;
  block-size: 4rem;
  padding: 0.3125rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-text);
  text-align: center;
  cursor: pointer;
  scroll-snap-align: center;
}
.profile-chip > img, .profile-chip > .avatar { display: block; inline-size: 100%; block-size: 100%; border-radius: 50%; pointer-events: none; }
.profile-chip:hover, .profile-option:hover .profile-chip { border-color: var(--border-strong); background: var(--surface-2); }
.profile-chip[aria-pressed="true"], .profile-option__input:checked + .profile-chip {
  border-color: var(--accent-text);
  box-shadow: inset 0 0 0 1px var(--accent-text);
  background: var(--surface-2);
}
.profile-chip[aria-pressed="true"]::after, .profile-option__input:checked + .profile-chip::after {
  content: "\2713";
  position: absolute;
  inset-block-start: -0.125rem;
  inset-inline-end: -0.125rem;
  display: grid;
  place-items: center;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  border-radius: 50%;
  background: var(--accent-text);
  color: var(--surface);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}
.profile-option__input:focus-visible + .profile-chip { outline: 3px solid var(--focus); outline-offset: 2px; }
.profile-chip--action { border-style: dashed; border-color: var(--border-strong); font-size: 0.75rem; font-weight: 600; line-height: 1.1; }
.profile-chip--action .icon { inline-size: 1.5rem; block-size: 1.5rem; vertical-align: 0; }
.profile-chip--action > img, .profile-chip--action > .avatar { inline-size: 1.75rem; block-size: 1.75rem; object-fit: cover; font-size: 1rem; }
.profile-chip__text { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.profile-card .crop { text-align: start; }

/* A short message at the bottom of the screen after a save */

.toast {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 1.25rem;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding-inline: 1rem;
  pointer-events: none;
}
.toast__message {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-inline-size: 100%;
  padding: 0.625rem 1.125rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  box-shadow: 0 8px 24px -8px rgba(10, 18, 32, 0.5);
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible .toast__message { opacity: 1; transform: none; }
.toast__message .icon { color: #58d68d; }
:root[data-theme="dark"] .toast__message .icon { color: #0a6b39; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .toast__message .icon { color: #0a6b39; }
}
@media (prefers-reduced-motion: reduce) {
  .toast__message { transition: none; }
}

/* Photo crop editor: the image on a canvas under a circular mask; avatar.js draws it. */

.crop { display: flex; flex-direction: column; gap: 1rem; }
.crop__viewport {
  position: relative;
  inline-size: min(100%, 20rem);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.crop__viewport.is-dragging { cursor: grabbing; }
.crop__viewport:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.crop__canvas { display: block; inline-size: 100%; block-size: 100%; }
.crop__mask {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 100vmax rgba(10, 14, 22, 0.55);
  pointer-events: none;
}
.crop__zoom-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 0.75rem; }
.crop__zoom-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.crop__range {
  display: block;
  inline-size: 100%;
  min-block-size: 3rem;
  margin: 0;
  accent-color: var(--accent-text);
  cursor: pointer;
}
.crop__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.crop__preview { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; min-inline-size: 0; }
.avatar--crop { inline-size: 4rem; block-size: 4rem; border-radius: 50%; background: var(--surface-2); box-shadow: 0 0 0 1px var(--border); }
.crop__rotate { flex: 1 1 8rem; }
.input--file::file-selector-button {
  min-block-size: 2.25rem;
  margin-inline-end: 0.75rem;
  padding: 0.25rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.seg--wrap .seg__option { flex: 1 1 4.5rem; }
.font-stepper { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.font-stepper__btn { flex: 1 1 5rem; font-size: 1rem; }
.font-stepper__btn--large { font-size: 1.25rem; }
.font-stepper__btn:disabled { opacity: 0.5; cursor: default; }
.font-stepper__value { flex: 0 0 auto; min-inline-size: 4rem; text-align: center; font-weight: 700; font-size: 1.125rem; }

.child__add { align-self: flex-start; }

@container page (max-width: 17rem) {
  .member-row { flex-wrap: wrap; }
  .member-row__chevron { display: none; }
  .child__add { align-self: stretch; }
}
.allowance-now { display: flex; flex-wrap: wrap; gap: 0 0.375rem; padding: 0.5rem 0.75rem; border-radius: var(--radius); background: var(--credit-bg); color: var(--credit); font-weight: 600; }
.chip--allowance { color: var(--credit); border-color: var(--credit); }
.balance-hero__allowance { padding-inline: 1rem; color: var(--muted); font-size: 0.875rem; }
.app-bar { gap: 0.25rem; }
.app-bar__brand { flex-basis: 5rem; }
.target__name { font-weight: 700; font-size: 1.125rem; }
.link-row { flex-wrap: nowrap; }
@container page (max-width: 17rem) {
  .link-row { flex-wrap: wrap; }
}
legend.panel__title { font-weight: 700; padding: 0; margin-block-end: 0.5rem; }
label.panel__title { font-weight: 700; }
.account-used { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; font-size: 0.875rem; color: var(--muted); }
.account-used .icon { color: var(--accent-text); }
.account-used__name { font-weight: 700; color: var(--text); }
.notice > span { min-inline-size: 0; }
@container page (max-width: 17rem) {
  .notice__chevron { display: none; }
}

/* Child settings: advanced part, collapsed by default */

.panel--advanced { display: block; padding: 0; }
.advanced__summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-block-size: 3rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.advanced__summary::-webkit-details-marker { display: none; }
.advanced__summary .icon { flex: none; color: var(--teal); }
.advanced__title { flex: 1; min-inline-size: 0; }
.advanced__chevron { transform: rotate(90deg); }
.panel--advanced[open] .advanced__chevron { transform: rotate(-90deg); }
.advanced__body { display: flex; flex-direction: column; gap: 1rem; padding: 0 1rem 1rem; }
.choice__default { font-weight: 400; color: var(--muted); }
@container page (max-width: 17rem) {
  .advanced__icon, .panel--advanced .choice__body > .icon { display: none; }
}

/* Family settings and setup guide: the family name in other languages, behind a link */

.more-names { display: block; }
.more-names__summary {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-block-size: 2.75rem;
  font-weight: 600;
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
  list-style: none;
}
.more-names__summary::-webkit-details-marker { display: none; }
.more-names__chevron { flex: none; transform: rotate(90deg); }
.more-names[open] .more-names__chevron { transform: rotate(-90deg); }
.more-names__body { display: flex; flex-direction: column; gap: 1rem; padding-block-start: 0.5rem; }

/* Setup guide */

.steps { display: flex; flex-direction: column; gap: 0.5rem; }
.steps__count { font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.steps__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.375rem; }
.steps__item { display: flex; flex-direction: column; gap: 0.375rem; min-inline-size: 0; font-size: 0.8125rem; color: var(--muted); }
.steps__item::before { content: ""; block-size: 0.375rem; border-radius: 999px; background: var(--border-strong); }
.steps__item--done::before { background: var(--teal); }
.steps__item[aria-current="step"] { color: var(--text); font-weight: 700; }
.steps__item[aria-current="step"]::before { background: var(--accent-text); }
.steps__name { overflow-wrap: anywhere; }

.setup-actions { display: flex; flex-direction: column; gap: 0.75rem; }
.setup-skip { display: flex; flex-direction: column; gap: 0.5rem; margin-block-start: 0.5rem; }
.member-row__action { font-size: 0.875rem; font-weight: 600; color: var(--accent-text); }
.animal-choice__card--avatar .avatar { inline-size: 100%; max-inline-size: 4rem; block-size: auto; aspect-ratio: 1; }

.setup-summary { display: flex; flex-direction: column; }
.setup-summary > li + li { border-block-start: 1px solid var(--border); }
.setup-summary__member { display: flex; align-items: flex-start; gap: 0.75rem; padding-block: 0.75rem; }
.setup-summary__info { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.25rem; min-inline-size: 0; }
.setup-summary__name { font-weight: 700; }
.setup-summary__email { font-size: 0.875rem; color: var(--muted); overflow-wrap: anywhere; }
.setup-summary__accounts { display: flex; flex-direction: column; gap: 0.25rem; }
.setup-path { padding: 0.5rem 0.75rem; border-radius: var(--radius); background: var(--surface-2); font-weight: 600; overflow-wrap: anywhere; }
.setup-emails { display: flex; flex-direction: column; gap: 0.375rem; }
.setup-emails > li {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
  user-select: all;
}

@container page (max-width: 20rem) {
  .steps__name {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@container page (max-width: 17rem) {
  .member-row__action { display: none; }
  .setup-summary__member { flex-wrap: wrap; }
}

.dashboard-links { display: flex; flex-direction: column; gap: 0.75rem; margin-block-start: 0.5rem; }

/* Colour palettes, chosen in My settings (users.palette) and set as data-palette on <html> by
   layout.php. Each is a pure token override of the calm banking skin above; classic has no rules.
   Specificity: the light palette rules (0,2,0) come after the light defaults (0,1,0); the dark
   ones add the palette attribute (0,3,0), so they win over the dark defaults and the light palette.
   layout.php loads each palette's Google Fonts (UserSettingsController::PALETTE_FONTS); Arabic text
   falls back to Noto Sans Arabic, which every page loads. Designed in public/mockups/themes/. */

/* ------------------------------------------------------------------------------------------
   1. Ocean: fresh teal and mint, rounder corners, Rubik.
   ------------------------------------------------------------------------------------------ */

:root[data-palette="ocean"] {
  --bg: #e8f3f2;
  --surface: #ffffff;
  --surface-2: #dbeeec;
  --text: #0e2a2d;
  --muted: #476266;
  --border: #c9e1df;
  --border-strong: #6c8d90;
  --primary: #0b5c61;
  --accent-text: #0a6469;
  --on-primary: #ffffff;
  --credit: #12703a;
  --debit: #b0281f;
  --credit-bg: #dff3e6;
  --debit-bg: #fbe6e3;
  --credit-fill: var(--credit);
  --debit-fill: var(--debit);
  --on-fill: #ffffff;
  --pending: #855600;
  --pending-bg: #fdedc4;
  --focus: #0b66c3;
  --radius: 0.75rem;
  --radius-lg: 1.125rem;
  --font-body: 'Rubik', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-head: 'Rubik', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --avatar-s: 45%;
  --avatar-l: 32%;
  --teal: #8ee6da;
  --shadow-card: 0 1px 2px rgba(8, 48, 52, 0.07), 0 8px 18px -12px rgba(8, 48, 52, 0.22);
  --shadow-bar: 0 1px 3px rgba(4, 30, 32, 0.2);
  color-scheme: light;
}

:root[data-palette="ocean"][data-theme="dark"] {
  --bg: #061416;
  --surface: #0c1e21;
  --surface-2: #12292d;
  --text: #e6f4f3;
  --muted: #92b0b2;
  --border: #21393d;
  --border-strong: #4f7478;
  --primary: #0b5257;
  --accent-text: #5fd6c9;
  --on-primary: #ffffff;
  --credit: #3fcf80;
  --debit: #ff7b6b;
  --credit-bg: #0a2919;
  --debit-bg: #2e1512;
  --credit-fill: #0d6b36;
  --debit-fill: #a8261d;
  --on-fill: #ffffff;
  --pending: #ffcf66;
  --pending-bg: #352707;
  --focus: #5fd6c9;
  --radius: 0.75rem;
  --radius-lg: 1.125rem;
  --font-body: 'Rubik', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-head: 'Rubik', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --avatar-s: 45%;
  --avatar-l: 32%;
  --teal: #8ee6da;
  --shadow-card: none;
  --shadow-bar: 0 1px 0 rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-palette="ocean"]:not([data-theme="light"]) {
    --bg: #061416;
    --surface: #0c1e21;
    --surface-2: #12292d;
    --text: #e6f4f3;
    --muted: #92b0b2;
    --border: #21393d;
    --border-strong: #4f7478;
    --primary: #0b5257;
    --accent-text: #5fd6c9;
    --on-primary: #ffffff;
    --credit: #3fcf80;
    --debit: #ff7b6b;
    --credit-bg: #0a2919;
    --debit-bg: #2e1512;
    --credit-fill: #0d6b36;
    --debit-fill: #a8261d;
    --on-fill: #ffffff;
    --pending: #ffcf66;
    --pending-bg: #352707;
    --focus: #5fd6c9;
    --radius: 0.75rem;
    --radius-lg: 1.125rem;
    --font-body: 'Rubik', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
    --font-head: 'Rubik', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
    --avatar-s: 45%;
    --avatar-l: 32%;
    --teal: #8ee6da;
    --shadow-card: none;
    --shadow-bar: 0 1px 0 rgba(255, 255, 255, 0.06);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------------------------------
   2. Sunset: warm coral and sunny yellow on cream, extra-round corners, Fredoka headings.
   Debit is a crimson (not the coral of the bar) so money out never looks like a brand colour.
   ------------------------------------------------------------------------------------------ */

:root[data-palette="sunset"] {
  --bg: #fdf2e9;
  --surface: #fffdfa;
  --surface-2: #fbe5d5;
  --text: #2b1710;
  --muted: #6b4b3e;
  --border: #efd5c3;
  --border-strong: #9e7867;
  --primary: #b2402a;
  --accent-text: #a5351f;
  --on-primary: #ffffff;
  --credit: #19733a;
  --debit: #b0103a;
  --credit-bg: #e2f4e6;
  --debit-bg: #fde4ea;
  --credit-fill: var(--credit);
  --debit-fill: var(--debit);
  --on-fill: #ffffff;
  --pending: #845200;
  --pending-bg: #ffe8b0;
  --focus: #1a56db;
  --radius: 0.875rem;
  --radius-lg: 1.375rem;
  --font-body: 'Rubik', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-head: 'Fredoka', 'Rubik', 'Noto Sans Arabic', system-ui, sans-serif;
  --avatar-s: 60%;
  --avatar-l: 38%;
  --teal: #ffd166;
  --shadow-card: 0 1px 2px rgba(90, 40, 20, 0.07), 0 8px 20px -12px rgba(90, 40, 20, 0.25);
  --shadow-bar: 0 1px 3px rgba(70, 25, 10, 0.2);
  color-scheme: light;
}

:root[data-palette="sunset"][data-theme="dark"] {
  --bg: #170d09;
  --surface: #22140e;
  --surface-2: #2d1c14;
  --text: #fbeee6;
  --muted: #c5a596;
  --border: #3d2a20;
  --border-strong: #876553;
  --primary: #93361f;
  --accent-text: #ffa07c;
  --on-primary: #ffffff;
  --credit: #4fd18b;
  --debit: #ff7096;
  --credit-bg: #0f2a19;
  --debit-bg: #31121b;
  --credit-fill: #10703a;
  --debit-fill: #a8103a;
  --on-fill: #ffffff;
  --pending: #ffd166;
  --pending-bg: #3a2905;
  --focus: #ffd166;
  --radius: 0.875rem;
  --radius-lg: 1.375rem;
  --font-body: 'Rubik', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-head: 'Fredoka', 'Rubik', 'Noto Sans Arabic', system-ui, sans-serif;
  --avatar-s: 55%;
  --avatar-l: 36%;
  --teal: #ffd166;
  --shadow-card: none;
  --shadow-bar: 0 1px 0 rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-palette="sunset"]:not([data-theme="light"]) {
    --bg: #170d09;
    --surface: #22140e;
    --surface-2: #2d1c14;
    --text: #fbeee6;
    --muted: #c5a596;
    --border: #3d2a20;
    --border-strong: #876553;
    --primary: #93361f;
    --accent-text: #ffa07c;
    --on-primary: #ffffff;
    --credit: #4fd18b;
    --debit: #ff7096;
    --credit-bg: #0f2a19;
    --debit-bg: #31121b;
    --credit-fill: #10703a;
    --debit-fill: #a8103a;
    --on-fill: #ffffff;
    --pending: #ffd166;
    --pending-bg: #3a2905;
    --focus: #ffd166;
    --radius: 0.875rem;
    --radius-lg: 1.375rem;
    --font-body: 'Rubik', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
    --font-head: 'Fredoka', 'Rubik', 'Noto Sans Arabic', system-ui, sans-serif;
    --avatar-s: 55%;
    --avatar-l: 36%;
    --teal: #ffd166;
    --shadow-card: none;
    --shadow-bar: 0 1px 0 rgba(255, 255, 255, 0.06);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------------------------------
   3. Plum: calm, elegant aubergine and lavender, soft corners, Assistant.
   ------------------------------------------------------------------------------------------ */

:root[data-palette="plum"] {
  --bg: #f3f0f8;
  --surface: #ffffff;
  --surface-2: #e9e3f3;
  --text: #1e1530;
  --muted: #5b5070;
  --border: #ddd5ea;
  --border-strong: #827796;
  --primary: #432666;
  --accent-text: #5e35a0;
  --on-primary: #ffffff;
  --credit: #0d6e45;
  --debit: #b3261e;
  --credit-bg: #e0f3ea;
  --debit-bg: #fbe7e5;
  --credit-fill: var(--credit);
  --debit-fill: var(--debit);
  --on-fill: #ffffff;
  --pending: #855600;
  --pending-bg: #fdedc4;
  --focus: #6d3fd0;
  --radius: 0.625rem;
  --radius-lg: 1rem;
  --font-body: 'Assistant', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-head: 'Assistant', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --avatar-s: 40%;
  --avatar-l: 36%;
  --teal: #d7c2ff;
  --shadow-card: 0 1px 2px rgba(40, 20, 70, 0.06), 0 8px 18px -12px rgba(40, 20, 70, 0.22);
  --shadow-bar: 0 1px 3px rgba(25, 10, 45, 0.2);
  color-scheme: light;
}

:root[data-palette="plum"][data-theme="dark"] {
  --bg: #0f0b16;
  --surface: #17111f;
  --surface-2: #20182b;
  --text: #f1ecf8;
  --muted: #ab9fc0;
  --border: #31273f;
  --border-strong: #716389;
  --primary: #3e2463;
  --accent-text: #c3a6ff;
  --on-primary: #ffffff;
  --credit: #3ccf8e;
  --debit: #ff7a6b;
  --credit-bg: #0c2619;
  --debit-bg: #2c1412;
  --credit-fill: #0d6b43;
  --debit-fill: #a8261d;
  --on-fill: #ffffff;
  --pending: #ffcf66;
  --pending-bg: #352707;
  --focus: #c3a6ff;
  --radius: 0.625rem;
  --radius-lg: 1rem;
  --font-body: 'Assistant', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-head: 'Assistant', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --avatar-s: 40%;
  --avatar-l: 36%;
  --teal: #d7c2ff;
  --shadow-card: none;
  --shadow-bar: 0 1px 0 rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-palette="plum"]:not([data-theme="light"]) {
    --bg: #0f0b16;
    --surface: #17111f;
    --surface-2: #20182b;
    --text: #f1ecf8;
    --muted: #ab9fc0;
    --border: #31273f;
    --border-strong: #716389;
    --primary: #3e2463;
    --accent-text: #c3a6ff;
    --on-primary: #ffffff;
    --credit: #3ccf8e;
    --debit: #ff7a6b;
    --credit-bg: #0c2619;
    --debit-bg: #2c1412;
    --credit-fill: #0d6b43;
    --debit-fill: #a8261d;
    --on-fill: #ffffff;
    --pending: #ffcf66;
    --pending-bg: #352707;
    --focus: #c3a6ff;
    --radius: 0.625rem;
    --radius-lg: 1rem;
    --font-body: 'Assistant', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
    --font-head: 'Assistant', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
    --avatar-s: 40%;
    --avatar-l: 36%;
    --teal: #d7c2ff;
    --shadow-card: none;
    --shadow-bar: 0 1px 0 rgba(255, 255, 255, 0.06);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------------------------------
   4. Bubblegum: candy pink, grape purple and sky blue, pill-round corners, chunky
   Secular One headings on Varela Round. Debit is a tomato red so it never reads as the pink bar.
   ------------------------------------------------------------------------------------------ */

:root[data-palette="bubblegum"] {
  --bg: #fff0f7;
  --surface: #ffffff;
  --surface-2: #fde2f0;
  --text: #2d0f24;
  --muted: #6e4462;
  --border: #f6cfe4;
  --border-strong: #a97497;
  --primary: #b0186d;
  --accent-text: #7b2cbf;
  --on-primary: #ffffff;
  --credit: #11713c;
  --debit: #c0331a;
  --credit-bg: #e0f5e8;
  --debit-bg: #ffe5dc;
  --credit-fill: var(--credit);
  --debit-fill: var(--debit);
  --on-fill: #ffffff;
  --pending: #835200;
  --pending-bg: #ffe9ad;
  --focus: #6b21d6;
  --radius: 1.25rem;
  --radius-lg: 1.75rem;
  --font-body: 'Varela Round', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-head: 'Secular One', 'Varela Round', 'Noto Sans Arabic', system-ui, sans-serif;
  --avatar-s: 70%;
  --avatar-l: 42%;
  --teal: #a8e0ff;
  --shadow-card: 0 4px 0 #f7cde3;
  --shadow-bar: 0 2px 0 rgba(90, 10, 55, 0.25);
  color-scheme: light;
}

:root[data-palette="bubblegum"][data-theme="dark"] {
  --bg: #160a14;
  --surface: #21101e;
  --surface-2: #2c1729;
  --text: #fdeef8;
  --muted: #cba8c2;
  --border: #432540;
  --border-strong: #8e6487;
  --primary: #8e1559;
  --accent-text: #ff9fd8;
  --on-primary: #ffffff;
  --credit: #4fd18b;
  --debit: #ff8c5a;
  --credit-bg: #0f2a19;
  --debit-bg: #34160c;
  --credit-fill: #10703a;
  --debit-fill: #b02e14;
  --on-fill: #ffffff;
  --pending: #ffd166;
  --pending-bg: #3a2905;
  --focus: #a8e0ff;
  --radius: 1.25rem;
  --radius-lg: 1.75rem;
  --font-body: 'Varela Round', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-head: 'Secular One', 'Varela Round', 'Noto Sans Arabic', system-ui, sans-serif;
  --avatar-s: 65%;
  --avatar-l: 40%;
  --teal: #a8e0ff;
  --shadow-card: none;
  --shadow-bar: 0 1px 0 rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-palette="bubblegum"]:not([data-theme="light"]) {
    --bg: #160a14;
    --surface: #21101e;
    --surface-2: #2c1729;
    --text: #fdeef8;
    --muted: #cba8c2;
    --border: #432540;
    --border-strong: #8e6487;
    --primary: #8e1559;
    --accent-text: #ff9fd8;
    --on-primary: #ffffff;
    --credit: #4fd18b;
    --debit: #ff8c5a;
    --credit-bg: #0f2a19;
    --debit-bg: #34160c;
    --credit-fill: #10703a;
    --debit-fill: #b02e14;
    --on-fill: #ffffff;
    --pending: #ffd166;
    --pending-bg: #3a2905;
    --focus: #a8e0ff;
    --radius: 1.25rem;
    --radius-lg: 1.75rem;
    --font-body: 'Varela Round', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
    --font-head: 'Secular One', 'Varela Round', 'Noto Sans Arabic', system-ui, sans-serif;
    --avatar-s: 65%;
    --avatar-l: 40%;
    --teal: #a8e0ff;
    --shadow-card: none;
    --shadow-bar: 0 1px 0 rgba(255, 255, 255, 0.06);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------------------------------
   5. Toybox: building-block blue, sunny yellow, red and green, round corners with a solid
   'toy' shadow under cards, Varela Round headings on Rubik. Pending is
   orange in dark mode so it does not blend with the yellow accent.
   ------------------------------------------------------------------------------------------ */

:root[data-palette="toybox"] {
  --bg: #fff8d9;
  --surface: #ffffff;
  --surface-2: #fff0b5;
  --text: #14213d;
  --muted: #4f5874;
  --border: #f1e3a6;
  --border-strong: #8a7f55;
  --primary: #1d4ed8;
  --accent-text: #1a45c0;
  --on-primary: #ffffff;
  --credit: #12703a;
  --debit: #c8211b;
  --credit-bg: #e1f5e7;
  --debit-bg: #ffe4e1;
  --credit-fill: var(--credit);
  --debit-fill: var(--debit);
  --on-fill: #ffffff;
  --pending: #8a4b00;
  --pending-bg: #ffe0b8;
  --focus: #d9480f;
  --radius: 1.125rem;
  --radius-lg: 1.5rem;
  --font-body: 'Rubik', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-head: 'Varela Round', 'Rubik', 'Noto Sans Arabic', system-ui, sans-serif;
  --avatar-s: 75%;
  --avatar-l: 42%;
  --teal: #ffd23f;
  --shadow-card: 0 4px 0 #f0dc8c;
  --shadow-bar: 0 2px 0 rgba(10, 30, 90, 0.3);
  color-scheme: light;
}

:root[data-palette="toybox"][data-theme="dark"] {
  --bg: #0a1022;
  --surface: #111a35;
  --surface-2: #192444;
  --text: #f1f5ff;
  --muted: #a7b3d4;
  --border: #283660;
  --border-strong: #6276ab;
  --primary: #1e45c0;
  --accent-text: #ffd23f;
  --on-primary: #ffffff;
  --credit: #4fd18b;
  --debit: #ff7a6b;
  --credit-bg: #0c2a1a;
  --debit-bg: #321613;
  --credit-fill: #10703a;
  --debit-fill: #b3221b;
  --on-fill: #ffffff;
  --pending: #ffb066;
  --pending-bg: #3a2208;
  --focus: #ffd23f;
  --radius: 1.125rem;
  --radius-lg: 1.5rem;
  --font-body: 'Rubik', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-head: 'Varela Round', 'Rubik', 'Noto Sans Arabic', system-ui, sans-serif;
  --avatar-s: 70%;
  --avatar-l: 40%;
  --teal: #ffd23f;
  --shadow-card: none;
  --shadow-bar: 0 1px 0 rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-palette="toybox"]:not([data-theme="light"]) {
    --bg: #0a1022;
    --surface: #111a35;
    --surface-2: #192444;
    --text: #f1f5ff;
    --muted: #a7b3d4;
    --border: #283660;
    --border-strong: #6276ab;
    --primary: #1e45c0;
    --accent-text: #ffd23f;
    --on-primary: #ffffff;
    --credit: #4fd18b;
    --debit: #ff7a6b;
    --credit-bg: #0c2a1a;
    --debit-bg: #321613;
    --credit-fill: #10703a;
    --debit-fill: #b3221b;
    --on-fill: #ffffff;
    --pending: #ffb066;
    --pending-bg: #3a2208;
    --focus: #ffd23f;
    --radius: 1.125rem;
    --radius-lg: 1.5rem;
    --font-body: 'Rubik', 'Heebo', 'Noto Sans Arabic', system-ui, sans-serif;
    --font-head: 'Varela Round', 'Rubik', 'Noto Sans Arabic', system-ui, sans-serif;
    --avatar-s: 70%;
    --avatar-l: 40%;
    --teal: #ffd23f;
    --shadow-card: none;
    --shadow-bar: 0 1px 0 rgba(255, 255, 255, 0.06);
    color-scheme: dark;
  }
}

/* My settings: the colour palettes as radio cards. Each card previews its palette's colours in
   the current light or dark mode, set here per card because the palette tokens are on :root. */

.palette-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(8.5rem, 100%), 1fr)); gap: 0.5rem; }
.palette-option { position: relative; display: block; cursor: pointer; }
.palette-option input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.palette-option__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  block-size: 100%;
  padding: 0.5rem;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.palette-option__preview {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--pv-radius);
  background: var(--pv-bg);
  box-shadow: 0 0 0 1px var(--border);
}
.palette-option__bar { display: flex; align-items: center; block-size: 1.25rem; padding-inline: 0.5rem; background: var(--pv-primary); }
.palette-option__logo { inline-size: 0.625rem; block-size: 0.625rem; border-radius: 50%; background: var(--pv-logo); }
.palette-option__dots { display: flex; gap: 0.375rem; padding: 0.5rem; }
.palette-option__dot { inline-size: 1.125rem; block-size: 1.125rem; border-radius: 50%; }
.palette-option__dot--accent { background: var(--pv-accent); }
.palette-option__dot--credit { background: var(--pv-credit); }
.palette-option__dot--debit { background: var(--pv-debit); }
.palette-option__name { display: flex; align-items: center; gap: 0.25rem; min-block-size: 1.5rem; padding-inline: 0.25rem; font-weight: 600; }
.palette-option input:checked + .palette-option__body { border-color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); background: var(--surface); }
.palette-option input:checked + .palette-option__body .palette-option__name::after { content: "✓"; margin-inline-start: auto; font-weight: 700; color: var(--accent-text); }
.palette-option input:focus-visible + .palette-option__body { outline: 3px solid var(--focus); outline-offset: 2px; }

.palette-option--classic { --pv-bg: #eef1f3; --pv-primary: #16305c; --pv-logo: #0f7a72; --pv-accent: #16305c; --pv-credit: #0a6b39; --pv-debit: #a3241d; --pv-radius: 0.5rem; }
.palette-option--ocean { --pv-bg: #e8f3f2; --pv-primary: #0b5c61; --pv-logo: #8ee6da; --pv-accent: #0a6469; --pv-credit: #12703a; --pv-debit: #b0281f; --pv-radius: 0.75rem; }
.palette-option--sunset { --pv-bg: #fdf2e9; --pv-primary: #b2402a; --pv-logo: #ffd166; --pv-accent: #a5351f; --pv-credit: #19733a; --pv-debit: #b0103a; --pv-radius: 0.875rem; }
.palette-option--plum { --pv-bg: #f3f0f8; --pv-primary: #432666; --pv-logo: #d7c2ff; --pv-accent: #5e35a0; --pv-credit: #0d6e45; --pv-debit: #b3261e; --pv-radius: 0.625rem; }
.palette-option--bubblegum { --pv-bg: #fff0f7; --pv-primary: #b0186d; --pv-logo: #a8e0ff; --pv-accent: #7b2cbf; --pv-credit: #11713c; --pv-debit: #c0331a; --pv-radius: 1.25rem; }
.palette-option--toybox { --pv-bg: #fff8d9; --pv-primary: #1d4ed8; --pv-logo: #ffd23f; --pv-accent: #1a45c0; --pv-credit: #12703a; --pv-debit: #c8211b; --pv-radius: 1.125rem; }

:root[data-theme="dark"] .palette-option--classic { --pv-bg: #0a0e16; --pv-primary: #1d4a86; --pv-logo: #3fb3a8; --pv-accent: #6ea8ff; --pv-credit: #2ebd6e; --pv-debit: #eb695a; }
:root[data-theme="dark"] .palette-option--ocean { --pv-bg: #061416; --pv-primary: #0b5257; --pv-logo: #8ee6da; --pv-accent: #5fd6c9; --pv-credit: #3fcf80; --pv-debit: #ff7b6b; }
:root[data-theme="dark"] .palette-option--sunset { --pv-bg: #170d09; --pv-primary: #93361f; --pv-logo: #ffd166; --pv-accent: #ffa07c; --pv-credit: #4fd18b; --pv-debit: #ff7096; }
:root[data-theme="dark"] .palette-option--plum { --pv-bg: #0f0b16; --pv-primary: #3e2463; --pv-logo: #d7c2ff; --pv-accent: #c3a6ff; --pv-credit: #3ccf8e; --pv-debit: #ff7a6b; }
:root[data-theme="dark"] .palette-option--bubblegum { --pv-bg: #160a14; --pv-primary: #8e1559; --pv-logo: #a8e0ff; --pv-accent: #ff9fd8; --pv-credit: #4fd18b; --pv-debit: #ff8c5a; }
:root[data-theme="dark"] .palette-option--toybox { --pv-bg: #0a1022; --pv-primary: #1e45c0; --pv-logo: #ffd23f; --pv-accent: #ffd23f; --pv-credit: #4fd18b; --pv-debit: #ff7a6b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .palette-option--classic { --pv-bg: #0a0e16; --pv-primary: #1d4a86; --pv-logo: #3fb3a8; --pv-accent: #6ea8ff; --pv-credit: #2ebd6e; --pv-debit: #eb695a; }
  :root:not([data-theme="light"]) .palette-option--ocean { --pv-bg: #061416; --pv-primary: #0b5257; --pv-logo: #8ee6da; --pv-accent: #5fd6c9; --pv-credit: #3fcf80; --pv-debit: #ff7b6b; }
  :root:not([data-theme="light"]) .palette-option--sunset { --pv-bg: #170d09; --pv-primary: #93361f; --pv-logo: #ffd166; --pv-accent: #ffa07c; --pv-credit: #4fd18b; --pv-debit: #ff7096; }
  :root:not([data-theme="light"]) .palette-option--plum { --pv-bg: #0f0b16; --pv-primary: #3e2463; --pv-logo: #d7c2ff; --pv-accent: #c3a6ff; --pv-credit: #3ccf8e; --pv-debit: #ff7a6b; }
  :root:not([data-theme="light"]) .palette-option--bubblegum { --pv-bg: #160a14; --pv-primary: #8e1559; --pv-logo: #a8e0ff; --pv-accent: #ff9fd8; --pv-credit: #4fd18b; --pv-debit: #ff8c5a; }
  :root:not([data-theme="light"]) .palette-option--toybox { --pv-bg: #0a1022; --pv-primary: #1e45c0; --pv-logo: #ffd23f; --pv-accent: #ffd23f; --pv-credit: #4fd18b; --pv-debit: #ff7a6b; }
}
