﻿/* Vestri MVP — styles */
:root {
  --deep: #12372F;
  --teal: #115d59;
  --teal-2: #3F5A53;
  --cream: #F6F3EC;
  --paper: #FFFFFF;
  --lime: #C6E69A;
  --mint: #A8E0CB;
  --pink: #F9C4D6;
  --peach: #F5A882;
  --sky: #8FD0EE;
  --ink: #12372F;
  --ink-2: #3F5A53;
  --muted: #6B7F79;
  --line: #E4DFD3;
  --line-2: #EFEBE2;
  --good: #1E8A5A;
  --good-bg: #E3F4EA;
  --bad: #B93A2B;
  --bad-bg: #FBE6E2;
  --warn: #9A6A12;
  --warn-bg: #FBF0D9;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(18,55,47,.06), 0 6px 24px rgba(18,55,47,.06);
  --accent-text: #12372F;
  --info-bg: #E8F1F7; --info-ink: #1f4a66;
  --good-ink: #145c3c; --warn-ink: #6d4a0b; --bad-ink: #7d241a;
  --mint-bg: #E4F5EE;
  /* Shared scale: use these instead of one-off numbers in new rules.
     Spacing on a 4px grid, one type scale, four radii, and the minimum touch size. */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --fs-xs: 12px; --fs-sm: 13.5px; --fs-md: 15px; --fs-lg: 17px; --fs-xl: 20px; --fs-2xl: 26px;
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px; --r-pill: 999px;
  --tap: 44px;      /* every tappable thing gets at least this much touch area */
  --tap-sm: 36px;   /* visual height of small buttons (their touch area is still --tap) */
  --on-color: #12372F;  /* ink on brand-coloured surfaces (lime, sky, peach…), same in both themes */
  --link: #115d59;
  --focus: #115d59;
  --soft-bg: rgba(168,224,203,.45);
  --streak-ink: #9A4A12;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --cream: #0E1B18; --paper: #16261F; --ink: #E7EFEA; --ink-2: #C2D2CB; --muted: #8FA59E;
  --line: #2B403A; --line-2: #1F332D; --deep: #1D5549;
  --accent-text: #A8E0CB;
  --good: #5FCB94; --good-bg: #173A2A; --good-ink: #A7E8C4;
  --bad: #F08A7A; --bad-bg: #3E1E19; --bad-ink: #F6C0B6;
  --warn: #E6B65C; --warn-bg: #3A2E14; --warn-ink: #F2D9A4;
  --info-bg: #17303D; --info-ink: #B9DCEF; --mint-bg: #173A31;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
  --link: #A8E0CB; --focus: #C6E69A; --soft-bg: rgba(168,224,203,.16); --streak-ink: #F5B27A;
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --cream: #0E1B18; --paper: #16261F; --ink: #E7EFEA; --ink-2: #C2D2CB; --muted: #8FA59E;
  --line: #2B403A; --line-2: #1F332D; --deep: #1D5549;
  --accent-text: #A8E0CB;
  --good: #5FCB94; --good-bg: #173A2A; --good-ink: #A7E8C4;
  --bad: #F08A7A; --bad-bg: #3E1E19; --bad-ink: #F6C0B6;
  --warn: #E6B65C; --warn-bg: #3A2E14; --warn-ink: #F2D9A4;
  --info-bg: #17303D; --info-ink: #B9DCEF; --mint-bg: #173A31;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
  --link: #A8E0CB; --focus: #C6E69A; --soft-bg: rgba(168,224,203,.16); --streak-ink: #F5B27A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--cream); color: var(--ink); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); }
/* One visible focus ring for keyboard users, everywhere (inputs draw their own). */
:where(button, a, summary, [tabindex], input[type=checkbox], input[type=radio], input[type=range]):focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 800; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--good); } .down { color: var(--bad); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
/* minmax(0, 1fr): a long line inside can't push the column wider than the screen */
.stack { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.stack.tight { gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.grow { flex: 1; min-width: 0; }
.eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- buttons ---------- */
/* Variants: default (deep), .lime (main action), .soft, .ghost, .danger. Sizes: .sm (36px), default (44px), .lg (52px). */
.btn { position: relative; border: 0; border-radius: var(--r-pill); min-height: var(--tap); padding: 10px 18px; font-weight: 800; background: var(--deep); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none; box-shadow: 0 2px 0 rgba(18,55,47,.18); transition: transform .08s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.lime { background: var(--lime); color: var(--on-color); box-shadow: 0 2px 0 #9fc46e; }
.btn.ghost { background: transparent; color: var(--accent-text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.soft { background: var(--soft-bg); color: var(--accent-text); box-shadow: none; }
.btn.danger { background: var(--bad-bg); color: var(--bad); box-shadow: none; }
.btn.sm { min-height: var(--tap-sm); padding: 6px 14px; font-size: var(--fs-sm); }
.btn.lg { min-height: 52px; padding: 14px 22px; font-size: 16px; }
.btn.block { width: 100%; }
.link { position: relative; background: none; border: 0; padding: 0; color: var(--link); font-weight: 800; }
/* Small controls keep their look but get an invisible 44×44 touch area around them. */
.btn.sm, .link, .x, .apb-btn, .tk-del, .tk-st, .kpill, .seg button, .lim-seg button, .tk-filter button, .chip, .stepper button,
.kgoal-edit, .kles-dot, .ktoday-all, .avatar-btn, .fme-chips button, .proof-add { position: relative; }
:is(.btn.sm, .link, .x, .apb-btn, .tk-del, .tk-st, .kpill, .seg button, .lim-seg button, .tk-filter button, .chip, .stepper button,
.kgoal-edit, .kles-dot, .ktoday-all, .avatar-btn, .fme-chips button)::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, var(--tap)); height: max(100%, var(--tap)); transform: translate(-50%, -50%);
}

/* ---------- cards ---------- */
.card { background: var(--paper); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; border: 1.5px solid var(--line); }
.card.dark { background: var(--deep); color: #fff; }
.card.dark .muted { color: #A7C4BD; }
.card.lime { background: linear-gradient(135deg, var(--lime), var(--mint)); color: var(--on-color); }
.card.mint { background: linear-gradient(135deg, var(--mint), var(--sky)); color: var(--on-color); }
.card.lime .muted, .card.mint .muted { color: #3F5A53; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.divider { height: 1px; background: var(--line-2); margin: 4px 0; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.lime { background: var(--lime); color: var(--deep); }
.pill.dark { background: var(--deep); color: #fff; }
.badge-n { background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 800; padding: 1px 7px; margin-left: auto; }

.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 28px; }

.bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
.bar.over > i { background: var(--bad); }
.mixbar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; }
.mixbar > i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ink-2); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; background: var(--c); }

.notice { border-radius: 14px; padding: 12px 14px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.notice.info { background: var(--info-bg); color: var(--info-ink); }
.notice.good { background: var(--good-bg); color: var(--good-ink); }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
.notice.bad { background: var(--bad-bg); color: var(--bad-ink); }
.notice b { display: block; }

.checks { display: grid; gap: 6px; font-size: 13.5px; }
.check { display: flex; gap: 8px; align-items: flex-start; }
.check .ic { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900; margin-top: 1px; }
.check.ok .ic { background: var(--good-bg); color: var(--good); }
.check.block .ic { background: var(--bad-bg); color: var(--bad); }
.check.warn .ic { background: var(--warn-bg); color: var(--warn); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; padding: 8px 8px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl td.r, .tbl th.r { text-align: right; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
/* 16px text so iPhones don't zoom the page when a field is tapped */
.input, select.input { width: 100%; min-height: var(--tap); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--paper); outline: none; font-size: 16px; }
.input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.toggle:last-child { border-bottom: 0; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #cfd6d3; border-radius: 99px; transition: .2s; }
.switch i::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: var(--paper); transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--teal); }
.switch input:checked + i::after { transform: translateX(18px); }
/* Segmented switch (.seg) and the "limit / no limit" one share a look. */
.seg, .lim-seg { display: inline-flex; background: var(--line-2); border-radius: var(--r-pill); padding: 3px; gap: 2px; }
.seg button, .lim-seg button { border: 0; background: transparent; border-radius: var(--r-pill); min-height: 34px; padding: 6px 14px; font-weight: 800; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--lime); color: var(--on-color); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: var(--paper); border-radius: var(--r-pill); min-height: var(--tap-sm); padding: 7px 14px; font-weight: 800; font-size: var(--fs-sm); display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--lime); color: var(--on-color); border-color: var(--lime); }

/* ---------- sim bar ---------- */
.simbar { position: sticky; top: 0; z-index: 30; background: linear-gradient(90deg, #12372F, #115d59); color: #fff; padding: max(8px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.simbar .lbl { color: #A7C4BD; font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.simbar .date { font-weight: 800; font-size: 14px; }
.simbar button { border: 0; border-radius: 999px; padding: 5px 11px; font-weight: 800; font-size: 12.5px; background: rgba(255,255,255,.12); color: #fff; }
.simbar button:hover { background: rgba(255,255,255,.2); }
.simbar button.on { background: var(--lime); color: var(--deep); }
.simbar .sep { width: 1px; height: 20px; background: rgba(255,255,255,.2); }
.simbar .who { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---------- parent shell ---------- */
.pshell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 44px); }
.side { background: var(--paper); border-right: 1.5px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 44px; height: calc(100vh - 44px); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 22px; letter-spacing: -.02em; padding: 0 8px 16px; }
.brand img { width: 34px; height: 34px; }
.nav-i { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 0; background: transparent; font-weight: 800; color: var(--ink-2); text-align: left; width: 100%; }
.nav-i { min-height: var(--tap); }
.nav-i:hover:not(.on) { background: rgba(198,230,154,.3); }
.nav-i.on { background: var(--lime); color: var(--on-color); }
.nav-i .ico { width: 20px; text-align: center; }
.side-foot { margin-top: auto; padding: 10px; font-size: 12px; color: var(--muted); }
.pmain { padding: 26px 28px 80px; max-width: 1180px; width: 100%; min-width: 0; }
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.bottomnav { display: none; }

/* pipeline tracker */
.pipe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pipe .st { padding: 10px; border-radius: 12px; background: var(--line-2); font-size: 12px; }
.pipe .st b { display: block; font-size: 16px; }
.pipe .st.on { background: var(--mint); }
.pipe .st.done { background: var(--deep); color: #fff; }

.flow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.flow .node { flex: 1; min-width: 140px; border-radius: 14px; padding: 12px; background: var(--line-2); font-size: 13px; }
.flow .node b { display: block; font-size: 14px; }
.flow .node.vestri { background: var(--lime); }
.flow .arrow { align-self: center; font-weight: 900; color: var(--muted); }

pre.json { background: #0f2a24; color: #cfe8df; border-radius: 10px; padding: 10px; font-size: 12px; overflow-x: auto; margin: 6px 0 0; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ---------- kid shell ---------- */
.kshell { max-width: 460px; margin: 0 auto; min-height: calc(100vh - 44px); background: var(--cream); padding: 16px 16px 96px; position: relative; }
.khead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.kpill { border: 0; min-height: var(--tap-sm); color: var(--ink); background: var(--paper); border-radius: 999px; padding: 5px 12px; font-weight: 800; font-size: 13px; box-shadow: var(--shadow); display: inline-flex; gap: 5px; align-items: center; }
.knav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(460px, 100%); background: var(--paper); border-top: 1.5px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); z-index: 20; }
.knav button { border: 0; background: none; display: grid; justify-items: center; gap: 2px; font-size: 12px; font-weight: 800; color: var(--muted); padding: 4px; border-radius: 12px; }
.knav button .e { font-size: 22px; line-height: 1; filter: grayscale(1); opacity: .6; }
.knav button.on { color: var(--accent-text); }
.knav button.on .e { filter: none; opacity: 1; }
.hero { background: var(--deep); color: #fff; border-radius: 26px; padding: 20px; position: relative; overflow: hidden; }
.hero .big { font-size: 40px; font-weight: 900; letter-spacing: -.02em; }
.hero .muted { color: #A7C4BD; }
.tree-wrap { display: grid; place-items: center; }
.task { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.task .ti { width: 44px; height: 44px; border-radius: 14px; background: var(--line-2); display: grid; place-items: center; font-size: 22px; flex: none; }
.task.done { opacity: .7; }
.fundcard { display: flex; gap: 12px; align-items: center; background: var(--paper); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.fundcard .fi { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; flex: none; }
.risk { display: inline-flex; gap: 2px; vertical-align: middle; }
.risk i { width: 7px; height: 10px; border-radius: 2px; background: var(--line); }
.risk i.on { background: var(--peach); }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 36px; height: 36px; color: var(--ink); border-radius: 50%; border: 0; background: var(--line-2); font-weight: 900; font-size: 16px; }
.stepper b { min-width: 46px; text-align: center; font-size: 16px; }

/* ---------- charts ---------- */
.chart { position: relative; }
.chart svg { width: 100%; display: block; }
.chart .yl { position: absolute; right: 0; font-size: 11px; color: var(--muted); background: transparent; padding: 0 4px; border-radius: 4px; }
.card.dark .chart .yl, .hero .chart .yl { background: transparent; color: #A7C4BD; }

/* ---------- modal & toast ---------- */
/* The column is minmax(0, 1fr) so wide content (a row of inputs) can't push the dialog off screen. */
.scrim { position: fixed; inset: 0; background: rgba(18,55,47,.45); z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px; overscroll-behavior: contain; animation: fade .15s; }
.modal { background: var(--paper); border-radius: 22px; width: min(520px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: pop .18s; }
/* The title and ✕ stay in view while a long dialog scrolls. */
.modal .mh { display: flex; align-items: center; justify-content: space-between; margin: -22px -22px 14px; padding: 22px 22px 10px; gap: 10px; position: sticky; top: -22px; z-index: 2; background: var(--paper); }
.x { border: 0; background: var(--line-2); width: 36px; height: 36px; border-radius: 50%; font-weight: 900; flex: none; color: var(--ink-2); }
.x:hover { background: var(--line); }
/* Phones: dialogs become bottom sheets, clear of the home bar. */
@media (max-width: 560px) {
  .scrim { place-items: end center; padding: 12px 0 0; }
  .modal { width: 100%; border-radius: 24px 24px 0 0; max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px - env(safe-area-inset-top)); padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); animation: sheetUp .22s cubic-bezier(.2,.8,.2,1); }
  .modal .mh { margin: -18px -16px 12px; padding: 18px 16px 10px; top: -18px; }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } }
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--deep); color: #fff; border-radius: 14px; padding: 12px 16px; font-weight: 700; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: pop .2s; }
.toast.bad { background: var(--bad); }
.toast.good { background: var(--good); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.celebrate { animation: bounce .6s; }
@keyframes bounce { 30% { transform: scale(1.06); } 60% { transform: scale(.98); } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-box { width: min(560px, 100%); text-align: center; }
.profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 22px 0; }
.profile { background: var(--paper); border: 0; border-radius: 20px; padding: 18px 12px; box-shadow: var(--shadow); display: grid; justify-items: center; gap: 8px; font-weight: 800; }
.profile:hover { transform: translateY(-2px); }
.pinpad { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; justify-content: center; margin-top: 16px; }
.pinpad button { height: 60px; border-radius: 18px; border: 0; background: var(--paper); font-size: 22px; font-weight: 800; box-shadow: var(--shadow); }
.dots { display: flex; gap: 12px; justify-content: center; margin: 16px 0 4px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent-text); }
.dots i.on { background: var(--accent-text); }
.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .pshell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .pmain { padding: 18px max(16px, env(safe-area-inset-right)) 100px max(16px, env(safe-area-inset-left)); }
  /* parent bottom bar: big icons, readable labels, whole tab highlighted */
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; position: fixed; bottom: 0; left: 0; right: 0; background: var(--paper); border-top: 1.5px solid var(--line); z-index: 20; padding: 8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); box-shadow: 0 -6px 20px rgba(18,55,47,.06); }
  .bottomnav button { border: 0; background: none; display: grid; justify-items: center; align-content: center; min-height: 52px; font-size: 12.5px; font-weight: 800; color: var(--ink); opacity: .62; gap: 3px; padding: 7px 2px 6px; border-radius: 14px; position: relative; transition: background .15s, opacity .15s; }
  .bottomnav button.on { opacity: 1; color: var(--on-color); background: var(--lime); }
  .bottomnav .ico { font-size: 23px; line-height: 1; }
  .bottomnav .badge-n { position: absolute; top: 2px; right: calc(50% - 22px); }
  .pipe { grid-template-columns: repeat(2, 1fr); }
  /* page header actions: tidy full-width rows instead of a ragged wrap */
  .phead > .row { width: 100%; }
  .phead > .row > .btn { flex: 1 1 auto; padding-left: 14px; padding-right: 14px; }
  .phead > .row > .btn[aria-label] { flex: 0 0 auto; }
  h1 { font-size: 22px; }
  .simbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .simbar::-webkit-scrollbar { display: none; }
  .simbar > *, .simbar .who > * { flex: none; }
  .simbar .who { margin-left: 0; flex-wrap: nowrap; }
}

/* ================= Vibrant layer: Vestri brand colours, used boldly ================= */
body { background:
  radial-gradient(900px 500px at 100% -10%, rgba(198,230,154,.35), transparent 60%),
  radial-gradient(700px 500px at -10% 110%, rgba(143,208,238,.25), transparent 60%),
  var(--cream); background-attachment: fixed; }

/* dark hero surfaces get soft brand glows */
.hero, .card.dark {
  background:
    radial-gradient(260px 200px at 92% 8%, rgba(198,230,154,.35), transparent 70%),
    radial-gradient(240px 200px at 0% 100%, rgba(143,208,238,.28), transparent 70%),
    radial-gradient(180px 140px at 60% 120%, rgba(249,196,214,.22), transparent 70%),
    var(--deep);
}

/* navigation: lime pills */
.knav button.on .e { background: var(--lime); border-radius: 12px; padding: 4px 14px; }

/* coloured surfaces always use dark ink */
.s-sky, .s-peach, .s-mint, .s-lime, .k-lime, .k-peach, .k-sky, .card.lime, .pill.lime { color: var(--on-color); }

/* money pipeline: one brand colour per stage */
.pipe .st { position: relative; border-radius: 16px; padding: 12px; transition: opacity .2s; }
.pipe .st.s-sky { background: var(--sky); }
.pipe .st.s-peach { background: var(--peach); }
.pipe .st.s-mint { background: var(--mint); }
.pipe .st.s-lime { background: var(--lime); }
.pipe .st.idle { opacity: .55; }
.pipe .st-i { position: absolute; top: 8px; right: 10px; font-size: 16px; }

/* approvals: colour-coded by type */
.card.ap { border: 0; border-left: 6px solid var(--line); background: var(--paper); }
.ap-task { border-left-color: var(--lime) !important; }
.ap-gift { border-left-color: var(--pink) !important; }
.ap-unlock { border-left-color: var(--peach) !important; }
.ap-mix, .ap-move { border-left-color: var(--sky) !important; }
/* approvals as coloured bubbles: who, what, how much, ✕ / ✓ */
.ap-wrap { display: grid; gap: 2px; grid-template-columns: minmax(0, 1fr); }
.apb { --bc: var(--sky); display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 7px; border-radius: 999px; background: color-mix(in srgb, var(--bc) 38%, var(--paper)); }
.apb.t-task { --bc: var(--lime); } .apb.t-gift { --bc: var(--pink); } .apb.t-spend, .apb.t-unlock { --bc: var(--peach); } .apb.t-familyTask { --bc: var(--mint); }
.apb .avatar { width: 34px; height: 34px; font-size: 17px; box-shadow: none; }
.apb-txt { flex: 1; min-width: 0; }
.apb-t { font-weight: 800; font-size: 14px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apb-from { font-weight: 600; color: var(--ink-2); }
.apb-s { font-size: 12px; color: var(--ink-2); }
.apb-amt { background: var(--paper); border-radius: 999px; padding: 5px 11px; font-weight: 900; font-size: 14px; flex: none; }
.apb-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; font: 800 16px/1 inherit; cursor: pointer; flex: none; }
.apb-no { background: var(--paper); color: var(--ink-2); }
.apb-ok { background: var(--ink); color: var(--paper); }
.apb-ok:disabled { opacity: .3; cursor: not-allowed; }
.apb-btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.ap-more summary { font-size: 12px; color: var(--ink-2); padding: 6px 0 6px 51px; cursor: pointer; width: max-content; }
.ap-more .ap-detail { padding: 6px 12px 6px 51px; font-size: 13px; }
/* Phones: the request name gets two lines instead of being cut to a few letters. */
@media (max-width: 480px) {
  .apb { border-radius: 24px; gap: 8px; }
  .apb-t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .apb-amt { padding: 4px 9px; font-size: 13px; }
  .ap-more summary, .ap-more .ap-detail { padding-left: 14px; }
}

/* kids: each child carries their own colour */
.kidcard { border-top: 8px solid var(--kc); }
.profile { background: linear-gradient(180deg, var(--kc, var(--lime)) 0 38%, var(--paper) 38%); }
.profile:first-child { --kc: var(--lime); }
.avatar { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px rgba(18,55,47,.08); }

/* kid app */
.kpill.k-lime { background: var(--lime); }
.kpill.k-peach { background: var(--peach); }
.kpill.k-sky { background: var(--sky); }
.task { border-left: 6px solid transparent; }
.task:nth-of-type(5n+1) { border-left-color: var(--lime); } .task:nth-of-type(5n+1) .ti { background: rgba(198,230,154,.6); }
.task:nth-of-type(5n+2) { border-left-color: var(--sky); }  .task:nth-of-type(5n+2) .ti { background: rgba(143,208,238,.55); }
.task:nth-of-type(5n+3) { border-left-color: var(--pink); } .task:nth-of-type(5n+3) .ti { background: rgba(249,196,214,.65); }
.task:nth-of-type(5n+4) { border-left-color: var(--peach); } .task:nth-of-type(5n+4) .ti { background: rgba(245,168,130,.5); }
.task:nth-of-type(5n+5) { border-left-color: var(--mint); } .task:nth-of-type(5n+5) .ti { background: rgba(168,224,203,.6); }
.fundcard { border-left: 6px solid var(--line); }
.chips .chip[title] { background: #FCE1EB; border-color: transparent; color: var(--on-color); }
.bar > i { background: linear-gradient(90deg, var(--teal), #3fa38f); }
.mixbar { height: 14px; }
.hero .big { text-shadow: 0 2px 0 rgba(0,0,0,.15); }
.toast.good { background: linear-gradient(90deg, #1E8A5A, #115d59); }

/* ---------- photo avatars ---------- */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 120px; height: 120px; font-size: 60px; }
.avatar-btn { position: relative; border: 0; background: none; padding: 0; border-radius: 50%; flex: none; }
.avatar-btn .cam { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; font-size: 11px; box-shadow: 0 0 0 2px var(--paper); }
.avatar-btn:hover .avatar { filter: brightness(1.05); transform: scale(1.04); transition: .15s; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.emoji-grid button { height: 46px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); font-size: 24px; }
.emoji-grid button.on { background: var(--lime); border-color: var(--lime); }

/* ---------- notifications & lessons ---------- */
.notif { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; border: 0; background: var(--paper); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); border-left: 5px solid transparent; }
.notif.new { border-left-color: var(--lime); background: linear-gradient(90deg, rgba(198,230,154,.25), var(--paper) 40%); }
.notif.in-app { box-shadow: none; border: 1px solid var(--line-2); border-left-width: 5px; }
.notif .grow { display: grid; gap: 2px; }
.notif .ni, .lesson-banner .ni { width: 38px; height: 38px; border-radius: 12px; background: var(--line-2); display: grid; place-items: center; font-size: 20px; flex: none; }
.notif .tiny { text-align: right; white-space: nowrap; }
.lesson-banner { display: flex; gap: 12px; align-items: center; width: 100%; border: 0; text-align: left; background: linear-gradient(135deg, var(--sky), var(--mint)); color: var(--on-color); }
.lesson-banner .grow { display: grid; gap: 1px; }
.lesson-banner .ni { background: rgba(255,255,255,.6); }
.lesson-banner .eyebrow, .lesson-banner .muted { color: #2d4d45; }
.lesson-card { background: linear-gradient(135deg, #E3F2CF, #D9EEF7); border-radius: 20px; padding: 28px 20px; text-align: center; min-height: 190px; display: grid; place-items: center; gap: 10px; color: var(--on-color); }
.lesson-card p { font-size: 19px; font-weight: 800; line-height: 1.35; }
.quiz-opt { width: 100%; text-align: left; border: 1.5px solid var(--line); background: var(--paper); border-radius: 14px; padding: 13px 14px; font-weight: 800; }
.quiz-opt:hover:not(:disabled) { border-color: var(--teal); }
.quiz-opt.right { background: var(--good-bg); border-color: var(--good); color: var(--good-ink); }
.quiz-opt.wrong { background: var(--bad-bg); border-color: var(--bad); color: var(--bad-ink); }
.lvl { padding: 8px 10px; border-radius: 14px; }
.lvl.cur { background: rgba(198,230,154,.35); }
.lvl.locked { opacity: .55; }

/* ---------- installable app ---------- */
.install-cta { display: flex; gap: 12px; align-items: center; text-align: left; background: var(--paper); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); margin-top: 18px; border: 2px solid var(--lime); }
.card .install-cta { box-shadow: none; margin: 0; border: 0; padding: 0; }
.install-cta img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.install-cta .grow { display: grid; gap: 2px; }
/* Installed full-screen on phones with a notch: keep content clear of the status bar. */

.login { padding-top: max(24px, env(safe-area-inset-top)); }

/* ---------- app feel ---------- */
html { -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-y: none; }
button, .chip, .task, .fundcard, .nav-i, .knav button, .bottomnav button, .profile { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.task, .fundcard, .profile, .notif, .lesson-banner, .chip { transition: transform .12s ease; }
.task:active, .fundcard:active, .profile:active, .notif:active, .lesson-banner:active, .chip:active { transform: scale(.97); }
.knav button:active .e, .bottomnav button:active .ico { transform: scale(.88); }
/* Animate the content, not the container, so fixed tab bars inside it stay put. */
.screen-in > :not(.knav):not(.bottomnav) { animation: screenIn .3s cubic-bezier(.2,.8,.2,1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } }
.tree-btn { border: 0; background: none; padding: 0; cursor: pointer; }
.tree-btn svg { transform-origin: 50% 95%; }
.tree-btn svg.wiggle { animation: wiggle .7s ease; }
@keyframes wiggle { 20% { transform: rotate(-6deg) scale(1.04); } 45% { transform: rotate(5deg); } 70% { transform: rotate(-2deg); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; width: 9px; height: 13px; border-radius: 2px; }
.falling-leaf { position: fixed; z-index: 90; pointer-events: none; font-size: 20px; }

/* ---------- opening animation ---------- */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; cursor: pointer;
  background: radial-gradient(600px 400px at 50% 30%, rgba(198,230,154,.55), transparent 70%), radial-gradient(500px 400px at 50% 110%, rgba(143,208,238,.4), transparent 70%), #F6F3EC;
  transition: opacity .45s ease, transform .45s ease; }
.splash.out { opacity: 0; transform: scale(1.06); pointer-events: none; }
.splash-in { display: grid; justify-items: center; gap: 4px; padding: 24px; }
.splash-tree { width: min(58vw, 260px); height: auto; overflow: visible; }
.splash-tree path { fill: #115d59; }
.sp-ground { fill: rgba(18,55,47,.12); transform-box: fill-box; transform-origin: center; animation: spGround .6s ease-out both; }
.sp-seed { fill: #8B5E3C; animation: spSeed 1.1s cubic-bezier(.3,1.4,.5,1) both; }
.sp-trunk { clip-path: inset(100% 0 0 0); animation: spTrunk .8s cubic-bezier(.3,.7,.3,1) .45s forwards; }
.sp-canopy { transform-box: fill-box; transform-origin: 50% 100%; transform: scale(0); animation: spCanopy .7s cubic-bezier(.3,1.5,.5,1) 1s forwards; }
.sp-leaf { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: spLeaf .45s cubic-bezier(.3,1.8,.5,1) var(--d) forwards; }
.splash-word { font-size: clamp(40px, 11vw, 64px); font-weight: 900; color: #12372F; letter-spacing: -.03em; opacity: 0; animation: spUp .6s ease 1.45s forwards; }
.splash-tag { color: #3F5A53; font-weight: 700; opacity: 0; animation: spUp .6s ease 1.65s forwards; }
.splash-skip { color: #6B7F79; font-size: 12px; margin-top: 18px; opacity: 0; animation: spUp .6s ease 2.1s forwards; }
@keyframes spGround { from { transform: scaleX(0); opacity: 0; } }
@keyframes spSeed { 0% { transform: translateY(-140px); opacity: 0; } 30% { opacity: 1; } 55% { transform: translateY(0); } 80% { opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes spTrunk { to { clip-path: inset(0 0 0 0); } }
@keyframes spCanopy { to { transform: scale(1); } }
@keyframes spLeaf { to { transform: scale(1); } }
@keyframes spUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.splash.calm *, .splash.calm { animation: none !important; }
.splash.calm .sp-trunk { clip-path: none; }
.splash.calm .sp-canopy, .splash.calm .sp-leaf { transform: none; }
.splash.calm .sp-seed { opacity: 0; }
.splash.calm .splash-word, .splash.calm .splash-tag, .splash.calm .splash-skip { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .screen-in > *, .tree-btn svg.wiggle { animation: none; }
}

/* ---------- floating tab bars above the host badge (Netlify free plan) ---------- */
.has-badge .knav, .has-badge .bottomnav {
  bottom: calc(var(--host-badge) + 6px); border: 1.5px solid var(--line); border-radius: 22px;
  box-shadow: 0 10px 30px rgba(18,55,47,.16); padding-bottom: 8px;
}
.has-badge .knav { width: min(440px, calc(100% - 20px)); }
.has-badge .bottomnav { left: 10px; right: 10px; }
.has-badge .kshell { padding-bottom: calc(110px + var(--host-badge)); }
.has-badge .toasts { bottom: calc(var(--host-badge) + 92px); }
@media (max-width: 860px) { .has-badge .pmain { padding-bottom: calc(110px + var(--host-badge)); } }
@media (min-width: 861px) { .has-badge .pmain { padding-bottom: calc(80px + var(--host-badge)); } }

/* ---------- Cache compliance: legal text, confirmation pages, email previews ---------- */
.legal-box { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 10px; background: var(--cream); }
.legal-box .tiny { line-height: 1.5; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--teal); }
.breakdown { border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.breakdown > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; font-size: 14px; border-top: 1px solid var(--line-2); }
.breakdown > div:first-child { border-top: 0; }
.breakdown > div span:first-child { color: var(--muted); }
.breakdown > div span:last-child { font-weight: 800; text-align: right; }
.breakdown > .tot { background: var(--mint-bg); }
.doc-text { max-height: 55vh; overflow: auto; font-size: 13px; line-height: 1.5; padding-right: 4px; }
.doc-text h4 { margin: 12px 0 4px; } .doc-text p { margin: 0 0 8px; }
.email-prev { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; background: var(--paper); font-size: 14px; line-height: 1.5; max-height: 55vh; overflow: auto; }
.email-prev ul { margin: 6px 0 10px 18px; }
.em-t { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.em-t td { border-top: 1px solid var(--line-2); padding: 6px 4px; vertical-align: top; }
.em-t td:last-child { font-weight: 700; text-align: right; }
.em-disc { font-size: 11.5px; color: var(--muted); margin-top: 10px; }

/* ---------- birthday countdown ---------- */
.bday-card { background: linear-gradient(135deg, #FDE7EF 0%, #FFF6E6 100%); border: 2px solid var(--pink); color: #12372F; }
.bday-card .muted { color: #4b625b; }
.bday-card .eyebrow { color: #b0476f; }
.bday-cake { font-size: 34px; line-height: 1; animation: cakeBob 2.4s ease-in-out infinite; }
.bday-cake.big { font-size: 56px; text-align: center; }
@keyframes cakeBob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(3deg); } }
.bday-days { text-align: center; background: #fff; border-radius: 14px; padding: 6px 12px; box-shadow: 0 2px 8px rgba(18,55,47,.08); }
.bday-days b { display: block; font-size: 26px; font-weight: 900; color: #b0476f; line-height: 1.1; }
.bday-days span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #6B7F79; }
.bday-today { text-align: center; display: grid; gap: 8px; justify-items: center; }
.candles { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.candles i { width: 7px; height: 22px; border-radius: 3px; background: repeating-linear-gradient(45deg, #8FD0EE 0 4px, #fff 4px 8px); position: relative; }
.candles i::before { content: ""; position: absolute; left: 50%; top: -9px; width: 7px; height: 9px; margin-left: -3.5px; border-radius: 50% 50% 45% 45%; background: #F5A882; box-shadow: 0 0 8px #F5A882; animation: flicker 1.1s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes flicker { from { transform: scale(1) rotate(-4deg); opacity: .85; } to { transform: scale(1.15) rotate(4deg); opacity: 1; } }
.thank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.thank-opt input { position: absolute; opacity: 0; pointer-events: none; }
.thank-opt span { display: grid; gap: 4px; padding: 12px; border: 2px solid var(--line); border-radius: 14px; font-size: 13.5px; cursor: pointer; height: 100%; background: var(--paper); }
.thank-opt span b { font-size: 26px; }
.thank-opt input:checked + span { border-color: var(--teal); background: var(--mint-bg); }
.thank-opt input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .bday-cake, .candles i::before { animation: none; } }

/* ---------- value features: kid sections, match, give, dream, growing up, plans, gift cards ---------- */
.kid-head-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.kid-worth { text-align: right; }
.kid-worth .num { font-size: 30px; font-weight: 900; line-height: 1.1; }
@media (max-width: 560px) { .kid-worth { text-align: left; } }
.chip.static { cursor: default; background: var(--mint-bg); border-color: transparent; font-size: 12.5px; }
.seg.ksec { display: flex; overflow-x: auto; scrollbar-width: none; margin: 16px 0; max-width: 100%; }
.seg.ksec::-webkit-scrollbar { display: none; }
.seg.ksec button { flex: 1 0 auto; white-space: nowrap; }
.plus-card h3 { font-size: 17px; }
.dream-track { position: relative; height: 14px; border-radius: 99px; background: var(--line-2); overflow: visible; }
.dream-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--mint), var(--lime)); }
.dream-now { position: absolute; top: -4px; width: 4px; height: 22px; border-radius: 2px; background: var(--teal); transform: translateX(-2px); }
.gu { display: grid; gap: 4px; }
.gu-step { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; position: relative; }
.gu-step + .gu-step::before { content: ""; position: absolute; left: 15px; top: -6px; height: 12px; width: 2px; background: var(--line); }
.gu-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--line-2); font-size: 15px; }
.gu-step.done .gu-dot { background: var(--lime); color: #12372F; font-weight: 900; }
.gu-step.now .gu-dot { background: var(--sky); box-shadow: 0 0 0 4px rgba(143,208,238,.35); }
.gu-step.later { opacity: .7; }
.card.extras { display: grid; gap: 6px; border-left: 6px solid var(--peach); }
.moment { gap: 10px; padding: 4px 0; }
.m-ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--cream); font-size: 20px; flex: none; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-opt { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; }
.plan-opt .num { font-size: 24px; font-weight: 900; } .plan-opt small { font-size: 13px; font-weight: 700; color: var(--muted); }
.plan-opt.on { border-color: var(--teal); background: var(--mint-bg); }
.curric { color: var(--teal); font-weight: 700; }
.voucher { position: relative; border-radius: 22px; padding: 26px 22px 20px; text-align: center; color: #12372F; background: radial-gradient(circle at 15% 10%, #C6E69A 0 70px, transparent 71px), radial-gradient(circle at 92% 88%, #F9C4D6 0 80px, transparent 81px), #F6F3EC; border: 2px dashed #115d59; overflow: hidden; }
.v-top { display: flex; gap: 6px; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; } .v-top img { width: 26px; height: 26px; }
.v-tree { font-size: 54px; margin: 6px 0 2px; }
.v-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px; font-weight: 800; color: #115d59; }
.v-for { font-size: 26px; margin: 4px 0; }
.v-amt { font-size: 44px; font-weight: 900; }
.v-msg { font-style: italic; margin: 6px 0; } .v-from { font-weight: 700; }
.v-fine { font-size: 10.5px; color: #4b625b; margin-top: 12px; }
@media print {
  html.printing-voucher body * { visibility: hidden !important; }
  html.printing-voucher .voucher, html.printing-voucher .voucher * { visibility: visible !important; }
  html.printing-voucher .voucher { position: fixed; left: 50%; top: 40px; transform: translateX(-50%); width: 420px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- beta sign-up ---------- */
.beta-layer { position: fixed; inset: 0; z-index: 55; overflow-y: auto; background: radial-gradient(circle at 10% 0%, rgba(198,230,154,.45), transparent 45%), radial-gradient(circle at 100% 100%, rgba(249,196,214,.4), transparent 45%), var(--cream); -webkit-overflow-scrolling: touch; }
.beta-wrap { min-height: 100%; display: grid; place-items: center; padding: max(20px, env(safe-area-inset-top)) 16px 40px; }
.beta-card { width: min(560px, 100%); background: var(--paper); border-radius: 26px; padding: 26px 22px; box-shadow: 0 20px 60px rgba(18,55,47,.14); border: 1.5px solid var(--line); }
.beta-card.welcome { display: grid; gap: 14px; text-align: center; }
.beta-card h1 { font-size: 28px; line-height: 1.15; }
.beta-points { display: grid; gap: 12px; text-align: left; margin: 6px 0; }
.bp-ico { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--mint-bg); font-size: 20px; flex: none; }
.beta-sec { border: 0; padding: 0; margin: 4px 0 0; display: grid; gap: 12px; min-width: 0; }
.beta-sec legend { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; padding: 0; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-block; padding: 8px 12px; border-radius: 99px; border: 1.5px solid var(--line); font-size: 13.5px; font-weight: 700; cursor: pointer; background: var(--paper); }
.chip-check input:checked + span { background: var(--lime); border-color: var(--lime); color: #12372F; }
.chip-check input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.beta-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- back office ---------- */
.admin-body { background: var(--cream); }
.adm { max-width: 1180px; margin: 0 auto; padding: 16px 16px 40px; display: grid; gap: 16px; }
.adm-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.adm-top .brand { font-size: 24px; }
.adm-tag { font-size: 12px; font-weight: 800; background: var(--deep); color: #fff; border-radius: 99px; padding: 3px 10px; margin-left: 6px; vertical-align: middle; }
.adm-tabs { display: flex; overflow-x: auto; scrollbar-width: none; } .adm-tabs button { flex: 1 0 auto; white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: var(--paper); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px; display: grid; gap: 2px; }
.kpi-l { font-size: 12.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi b { font-size: 30px; font-weight: 900; line-height: 1.15; }
.kpi-s { font-size: 12.5px; color: var(--muted); }
.vbars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 180px; }
.vbar { display: grid; grid-template-rows: auto 1fr auto; height: 100%; align-items: end; text-align: center; min-width: 0; }
.vbar i { display: block; background: linear-gradient(180deg, var(--teal), #3f8c84); border-radius: 8px 8px 3px 3px; min-height: 3px; align-self: end; }
.vb-n { font-size: 12px; font-weight: 800; } .vb-l { font-size: 10px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbars { display: grid; gap: 9px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-t { height: 12px; background: var(--line-2); border-radius: 99px; overflow: hidden; } .hb-t i { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
.hb-n { font-weight: 800; white-space: nowrap; } .hb-n small { font-weight: 600; color: var(--muted); }
.adm-tools { display: grid; gap: 12px; }
.adm-row { padding: 8px 0; border-top: 1px solid var(--line-2); gap: 10px; }
tr.adm-req td { background: var(--warn-bg); }
.adm { grid-template-columns: minmax(0, 1fr); } .adm > * { min-width: 0; }
.login-cta { font-size: 12.5px; font-weight: 800; color: var(--teal); margin-top: 2px; } .profile:hover .login-cta { text-decoration: underline; }
.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--mint-bg); border: 1.5px solid var(--mint); border-radius: 16px; padding: 10px 12px; margin: 10px 0 14px; text-align: left; font-size: 14px; }
.sim-cta { background: var(--lime) !important; color: #12372F !important; font-weight: 800; border-radius: 99px; padding: 5px 12px; border: 0; cursor: pointer; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .share-grid .btn { justify-content: center; text-align: center; text-decoration: none; } .invite-card { border-left: 6px solid var(--peach); }

/* ---------- kids' and family views on a computer: sidebar like the parent's, phone layout below 861px ---------- */
.knav-brand { display: none; }
@media (min-width: 861px) {
  .kshell:has(> .knav) { max-width: none; margin: 0; padding: 0 0 48px; display: grid; grid-template-columns: 236px minmax(0, 1fr); align-content: start; }
  .kshell:has(> .knav) > :not(.knav) { grid-column: 2; width: min(100% - 64px, 760px); margin-left: auto; margin-right: auto; }
  .kshell:has(> .knav) > .khead { margin-top: 28px; margin-bottom: 20px; }
  .kshell > .knav, .has-badge .kshell > .knav {
    grid-column: 1; grid-row: 1 / span 40; align-self: start; position: sticky; top: 44px; left: auto; bottom: auto; transform: none;
    width: auto; height: calc(100vh - 44px); display: flex; flex-direction: column; gap: 4px; padding: 20px 14px;
    background: var(--paper); border: 0; border-right: 1.5px solid var(--line); border-radius: 0; box-shadow: none;
  }
  .kshell > .knav .knav-brand { display: flex; }
  .kshell > .knav button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 15px; color: var(--ink-2); text-align: left; }
  .kshell > .knav button .e, .kshell > .knav button.on .e { font-size: 20px; filter: none; opacity: 1; padding: 0; background: none; }
  .kshell > .knav button.on { background: var(--lime); color: var(--on-color); }
  .kshell > .knav button:hover:not(.on) { background: rgba(198,230,154,.3); }
  .has-badge .kshell:has(> .knav) { padding-bottom: calc(48px + var(--host-badge)); }
}

/* parent home: lean kid cards */
.kc-lean { cursor: pointer; display: grid; gap: 12px; transition: transform .15s, box-shadow .15s; }
.kc-lean:hover { transform: translateY(-2px); }
.kc-lean:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.kc-top { display: flex; align-items: center; gap: 10px; }
.kc-top h3 { font-size: 16px; }
.kc-top svg { flex: none; margin: -6px -4px -6px 0; }
.kc-worth { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kc-worth .num { font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.kc-gain { font-size: 13px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--good-bg); }
.kc-gain.down { background: var(--bad-bg); }
.kc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kc-stat { display: flex; align-items: center; gap: 8px; background: var(--line-2); border-radius: 14px; padding: 8px 10px; min-width: 0; }
.kc-stat > div { min-width: 0; display: grid; line-height: 1.2; }
.kc-stat b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-stat span { font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-ring { width: 30px; height: 30px; flex: none; }
.kc-acts { display: flex; align-items: center; gap: 8px; }
.kc-more { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--ink-2); }

/* real families: just today's date and a way to switch person through the PIN screen */
.simbar-real { justify-content: space-between; }


/* parent Tasks tab: one card per child, a tidy row per task */
.tk-groups { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
.tk-group { border-top: 6px solid var(--kc); padding: 14px; }
.tk-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tk-head .avatar { width: 32px; height: 32px; font-size: 16px; box-shadow: none; }
.tk-head h3 { font-size: 16px; }
.tk-head .btn { margin-left: auto; }
.tk-list { display: grid; gap: 6px; }
.tk-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 14px; background: var(--line-2); }
.tk-row.is-done { opacity: .55; }
.tk-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--paper); display: grid; place-items: center; font-size: 18px; flex: none; }
.tk-txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.tk-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-txt span { font-size: 12px; color: var(--ink-2); }
.tk-amt { font-weight: 900; font-size: 14px; background: var(--paper); border-radius: 999px; padding: 4px 10px; flex: none; }
.tk-st { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 4px 10px; border: 0; flex: none; }
.tk-st.warn { background: #FCE7B8; color: #7a5200; cursor: pointer; }
.tk-st.good { background: var(--good-bg); color: var(--good-ink); }
.tk-del { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); font-weight: 800; flex: none; cursor: pointer; opacity: .5; }
.tk-del:hover, .tk-del:focus-visible { opacity: 1; background: var(--bad-bg); color: var(--bad); }

/* photo proof */
.proof-drop { display: grid; place-items: center; gap: 4px; min-height: 190px; border: 2px dashed var(--line); border-radius: 18px; background: var(--line-2); cursor: pointer; text-align: center; overflow: hidden; }
.proof-drop.has { border-style: solid; padding: 0; background: #000; }
.proof-drop img { width: 100%; max-height: 320px; object-fit: contain; display: block; }
.proof-cam { font-size: 40px; }
.proof-full { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 14px; background: #000; }
.proof-thumb { width: 38px; height: 38px; border-radius: 10px; border: 2px solid var(--paper); padding: 0; overflow: hidden; flex: none; cursor: zoom-in; box-shadow: 0 2px 6px rgba(0,0,0,.15); background: var(--line-2); }
.proof-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card > .proof-thumb { float: right; width: 64px; height: 64px; margin: 0 0 8px 10px; }
.proof-add { padding: 6px 9px; margin-right: 4px; }

/* Tasks tab header: a coloured banner with quick numbers and the filter */
.tk-hero { background: linear-gradient(135deg, var(--lime), var(--mint)); color: #12372F; border-radius: 24px; padding: 20px; margin-bottom: 16px; display: grid; gap: 14px; }
.tk-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tk-hero h1 { font-size: 26px; }
.tk-hero p { font-size: 14px; opacity: .8; margin-top: 2px; }
.tk-hero .btn { background: #12372F; color: #fff; }
.tk-hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tk-hs { background: rgba(255,255,255,.65); border: 0; border-radius: 16px; padding: 10px 12px; display: grid; text-align: left; color: inherit; font: inherit; }
.tk-hs b { font-size: 20px; font-weight: 900; line-height: 1.1; }
.tk-hs span { font-size: 12px; font-weight: 700; opacity: .75; }
.tk-hs.warn { background: #FCE7B8; cursor: pointer; }
.tk-filter { display: inline-flex; gap: 4px; background: rgba(255,255,255,.5); padding: 4px; border-radius: 999px; justify-self: start; flex-wrap: wrap; }
.tk-filter button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 800; font-size: 13px; color: #12372F; cursor: pointer; }
.tk-filter button.on { background: #fff; box-shadow: 0 2px 6px rgba(18,55,47,.12); }
@media (max-width: 480px) { .tk-hs b { font-size: 17px; } .tk-hero h1 { font-size: 22px; } }

/* interactive charts: hover or drag to read a day; the line grows in from the left */
.chart[data-chart] { touch-action: pan-y; cursor: crosshair; }
.chart .ch-cursor { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed currentColor; opacity: .35; pointer-events: none; }
.chart .ch-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--lime); border: 2.5px solid #12372F; pointer-events: none; box-shadow: 0 0 0 4px rgba(198,230,154,.35); }
.chart .ch-tip { position: absolute; top: -6px; transform: translate(-50%, -100%); background: #12372F; color: #fff; border-radius: 12px; padding: 7px 10px; font-size: 12px; line-height: 1.3; white-space: nowrap; display: grid; text-align: center; pointer-events: none; box-shadow: 0 8px 20px rgba(0,0,0,.2); z-index: 3; }
.chart .ch-tip b { font-size: 15px; }
.chart .ch-tip span { opacity: .8; }
.chart .ch-tip em { font-style: normal; font-weight: 800; }
.chart .ch-tip .up { color: var(--lime); } .chart .ch-tip .down { color: var(--pink); }
.chart.ch-grow svg { animation: chGrow .9s cubic-bezier(.3,.7,.2,1); }
@keyframes chGrow { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .chart.ch-grow svg { animation: none; } }

/* a limit that can be switched to "No limit" */
.lim-field { display: grid; gap: 6px; align-content: start; }
.lim-seg { justify-self: start; }
.lim-seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(18,55,47,.12); }
.lim-in { display: flex; align-items: center; gap: 6px; }
.lim-in span { font-weight: 800; color: var(--ink-2); }
.lim-in[hidden] { display: none; }
.row:has(> .lim-field) { align-items: flex-start; }

/* spending money (the goal jar) */
.kspend { margin-top: 12px; background: rgba(255,255,255,.1); border-radius: 16px; padding: 10px 14px; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; }
.kspend span { font-weight: 800; font-size: 14px; }
.kspend b { font-size: 22px; font-weight: 900; color: var(--lime); grid-row: span 2; }
.kspend small { font-size: 12px; color: #A7C4BD; }
.kc-spend { margin-left: auto; font-size: 12px; font-weight: 700; color: #3F5A53; background: #FDECD9; border-radius: 999px; padding: 3px 9px; }
.kc-spend b { color: var(--on-color); }
.kc-worth .kc-spend { margin-left: 0; }

/* Big wordmark on sign-in screens */
.brand-lg { justify-content: center; font-size: 46px; gap: 12px; }
.brand-lg img { width: 52px; height: 52px; }



/* Family circle: lean member rows and simple cards */
.fc-list { display: grid; gap: 10px; }
.fc-row { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1.5px solid var(--line); border-left: 6px solid var(--kc, var(--lime)); border-radius: 18px; padding: 12px 14px; }
.fc-row .grow { min-width: 0; }
.fc-row p { margin: 2px 0 0; }
.fc-acts { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.fc-x { color: var(--muted); }
.fc-x:hover { color: #B4232C; }
.fc-total { font-size: 30px; font-weight: 900; line-height: 1; }
.fc-occ summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--muted); padding: 4px 0; }
.fc-occ .chips { margin-top: 8px; }
.fc-cards .plus-card { border-top: 0; }
.fc-empty { text-align: center; padding: 30px 20px; display: grid; justify-items: center; gap: 12px; }
.fc-empty-ico { font-size: 38px; }
.fc-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.fc-steps span { background: var(--cream); border: 1.5px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 800; }
@media (max-width: 560px) {
  .fc-row { flex-wrap: wrap; }
  .fc-acts { width: 100%; justify-content: flex-end; }
}
.fc-cards .plus-card { align-content: start; }


/* Task streaks */
.t-streak { display: inline-block; width: fit-content; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 3px 0 1px; padding: 2px 9px; border-radius: 99px; background: #FFE9D6; color: #9A4A12; font-size: 12px; font-weight: 900; }
.t-streak.risk { background: #FFD9B8; animation: streakPulse 1.8s ease-in-out infinite; }
@keyframes streakPulse { 50% { transform: scale(1.04); } }
.task .grow > .t-streak + p { margin-top: 2px; }
.tk-streak { font-style: normal; font-weight: 900; color: var(--streak-ink); }
@media (prefers-reduced-motion: reduce) { .t-streak.risk { animation: none; } }

/* Kid badges: earned in colour, locked greyed with a hint */
.bdg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bdg { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 16px; border: 1.5px dashed var(--line); background: var(--cream); }
.bdg .bdg-i { grid-row: span 2; font-size: 24px; filter: grayscale(1); opacity: .55; }
.bdg b { font-size: 14px; color: var(--muted); }
.bdg small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.bdg.on { border: 0; background: #FDE3EC; }
.bdg.on .bdg-i { filter: none; opacity: 1; }
.bdg.on b { color: #12372F; }
.bdg.on small { color: #6B4A55; }
@media (max-width: 380px) { .bdg-grid { grid-template-columns: 1fr; } }

/* Kid Home: today's tasks is the standout card */
.ktoday { background: linear-gradient(150deg, #FFE27A 0%, #C6E69A 100%); border-radius: 24px; padding: 16px; box-shadow: 0 10px 24px rgba(160,140,30,.18); color: #12372F; }
.ktoday-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ktoday-ic { width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center; font-size: 26px; background: #fff; border-radius: 15px; box-shadow: 0 3px 0 rgba(18,55,47,.12); }
.ktoday h3 { font-size: 21px; margin: 0; color: #12372F; }
.ktoday-h p { margin: 2px 0 0; font-size: 14px; font-weight: 700; color: #3C5A40; }
.ktoday-all { border: 0; background: #12372F; color: #fff; font: inherit; font-size: 13px; font-weight: 800; padding: 8px 13px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.ktoday .task { background: #fff; border: 0; box-shadow: 0 2px 0 rgba(18,55,47,.08); }
.ktoday-done { margin: 0; padding: 14px; background: rgba(255,255,255,.7); border-radius: 16px; font-weight: 800; text-align: center; }
.ktoday.all-done { background: linear-gradient(150deg, #E4F4CF 0%, #C6E69A 100%); box-shadow: none; }
.task .grow > b + .t-streak { display: block; }


/* Kid goal card: name, amount, bar, one line */
.kgoal { border-left: 6px solid var(--lime); }
.kgoal-top { display: flex; align-items: center; gap: 12px; }
.kgoal-ic { width: 42px; height: 42px; display: grid; place-items: center; font-size: 22px; background: var(--lime); border-radius: 14px; flex-shrink: 0; }
.kgoal-top .eyebrow { margin: 0; }
.kgoal-top h3 { margin: 0; font-size: 19px; }
.kgoal-edit { border: 0; background: var(--cream); color: var(--ink); width: 40px; height: 40px; border-radius: 12px; cursor: pointer; font-size: 15px; }
.kgoal-amt { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 8px; }
.kgoal-amt b { font-size: 28px; font-weight: 900; line-height: 1; }
.kgoal-amt span { font-size: 15px; font-weight: 700; color: var(--muted); }
.kgoal-bar { height: 14px; border-radius: 99px; background: var(--cream); overflow: hidden; }
.kgoal-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #8FD16A, #3E9C78); }
.kgoal-note { margin: 10px 0 0; font-size: 14px; font-weight: 700; color: var(--ink-2); }

/* Kid tasks as coloured bubbles */
.kshell .task { --tb: #E6F4D3; --tbd: #C6E69A; background: var(--tb); border: 0; border-radius: 22px; box-shadow: 0 3px 0 var(--tbd); color: #12372F; padding: 12px 14px; }
.kshell .task:nth-of-type(5n+2) { --tb: #DDF0FA; --tbd: #A9D9F1; }
.kshell .task:nth-of-type(5n+3) { --tb: #FDE3EC; --tbd: #F6BFD2; }
.kshell .task:nth-of-type(5n+4) { --tb: #FDE6D9; --tbd: #F5BE9E; }
.kshell .task:nth-of-type(5n+5) { --tb: #DDF3EA; --tbd: #A8E0CB; }
.kshell .task .ti { background: #fff !important; border-radius: 50%; box-shadow: 0 2px 0 var(--tbd); }
.kshell .task b { color: #12372F; }
.kshell .task .small.muted { color: #4D6A62; }
.kshell .task .proof-add { background: rgba(255,255,255,.75); border: 0; }
.kshell .task .btn.lime { background: #12372F; color: #fff; box-shadow: none; }
.kshell .task.done { opacity: .6; box-shadow: none; }
.kshell .task.done .pill { background: rgba(255,255,255,.8); }

/* Kid My funds: one list, tap a fund for details */
.kmix .eyebrow { margin: 0; }
.kmix-v { font-size: 30px; font-weight: 900; margin: 2px 0 10px; }
.kfunds { display: grid; gap: 10px; }
.kfund { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: #12372F; cursor: pointer; border: 0; border-radius: 22px; padding: 12px 14px; background: color-mix(in srgb, var(--fc) 22%, #fff); box-shadow: 0 3px 0 color-mix(in srgb, var(--fc) 45%, #fff); }
.kfund .fi { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; font-size: 22px; background: #fff; border-radius: 50%; }
.kfund .grow { display: grid; min-width: 0; }
.kfund small { font-size: 12.5px; color: #4D6A62; }
.kfund .up { color: #1E8A5A; } .kfund .down { color: #B93A2B; }
.kfund-v { display: grid; justify-items: end; }
.kfund-v b { font-size: 16px; }
.kfund-go { font-size: 22px; font-weight: 900; color: #4D6A62; margin-left: 2px; }
.kf-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kf-stat { background: var(--cream); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; }
.kf-stat small { font-size: 12px; color: var(--muted); font-weight: 700; }
.kf-stat b { font-size: 18px; }

/* Future me: chips, ages, growth columns, piggy bank compare */
.fme-lbl { margin: 0 0 8px; font-size: 14px; font-weight: 800; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fme-lbl b { font-size: 20px; }
.fme-avg { font-size: 12px; font-weight: 800; color: #3E7A2E; background: #E6F4D3; padding: 2px 8px; border-radius: 99px; }
.fme-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fme-chips button { border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-weight: 900; font-size: 15px; padding: 8px 14px; border-radius: 99px; cursor: pointer; }
.fme-chips button.on { background: #12372F; border-color: #12372F; color: #fff; }
.fme-range { width: 100%; margin-top: 10px; accent-color: #3E9C78; }
.fme-ages button { min-width: 64px; }
.fme-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fme-head span { font-size: 14px; font-weight: 800; color: var(--muted); }
.fme-head b { font-size: 30px; font-weight: 900; }
.fme-bars { display: flex; align-items: flex-end; gap: 3px; height: 130px; margin-top: 10px; padding: 0 2px; border-bottom: 1.5px solid var(--line); }
.fme-bars i { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.fme-bars b { width: 100%; display: flex; align-items: flex-end; overflow: hidden; background: #8FD16A; border-radius: 6px 6px 2px 2px; transition: height .25s ease; }
.fme-bars s { display: block; width: 100%; background: #A7C4BD; text-decoration: none; transition: height .25s ease; }
.fme-axis { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.fme-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.fme-sum div { background: var(--cream); border-radius: 14px; padding: 8px 10px; display: grid; }
.fme-sum small { font-size: 12px; color: var(--muted); font-weight: 700; }
.fme-sum b { font-size: 15px; }
.fme-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.fme-vs span { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; font-size: 13px; font-weight: 800; background: #FDE3EC; color: #12372F; }
.fme-vs span + span { background: #E6F4D3; }
.fme-vs b { font-size: 18px; }

/* Kid lessons: progress, one up-next lesson, replay icons, locked count */
.kles h3 { margin: 0; }
.kles-bar { height: 8px; border-radius: 99px; background: var(--cream); overflow: hidden; margin: 10px 0 12px; }
.kles-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8FD16A, #3E9C78); border-radius: 99px; }
.kles-next { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: #12372F; cursor: pointer; border: 0; border-radius: 20px; padding: 12px 14px; background: #DDF0FA; box-shadow: 0 3px 0 #A9D9F1; }
.kles-ic { width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center; font-size: 24px; background: #fff; border-radius: 50%; }
.kles-next .grow { display: grid; min-width: 0; }
.kles-next small { font-size: 12px; font-weight: 800; color: #2F6E8C; text-transform: uppercase; letter-spacing: .04em; }
.kles-next b { font-size: 16px; }
.kles-go { background: #12372F; color: #fff; font-weight: 800; font-size: 13px; padding: 8px 14px; border-radius: 99px; }
.kles-done { margin: 0; padding: 12px; border-radius: 16px; background: #E6F4D3; font-weight: 800; text-align: center; }
.kles-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.kles-row .small { margin-right: 4px; font-weight: 700; }
.kles-dot { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #E6F4D3; font-size: 19px; cursor: pointer; }
.kles-lock { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }

/* ---------- cloud: online saving and linked phones ---------- */
.cloud-code{font-size:40px;font-weight:900;letter-spacing:.18em;text-align:center;padding:18px 10px;border-radius:18px;background:var(--lime);color:#12372F}
.cloud-status[data-s="offline"],.cloud-status[data-s="error"]{color:var(--warn,#b7791f)}
.cloud-nudge{display:grid;gap:12px}

/* ================= Shared patterns (polish pass, Nov 2026) ================= */
/* Empty states: one look everywhere — icon, short title, one line of help. */
.empty { text-align: center; padding: var(--sp-8) var(--sp-5); display: grid; justify-items: center; gap: var(--sp-2); }
.empty-ico { font-size: 40px; line-height: 1; }
.empty h3 { font-size: var(--fs-lg); }
.empty p { max-width: 36ch; }
.fc-empty { padding: var(--sp-8) var(--sp-5); }

/* Small controls that were under the minimum size */
.tk-filter button { min-height: 34px; }
.ktoday-all { min-height: var(--tap-sm); }
.knav button { min-height: 52px; align-content: center; }
.fme-range { height: var(--tap); margin-top: 2px; }
.ap-more summary, .fc-occ summary { min-height: var(--tap); display: flex; align-items: center; }
button.mtop { min-height: var(--tap); margin-top: -6px; margin-bottom: 8px; }  /* phone header logo (js/brand.js) */

/* Kid and family app: keep content clear of rounded corners and notches in landscape */
.kshell { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
@media (min-width: 861px) { .kshell:has(> .knav) { padding-left: 0; padding-right: 0; } }

/* Notification bell in page headers: square, same height as its neighbours */
.phead .btn.ghost[aria-label] { min-width: var(--tap); padding-left: 12px; padding-right: 12px; }
/* Side-by-side form fields line up by their labels, even when one has help text underneath */
.row:has(> .field) { align-items: flex-start; }
/* Kid header on phones: greeting and date get the full width, the streak/level/bell pills sit underneath */
@media (max-width: 420px) {
  .khead { flex-wrap: wrap; row-gap: 8px; }
  .khead > .grow { flex-basis: calc(100% - 50px); }
  .khead > .grow + .kpill { margin-left: 50px; }
}
@media (max-width: 420px) {
  .kshell .task { gap: 8px; padding: 10px 10px 10px 12px; }
  .kshell .task .ti { width: 38px; height: 38px; font-size: 20px; }
  .kshell .task .btn.sm { padding: 6px 12px; }
}
/* The teal logo needs lifting on dark backgrounds */
:root[data-theme="dark"] :is(.brand, .mtop, .pin-logo) img { filter: brightness(2.3) saturate(.7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) :is(.brand, .mtop, .pin-logo) img { filter: brightness(2.3) saturate(.7); } }
/* Red counts and "remove" links stay readable in both themes and on the light task bubbles */
.badge-n { background: #B93A2B; }
.kpill b.down { background: #B93A2B; color: #fff; border-radius: 99px; padding: 0 6px; font-size: 12px; line-height: 18px; }
.link-bad { color: var(--bad); }
.kshell .task .link-bad { color: #B93A2B; }
