/* Palette from the original documents; card style borrowed from StepBuddy —
   big rounded tiles, rounded type, coloured shadows. */
:root{
  --paper:#F5F7F5; --surface:#FFFFFF; --surface-2:#EDF1EE;
  --ink:#18272B; --ink-2:#3D5359; --muted:#6B7F84;
  --accent:#2E6F62; --accent-soft:#DCEBE5;
  --alert:#A8482A; --alert-soft:#F6E4DC;
  --line:#DBE3E0; --line-soft:#E9EEEC;
  --shadow:0 1px 2px rgba(24,39,43,.05),0 8px 24px -14px rgba(24,39,43,.22);
  --round:ui-rounded,"Nunito","SF Pro Rounded",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,monospace;
  --r:18px;
  --tabbar:78px;

  /* Section tints — deep enough that white text stays legible on them. */
  --tint-1:#2A7FB8; --tint-2:#C8791B; --tint-3:#D9503C; --tint-4:#6C4FD1;
  --tint-5:#3E9450; --tint-6:#C74B8E; --tint-7:#2E8073; --tint-8:#C2621F;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root{
    --paper:#111A1D; --surface:#182428; --surface-2:#1F2E33;
    --ink:#E7EFEC; --ink-2:#B6C7C9; --muted:#8CA1A6;
    --accent:#63B7A4; --accent-soft:#1D3B36;
    --alert:#E28A61; --alert-soft:#3A241B;
    --line:#28383D; --line-soft:#202E33;
    --shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px -14px rgba(0,0,0,.7);
    --tint-1:#3D93CC; --tint-2:#D2871F; --tint-3:#E15F49; --tint-4:#7E62E0;
    --tint-5:#48A65C; --tint-6:#D45B9C; --tint-7:#38907F; --tint-8:#D06F26;
    color-scheme:dark;
  }
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--paper);color:var(--ink);
  font-family:var(--round);font-size:16px;line-height:1.5;
  -webkit-font-smoothing:antialiased;overscroll-behavior-y:none;
}
[hidden]{display:none!important}
h1,h2,h3,h4{font-family:var(--round);font-weight:800;letter-spacing:-.015em;margin:0}
b,strong{font-weight:700}
a{color:var(--accent)}
button{font:inherit;color:inherit;font-family:var(--round)}

.eyebrow{
  font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  color:var(--accent);margin:0 0 2px;
}

/* ------------------------------------------------------------------ lock */
.lock{position:fixed;inset:0;display:grid;place-items:center;padding:24px;background:var(--paper)}
.lockcard{
  width:100%;max-width:390px;background:var(--surface);border:1px solid var(--line);
  border-radius:24px;padding:28px 24px;box-shadow:var(--shadow);
}
.lockcard h1{font-size:30px;margin:0 0 8px}
.locknote{color:var(--muted);font-size:14.5px;margin:0 0 22px}
.lockcard label{
  display:block;font-size:11px;font-weight:800;letter-spacing:.11em;
  text-transform:uppercase;color:var(--muted);margin:0 0 8px;
}
.whorow{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:22px}
.whorow button{
  flex:1 1 auto;padding:13px 14px;border-radius:14px;background:var(--surface);
  border:2px solid var(--line);cursor:pointer;font-size:16px;font-weight:700;
}
.whorow button[aria-checked="true"]{background:var(--accent-soft);border-color:var(--accent);color:var(--ink)}
.lockcard input{
  width:100%;padding:15px;border-radius:14px;border:2px solid var(--line);
  background:var(--paper);color:var(--ink);font-size:17px;margin-bottom:18px;font-family:var(--round);
}
.lockcard input:focus-visible,.whorow button:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.lockcard button[type=submit]{
  width:100%;padding:16px;border-radius:16px;border:none;background:var(--accent);
  color:#fff;font-size:17px;font-weight:800;cursor:pointer;
}
@media (prefers-color-scheme:dark){.lockcard button[type=submit]{color:#0C1618}}
.lockcard button[type=submit]:disabled{opacity:.55}
.lockerror{
  margin:-6px 0 14px;padding:11px 13px;border-radius:12px;font-size:14.5px;font-weight:600;
  background:var(--alert-soft);color:var(--alert);border:1px solid var(--alert);
}

/* ------------------------------------------------------------------- top */
.top{
  position:sticky;top:0;z-index:20;background:var(--paper);
  border-bottom:1px solid var(--line);
  padding:calc(env(safe-area-inset-top) + 12px) 18px 11px;
}
.topinner{display:flex;align-items:center;gap:10px;max-width:720px;margin:0 auto}
.titles{flex:1;min-width:0}
.top h1{font-size:24px;line-height:1.15}
.back{
  display:inline-flex;align-items:center;gap:3px;background:var(--surface-2);
  border:none;border-radius:999px;padding:9px 15px 9px 11px;font-size:14px;
  font-weight:700;color:var(--ink);cursor:pointer;flex:none;
}
.back svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.4;
  stroke-linecap:round;stroke-linejoin:round}
.sync{
  display:inline-flex;align-items:center;gap:7px;background:var(--surface);
  border:1px solid var(--line);border-radius:999px;padding:7px 13px;
  font-size:12px;font-weight:700;color:var(--muted);cursor:pointer;white-space:nowrap;flex:none;
}
.syncdot{width:8px;height:8px;border-radius:50%;background:var(--accent);flex:none}
.sync[data-state="offline"] .syncdot,.sync[data-state="error"] .syncdot{background:var(--alert)}
.sync[data-state="saving"] .syncdot{background:var(--muted);animation:pulse 1s ease-in-out infinite}
@keyframes pulse{50%{opacity:.25}}

/* ------------------------------------------------------------------ main */
main{
  max-width:720px;margin:0 auto;
  padding:18px 18px calc(var(--tabbar) + env(safe-area-inset-bottom) + 28px);
}
section{margin-bottom:28px}
section>h2{font-size:23px;margin-bottom:4px}
.sectionnote{color:var(--muted);font-size:14.5px;margin:0 0 14px;max-width:60ch}
h3.sub{
  font-size:11px;font-weight:800;letter-spacing:.11em;text-transform:uppercase;
  color:var(--muted);margin:22px 0 10px;
}

/* --------------------------------------------------------------- now card */
.nowcard{
  background:var(--accent);color:#fff;border-radius:24px;padding:22px 24px;margin-bottom:20px;
  box-shadow:0 10px 26px -14px var(--accent);
}
.nowcard.urgent{background:var(--alert);box-shadow:0 10px 26px -14px var(--alert)}
@media (prefers-color-scheme:dark){.nowcard,.nowcard.urgent{color:#0C1618}}
.nowcard .label{font-size:11px;font-weight:800;letter-spacing:.13em;text-transform:uppercase;
  margin:0 0 7px;opacity:.85}
.nowcard .headline{font-size:28px;font-weight:800;line-height:1.15;margin:0;letter-spacing:-.02em}
.nowcard .big{font-family:var(--mono);font-size:42px;font-weight:500;
  font-variant-numeric:tabular-nums;line-height:1.05;margin:4px 0 0}
.nowcard .sub{margin:9px 0 0;font-size:14.5px;opacity:.9}

.hero{background:var(--accent-soft);border:2px solid var(--accent);border-radius:20px;padding:18px 20px}
.hero h4{font-size:12px;font-weight:800;letter-spacing:.11em;text-transform:uppercase;
  color:var(--accent);margin:0 0 9px}
.hero ul{margin:0;padding-left:20px;font-size:16.5px}
.hero li{margin-bottom:7px}
.hero li::marker{color:var(--accent)}

/* ------------------------------------------------------- big section cards */
.cardgrid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.bigcard{
  display:flex;flex-direction:column;align-items:flex-start;gap:6px;
  background:var(--tint);border:none;border-radius:22px;padding:20px 18px 18px;
  color:#fff;text-align:left;cursor:pointer;min-height:132px;
  box-shadow:0 8px 20px -12px var(--tint);
  -webkit-tap-highlight-color:transparent;transition:transform .12s;
}
.bigcard:active{transform:scale(.97)}
.bigcard:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
.bigcard svg{width:32px;height:32px;fill:none;stroke:#fff;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round;margin-bottom:auto}
.bigtitle{font-size:18px;font-weight:800;line-height:1.2;letter-spacing:-.01em}
.bighint{font-size:12.5px;font-weight:600;opacity:.88;line-height:1.3}

.tint-1{--tint:var(--tint-1)} .tint-2{--tint:var(--tint-2)}
.tint-3{--tint:var(--tint-3)} .tint-4{--tint:var(--tint-4)}
.tint-5{--tint:var(--tint-5)} .tint-6{--tint:var(--tint-6)}
.tint-7{--tint:var(--tint-7)} .tint-8{--tint:var(--tint-8)}

/* An opened section is topped with its own colour so it feels like the card
   you tapped opened up. */
section.opened{border-top:5px solid var(--tint);border-radius:3px;padding-top:18px}

/* ------------------------------------------------------------ checklists */
.checks{display:grid;gap:8px}
.check{
  display:flex;gap:13px;align-items:flex-start;width:100%;text-align:left;
  background:var(--surface);border:2px solid var(--line);border-radius:16px;
  padding:14px 16px;cursor:pointer;font-size:16px;
  -webkit-tap-highlight-color:transparent;transition:transform .1s,border-color .12s;
}
.check:active{transform:scale(.99)}
.check:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.check .box{
  width:24px;height:24px;border:2.5px solid var(--muted);border-radius:8px;flex:none;
  margin-top:1px;display:grid;place-items:center;transition:background .12s,border-color .12s;
}
.check .box svg{width:15px;height:15px;stroke:#fff;stroke-width:3.4;fill:none;
  stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity .12s}
.check[aria-checked="true"]{border-color:var(--accent)}
.check[aria-checked="true"] .box{background:var(--accent);border-color:var(--accent)}
.check[aria-checked="true"] .box svg{opacity:1}
/* Only the label is struck through — the note and who-ticked-it stay readable. */
.check[aria-checked="true"] .ctext{color:var(--muted)}
.check[aria-checked="true"] .lbl{text-decoration:line-through}
.check .ctext{flex:1;font-weight:600}
.check small{display:block;color:var(--muted);font-size:13px;font-weight:500;margin-top:3px}
.check .by{display:block;color:var(--muted);font-size:11.5px;font-weight:600;margin-top:5px}
.check.ask{border-color:var(--accent);background:var(--accent-soft)}
.check.critical{border-color:var(--alert);background:var(--alert-soft)}
.check.critical .box{border-color:var(--alert)}
.check.flag{border-color:var(--alert)}

/* ------------------------------------------------------- nested checklist */
.group{background:var(--surface);border:2px solid var(--line);border-radius:16px;overflow:hidden}
.group.done{border-color:var(--accent)}
.grouphead{
  display:flex;gap:13px;align-items:flex-start;width:100%;text-align:left;
  background:none;border:none;padding:14px 16px;cursor:pointer;font-size:16px;
  -webkit-tap-highlight-color:transparent;
}
.grouphead:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
.grouphead .box{
  width:24px;height:24px;border:2.5px solid var(--muted);border-radius:8px;flex:none;
  margin-top:1px;display:grid;place-items:center;
}
.group.done .grouphead .box{background:var(--accent);border-color:var(--accent)}
.grouphead .box svg{width:15px;height:15px;stroke:#fff;stroke-width:3.4;fill:none;
  stroke-linecap:round;stroke-linejoin:round}
.grouphead .ctext{flex:1;font-weight:600}
.grouphead .lbl{display:block}
.group.done .grouphead .lbl{text-decoration:line-through;color:var(--muted)}
.grouphead small{display:block;color:var(--muted);font-size:13px;font-weight:500;margin-top:3px}
.grouphead .chev{width:20px;height:20px;flex:none;margin-top:3px;fill:none;stroke:var(--muted);
  stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}
.group.open .grouphead .chev{transform:rotate(180deg)}
.children{display:grid;gap:7px;padding:0 12px 12px 12px}
.children .check{border-width:1.5px;border-radius:13px;padding:11px 13px;font-size:15px}
.children .check .box{width:21px;height:21px;border-radius:7px}

/* --------------------------------------------------------- written answers */
.ask{background:var(--surface);border:2px solid var(--accent);border-radius:18px;
  padding:16px 18px;margin-bottom:9px}
.asklabel{margin:0 0 10px;font-size:14.5px;font-weight:700;color:var(--ink-2)}
.askrow{display:flex;gap:8px}
.askinput{
  flex:1;min-width:0;padding:13px 14px;border-radius:13px;border:2px solid var(--line);
  background:var(--paper);color:var(--ink);font-size:16px;font-family:var(--round);
}
.askinput:focus-visible{outline:none;border-color:var(--accent)}
.asksave,.askedit{
  border:none;border-radius:13px;background:var(--accent);color:#fff;
  font-size:15px;font-weight:800;padding:0 18px;cursor:pointer;
}
@media (prefers-color-scheme:dark){.asksave,.askedit{color:#0C1618}}
.askvalue{margin:0;font-size:22px;font-weight:800;line-height:1.25;letter-spacing:-.01em;
  overflow-wrap:anywhere}
.ask .by{display:block;color:var(--muted);font-size:11.5px;font-weight:600;margin-top:6px}
.askedit{background:none;color:var(--accent);padding:0;margin-top:10px;font-size:14px;
  text-decoration:underline;text-underline-offset:3px}
.ask.answered{background:var(--accent-soft)}

.progress{display:flex;align-items:center;gap:10px;margin:0 0 12px;
  font-size:12.5px;font-weight:700;color:var(--muted)}
.progress .count{font-variant-numeric:tabular-nums}
.bar{flex:1;height:8px;border-radius:99px;background:var(--surface-2);overflow:hidden}
.bar span{display:block;height:100%;background:var(--accent);border-radius:99px;transition:width .25s}
.progress.complete{color:var(--accent)}
.progress .tick{text-transform:uppercase;letter-spacing:.08em;font-size:11px}

/* ---------------------------------------------------------------- tables */
.tablewrap{overflow-x:auto;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
table{border-collapse:collapse;width:100%;font-size:14.5px}
th{text-align:left;font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);
  font-weight:800;padding:12px 15px;border-bottom:1px solid var(--line)}
td{padding:11px 15px;border-bottom:1px solid var(--line-soft);color:var(--ink-2);vertical-align:top}
tr:last-child td{border-bottom:none}
td.t{font-family:var(--mono);font-variant-numeric:tabular-nums;color:var(--ink);
  white-space:nowrap;font-size:13px}
tr.hl td,tr.hl td.t{background:var(--accent-soft);color:var(--ink);font-weight:700}
tr.alert td,tr.alert td.t{background:var(--alert-soft);color:var(--ink);font-weight:700}
tr.live td,tr.live td.t{background:var(--accent);color:#fff;font-weight:700}
@media (prefers-color-scheme:dark){tr.live td,tr.live td.t{color:#0C1618}}
tr ol{margin:6px 0 0;padding-left:19px}
tr li{margin-bottom:4px}
tr li::marker{color:var(--accent);font-weight:700}

/* ------------------------------------------------------------------ misc */
.qa{background:var(--surface);border:1px solid var(--line);border-radius:18px;
  padding:18px 20px;margin-bottom:10px;box-shadow:var(--shadow)}
.qa.flag{border-color:var(--alert);border-width:2px}
.qa .q{font-size:19px;font-weight:800;margin:0 0 9px;line-height:1.25;letter-spacing:-.01em}
.qa .a{margin:0;color:var(--ink-2);font-size:15.5px}
.qa .a+.a{margin-top:9px}
.qa .a b{color:var(--ink)}
.qa ul,.qa ol{margin:9px 0 0;padding-left:20px;color:var(--ink-2);font-size:15.5px}
.qa li{margin-bottom:6px}
.qa li::marker{color:var(--accent);font-weight:700}

.rules{display:grid;gap:9px;grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}
.rule{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:14px 17px}
.rule.flag{border-color:var(--alert);border-width:2px}
.rule b{display:block;font-size:15px;font-weight:800;margin-bottom:3px}
.rule span{color:var(--ink-2);font-size:14px}

.steps{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.steps li{background:var(--surface);border:2px solid var(--line);border-radius:16px;
  padding:14px 18px;font-size:17px;font-weight:700;display:flex;gap:14px;align-items:center}
.steps .letter{
  width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:11px;
  background:var(--accent-soft);color:var(--accent);font-size:19px;font-weight:800;
}

.callout{background:var(--surface);border:1px solid var(--line);border-radius:18px;
  padding:17px 20px;margin:14px 0}
.callout h4{margin:0 0 7px;font-size:15px;font-weight:800}
.callout p{margin:0;color:var(--ink-2);font-size:15px}

.kit{display:grid;gap:8px;grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
.kit div{background:var(--surface);border:2px solid var(--line);border-radius:14px;
  padding:12px 14px;font-size:15px;font-weight:700}
.kit div.req{border-color:var(--accent)}
.kit em{color:var(--muted);font-style:normal;font-size:12.5px;font-weight:600;display:block}

footer{margin-top:32px;padding-top:16px;border-top:1px solid var(--line);
  color:var(--muted);font-size:12.5px}

/* ------------------------------------------------------------------ tabs */
.tabs{
  position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;
  background:color-mix(in srgb,var(--paper) 88%,transparent);
  backdrop-filter:saturate(180%) blur(14px);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  border-top:1px solid var(--line);
  padding:9px 8px calc(env(safe-area-inset-bottom) + 9px);
}
.tabs button{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;
  background:none;border:none;padding:6px 4px;border-radius:14px;cursor:pointer;
  font-size:11.5px;font-weight:800;color:var(--muted);
  -webkit-tap-highlight-color:transparent;
}
.tabs svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
.tabs button[aria-selected="true"]{color:var(--accent)}
.tabs button:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}

/* Thomas's side: a bit bigger, a bit friendlier. */
body.kid main{font-size:17px}
body.kid .check{font-size:17px;padding:16px 17px}
body.kid section>h2{font-size:25px}

@media (min-width:720px){
  .tabs{max-width:720px;margin:0 auto;border-radius:20px 20px 0 0;
    border:1px solid var(--line);border-bottom:none}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
