/* SHAADI BOOK — 2026 skin. Loaded after sb.css; only restyles (no layout contracts change).
   Principles: calm ivory/burgundy base, gold used sparingly, one clear primary action per screen, soft depth,
   generous touch targets, real dark mode, motion that respects prefers-reduced-motion. */

:root {
  --surface: #FFFFFF; --surface-2: #FBF9F4; --surface-3: #F4F0E8;
  --maroon-g: linear-gradient(135deg, #8E1830 0%, #6A0F20 100%);
  --gold-g: linear-gradient(135deg, #D8B86F 0%, #B98F3E 100%);
  --radius: 18px; --radius-s: 12px;
  --shadow: 0 1px 2px rgba(36,33,42,.04), 0 6px 20px -8px rgba(36,33,42,.10);
  --shadow-h: 0 2px 4px rgba(36,33,42,.05), 0 16px 34px -12px rgba(123,20,40,.22);
  --shadow-l: 0 24px 60px -12px rgba(36,33,42,.35);
  --ease: cubic-bezier(.2,.7,.2,1);
  --f-en: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
:root { color-scheme: light; }

/* ---------- canvas ---------- */
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(900px 420px at 100% -8%, rgba(201,164,92,.13), transparent 60%),
    radial-gradient(700px 380px at -6% 0%, rgba(123,20,40,.07), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  letter-spacing: -.003em;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
::selection { background: var(--maroon); color: #fff; }
.page { animation: rise .42s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
h1 { letter-spacing: -.02em; }
.page-h h1 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); font-weight: 800; }
.page-h p { max-width: 62ch; }

/* ---------- surfaces ---------- */
.card, .side, .drawer, .modal, .menu-pop, .ac-list, .linkrow, details { background: var(--surface); }
.card { border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s; }
a.card:hover, a.card.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); border-color: color-mix(in srgb, var(--gold) 70%, var(--line)); }
.card-h h3 { font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em; }
.input, select.input, textarea.input, .wsel select { background: var(--surface); color: var(--ink); border-color: var(--line2); border-radius: var(--radius-s); min-height: 46px; transition: border-color .15s, box-shadow .15s, background .15s; }
.input:hover { border-color: color-mix(in srgb, var(--maroon) 40%, var(--line2)); }
.input:focus { border-color: var(--maroon); box-shadow: 0 0 0 4px var(--maroon-l); }
.field > label, .lbl { font-weight: 600; letter-spacing: .01em; }
::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }

/* ---------- buttons ---------- */
.btn { border-radius: var(--radius-s); min-height: 44px; font-weight: 650; letter-spacing: -.005em; transition: transform .12s var(--ease), box-shadow .2s, background .2s, border-color .2s, color .2s; }
.btn-primary { background: var(--maroon-g); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 18px -8px rgba(123,20,40,.55); }
.btn-primary:hover:not([disabled]) { background: var(--maroon-g); filter: brightness(1.08); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 12px 24px -8px rgba(123,20,40,.6); transform: translateY(-1px); }
.btn-gold { background: var(--gold-g); color: #2f2208; box-shadow: 0 8px 18px -10px rgba(185,143,62,.8); }
.btn-gold:hover:not([disabled]) { background: var(--gold-g); filter: brightness(1.06); }
.btn-ghost { background: var(--surface); border-color: var(--line2); color: var(--ink); }
.btn-ghost:hover:not([disabled]) { background: var(--maroon-xl); }
.btn:active { transform: scale(.98); }
.icon-btn { background: var(--surface); border-color: var(--line2); border-radius: var(--radius-s); transition: all .15s var(--ease); }
.icon-btn:hover { background: var(--maroon-xl); transform: translateY(-1px); }
.chip { background: var(--surface); border-color: var(--line2); transition: all .15s var(--ease); }
.chip:hover { background: var(--maroon-xl); }
.chip.on { background: var(--maroon-g); border-color: transparent; box-shadow: 0 6px 14px -8px rgba(123,20,40,.7); }
.chip.gold.on { background: var(--gold-l); border: 1px solid var(--gold); color: var(--gold-d); box-shadow: none; }
.seg { background: var(--surface-2); border-color: var(--line2); padding: 3px; border-radius: 12px; gap: 2px; }
.seg button { background: transparent; border-radius: 9px; }
.seg button.on { background: var(--surface); color: var(--maroon); box-shadow: var(--shadow); }
.badge { letter-spacing: .01em; }

/* ---------- shell: sidebar ---------- */
.side { border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); }
.brand .mark { background: var(--maroon-g); color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent), 0 8px 18px -8px rgba(123,20,40,.7); border-radius: 13px; }
.brand b { font-size: 1rem; font-weight: 800; letter-spacing: .08em; }
.wsel { margin: 4px 14px 12px; }
.wsel select { background: var(--gold-l); border-color: color-mix(in srgb, var(--gold) 45%, var(--line2)); font-weight: 650; }
.nav-a { border-radius: 12px; padding: 10px 12px; position: relative; transition: background .15s, color .15s, transform .15s var(--ease); color: var(--ink); }
.nav-a i { color: var(--muted); transition: color .15s, transform .2s var(--ease); }
.nav-a:hover { background: var(--maroon-xl); transform: translateX(2px); }
.nav-a:hover i { color: var(--maroon); transform: scale(1.1); }
.nav-a.on { background: linear-gradient(90deg, var(--maroon-l), transparent 130%); color: var(--maroon); font-weight: 700; }
.nav-a.on::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold-g); }
.nav-a.on i { color: var(--maroon); }
.nav-a.soon { opacity: .42; }
.nav-a.soon:hover { transform: none; background: none; }

/* ---------- shell: top bar ---------- */
.top { background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(1.4) blur(18px); border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.top .t-title { font-size: 1.04rem; font-weight: 750; letter-spacing: -.01em; }
.search-btn { display: none; align-items: center; gap: 10px; min-width: 240px; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface); color: var(--muted); font: inherit; font-size: .88rem; cursor: pointer; transition: all .15s var(--ease); }
.search-btn:hover { border-color: var(--maroon); color: var(--ink); box-shadow: 0 0 0 4px var(--maroon-l); }
.search-btn kbd, .kbd { margin-left: auto; font: 600 .7rem var(--f-en); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line2); background: var(--surface-2); color: var(--muted); }
@media (min-width: 900px) { .search-btn { display: inline-flex; } }
.avatar { background: var(--gold-g); color: #2f2208; font-weight: 800; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px color-mix(in srgb, var(--gold) 55%, transparent); }
.menu-pop { border-radius: 16px; box-shadow: var(--shadow-l); border: 1px solid var(--line); padding: 8px; min-width: 240px; animation: pop .16s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.menu-pop a, .menu-pop button { border-radius: 10px; color: var(--ink); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* ---------- hero (dashboard) ---------- */
.hero {
  border-radius: 24px; padding: 28px 30px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220' fill='none' stroke='%23C9A45C' stroke-opacity='.22' stroke-width='1.2'%3E%3Ccircle cx='110' cy='110' r='20'/%3E%3Ccircle cx='110' cy='110' r='42'/%3E%3Ccircle cx='110' cy='110' r='66'/%3E%3Ccircle cx='110' cy='110' r='92'/%3E%3Cpath d='M110 18v184M18 110h184M45 45l130 130M175 45L45 175'/%3E%3C/svg%3E") right -40px top -50px / 300px no-repeat,
    radial-gradient(520px 260px at 0% 0%, rgba(255,255,255,.10), transparent 70%),
    linear-gradient(135deg, #8C1730 0%, #5E0E1E 100%);
  box-shadow: 0 22px 44px -22px rgba(94,14,30,.7), 0 1px 0 rgba(255,255,255,.12) inset;
}
.hero::after { display: none; }
.hero h1 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); font-weight: 800; }
.hero .meta span { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16); padding: 5px 12px; border-radius: 999px; backdrop-filter: blur(6px); }
.count { background: rgba(255,255,255,.12); border: 1px solid rgba(217,185,111,.55); border-radius: 20px; backdrop-filter: blur(10px); box-shadow: 0 10px 30px -12px rgba(0,0,0,.5), 0 0 0 6px rgba(217,185,111,.08); padding: 14px 28px; }
.count b { font-size: clamp(2.4rem, 5vw, 3.2rem); background: var(--gold-g); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -.03em; }

/* ---------- stat cards (bento) ---------- */
.stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat { position: relative; overflow: hidden; gap: 6px; }
.stat .k { font-size: .78rem; font-weight: 650; text-transform: none; letter-spacing: .01em; }
.stat .k i { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--gold-l); color: var(--gold-d); font-size: .98rem; }
.stat .v { font-size: clamp(1.45rem, 2.2vw, 1.85rem); font-weight: 800; letter-spacing: -.025em; margin-top: 4px; }
.stat .v.pos { color: var(--good); } .stat .v.neg { color: var(--bad); }
.stat::after { content: ''; position: absolute; right: -26px; bottom: -26px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(closest-side, var(--gold-l), transparent); pointer-events: none; }
.ring { --p: 0; --c: var(--maroon); position: absolute; right: 16px; top: 16px; width: 46px; height: 46px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; font: 700 .68rem var(--f-en); color: var(--ink); }
.ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; }
.ring.over { --c: var(--bad); } .ring.ok { --c: var(--good); }
.bar { height: 9px; background: var(--surface-3); }
.bar > i { background: var(--maroon-g); }
.bar > i.gold { background: var(--gold-g); } .bar > i.good { background: linear-gradient(90deg, #3d9a73, #2E7D5B); }
.progress { height: 9px; background: var(--surface-3); } .progress > i { background: linear-gradient(90deg, #D8B86F, #8E1830); }
.cat-row:hover { background: var(--maroon-xl); border-radius: 10px; }
.dash-grid { gap: 18px; }

/* ---------- lists ---------- */
.row { border-bottom-color: var(--line); transition: background .15s; }
.list .row:hover { background: color-mix(in srgb, var(--maroon-xl) 60%, transparent); }
.dateblock { background: var(--gold-l); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); border-radius: 12px; }
.dateblock b { color: var(--maroon); }
.total-line { background: var(--gold-l); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); border-radius: 12px; }
.empty .ei { background: var(--gold-g); color: #2f2208; box-shadow: 0 14px 28px -14px rgba(185,143,62,.9); }
.notice { background: var(--gold-l); border-color: color-mix(in srgb, var(--gold) 40%, transparent); border-radius: 14px; }
.notice.bad { background: var(--bad-l); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.tabbar { border-bottom-color: var(--line); gap: 2px; }
.tabbar button { border-radius: 10px 10px 0 0; transition: color .15s, background .15s; }
.tabbar button:hover { background: var(--maroon-xl); }
.tabbar button.on { color: var(--maroon); border-bottom-color: var(--maroon); }
.calday { background: var(--surface); border-color: var(--line); color: var(--ink); }
.calday[disabled] { background: var(--surface-2); }
.fnopt, .choice button { background: var(--surface); border-color: var(--line2); transition: all .15s var(--ease); }
.choice button:hover, .fnopt:hover { border-color: var(--maroon); transform: translateY(-2px); box-shadow: var(--shadow); }
.qa button, .qa a { background: var(--surface); border-color: var(--line2); border-radius: 16px; padding: 18px 10px; transition: all .18s var(--ease); }
.qa button i, .qa a i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--maroon-l); font-size: 1.25rem; }
.qa button:nth-child(4n+2) i { background: var(--gold-l); color: var(--gold-d); }
.qa button:nth-child(4n+3) i { background: var(--good-l); color: var(--good); }
.qa button:nth-child(4n+4) i { background: var(--warn-l); color: var(--warn); }
.qa button:hover, .qa a:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); background: var(--surface); border-color: var(--gold); }
.qe { background: linear-gradient(180deg, var(--surface), var(--gold-l)); border: 1.5px solid color-mix(in srgb, var(--gold) 70%, transparent); }
.hist { border-radius: 10px; }
.ac-list { border-radius: 14px; box-shadow: var(--shadow-l); }
.ac-list button { color: var(--ink); } .ac-list button:hover { background: var(--maroon-xl); }

/* ---------- overlays ---------- */
.overlay, .modal-wrap { background: rgba(18,14,24,.5); backdrop-filter: blur(6px); }
.drawer { border-radius: 24px 0 0 24px; box-shadow: var(--shadow-l); }
.drawer-h { position: sticky; top: 0; background: var(--surface); z-index: 2; padding: 18px 22px; border-bottom-color: var(--line); }
.drawer-f { background: var(--surface); border-top-color: var(--line); padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); }
.drawer-b { padding: 22px; }
.modal { border-radius: 22px; box-shadow: var(--shadow-l); animation: pop .18s var(--ease); }
.toasts { bottom: 28px; }
.toast { background: color-mix(in srgb, var(--ink) 92%, transparent); color: var(--bg); border-radius: 999px; padding: 12px 20px; backdrop-filter: blur(10px); box-shadow: var(--shadow-l); }
.toast.err { background: var(--bad); color: #fff; }
.toast-act { background: color-mix(in srgb, var(--bg) 22%, transparent); color: inherit; border-radius: 999px; }
.sk { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%); background-size: 400% 100%; }

/* ---------- command palette ---------- */
.pal-wrap { position: fixed; inset: 0; z-index: 220; display: grid; place-items: start center; padding: 12vh 16px 16px; background: rgba(18,14,24,.5); backdrop-filter: blur(8px); animation: fin .14s; }
.pal { width: min(620px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-l); overflow: hidden; animation: pop .18s var(--ease); }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pal-in i { color: var(--muted); font-size: 1.15rem; }
.pal-in input { flex: 1; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; outline: none; min-width: 0; }
.pal-list { max-height: min(56vh, 420px); overflow-y: auto; padding: 8px; }
.pal-grp { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 10px 12px 4px; }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pal-item i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--maroon-l); color: var(--maroon); flex: none; }
.pal-item.act i { background: var(--gold-l); color: var(--gold-d); }
.pal-item small { margin-left: auto; color: var(--muted); font-size: .76rem; }
.pal-item.sel { background: var(--maroon-xl); outline: 1px solid color-mix(in srgb, var(--maroon) 35%, transparent); }
.pal-empty { padding: 28px; text-align: center; color: var(--muted); }
.pal-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; background: var(--surface-2); }

/* ---------- wizard ---------- */
.wiz { max-width: 760px; }
.wiz-steps i { height: 6px; background: var(--surface-3); transition: background .3s; }
.wiz-steps i.on { background: var(--maroon-g); } .wiz-steps i.cur { background: var(--gold-g); }
.welcome .logo { background: var(--maroon-g); color: var(--gold); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 25%, transparent), 0 24px 44px -16px rgba(123,20,40,.8); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.wiz h1 { font-size: clamp(1.5rem, 3.4vw, 2rem); letter-spacing: -.025em; }

/* ---------- mobile: floating glass bottom bar ---------- */
@media (max-width: 720px) {
  .bnav { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 64px; border: 1px solid var(--line); border-radius: 22px; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(18px) saturate(1.4); box-shadow: var(--shadow-l); padding-bottom: 0; }
  .bnav a { border-radius: 16px; margin: 6px 2px; transition: background .15s, color .15s; position: relative; }
  .bnav a.on { color: var(--maroon); background: var(--maroon-l); }
  .bnav a.on::after { content: ''; position: absolute; bottom: 3px; width: 16px; height: 3px; border-radius: 3px; background: var(--gold-g); }
  .fab { width: 58px; height: 58px; right: 18px; bottom: calc(86px + env(safe-area-inset-bottom)); background: var(--maroon-g); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 40%, transparent), 0 16px 28px -10px rgba(123,20,40,.8); transition: transform .15s var(--ease); }
  .fab:active { transform: scale(.92) rotate(90deg); }
  .page { padding-bottom: 150px; }
  .toasts { bottom: 92px; }
  .drawer { border-radius: 26px 26px 0 0; }
  .drawer::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 5px; background: var(--line2); margin: 8px auto 0; }
  .hero { padding: 22px 20px; } .count { padding: 10px 18px; }
  .search-btn { display: none !important; }
}
@media (max-width: 1023px) { .top { padding: 0 14px; } .scrim { backdrop-filter: blur(4px); } }
@media (hover: none) { a.card:hover, .qa button:hover, .nav-a:hover { transform: none; } }

/* ---------- accessibility ---------- */
body.large-text { font-size: 17.5px; } body.large-text .btn, body.large-text .input { min-height: 50px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold) 80%, transparent); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .welcome .logo, .page { animation: none !important; } }

/* ---------- landing page ---------- */
.lp-hero h1 { letter-spacing: -.03em; }
.lp-grid .card i { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--maroon-l); font-size: 1.3rem; }
.band { background: var(--maroon-g); box-shadow: 0 30px 60px -30px rgba(94,14,30,.8); }


/* ======================= HOME (dashboard) — plain, big, friendly ======================= */
.home { max-width: 1080px; }
.hm-hero { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; border-radius: 26px; padding: 28px 30px; color: #fff;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220' fill='none' stroke='%23C9A45C' stroke-opacity='.25' stroke-width='1.2'%3E%3Ccircle cx='110' cy='110' r='20'/%3E%3Ccircle cx='110' cy='110' r='42'/%3E%3Ccircle cx='110' cy='110' r='66'/%3E%3Ccircle cx='110' cy='110' r='92'/%3E%3Cpath d='M110 18v184M18 110h184M45 45l130 130M175 45L45 175'/%3E%3C/svg%3E") right -50px top -60px / 320px no-repeat, linear-gradient(135deg, #8C1730 0%, #5E0E1E 100%);
  box-shadow: 0 24px 46px -24px rgba(94,14,30,.75); }
.hm-hello { font-size: .95rem; color: rgba(255,255,255,.82); font-weight: 600; }
.hm-hero h1 { color: #fff; font-size: clamp(1.5rem, 3.2vw, 2.15rem); font-weight: 800; margin: 4px 0 12px; letter-spacing: -.02em; }
.hm-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-meta span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); padding: 6px 13px; border-radius: 999px; font-size: .86rem; }
.hm-meta i { color: #E3C783; margin-right: 4px; }
.hm-hero-r { display: flex; gap: 14px; }
.hm-big { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 128px; padding: 14px 18px; border-radius: 22px; text-decoration: none; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(227,199,131,.55); backdrop-filter: blur(8px); transition: transform .2s var(--ease), background .2s; }
.hm-big:hover { transform: translateY(-3px); background: rgba(255,255,255,.18); }
.hm-big b { font-size: clamp(2.3rem, 5vw, 3rem); line-height: 1; font-weight: 800; letter-spacing: -.03em; background: linear-gradient(135deg, #F1D9A0, #D8B86F); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hm-big small { margin-top: 6px; font-size: .8rem; color: rgba(255,255,255,.9); font-weight: 600; text-align: center; }
.hm-ring { --p: 0; }
.hm-ring-in { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; position: relative; background: conic-gradient(#E3C783 calc(var(--p) * 1%), rgba(255,255,255,.2) 0); }
.hm-ring-in::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #6c1223; }
.hm-ring-in b { position: relative; font-size: 1.35rem; }
.hm-sec { margin-top: 30px; }
.hm-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.hm-h h2 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 800; letter-spacing: -.02em; }
.hm-h span, .hm-h a { color: var(--muted); font-size: .86rem; text-decoration: none; font-weight: 500; }
.hm-h a { color: var(--maroon); font-weight: 650; }

/* things to do now */
.hm-todo { display: grid; gap: 10px; }
.hm-t { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--gold); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s; }
.hm-t:hover { transform: translateX(3px); box-shadow: var(--shadow-h); }
.hm-t.danger { border-left-color: var(--bad); } .hm-t.warn { border-left-color: #E0A030; } .hm-t.info { border-left-color: var(--gold); }
.hm-t-i { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 1.3rem; flex: none; background: var(--gold-l); color: var(--gold-d); }
.hm-t.danger .hm-t-i { background: var(--bad-l); color: var(--bad); } .hm-t.warn .hm-t-i { background: var(--warn-l); color: var(--warn); }
.hm-t-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hm-t-b b { font-size: 1.02rem; font-weight: 700; line-height: 1.35; } .hm-t-b small { color: var(--muted); font-size: .86rem; }
.hm-t-go { color: var(--muted); font-size: 1.1rem; }
.hm-ok { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 18px; background: var(--good-l); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); }
.hm-ok .hm-t-i { background: var(--good); color: #fff; } .hm-ok b { display: block; font-size: 1.05rem; } .hm-ok small { color: var(--muted); }

/* quick entry */
.hm-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hm-q { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; font: inherit; box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.hm-q:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); border-color: var(--gold); }
.hm-q:active { transform: scale(.97); }
.hm-q-i { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 8px; color: #fff; }
.hm-q.q0 .hm-q-i { background: linear-gradient(135deg, #A52B48, #7B1428); } .hm-q.q1 .hm-q-i { background: linear-gradient(135deg, #D8B86F, #B98F3E); }
.hm-q.q2 .hm-q-i { background: linear-gradient(135deg, #3d9a73, #2E7D5B); } .hm-q.q3 .hm-q-i { background: linear-gradient(135deg, #E0A030, #B7791F); }
.hm-q b { font-size: 1.04rem; font-weight: 750; } .hm-q small { color: var(--muted); font-size: .82rem; line-height: 1.35; }

/* money at a glance */
.hm-money { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.hm-sentence { font-size: clamp(1.1rem, 2.2vw, 1.4rem); font-weight: 750; letter-spacing: -.015em; margin-bottom: 14px; line-height: 1.4; }
.hm-sentence.bad { color: var(--bad); }
.hm-bar { height: 16px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hm-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #D8B86F, #8E1830); transition: width .6s var(--ease); }
.hm-bar i.over { background: linear-gradient(90deg, #E0A030, #B0343C); }
.hm-bar-l { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); margin: 6px 2px 14px; }
.hm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 4px; }
.hm-f { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.hm-f small { color: var(--muted); font-size: .78rem; font-weight: 600; } .hm-f b { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hm-f b.pos { color: var(--good); } .hm-f b.neg { color: var(--bad); }

/* all modules as tiles */
.hm-grp { margin-bottom: 18px; } .hm-grp h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; margin: 0 0 8px 2px; }
.hm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.hm-tile { display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; position: relative; }
.hm-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); border-color: var(--gold); }
.hm-tile-i { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 1.35rem; flex: none; }
.hm-tile.g0 .hm-tile-i { background: var(--maroon-l); color: var(--maroon); } .hm-tile.g1 .hm-tile-i { background: var(--good-l); color: var(--good); }
.hm-tile.g2 .hm-tile-i { background: var(--gold-l); color: var(--gold-d); } .hm-tile.g3 .hm-tile-i { background: var(--warn-l); color: var(--warn); }
.hm-tile-b { display: flex; flex-direction: column; min-width: 0; flex: 1; } .hm-tile-b b { font-size: 1rem; font-weight: 750; } .hm-tile-b small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.hm-tile em { font-style: normal; font-size: .74rem; font-weight: 700; color: var(--maroon); background: var(--maroon-xl); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }

/* upcoming functions */
.hm-fns { display: grid; gap: 8px; }
.hm-fn { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s var(--ease); }
.hm-fn:hover { border-color: var(--gold); transform: translateX(3px); }
.hm-date { width: 56px; text-align: center; border-radius: 14px; background: var(--gold-l); padding: 7px 0; flex: none; } .hm-date b { display: block; font-size: 1.3rem; line-height: 1.1; color: var(--maroon); } .hm-date small { font-size: .68rem; text-transform: uppercase; font-weight: 700; color: var(--gold-d); }
.hm-fn-b { flex: 1; display: flex; flex-direction: column; min-width: 0; } .hm-fn-b b { font-weight: 750; } .hm-fn-b small { color: var(--muted); }
.hm-fn-w { font-size: .8rem; font-weight: 700; color: var(--maroon); background: var(--maroon-xl); border-radius: 999px; padding: 4px 11px; white-space: nowrap; }

/* folded details */
.hm-more { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 4px 6px; }
.hm-more summary { display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; padding: 12px 12px; } .hm-more summary::-webkit-details-marker { display: none; }
.hm-more summary > i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-l); color: var(--gold-d); font-size: 1.2rem; }
.hm-more summary span { display: flex; flex-direction: column; } .hm-more summary small { color: var(--muted); }
.hm-more[open] summary { border-bottom: 1px solid var(--line); }
.hm-more-b { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; padding: 18px 12px 12px; } .hm-more-b h3 { font-size: .98rem; margin-bottom: 8px; }

@media (max-width: 860px) { .hm-quick { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .hm-hero { padding: 22px 18px; border-radius: 22px; } .hm-hero-r { width: 100%; } .hm-big { flex: 1; min-width: 0; padding: 12px 8px; }
  .hm-ring-in { width: 64px; height: 64px; } .hm-ring-in b { font-size: 1.15rem; }
  .hm-sec { margin-top: 24px; } .hm-q { padding: 14px; } .hm-q-i { width: 46px; height: 46px; font-size: 1.35rem; }
  .hm-tiles { grid-template-columns: 1fr; } .hm-t { padding: 12px; } .hm-t-i { width: 42px; height: 42px; }
}
