/* ============================================================
   SPENDSCOPE
   Clean modern dashboard. Geist sans + Geist Mono for numerals.
   Warm neutrals, hairline borders, sparse coral accent.
   ============================================================ */

/* ---------- Tokens ---------- */
:root[data-theme="dark"],
:root {
    --bg:        #0D0D10;
    --bg-1:      #131316;
    --bg-2:      #191A1E;
    --bg-3:      #202127;
    --fg:        #ECECEC;
    --fg-1:      #B0B0B0;
    --fg-2:      #707070;
    --fg-3:      #4A4A4A;
    --line:      rgba(255, 255, 255, 0.06);
    --line-str:  rgba(255, 255, 255, 0.12);
    --accent:    #FF5A36;
    --accent-1:  #FF7857;
    --accent-soft: rgba(255, 90, 54, 0.12);
    --positive:  #7FB069;
    --negative:  var(--accent);
    --warn:      #E6B867;
    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg:        #FAFAF7;
    --bg-1:      #FFFFFF;
    --bg-2:      #F4F4F1;
    --bg-3:      #EAEAE6;
    --fg:        #0A0A0A;
    --fg-1:      #3A3A3A;
    --fg-2:      #707070;
    --fg-3:      #A8A8A8;
    --line:      rgba(10, 10, 10, 0.07);
    --line-str:  rgba(10, 10, 10, 0.14);
    --accent:    #E6482A;
    --accent-1:  #F15B3E;
    --accent-soft: rgba(230, 72, 42, 0.10);
    --positive:  #4C8A4C;
    --negative:  var(--accent);
    --warn:      #B48220;
    color-scheme: light;
}

:root {
    --ui:   'Geist', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', sans-serif;
    --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

    --page-max: 1200px;
    --gutter:   clamp(16px, 3vw, 40px);

    --r-lg: 12px;
    --r-md: 10px;
    --r-sm: 8px;

    --ease: cubic-bezier(.2, .8, .2, 1);
    --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }

html, body { background: var(--bg); color: var(--fg); }
body {
    font-family: var(--ui);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.005em;
    font-feature-settings: 'ss01', 'cv11';
    min-height: 100vh;
    overflow-x: hidden;
}

/* Global focus ring — only shows for keyboard users */
:is(button, a, input, select, [tabindex], details > summary):focus-visible {
    outline: 0;
    box-shadow: var(--ring);
    border-radius: inherit;
}

.paper {
    position: relative;
    z-index: 1;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 var(--gutter) 80px;
}

::selection { background: var(--accent); color: #fff; }

/* ---------- Top bar ---------- */
.masthead {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border-bottom: 1px solid var(--line);
    margin-bottom: clamp(32px, 5vw, 64px);
}

.masthead-row {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 14px 0;
    max-width: var(--page-max);
    margin: 0 auto;
}

.masthead-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    line-height: 1;
}
.wm-the { display: none; }
.wm-title {
    font-family: var(--ui);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.02em;
    color: var(--fg);
}
.masthead-wordmark::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--accent);
    flex: 0 0 auto;
}

.rule { display: none; }
.masthead-tagline { display: none; }

.masthead-nav {
    display: flex;
    align-items: center;
}

.nav-primary {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 22px 14px;
    font-family: var(--ui);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--fg-2);
    transition: color .18s var(--ease);
    white-space: nowrap;
    letter-spacing: -0.005em;
}
.nav-item:hover { color: var(--fg); }
.nav-item.active { color: var(--fg); }
.nav-item.active::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px;
    bottom: -1px;
    height: 1.5px;
    background: var(--fg);
    border-radius: 2px 2px 0 0;
}
.nav-num, .nav-dot { display: none; }
.nav-label { font: inherit; }

.nav-secondary {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    margin-left: auto;
}

/* ---------- Buttons ---------- */
.chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-family: var(--ui);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--fg);
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    white-space: nowrap;
    transition: background .18s var(--ease), border-color .18s var(--ease),
                transform .12s var(--ease), color .18s var(--ease);
}
.chip-btn:hover { background: var(--bg-3); border-color: var(--line-str); }
.chip-btn:active { transform: scale(0.97); }
.chip-btn .chip-bullet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
}
.chip-btn svg { width: 13px; height: 13px; color: var(--fg-2); flex-shrink: 0; }
.chip-btn:hover svg { color: var(--fg); }
.chip-btn-danger { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line-str)); }
.chip-btn-danger svg { color: var(--accent); }
.chip-btn-danger .chip-bullet { color: var(--accent); }
.chip-btn.loading { opacity: 0.7; cursor: progress; }
.chip-btn.loading svg { animation: spin 0.9s linear infinite; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    color: var(--fg-1);
    transition: background .18s var(--ease), border-color .18s var(--ease),
                color .18s var(--ease), transform .12s var(--ease);
}
.icon-btn:hover { background: var(--bg-3); border-color: var(--line-str); color: var(--fg); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 15px; height: 15px; }
.theme-icon-sun, .theme-icon-moon { display: none; }
:root[data-theme="light"] .theme-icon-moon { display: block; }
:root[data-theme="dark"]  .theme-icon-sun  { display: block; }

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    width: 100%;
    font-family: var(--ui);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: #fff;
    background: var(--accent);
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    transition: filter .18s var(--ease), transform .12s var(--ease);
}
.primary-btn:hover { filter: brightness(1.08); }
.primary-btn:active:not(:disabled) { transform: scale(0.98); }
.primary-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-rule { display: none; }

/* ---------- Data status ---------- */
.data-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    cursor: default;
}
.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--fg-3);
    transition: background .2s var(--ease);
}
.data-status.loaded .status-dot { background: var(--positive); }

/* ---------- Page head ---------- */
.page-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 24px;
    padding: clamp(16px, 3vw, 32px) 0 clamp(28px, 3.4vw, 40px);
}
.page-head-inner { min-width: 0; }
.display-head {
    font-family: var(--ui);
    font-weight: 600;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.04;
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--fg);
    text-wrap: balance;
}
.page-dek {
    margin: 12px 0 0;
    font-family: var(--ui);
    font-size: 15px;
    line-height: 1.55;
    color: var(--fg-2);
    max-width: 60ch;
    letter-spacing: -0.005em;
}
.drop-caps { display: none; }

/* ---------- Views ---------- */
.view { display: none; }
.view.active { display: block; }
.view.active > * {
    animation: fadeUp .36s var(--ease) both;
}
.view.active > *:nth-child(1) { animation-delay: 0ms; }
.view.active > *:nth-child(2) { animation-delay: 40ms; }
.view.active > *:nth-child(3) { animation-delay: 80ms; }
.view.active > *:nth-child(4) { animation-delay: 120ms; }
.view.active > *:nth-child(5) { animation-delay: 160ms; }
.view.active > *:nth-child(n+6) { animation-delay: 200ms; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .view.active > * { animation: none; }
}

/* ---------- Hero metrics (tombstone) ---------- */
.tombstone {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: clamp(28px, 3.4vw, 44px);
}
.tombstone::before, .tombstone::after { display: none; }
.tombstone-item {
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    gap: 8px;
    padding: 18px 20px 14px;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: border-color .22s var(--ease);
    min-height: 140px;
}
.tombstone-item:hover { border-color: var(--line-str); }
.tombstone-label {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--fg-2);
}
.tombstone-value {
    font-family: var(--ui);
    font-weight: 600;
    font-size: clamp(22px, 2.6vw, 32px);
    line-height: 1;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    margin-top: 2px;
}
.tombstone-delta {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.01em;
    color: var(--fg-2);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tombstone-delta.up { color: var(--negative); }
.tombstone-delta.down { color: var(--positive); }
.tombstone-spark {
    display: block;
    height: 40px;
    align-self: end;
    margin-top: 4px;
}
.tombstone-spark svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}
.tombstone-spark svg path.spark-line {
    fill: none;
    stroke: var(--fg-1);
    stroke-width: 1.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tombstone-spark svg circle.spark-last {
    fill: var(--accent);
}

/* ---------- Insights lede ---------- */
.insights {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px 22px;
    margin-bottom: clamp(18px, 2.4vw, 28px);
}
.insights[hidden] { display: none; }
.insights-head {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--fg-2);
    margin-bottom: 12px;
}
.insights-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.insights-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-family: var(--ui);
    font-size: 14px;
    font-weight: 500;
    color: var(--fg);
    line-height: 1.45;
    letter-spacing: -0.005em;
}
.insights-list li::before {
    content: "";
    flex: 0 0 auto;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--fg-3);
    margin-top: 8px;
    transform: translateY(-1px);
}
.insights-list li.primary::before { background: var(--accent); }
.insights-list .num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.insights-list li.primary .num {
    border-bottom: 1px solid var(--accent);
    padding-bottom: 1px;
}

/* ---------- Feature sections ---------- */
.feature {
    margin: 0 0 clamp(18px, 2vw, 28px);
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(20px, 2vw, 26px);
    overflow: hidden;
    position: relative;
}
.feature::before { display: none; }
.feature-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.feature-head::after { display: none; }
.feature-head-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}
.feature-title {
    font-family: var(--ui);
    font-weight: 600;
    font-size: clamp(16px, 1.4vw, 19px);
    letter-spacing: -0.025em;
    color: var(--fg);
    margin: 0;
    line-height: 1.2;
}
.feature-head-right {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--fg-1);
    flex-wrap: wrap;
    justify-content: flex-end;
}
.feature-head-label {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--fg-2);
}
.feature-head-value {
    font-family: var(--ui);
    font-weight: 600;
    font-size: clamp(17px, 1.6vw, 20px);
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
}
.feature-body { padding-top: 0; }
.feature-plain { background: transparent; border: 0; padding: 0; }
.feature-plain .feature-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--ui);
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    transition: gap .18s var(--ease);
}
.view-all:hover { gap: 8px; }

/* ---------- Segmented controls ---------- */
.controls {
    display: inline-flex;
    align-items: center;
    padding: 2px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    gap: 0;
}
.ctrl-sep { display: none; }
.sort-btn {
    font-family: var(--ui);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--fg-2);
    padding: 6px 12px;
    border-radius: 6px;
    transition: color .18s var(--ease), background .18s var(--ease);
}
.sort-btn:hover { color: var(--fg); }
.sort-btn.active {
    color: var(--fg);
    background: var(--bg-1);
}

/* ---------- Subscriptions ---------- */
.sub-timeline {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 10px;
    margin-bottom: 18px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-str) transparent;
}
.sub-timeline::-webkit-scrollbar { height: 6px; }
.sub-timeline::-webkit-scrollbar-thumb { background: var(--line-str); border-radius: 999px; }

.month-pill {
    flex: 0 0 auto;
    min-width: 92px;
    padding: 10px 14px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color .18s var(--ease);
}
.month-pill:hover { border-color: var(--line-str); }
.month-pill.current {
    background: var(--accent);
    border-color: transparent;
}
.month-pill.current .month-pill-name { color: rgba(255,255,255,0.82); }
.month-pill.current .month-pill-amount { color: #fff; }
.month-pill-name {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--fg-2);
}
.month-pill-amount {
    font-family: var(--ui);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.02em;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
}

.sub-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 4px;
    border-top: 0;
}
.sub-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    transition: border-color .18s var(--ease);
}
.sub-item:hover { border-color: var(--line-str); }
.sub-item-name {
    font-family: var(--ui);
    font-weight: 500;
    font-size: 13px;
    color: var(--fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.005em;
}
.sub-item-amount {
    font-family: var(--mono);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
}
.sub-item-count {
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--fg-2);
    letter-spacing: 0.02em;
}

/* ---------- Categories grid ---------- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}
.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 18px 16px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    cursor: pointer;
    transition: border-color .2s var(--ease), background .2s var(--ease), transform .12s var(--ease);
}
.category-card:hover {
    border-color: var(--line-str);
    background: var(--bg-3);
}
.category-card:active { transform: scale(0.995); }
.category-card.expanded { border-color: color-mix(in srgb, var(--accent) 40%, var(--line-str)); }

.category-card-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: baseline;
    min-width: 0;
}
.category-card-label {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}
.category-card-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: translateY(1px);
}
.category-card-name {
    font-family: var(--ui);
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: -0.02em;
    color: var(--fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.category-card-count {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--fg-2);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.category-card-total {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}
.category-card-amount {
    font-family: var(--ui);
    font-weight: 600;
    font-size: 16px;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1;
}
.category-card-percent {
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--fg-2);
    letter-spacing: 0.02em;
}

.category-card-spark {
    display: block;
    height: 28px;
}
.category-card-spark svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}
.category-card-spark svg path.spark-line {
    fill: none;
    stroke: var(--fg-2);
    stroke-width: 1.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.category-card-merchants {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: baseline;
    font-family: var(--ui);
    font-size: 12px;
    color: var(--fg-2);
    min-height: 20px;
    line-height: 1.4;
}
.merchant-inline {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
}
.merchant-inline-name {
    color: var(--fg-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
    letter-spacing: -0.005em;
}
.merchant-inline-amount {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    color: var(--fg-2);
    font-size: 11px;
}
.merchant-sep {
    color: var(--fg-3);
}

.category-card-transactions {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s var(--ease);
    border-radius: var(--r-md);
}
.category-card-transactions[data-expanded="true"] {
    margin-top: 6px;
    background: var(--bg-1);
    border: 1px solid var(--line);
}
.category-card-transactions-header {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px 6px;
    border-bottom: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--fg-2);
}
.category-card-transactions-list {
    display: flex;
    flex-direction: column;
    padding: 2px 12px 10px;
}
.dash-transaction-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 12.5px;
}
.dash-transaction-item:last-child { border-bottom: 0; }
.dash-tx-date { font-family: var(--mono); font-size: 11px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.dash-tx-desc { font-family: var(--ui); color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.005em; }
.dash-tx-amount { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--fg); font-weight: 500; }

/* ---------- Recent entries ---------- */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 0;
}
.recent-activity-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    transition: background .15s var(--ease);
}
.recent-activity-item:last-child { border-bottom: 0; }
.recent-activity-icon {
    width: 34px; height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border-radius: 10px;
    border: 0;
}
.recent-activity-info { min-width: 0; }
.recent-activity-desc {
    font-family: var(--ui);
    font-weight: 500;
    font-size: 13.5px;
    color: var(--fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 3px;
    letter-spacing: -0.005em;
}
.recent-activity-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.02em;
    color: var(--fg-2);
}
.recent-activity-category {
    padding: 2px 8px;
    font-family: var(--ui);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: -0.005em;
    text-transform: none;
    border: 0 !important;
    border-radius: 999px;
}
.recent-activity-amount {
    font-family: var(--ui);
    font-weight: 600;
    font-size: 14.5px;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
}

/* ---------- Monthly breakdown ---------- */
.chart-stats {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.cs-item { display: flex; align-items: baseline; gap: 6px; }
.cs-label {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--fg-2);
}
.cs-value {
    font-family: var(--ui);
    font-weight: 600;
    font-size: 15px;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
}
.cs-high { color: var(--accent); }
.cs-low  { color: var(--positive); }

.chart-stage {
    height: 340px;
    padding: 8px 0 0;
    position: relative;
}
.chart-stage::before, .chart-stage::after { display: none; }

.monthly-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}
.month-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(20px, 2vw, 26px);
    border-top: 1px solid var(--line);
}
.month-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: baseline;
    padding-bottom: 16px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.month-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.month-title h3 {
    font-family: var(--ui);
    font-weight: 600;
    font-size: clamp(20px, 2.2vw, 26px);
    letter-spacing: -0.035em;
    color: var(--fg);
    margin: 0;
    line-height: 1;
}
.month-transaction-count {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--fg-2);
    padding: 2px 8px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 6px;
}
.month-total { text-align: right; display: flex; flex-direction: column; gap: 4px; }
.month-total-label {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--fg-2);
}
.month-total-amount {
    font-family: var(--ui);
    font-weight: 600;
    font-size: clamp(18px, 2vw, 24px);
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.month-categories { display: flex; flex-direction: column; gap: 2px; }
.category-row-wrapper {
    border-radius: var(--r-md);
}
.category-row {
    display: grid;
    grid-template-columns: minmax(200px, 1.3fr) 2fr auto;
    gap: 20px;
    align-items: center;
    padding: 12px 12px;
    cursor: pointer;
    border-radius: var(--r-md);
    transition: background .15s var(--ease);
    text-align: left;
}
.category-row:hover { background: var(--bg-2); }
.category-row.expanded { background: var(--bg-2); }
.category-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.category-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    transform: translateY(0);
}
.category-name {
    font-family: var(--ui);
    font-weight: 500;
    font-size: 13.5px;
    color: var(--fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.005em;
}
.subcategory-count {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--fg-2);
    letter-spacing: 0.02em;
    padding: 2px 6px;
    background: var(--bg-2);
    border-radius: 4px;
    flex-shrink: 0;
}
.category-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ui);
    font-size: 18px;
    color: var(--fg-3);
    width: 16px;
    transition: transform .22s var(--ease), color .22s var(--ease);
    line-height: 1;
    margin-left: 4px;
}
.category-row:hover .category-chevron { color: var(--fg-2); }
.category-row.expanded .category-chevron {
    transform: rotate(90deg);
    color: var(--accent);
}

.category-bar-wrapper {
    position: relative;
    height: 6px;
    background: var(--bg-2);
    border-radius: 999px;
    overflow: hidden;
}
.category-bar {
    height: 100%;
    min-width: 3px;
    border-radius: 999px;
    transition: width .5s var(--ease);
}
.category-stats {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 150px;
    justify-content: flex-end;
}
.category-amount {
    font-family: var(--ui);
    font-weight: 600;
    font-size: 14px;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
}
.category-percentage {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--fg-2);
    min-width: 40px;
    text-align: right;
    letter-spacing: 0.02em;
}

.category-transactions {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s var(--ease);
    background: var(--bg-2);
    margin: 0 6px;
    border-radius: var(--r-md);
}
.category-transactions[data-expanded="true"] {
    border: 1px solid var(--line);
    margin: 4px 6px 8px;
}
.subcategory-breakdown { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.subcategory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 12px;
    flex-wrap: wrap;
}
.subcategory-title {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--fg-2);
}
.subcategory-bars { display: flex; flex-direction: column; gap: 2px; }
.subcategory-bar-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 2fr auto;
    gap: 12px;
    align-items: center;
    font-family: var(--ui);
    padding: 8px 10px;
    border: 0;
    border-radius: var(--r-sm);
    background: transparent;
    cursor: pointer;
    text-align: left;
    border-left: 2px solid transparent;
    transition: background .15s var(--ease), border-color .15s var(--ease);
}
.subcategory-bar-row:hover { background: var(--bg-3); }
.subcategory-bar-row.active {
    background: var(--accent-soft);
    border-left-color: var(--accent);
}
.subcategory-name {
    font-family: var(--ui);
    font-size: 12.5px;
    color: var(--fg-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.005em;
}
.subcategory-bar-row.active .subcategory-name { color: var(--fg); font-weight: 500; }
.subcategory-bar-track {
    height: 5px;
    background: var(--bg-3);
    border-radius: 999px;
    position: relative;
    overflow: hidden;
}
.subcategory-bar-row:hover .subcategory-bar-track { background: var(--bg-1); }
.subcategory-bar {
    height: 100%;
    border-radius: 999px;
    transition: width .4s var(--ease);
}
.subcategory-amount {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
    justify-self: end;
}

.category-transactions-header {
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--fg-2);
}
.category-transactions-list { padding: 4px 16px 12px; }
.category-transaction-item {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}
.category-transaction-item:last-child { border-bottom: 0; }
.transaction-subcat-icon { font-size: 13px; opacity: 0.8; }
.transaction-date { font-family: var(--mono); font-size: 11px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.transaction-desc { font-family: var(--ui); color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.005em; }
.transaction-amount { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--fg); font-weight: 500; }

/* ---------- Transactions view ---------- */
.tx-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
}
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    max-width: 480px;
    transition: border-color .18s var(--ease), background .18s var(--ease);
}
.search-box:focus-within {
    border-color: var(--line-str);
    background: var(--bg-1);
}
.search-box svg { width: 15px; height: 15px; color: var(--fg-2); flex-shrink: 0; }
.search-box input {
    border: 0;
    background: transparent;
    outline: 0;
    flex: 1;
    min-width: 0;
    font-family: var(--ui);
    font-size: 13.5px;
    color: var(--fg);
    letter-spacing: -0.005em;
}
.search-box input::placeholder { color: var(--fg-2); }
.search-box:focus-within .search-hint { display: none; }
@media (max-width: 560px) {
    .search-hint { display: none; }
}

.tx-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* kbd hint */
.search-hint {
    font-family: var(--mono);
    font-size: 10px;
    padding: 2px 6px;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--fg-2);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* Category filter popover */
.filter-popover { position: relative; }
.filter-popover > summary {
    list-style: none;
    cursor: pointer;
}
.filter-popover > summary::-webkit-details-marker { display: none; }
.filter-popover-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px 9px 14px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-family: var(--ui);
    font-size: 12.5px;
    color: var(--fg-1);
    min-width: 180px;
    transition: border-color .18s var(--ease), background .18s var(--ease);
}
.filter-popover-trigger:hover { background: var(--bg-3); }
.filter-popover-trigger svg {
    width: 13px;
    height: 13px;
    color: var(--fg-2);
    margin-left: auto;
    transition: transform .22s var(--ease);
}
.filter-popover[open] .filter-popover-trigger svg { transform: rotate(180deg); }
.filter-popover-trigger.has-filter {
    color: var(--fg);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line-str));
}
.filter-popover-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    background: var(--bg-1);
    border: 1px solid var(--line-str);
    border-radius: var(--r-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    z-index: 40;
    scrollbar-width: thin;
}
.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    font-family: var(--ui);
    font-size: 12.5px;
    color: var(--fg-1);
    cursor: pointer;
    text-align: left;
    transition: background .15s var(--ease), color .15s var(--ease);
}
.filter-option:hover { background: var(--bg-2); color: var(--fg); }
.filter-option.active { color: var(--fg); background: var(--bg-2); font-weight: 500; }
.filter-option-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Status row under controls */
.tx-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0 14px;
    flex-wrap: wrap;
    min-height: 28px;
}
.result-count {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--fg-2);
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}
.active-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px 4px 10px;
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line-str));
    border-radius: 999px;
    font-family: var(--ui);
    font-size: 11.5px;
    color: var(--fg);
}
.filter-chip-label { letter-spacing: -0.005em; }
.filter-chip-remove {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--accent);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background .12s var(--ease);
}
.filter-chip-remove:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }

.ledger-wrap {
    overflow-x: auto;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}
.ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--ui);
}
.ledger-table th {
    text-align: left;
    padding: 12px 18px;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--fg-2);
    font-weight: 500;
    border-bottom: 1px solid var(--line);
    user-select: none;
    background: var(--bg-2);
}
.ledger-table th.sortable { cursor: pointer; transition: color .18s var(--ease); position: relative; }
.ledger-table th.sortable:hover { color: var(--fg); }
.ledger-table th.sorted { color: var(--fg); }
.ledger-table .sort-arrow {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    margin-left: 2px;
    font-weight: 600;
}
.ledger-table th.sortable:not(.sorted):hover::after {
    content: ' ↕';
    font-family: var(--mono);
    font-size: 10px;
    opacity: 0.4;
    margin-left: 2px;
}
.ledger-table .th-amt { text-align: right; }
.ledger-table td {
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.ledger-table tbody tr { transition: background .12s var(--ease); }
.ledger-table tbody tr:hover td { background: var(--bg-2); }
.ledger-table tbody tr:last-child td { border-bottom: 0; }
.ledger-table td.date {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--fg-2);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.ledger-table td.description {
    font-family: var(--ui);
    font-size: 13.5px;
    color: var(--fg);
    max-width: 480px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.005em;
}
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    font-family: var(--ui);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: -0.005em;
    border-radius: 999px;
    border: 0 !important;
}
.category-badge .dot {
    width: 5px; height: 5px; border-radius: 50%;
    display: inline-block;
}
.amount-cell {
    text-align: right;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--fg);
}
.amount-cell.debit { color: var(--fg); }

.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 20px 0 0;
    align-items: center;
    flex-wrap: wrap;
}
.pagination button {
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
    font-family: var(--ui);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--fg-1);
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    transition: color .18s var(--ease), border-color .18s var(--ease),
                background .18s var(--ease), transform .12s var(--ease);
}
.pagination button:active:not(:disabled) { transform: scale(0.94); }
.pagination button:hover:not(:disabled) { color: var(--fg); border-color: var(--line-str); background: var(--bg-3); }
.pagination button:disabled { opacity: 0.35; cursor: default; }
.pagination button.active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}
.pagination span {
    font-family: var(--mono);
    color: var(--fg-2);
    padding: 0 4px;
}

/* ---------- Upload view ---------- */
.upload-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
}

.upload-zone {
    position: relative;
    border: 1.5px dashed var(--line-str);
    padding: clamp(36px, 5vw, 68px) 24px;
    text-align: center;
    background: var(--bg-2);
    cursor: pointer;
    border-radius: var(--r-lg);
    transition: border-color .2s var(--ease), background .2s var(--ease);
}
.upload-zone::before, .upload-zone::after { display: none; }
.upload-zone:hover { border-color: var(--accent); background: var(--bg-3); }
.upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.upload-mark {
    margin: 0 auto 18px;
    width: 48px; height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 14px;
}
.upload-mark svg { width: 22px; height: 22px; }
.upload-title {
    font-family: var(--ui);
    font-weight: 600;
    font-size: clamp(18px, 1.8vw, 22px);
    margin: 0 0 6px;
    color: var(--fg);
    letter-spacing: -0.03em;
}
.upload-sub {
    margin: 0;
    font-family: var(--ui);
    font-size: 13.5px;
    color: var(--fg-2);
    letter-spacing: -0.005em;
}

.upload-aside {
    padding: 20px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.upload-aside-actions {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.upload-aside-actions .primary-btn { flex: 1; width: auto; }
.upload-aside-actions .chip-btn { flex: 0 0 auto; padding: 10px 14px; }
.aside-head {
    font-family: var(--ui);
    font-weight: 600;
    font-size: 15px;
    color: var(--fg);
    letter-spacing: -0.025em;
}
.aside-sub {
    margin: 0;
    font-family: var(--ui);
    font-size: 12.5px;
    color: var(--fg-2);
    letter-spacing: -0.005em;
}
.mono {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--fg-1);
    background: var(--bg-3);
    padding: 2px 6px;
    border-radius: 4px;
}

.file-list { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.file-list::-webkit-scrollbar { width: 6px; }
.file-list::-webkit-scrollbar-thumb { background: var(--line-str); border-radius: 999px; }
.file-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: background .15s var(--ease);
}
.file-item:hover { background: var(--bg-3); }
.file-item input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px; height: 14px;
}
.file-name {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-icon { color: var(--fg-2); }
.file-icon svg { width: 13px; height: 13px; }
.discovering, .no-files {
    padding: 22px 0;
    text-align: center;
    font-family: var(--ui);
    font-size: 13px;
    color: var(--fg-2);
}
.no-files small { display: block; font-family: var(--mono); font-size: 11px; margin-top: 6px; color: var(--fg-3); }

.loaded-list { display: flex; flex-direction: column; gap: 4px; border-top: 0; }
.loaded-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}
.check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--positive) 20%, transparent);
    color: var(--positive);
}
.check-icon svg { width: 11px; height: 11px; }
.loaded-name { font-family: var(--mono); font-size: 12px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loaded-count {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--fg-2);
    letter-spacing: 0.02em;
    padding: 2px 8px;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 999px;
    text-transform: none;
}

/* ---------- Empty states ---------- */
.empty-state {
    padding: 48px 24px;
    text-align: center;
    font-family: var(--ui);
    font-size: 13.5px;
    color: var(--fg-2);
    background: transparent;
    border: 0;
    border-radius: 0;
    letter-spacing: -0.005em;
}
.empty-state.small {
    padding: 24px;
    font-size: 13px;
}
td.empty-state { background: transparent; border: 0; }

/* ---------- Footer ---------- */
.colophon {
    padding: 56px 0 0;
    text-align: center;
}
.colophon-inner {
    padding: 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
}
.colophon-mark { display: none; }
.colophon-text {
    font-family: var(--ui);
    font-size: 12px;
    color: var(--fg-3);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    letter-spacing: -0.005em;
}
.colophon-text .sep { color: var(--fg-3); opacity: 0.5; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .masthead-row {
        flex-wrap: wrap;
        padding: 10px 0;
        gap: 12px 20px;
    }
    .masthead-nav {
        order: 3;
        flex-basis: 100%;
        border-top: 1px solid var(--line);
    }
    .nav-primary { overflow-x: auto; scrollbar-width: none; width: 100%; }
    .nav-primary::-webkit-scrollbar { display: none; }
    .nav-item { padding: 14px 12px; }
    .nav-secondary { flex-wrap: wrap; }

    .page-head { grid-template-columns: 1fr; }

    .tombstone { grid-template-columns: 1fr; gap: 10px; }

    .feature-head { grid-template-columns: 1fr; gap: 12px; align-items: start; }
    .feature-head-right { justify-content: flex-start; }

    .category-row { grid-template-columns: 1fr; gap: 10px; }
    .category-stats { justify-content: flex-start; }

    .tx-controls { grid-template-columns: 1fr; }
    .tx-filters { justify-content: flex-start; }

    .ledger-table th, .ledger-table td { padding: 12px; }
    .ledger-table td.description { max-width: 220px; }
}

@media (max-width: 500px) {
    .tombstone-item { min-height: 120px; }
}
