/* ═══════════════════════════════════════════════════════════════════
   Mizu · deep forest (roots), emerald (growth), gold (harvest), cream.
   ═══════════════════════════════════════════════════════════════════ */
:root {
    --bg: #f5f3ec;
    --bg-2: #efece2;
    --card: #ffffff;
    --ink: #0f2219;
    --ink-2: #33463c;
    --muted: #6b7a71;
    --line: #e7e5dc;
    --forest: #06281c;
    --forest-2: #0b3a29;
    --brand: #0e8a5a;
    --brand-2: #19b37a;
    --brand-soft: #e2f5ec;
    --brand-ink: #ffffff;
    --gold: #f2b33d;
    --gold-deep: #b9800f;
    --gold-soft: #fdf2d8;
    --good: #0e8a5a;
    --bad: #dc4a35;
    --bad-soft: #fdebe7;
    --warn: #c47f12;
    --info: #2f6fd6;
    --info-soft: #e7effc;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(15, 34, 25, .04), 0 4px 14px rgba(15, 34, 25, .06);
    --shadow-lg: 0 10px 30px rgba(15, 34, 25, .12);
    --side-w: 252px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b130f;
        --bg-2: #101a15;
        --card: #142019;
        --ink: #e9efe9;
        --ink-2: #c4d0c8;
        --muted: #8fa097;
        --line: #22312a;
        --forest: #050f0b;
        --forest-2: #0a1a13;
        --brand: #22a771;
        --brand-2: #3cc98e;
        --brand-soft: #143426;
        --gold: #f2b33d;
        --gold-deep: #f2b33d;
        --gold-soft: #33280f;
        --good: #3cc98e;
        --bad: #f0705d;
        --bad-soft: #3a1c17;
        --info: #78a6f0;
        --info-soft: #172640;
        --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
        --shadow-lg: 0 12px 34px rgba(0,0,0,.45);
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
    font: 15px/1.55 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1 { font-size: 1.75rem; line-height: 1.15; margin: 0 0 6px; letter-spacing: -.03em; font-weight: 800; }
h2 { font-size: 1.12rem; margin: 30px 0 12px; letter-spacing: -.015em; font-weight: 800; }
h3 { font-size: 1rem; margin: 18px 0 8px; font-weight: 700; }
.sub { color: var(--muted); margin: 0 0 20px; max-width: 70ch; }
.muted { color: var(--muted); }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.big { font-size: 2.1rem; font-weight: 800; letter-spacing: -.035em; color: var(--brand); line-height: 1.1; }
.ic { width: 20px; height: 20px; flex: none; }

/* ═════════ App frame ═════════ */
.side {
    position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 30;
    display: flex; flex-direction: column;
    background:
        radial-gradient(circle at 110% -10%, rgba(242,179,61,.18), transparent 40%),
        radial-gradient(circle at -20% 110%, rgba(25,179,122,.25), transparent 45%),
        linear-gradient(180deg, var(--forest-2), var(--forest));
    color: #cfe3d8;
}
.side .brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 14px; color: #fff; text-decoration: none; }
.side .brand span { display: grid; font-weight: 800; font-size: 1.45rem; letter-spacing: -.04em; line-height: 1; }
.side .brand small { font-size: .74rem; font-weight: 600; letter-spacing: 0; color: #9fc4b1; margin-top: 4px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.side-title { margin: 16px 10px 6px; font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #6f9a85; }
.side nav a {
    position: relative; display: flex; align-items: center; gap: 11px; margin: 2px 0; padding: 9px 12px;
    border-radius: 12px; color: #cfe3d8; text-decoration: none; font-weight: 600; font-size: .92rem;
    transition: background .15s, color .15s;
}
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.on { background: linear-gradient(135deg, rgba(25,179,122,.35), rgba(25,179,122,.12)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.side nav a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold); }
.side nav a.on .ic { color: var(--gold); }
.count {
    margin-left: auto; font-style: normal; font-size: .7rem; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px;
    display: grid; place-items: center; border-radius: 999px; background: var(--gold); color: #3b2a05;
}
.side-me { display: flex; align-items: center; gap: 10px; margin: 8px 12px 14px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.06); }
.side-me div { display: grid; min-width: 0; line-height: 1.2; }
.side-me b { color: #fff; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-me small { color: #9fc4b1; font-size: .74rem; }
.side-me form { margin-left: auto; }
.side .iconbtn { color: #cfe3d8; background: rgba(255,255,255,.06); }
.side .iconbtn:hover { color: #fff; background: rgba(255,255,255,.12); }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.has-side .page { margin-left: var(--side-w); }
.topbar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
    padding: 12px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.topbar .brand.mini { display: none; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.25rem; letter-spacing: -.04em; }
.topbar-org { display: grid; line-height: 1.2; min-width: 0; }
.topbar-org b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-org span { font-size: .78rem; color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.iconbtn {
    position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; cursor: pointer;
    background: var(--card); color: var(--ink-2); box-shadow: var(--shadow); text-decoration: none;
}
.iconbtn:hover { color: var(--brand); }
.iconbtn.bell i {
    position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    display: grid; place-items: center; font-style: normal; font-size: .68rem; font-weight: 800; background: var(--bad); color: #fff;
    box-shadow: 0 0 0 2px var(--bg);
}
.topbar-me .avatar { width: 40px; height: 40px; }

main { width: 100%; max-width: 1120px; margin: 0 auto; padding: 26px 28px 40px; flex: 1; }
.foot { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: .78rem; padding: 10px 0 28px; }

.bottombar, .scrim { display: none; }

@media (max-width: 900px) {
    .has-side .page { margin-left: 0; }
    .side { transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
    .menu-open .side { transform: none; }
    .menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(6,20,14,.45); backdrop-filter: blur(2px); }
    .topbar { padding: 10px 16px; }
    .topbar .brand.mini { display: flex; }
    .topbar-org { display: none; }
    main { padding: 18px 16px 110px; }
    .foot { padding-bottom: 100px; }
    .bottombar {
        position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 22;
        display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 6px;
        background: color-mix(in srgb, var(--forest) 94%, transparent); backdrop-filter: blur(14px);
        border-radius: 22px; box-shadow: var(--shadow-lg);
    }
    .bottombar a, .bottombar button {
        position: relative; display: grid; justify-items: center; gap: 2px; padding: 7px 2px; border: 0; border-radius: 16px;
        background: transparent; color: #a9c7b8; text-decoration: none; font: inherit; font-size: .68rem; font-weight: 700; cursor: pointer;
    }
    .bottombar .ic { width: 22px; height: 22px; }
    .bottombar a.on { color: #fff; background: rgba(25,179,122,.28); }
    .bottombar a.on .ic { color: var(--gold); }
    .bottombar i {
        position: absolute; top: 2px; right: calc(50% - 22px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
        display: grid; place-items: center; font-style: normal; font-size: .64rem; font-weight: 800; background: var(--gold); color: #3b2a05;
    }
    h1 { font-size: 1.45rem; }
}

/* ═════════ Hero ═════════ */
.hero {
    position: relative; overflow: hidden;
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px;
    padding: 26px; margin-bottom: 20px; border-radius: 24px; color: #fff;
    background:
        radial-gradient(circle at 95% 0%, rgba(242,179,61,.45), transparent 38%),
        radial-gradient(circle at 0% 110%, rgba(25,179,122,.55), transparent 45%),
        linear-gradient(135deg, var(--forest-2), #0d5a3c 55%, var(--brand));
    box-shadow: var(--shadow-lg);
}
.hero::after {
    /* Faint roots pattern. */
    content: ""; position: absolute; right: -40px; bottom: -60px; width: 300px; height: 300px; opacity: .12; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M50 0v40M50 40c-10 10-25 12-35 25M50 40c10 10 25 12 35 25M50 40v30M50 70c-6 8-16 10-22 20M50 70c6 8 16 10 22 20M15 65c-5 8-3 18-8 25M85 65c5 8 3 18 8 25'/%3E%3C/svg%3E") no-repeat center / contain;
}
.hero > * { position: relative; z-index: 1; }
.hero-hi { font-size: 1.65rem; font-weight: 800; margin: 0; letter-spacing: -.03em; line-height: 1.2; }
.hero-sub { margin: 4px 0 0; color: rgba(255,255,255,.8); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stats > div {
    display: grid; min-width: 140px; padding: 12px 16px; border-radius: 16px;
    background: rgba(255,255,255,.12); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.18);
}
.hero-stats span { font-size: .76rem; color: rgba(255,255,255,.78); font-weight: 600; }
.hero-stats b { font-size: 1.3rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hero-stats small { color: rgba(255,255,255,.75); font-size: .74rem; }
.hero .btn { background: #fff; color: var(--forest-2); box-shadow: none; }
.hero .btn.ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }

/* ═════════ Cards, tiles ═════════ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.narrow { max-width: 440px; margin: 40px auto; }
.section h2 { margin-top: 0; }
.summary p { margin: 0 0 9px; }
.summary p:last-child { margin: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 8px; }
.tile {
    position: relative; overflow: hidden; display: grid; gap: 4px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
}
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile-label { color: var(--muted); font-size: .82rem; font-weight: 700; }
.tile-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }
.tile-ic .ic { width: 19px; height: 19px; }
.tile-value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tile-hint { color: var(--muted); font-size: .78rem; }
.tile.good .tile-ic { background: var(--gold-soft); color: var(--gold-deep); }
.tile.good .tile-value { color: var(--ink); }
.tile.bad .tile-ic { background: var(--bad-soft); color: var(--bad); }
.tile.bad .tile-value { color: var(--bad); }
.tile.blue .tile-ic { background: var(--info-soft); color: var(--info); }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr)); gap: 16px; align-items: start; }
.cols > * { min-width: 0; }

/* ═════════ Messages & rules ═════════ */
.flash { display: flex; gap: 8px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; margin-bottom: 16px; background: var(--brand-soft); color: #0a5135; font-weight: 600; border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent); }
.flash.bad { background: var(--bad-soft); color: #8a2219; border-color: color-mix(in srgb, var(--bad) 22%, transparent); }
.rulebox { padding: 14px 18px; border-radius: 16px; margin-bottom: 16px; border: 1px solid; }
.rulebox ul { margin: 6px 0 0; padding-left: 20px; }
.rulebox li { margin: 2px 0; }
.rulebox.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 25%, transparent); color: #7d1f16; }
.rulebox.good { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 25%, transparent); color: #0a5135; }
@media (prefers-color-scheme: dark) {
    .flash, .rulebox.good { color: #bfe8d3; }
    .flash.bad, .rulebox.bad { color: #f5c3bd; }
}
.receipt { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: inset 4px 0 0 var(--brand), var(--shadow); }
.receipt p { margin: 6px 0; }
.bubble { margin: 0 0 12px; padding: 11px 15px; border-radius: 16px 16px 16px 4px; background: var(--gold-soft); color: var(--ink); font-size: .92rem; }
.pill { padding: 7px 15px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-deep); font-weight: 800; white-space: nowrap; }

/* ═════════ People ═════════ */
.avatar {
    display: inline-grid; place-items: center; flex: none; vertical-align: middle;
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, hsl(var(--h) 60% 86%), hsl(calc(var(--h) + 30) 60% 78%));
    color: hsl(var(--h) 55% 24%); font-weight: 800; font-size: .78rem; letter-spacing: .02em;
}
.who { display: flex; align-items: center; gap: 11px; }
.amount { font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; }

/* ═════════ Progress ═════════ */
.progress { height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2) 70%, var(--gold)); }
.meter { height: 8px; background: var(--bg-2); border-radius: 999px; overflow: hidden; min-width: 80px; }
.meter span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.meter.bad span { background: var(--bad); }

/* ═════════ Tables ═════════ */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .72rem; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .07em; background: var(--bg); }
tr:last-child td { border-bottom: 0; }
table tr:hover td { background: color-mix(in srgb, var(--brand) 3.5%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td a { font-weight: 700; text-decoration: none; }
td a:hover { text-decoration: underline; }
tr.total td { font-weight: 800; background: var(--bg); }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.card table td, .card table th { padding: 9px 6px; }
.card table th { background: transparent; }
.bands input { min-width: 90px; }
.bandlist { display: flex; flex-wrap: wrap; gap: 6px; }
.bandlist span { font-size: .8rem; padding: 5px 11px; border-radius: 999px; background: var(--bg); color: var(--ink-2); font-weight: 600; border: 1px solid var(--line); }

/* ═════════ Badges ═════════ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.badge.good { background: var(--brand-soft); color: var(--good); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.muted { background: var(--bg-2); color: var(--muted); }

/* ═════════ Forms ═════════ */
form.stack { display: grid; gap: 14px; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; min-inline-size: 0; display: block; }
fieldset.plain > * { min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }
label { display: grid; gap: 6px; font-size: .86rem; font-weight: 700; color: var(--ink-2); }
label small { font-weight: 500; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-top: 10px; }
label.check input { width: 19px; height: 19px; accent-color: var(--brand); }
input, select, textarea {
    font: inherit; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px;
    background: var(--card); color: var(--ink); width: 100%; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
input:disabled, select:disabled { opacity: .65; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice label { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 14px; cursor: pointer; font-weight: 500; transition: border-color .15s, box-shadow .15s; }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.choice input { width: auto; accent-color: var(--brand); }
.choice b { display: block; color: var(--ink); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 20px; border-radius: 12px;
    border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
    background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink); font: inherit; font-weight: 800; text-decoration: none;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 32%, transparent); transition: transform .1s, box-shadow .15s, filter .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 36%, transparent); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: var(--card); color: var(--brand); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--brand); }
.btn.gold { background: linear-gradient(135deg, #f6c35d, var(--gold)); color: #3b2a05; box-shadow: 0 4px 14px rgba(242,179,61,.35); }
.btn.small { padding: 7px 13px; font-size: .84rem; border-radius: 10px; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.savebar { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); z-index: 5; }
@media (max-width: 900px) { .savebar { bottom: 84px; } }
.preview { background: var(--bg); border-radius: var(--radius); padding: 12px; }

/* Quick actions */
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; margin-bottom: 20px; }
.quick a {
    position: relative; display: flex; align-items: center; gap: 11px; padding: 14px; border-radius: 16px; text-decoration: none; font-weight: 700; font-size: .9rem;
    background: var(--card); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); transition: transform .12s, box-shadow .15s, border-color .15s;
}
.quick a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.quick a .ic { width: 38px; height: 38px; padding: 9px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.quick a:nth-child(3n+2) .ic { background: var(--gold-soft); color: var(--gold-deep); }
.quick a:nth-child(3n+3) .ic { background: var(--info-soft); color: var(--info); }
.quick a i { margin-left: auto; font-style: normal; font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--gold); color: #3b2a05; }
.quick a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ═════════ Charts ═════════ */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* ═════════ Notices, votes, meetings ═════════ */
details.card > summary { list-style: none; cursor: pointer; display: inline-flex; }
details.card > summary::-webkit-details-marker { display: none; }
details.card:not([open]) { background: transparent; border: 0; box-shadow: none; padding: 0; }
.notice.pinned { border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); box-shadow: inset 4px 0 0 var(--gold), var(--shadow); }
.notice.new { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.notice-body { margin: 8px 0 0; }
.sendto { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 12px; background: var(--bg); }
a.card { display: block; color: inherit; text-decoration: none; transition: transform .12s, box-shadow .15s; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.votebar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--bg-2); }
.votebar .y { background: var(--good); }
.votebar .n { background: var(--bad); }
.result-row { display: grid; grid-template-columns: 110px 1fr 40px; align-items: center; gap: 12px; margin: 10px 0; font-weight: 700; }
.result-row b { text-align: right; }
.progress.yes span { background: var(--good); }
.progress.no span { background: var(--bad); }
.progress.abstain span { background: var(--muted); }
.vote-btn { font-size: 1rem; padding: 13px 22px; }
.meet-row { display: flex; align-items: center; gap: 14px; }
.cal { display: grid; place-items: center; width: 56px; height: 60px; border-radius: 16px; flex: none; line-height: 1.05;
       background: linear-gradient(160deg, var(--forest-2), var(--brand)); color: #fff; box-shadow: var(--shadow); }
.cal b { font-size: 1.45rem; }
.cal span { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 800; }
.agenda { margin: 0; padding-left: 20px; }
.agenda li { margin: 5px 0; }
.seg { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.seg label { display: inline-flex; cursor: pointer; font-weight: 700; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); font-size: .8rem; color: var(--muted); }
.seg input:checked + span { color: #fff; border-color: transparent; }
.seg .present input:checked + span { background: var(--good); }
.seg .late input:checked + span { background: var(--warn); }
.seg .absent input:checked + span { background: var(--bad); }
.seg .excused input:checked + span { background: var(--info); }

/* ═════════ Money window ═════════ */
.window { padding: 0; overflow: hidden; }
.wtabs { display: flex; gap: 6px; padding: 8px; background: var(--bg); border-bottom: 1px solid var(--line); overflow-x: auto; }
.wtab { flex: 1; min-width: 96px; padding: 11px 12px; border: 0; border-radius: 13px; cursor: pointer; background: transparent; color: var(--muted); font: inherit; font-weight: 800; transition: background .15s, color .15s; }
.wtab:hover { color: var(--ink); }
.wtab.on { background: var(--card); color: var(--brand); box-shadow: var(--shadow); }
.window > .rulebox { margin-left: 16px !important; margin-right: 16px !important; }
.wpanel { display: none !important; padding: 20px; }
.wpanel.on { display: grid !important; }
.wstat { display: flex; flex-wrap: wrap; gap: 10px; }
.wstat > div { display: grid; min-width: 130px; padding: 11px 15px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.wstat > div.bad { background: var(--bad-soft); border-color: transparent; }
.wstat > div.bad b { color: var(--bad); }
.wstat span { font-size: .76rem; color: var(--muted); font-weight: 700; }
.wstat b { font-size: 1.18rem; letter-spacing: -.025em; }
.wstat small { color: var(--muted); font-weight: 500; font-size: .74rem; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { padding: 7px 13px; border-radius: 999px; border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); background: transparent; color: var(--brand); font: inherit; font-size: .84rem; font-weight: 800; cursor: pointer; }
.chip:hover { background: var(--brand-soft); border-style: solid; }

/* ═════════ Sign-in screens ═════════ */
.no-side main { max-width: none; padding: 0; }
.no-side .foot { display: none; }
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art {
    position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px; color: #fff;
    background:
        radial-gradient(circle at 90% 5%, rgba(242,179,61,.45), transparent 35%),
        radial-gradient(circle at 0% 100%, rgba(25,179,122,.55), transparent 45%),
        linear-gradient(150deg, var(--forest-2), var(--forest) 60%, #0d5a3c);
}
.auth-art .brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.7rem; letter-spacing: -.04em; }
.auth-art h2 { font-size: 2.3rem; line-height: 1.1; letter-spacing: -.04em; margin: 0 0 14px; max-width: 14ch; }
.auth-art p { color: rgba(255,255,255,.8); max-width: 42ch; margin: 0; }
.auth-points { display: grid; gap: 10px; margin-top: 26px; }
.auth-points span { display: flex; align-items: center; gap: 10px; font-weight: 600; color: rgba(255,255,255,.9); }
.auth-points span::before { content: "✓"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(242,179,61,.25); color: var(--gold); font-weight: 800; font-size: .8rem; }
.auth-art::after {
    content: ""; position: absolute; right: -60px; bottom: -80px; width: 420px; height: 420px; opacity: .1; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M50 0v40M50 40c-10 10-25 12-35 25M50 40c10 10 25 12 35 25M50 40v30M50 70c-6 8-16 10-22 20M50 70c6 8 16 10 22 20M15 65c-5 8-3 18-8 25M85 65c5 8 3 18 8 25'/%3E%3C/svg%3E") no-repeat center / contain;
}
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-form .card { width: 100%; max-width: 430px; padding: 30px; box-shadow: var(--shadow-lg); }
.auth-form h1 { font-size: 1.6rem; }
@media (max-width: 860px) {
    .auth { grid-template-columns: 1fr; }
    .auth-art { padding: 28px 22px 34px; }
    .auth-art h2 { font-size: 1.7rem; }
    .auth-points { display: none; }
    .auth-form { padding: 0 16px 40px; margin-top: -18px; }
}
.no-side .narrow { width: calc(100% - 32px); margin: 48px auto; }
.sheet tr.quiet td { color: var(--muted); background: color-mix(in srgb, var(--bg) 60%, transparent); }
.sheet td, .sheet th { padding: 9px 12px; font-size: .88rem; }
@media (max-width: 520px) {
    .wtabs { gap: 3px; padding: 6px; }
    .wtab { min-width: 0; padding: 9px 4px; font-size: .8rem; white-space: nowrap; }
    .wpanel { padding: 16px; }
}

/* ═════════ Money wellbeing ═════════ */
.vitals { display: grid; grid-template-columns: 1fr auto; gap: 14px; margin-bottom: 14px; }
.card.health { display: flex; align-items: center; gap: 18px; margin: 0; text-decoration: none; color: inherit; }
.ring { flex: none; }
.ring-arc { transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); animation: ringin 1.2s cubic-bezier(.2,.8,.2,1); }
@keyframes ringin { from { stroke-dashoffset: 327; } }
.ring-num { font: 800 34px "Plus Jakarta Sans", system-ui, sans-serif; fill: var(--ink); letter-spacing: -.04em; }
.ring-sub { font: 600 11px "Plus Jakarta Sans", system-ui, sans-serif; fill: var(--muted); }
.eyebrow { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.health-level { font-size: 1.35rem; letter-spacing: -.02em; }
.card.streak { margin: 0; min-width: 130px; display: grid; justify-items: center; align-content: center; text-align: center; gap: 0; }
.card.streak .flame { font-size: 2.2rem; line-height: 1; }
.card.streak.on .flame { animation: flicker 1.6s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.12) rotate(3deg); } }
.card.streak b { font-size: 2rem; letter-spacing: -.04em; line-height: 1.1; }
.card.streak span { font-size: .78rem; color: var(--muted); font-weight: 600; }
@media (max-width: 560px) { .vitals { grid-template-columns: 1fr; } .card.streak { grid-auto-flow: column; justify-content: start; gap: 12px; text-align: left; } }

.nudges { display: grid; gap: 8px; margin-bottom: 14px; }
.nudge { display: flex; gap: 12px; align-items: flex-start; padding: 12px 15px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); animation: slidein .5s ease both; }
.nudge:nth-child(2) { animation-delay: .08s; } .nudge:nth-child(3) { animation-delay: .16s; } .nudge:nth-child(4) { animation-delay: .24s; }
@keyframes slidein { from { opacity: 0; transform: translateY(8px); } }
.nudge span { font-size: 1.3rem; line-height: 1.2; }
.nudge p { margin: 0; font-weight: 600; }
.nudge.good { background: var(--brand-soft); border-color: transparent; }
.nudge.warn { background: var(--bad-soft); border-color: transparent; }

.badge-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.medal { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; text-align: center; background: var(--bg); border: 1.5px dashed var(--line); color: var(--muted); }
.medal:not(.got) span { opacity: .35; }
.medal span { font-size: 1.7rem; line-height: 1; }
.medal small { font-size: .7rem; font-weight: 700; line-height: 1.2; }
.medal.got { border: 0; color: var(--ink); background: linear-gradient(160deg, var(--gold-soft), var(--card)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold) 55%, transparent); }
.together { margin: 0 0 18px; padding: 14px 18px; border-radius: 18px; color: #fff; font-weight: 500;
    background: linear-gradient(120deg, var(--forest-2), var(--brand)); box-shadow: var(--shadow); }

/* My plan */
.pagetabs { border-radius: 16px; border: 1px solid var(--line); margin-bottom: 16px; }
.pagetabs a { text-align: center; text-decoration: none; }
.splitbar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--bg-2); margin-bottom: 14px; }
.splitbar .s1 { background: var(--gold); } .splitbar .s2 { background: var(--forest-2); } .splitbar .s3 { background: var(--brand-2); }
.budgettable td { padding: 8px 4px !important; }
.goalgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.goal { margin: 0; }
.goal.done { background: linear-gradient(160deg, var(--brand-soft), var(--card)); }
.goal-emoji { font-size: 2rem; }
.emojipick { display: flex; flex-wrap: wrap; gap: 6px; }
.emojipick label { cursor: pointer; }
.emojipick input { position: absolute; opacity: 0; width: 1px; }
.emojipick span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 1.3rem; background: var(--bg); border: 1.5px solid var(--line); }
.emojipick input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.payout { display: grid; justify-items: center; margin-top: 18px; padding: 22px; border-radius: 20px; text-align: center; color: #fff;
    background: radial-gradient(circle at 85% 0%, rgba(242,179,61,.5), transparent 45%), linear-gradient(135deg, var(--forest-2), var(--brand)); }
.payout span { opacity: .85; font-weight: 600; } .payout b { font-size: 2.2rem; letter-spacing: -.04em; } .payout small { opacity: .8; }
.loanpreview { padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--brand) 5%, var(--card)); border: 1px dashed color-mix(in srgb, var(--brand) 35%, var(--line)); }
.loanpreview .wstat > div { background: var(--card); }
label.check.pause { padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); margin: 0; }
.part { display: inline-block; margin: 2px 10px 2px 0; font-size: .8rem; }
.earned { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 16px; }
.earned span { padding: 5px 11px; border-radius: 999px; background: var(--gold-soft); font-size: .82rem; font-weight: 700; }
.choice.three { grid-template-columns: repeat(3, 1fr); }
.choice.three label { padding: 12px 10px; }
.choice.three small { font-size: .74rem; }
@media (max-width: 480px) { .choice.three { grid-template-columns: 1fr; } }

/* Who owes who */
.iou.late { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); box-shadow: inset 4px 0 0 var(--bad), var(--shadow); }
.iou.done { opacity: .75; }
.confirm-state { margin: 10px 0 0; font-size: .88rem; }
.iou-actions { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.iou-actions > summary { cursor: pointer; font-weight: 800; color: var(--brand); list-style: none; }
.iou-actions > summary::after { content: " ▾"; }
.iou-actions[open] > summary::after { content: " ▴"; }
.confirmcard { padding: 28px; box-shadow: var(--shadow-lg); }
.confirmcard details > summary { list-style: none; }
.confirmcard details > summary::-webkit-details-marker { display: none; }
.invite { margin-top: 22px; padding: 16px; border-radius: 16px; background: var(--brand-soft); }

/* Personal home: coming-up list */
.duerow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line, #eee); color: inherit; text-decoration: none; }
.duerow:first-of-type { border-top: 0; }
.duerow .who { display: flex; align-items: center; gap: 10px; }

/* Find a lender */
.badge.warn { background: var(--gold-soft); color: var(--gold-deep); }
.rulebox.warn { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 35%, transparent); color: #6b4a07; }
.lendercard { display: block; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.lendercard:hover { transform: translateY(-2px); }
.lendercard.featured { border: 1.5px solid var(--gold); background: linear-gradient(180deg, var(--gold-soft), var(--card, #fff) 60%); }
.lendercard .tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.lendercard .wstat { margin-top: 10px; }
.emojipick.plans span { width: auto; height: auto; padding: 10px 16px; font-size: .9rem; text-align: center; }
@media (prefers-color-scheme: dark) {
    .rulebox.warn { color: #f6dc9c; }
    .lendercard.featured { background: color-mix(in srgb, var(--gold) 10%, var(--card, #111)); }
}
label.check.agree { align-items: flex-start; font-weight: 500; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
label.check.agree input { flex: none; margin-top: 2px; }

/* My business */
.bizform.sale { border-top: 4px solid var(--brand); }
.bizform.spend { border-top: 4px solid var(--gold); }
.emojipick.cats span { width: auto; height: auto; padding: 8px 12px; font-size: .85rem; }
.bizstrip { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: inherit; text-decoration: none; }
.bizstrip .wstat { margin: 0; }
.bizstrip.invite { background: var(--gold-soft); }

/* Terms and privacy */
.legal h2 { font-size: 1.05rem; margin: 22px 0 6px; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 20px; margin: 6px 0; }
.foot a { color: inherit; }
.card.danger { border: 1.5px solid color-mix(in srgb, var(--bad) 35%, transparent); }
.btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }

/* Install as an app */
.installbar { position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 10px;
    max-width: 520px; margin: 0 auto; padding: 10px 12px; border-radius: 16px; background: var(--card, #fff); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.installbar[hidden] { display: none; }
.installbar img { border-radius: 10px; }
.installbar span { flex: 1; line-height: 1.25; }
@media (min-width: 900px) { .installbar { bottom: 20px; } }

/* Mobile money payment */
.paywait { font-size: 3rem; margin-top: 8px; }
.fakephone { margin: 16px auto 4px; max-width: 280px; padding: 14px; border-radius: 22px; border: 6px solid #1d2b25; background: #f2f6f4; color: #10231b; }
.fakephone small { display: block; font-size: .65rem; letter-spacing: .04em; color: var(--warn); font-weight: 700; }
.fakephone p { margin: 8px 0 12px; }

/* Codes to send on WhatsApp */
.bigcode { font-size: 2.2rem; font-weight: 800; letter-spacing: .25em; text-align: center; margin: 14px 0; padding: 12px; border-radius: 14px; background: var(--bg-2); }
