/* Shared components (docs/ui/design.md §3). Verticals reuse these classes; they never restyle
   them in their own css — page css only lays components out. Tokens only. */

/* --- card ------------------------------------------------------------------------------------- */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; min-width: 0;
}
.card-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; min-width: 0; }
.card-title { font-size: 17px; line-height: 24px; font-weight: 600; min-width: 0; }
.card-meta { margin-left: auto; color: var(--ink-3); font-size: 12.5px; line-height: 18px; white-space: nowrap; }
.card-foot { margin-top: 16px; color: var(--ink-3); font-size: 12.5px; line-height: 18px; }
a.card, .card.is-link { display: block; color: inherit; text-decoration: none; cursor: pointer;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
a.card:hover, .card.is-link:hover { border-color: var(--line-2); box-shadow: var(--shadow-hover); }

/* --- KPI card --------------------------------------------------------------------------------- */
.kpi { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 132px; padding: 20px; }
.kpi-label { color: var(--ink-2); }
.kpi-value { font-size: 24px; line-height: 32px; font-weight: 600; white-space: nowrap; }
.kpi-value.is-display { font-size: 40px; line-height: 44px; letter-spacing: -.01em; }
.kpi-foot { margin-top: auto; display: flex; align-items: flex-end; gap: 8px; min-height: 24px; }
.kpi-delta { color: var(--ink-2); font-size: 12.5px; line-height: 18px; min-width: 0; }
.kpi-delta .glyph { font-size: 11px; margin-right: 2px; }
.kpi-spark { margin-left: auto; flex: none; color: var(--ink-2); }
.kpi.is-unresolved .kpi-label { color: var(--unresolved); }

/* --- sparkline / charts ----------------------------------------------------------------------- */
.spark path { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--accent); }
.spark .spark-step-dot { fill: var(--paper); stroke: var(--ink-2); stroke-width: 1.5; }
.chart { position: relative; width: 100%; }
.chart svg { overflow: visible; }
.chart text { font-size: 11px; font-weight: 500; fill: var(--ink-3); font-variant-numeric: tabular-nums lining-nums; }
.chart .grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart .baseline { stroke: var(--line-2); stroke-width: 1; shape-rendering: crispEdges; }
.chart .slot { cursor: pointer; }
.chart .slot .hit { fill: transparent; }
.chart .slot:hover .hit, .chart .slot:focus-visible .hit { fill: var(--paper-2); }
.chart .slot:focus-visible { outline: none; }
.chart .slot:focus-visible .hit { stroke: var(--focus); stroke-width: 2; }
.chart .slot .seg { transition: opacity var(--dur) var(--ease); }
.chart .slot:not(.is-current) .seg { opacity: .42; }
.chart .slot:hover .seg, .chart .slot:focus-visible .seg { opacity: 1; }
.chart .slot.is-current text.x { fill: var(--ink); font-weight: 600; }
.chart-note { margin-top: 12px; color: var(--ink-2); font-size: 12.5px; line-height: 18px; }
.key { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; white-space: nowrap; }
.key i { width: 10px; height: 10px; border-radius: var(--radius-xs); display: inline-block; }

.hbars { display: flex; flex-direction: column; gap: 4px; }
.hbar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 4px;
  padding: 6px 8px; margin: 0 -8px; border-radius: var(--radius-sm); color: inherit; text-decoration: none;
}
a.hbar:hover { background: var(--paper-2); text-decoration: none; }
.hbar-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.hbar-value { text-align: right; }
.hbar-track { grid-column: 1 / -1; height: 6px; border-radius: var(--radius-xs); background: transparent; }
.hbar-fill { height: 100%; border-radius: var(--radius-xs); background: color-mix(in srgb, var(--ink) 24%, transparent);
  transition: background-color var(--dur) var(--ease); }
.hbar:hover .hbar-fill { background: var(--ink); }
.hbars-more { color: var(--ink-3); font-size: 12.5px; padding-top: 4px; }

.timeline { display: flex; gap: 2px; align-items: center; height: 16px; }
.timeline .tl { flex: 1 1 0; max-width: 14px; height: 16px; display: grid; place-items: center; }
.timeline .tl i { display: block; }
.tl-paid i     { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.tl-marker i   { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ink-2); }
.tl-gap i      { width: 8px; height: 8px; border-radius: var(--radius-xs); background: var(--unresolved); }
.tl-nocover i  { width: 8px; height: 2px; background: var(--line-2); }
.tl-resolved i { width: 8px; height: 8px; border-radius: var(--radius-xs); border: 1.5px solid var(--ink-3); }
.tl-none i     { width: 2px; height: 2px; border-radius: 50%; background: var(--line); }
.timeline-legend { margin-top: 8px; color: var(--ink-3); font-size: 12.5px; line-height: 18px; }

/* --- tooltip ---------------------------------------------------------------------------------- */
.tooltip {
  position: fixed; z-index: 90; pointer-events: none; display: none; max-width: 280px;
  background: var(--paper-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: 12.5px; line-height: 18px; box-shadow: var(--shadow-pop);
}
.tooltip.is-open { display: block; }
.tooltip b { font-weight: 600; }
.tip-title { font-weight: 600; margin-bottom: 4px; }
.tip-row { display: flex; gap: 16px; justify-content: space-between; white-space: nowrap; }
.tip-row > span:first-child { color: var(--ink-2); }
.tip-row.is-sub > span { color: var(--ink-3); }
.tip-row.is-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }

/* --- chips / badge ---------------------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; max-width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent;
  color: var(--ink-2); font-size: 12.5px; line-height: 18px; white-space: nowrap; vertical-align: middle;
}
.chip > span { overflow: hidden; text-overflow: ellipsis; }
.chip.is-income     { background: var(--income-soft);     border-color: transparent; color: var(--income); }
.chip.is-invested   { background: var(--invested-soft);   border-color: transparent; color: var(--invested); }
.chip.is-transfer   { background: var(--transfer-soft);   border-color: transparent; color: var(--transfer); }
.chip.is-unresolved { background: var(--unresolved-soft); border-color: transparent; color: var(--unresolved); }
.chip.is-danger     { background: var(--danger-soft);     border-color: transparent; color: var(--danger); }
button.chip { cursor: pointer; transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
button.chip:hover { border-color: var(--line-2); }
button.chip[aria-pressed="true"] { background: var(--paper-2); border-color: var(--line-2); color: var(--ink); }
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--radius-pill); background: var(--unresolved-soft); color: var(--unresolved);
  font-size: 11px; line-height: 16px; font-weight: 600; font-variant-numeric: tabular-nums;
}

/* --- buttons / toggles ------------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink);
  font-size: 14px; font-weight: 500; line-height: 20px; white-space: nowrap; text-decoration: none;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { background: var(--paper-2); text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-danger { color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--paper-2); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none;
  border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--ink-2);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn[aria-pressed="true"] { color: var(--ink); border-color: var(--line-2); background: var(--paper-2); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn:disabled:hover { background: transparent; }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  position: relative; flex: none; width: 32px; height: 20px; border-radius: var(--radius-pill);
  background: var(--line-2); transition: background-color var(--dur) var(--ease);
}
.switch-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); transition: transform var(--dur) var(--ease);
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(12px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--focus); outline-offset: 2px; }

/* --- segmented control ------------------------------------------------------------------------ */
.segmented {
  display: inline-flex; height: 32px; padding: 2px; gap: 2px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper);
}
.segmented > button, .segmented > a {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border: 0; border-radius: var(--radius-xs);
  background: transparent; color: var(--ink-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.segmented > [aria-selected="true"], .segmented > [aria-checked="true"] {
  background: var(--paper-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
}
@media (max-width: 599.98px) {
  /* A row of options wider than the phone column scrolls instead of clipping; the right fade is
     a hint that there is more (categories-390, review-390) -- but only once `segmented()` has
     found the row actually overflows (`.is-overflowing`), or a fitting row (Settings' Theme) would
     look like its last option is disabled. */
  .segmented {
    max-width: 100%; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  }
  .segmented.is-overflowing {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent 100%);
  }
  .segmented::-webkit-scrollbar { display: none; }
}

/* --- form controls ---------------------------------------------------------------------------- */
.input, .select {
  height: 32px; padding: 0 10px; min-width: 0;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink);
  font-size: 14px; transition: border-color var(--dur) var(--ease);
}
.input:hover, .select:hover { border-color: var(--ink-3); }
.input::placeholder { color: var(--ink-3); }
.select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 28px;
  background-image: var(--select-chevron); background-repeat: no-repeat;
  background-position: right 10px center; background-size: 10px 6px;
}
.select::-ms-expand { display: none; }
textarea.input { height: auto; min-height: 72px; padding: 8px 10px; line-height: 22px; resize: vertical; }

/* --- month-range picker (rangepicker.js) ------------------------------------------------------- */
.monthpicker { position: relative; display: inline-flex; align-items: center; height: 32px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.monthpicker > .icon-btn { width: 30px; height: 30px; border-radius: var(--radius-xs); }
.mp-label {
  height: 30px; padding: 0 10px; min-width: 88px; border: 0; background: transparent; color: var(--ink);
  font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.mp-label:hover, .mp-label[aria-expanded="true"] { background: var(--paper-2); }
.monthpicker button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }

/* Popover: presets column left, year × month grid right. */
.rp-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; width: 712px; max-width: calc(100vw - 32px);
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow-pop);
}
.rp-presets { display: flex; flex-direction: column; gap: 2px; padding-right: 16px; border-right: 1px solid var(--line); }
.rp-preset {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px; border: 0;
  border-radius: var(--radius-sm); background: transparent; color: var(--ink); text-align: left; cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
.rp-preset:hover:not(:disabled) { background: var(--paper-2); }
.rp-preset[aria-pressed="true"] { background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.rp-preset[aria-pressed="true"] .rp-preset-name { font-weight: 600; }
.rp-preset:disabled { cursor: default; }
.rp-preset:disabled .rp-preset-name { color: var(--ink-3); }
.rp-preset-name { font-size: 14px; line-height: 20px; }
.rp-preset-range { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rp-preset:focus-visible, .rp-m:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* On an accent end cell the ring keeps a paper gap, or it reads as accent on accent. */
.rp-m.is-start:focus-visible, .rp-m.is-end:focus-visible { box-shadow: 0 0 0 2px var(--paper); }

.rp-cal { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rp-status { margin: 0; color: var(--ink-2); min-height: 18px; }
.rp-years { display: flex; flex-direction: column; gap: 4px; max-height: 296px; overflow-y: auto; padding: 4px; }
.rp-year { display: grid; grid-template-columns: 40px repeat(12, minmax(0, 1fr)); align-items: center; row-gap: 4px; }
.rp-yl { color: var(--ink-3); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.rp-m {
  position: relative; height: 40px; padding: 0; border: 1px solid transparent; border-radius: 0; background: transparent;
  color: var(--ink); font-size: 12.5px; cursor: pointer; transition: background-color var(--dur) var(--ease);
}
.rp-m:hover:not(:disabled) { border-color: var(--line-2); }
.rp-m:disabled { color: var(--ink-3); opacity: .45; cursor: default; }
/* The band: soft accent between the ends, solid accent at each end. */
.rp-m.is-in { background: var(--accent-soft); }
.rp-m.is-start { border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
.rp-m.is-end { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
.rp-m.is-start, .rp-m.is-end { background: var(--accent); color: var(--accent-ink); }
.rp-m.is-picking.is-in:not(.is-start):not(.is-end) { background: var(--accent-soft); }
/* Partial: a dashed underline plus a small hollow ring, never colour alone (legend below). */
.rp-m.is-partial > span { text-decoration: underline dashed; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.rp-legend { margin: auto 0 0; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.rp-key { display: inline-block; width: 18px; border-bottom: 1px dashed currentColor; height: 0; }

@media (max-width: 599.98px) {
  /* A fixed sheet under the header (top set in JS), presets as a two-column block above the grid. */
  .rp-pop {
    position: fixed; left: 16px; right: 16px; width: auto; max-width: none;
    max-height: calc(100vh - 200px); overflow: hidden; padding: 12px;
    display: flex; flex-direction: column;
  }
  /* One scroll region: presets, status and legend stay inside the sheet; only the years scroll. */
  .rp-presets { flex: 0 0 auto; }
  .rp-cal { flex: 1 1 auto; min-height: 0; }
  .rp-presets { display: grid; grid-template-columns: 1fr 1fr; padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rp-preset-name { font-size: 12.5px; line-height: 18px; }
  .rp-years { max-height: none; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .rp-year { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .rp-yl { grid-column: 1 / -1; }
}

/* --- table / card rows ------------------------------------------------------------------------ */
.table-wrap { overflow: auto; min-width: 0; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums lining-nums; }
.table th {
  position: sticky; top: 0; z-index: 1; height: 40px; padding: 0 12px; text-align: left;
  background: var(--paper); border-bottom: 1px solid var(--line);
  color: var(--ink-3); font-size: 11px; line-height: 16px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap;
}
.table td { height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background-color var(--dur) var(--ease); }
.table tbody tr:hover, .table tbody tr.is-active { background: var(--paper-2); }
.table tbody tr[tabindex] { cursor: pointer; }
.table .num, .table th.num { text-align: right; }
.cardrows { display: flex; flex-direction: column; }
/* One row rule for both patterns: a flush, inset separator drawn as a hairline on the row above
   (not a border-bottom or box-shadow bleeding past the card's padding). */
.cardrow, .linkrow {
  display: grid; align-items: center; gap: 12px; position: relative;
  padding: 8px; margin: 0 -8px; border-radius: var(--radius-sm); color: inherit; text-decoration: none;
  transition: background-color var(--dur) var(--ease);
}
.cardrow { grid-template-columns: minmax(0, 1fr) auto; min-height: 56px; }
.linkrow { grid-template-columns: 20px minmax(0, 1fr) auto 16px; min-height: 48px; color: var(--ink); }
.cardrow:hover, .linkrow:hover { text-decoration: none; background: var(--paper-2); }
.cardrow + .cardrow::before, .linkrow + .linkrow::before {
  content: ""; position: absolute; left: 8px; right: 8px; top: 0; border-top: 1px solid var(--line);
}
.cardrow-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cardrow-sub { grid-column: 1; min-width: 0; color: var(--ink-3); font-size: 12.5px; line-height: 18px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cardrow-end { grid-column: 2; grid-row: 1 / span 2; text-align: right; }

/* Link list (attention, "coming up"): icon · text · count · chevron. */
.linklist { display: flex; flex-direction: column; }
.linkrow > svg:first-child { color: var(--ink-3); }
.linkrow.is-unresolved > svg:first-child { color: var(--unresolved); }
.linkrow-text { min-width: 0; }
.linkrow-sub { display: block; color: var(--ink-3); font-size: 12.5px; line-height: 18px; }
.linkrow-count { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.linkrow > svg:last-child { color: var(--ink-3); }

/* --- drawer / sheet --------------------------------------------------------------------------- */
.backdrop {
  position: fixed; inset: 0; z-index: 60; background: var(--backdrop);
  opacity: 0; transition: opacity var(--dur-drawer) var(--ease);
}
.backdrop.is-open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: 480px; max-width: 100%;
  display: flex; flex-direction: column; background: var(--paper); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-pop); transform: translateX(100%); transition: transform var(--dur-drawer) var(--ease);
}
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }
.drawer-title { flex: 1; min-width: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 80vh; overflow-y: auto;
  background: var(--paper); border-top: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); box-shadow: var(--shadow-pop);
  transform: translateY(100%); transition: transform var(--dur-drawer) var(--ease);
}
.sheet.is-open { transform: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; height: 48px; }
@media (max-width: 599.98px) { .drawer { width: 100%; border-left: 0; } }

/* --- facts (definition list for drawers / fact sheets) ---------------------------------------- */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 16px; row-gap: 8px; }
.facts dt { color: var(--ink-3); font-size: 12.5px; line-height: 22px; }
.facts dd { min-width: 0; overflow-wrap: anywhere; }

/* --- states ----------------------------------------------------------------------------------- */
.skel {
  display: block; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--paper-2) 0%, var(--line) 50%, var(--paper-2) 100%);
  background-size: 200% 100%; animation: skel-shimmer 1.2s linear infinite;
}
.skel-line { height: 12px; margin: 6px 0; }
@keyframes skel-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.empty { color: var(--ink-2); }
.empty-action { margin-top: 8px; }
.error-state { color: var(--danger); font-size: 12.5px; line-height: 18px; }
.error-state .btn { margin-top: 8px; }
.partial-note {
  display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12.5px; line-height: 18px;
}
.partial-note svg { color: var(--unresolved); flex: none; }

/* --- inline confirm / saved ------------------------------------------------------------------- */
.confirm {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; margin: 8px 0;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--paper-2);
}
.confirm-msg { flex: 1 1 200px; min-width: 0; }
.confirm .input { flex: 1 1 220px; }
.flash { color: var(--ink-3); font-size: 12.5px; transition: opacity var(--dur) var(--ease); }
.flash.is-error { color: var(--danger); }
.flash.is-gone { opacity: 0; }

/* --- breadcrumb (nav.js crumbs()) -------------------------------------------------------------- */
/* Small ink-2 trail above a page's first card: one 24 px line, never wraps; a long label
   truncates. Separators are 16 px chevrons in ink-3. Focus = the global :focus-visible ring. */
.crumbs { margin-bottom: 12px; min-width: 0; }
.crumbs ol { display: flex; align-items: center; min-width: 0; font-size: 12.5px; line-height: 18px; white-space: nowrap; }
.crumbs li { display: flex; align-items: center; min-width: 0; height: 24px; }
.crumbs-sep { display: inline-flex; flex: none; margin: 0 4px; color: var(--ink-3); }
.crumbs-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
a.crumbs-link:hover { color: var(--ink); }
/* Quiet in-table link: ink at rest so a column of links does not out-shout the amounts. */
a.link-quiet { color: var(--ink); }
a.link-quiet:hover, a.link-quiet:focus-visible { color: var(--accent); text-decoration: underline; }

/* Link rows in the Categories detail card reuse the catbar look (categories.css) as anchors. */
a.catbar { cursor: pointer; text-decoration: none; transition: background-color var(--dur) var(--ease); }
a.catbar:hover { background: var(--paper-2); text-decoration: none; }
a.catbar:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
a.catbar:hover .catbar-fill { opacity: 1; }
