/* ============================================================================
   ONE STOP — "BAHI-KHATA" THEME
   the traditional Indian merchant's ledger: red cloth binding (sidebar),
   warm paper pages, ink entries, vermillion debits, green credits,
   rubber-stamp chips, double-ruled headings.
   ========================================================================== */
:root {
  /* paper — page slightly deeper, panels brighter, for more lift */
  --paper: #efe6d1;
  --paper-2: #e7dcc2;
  --panel: #fcf8ee;
  --panel-2: #f5eedd;

  /* ink */
  --ink: #2a2118;
  --ink-2: #4a3f31;
  --muted: #7a6d5a;
  --faint: #a2937c;

  /* cloth binding */
  --cloth: #5e211b;
  --cloth-2: #491913;
  --cream: #f3e7cd;
  --foil: #d9b36a;

  /* ledger colours */
  --red: #b23a2a;          /* vermillion — debits, dues */
  --red-deep: #8c2b1f;
  --red-soft: rgba(178, 58, 42, .09);
  --green: #23714d;        /* banyan green — credits, paid */
  --green-soft: rgba(35, 113, 77, .1);
  --gold: #9a7112;         /* gold loans */
  --gold-soft: rgba(154, 113, 18, .1);
  --sky: #3a6289;          /* investments */

  /* legacy aliases (inline styles in JS use these) */
  --jade: #23714d; --jade-deep: #1a5c3e; --jade-soft: rgba(35,113,77,.1);
  --amber: #a86412; --coral: #b23a2a;
  --text: #2a2118; --line: #d9cdb2; --line-2: #c4b394;
  --bg-2: #ece3cd; --card: #faf5e9; --card-2: #f4eddb;

  --radius: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 2px 0 rgba(90,70,40,.06), 0 14px 30px -18px rgba(90,70,40,.35);
  --shadow-lift: 0 2px 0 rgba(90,70,40,.08), 0 20px 40px -20px rgba(90,70,40,.45);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 500px at 90% -10%, rgba(178,58,42,.05), transparent 55%),
    radial-gradient(800px 600px at -5% 8%, rgba(154,113,18,.06), transparent 55%),
    var(--paper);
}
/* paper grain */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view.active { animation: none !important; } }

/* ---------- app shell ---------- */
.app { display: flex; min-height: 100vh; position: relative; z-index: 2; }
.side {
  width: 252px; flex: 0 0 252px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 24px 16px 18px;
  /* woven cloth: crosshatch over the oxblood */
  background:
    repeating-linear-gradient(45deg, rgba(255,235,200,.025) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,.06) 0 2px, transparent 2px 5px),
    linear-gradient(175deg, var(--cloth), var(--cloth-2));
  box-shadow: 6px 0 24px -14px rgba(60,20,10,.55);
}
/* stitched edge on the cloth */
.side::after { content: ''; position: absolute; top: 10px; bottom: 10px; right: 7px; width: 0;
  border-right: 2px dashed rgba(243,231,205,.28); }
.brand { display: flex; gap: 12px; align-items: center; padding: 2px 10px 24px; }
.brand-ic { width: 38px; height: 38px; border-radius: 9px;
  background: linear-gradient(155deg, #ecd096, #cda657 55%, #a98134);   /* gold foil */
  color: var(--cloth-2); font-weight: 800; display: grid; place-items: center; font-size: 18px;
  font-family: var(--mono); box-shadow: 0 2px 0 rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.5); }
.brand b { font-size: 16px; letter-spacing: -.01em; color: var(--cream); font-family: var(--serif); font-weight: 600; }
.brand small { display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: .24em; color: var(--foil); margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-it { display: flex; align-items: center; gap: 11px; background: none; border: none; color: rgba(243,231,205,.72);
  font-family: var(--sans); font-size: 14px; font-weight: 600; padding: 11px 12px; border-radius: 8px;
  cursor: pointer; text-align: left; transition: color .15s, background .15s; }
.nav-it::before { content: ''; width: 6px; height: 6px; border-radius: 1px; background: rgba(243,231,205,.25);
  flex: 0 0 auto; transition: background .15s; transform: rotate(45deg); }
.nav-it:hover { color: var(--cream); }
.nav-it.on { background: rgba(0,0,0,.24); color: var(--cream);
  box-shadow: inset 3px 0 0 var(--foil), inset 0 1px 0 rgba(255,255,255,.08); }
.nav-it.on::before { background: var(--foil); box-shadow: 0 0 8px rgba(217,179,106,.6); }
.nav-it .badge { margin-left: auto; font-family: var(--mono); font-size: 10.5px; font-style: normal; color: var(--cream);
  background: rgba(0,0,0,.25); border: 1px solid rgba(243,231,205,.25); border-radius: 999px; padding: 2px 8px; }
.nav-it .badge:empty { display: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side-guide { font-family: var(--mono); font-size: 12px; color: rgba(243,231,205,.75); text-decoration: none;
  padding: 9px 12px; border: 1px solid rgba(243,231,205,.3); border-radius: 8px; transition: .15s; }
.side-guide:hover { color: var(--cream); border-color: rgba(243,231,205,.6); }
.me { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.22); border: 1px solid rgba(243,231,205,.2);
  border-radius: 10px; padding: 10px 12px; }
.me .av { width: 32px; height: 32px; border-radius: 50%; background: var(--cream); color: var(--cloth);
  display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.me b { font-size: 13.5px; display: block; color: var(--cream); }
.me small { font-size: 10.5px; color: rgba(243,231,205,.6); font-family: var(--mono); }

.main { flex: 1; min-width: 0; max-width: 1060px; padding: 24px 36px 90px 46px; position: relative; }
/* the red margin-rule of ledger paper */
.main::before { content: ''; position: absolute; top: 0; bottom: 0; left: 26px; width: 1px;
  background: rgba(178,58,42,.22); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.asof { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono);
  font-size: 12px; color: var(--muted); background: var(--panel); border: 1px solid var(--line-2);
  padding: 7px 14px; border-radius: 999px; box-shadow: var(--shadow); }
.asof b { color: var(--ink); font-weight: 700; }
.ghost { background: none; border: 1px solid var(--line-2); color: var(--muted); padding: 7px 14px;
  border-radius: 999px; cursor: pointer; font-family: var(--mono); font-size: 11.5px; transition: .15s; }
.ghost:hover { color: var(--ink); border-color: var(--ink-2); }
.view { display: none; counter-reset: sec; }
.view.active { display: block; animation: rise .4s cubic-bezier(.2,.7,.2,1) both; }
.section { margin-top: 46px; }
.section.first { margin-top: 22px; }

/* ---------- section heads: double-ruled like a ledger ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 18px; padding-bottom: 10px; border-bottom: 3px double var(--red-deep); }
.section-head h2 { font-family: var(--serif); font-weight: 600; font-size: 27px; letter-spacing: -.01em; color: var(--ink); }
.section-head h2::before {
  counter-increment: sec; content: counter(sec, decimal-leading-zero);
  font-family: var(--mono); font-size: .42em; font-weight: 700; color: var(--red);
  vertical-align: super; margin-right: .7em; letter-spacing: 0;
}
.section-head .hint { font-size: 12.5px; color: var(--faint); text-align: right; }

/* ---------- welcome (empty state) ---------- */
.welcome { text-align: center; background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 54px 30px; margin-top: 14px;
  box-shadow: var(--shadow), 0 0 0 4px var(--panel), 0 0 0 5px var(--line-2); }
.welcome .w-mark { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 16px;
  background: linear-gradient(155deg, #ecd096, #cda657 55%, #a98134); color: var(--cloth-2);
  font-family: var(--mono); font-weight: 800; font-size: 30px; display: grid; place-items: center;
  box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.welcome h2 { font-family: var(--serif); font-weight: 600; font-size: 30px; margin-bottom: 10px; }
.welcome p { color: var(--muted); font-size: 14.5px; max-width: 460px; margin: 0 auto 24px; line-height: 1.65; }
.welcome .w-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- hero stats: sliding cards (banking-app style) ---------- */
.hero-wrap { position: relative; margin-top: 16px; }
.hero { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 2px 12px; scrollbar-width: none; }
.hero::-webkit-scrollbar { display: none; }
.stat {
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 22px 22px 20px; box-shadow: var(--shadow); position: relative;
  transition: transform .2s, box-shadow .2s;
  flex: 0 0 300px; scroll-snap-align: start;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.stat.big { flex: 0 0 400px; }
.hscroll { position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--ink); cursor: pointer; font-size: 20px; line-height: 1;
  box-shadow: var(--shadow-lift); display: grid; place-items: center; font-family: var(--serif); }
.hscroll:hover { color: var(--red); }
.hscroll.left { left: -16px; } .hscroll.right { right: -16px; }
.stat .label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat .value { font-family: var(--mono); font-size: clamp(22px, 3.2vw, 30px); font-weight: 700;
  letter-spacing: -.01em; margin-top: 12px; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat.big .value { font-family: var(--serif); font-weight: 600; font-size: clamp(36px, 5vw, 52px); letter-spacing: -.02em; }
.stat .value .rupee { color: var(--faint); font-weight: 500; margin-right: 3px; }
.stat .sub { font-size: 12.5px; color: var(--muted); margin-top: 9px; line-height: 1.5; }
.stat.accent { border-color: rgba(35,113,77,.45); border-top: 3px solid var(--green); }
.stat.accent .value { color: var(--green); }
.stat.warn { border-top: 3px solid var(--red); border-color: rgba(178,58,42,.4); }
.stat.warn .value { color: var(--red); }
.drop { color: var(--green); font-weight: 700; }

.bar { height: 7px; border-radius: 999px; background: var(--paper-2); overflow: hidden; margin-top: 15px;
  border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--jade-deep), var(--green)); transition: width .8s cubic-bezier(.2,.7,.2,1); }

/* ---------- net worth: certificate frame ---------- */
.nw {
  margin-top: 16px; display: grid; grid-template-columns: minmax(240px, 1fr) 1.5fr; gap: 30px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 26px 30px; box-shadow: var(--shadow), 0 0 0 4px var(--panel), 0 0 0 5px var(--line-2);
  outline: none; margin-left: 5px; margin-right: 5px; position: relative;
}
.nw::before, .nw::after { content: '✦'; position: absolute; color: #c9a24f; font-size: 12px; }
.nw::before { top: 9px; left: 13px; }
.nw::after { bottom: 9px; right: 13px; }
.nw-k { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 600; }
.nw-v { font-family: var(--serif); font-size: clamp(42px, 6.2vw, 64px); font-weight: 600; letter-spacing: -.025em; margin: 8px 0 6px; font-variant-numeric: tabular-nums; line-height: 1; }
.nw-v.pos { color: var(--green); } .nw-v.neg { color: var(--red); }
.nw-v .rupee { color: var(--faint); font-weight: 400; font-size: .5em; }
.nw-sub { font-size: 13px; color: var(--muted); line-height: 1.5; }
.nw-bars { align-self: center; }
.nw-row { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; margin-bottom: 12px; }
.nw-lab { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nwbar { height: 12px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; }
.nwbar > i { display: block; height: 100%; border-radius: 999px; transition: width .8s cubic-bezier(.2,.7,.2,1); }
.nwbar > i.a { background: linear-gradient(90deg, var(--jade-deep), var(--green)); }
.nwbar > i.l { background: linear-gradient(90deg, var(--red-deep), var(--red)); }
.nw-row b { font-family: var(--mono); font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nw-break { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 14px; }
.nw-note { display: block; color: var(--gold); margin-top: 6px; font-size: 11.5px; font-weight: 600; }

/* ---------- alert band ---------- */
.alerts-band { margin-top: 16px; background: var(--panel);
  border: 1px solid rgba(154,113,18,.4); border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.alerts-title { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px; }
.alert-row { display: flex; gap: 13px; align-items: flex-start; padding: 9px 0; border-top: 1px dashed var(--line); }
.alert-row:first-of-type { border-top: none; }
.alert-ic { font-size: 17px; line-height: 1.3; flex-shrink: 0; }
.alert-txt { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.alert-txt b { font-weight: 700; color: var(--ink); }
.alert-free { color: var(--green); font-weight: 700; }

/* ---------- ledger row panels (month / calendar / upcoming) ---------- */
.month, .cal, .upcoming { background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.mrow { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; align-items: center;
  gap: 12px; padding: 15px 20px; border-top: 1px solid var(--line); }
.mrow:first-child { border-top: none; }
.mrow:hover { background: rgba(90,70,40,.03); }
.mrow .nm { font-weight: 700; font-size: 15px; }
.mrow .nm small { display: block; color: var(--faint); font-weight: 500; font-size: 11.5px; margin-top: 2px; font-family: var(--mono); }
.mrow .amt { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; color: var(--red-deep); }
.mrow .due { color: var(--muted); font-size: 13px; }
.mrow.total { background: var(--paper-2); border-top: 2px solid var(--line-2); }
.mrow.total .nm { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-family: var(--mono); }
.mrow.total .amt { font-size: 17px; }

/* rubber-stamp chips */
.chip { font-size: 10.5px; font-weight: 800; padding: 5px 11px; border-radius: 6px; white-space: nowrap;
  font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; border: 1.5px solid currentColor;
  background: transparent; }
.chip.paid { color: var(--green); transform: rotate(-2deg); background: var(--green-soft); }
.chip.up { color: var(--red); background: var(--red-soft); }
.chip.done { color: var(--faint); transform: rotate(-2deg); }

/* ---------- payment calendar ---------- */
.cal-row { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 16px;
  padding: 13px 20px; border-top: 1px solid var(--line); }
.cal-row:first-child { border-top: none; }
.cal-row:hover { background: rgba(90,70,40,.03); }
.cal-day { text-align: center; background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 4px; }
.cal-day b { font-family: var(--mono); font-size: 15px; font-weight: 800; display: block; color: var(--red-deep); }
.cal-day small { font-size: 8.5px; color: var(--faint); letter-spacing: .04em; font-family: var(--mono); }
.cal-nm { font-weight: 700; font-size: 14.5px; }
.cal-info small { display: block; color: var(--faint); font-size: 11.5px; margin-top: 2px; }
.cal-amt { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; }
.cal-row.total { background: var(--paper-2); border-top: 2px solid var(--line-2); }
.cal-row.total .cal-nm { text-transform: uppercase; letter-spacing: .07em; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.cal-row.yearly { background: var(--gold-soft); }
.cal-row.yearly .cal-day b, .cal-row.yearly .cal-amt { color: var(--gold); }
.cal-note { padding: 15px 20px; border-top: 1px dashed var(--line-2); font-size: 12px; color: var(--muted); line-height: 1.6; background: var(--paper-2); }
.cal-note b { color: var(--ink); }

/* ---------- upcoming timeline ---------- */
.up-row { display: grid; grid-template-columns: 56px 3px 1fr auto 92px; gap: 15px; align-items: center;
  padding: 14px 20px; border-top: 1px solid var(--line); }
.up-row:first-child { border-top: none; }
.up-row:hover { background: rgba(90,70,40,.03); }
.up-date { text-align: center; background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 2px; }
.up-date b { font-family: var(--mono); font-size: 16px; font-weight: 800; display: block; line-height: 1.2; }
.up-date small { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: var(--faint); text-transform: uppercase; }
.up-tick { width: 3px; height: 36px; border-radius: 2px; background: var(--red); }
.up-tick.gold { background: var(--gold); }
.up-nm { font-weight: 700; font-size: 14.5px; }
.up-nm small { display: block; color: var(--faint); font-weight: 500; font-size: 11.5px; font-family: var(--mono); margin-top: 3px; }
.up-right { text-align: right; }
.up-amt { font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--red); font-variant-numeric: tabular-nums; white-space: nowrap; }
.up-amt .rupee { color: rgba(178,58,42,.55); }
.up-chip { font-family: var(--mono); font-size: 10.5px; color: var(--faint); margin-top: 4px; }
.up-chip.soon { color: var(--amber); font-weight: 700; }
.up-chip.today { color: var(--red); font-weight: 800; }
.up-act { text-align: right; }
.paybtn { background: var(--red); border: none; color: var(--cream);
  font-family: var(--mono); font-size: 12px; font-weight: 800; padding: 9px 18px; border-radius: 8px;
  cursor: pointer; letter-spacing: .06em; box-shadow: 0 2px 0 var(--red-deep); transition: transform .1s, box-shadow .1s; }
.paybtn:hover { transform: translateY(-1px); box-shadow: 0 3px 0 var(--red-deep); }
.paybtn:active { transform: translateY(1px); box-shadow: 0 0 0 var(--red-deep); }
.up-plan { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.up-row.total { background: var(--paper-2); border-top: 2px solid var(--line-2); }
.up-row.total .up-nm { text-transform: uppercase; letter-spacing: .07em; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.up-empty { padding: 26px; text-align: center; color: var(--muted); font-size: 15px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); }

/* ---------- outstanding by month ---------- */
.om { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); }
.om-scroll { max-height: 460px; overflow: auto; }
.om-row { display: grid; grid-template-columns: 78px 1fr 120px 104px; gap: 14px; align-items: center;
  padding: 10px 20px; border-top: 1px solid var(--line); }
.om-row:first-child { border-top: none; }
.om-row.past { opacity: .62; }
.om-row.cur { background: var(--green-soft); border-left: 4px solid var(--green); padding-left: 16px; }
.om-mon { font-family: var(--mono); font-weight: 700; font-size: 12.5px; color: var(--ink-2); }
.om-row.cur .om-mon { color: var(--green); }
.om-bar { height: 9px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.om-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red-deep), var(--red)); border-radius: 999px; }
.om-amt { font-family: var(--mono); font-weight: 700; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.om-delta { font-family: var(--mono); font-size: 11px; color: var(--green); font-weight: 700; text-align: right; }
.om-delta.zero { color: var(--faint); font-weight: 500; }
.om-head { display: grid; grid-template-columns: 78px 1fr 120px 104px; gap: 14px; padding: 10px 20px;
  background: var(--paper-2); border-bottom: 2px solid var(--line-2);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.om-head span:nth-child(3), .om-head span:nth-child(4) { text-align: right; }
.om-foot { padding: 13px 20px; border-top: 1px dashed var(--line-2); background: var(--paper-2);
  font-size: 12px; color: var(--muted); }

/* ---------- segmented toggle ---------- */
.head-controls { display: flex; align-items: center; gap: 14px; }
.seg { display: inline-flex; background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.seg button { background: none; border: none; color: var(--muted); font-family: var(--mono); font-size: 12px;
  font-weight: 700; padding: 5px 13px; border-radius: 999px; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--cloth); color: var(--cream); }

/* ---------- debt-free trajectory ---------- */
.payoff { background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.pf-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.pf-stat .pf-k { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.pf-stat.right { text-align: right; }
.pf-v { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.pf-v.green { color: var(--green); }
.pf-v .rupee { color: var(--faint); font-weight: 400; font-size: 19px; }
.pf-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.pf-chart { margin-top: 4px; }
.pf-bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; border-bottom: 2px solid var(--line-2); }
.pf-bar { flex: 1; min-width: 0; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--green), var(--jade-deep)); transition: filter .15s; }
.pf-bar:hover { filter: brightness(1.25); }
.pf-axis { display: flex; gap: 4px; margin-top: 9px; }
.pf-lab { flex: 1; min-width: 0; text-align: center; font-family: var(--mono); font-size: 9.5px; color: var(--faint); white-space: nowrap; }
.pf-foot { font-size: 12px; color: var(--muted); margin-top: 16px; line-height: 1.55; }
.debtfree-done { text-align: center; font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--green); padding: 24px; }

/* ---------- forecast ---------- */
.section-head .hint input {
  width: 70px; background: var(--paper-2); border: 1px solid var(--line-2); color: var(--green);
  border-radius: 6px; padding: 4px 8px; font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  font-variant-numeric: tabular-nums; text-align: right; }
.section-head .hint input:focus { outline: none; border-color: var(--green); }
.forecast { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 12px; }
.fmonth { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 16px 14px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.fmonth:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.fmonth.cur { border-top: 3px solid var(--green); }
.fmonth.spike { border-top: 3px solid var(--gold); background: linear-gradient(180deg, var(--gold-soft), var(--panel)); }
.fm-name { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fm-total { font-family: var(--mono); font-size: 19px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin: 10px 0 3px; color: var(--ink); }
.fm-total .rupee { color: var(--faint); font-weight: 500; font-size: 13px; }
.fm-break { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.5; }
.fm-break span { color: var(--faint); }
.fm-break .gold { color: var(--gold); font-weight: 700; }
.fm-sub { font-size: 10.5px; color: var(--faint); margin-top: 5px; }
.fm-delta { font-family: var(--mono); font-size: 10.5px; font-weight: 700; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line-2); line-height: 1.4; }
.fm-delta.down { color: var(--green); }
.fm-delta.up { color: var(--red); }
.fm-delta.flat { color: var(--faint); }
.fm-delta.now { color: var(--sky); }

/* ---------- gold loans ---------- */
.gold-banner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--gold-soft), var(--panel));
  border: 1px solid rgba(154,113,18,.45); border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 14px; box-shadow: var(--shadow); }
.gb-stat.right { text-align: right; }
.gb-k { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.gb-v { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin-top: 7px; font-variant-numeric: tabular-nums; }
.gb-v.amber { color: var(--gold); }
.gb-v .rupee { color: var(--faint); font-weight: 400; font-size: 19px; }
.gb-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.gold-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gold-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); transition: transform .2s; }
.gold-card:hover { transform: translateY(-2px); }
.gold-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.gold-name { font-size: 15px; font-weight: 700; }
.gold-name small { display: block; color: var(--faint); font-weight: 500; font-size: 11px; margin-top: 3px; font-family: var(--mono); }
.gold-amt { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin: 13px 0 15px; font-variant-numeric: tabular-nums; color: var(--gold); }
.gold-amt .rupee { color: rgba(154,113,18,.5); font-weight: 400; font-size: 17px; }
.gold-rows > div { display: flex; justify-content: space-between; font-size: 12.5px; padding: 5px 0; border-top: 1px dashed var(--line); }
.gold-rows > div:first-child { border-top: none; }
.gold-rows span { color: var(--muted); }
.gold-rows b { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- credit cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cc { background: var(--panel); border: 1px solid var(--line-2); border-top: 4px solid var(--sky);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 4px; min-height: 160px; transition: transform .2s; }
.cc:hover { transform: translateY(-2px); }
.cc.paid { opacity: .65; }
.cc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.cc-name { font-size: 15.5px; font-weight: 700; }
.cc-name small { display: block; color: var(--faint); font-weight: 500; font-size: 11.5px; margin-top: 3px; font-family: var(--mono); }
.cc-bill { font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: auto; }
.cc-bill .rupee { color: var(--faint); font-weight: 400; }
.cc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.cc-actions { display: flex; gap: 6px; }
.cc .iconbtn { width: 26px; height: 26px; font-size: 12px; }
.cc.add { background: none; border: 2px dashed var(--line-2); border-top: 2px dashed var(--line-2); color: var(--muted); cursor: pointer;
  font-family: var(--sans); align-items: center; justify-content: center; text-align: center; gap: 6px; transition: .2s; box-shadow: none; }
.cc.add:hover { border-color: var(--green); color: var(--ink); background: var(--green-soft); }
.cc.add .plus { font-size: 30px; font-weight: 300; line-height: 1; color: var(--green); }
.cc.add span { font-weight: 700; font-size: 14px; }
.cc.add small { color: var(--faint); font-size: 12px; }

/* ---------- loan cards ---------- */
.loans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.loan { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); position: relative; transition: transform .2s, box-shadow .2s; }
.loan:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.loan.closed { opacity: .6; }
.loan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.loan-name { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.loan-name small { display: block; font-family: var(--mono); font-weight: 500; color: var(--faint); font-size: 11.5px; margin-top: 4px; }
.lender { font-family: var(--mono); font-size: 10px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px;
  background: var(--paper-2); border: 1px solid var(--line-2); padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.lender .led { width: 6px; height: 6px; border-radius: 50%; }
.led.cred { background: #d84b3c; } .led.hdfc { background: #1f4e8c; box-shadow: 0 0 0 2px #c8102e inset; }

.pct-row { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 0 9px; }
.pct { font-family: var(--serif); font-size: 33px; font-weight: 600; letter-spacing: -.02em; color: var(--green); }
.pct small { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 5px; }
.track-state { font-family: var(--mono); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; color: var(--green); }
.track-state.warn { color: var(--muted); }
.track-state.closed { color: var(--faint); }
.track-state.closing { color: var(--gold); background: var(--gold-soft);
  border: 1.5px solid rgba(154,113,18,.45); padding: 4px 10px; border-radius: 6px; letter-spacing: .06em; transform: rotate(-2deg); display: inline-block; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 16px; margin-top: 18px; }
.kv .k { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.kv .v { font-family: var(--mono); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 4px; }
.kv .v.muted { font-weight: 600; color: var(--muted); }

.loan-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px;
  padding-top: 15px; border-top: 1px dashed var(--line-2); gap: 10px; }
.loan-foot .nextdue { font-size: 12.5px; color: var(--muted); }
.loan-foot .nextdue b { color: var(--ink); }
.linkbtn { background: none; border: none; color: var(--red); font-weight: 700; font-size: 12.5px;
  cursor: pointer; font-family: var(--mono); display: inline-flex; align-items: center; gap: 5px; padding: 4px; }
.linkbtn:hover { color: var(--red-deep); text-decoration: underline; }
.iconbtn { background: var(--paper-2); border: 1px solid var(--line-2); color: var(--muted); width: 30px; height: 30px;
  border-radius: 50%; cursor: pointer; display: grid; place-items: center; font-size: 13px; transition: .15s; }
.iconbtn:hover { color: var(--ink); border-color: var(--ink-2); }

/* ---------- warning + history ---------- */
.loan.flag { border-color: rgba(178,58,42,.5); }
.warn-banner { margin-top: 14px; background: var(--red-soft); border: 1px solid rgba(178,58,42,.4);
  color: var(--red-deep); font-size: 12.5px; font-weight: 600; padding: 10px 13px; border-radius: 8px; line-height: 1.4; }

.phist { display: none; margin-top: 15px; border-top: 1px dashed var(--line-2); padding-top: 13px; }
.phist.open { display: block; }
.phist-head { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 11px; }
.prow { display: grid; grid-template-columns: 12px 56px auto 96px; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; }
.prow .pmon { color: var(--muted); font-weight: 700; font-family: var(--mono); }
.prow .pamt { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.prow .pstat { font-family: var(--mono); font-size: 10px; font-weight: 800; text-align: right; text-transform: uppercase; }
.prow .pnote { grid-column: 2 / -1; font-size: 11px; color: var(--faint); margin-top: -2px; }
.pdot { width: 8px; height: 8px; border-radius: 50%; }
.pdot.ok, .pstat.ok { color: var(--green); } .pdot.ok { background: var(--green); }
.pdot.warn, .pstat.warn { color: var(--gold); } .pdot.warn { background: var(--gold); }
.pdot.bad, .pstat.bad { color: var(--red); } .pdot.bad { background: var(--red); }
.pdot.mute, .pstat.mute { color: var(--faint); } .pdot.mute { background: var(--faint); }

/* ---------- schedule ---------- */
.sched { margin-top: 15px; border-top: 1px dashed var(--line-2); padding-top: 13px; display: none; }
.sched.open { display: block; }
.sched table { width: 100%; border-collapse: collapse; font-size: 12px; font-family: var(--mono); }
.sched th { text-align: right; color: var(--faint); font-weight: 700; padding: 6px 8px; text-transform: uppercase; letter-spacing: .04em; font-size: 9.5px; position: sticky; top: 0; background: var(--panel); }
.sched th:first-child, .sched td:first-child { text-align: left; }
.sched td { padding: 6px 8px; text-align: right; font-variant-numeric: tabular-nums; border-top: 1px solid var(--line); color: var(--ink-2); }
.sched tr.is-paid td { color: var(--faint); }
.sched tr.is-next td { background: var(--green-soft); color: var(--ink); }
.sched .scroll { max-height: 280px; overflow: auto; border-radius: 8px; }
.tag-paid { color: var(--green); } .tag-due { color: var(--gold); }

/* ---------- asset lists ---------- */
.asset-banner { border-radius: var(--radius); padding: 20px 24px; margin-bottom: 14px;
  border: 1px solid var(--line-2); box-shadow: var(--shadow); background: var(--panel); }
.asset-banner.jade { border-left: 4px solid var(--green); background: linear-gradient(120deg, var(--green-soft), var(--panel)); }
.asset-banner.sky { border-left: 4px solid var(--sky); background: linear-gradient(120deg, rgba(58,98,137,.09), var(--panel)); }
.asset-banner.coral { border-left: 4px solid var(--red); background: linear-gradient(120deg, var(--red-soft), var(--panel)); }
.ab-k { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.ab-v { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; color: var(--green); }
.ab-v.sky { color: var(--sky); }
.ab-v.coral { color: var(--red); }
.ab-v .rupee { color: var(--faint); font-weight: 400; font-size: 19px; }
.ab-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.list-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.list-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 17px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px;
  min-height: 148px; transition: transform .2s; }
.list-card:hover { transform: translateY(-2px); }
.list-card.done { opacity: .58; }
.lc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.lc-name { font-size: 15px; font-weight: 700; }
.lc-name small { display: block; color: var(--faint); font-weight: 500; font-size: 11.5px; margin-top: 3px; }
.lc-amt { font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: -.02em; margin: 11px 0 auto; font-variant-numeric: tabular-nums; color: var(--green); }
.lc-amt.invest { color: var(--sky); }
.lc-amt.owe { color: var(--red); }
.lc-amt .rupee { color: var(--faint); font-weight: 400; font-size: 15px; }
.lc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px;
  font-size: 11px; color: var(--muted); font-family: var(--mono); }
.list-card .iconbtn { width: 26px; height: 26px; font-size: 12px; }
.list-card.add { background: none; border: 2px dashed var(--line-2); color: var(--muted); cursor: pointer;
  align-items: center; justify-content: center; text-align: center; gap: 6px; font-family: var(--sans); box-shadow: none; transition: .2s; }
.list-card.add:hover { border-color: var(--green); color: var(--ink); background: var(--green-soft); }
.list-card.add .plus { font-size: 28px; font-weight: 300; line-height: 1; color: var(--green); }
.list-card.add span { font-weight: 700; font-size: 14px; }
.list-card.add small { color: var(--faint); font-size: 11.5px; }

/* ---------- footer ---------- */
footer { margin-top: 52px; padding-top: 22px; border-top: 3px double var(--line-2); color: var(--faint); font-size: 12px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; line-height: 1.6; font-family: var(--mono); }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(42,33,24,.55); backdrop-filter: blur(5px);
  display: none; place-items: center; z-index: 50; padding: 20px; }
.modal-bg.open { display: grid; animation: rise .3s ease both; }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-top: 4px solid var(--cloth);
  border-radius: 14px; padding: 26px; width: 100%; max-width: 430px; box-shadow: var(--shadow-lift); }
.modal h3 { font-family: var(--serif); font-weight: 600; font-size: 23px; margin-bottom: 4px; }
.modal p.note { color: var(--muted); font-size: 12.5px; margin-bottom: 18px; line-height: 1.5; }
.field { margin-bottom: 13px; }
.field label { display: block; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.field input { width: 100%; background: var(--paper); border: 1px solid var(--line-2); color: var(--ink);
  border-radius: 8px; padding: 11px 13px; font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.field input:focus { outline: none; border-color: var(--cloth); }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn { flex: 1; border: none; border-radius: 8px; padding: 13px; font-family: var(--sans); font-weight: 800; font-size: 14px; cursor: pointer; transition: filter .15s; }
.btn:hover { filter: brightness(1.06); }
.btn.primary { background: var(--cloth); color: var(--cream); box-shadow: 0 2px 0 var(--cloth-2); }
.btn.sec { background: var(--paper-2); color: var(--ink); border: 1px solid var(--line-2); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .cards, .list-grid { grid-template-columns: repeat(2, 1fr); }
  .stat.sm { grid-column: span 6; }
  .app { flex-direction: column; }
  .side { position: sticky; top: 0; z-index: 40; width: 100%; flex: none; height: auto;
    flex-direction: row; align-items: center; gap: 10px; padding: 10px 14px;
    box-shadow: 0 4px 18px -8px rgba(60,20,10,.5); }
  .side::after { display: none; }
  .brand { padding: 0; gap: 8px; }
  .brand small { display: none; }
  .brand b { font-size: 14px; }
  .brand-ic { width: 28px; height: 28px; border-radius: 7px; font-size: 14px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; flex: 1; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-it { white-space: nowrap; padding: 8px 11px; font-size: 13px; gap: 7px; }
  .nav-it::before { display: none; }
  .nav-it .badge { margin-left: 4px; }
  .side-foot { display: none; }
  .main { padding: 16px 16px 80px; }
  .main::before { display: none; }
}
@media (max-width: 760px) {
  .stat.big, .stat.sm { grid-column: span 12; }
  .loans { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .gold-grid { grid-template-columns: 1fr; }
  .list-grid { grid-template-columns: 1fr; }
  .nw { grid-template-columns: 1fr; gap: 22px; }
  .gold-banner, .pf-head { flex-direction: column; }
  .gb-stat.right, .pf-stat.right { text-align: left; }
  .cal-row { grid-template-columns: 50px 1fr auto; gap: 12px; padding: 13px 15px; }
  .up-row { grid-template-columns: 46px 3px 1fr auto; gap: 10px; padding: 13px 14px; }
  .up-act { grid-column: 3 / -1; justify-self: end; margin-top: 2px; }
  .up-row.total .up-act { display: none; }
  .om-row, .om-head { grid-template-columns: 64px 1fr 100px; }
  .om-delta, .om-head span:nth-child(4) { display: none; }
  /* two clean lines: name+amount, then due+chip */
  .mrow { grid-template-columns: 1fr auto; row-gap: 6px; padding: 14px 15px; }
  .mrow .nm { grid-column: 1; grid-row: 1; }
  .mrow .amt { grid-column: 2; grid-row: 1; justify-self: end; align-self: center; }
  .mrow .due { grid-column: 1; grid-row: 2; align-self: center; }
  .mrow .chip { grid-column: 2; grid-row: 2; justify-self: end; align-self: center; width: max-content; }
  .section-head .hint { display: none; }
}

/* ---------- add-tiles row + statement candidates ---------- */
.add-row { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cand { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px dashed var(--line-2); }
.cand:first-child { border-top: none; }
.cand.hint .cand-info b { color: var(--green); }
.cand-info { flex: 1; font-size: 13.5px; }
.cand-info small { display: block; color: var(--faint); font-size: 11px; margin-top: 3px; font-family: var(--mono); line-height: 1.5; }
@media (max-width: 760px) { .add-row { grid-template-columns: 1fr; } }

.form-hint { background: var(--green-soft); border: 1px solid rgba(35,113,77,.35); border-radius: 8px;
  padding: 11px 13px; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); margin-bottom: 14px; }
.form-hint b { color: var(--green); }

/* ---------- bottom tab bar (mobile) ---------- */
.bottombar { display: none; }
@media (max-width: 980px) {
  .bottombar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; display: flex;
    background:
      repeating-linear-gradient(45deg, rgba(255,235,200,.02) 0 2px, transparent 2px 5px),
      linear-gradient(0deg, var(--cloth-2), var(--cloth));
    box-shadow: 0 -6px 22px -10px rgba(60,20,10,.65);
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom)); }
  .bb-it { flex: 1; min-width: 0; background: none; border: none; color: rgba(243,231,205,.6);
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-family: var(--sans); font-size: 9.5px; font-weight: 700; letter-spacing: .02em;
    padding: 5px 2px; cursor: pointer; border-radius: 9px; transition: color .15s; }
  .bb-it svg { width: 21px; height: 21px; }
  .bb-it.on { color: var(--foil); }
  .bb-it.on svg { filter: drop-shadow(0 0 6px rgba(217,179,106,.55)); }

  /* top strip: brand only — nav lives at the bottom now */
  .side .nav { display: none; }
  .side { padding: 11px 16px; }
  .main { padding-bottom: 130px; }

  /* forecast becomes a swipeable row */
  .forecast { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 10px; scrollbar-width: none; }
  .forecast::-webkit-scrollbar { display: none; }
  .fmonth { flex: 0 0 46%; scroll-snap-align: start; }

  /* hero cards: near-full width with a peek of the next */
  .stat { flex: 0 0 80%; }
  .stat.big { flex: 0 0 86%; }
  .hscroll { display: none; }
}

/* ---------- investments hero card + insights ---------- */
.stat.invest { border-top: 3px solid var(--sky); border-color: rgba(58,98,137,.4); }
.stat.invest .value { color: var(--sky); }
.insights { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ins { display: flex; gap: 13px; align-items: flex-start; background: var(--panel);
  border: 1px solid var(--line-2); border-left: 4px solid var(--line-2); border-radius: 10px;
  padding: 15px 17px; box-shadow: var(--shadow); font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.ins .ic { font-size: 19px; flex: 0 0 auto; line-height: 1.3; }
.ins b { color: var(--ink); }
.ins.good { border-left-color: var(--green); }
.ins.warn { border-left-color: var(--gold); }
.ins.bad { border-left-color: var(--red); background: linear-gradient(120deg, var(--red-soft), var(--panel)); }
@media (max-width: 760px) { .insights { grid-template-columns: 1fr; } }
