/* Banque — design system : noir, minimaliste, une seule police (Inter variable). */

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

:root {
  --bg: #0A0A0A;
  --surface: #141414;
  --surface-hover: #1C1C1C;
  --border: #262626;
  --text: #F5F5F5;
  --text-2: #A3A3A3;
  --text-3: #6B6B6B;
  --credit: #4ADE80;
  --error: #F87171;
  --warn: #FBBF24;
  --bourso: #D8006B;
  --cmso: #0C6EB6;
  --paypal: #1E90FF;
  --r-card: 14px;
  --r-field: 10px;
  --gutter: 16px;
  --nav-h: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t: 180ms;
  --toolbar-h: 112px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p { margin: 0; }
h1, h2 { font-weight: 600; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.warn { color: var(--warn); }
.error { color: var(--error); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; word-break: break-word; color: var(--text-2); }
.ic { flex: none; display: block; }
.noscript { padding: 24px; }

/* ── Mise en page ── */
main { display: block; outline: none; }
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) var(--gutter) calc(var(--nav-h) + 32px + env(safe-area-inset-bottom));
  animation: enter var(--t) var(--ease);
}
.page > * + * { margin-top: 16px; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.page-title { font-size: 28px; padding: 8px 0 4px; }
.section-title { font-size: 13px; font-weight: 500; color: var(--text-2); letter-spacing: .02em; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; }
.link { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border); }
.link:hover { color: var(--text); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.group > * + * { margin-top: 8px; }
.group { margin-top: 28px !important; }
.hint { padding: 0 4px; }
.empty { color: var(--text-2); text-align: center; padding: 48px 16px; }

/* ── Navigation : onglets en bas (mobile), barre latérale (bureau) ── */
.nav {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-around;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(10, 10, 10, .92);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.nav[hidden] { display: none; }
.nav-item {
  flex: 1; min-width: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 500; color: var(--text-3); transition: color var(--t) var(--ease);
}
.nav-item[aria-current='page'] { color: var(--text); }
@media (min-width: 900px) {
  :root { --gutter: 24px; }
  .nav {
    top: 0; right: auto; width: 84px; height: auto; flex-direction: column; justify-content: flex-start; gap: 8px;
    padding: 24px 0; border-top: 0; border-right: 1px solid var(--border); background: var(--bg);
  }
  .nav-item { flex: none; height: 64px; }
  body.with-nav main { padding-left: 84px; }
  .page { padding-bottom: 48px; padding-top: 32px; }
}

/* ── Boutons et champs ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--surface-hover); border: 1px solid var(--border); color: var(--text);
  font-weight: 500; white-space: nowrap; transition: background var(--t) var(--ease), opacity var(--t);
}
.btn:hover:not(:disabled) { background: #242424; }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover:not(:disabled) { background: #fff; }
.btn.danger { background: transparent; color: var(--error); border-color: #3a1f1f; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 999px; border: 0; background: transparent; color: var(--text-2);
  transition: background var(--t), color var(--t);
}
.icon-btn:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }
.field { display: block; }
.field-label { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field textarea, .search {
  width: 100%; min-height: 44px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-field);
  transition: border-color var(--t);
}
.field textarea { resize: vertical; min-height: 88px; line-height: 1.45; }
.field input:focus, .field textarea:focus, .search:focus-within { outline: none; border-color: var(--text-3); }
.field.compact input { min-height: 40px; padding: 8px 12px; margin-top: 6px; background: var(--bg); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input[type='date'] { color-scheme: dark; }

/* ── Badges ── */
.bank { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.bank i { width: 8px; height: 8px; border-radius: 999px; background: var(--text-3); }
.bank-boursorama i { background: var(--bourso); }
.bank-cmso i { background: var(--cmso); }
.bank-paypal i { background: var(--paypal); }
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border);
  font-size: 11px; font-weight: 500; color: var(--text-2); vertical-align: 1px;
}

/* ── Montants ── */
.amount, .big, .account-balance, .detail-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount { font-size: 15px; font-weight: 500; }
.amount.credit { color: var(--credit); }
.amount.pending { color: var(--text-3); }
.big { font-size: 40px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }

/* ── Accueil ── */
.hero { padding: 20px 4px 8px; }
.eyebrow { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.sync-line { display: flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--text-2); font-size: 13px; }
.sync-line .icon-btn { margin-left: -6px; order: -1; }
.syncing .refresh .ic { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.accounts { display: grid; gap: 8px; }
@media (min-width: 560px) { .accounts { grid-template-columns: 1fr 1fr; } .accounts .section-title { grid-column: 1 / -1; } }
.account { display: grid; gap: 4px; padding: 14px 16px; min-height: 96px; transition: background var(--t); }
.account:hover { background: var(--surface-hover); }
.account-top { display: flex; justify-content: space-between; align-items: center; }
.account-name { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-balance { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.others { margin-top: 24px !important; }
.month { padding: 14px 16px; }
.month-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.month-grid > div { display: grid; gap: 2px; }
.month-grid .amount { font-size: 17px; font-weight: 600; }
.onboarding { padding: 20px; display: grid; gap: 10px; justify-items: start; }
.recent { margin-top: 24px !important; }
.recent > * + * { margin-top: 8px; }

/* ── Bandeaux ── */
.banner {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface);
}
.banner .ic { color: var(--warn); }
.banner.error .ic { color: var(--error); }
.banner.error { border-color: #3a1f1f; }
.banner-text { flex: 1; display: grid; gap: 2px; font-size: 13px; min-width: 0; }
.banner-text span { color: var(--text-2); }

/* ── Lignes de transaction ── */
.tx-list { overflow: hidden; }
.tx {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px;
  transition: background var(--t);
}
.tx + .tx { border-top: 1px solid var(--border); }
a.tx:hover { background: var(--surface-hover); }
.avatar {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px;
  background: var(--surface-hover); color: var(--text-2); font-size: 14px; font-weight: 600;
}
.avatar.lg { width: 52px; height: 52px; font-size: 20px; }
.tx-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.tx-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-sub { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-pending .tx-label { color: var(--text-2); }

/* ── Transactions ── */
.transactions { padding-top: 0; }
.toolbar {
  position: sticky; top: 0; z-index: 10; margin: 0 calc(-1 * var(--gutter));
  padding: calc(12px + env(safe-area-inset-top)) var(--gutter) 10px; background: var(--bg);
}
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--text-3); }
.search input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; outline: none; color: var(--text); }
.search input::-webkit-search-cancel-button { filter: invert(1) brightness(.6); }
.chips { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 14px;
  border-radius: var(--r-field); border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font-size: 13px; font-weight: 500; transition: background var(--t), color var(--t);
}
.chip[data-chip='status'] { padding-right: 14px; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.transactions .summary { margin-top: 4px; padding: 0 4px; min-height: 19px; }
.transactions .list { margin-top: 4px; }
.day { content-visibility: auto; contain-intrinsic-size: auto 400px; }
.day + .day { margin-top: 16px; }
.day-head {
  position: sticky; top: var(--toolbar-h); z-index: 5; display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 4px; background: var(--bg); font-size: 13px; font-weight: 500; color: var(--text-2);
}
.day-head .amount { font-size: 13px; color: var(--text-2); }
.day-head .amount.credit { color: var(--credit); }
.sentinel { height: 1px; }

/* ── Squelettes ── */
.sk { display: block; background: var(--surface-hover); border-radius: 6px; animation: pulse 1.4s ease-in-out infinite; }
.sk-line { height: 12px; width: 80%; margin: 4px 0; }
.sk-amount { height: 40px; width: 55%; margin: 12px 0; }
.sk-card { height: 96px; border-radius: var(--r-card); margin-top: 12px; }
.sk-circle { width: 36px; height: 36px; border-radius: 999px; flex: none; }
.w30 { width: 30%; } .w40 { width: 40%; } .w60 { width: 60%; }
.boot { max-width: 720px; margin: 0 auto; padding: 36px var(--gutter); }
@keyframes pulse { 50% { opacity: .5; } }

/* ── Feuilles (dialog) : bas d'écran sur mobile, panneau latéral sur bureau ── */
dialog.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 92dvh;
  padding: 0; border: 1px solid var(--border); border-bottom: 0; border-radius: 18px 18px 0 0;
  background: var(--surface); color: var(--text); overflow: auto; overscroll-behavior: contain;
  animation: sheet-in 200ms var(--ease);
}
dialog.sheet::backdrop { background: rgba(0, 0, 0, .6); animation: fade 200ms var(--ease); }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet-body { padding: 8px var(--gutter) calc(20px + env(safe-area-inset-bottom)); }
.sheet-body > * + * { margin-top: 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding-top: 8px; }
.sheet-head h2 { font-size: 17px; }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 6px; }
.options { display: grid; }
.option {
  display: flex; justify-content: space-between; align-items: center; min-height: 52px; padding: 0 4px;
  background: none; border: 0; border-top: 1px solid var(--border); text-align: left;
}
.option:first-child { border-top: 0; }
.option.on { font-weight: 600; }
.date-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 900px) {
  dialog.sheet:not(.detail-sheet) { inset: 0; margin: auto; width: 420px; max-height: 80dvh; border-radius: 18px; border-bottom: 1px solid var(--border); }
  dialog.detail-sheet {
    inset: 0 0 0 auto; width: 440px; max-height: none; height: 100dvh; border-radius: 0; border: 0; border-left: 1px solid var(--border);
    animation: panel-in 200ms var(--ease);
  }
  @keyframes panel-in { from { transform: translateX(24px); opacity: 0; } }
}

/* ── Détail ── */
.detail-content > * + * { margin-top: 16px; }
.detail-hero { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 4px 0 8px; }
.detail-amount .amount { font-size: 34px; font-weight: 600; letter-spacing: -.02em; }
.detail-hero h2 { font-size: 17px; font-weight: 500; }
.detail-account { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-2); }
.rows { margin-bottom: 0; padding: 0 14px; }
.rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; }
.rows > div + div { border-top: 1px solid var(--border); }
.rows dt { color: var(--text-2); }
.rows dd { margin: 0; text-align: right; }
.raw { padding: 12px 14px; display: grid; gap: 4px; }
.raw .mono + .small { margin-top: 8px; }
.detail .sk-circle { width: 52px; height: 52px; margin: 8px auto; }
.detail .sk-amount { margin: 12px auto; width: 40%; }
.detail .sk-line { margin: 8px auto; }

/* ── Réglages ── */
.items > .item + .item { border-top: 1px solid var(--border); }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.item-main { flex: 1 1 160px; min-width: 0; display: grid; gap: 3px; }
.item-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.item-actions { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.account-item { flex-wrap: nowrap; }
.account-item .item-main { flex-basis: 0; }
.account-item .item-actions { gap: 0; }
.account-item.is-hidden .item-main { opacity: .5; }
.password-form { padding: 14px; display: grid; gap: 12px; justify-items: start; }
.password-form .field { width: 100%; }
.runs-box { display: block; }
.runs-box summary { cursor: pointer; min-height: 28px; display: flex; align-items: center; color: var(--text-2); font-size: 13px; }
.runs { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; display: grid; gap: 0; }
.run { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 8px 0; font-size: 13px; border-top: 1px solid var(--border); }
.run-result { font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.run.is-error .run-result { color: var(--error); }
.run-error { grid-column: 1 / -1; color: var(--text-3); }
.about { padding-bottom: 8px; }

/* ── Connexion ── */
.login { min-height: 100dvh; display: grid; place-items: center; padding-bottom: 15vh; }
.login-box { width: 100%; max-width: 320px; display: grid; gap: 14px; justify-items: center; }
.login-box h1 { font-size: 22px; margin-bottom: 10px; }
.login-box .field, .login-box .btn { width: 100%; }
.login-mark img { display: block; border-radius: 14px; }
.form-error { min-height: 19px; color: var(--error); font-size: 13px; }

/* ── Toast ── */
.toast {
  position: fixed; z-index: 50; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 500;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--error); color: #1a0606; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; }
  .syncing .refresh .ic { animation: none; }
}
.page.transactions { padding-top: 0; }
.legal { max-width: 640px; }
.legal h2 { font-size: 17px; margin-top: 28px; }
.legal p { color: var(--text-2); }

/* ── Analyse ── */
.analyse-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.month-nav { display: flex; align-items: center; gap: 2px; }
.month-title { font-size: 15px; font-weight: 500; min-width: 136px; text-align: center; }
.ic.flip { transform: scaleX(-1); }
.analyse.is-loading .stats3, .analyse.is-loading .cats-card, .analyse.is-loading .top-card { opacity: .55; transition: opacity var(--t); }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 16px; }
.stats3 > div { display: grid; gap: 2px; min-width: 0; }
.stat { font-size: 18px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.credit { color: var(--credit); }
.chart-card, .cats-card, .top-card { padding: 14px 16px; }
.chart-card > * + *, .cats-card > * + *, .top-card > * + * { margin-top: 12px; }
.seg { display: inline-flex; padding: 2px; border: 1px solid var(--border); border-radius: var(--r-field); background: var(--bg); }
.seg button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font-size: 13px; font-weight: 500; }
.seg button[aria-pressed='true'] { background: var(--surface-hover); color: var(--text); }
.chart { position: relative; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .axis.on { fill: var(--text); font-weight: 600; }
.chart .value { fill: var(--text); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .bar { fill: #3A3A3A; transition: fill var(--t); }
.chart .bar.on { fill: var(--text); }
.chart .hit { fill: transparent; cursor: pointer; outline: none; }
.chart .hit:focus-visible { stroke: var(--text-2); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--text); opacity: .08; }
.chart .dot { fill: var(--text); stroke: var(--surface); stroke-width: 2; }
.chart .cross { stroke: var(--text-3); stroke-width: 1; }
.chart-tip {
  position: absolute; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 120ms;
  display: grid; gap: 1px; padding: 6px 10px; border-radius: var(--r-field); white-space: nowrap;
  background: var(--surface-hover); border: 1px solid var(--border); font-size: 12px; color: var(--text-2);
}
.chart-tip strong { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; }
.chart-tip.show { opacity: 1; }
.data-table summary { cursor: pointer; color: var(--text-3); font-size: 12px; }
.data-table table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.data-table th { text-align: left; font-weight: 500; color: var(--text-2); padding: 4px 0; }
.data-table td { padding: 4px 0; border-top: 1px solid var(--border); }
.data-table th + th, .data-table td + td { text-align: right; }
.top-amount { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
.top li a { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; padding: 8px 0; }
.top li + li a { border-top: 1px solid var(--border); }
.top-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coverage { padding: 0 4px; }

/* ── Catégories : détail et réglages ── */
.category-btn {
  display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 14px; text-align: left; color: var(--text); transition: background var(--t);
}
.category-btn:hover { background: var(--surface-hover); }
.category-value { display: inline-flex; gap: 6px; align-items: center; }
.rule-form, .cat-form { flex-wrap: nowrap; gap: 8px; }
.rule-form .field input, .rule-form select, .cat-form .field input { margin-top: 0; }
.grow { flex: 1; min-width: 0; }
.field.emoji { width: 64px; flex: none; }
.field.emoji input { text-align: center; }
select {
  min-height: 40px; max-width: 150px; padding: 8px 10px; border-radius: var(--r-field);
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
}
.rule .item-main { gap: 0; }
@media (max-width: 520px) { .rule-form { flex-wrap: wrap; } .rule-form .grow { flex-basis: 100%; } }
.balance-end { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.seg.small button { min-height: 28px; padding: 0 10px; font-size: 12px; }
.month-nav { justify-content: center; margin-top: 4px !important; }
.analyse-head { padding-top: 4px; }
.pie-wrap { display: grid; gap: 16px; justify-items: center; }
@media (min-width: 600px) { .pie-wrap { grid-template-columns: 200px 1fr; align-items: center; justify-items: stretch; } }
.donut .slice { stroke: var(--surface); stroke-width: 2; cursor: pointer; outline: none; transition: opacity var(--t); }
.donut .slice:focus-visible { stroke: var(--text); }
.donut:hover .slice:not(:hover) { opacity: .7; }
.donut-total { fill: var(--text); font-size: 20px; font-weight: 600; }
.legend { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; }
.legend a { display: grid; grid-template-columns: 12px 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 7px 0; }
.legend li + li a { border-top: 1px solid var(--border); }
.swatch { grid-row: 1 / 3; width: 10px; height: 10px; border-radius: 3px; background: var(--text-3); }
.legend-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-amount { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.legend-meta { grid-column: 2 / 4; }
.balance-note { margin-top: 8px !important; }
.recurring-total { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 4px; margin-top: 4px !important; }
.summary-line .summary { padding: 0; margin: 0; }
.csv { flex: none; }
.top { list-style: none; margin: 0; padding: 0; display: grid; }
.top li a { grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 1px; }
.top li a > .muted { grid-column: 1; grid-row: 2; }
.top li a > .top-amount { grid-column: 2; grid-row: 1 / 3; align-self: center; }
