/* Home (Overview) per theme, following mockups/production/<Theme>.dc.html and
   <Theme>Phone.dc.html. Tokens only (css/tokens.css). Prefixes: .hl Ledger, .hg Graphite,
   .he Evergreen; shared pieces (.card, .axis-chart, .tx, …) are scoped to .home. */

.only-phone {
  display: none;
}
@media (max-width: 1023px) {
  .only-desk {
    display: none !important;
  }
  .only-phone {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
}

.home {
  font-variant-numeric: tabular-nums;
}
.home h1,
.home h2 {
  margin: 0;
}
.home a {
  color: var(--link);
  text-decoration: none;
}
.home a:hover {
  color: var(--link-hover);
}
.home svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home .grow {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.home .strong {
  font-weight: 600;
}
.home small {
  font-size: 12px;
  color: var(--text-muted);
}
.home .dim,
.home .muted {
  color: var(--text-muted);
}
.home .note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.home .label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.home .in-text {
  color: var(--in);
}
.home .good {
  color: var(--ok);
}
.home .bad {
  color: var(--danger);
}
.home .warn {
  color: var(--warn);
}
.home .clip {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home .between {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.home .empty {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
}
.home .empty.pad {
  padding: 16px 20px;
}
.home .num {
  text-align: right;
  font-family: var(--font-num);
}
.home .mono {
  font-family: var(--font-num);
}

/* cards */
.home .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.home .card.pad {
  padding: 18px 20px;
  gap: 12px;
}
.home .card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.home .card-head > :first-child {
  margin-right: auto;
}
.home .card-head.bar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.home .card-head h2 {
  font-size: 15px;
  font-weight: 600;
}
.home .card-head a {
  font-size: 13px;
  font-weight: 500;
}
.home .key {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.home .key i {
  display: inline-block;
}
.home .key .line {
  width: 14px;
  border-top: 2px solid var(--chart-accent);
}
.home .key .line.dashed {
  border-top: 2px dashed var(--chart-compare);
}
.home .key .line.warn {
  border-top: 1px dashed var(--warn);
}
.home .key .line.muted {
  border-top-color: var(--text-muted);
}
.home .key .sq {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--chart-accent);
}
.home .key .sq.in {
  background: var(--chart-in);
}
.home .key .sq.out {
  background: var(--chart-out);
}
.home .col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}
.home .dot-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.home .dot-label i,
.home .cat-row i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
}
.home .cat-row i.round {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

/* axis charts drawn with CSS/SVG (no canvas): y ticks | plot, then x ticks */
.home .axis-chart {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
}
.home .y-ticks {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 220px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  font-family: var(--font-num);
}
.home .plot {
  position: relative;
  height: 220px;
  border-left: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border);
}
.home .gridlines {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.home .gridlines span {
  border-top: 1px solid var(--chart-grid);
}
.home .gridlines span:last-child {
  border: 0;
}
.home .plot svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.home polyline,
.home polygon {
  vector-effect: non-scaling-stroke;
}
.home polyline.prev {
  fill: none;
  stroke: var(--chart-compare);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}
.home polyline.cur {
  fill: none;
  stroke: var(--chart-accent);
  stroke-width: 2.25;
  stroke-linejoin: round;
}
.home polygon.area {
  fill: var(--chart-accent);
  fill-opacity: 0.08;
  stroke: none;
}
.home .x-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-num);
}

/* ================================================================== Ledger */
.hl-desk,
.hg-desk,
.he-desk {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hl-head,
.he-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.hl-head .eyebrow {
  font-size: 12px;
  color: var(--text-muted);
}
.hl-head h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hl-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  width: 260px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--text-muted);
  box-sizing: border-box;
}
.hl-search input {
  border: 0;
  outline: 0;
  flex: 1;
  min-width: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.hl-search kbd {
  font: inherit;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 5px;
}
.home .hl-btn {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  white-space: nowrap;
}
.home .hl-btn svg {
  color: var(--text-muted);
}
.hl-kpis,
.hg-kpis {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.hl-kpis > div,
.hg-kpis > div {
  padding: 18px 20px;
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hl-kpis > div:last-child,
.hg-kpis > div:last-child {
  border-right: 0;
}
.hl-kpis .big {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hl-grid,
.hg-grid,
.he-grid,
.home-more {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}
.home .span-2 {
  grid-column: span 2;
}
.home .span-3 {
  grid-column: span 3;
}
@media (max-width: 1280px) and (min-width: 1024px) {
  .hl-grid,
  .hg-grid,
  .he-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hl-grid .span-2,
  .hg-grid .span-2,
  .he-grid .span-2 {
    grid-column: auto;
  }
}
.hl .tip {
  position: absolute;
  top: 20px;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--surface);
  font-size: 12px;
  border-radius: 6px;
  padding: 6px 9px;
  white-space: nowrap;
  line-height: 1.35;
}
.hl .tip .dim {
  color: var(--border-strong);
}
.home .strip {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  gap: 2px;
  background: var(--surface-sunken);
}
.home .cat-list {
  display: flex;
  flex-direction: column;
}
.home .cat-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto 64px;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--chart-grid);
  color: var(--text);
}
.home a.cat-row:hover {
  color: var(--text);
  background: var(--hover);
}
.home .cat-row .name {
  font-weight: 500;
}
.home .cat-row .amt {
  font-weight: 500;
  font-family: var(--font-num);
}
.home .cat-row .share {
  text-align: right;
  color: var(--text-muted);
  font-size: 13px;
}
.home .tx-scroll {
  overflow-x: auto;
}
.home table.tx {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  table-layout: fixed;
}
.home .tx th {
  text-align: left;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  padding: 9px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-soft);
}
.home .tx th:nth-child(1) {
  width: 76px;
}
.home .tx th:nth-child(2) {
  width: 32%;
}
.home .tx th:nth-child(5),
.home .tx th:nth-child(6) {
  width: 120px;
}
.home .tx th.num {
  text-align: right;
}
.home .tx td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--chart-grid);
  vertical-align: middle;
}
.home .tx th:first-child,
.home .tx td:first-child {
  padding-left: 20px;
}
.home .tx th:last-child,
.home .tx td:last-child {
  padding-right: 20px;
}
.home .tx tr.clickable {
  cursor: pointer;
}
.home .tx tr.clickable:hover {
  background: var(--hover);
}
.home .tx td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home .tx td.payee a,
.home .tx td.payee small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home .tx td a {
  color: var(--text);
  font-weight: 500;
}
.home .tx .dot-label span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.home .acct {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}
.home .mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface-sunken);
  color: var(--neutral-fg);
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.hl-review {
  flex-direction: row !important;
  align-items: center;
  gap: 14px !important;
  color: var(--text) !important;
}
.hl-review .ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--danger-bg);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.home .cat-nudge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-card);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 13px;
  font-weight: 500;
}
.home .nudge-btn,
.home .hg-btn.primary {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-ctl);
  background: var(--accent);
  color: var(--accent-on);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* phone pieces (all themes) */
.home .ph-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.home .ph-head h1 {
  font-size: 22px;
  font-weight: 700;
  margin-right: auto;
}
.home .icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: 50%;
}
.home .hero-num {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.home .spark {
  width: 100%;
  height: 80px;
  margin: 8px 0;
}
.home .pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
}
.home .pair > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home .pair > div + div {
  border-left: 1px solid var(--border-soft);
  padding-left: 14px;
}
.home .pair b {
  font-size: 18px;
}
.home .ph-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
  padding: 4px 0;
}
.home .track {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-sunken);
  display: flex;
  overflow: hidden;
}
.home .track > span {
  border-radius: 4px;
}
.home .ph-tx {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border-soft);
  color: var(--text);
}
.home .ph-tx .end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-num);
}

/* ================================================================ Graphite */
.hg-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hg-head h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-right: auto;
}
.hg-head h1 .dim {
  font-weight: 400;
}
.hg .seg {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  padding: 2px;
}
.hg .seg a {
  height: 28px;
  padding: 0 12px;
  border-radius: 4px;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
}
.hg .seg a[aria-current] {
  background: var(--border);
  color: var(--text);
}
.home .hg-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  color: var(--neutral-fg);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}
.hg-desk {
  gap: 18px;
}
.hg-grid {
  gap: 18px;
}
.hg .card {
  background: var(--surface);
}
.hg .card-head h2 {
  font-size: 14px;
}
.hg .card-head.bar {
  padding: 14px 18px;
}
.hg-kpis > div {
  padding: 16px 18px;
  border-right-color: var(--border);
}
.hg-kpis .label {
  font-size: 12px;
}
.hg-kpis .big {
  font-family: var(--font-num);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.hg .y-ticks,
.hg .plot {
  height: 200px;
}
.hg .plot {
  border-left: 0;
  border-bottom-color: var(--border-strong);
}
.hg .avg {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--warn);
  z-index: 1;
}
.hg .bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 0 2px;
}
.hg .bars span {
  flex: 1;
  background: var(--chart-accent);
  border-radius: 2px 2px 0 0;
}
.hg .bars span.future {
  background: var(--border-soft);
}
.hg-cat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 70px 64px;
  gap: 10px;
  align-items: center;
  padding: 8px 18px;
  border-top: 1px solid var(--border-soft);
  color: var(--text) !important;
}
.hg-cat:hover {
  background: var(--hover);
}
.hg-cat .track {
  height: 4px;
  background: var(--border-soft);
}
.hg-cat .delta {
  font-family: var(--font-num);
  font-size: 12px;
  text-align: right;
}
.hg-cat .delta.bad {
  color: var(--warn);
}
.hg .tx th {
  background: transparent;
  color: var(--nav-muted);
}
.hg .tx td {
  padding: 9px 12px;
  border-bottom-color: var(--border-soft);
}
.hg .tx td.mono {
  font-size: 12px;
}
.hg-q {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-top: 1px solid var(--border-soft);
  color: var(--text) !important;
}
.hg-q:first-of-type {
  border-top: 0;
}
.hg .badge {
  font-family: var(--font-num);
  font-size: 11px;
  color: var(--warn);
  background: var(--warn-bg);
  border-radius: 4px;
  padding: 1px 6px;
}
.hg .hg-btn.sm {
  height: 28px;
}
.hg-phone .card.pair {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.hg-phone .plot.short {
  height: 90px;
  border-left: 0;
}
.hg .chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hg .chips a {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  color: var(--neutral-fg);
  display: flex;
  align-items: center;
}
.hg .chips a.on {
  background: var(--border);
  color: var(--text);
}
.hg .chips a.warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn-bg);
}
.hg-day .day-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}
.hg-phone .ph-tx .stripe {
  width: 4px;
  align-self: stretch;
  border-radius: 2px;
}

/* =============================================================== Evergreen */
.he-desk,
.he-grid {
  gap: 22px 20px;
}
.he-head .eyebrow {
  font-size: 13px;
  color: var(--text-muted);
}
.he-head h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.home .he-btn {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.home .he-btn.icon {
  width: 38px;
  padding: 0;
  justify-content: center;
}
.home .he-btn.dark {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
  font-weight: 600;
}
.he .card {
  border-color: var(--border);
}
.he .card.pad {
  padding: 22px;
  gap: 16px;
}
.he-hero {
  padding: 24px;
  gap: 18px;
}
.he-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-end;
}
.he-totals > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.he-totals .label {
  font-size: 13px;
  font-weight: 400;
}
.he-totals .grow .label {
  font-size: 14px;
  font-weight: 500;
}
.home .giant {
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.he-totals .mid {
  font-size: 22px;
  font-weight: 600;
}
.he .kept {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.he .kept .track {
  height: 12px;
  border-radius: 6px;
}
.he .kept .track span {
  background: var(--text);
  border-radius: 0;
}
.he .kept .note {
  font-size: 13px;
}
.he-months {
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.he-months .key .sq.out {
  background: var(--chart-out);
}
.he .y-ticks,
.he .plot {
  height: 170px;
}
.he .plot {
  border-left: 0;
  border-bottom-color: var(--border-strong);
}
.he .cols {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  padding: 0 8px;
}
.he .plot.cols {
  align-items: end;
}
.he .x-ticks.cols span {
  text-align: center;
  font-size: 12px;
  font-family: var(--font);
}
.he .pair-bars {
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}
.he .pair-bars span {
  width: 22px;
  border-radius: 3px 3px 0 0;
}
.he .pair-bars .in {
  background: var(--chart-in);
}
.he .pair-bars .out {
  background: var(--chart-out);
}
.he .pair-bars .out.now {
  background: var(--accent);
}
.he .donut {
  width: 176px;
  height: 176px;
  border-radius: 50%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.he .donut > span {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.he .donut b {
  font-size: 18px;
  font-weight: 600;
}
.he .cat-row {
  grid-template-columns: 12px minmax(0, 1fr) auto 58px;
  padding: 6px 0;
  border-bottom: 0;
}
.he .cat-row .name {
  font-weight: 400;
}
.he .cat-row .amt {
  font-weight: 600;
}
.he .tx td {
  padding: 11px 12px;
  border-bottom-color: var(--border-soft);
}
.he .payee-mark {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.he .mark,
.home .mark.round {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-weight: 700;
  color: var(--text);
}
.home .mark.c-peach {
  background: var(--peach-bg);
}
.home .mark.c-sky {
  background: var(--sky-bg);
}
.home .mark.c-lemon {
  background: var(--lemon-bg);
}
.home .mark.c-lilac {
  background: var(--lilac-bg);
}
.home .mark.c-mint {
  background: var(--mint-bg);
}
.home .mark.c-neutral {
  background: var(--neutral-bg);
}
.he-brand {
  background: var(--nav-bg) !important;
  border-color: var(--nav-bg) !important;
  color: var(--nav-fg-active);
  padding: 22px;
  gap: 14px;
}
.he-brand .label {
  color: var(--nav-fg);
  font-weight: 400;
}
.he-brand .big {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.he-brand .list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--nav-bg-active);
  padding-top: 12px;
}
.he-brand .list span {
  color: var(--nav-fg);
}
.home .he-brand a {
  color: var(--nav-fg-active);
}
.he-review {
  flex-direction: row !important;
  align-items: center;
  gap: 14px !important;
}
.he-review .count {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--warn-bg);
  color: var(--warn);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.he-review small {
  font-size: 13px;
}

/* Evergreen phone: brand band on top, light sheet below */
.he-phone {
  margin: -16px -16px 0;
  gap: 0 !important;
}
.he-top {
  background: var(--nav-bg);
  color: var(--nav-fg-active);
  padding: 16px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.he-top .who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.he-top .who .mark {
  background: var(--accent-soft);
  color: var(--accent-soft-fg);
  width: 36px;
  height: 36px;
}
.he-top small,
.he-top .label {
  color: var(--nav-fg);
}
.home .he-top .icon-btn {
  color: var(--nav-fg-active);
  background: var(--nav-bg-active);
}
.he-top .giant {
  font-size: 32px;
}
.he-top .pair {
  border: 0;
  gap: 10px;
  padding-top: 8px;
}
.he-top .pair > div {
  background: var(--nav-bg-active);
  border-radius: 12px;
  padding: 10px 12px !important;
  border: 0 !important;
}
.he-sheet {
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  margin-top: -24px;
  padding: 18px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.he .actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  text-align: center;
}
.he .actions a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}
.he .actions a > span {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.he .actions a.dark > span {
  background: var(--nav-bg);
  color: var(--nav-fg-active);
  border-color: var(--nav-bg);
}
.he .cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  column-gap: 14px;
}
.he .cat-grid .cat-row {
  grid-template-columns: 12px minmax(0, 1fr) auto;
}

/* ======================================================= more charts + drop */
.home-more {
  margin-top: var(--gap);
}
.home-more .rec-total {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.home-more .rec-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.home-more .rec-row b {
  font-family: var(--font-num);
  white-space: nowrap;
}
.home-drop {
  grid-column: span 3;
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-style: dashed !important;
  color: var(--text-muted);
  cursor: pointer;
}
.home-drop.over {
  border-color: var(--accent) !important;
  background: var(--accent-soft);
}
@media (max-width: 1023px) {
  .home-more {
    grid-template-columns: minmax(0, 1fr);
  }
  .home .span-2,
  .home .span-3,
  .home-drop {
    grid-column: auto;
  }
}

.he .payee-mark a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
