/* Monimeter - daylight UI, built to be read outdoors on a cheap phone.
   Deliberately single-theme: high contrast, light ground, no dark mode,
   because it is used in the sun in a market. */
:root{
  --panel:#FFFDF8; --panel-2:#F6F1E6; --panel-3:#EDE6D6; --line:#E2D6BF;
  --ink:#1B1330; --ink-2:#574B72; --ink-3:#756A8C;
  --chop:#F2542D; --shop:#00819E; --keep:#6B2FD6; --grow:#12A150;
  --chop-t:#FDE5DD; --shop-t:#D8EDF3; --keep-t:#E9DFFB; --grow-t:#DBF2E4;
  --gold:#FFC93C; --pink:#FF4D9D; --bad:#C9351F; --warn:#E6A700;
  /* --ink-3 and --bad carry 9-12px text, so both have to clear WCAG AA
     4.5:1 against --panel. They did not (3.62:1 and 4.19:1) and this app
     is read outdoors in the sun on a cheap screen. Now 4.92:1 and 5.15:1. */
  --f-disp:'Bricolage Grotesque','Hanken Grotesk',system-ui,sans-serif;
  --f-ui:'Hanken Grotesk',system-ui,-apple-system,sans-serif;
  --r-m:16px; --r-l:24px; --r-xl:34px;
  --navh:66px;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent}
html,body{margin:0; padding:0}
body{
  background:var(--panel); color:var(--ink); font-family:var(--f-ui); font-size:15px;
  line-height:1.5; -webkit-font-smoothing:antialiased;
  padding-bottom:calc(var(--navh) + env(safe-area-inset-bottom));
}
h1,h2,h3{font-family:var(--f-disp); font-weight:800; margin:0; line-height:1.08; text-wrap:balance}
p{margin:0}
button{font-family:var(--f-ui); cursor:pointer}
button:focus-visible,input:focus-visible{outline:3px solid var(--ink); outline-offset:2px}
.mono{font-family:var(--f-ui); text-transform:uppercase; letter-spacing:.1em; font-size:10.5px; font-weight:700; color:var(--ink-3)}
.tnum{font-variant-numeric:tabular-nums}
.bignum{font-family:var(--f-disp); font-weight:800; letter-spacing:-.03em; line-height:1}
.sub{font-size:12px; color:var(--ink-3); line-height:1.35}
[hidden]{display:none !important}

main{max-width:430px; margin:0 auto; padding:env(safe-area-inset-top) 0 0}
.scr{padding:10px 15px 18px; display:flex; flex-direction:column; gap:13px}

/* ---------- top bar ---------- */
.apptop{display:flex; align-items:center; gap:10px}
/* the whole name block is the way into My account */
.whoami{
  flex:1; min-width:0; display:flex; align-items:center; gap:10px; border:0; background:transparent;
  color:inherit; text-align:left; padding:6px; margin:-6px; border-radius:var(--r-m); transition:.14s;
}
.whoami:active{background:var(--panel-2)}
.avatar{
  width:38px; height:38px; border-radius:12px; flex:none; display:grid; place-items:center;
  background:linear-gradient(145deg,var(--keep),var(--pink)); color:#fff;
  font-family:var(--f-disp); font-weight:800; font-size:15.5px;
}
.hi{font-family:var(--f-disp); font-weight:800; font-size:16.5px; letter-spacing:-.02em}
.langtog{display:flex; background:var(--panel-2); border-radius:99px; padding:4px; border:1.5px solid var(--line); gap:3px}
.langtog button{flex:1; font-weight:700; font-size:11.5px; border:0; background:transparent; color:var(--ink-3); padding:9px 6px; border-radius:99px}
.langtog button[aria-pressed="true"]{background:var(--ink); color:var(--panel)}

/* ---------- face meter ---------- */
.face{border-radius:var(--r-xl); padding:16px; color:#fff; background:linear-gradient(178deg,#241749,#150D2E 88%); text-align:center}
.facerow{display:flex; align-items:center; justify-content:center; gap:12px}
.faceemo{font-size:42px; line-height:1}
.faceword{font-family:var(--f-disp); font-weight:800; font-size:22px; letter-spacing:-.02em; display:block}
.facenums{display:flex; gap:8px; margin-top:13px}
.fnum{flex:1; background:rgba(255,255,255,.1); border-radius:var(--r-m); padding:10px 8px}
.fnum .fl{font-size:9px; text-transform:uppercase; letter-spacing:.09em; color:#B5A4D8; font-weight:700; line-height:1.3}
.fnum .fv{font-family:var(--f-disp); font-weight:800; font-size:16.5px; letter-spacing:-.02em; margin-top:3px; font-variant-numeric:tabular-nums}
.facesay{border:0; background:rgba(255,255,255,.16); color:#fff; width:44px; height:44px; border-radius:14px; font-size:17px; margin-top:12px}

/* ---------- the one big button ---------- */
.bigbtn{
  border:0; width:100%; border-radius:var(--r-xl); padding:15px; background:var(--grow); color:#fff;
  display:flex; align-items:center; gap:13px; text-align:left;
  font-family:var(--f-disp); font-weight:800; font-size:17px; letter-spacing:-.02em; line-height:1.05;
  box-shadow:0 7px 0 #0C7A3C; transition:transform .1s, box-shadow .1s;
}
.bigbtn:active{transform:translateY(4px); box-shadow:0 3px 0 #0C7A3C}
.bigbtn .be{font-size:26px; line-height:1; flex:none}
.bigbtn.alt{background:var(--chop); box-shadow:0 7px 0 #B93A17; font-size:14.5px}
.bigbtn.alt:active{box-shadow:0 3px 0 #B93A17}
.bigbtn.dark{background:var(--ink); box-shadow:0 7px 0 #000}
.bigbtn.dark:active{box-shadow:0 3px 0 #000}
.bigbtn[disabled]{opacity:.4; box-shadow:none; transform:none}

/* ---------- bowls ---------- */
.bowls{display:grid; grid-template-columns:1fr 1fr; gap:9px}
.bowl{
  border:0; background:var(--panel-2); border-radius:var(--r-l); padding:11px 7px 12px;
  color:inherit; text-align:center; min-width:0; overflow:hidden; transition:.14s;
}
.bowl:active{background:var(--panel-3)}
.bowl.lit{background:var(--panel); box-shadow:inset 0 0 0 3px var(--pc)}
.bowl svg{display:block; margin:0 auto}
.bowlpic{position:relative; display:block}
.bowlpic .pe{position:absolute; left:0; right:0; top:52%; transform:translateY(-50%); font-size:17px; line-height:1; pointer-events:none}
.bowl .bn{font-weight:700; font-size:11.5px; margin-top:5px; line-height:1.2; min-height:2.4em; display:flex; align-items:center; justify-content:center; overflow-wrap:break-word}
.bowl .ba{font-family:var(--f-disp); font-weight:800; font-size:15.5px; letter-spacing:-.03em; color:var(--pct, var(--pc)); font-variant-numeric:tabular-nums; display:block}
.bowl .bg{font-size:14px; margin-top:3px; display:block; min-height:1.2em}
.bowl .bpc{font-size:9px; color:var(--ink-3); text-transform:uppercase; letter-spacing:.04em; margin-top:4px; display:block; font-weight:700}

/* ---------- the ten blocks: every N1,000 ---------- */
.blocks{display:flex; gap:3px; margin-top:9px}
.blocks i{flex:1; height:19px; border-radius:5px; display:block}
.blockkey{display:flex; flex-wrap:wrap; gap:9px; margin-top:9px}
.bk{display:flex; align-items:center; gap:5px; font-size:11.5px; color:var(--ink-2); font-weight:600}
.bk b{width:11px; height:11px; border-radius:3px; display:block}

/* ---------- naira notes ---------- */
.notes{display:grid; grid-template-columns:1fr 1fr; gap:9px}
.note{
  border:2.5px solid var(--nc); background:var(--nbg); color:var(--ncd); border-radius:14px;
  padding:13px 10px; font-family:var(--f-disp); font-weight:800; font-size:17.5px;
  letter-spacing:-.02em; font-variant-numeric:tabular-nums; transition:transform .09s;
}
.note:active{transform:scale(.95)}
.note small{display:block; font-size:9px; letter-spacing:.06em; text-transform:uppercase; opacity:.75; margin-top:2px; font-weight:700; font-family:var(--f-ui)}
.bigtotal{text-align:center; padding:4px 0 2px}
.bigtotal .btl{font-family:var(--f-disp); font-weight:800; font-size:16.5px; letter-spacing:-.02em; line-height:1.15}
.bigtotal .btv{font-family:var(--f-disp); font-weight:800; font-size:36px; letter-spacing:-.04em; margin-top:6px; color:var(--grow); font-variant-numeric:tabular-nums}
.bigtotal .btv.zero{color:var(--ink-3)}
.counted{display:flex; flex-wrap:wrap; gap:5px; justify-content:center; margin-top:8px; min-height:22px}
.cchip{font-size:10.5px; background:var(--panel-2); border:1px solid var(--line); border-radius:99px; padding:3px 8px; color:var(--ink-2); font-weight:700}

/* ---------- keypad (behind "type it" ) ---------- */
.keys{display:grid; grid-template-columns:repeat(3,1fr); gap:8px}
.key{height:52px; border:0; border-radius:14px; background:var(--panel-2); color:var(--ink); font-family:var(--f-disp); font-weight:700; font-size:21px}
.key:active{background:var(--panel-3); transform:scale(.96)}

/* ---------- cards / lines ---------- */
.card{background:var(--panel-2); border-radius:var(--r-l); padding:15px}
.card.flat{background:transparent; border:2px solid var(--line)}
.rowlab{display:flex; align-items:center; justify-content:space-between; gap:8px}
.back{border:0; background:var(--panel-3); color:var(--ink); width:44px; height:44px; border-radius:14px; font-size:18px; flex:none}
.sumbig{display:flex; flex-direction:column; gap:8px}
.sline{display:flex; align-items:center; gap:11px; background:var(--panel-2); border-radius:var(--r-m); padding:12px}
.sline .si{font-size:20px; line-height:1; flex:none}
.sline .st{flex:1; font-size:12.5px; font-weight:600; color:var(--ink-2); line-height:1.25}
.sline .sv{font-family:var(--f-disp); font-weight:800; font-size:16.5px; letter-spacing:-.02em; font-variant-numeric:tabular-nums}
.sline.own{background:var(--grow); color:#fff}
.sline.own .st{color:#DFF7E9; font-weight:700}
.sline.own .sv{font-size:21px}

/* ---------- goals ---------- */
.goal{display:flex; gap:11px; align-items:center; border-radius:var(--r-m); padding:9px; margin:0 -9px; transition:.14s; width:calc(100% + 18px); border:0; background:transparent; text-align:left; color:inherit}
.goal.lit{background:var(--panel-3)}
.goal .gi{width:40px; height:40px; border-radius:13px; display:grid; place-items:center; font-size:19px; flex:none}
.goal .gn{font-weight:700; font-size:13px; line-height:1.2}
.goal .gs{font-size:11.5px; color:var(--ink-2); margin-top:2px}
.bar{height:9px; border-radius:99px; background:var(--panel-3); margin-top:7px; overflow:hidden}
.bar i{display:block; height:100%; border-radius:99px; background:var(--pc)}
.fedby{display:inline-flex; align-items:center; gap:5px; margin-top:5px; font-size:10.5px; background:var(--fb-t); color:var(--fb); border:1px solid var(--fb); border-radius:99px; padding:2px 8px; font-weight:700}

/* ---------- grow ladder ---------- */
.rung{display:flex; gap:11px; align-items:flex-start; padding:12px 0; border-bottom:1.5px solid var(--line)}
.rung:last-child{border-bottom:0}
.rung .ri{font-size:21px; line-height:1; flex:none; width:30px; text-align:center}
.rung .rn{font-weight:800; font-size:13px; font-family:var(--f-disp)}
.rung .rd{font-size:12px; color:var(--ink-2); margin-top:2px; display:block; line-height:1.35}
.rung .rk{font-size:11.5px; color:var(--bad); margin-top:4px; display:block; font-weight:600}
.rung .rf{font-size:10px; color:var(--ink-3); text-transform:uppercase; letter-spacing:.06em; margin-top:4px; display:block; font-weight:700}
.locked{opacity:.42}

/* ---------- pickers ---------- */
.pick{
  width:100%; text-align:left; border:2.5px solid var(--line); background:var(--panel);
  border-radius:var(--r-l); padding:13px; color:inherit; transition:.14s; display:block;
}
.pick[aria-pressed="true"]{border-color:var(--ink); background:var(--panel-2)}
.pickrow{display:flex; gap:12px; align-items:center}
.pick .pe{font-size:26px; flex:none; line-height:1}
.pick .pn{font-weight:800; font-size:14px; font-family:var(--f-disp); line-height:1.1; display:block}
.pick .pd{font-size:12px; color:var(--ink-3); line-height:1.3; display:block; margin-top:2px}

/* ---------- forms ---------- */
.field{display:flex; flex-direction:column; gap:6px}
.field label{font-size:10.5px; text-transform:uppercase; letter-spacing:.09em; color:var(--ink-3); font-weight:700}
.field input{
  border:2.5px solid var(--line); border-radius:var(--r-m); padding:13px; font-size:16px;
  font-weight:600; background:var(--panel); color:var(--ink); font-family:var(--f-ui); width:100%;
}
.field input:focus{border-color:var(--ink)}
.hint{font-size:11.5px; color:var(--ink-3)}
.err{font-size:12.5px; color:var(--bad); font-weight:700}

/* PIN */
.pindots{display:flex; gap:9px; justify-content:center; margin:6px 0}
.pindots i{
  width:52px; height:56px; border:2.5px solid var(--line); border-radius:var(--r-m);
  display:grid; place-items:center; font-size:26px; background:var(--panel); font-style:normal; color:var(--ink);
}
.pindots i.on{border-color:var(--ink)}
.pindots.shake{animation:sh .4s}
@keyframes sh{10%,90%{transform:translateX(-2px)}30%,70%{transform:translateX(4px)}50%{transform:translateX(-4px)}}

/* picture PIN */
.picgrid{display:grid; grid-template-columns:repeat(4,1fr); gap:8px}
.picbtn{border:2.5px solid var(--line); background:var(--panel); border-radius:var(--r-m); padding:10px 0; font-size:26px; line-height:1}
.picbtn:active{background:var(--panel-2)}
.picbtn.chosen{border-color:var(--ink); background:var(--panel-2)}
.picbtn .n{display:block; font-size:10px; font-weight:800; color:var(--ink-3); margin-top:2px; font-family:var(--f-ui)}

/* ---------- chart ---------- */
.chart{display:flex; align-items:flex-end; gap:6px; height:110px; position:relative}
.chart .gridline{position:absolute; left:0; right:0; border-top:1.5px dashed var(--line)}
.chart .gridline span{position:absolute; right:0; top:-14px; font-size:9px; color:var(--ink-3); background:var(--panel-2); padding:0 3px; font-weight:700}
.col{flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:4px; height:100%}
.col .bv{width:100%; border-radius:5px 5px 2px 2px; background:var(--grow); min-height:3px}
.col.today .bv{background:var(--keep)}
.col.empty .bv{background:var(--panel-3)}
.col .dl{font-size:9.5px; color:var(--ink-3); font-weight:700}
.col .cf{font-size:13px; line-height:1; min-height:14px}

/* ---------- install banner ---------- */
.install{display:flex; gap:10px; align-items:center; background:var(--keep); color:#fff; border-radius:var(--r-m); padding:11px 13px; font-size:11.5px; line-height:1.35}
.install button{border:0; background:rgba(255,255,255,.22); color:#fff; border-radius:10px; padding:7px 11px; font-weight:800; font-size:11.5px; flex:none}

/* ---------- bottom nav ---------- */
nav{
  position:fixed; bottom:0; left:0; right:0; z-index:20;
  background:var(--panel); border-top:1.5px solid var(--line);
  padding:7px 6px calc(11px + env(safe-area-inset-bottom));
  display:flex; gap:2px; max-width:430px; margin:0 auto;
}
nav button{flex:1; min-width:0; border:0; background:transparent; display:flex; flex-direction:column; align-items:center; gap:2px; padding:6px 0; border-radius:13px; color:var(--ink-3); font-size:10px; font-weight:700; white-space:nowrap}
nav button .ni{font-size:21px; line-height:1}
nav button[aria-pressed="true"]{color:var(--ink); background:var(--panel-2)}
nav button.plus .ni{background:var(--grow); color:#fff; width:46px; height:36px; border-radius:13px; display:grid; place-items:center; font-size:23px; margin-top:-7px; box-shadow:0 3px 0 #0C7A3C}
nav button.plus[aria-pressed="true"]{background:transparent; color:var(--grow)}

/* ---------- toast ---------- */
#toast{
  position:fixed; left:50%; bottom:calc(var(--navh) + 18px); transform:translateX(-50%) translateY(12px);
  background:var(--ink); color:#fff; border-radius:99px; padding:11px 18px; font-size:13px; font-weight:700;
  opacity:0; pointer-events:none; transition:.22s; z-index:40; max-width:88vw; text-align:center;
}
#toast.show{opacity:1; transform:translateX(-50%) translateY(0)}

/* lock screen has no nav, so it gets the full height */
body.locked{padding-bottom:0}
@media (prefers-reduced-motion:reduce){*{transition:none !important; animation:none !important}}

/* ============================================================
   the intro - the first thing a stranger sees
   Gold ground, because it has to look like something other than
   a form. Everything above the fold answers "what is this?".
   ============================================================ */
.intro{background:var(--gold); color:var(--ink); min-height:100vh; padding:env(safe-area-inset-top) 0 0}
.introwrap{max-width:430px; margin:0 auto; padding:22px 18px 34px; display:flex; flex-direction:column; gap:15px}
.introbrand{display:flex; align-items:center; gap:10px}
.intrologo{
  width:38px; height:38px; border-radius:11px; flex:none; display:grid; place-items:center;
  background:var(--ink); color:var(--gold); font-family:var(--f-disp); font-weight:800; font-size:21px;
}
.intromark{font-family:var(--f-disp); font-weight:800; font-size:21px; letter-spacing:-.02em}
.intromark b{color:#8F3010; font-weight:800}
.introh1{font-size:clamp(28px,8.5vw,35px); letter-spacing:-.035em; line-height:1.03; margin-top:6px}
.introlede{font-size:14.5px; line-height:1.45; color:#4A3000}
.intro .langtog{background:rgba(255,255,255,.55); border-color:rgba(27,19,48,.18)}
.intro .langtog button{color:#4A3000}
.intro .langtog button[aria-pressed="true"]{background:var(--ink); color:var(--gold)}

.introsection{
  font-size:10.5px; text-transform:uppercase; letter-spacing:.11em; font-weight:800;
  color:#7A4A00; margin-top:6px;
}
.introbowls{display:grid; grid-template-columns:1fr 1fr; gap:8px}
.ib{
  background:rgba(255,255,255,.62); border:2px solid var(--ibc); border-radius:var(--r-m);
  padding:11px 9px; display:flex; align-items:center; gap:9px; min-width:0;
}
.ibe{font-size:20px; line-height:1; flex:none}
.ibn{font-size:12px; font-weight:700; line-height:1.2; color:var(--ink); overflow-wrap:break-word; min-width:0}

.introsteps{display:flex; flex-direction:column; gap:8px; margin-top:4px}
.is{
  background:var(--panel); border-radius:var(--r-l); padding:13px;
  display:flex; align-items:flex-start; gap:11px;
}
.isn{
  width:23px; height:23px; border-radius:8px; flex:none; color:#fff; display:grid; place-items:center;
  font-family:var(--f-disp); font-weight:800; font-size:12.5px;
}
.ise{font-size:22px; line-height:1; flex:none}
.ist{min-width:0}
.ist b{display:block; font-family:var(--f-disp); font-weight:800; font-size:14.5px; letter-spacing:-.02em; line-height:1.1}
.ist span{display:block; font-size:12.5px; color:var(--ink-2); line-height:1.4; margin-top:3px}

.introsafe{
  background:rgba(27,19,48,.08); border-radius:var(--r-m); padding:11px 13px;
  font-size:12.5px; font-weight:600; color:#4A3000; line-height:1.4;
}
.introcta{margin-top:6px; font-size:19px}
.intrologin{
  width:100%; border:2.5px solid var(--ink); background:transparent; color:var(--ink);
  border-radius:var(--r-m); padding:13px; font-size:14px; font-weight:800; font-family:var(--f-ui);
}
.intrologin:active{background:rgba(27,19,48,.09)}
.introadd{font-size:12px; color:#4A3000; line-height:1.45; text-align:center; margin-top:2px}
.introby{font-size:10.5px; color:#6B4A10; line-height:1.45; text-align:center; margin-top:4px}

/* The intro has no bottom nav, so the body must not reserve room for one -
   otherwise the gold stops short and a white strip shows underneath. */
body.intro-open{padding-bottom:0; background:var(--gold)}

/* The intro mark is an SVG (the meter needle), not a character. */
.intrologo svg{display:block}

/* Shown above every screen while localStorage is refusing writes. A toast
   is the wrong shape for this: it is not a passing event, it is a state in
   which the app cannot keep the user's money records. */
.fullwarn{
  display:flex; gap:10px; align-items:flex-start; margin:10px 15px 0; padding:12px 13px;
  background:#FDE5DD; border:2px solid var(--bad); border-radius:var(--r-m);
}
.fullwarn .fwi{font-size:19px; line-height:1.1; flex:none}
.fullwarn b{display:block; font-family:var(--f-disp); font-weight:800; font-size:14px; color:#8A2410}
.fullwarn span span{display:block; font-size:12.5px; color:#6E2A12; line-height:1.4; margin-top:2px}
