/* Hi-fi Variasi A — Saku Sederhana
   Aesthetic: editorial flat (radius 0), warm-rust primary, emerald accents,
   warm-tinted white surfaces, hairline borders. Inter + tabular numbers.
*/

:root {
  /* Light (from user palette) */
  --background: oklch(1 0 0);
  --surface: oklch(0.985 0.001 106.423);
  --surface-2: oklch(0.97 0.001 106.424);
  --foreground: oklch(0.147 0.004 49.25);
  --muted-foreground: oklch(0.553 0.013 58.071);
  --primary: oklch(0.555 0.163 48.998);
  --primary-foreground: oklch(0.987 0.022 95.277);
  --primary-soft: oklch(0.555 0.163 48.998 / 0.10);
  --primary-line: oklch(0.555 0.163 48.998 / 0.30);
  --border: oklch(0.923 0.003 48.717);
  --border-strong: oklch(0.84 0.005 48);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-soft: oklch(0.577 0.245 27.325 / 0.10);

  --c1: oklch(0.845 0.143 164.978);
  --c2: oklch(0.696 0.17 162.48);
  --c3: oklch(0.596 0.145 163.225);
  --c4: oklch(0.508 0.118 165.612);
  --c5: oklch(0.432 0.095 166.913);

  /* Semantic income/positive accent (was hardcoded oklch in JSX) */
  --accent-positive: var(--c4);
  --accent-positive-soft: oklch(0.845 0.143 164.978 / 0.25);

  /* FAB shadow tint — mirrors --primary so mood swatches recolor shadow too */
  --fab-shadow: 0 8px 20px oklch(var(--heat-l) var(--heat-c) var(--heat-h) / 0.35);
  --hero-stripe: oklch(var(--heat-l) var(--heat-c) var(--heat-h) / 0.04);

  --radius: 0;
  --hairline: 1px solid var(--border);
  --hairline-strong: 1px solid var(--border-strong);
  --shadow-sheet: 0 -40px 80px rgba(31,26,20,0.18);

  /* Heatmap base — oklch(var(--heat-l) var(--heat-c) var(--heat-h) / a) */
  --heat-l: 0.555;
  --heat-c: 0.163;
  --heat-h: 48.998;
}

.dark {
  --background: oklch(0.147 0.004 49.25);
  --surface: oklch(0.216 0.006 56.043);
  --surface-2: oklch(0.268 0.007 34.298);
  --foreground: oklch(0.985 0.001 106.423);
  --muted-foreground: oklch(0.709 0.01 56.259);
  --primary: oklch(0.473 0.137 46.201);
  --primary-foreground: oklch(0.987 0.022 95.277);
  --primary-soft: oklch(0.555 0.163 48.998 / 0.18);
  --primary-line: oklch(0.555 0.163 48.998 / 0.45);
  --border: oklch(1 0 0 / 0.10);
  --border-strong: oklch(1 0 0 / 0.18);
  --destructive: oklch(0.704 0.191 22.216);
  --destructive-soft: oklch(0.704 0.191 22.216 / 0.18);
}

html, body, #root {
  margin: 0; padding: 0; height: 100%;
  background: var(--surface);
  color: var(--foreground);
  font-family: "Inter", -apple-system, system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
}

/* Page stage centers the device frame (designer mode only) */
.stage {
  width: 100%; min-height: 100vh; display: flex; justify-content: center; align-items: center;
  padding: 28px 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, oklch(var(--heat-l) var(--heat-c) var(--heat-h) / 0.07), transparent 60%),
    var(--surface);
}
.dark .stage {
  background:
    radial-gradient(1200px 600px at 50% -10%, oklch(var(--heat-l) var(--heat-c) var(--heat-h) / 0.14), transparent 60%),
    oklch(0.10 0.005 50);
}
.dark body { background: oklch(0.10 0.005 50); }
.dark .hero-surface {
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, oklch(var(--heat-l) var(--heat-c) var(--heat-h) / 0.08) 14px 15px),
    var(--background);
}
.device-fit {
  --target-h: 874px;
  /* scale device down on short viewports so the whole phone fits */
  transform: scale(min(1, calc((100vh - 56px) / var(--target-h))));
  transform-origin: center top;
}

/* ─── Bare mode (no iOS chrome) — real browser usage ─── */
.stage.stage-bare {
  padding: 0;
  background: var(--background);
  align-items: stretch; justify-content: stretch;
  min-height: 100dvh;
}
.dark .stage.stage-bare { background: var(--background); }
.device-bare-wrap {
  width: 100%;
  /* On wide screens (desktop), constrain to phone-ish width and center */
  max-width: 480px;
  margin: 0 auto;
  height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--background);
  box-shadow: 0 0 0 1px var(--border);
}
@media (max-width: 480px) {
  .device-bare-wrap { box-shadow: none; max-width: none; }
}
.device-bare {
  width: 100%;
  height: 100dvh;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  background: var(--background);
}
.device-bare .app {
  height: 100dvh;
  min-height: 0;
}
/* Drop the fake-iOS top padding when no status bar is faked */
.device-bare .appbar {
  padding-top: calc(env(safe-area-inset-top, 0px) + 18px);
}
/* Tabbar hugs real viewport bottom, with safe-area for home indicator */
.device-bare .tabbar {
  bottom: 0;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.device-bare .fab {
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
.device-bare .toast {
  bottom: calc(86px + env(safe-area-inset-bottom, 0px));
}
.device-bare .sheet {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Scroll area: full viewport minus tabbar */
.device-bare .app .scroll {
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}

/* ─── App shell inside device ─── */
.app {
  width: 100%; height: 100%;
  background: var(--background);
  color: var(--foreground);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.app .scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none;
}
.app .scroll::-webkit-scrollbar { display: none; }

/* ─── Header (in-app) ─── */
.appbar {
  padding: 56px 20px 14px;
  display: flex; align-items: flex-end; justify-content: space-between;
  background: var(--background);
  border-bottom: var(--hairline);
}
.appbar h1 {
  margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
}
.appbar .sub { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); }

/* ─── Typography ─── */
.t-num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.t-mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: -0.02em; }
.t-eyebrow { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-foreground); font-weight: 500; }
.t-display { font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.t-h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.t-h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.t-h3 { font-size: 14px; font-weight: 600; }
.t-body { font-size: 14px; line-height: 1.4; }
.t-sm { font-size: 12px; }
.t-xs { font-size: 11px; }
.dim { color: var(--muted-foreground); }
.pos { color: var(--c3); }
.neg { color: var(--foreground); }
.danger { color: var(--destructive); }
.rust { color: var(--primary); }

/* ─── Cards ─── */
.card {
  background: var(--background);
  border: var(--hairline);
  padding: 16px;
}
.card.padless { padding: 0; }
.card.tinted { background: var(--surface); }
.card.primary { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.center { justify-content: center; align-items: center; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; }
.grow { flex: 1; }
.wrap { flex-wrap: wrap; }

/* ─── Chips / Pills ─── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  background: var(--background); border: var(--hairline);
  font-size: 12px; color: var(--foreground); cursor: pointer; user-select: none;
  white-space: nowrap;
}
.chip.sm { height: 22px; font-size: 11px; padding: 0 8px; }
.chip.on { background: var(--foreground); color: var(--background); border-color: var(--foreground); }
.chip.rust { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }
.chip.outline { background: transparent; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 16px;
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  background: var(--foreground); color: var(--background); border: 1px solid var(--foreground);
  cursor: pointer; user-select: none;
}
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.outline { background: transparent; color: var(--foreground); border-color: var(--foreground); }
.btn.ghost { background: transparent; color: var(--foreground); border-color: transparent; }
.btn.block { width: 100%; }
.btn.lg { height: 52px; font-size: 15px; }
.btn:active { transform: translateY(1px); }

/* ─── Inputs ─── */
.input {
  height: 44px; padding: 0 14px; width: 100%;
  background: var(--background); border: var(--hairline);
  font: inherit; font-size: 14px; color: var(--foreground);
  font-variant-numeric: tabular-nums;
}
.input:focus { outline: none; border-color: var(--primary); }
.input.amount {
  height: 64px; font-size: 36px; font-weight: 600; letter-spacing: -0.03em;
  text-align: right; border-color: var(--primary);
}

/* ─── Section header ─── */
.sec {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 10px;
}
.sec h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.sec .more { font-size: 12px; color: var(--muted-foreground); cursor: pointer; }
.sec .more:hover { color: var(--primary); }

/* ─── Tab bar (bottom) ─── */
.tabbar {
  position: absolute; bottom: 34px; left: 0; right: 0;
  height: 64px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--background); border-top: var(--hairline);
  z-index: 50;
}
.tabitem {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; font-size: 10px; color: var(--muted-foreground);
  cursor: pointer; padding-top: 6px;
  transition: color 0.12s;
}
.tabitem.active { color: var(--primary); }
.tabitem svg { display: block; }

/* FAB sits inside tab bar middle */
.fab {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 50px;
  width: 56px; height: 56px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; cursor: pointer;
  z-index: 60;
  box-shadow: var(--fab-shadow), 0 0 0 4px var(--background);
}
.fab svg { display: block; }
.fab:active { transform: translateX(-50%) translateY(1px); }

/* ─── Sheet (bottom modal) ─── */
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(31,26,20,0.32);
  z-index: 100;
  animation: fadein 0.18s ease both;
}
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--background);
  border-top: 1px solid var(--border-strong);
  z-index: 101;
  max-height: 86%;
  display: flex; flex-direction: column;
  animation: slideup 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
  box-shadow: var(--shadow-sheet);
}
.sheet .handle {
  width: 36px; height: 4px; background: var(--border-strong);
  margin: 10px auto 4px; border-radius: 0;
}
.sheet .head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 20px 14px;
  border-bottom: var(--hairline);
}
.sheet .body { padding: 18px 20px 22px; overflow-y: auto; flex: 1; }
.sheet .body::-webkit-scrollbar { display: none; }
.sheet .actions {
  padding: 14px 20px 28px;
  border-top: var(--hairline);
  display: flex; gap: 10px;
}

@keyframes slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadein  { from { opacity: 0; } to { opacity: 1; } }

/* ─── Lists / Rows ─── */
.list { display: flex; flex-direction: column; }
.tx {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border-bottom: var(--hairline);
  cursor: pointer; background: var(--background);
}
.tx:hover { background: var(--surface); }
.tx .icon {
  width: 36px; height: 36px;
  background: var(--surface-2);
  display: grid; place-items: center;
  color: var(--foreground);
  flex-shrink: 0;
}
.tx .icon.rust { background: var(--primary-soft); color: var(--primary); }
.tx .col { flex: 1; min-width: 0; }
.tx .title { font-size: 14px; font-weight: 500; }
.tx .meta { font-size: 11px; color: var(--muted-foreground); margin-top: 2px; }
.tx .amount { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.day-head {
  padding: 10px 20px 6px;
  background: var(--surface);
  border-bottom: var(--hairline);
  display: flex; justify-content: space-between; align-items: center;
}
.day-head .l { font-size: 12px; font-weight: 600; }
.day-head .r { font-size: 11px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }

/* ─── Progress ─── */
.progress {
  height: 8px; background: var(--surface-2);
  position: relative; overflow: hidden;
}
.progress > i {
  display: block; height: 100%; background: var(--primary);
  position: absolute; left: 0; top: 0;
}
.progress.thin { height: 4px; }
.progress.thick { height: 12px; }
.progress.danger > i { background: var(--destructive); }
.progress.pos > i { background: var(--c3); }

/* ─── Stat block ─── */
.stat {
  padding: 14px;
  background: var(--background);
  border: var(--hairline);
}
.stat .label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-foreground); }
.stat .value { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .delta { font-size: 11px; color: var(--muted-foreground); margin-top: 4px; }
.stat .delta.pos { color: var(--c3); }
.stat .delta.neg { color: var(--destructive); }

/* ─── Heatmap matrix ─── */
.matrix { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.matrix th, .matrix td {
  font-size: 11px; padding: 2px;
}
.matrix th { font-weight: 500; color: var(--muted-foreground); text-align: center; padding: 4px 2px 8px; }
.matrix th.kat { text-align: left; padding-left: 0; }
.matrix .cat {
  display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 0;
  font-size: 12px; font-weight: 500;
}
.matrix .cat .ic { width: 22px; height: 22px; background: var(--surface-2); display: grid; place-items: center; }
.matrix td .cell {
  display: grid; place-items: center;
  height: 30px;
  font-size: 11px; font-weight: 500;
  color: var(--foreground);
  border: 0;
}

/* Legend swatch */
.swatch { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--border); }

/* Page header rule with eyebrow */
.eyebrow-rule {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px 6px;
}
.eyebrow-rule .l { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-foreground); }
.eyebrow-rule .line { flex: 1; height: 1px; background: var(--border); }

/* ── TWEAKS · Mood (palette) ── */
.app[data-mood="hutan"] {
  --primary: oklch(0.55 0.13 165);
  --primary-soft: oklch(0.55 0.13 165 / 0.10);
  --primary-line: oklch(0.55 0.13 165 / 0.30);
  --heat-l: 0.55; --heat-c: 0.13; --heat-h: 165;
  --c1: oklch(0.86 0.10 60);
  --c2: oklch(0.72 0.13 50);
  --c3: oklch(0.62 0.14 40);
}
.app[data-mood="senja"] {
  --primary: oklch(0.52 0.18 285);
  --primary-soft: oklch(0.52 0.18 285 / 0.10);
  --primary-line: oklch(0.52 0.18 285 / 0.30);
  --heat-l: 0.52; --heat-c: 0.18; --heat-h: 285;
  --c1: oklch(0.86 0.10 350);
  --c2: oklch(0.70 0.15 12);
  --c3: oklch(0.58 0.16 18);
}
.app[data-mood="mono"] {
  --primary: oklch(0.25 0 0);
  --primary-soft: oklch(0.25 0 0 / 0.07);
  --primary-line: oklch(0.25 0 0 / 0.30);
  --heat-l: 0.25; --heat-c: 0; --heat-h: 0;
  --c1: oklch(0.88 0 0);
  --c2: oklch(0.68 0 0);
  --c3: oklch(0.40 0 0);
}

/* ── TWEAKS · Persona (density / radius / type rhythm) ── */
.app[data-persona="bankir"] { font-feature-settings: "tnum", "cv11", "ss01"; }
.app[data-persona="bankir"] .card { padding: 11px; }
.app[data-persona="bankir"] .t-display { font-size: 28px; letter-spacing: -0.025em; font-family: "JetBrains Mono", ui-monospace, monospace; }
.app[data-persona="bankir"] .appbar h1 { font-size: 18px; }
.app[data-persona="bankir"] .appbar { padding-top: 50px; padding-bottom: 10px; }
.app[data-persona="bankir"] .stat { padding: 10px; }
.app[data-persona="bankir"] .stat .value { font-size: 18px; font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: -0.04em; }
.app[data-persona="bankir"] .tx { padding: 9px 18px; }
.app[data-persona="bankir"] .tx .title { font-size: 13px; }
.app[data-persona="bankir"] .tx .icon { width: 30px; height: 30px; }
.app[data-persona="bankir"] .tx .amount { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: -0.04em; }
.app[data-persona="bankir"] .sec { padding: 14px 20px 8px; }
.app[data-persona="bankir"] .sec h2 { font-size: 13px; }
.app[data-persona="bankir"] .t-h1 { font-size: 19px; }
.app[data-persona="bankir"] .t-h2 { font-size: 15px; }
.app[data-persona="bankir"] .t-h3 { font-size: 13px; }
.app[data-persona="bankir"] .day-head { padding: 7px 20px 5px; }
.app[data-persona="bankir"] .day-head .l { font-size: 11px; }
.app[data-persona="bankir"] .matrix th,
.app[data-persona="bankir"] .matrix td { font-size: 10px; }
.app[data-persona="bankir"] .matrix td .cell { height: 26px; font-size: 10.5px; }
.app[data-persona="bankir"] .matrix .cat { font-size: 11px; }
.app[data-persona="bankir"] .btn { height: 36px; font-size: 13px; }
.app[data-persona="bankir"] .chip { height: 24px; font-size: 11px; padding: 0 8px; }
.app[data-persona="bankir"] .input.amount { font-size: 30px; height: 50px; }

.app[data-persona="tenang"] .card { padding: 22px; border-radius: 14px; }
.app[data-persona="tenang"] .stat { padding: 18px; border-radius: 14px; }
.app[data-persona="tenang"] .stat .value { font-size: 24px; font-weight: 500; }
.app[data-persona="tenang"] .t-display { font-size: 50px; font-weight: 500; letter-spacing: -0.035em; }
.app[data-persona="tenang"] .appbar { padding: 64px 24px 22px; }
.app[data-persona="tenang"] .appbar h1 { font-size: 26px; font-weight: 500; }
.app[data-persona="tenang"] .sec { padding: 28px 22px 12px; }
.app[data-persona="tenang"] .sec h2 { font-size: 16px; font-weight: 500; }
.app[data-persona="tenang"] .tx { padding: 18px 22px; }
.app[data-persona="tenang"] .tx .icon { width: 40px; height: 40px; border-radius: 12px; }
.app[data-persona="tenang"] .btn { height: 52px; border-radius: 14px; font-size: 15px; font-weight: 500; }
.app[data-persona="tenang"] .chip { height: 32px; border-radius: 999px; padding: 0 14px; font-size: 13px; }
.app[data-persona="tenang"] .progress { border-radius: 999px; }
.app[data-persona="tenang"] .progress > i { border-radius: 999px; }
.app[data-persona="tenang"] .day-head { padding: 14px 22px 8px; }
.app[data-persona="tenang"] .input { border-radius: 12px; height: 50px; }
.app[data-persona="tenang"] .input.amount { height: 70px; font-size: 44px; border-radius: 14px; }
.app[data-persona="tenang"] .sheet { border-top-left-radius: 24px; border-top-right-radius: 24px; }
.app[data-persona="tenang"] .fab { border-radius: 999px; }
.app[data-persona="tenang"] .avatar { border-radius: 999px; }
.app[data-persona="tenang"] .cat-tile { border-radius: 12px; padding: 16px 8px; }
.app[data-persona="tenang"] .cat-tile .ic { border-radius: 12px; width: 44px; height: 44px; }
.app[data-persona="tenang"] .insight { border-radius: 12px; border-left: none; border: 1px solid var(--primary-line); padding: 16px; }
.app[data-persona="tenang"] .matrix td .cell { height: 36px; font-size: 12px; }
.app[data-persona="tenang"] .iconbox,
.app[data-persona="tenang"] .icon { border-radius: 12px; }
.app[data-persona="tenang"] .tx .icon { border-radius: 12px; }

/* ── TWEAKS · Privasi (blur amounts; hover/tap to peek) ── */
.app.privacy .t-display,
.app.privacy .tx .amount,
.app.privacy .stat .value,
.app.privacy .day-head .r,
.app.privacy .detail-row .r,
.app.privacy svg text.donut-center {
  filter: blur(7px) saturate(0.65);
  transition: filter 0.18s ease;
  cursor: pointer;
  user-select: none;
}
.app.privacy .t-display:hover,
.app.privacy .t-display:active,
.app.privacy .tx:hover .amount,
.app.privacy .tx:active .amount,
.app.privacy .stat:hover .value,
.app.privacy .stat:active .value,
.app.privacy .day-head:hover .r,
.app.privacy .detail-row:hover .r,
.app.privacy svg:hover text.donut-center {
  filter: blur(0) saturate(1);
}
.app.privacy .toast,
.app.privacy .toast * { filter: none !important; }
.app.privacy::after {
  content: "● Mode privasi · tahan/hover untuk lihat";
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  font-size: 9.5px; letter-spacing: 0.06em; color: var(--muted-foreground);
  background: var(--background); padding: 3px 10px; border: var(--hairline);
  z-index: 30; pointer-events: none; white-space: nowrap;
}

/* Donut center */
.donut-center { text-anchor: middle; }

/* Category dot */
.dot { display: inline-block; width: 8px; height: 8px; border: 1px solid var(--foreground); }
.dot.fill { border: 0; }

/* Avatar */
.avatar {
  width: 28px; height: 28px;
  background: var(--surface-2); color: var(--foreground);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  border: var(--hairline);
}

/* Empty state */
.empty {
  padding: 40px 20px;
  text-align: center; color: var(--muted-foreground);
  font-size: 13px;
}

/* Subtle highlight */
.hi-rust { box-shadow: inset 3px 0 0 var(--primary); }

/* Detail rows */
.detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
  border-bottom: var(--hairline);
  font-size: 14px;
}
.detail-row .l { color: var(--muted-foreground); font-size: 12px; }
.detail-row .r { font-weight: 500; font-variant-numeric: tabular-nums; }

/* Splash badge for category */
.cat-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 12px 6px;
  border: var(--hairline); background: var(--background);
  cursor: pointer;
}
.cat-tile.on { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }
.cat-tile .ic { width: 36px; height: 36px; display: grid; place-items: center; }
.cat-tile .lbl { font-size: 11px; font-weight: 500; }

/* Tag chip with hash */
.tag {
  display: inline-flex; height: 22px; padding: 0 8px; align-items: center; gap: 4px;
  background: var(--surface-2); font-size: 11px; color: var(--muted-foreground);
}

/* Toast */
.toast {
  position: absolute; left: 20px; right: 20px; bottom: 120px;
  background: var(--foreground); color: var(--background);
  padding: 12px 14px; font-size: 13px;
  z-index: 200;
  display: flex; align-items: center; gap: 10px;
  animation: slideup 0.22s ease both;
}
.toast .check {
  width: 18px; height: 18px; background: var(--c2);
  display: grid; place-items: center; color: #fff;
  flex-shrink: 0;
}

/* Subtle pattern surface for hero */
.hero-surface {
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, var(--hero-stripe) 14px 15px),
    var(--background);
}

/* Insight note */
.insight {
  padding: 12px 14px;
  background: var(--primary-soft);
  border-left: 2px solid var(--primary);
  font-size: 12px; line-height: 1.45;
  color: var(--foreground);
}
.insight b { color: var(--primary); }
