:root { --brand:#1e3799; --teal:#2bcbba; --grad:linear-gradient(135deg,#1e3799 0%,#2480a9 55%,#2bcbba 100%); --ink:#1a1f36; --muted:#6b7385; }
* { -webkit-tap-highlight-color:transparent; }
body { background:#eef1f8; color:var(--ink); font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; min-height:100vh; }
.wrap { max-width:520px; margin:0 auto; padding:26px 16px 110px; }
.brand { text-align:center; margin-bottom:22px; }
.brand img { height:68px; width:auto; display:block; margin:0 auto 6px; }
.brand h1 { font-size:1.55rem; font-weight:800; letter-spacing:.01em; margin:0; color:var(--brand); }
.brand p { margin:2px 0 0; color:var(--muted); font-size:.9rem; }
.panel { background:#fff; border-radius:20px; padding:22px; box-shadow:0 6px 24px rgba(33,72,156,.09); }
.pin { width:100%; border:2px solid #dde3f0; border-radius:16px; font-size:2.2rem; font-weight:800; text-align:center; letter-spacing:.7em; padding:.55rem 0 .55rem .7em; background:#f8faff; outline:none; }
.pin:focus { border-color:var(--teal); box-shadow:0 0 0 4px rgba(43,203,186,.18); }
.go { width:100%; border:0; border-radius:16px; background:var(--grad); color:#fff; font-weight:700; font-size:1.05rem; padding:.95rem; margin-top:14px; }
.go:disabled { opacity:.6; }
.who { display:flex; align-items:center; gap:10px; background:#fff; border-radius:16px; padding:12px 14px; box-shadow:0 2px 10px rgba(33,72,156,.07); margin-bottom:16px; }
.who .dot { width:38px; height:38px; border-radius:12px; background:var(--grad); color:#fff; display:flex; align-items:center; justify-content:center; font-size:1.2rem; flex:none; }
.who b { display:block; font-size:.92rem; line-height:1.25; } .who small { color:var(--muted); }
.who form { margin-left:auto; } .who button { border:0; background:#eef1f8; color:var(--muted); border-radius:12px; padding:.5rem .8rem; font-weight:600; font-size:.8rem; white-space:nowrap; }
.who > div:nth-child(2) { min-width:0; }
.cards { display:grid; grid-template-columns:1fr; gap:14px; }
.card-t { display:flex; align-items:center; gap:16px; text-decoration:none; color:var(--ink); background:#fff; border-radius:20px; padding:20px; min-height:112px; box-shadow:0 4px 18px rgba(33,72,156,.09); transition:transform .12s, box-shadow .12s; border:2px solid transparent; }
.card-t:active { transform:scale(.98); border-color:var(--teal); }
.card-t .ic { width:64px; height:64px; border-radius:18px; background:var(--grad); color:#fff; display:flex; align-items:center; justify-content:center; font-size:1.9rem; flex:none; }
.card-t b { display:block; font-size:1.15rem; } .card-t span { color:var(--muted); font-size:.88rem; line-height:1.35; display:block; margin-top:2px; }
.card-t .arr { margin-left:auto; color:#b3bdd3; font-size:1.3rem; }
.fsearch { width:100%; border:2px solid #dbe3f3; border-radius:14px; padding:.75rem 1rem; font-size:1rem; background:#fff; margin:6px 0 4px; }
.fsearch:focus { outline:0; border-color:var(--teal); }
.fprog { display:flex; align-items:center; gap:10px; font-weight:800; margin:20px 2px 8px; font-size:1rem; }
.fprog i { width:36px; height:36px; border-radius:11px; color:#fff; display:flex; align-items:center; justify-content:center; flex:none; }
.fprog small { color:var(--muted); font-weight:600; }
.frow { display:flex; align-items:center; gap:12px; background:#fff; border-radius:16px; padding:12px 14px; margin-bottom:8px; text-decoration:none; color:var(--ink); box-shadow:0 2px 10px rgba(33,72,156,.07); min-height:64px; }
.frow:active { background:#eef4ff; }
.frow .ex { flex:none; min-width:46px; text-align:center; font-size:.72rem; font-weight:800; letter-spacing:.04em; padding:.35rem .3rem; border-radius:9px; color:#fff; text-transform:uppercase; }
.frow .tx { flex:1; min-width:0; } .frow .tx b { display:block; font-size:.96rem; line-height:1.25; } .frow .tx span { display:block; color:var(--muted); font-size:.78rem; margin-top:1px; }
.frow .dl { color:var(--brand); font-size:1.4rem; flex:none; }
.fnone { text-align:center; color:var(--muted); padding:28px 10px; }
/* school figures: a flat fact sheet. No boxes: sections divided by rules, the numbers are the design. */
.figs { border-top:3px solid var(--ink); }
.sec { padding:22px 2px 24px; border-bottom:1px solid #cfd6e6; }
.sec .lab h3 { margin:0; font-size:.78rem; font-weight:800; letter-spacing:.16em; text-transform:uppercase; color:var(--ink); }
.sec .lab h3::before { content:""; display:block; width:26px; height:4px; background:var(--c); margin-bottom:8px; }
.sec .lab small { display:block; color:var(--muted); font-size:.8rem; margin-top:5px; line-height:1.35; }
.sec .dat { margin-top:14px; }
.nums { display:flex; flex-wrap:wrap; gap:14px 34px; align-items:flex-end; }
.num b { display:block; font-size:2.3rem; font-weight:800; letter-spacing:-.02em; line-height:1; font-variant-numeric:tabular-nums; }
.num span { display:block; margin-top:5px; font-size:.72rem; font-weight:600; letter-spacing:.07em; text-transform:uppercase; color:var(--muted); }
.num.lead b { font-size:3.4rem; color:var(--c); }
.num.sm b { font-size:1.55rem; }
.num.dim { opacity:.32; }
.today { margin:0 2px 14px; font-size:.82rem; color:var(--muted); }
.today summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:8px; padding:4px 0; }
.today summary::-webkit-details-marker { display:none; }
.today .pip { width:8px; height:8px; border-radius:50%; background:#c4cbdb; flex:none; } .today .pip.on { background:#2e9d63; }
.today summary em { font-style:normal; font-size:.7rem; margin-left:2px; opacity:.7; }
.today[open] summary em { transform:rotate(180deg); }
.today ul { list-style:none; margin:6px 0 0; padding:0; display:flex; flex-wrap:wrap; gap:4px 16px; }
.today li { opacity:.7; } .today li.done { opacity:1; color:var(--ink); } .today li.done::before { content:"✓ "; color:#2e9d63; font-weight:700; } .today li.me { font-weight:700; }
.rule { border-top:1px solid #cfd6e6; margin:22px 0 18px; }
.toph { margin-top:16px; font-size:.82rem; color:var(--muted); display:flex; flex-wrap:wrap; gap:6px 18px; align-items:baseline; }
.toph span { font-size:.72rem; font-weight:600; letter-spacing:.07em; text-transform:uppercase; }
.toph em { font-style:normal; color:var(--ink); font-weight:600; } .toph b { color:#c0392b; margin-left:3px; }
.strip { display:flex; height:7px; margin:18px 0 4px; background:#dfe5f2; }
.strip span { display:block; height:100%; }
.grades { display:flex; align-items:flex-end; gap:6px; height:96px; margin-top:22px; border-bottom:1px solid var(--ink); }
.grades div { flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; }
.grades u { display:block; width:100%; background:var(--ink); }
.grades em { font-style:normal; font-size:.6rem; color:var(--muted); margin-bottom:2px; }
.glabels { display:flex; gap:6px; margin-top:4px; }
.glabels span { flex:1; text-align:center; font-size:.68rem; font-weight:700; color:var(--ink); }
.stamp { margin-left:auto; font-size:.72rem; color:var(--muted); white-space:nowrap; }
.glance, .hero { display:none; }
/* desktop: use the width. Phones keep the single-column layout above. */
@media (min-width: 992px) {
    .wrap { max-width:1120px; padding:34px 32px 110px; }
    .brand { display:grid; grid-template-columns:auto 1fr; column-gap:16px; align-items:center; justify-items:start; text-align:left; margin-bottom:26px; }
    .brand img { height:58px; margin:0; grid-row:1 / 3; }
    .brand h1 { font-size:1.75rem; } .brand p { font-size:.95rem; }
    .who { padding:14px 18px; } .who b { font-size:1rem; }
    .cards { grid-template-columns:repeat(auto-fit, minmax(340px, 1fr)); gap:18px; }
    .glance { display:grid; grid-template-columns:repeat(4, 1fr); margin-bottom:26px; border-top:3px solid var(--ink); border-bottom:1px solid #cfd6e6; }
    .glance > div { padding:16px 22px 18px 0; } .glance > div + div { padding-left:22px; border-left:1px solid #cfd6e6; }
    .glance b { display:block; font-size:2.9rem; font-weight:800; letter-spacing:-.02em; line-height:1.05; color:var(--c); font-variant-numeric:tabular-nums; }
    .glance span { display:block; margin-top:5px; color:var(--muted); font-size:.72rem; font-weight:600; letter-spacing:.07em; text-transform:uppercase; }
    .sec { display:grid; grid-template-columns:230px minmax(0, 1fr); column-gap:40px; padding:30px 2px 32px; }
    .sec .dat { margin-top:0; }
    .num b { font-size:2.6rem; } .num.lead b { font-size:4.2rem; } .num.sm b { font-size:1.7rem; }
    .grades { height:120px; gap:8px; }
    .card-t { min-height:128px; padding:24px; } .card-t:hover { transform:translateY(-3px); box-shadow:0 10px 28px rgba(33,72,156,.15); border-color:var(--teal); }
    .back { font-size:1rem; margin-bottom:10px; }
    /* upload: a comfortable centred column, more photos per row */
    .w-upload .back, .w-upload .who, .w-upload .panel { max-width:780px; margin-left:auto; margin-right:auto; }
    .w-upload .back { display:flex; } .w-upload .panel { padding:30px; }
    .thumbs { grid-template-columns:repeat(5, 1fr); gap:12px; }
    /* PIN: story on the left, the PIN box on the right */
    .w-pin { display:grid; grid-template-columns:minmax(0, 1fr) 440px; column-gap:72px; align-content:center; min-height:100vh; padding-bottom:60px; }
    .w-pin #add { grid-column:1 / -1; }
    .w-pin .brand { grid-column:1; grid-row:2; align-self:end; margin-bottom:18px; }
    .w-pin .brand img { height:84px; } .w-pin .brand h1 { font-size:2.3rem; }
    .w-pin .hero { display:block; grid-column:1; grid-row:3; align-self:start; }
    .w-pin .today { grid-column:1; grid-row:4; margin-top:22px; }
    .w-pin .panel { grid-column:2; grid-row:2 / 4; align-self:center; padding:36px 34px; }
    .hero h2 { font-size:1.9rem; font-weight:800; line-height:1.25; margin:0 0 18px; max-width:30ch; }
    .hero ul { list-style:none; padding:0; margin:0; display:grid; gap:14px; }
    .hero li { display:flex; align-items:center; gap:14px; font-size:1.02rem; color:#414a63; }
    .hero li i { width:44px; height:44px; border-radius:13px; background:var(--grad); color:#fff; display:flex; align-items:center; justify-content:center; font-size:1.3rem; flex:none; }
}
.soon { text-align:center; color:var(--muted); font-size:.82rem; margin-top:18px; }
.back { display:inline-flex; align-items:center; gap:6px; text-decoration:none; color:var(--brand); font-weight:700; padding:.5rem .2rem; margin-bottom:6px; font-size:.95rem; }
.pick { display:flex; align-items:center; justify-content:center; gap:10px; border:2px dashed #b9c6e4; border-radius:18px; background:#f8faff; color:var(--brand); font-weight:700; font-size:1.05rem; padding:1.4rem; width:100%; }
.pick:active { background:#eaf1ff; }
.pasteb { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; margin-top:10px; border:2px solid #dbe3f3; border-radius:14px; background:#fff; color:var(--brand); font-weight:700; font-size:.95rem; padding:.7rem; }
.pasteb:active { background:#eaf1ff; }
.thumbs { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:12px; }
.th { position:relative; aspect-ratio:1/1; border-radius:12px; overflow:hidden; background:#e8ecf4; }
.th img { width:100%; height:100%; object-fit:cover; display:block; }
.th button { position:absolute; top:5px; right:5px; width:32px; height:32px; border:0; border-radius:50%; background:rgba(15,20,40,.8); color:#fff; font-size:18px; line-height:1; display:flex; align-items:center; justify-content:center; }
.th small { position:absolute; left:0; right:0; bottom:0; background:rgba(15,20,40,.62); color:#fff; font-size:.66rem; text-align:center; padding:1px 0; }
.help { font-size:.85rem; color:var(--muted); margin-top:10px; min-height:1.2em; }
.err { background:#fdecec; color:#a32; border-radius:12px; padding:.7rem .9rem; font-size:.9rem; margin-bottom:12px; }
.ok-box { text-align:center; padding:10px 0 4px; } .ok-box i { font-size:3rem; color:#1f9d63; }
/* "add this to your phone" bar */
#add { display:none; align-items:center; gap:10px; background:#fff; border-radius:14px; padding:8px 8px 8px 12px; margin:0 0 14px; box-shadow:0 2px 10px rgba(33,72,156,.10); }
#add.on { display:flex; }
#add img { width:30px; height:30px; border-radius:8px; flex:none; }
#add b { flex:1; min-width:0; font-size:.88rem; font-weight:700; line-height:1.2; }
#add .a { border:0; background:var(--grad); color:#fff; font-weight:700; font-size:.85rem; border-radius:10px; padding:.5rem 1rem; white-space:nowrap; flex:none; }
#add .n { border:0; background:transparent; color:#98a2b8; font-size:1.35rem; line-height:1; padding:0 6px; flex:none; }
#hm { display:none; position:fixed; inset:0; background:rgba(10,15,35,.72); z-index:65; align-items:flex-end; justify-content:center; }
#hm.on { display:flex; }
#hm .sheet { background:#fff; border-radius:22px 22px 0 0; padding:22px 20px calc(22px + env(safe-area-inset-bottom)); max-width:520px; width:100%; }
#hm ol { padding-left:1.2rem; margin:12px 0; } #hm li { margin-bottom:.55rem; font-size:.98rem; }
#hm .x { width:100%; border:0; background:var(--grad); color:#fff; font-weight:700; border-radius:14px; padding:.8rem; }
/* floating logo: opens the developer information */
#cb { position:fixed; right:16px; bottom:calc(16px + env(safe-area-inset-bottom)); z-index:50; border:0; background:#fff; padding:6px; border-radius:16px; box-shadow:0 4px 16px rgba(20,30,70,.28); }
#cb img { width:44px; height:auto; display:block; border-radius:8px; }
#cm { display:none; position:fixed; inset:0; background:rgba(10,15,35,.72); z-index:60; align-items:center; justify-content:center; padding:16px; }
#cm.on { display:flex; }
#cm .box { background:#fff; border-radius:18px; padding:26px 22px; max-width:360px; width:100%; text-align:center; box-shadow:0 10px 40px rgba(0,0,0,.35); }
#cm .logo { width:84px; border-radius:10px; margin-bottom:8px; }
#cm h3 { color:#2c3e50; font-size:1.1rem; margin:0 0 6px; font-weight:700; }
#cm .pf { width:88px; height:88px; border-radius:50%; object-fit:cover; border:3px solid #3498db; display:block; margin:8px auto; box-shadow:0 3px 10px rgba(0,0,0,.12); }
#cm .dn { font-weight:800; color:#16a085; font-size:1.3rem; margin:8px 0 2px; } #cm .ps { color:#7f8c8d; margin-bottom:12px; }
#cm .ci { text-align:left; background:#f1f8ff; border-left:4px solid #3498db; border-radius:8px; padding:10px 14px; font-size:.92rem; line-height:1.7; margin:0 auto 12px; }
#cm .ci a { color:#3498db; text-decoration:none; }
#cm .dis { font-size:.75rem; color:#7f8c8d; font-style:italic; line-height:1.5; }
#cm .x { margin-top:14px; border:0; background:var(--grad); color:#fff; font-weight:700; border-radius:12px; padding:.6rem 1.6rem; }
