:root {
  --blue: #0a2d6e;
  --blue-2: #1446a0;
  --gold: #f5b800;
  --gold-soft: #fff6d6;
  --bg: #f4f6fb;
  --ink: #0e1b33;
  --ink-2: #33405c;
  --muted: #4a5878;
  --line: #d5ddee;
  --line-2: #e8edf7;
  --head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: Inter, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-family: var(--body); color: var(--ink); -webkit-text-size-adjust: 100%; }
a { color: var(--blue); }
a:hover { color: var(--blue-2); }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.app { max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; background: var(--bg); }
@media (min-width: 481px) { .app { box-shadow: 0 0 0 1px var(--line); } }

/* ---------- headers ---------- */
.hero { background: var(--blue); border-bottom: 6px solid var(--gold); padding: calc(40px + env(safe-area-inset-top)) 24px 32px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.hero h1 { margin: 0; font-family: var(--head); font-weight: 800; font-size: 46px; line-height: .95; letter-spacing: .5px; text-transform: uppercase; color: #fff; }
.hero h1 span { color: var(--gold); }
.hero p { margin: 0; font-size: 15px; color: #d6e0f5; }

.bar { background: var(--blue); border-bottom: 4px solid var(--gold); padding: calc(12px + env(safe-area-inset-top)) 12px 12px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 2; }
.bar .back { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.bar .back:hover { background: rgba(255,255,255,.1); color: #fff; }
.bar .titles { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.bar .t1 { font-family: var(--head); font-weight: 800; font-size: 22px; text-transform: uppercase; color: #fff; line-height: 1; }
.bar .t2 { font-size: 12px; color: #d6e0f5; }

main { flex: 1; padding: 18px 16px 0; display: flex; flex-direction: column; gap: 14px; }

h2.section { margin: 6px 0 0; font-family: var(--head); font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: .6px; color: var(--blue); }

/* ---------- school picker ---------- */
.pick { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 16px; background: #fff; border: 2px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); }
.pick:hover { border-color: var(--blue); color: var(--ink); }
.badge { width: 48px; height: 48px; border-radius: 12px; background: var(--blue); color: var(--gold); display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 800; font-size: 20px; flex-shrink: 0; }
.pick .txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pick .n { font-weight: 700; font-size: 17px; }
.pick .s { font-size: 13px; color: var(--muted); }
.hint { margin: 0 2px; font-size: 13px; color: var(--muted); }

/* ---------- school home ---------- */
.next { background: var(--gold); color: var(--blue); border-radius: 20px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.next .k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.next .big { font-family: var(--head); font-weight: 800; font-size: 44px; line-height: 1; text-transform: uppercase; }
.next .what { font-size: 16px; font-weight: 600; }
.next .back-on { font-size: 14px; }

.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.action { min-height: 96px; padding: 14px; border-radius: 16px; text-decoration: none; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 15px; line-height: 1.2; }
.action.primary { background: var(--blue); color: #fff; }
.action.primary:hover { background: var(--blue-2); color: #fff; }
.action.secondary { background: #fff; border: 2px solid var(--blue); color: var(--blue); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.list { padding: 6px 16px; gap: 0; }
.list h2 { margin: 10px 0 4px; font-family: var(--head); font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: .6px; color: var(--blue); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.row .date { width: 46px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.row .mon { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.row .day { font-family: var(--head); font-weight: 800; font-size: 24px; color: var(--blue); }
.row .info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.row .nm { font-weight: 600; font-size: 15px; }
.row .when { font-size: 12px; color: var(--muted); }
.row.early .day { color: var(--muted); }
.toggle-all { margin: 6px 0 10px; background: none; border: none; color: var(--blue); font-weight: 600; font-size: 14px; padding: 10px 0; cursor: pointer; text-align: left; }

/* ---------- alerts ---------- */
.example { display: flex; gap: 12px; align-items: flex-start; background: var(--bg); border-radius: 14px; padding: 12px; }
.example .ic { width: 36px; height: 36px; border-radius: 9px; background: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.example b { display: block; font-size: 14px; }
.example span { font-size: 13px; color: var(--ink-2); }
.k-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }

.opt { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.opt .txt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.opt .t { font-weight: 700; font-size: 15px; }
.opt .d { font-size: 13px; color: var(--muted); line-height: 1.35; }
.switch { width: 52px; height: 32px; flex-shrink: 0; border-radius: 999px; border: none; padding: 3px; cursor: pointer; display: flex; justify-content: flex-start; background: #b7c1d6; transition: background .15s; }
.switch::after { content: ''; width: 26px; height: 26px; border-radius: 999px; background: #fff; }
.switch[aria-checked="true"] { justify-content: flex-end; background: var(--blue); }
.switch[aria-checked="true"]::after { background: var(--gold); }
.small { margin: 0; padding: 12px 0 2px; font-size: 12px; color: var(--muted); }

.note { background: var(--gold-soft); border: 1px solid #ebcb63; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.note b { font-size: 14px; color: var(--blue); }
.note ol, .note p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.note ol { padding-left: 20px; }
.share-ic { display: inline-block; vertical-align: -3px; }

.status { margin: 0; font-size: 14px; font-weight: 600; color: var(--blue); }
.status.err { color: #a12a1c; }

.btn { width: 100%; min-height: 54px; border: none; border-radius: 16px; font-weight: 700; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.btn.gold { background: var(--gold); color: var(--blue); }
.btn.gold:hover { background: #ffc72c; color: var(--blue); }
.btn.blue { background: var(--blue); color: #fff; }
.btn.blue:hover { background: var(--blue-2); color: #fff; }
.btn.ghost { background: #fff; border: 2px solid var(--blue); color: var(--blue); min-height: 50px; font-size: 15px; }
.btn.quiet { background: none; color: var(--muted); min-height: 44px; font-size: 14px; font-weight: 600; text-decoration: underline; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btns { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 8px; }

/* ---------- calendar ---------- */
.sub-head { display: flex; align-items: center; gap: 8px; }
.sub-head h2 { margin: 0; font-family: var(--head); font-weight: 800; font-size: 20px; text-transform: uppercase; color: var(--blue); }
.pill { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; background: var(--gold); color: var(--blue); padding: 3px 8px; border-radius: 999px; }
.card p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.cal-link { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: 12px; background: var(--blue); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; }
.cal-link:hover { background: var(--blue-2); color: #fff; }
.cal-link span { flex: 1; }
.card .fine { font-size: 12px; color: var(--muted); }

/* ---------- footer ---------- */
footer { padding: 22px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.kofi { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--gold); color: var(--blue); font-weight: 700; font-size: 14px; text-decoration: none; }
.kofi:hover { background: #ffc72c; color: var(--blue); }
footer p { margin: 0; font-size: 11px; line-height: 1.5; color: var(--muted); max-width: 340px; }
