:root{--green:#126c38;--green-deep:#338053;--green-dark:#0c4d28;--gold:#dda440;--gold-soft:#f7edd8;--ink:#212121;--muted:#6b7280;--line:#e7ebe8;--bg:#f4f4f4;--pale:#eef4f1;--red:#c2410c;--red-soft:#fbe9e2}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;height:100%}
body{font-family:'Karla',-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;background:var(--bg);color:var(--ink)}
.app{display:flex;flex-direction:column;height:100vh;height:100dvh;position:relative;background:var(--bg);max-width:520px;margin:0 auto;box-shadow:0 0 40px rgba(20,40,25,.12)}
.screen{display:none;flex-direction:column;height:100%}
.screen.active{display:flex}
.topbar{background:var(--green);color:#fff;padding:16px;display:flex;align-items:center;gap:12px;padding-top:calc(16px + env(safe-area-inset-top))}
.logo{height:34px;width:auto;display:block}
.spacer{flex:1}
.avatarbtn{width:38px;height:38px;border-radius:50%;border:2px solid rgba(255,255,255,.5);background:rgba(255,255,255,.18);color:#fff;font-weight:700;font-size:14px;cursor:pointer;font-family:inherit;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.backbtn{background:rgba(255,255,255,.16);border:0;color:#fff;width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;padding:0}
.backbtn svg{width:20px;height:20px;stroke:#fff;stroke-width:2.4;fill:none}
.toptitle{font-weight:700;font-size:17px}
.topsub{font-size:12px;opacity:.9}
.body{flex:1;overflow-y:auto;padding:16px 16px 90px;-webkit-overflow-scrolling:touch}
.greet-h{font-size:22px;font-weight:700;margin:2px 0}
.greet-s{color:var(--muted);font-size:14px;margin-bottom:16px;display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.rolepill{display:inline-flex;align-items:center;gap:5px;background:#fff;border:1.5px solid var(--green);color:var(--green-dark);font-size:11.5px;font-weight:700;padding:6px 11px;border-radius:999px;font-family:inherit}
.tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:22px}
.tile{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px 14px;cursor:pointer;display:flex;flex-direction:column;gap:12px;min-height:104px;transition:transform .05s ease;position:relative}
.tile:active{transform:scale(.98)}
.tile .ic{width:44px;height:44px;border-radius:12px;background:var(--pale);display:flex;align-items:center;justify-content:center}
.tile .ic svg{width:23px;height:23px;stroke:var(--green);stroke-width:2;fill:none}
.tile b{font-size:15px;font-weight:600}
.tile .dot{position:absolute;top:12px;right:12px;min-width:20px;height:20px;border-radius:999px;background:var(--red);color:#fff;font-size:11px;font-weight:700;display:none;align-items:center;justify-content:center;padding:0 6px}
.tile .dot.show{display:flex}
.section-h{font-size:12px;font-weight:700;letter-spacing:1px;color:var(--muted);text-transform:uppercase;margin:6px 2px 10px}
.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px 15px;margin-bottom:12px;cursor:pointer}
.card .row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.card .t{font-weight:700;font-size:15.5px}
.card .m{color:var(--muted);font-size:13px;margin-top:3px}
.tag{font-size:11px;font-weight:700;padding:5px 9px;border-radius:999px;white-space:nowrap}
.tag.due{background:var(--gold-soft);color:#8a5a12}
.tag.sched{background:#eef2f0;color:#5b6b60}
.tag.done{background:var(--pale);color:var(--green-dark)}
.detail-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px;margin-bottom:14px}
.detail-card h2{margin:0 0 8px;font-size:20px}
.detail-card .m{color:var(--muted);font-size:13.5px;margin:2px 0}
.theme-chip{display:inline-block;margin-top:10px;background:var(--pale);color:var(--green-dark);font-size:12.5px;font-weight:600;padding:6px 11px;border-radius:999px}
.facts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
.fact{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px}
.fact b{font-size:22px;display:block;line-height:1.1}
.fact.open b{color:var(--gold)}
.fact span{font-size:12px;color:var(--muted)}
.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;border:0;border-radius:14px;padding:16px;font-size:15.5px;font-weight:700;cursor:pointer;font-family:inherit;margin-bottom:10px}
.btn.primary{background:var(--green);color:#fff}
.btn.deep{background:var(--green-deep);color:#fff}
.btn.ghost{background:#fff;color:var(--ink);border:1px solid var(--line)}
.btn.danger{background:var(--red);color:#fff}
.btn:disabled{opacity:.55}
.btn:active{filter:brightness(.96)}
.note-inline{color:var(--muted);font-size:12.5px;line-height:1.5;margin-top:4px}
.banner{background:var(--pale);border:1px solid #dcece0;color:#33604a;font-size:12.5px;line-height:1.5;padding:11px 13px;border-radius:12px;margin-bottom:14px}
.banner.err{background:var(--red-soft);border-color:#f0cfc0;color:var(--red)}
.reg-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.reg-head .cnt{font-size:13px;font-weight:700;color:var(--green-dark)}
.linkbtn{background:none;border:0;color:var(--green);font-weight:700;font-size:13px;cursor:pointer;font-family:inherit}
.prow{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:11px 12px;margin-bottom:9px}
.avatar{width:40px;height:40px;border-radius:50%;background:#eef2f0;color:#7b8a80;display:flex;align-items:center;justify-content:center;font-weight:700;flex-shrink:0}
.prow .who{flex:1;min-width:0}
.prow .who b{font-size:14.5px}
.prow .who span{display:block;font-size:12px;color:var(--muted)}
.prow.pending{border-color:#f0dcb4;background:#fffdf8}
.prow .pend{font-size:10px;font-weight:700;color:#8a5a12;background:#fdf3e3;border-radius:6px;padding:2px 6px;margin-left:6px;white-space:nowrap}
.picklist .prow{cursor:pointer}
.seg{display:flex;background:#f1f4f2;border-radius:10px;padding:3px;gap:3px}
.seg-btn{border:0;background:transparent;color:var(--muted);font-weight:700;font-size:12.5px;padding:8px 11px;border-radius:8px;cursor:pointer;font-family:inherit}
.seg-btn.on-present{background:var(--green);color:#fff}
.seg-btn.on-absent{background:var(--red);color:#fff}
.field{margin-bottom:14px}
.field .lab{font-size:11px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;color:var(--muted);margin-bottom:4px}
input.txt{width:100%;border:1px solid var(--line);border-radius:12px;padding:13px;font-family:inherit;font-size:15px;background:#fff;color:var(--ink)}
input.txt:focus{outline:2px solid var(--pale);border-color:var(--green)}
input.txt.code{font-size:26px;letter-spacing:8px;text-align:center;font-weight:700;padding:14px 13px}
select.txt{width:100%;border:1px solid var(--line);border-radius:12px;padding:13px 38px 13px 13px;font-family:inherit;font-size:15px;background:#fff;color:var(--ink);-webkit-appearance:none;appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23126c38' stroke-width='2.4'><path d='M6 9l6 6 6-6'/></svg>");background-repeat:no-repeat;background-position:right 12px center;background-size:18px}
.gal{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.gal .cell{position:relative;aspect-ratio:1/1;border-radius:12px;overflow:hidden;background:var(--pale);border:1px solid var(--line)}
.gal .cell img,.gal .cell video{width:100%;height:100%;object-fit:cover;display:block}
.gal .cell .vidtag{position:absolute;left:6px;bottom:6px;background:rgba(0,0,0,.6);color:#fff;font-size:10px;font-weight:700;padding:2px 6px;border-radius:6px;letter-spacing:.5px}
.gal .cell .del{position:absolute;top:5px;right:5px;width:24px;height:24px;border-radius:999px;border:0;background:rgba(0,0,0,.55);color:#fff;font-size:15px;line-height:1;cursor:pointer;font-family:inherit;padding:0}
.upitem{display:flex;align-items:center;gap:10px;font-size:12.5px;color:var(--muted)}
.upitem .nm{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.upitem .st{font-weight:700}
.upitem .st.ok{color:var(--green)}
.upitem .st.bad{color:var(--red)}
.upitem-wrap{padding:8px 0;border-bottom:1px solid var(--line)}
.upbar{height:4px;border-radius:999px;background:#e9edea;overflow:hidden;margin-top:6px}
.upbar i{display:block;height:100%;width:0;background:var(--green);transition:width .2s ease}
.thr{display:flex;gap:12px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 13px;margin-bottom:10px;cursor:pointer;align-items:center}
.thr.bcast{border-left:4px solid var(--gold)}
.thr .ava{width:42px;height:42px;border-radius:50%;background:var(--pale);color:var(--green-dark);display:flex;align-items:center;justify-content:center;font-weight:700;flex-shrink:0;font-size:14px}
.thr.bcast .ava{background:var(--gold-soft);color:#8a5a12}
.thr .mid{flex:1;min-width:0}
.thr .mid b{font-size:14.5px;display:block}
.thr .mid span{display:block;font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px}
.thr .rt{text-align:right;flex-shrink:0;display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.thr .rt .tm{font-size:11px;color:var(--muted)}
.thr .rt .unread{background:var(--green);color:#fff;font-size:10.5px;font-weight:700;min-width:19px;height:19px;border-radius:999px;display:flex;align-items:center;justify-content:center;padding:0 5px}
.bub{max-width:78%;padding:10px 13px;border-radius:16px;font-size:14px;line-height:1.45;margin-bottom:9px;word-wrap:break-word}
.bub.them{background:#fff;border:1px solid var(--line);border-bottom-left-radius:5px;margin-right:auto}
.bub.me{background:var(--green);color:#fff;border-bottom-right-radius:5px;margin-left:auto}
.bub .snd{font-size:11px;font-weight:700;color:var(--green-dark);display:block;margin-bottom:3px}
.bub .tm{font-size:10.5px;opacity:.65;display:block;margin-top:4px}
.composer{position:absolute;left:0;right:0;bottom:calc(64px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);padding:10px 12px;display:flex;gap:9px;align-items:flex-end}
.composer textarea{flex:1;border:1px solid var(--line);border-radius:14px;padding:11px 13px;font-family:inherit;font-size:14.5px;resize:none;max-height:96px;color:var(--ink)}
.composer textarea:focus{outline:2px solid var(--pale);border-color:var(--green)}
.composer .sendbtn{width:44px;height:44px;border-radius:50%;border:0;background:var(--green);color:#fff;cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:0}
.composer .sendbtn svg{width:20px;height:20px;stroke:#fff;stroke-width:2.2;fill:none}
.offbar{background:#fdf3e3;border:1px solid #f0dcb4;color:#8a5a12;font-size:12.5px;font-weight:600;padding:9px 13px;border-radius:12px;margin-bottom:12px;display:none;align-items:center;gap:8px}
.offbar.show{display:flex}
.offbar .dot{width:8px;height:8px;border-radius:50%;background:#dda440;flex-shrink:0}
.offbar.syncing{background:var(--pale);border-color:#dcece0;color:#33604a}
.offbar.syncing .dot{background:var(--green)}
.prof-head{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;margin-bottom:16px}
.prof-photo{width:66px;height:66px;border-radius:50%;background:var(--pale);color:var(--green-dark);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:22px;flex-shrink:0}
.prof-head .who b{font-size:18px;display:block}
.prof-head .who span{font-size:13px;color:var(--muted);display:block;margin-top:2px}
.tabbar{position:absolute;bottom:0;left:0;right:0;height:calc(64px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:#fff;border-top:1px solid var(--line);display:flex}
.tab{flex:1;border:0;background:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--muted);font-size:11px;font-weight:600;cursor:pointer;font-family:inherit}
.tab svg{width:22px;height:22px;stroke:currentColor;stroke-width:2;fill:none}
.tab.active{color:var(--green)}
.sheet-wrap{position:absolute;inset:0;background:rgba(16,35,26,.5);display:none;align-items:flex-end;z-index:30}
.sheet-wrap.show{display:flex}
.sheet{background:#fff;width:100%;border-radius:20px 20px 0 0;padding:20px 18px calc(20px + env(safe-area-inset-bottom))}
.sheet-t{font-size:17px;font-weight:700;margin-bottom:6px}
.sheet-m{font-size:13.5px;color:var(--muted);line-height:1.5;margin-bottom:16px}
.toast{position:absolute;left:50%;bottom:90px;transform:translateX(-50%) translateY(14px);background:#10231a;color:#fff;font-size:13.5px;font-weight:600;padding:11px 18px;border-radius:12px;opacity:0;pointer-events:none;transition:all .22s ease;white-space:nowrap;z-index:20;box-shadow:0 8px 24px rgba(0,0,0,.25);max-width:90%;overflow:hidden;text-overflow:ellipsis}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.signin{display:flex;flex-direction:column;justify-content:center;min-height:100%;padding:32px 24px;background:var(--green)}
.signin .logo-big{width:200px;margin:0 auto 10px;display:block}
.signin .tag-line{color:rgba(255,255,255,.85);text-align:center;font-size:14px;margin-bottom:30px}
.signin .panel{background:#fff;border-radius:20px;padding:22px}
.signin h1{font-size:20px;margin:0 0 16px}
.beta-note{color:rgba(255,255,255,.75);font-size:12px;text-align:center;margin-top:18px;line-height:1.5}
.loading{display:flex;align-items:center;justify-content:center;height:100vh;color:var(--muted);font-size:14px}
.venue-card{display:flex;gap:12px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:13px;margin-bottom:11px;align-items:center}
.venue-thumb{width:52px;height:52px;border-radius:12px;background:var(--pale);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.venue-thumb svg{width:22px;height:22px;stroke:var(--green);stroke-width:2;fill:none}
.venue-card .info{flex:1}
.venue-card .info b{font-size:15px;display:block}
.venue-card .info span{font-size:12.5px;color:var(--muted);display:block;margin-top:2px}
.venue-card.tappable{cursor:pointer}
.venue-card .chev{width:18px;height:18px;stroke:var(--muted);stroke-width:2.4;fill:none;flex-shrink:0}
.kv{display:flex;gap:10px;padding:11px 0;border-bottom:1px solid var(--line)}
.kv:last-child{border-bottom:0}
.kv .k{width:104px;flex-shrink:0;font-size:11px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;color:var(--muted);padding-top:2px}
.kv .v{flex:1;font-size:14.5px;line-height:1.5;word-break:break-word}
.kv .v a{color:var(--green);font-weight:600;text-decoration:none}
.note{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 13px;margin-bottom:10px}
.note .who{font-size:11.5px;font-weight:700;color:var(--green-dark);margin-bottom:4px}
.note .who span{font-weight:400;color:var(--muted)}
.note .bd{font-size:14px;line-height:1.5;white-space:pre-wrap;word-break:break-word}
.note.mine{background:var(--pale);border-color:#dcece0}
.cal{background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px;margin-bottom:14px}
.cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.cal-head b{font-size:15px}
.cal-nav{display:flex;gap:6px}
.cal-nav button{width:32px;height:32px;border-radius:9px;border:1px solid var(--line);background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.cal-nav svg{width:16px;height:16px;stroke:var(--ink);stroke-width:2.4;fill:none}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.cal-dow{font-size:10px;font-weight:700;color:var(--muted);text-align:center;padding:4px 0;text-transform:uppercase}
.cal-day{aspect-ratio:1/1;border:0;background:none;border-radius:9px;font-family:inherit;font-size:13px;color:var(--ink);cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:0}
.cal-day.pad{visibility:hidden}
.cal-day .pip{width:5px;height:5px;border-radius:50%;background:var(--green);opacity:0}
.cal-day.has .pip{opacity:1}
.cal-day.today{font-weight:700;color:var(--green-dark);background:var(--pale)}
.cal-day.sel{background:var(--green);color:#fff}
.cal-day.sel .pip{background:#fff}
.cal-filter{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.cal-filter .seg{flex:1}
.cal-filter .seg-btn{flex:1;text-align:center}
.seg-btn.on{background:var(--green);color:#fff}
.chip-clear{background:none;border:0;color:var(--green);font-weight:700;font-size:13px;cursor:pointer;font-family:inherit;white-space:nowrap}
.srch{margin-bottom:12px}
.task{display:flex;gap:12px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 13px;margin-bottom:10px;align-items:flex-start}
.task .tick{width:26px;height:26px;border-radius:50%;border:2px solid var(--line);background:#fff;cursor:pointer;flex-shrink:0;padding:0;display:flex;align-items:center;justify-content:center;margin-top:1px}
.task .tick svg{width:14px;height:14px;stroke:#fff;stroke-width:3;fill:none}
.task.done .tick{background:var(--green);border-color:var(--green)}
.task .mid{flex:1;min-width:0}
.task .mid b{font-size:14.5px;display:block;line-height:1.35}
.task.done .mid b{text-decoration:line-through;color:var(--muted)}
.task .mid .sub{font-size:12.5px;color:var(--muted);display:block;margin-top:3px}
.task .mid .det{font-size:13px;color:var(--muted);display:block;margin-top:5px;line-height:1.45}
.task .due{font-size:11px;font-weight:700;padding:4px 8px;border-radius:999px;background:#eef2f0;color:#5b6b60;white-space:nowrap}
.task .due.soon{background:var(--gold-soft);color:#8a5a12}
.task .due.late{background:var(--red-soft);color:var(--red)}


/* Profile picture. The artwork is round everywhere so a portrait crops sensibly. */
.prof-photo{overflow:hidden}
.prof-photo img{width:100%;height:100%;object-fit:cover;display:block}
.avatarbtn{overflow:hidden;padding:0}
.avatarbtn img{width:100%;height:100%;object-fit:cover;display:block}
.linkbtn{display:block;background:none;border:0;padding:4px 0 0;font-family:inherit;font-size:13px;
font-weight:700;color:var(--green);cursor:pointer;text-decoration:underline}
.avmsg{display:block;font-size:12px;color:var(--muted);margin-top:2px}

/* A way through to the office admin, shown only to admins. They went to the phone
   app on their laptops and could not find it, which is a signposting problem. */
.adminbar{display:flex;align-items:center;gap:12px;background:var(--pale);border:1px solid #dcece0;
border-radius:13px;padding:13px 15px;margin-bottom:16px;text-decoration:none;color:var(--green-dark)}
.adminbar:active{background:#dcece0}
.adminbar .ic svg{width:22px;height:22px;stroke:currentColor;stroke-width:2;fill:none;display:block}
.adminbar .tx{flex:1;min-width:0}
.adminbar .tx b{display:block;font-size:15px}
.adminbar .tx small{display:block;font-size:12.5px;color:#4a6b58;margin-top:2px;line-height:1.4}
.adminbar .ch{width:18px;height:18px;stroke:currentColor;stroke-width:2;fill:none;flex-shrink:0;opacity:.6}

/* ---- donations ---- */
.qrwrap{text-align:center;background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;margin-bottom:20px}
.qr{width:210px;max-width:70vw;margin:0 auto}
.qr svg{width:100%;height:auto;display:block}
.qrcap{font-size:13px;color:var(--muted);line-height:1.5;margin:12px 0 14px}
.dtot{font-weight:700;font-size:17px;color:var(--green-dark);margin-bottom:8px}
.dlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.dlist li{display:flex;gap:10px;align-items:baseline;background:#fff;border:1px solid var(--line);border-radius:10px;padding:9px 12px}
.dlist li b{min-width:64px}
.dlist li span{font-size:13px;color:var(--muted)}

/* ---- red flag on access needs: tutors and admins only ---- */
.prow.flagged{border-left:4px solid var(--red)}
.aflag{display:inline-flex;align-items:center;justify-content:center;width:30px;height:26px;margin-left:6px;vertical-align:-6px;border:0;border-radius:8px;background:var(--red-soft);color:var(--red);padding:0;cursor:pointer}
.aflag svg{width:15px;height:15px}
