/* Obelisk styles. Sacred Promise Institute colors: Deep Navy #1B2A4A, Warm Gold #C4973B, White, Light Warm Gray #F5F5F0. */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/montserrat-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/montserrat-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/montserrat-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/montserrat-latin-700-normal.woff2) format('woff2'); }

:root {
  --navy: #1B2A4A;
  --navy-2: #243659;
  --gold: #C4973B;
  --gold-ink: #87661F;
  --gold-soft: #F5ECD9;
  --bg: #F5F5F0;
  --surface: #FFFFFF;
  --surface-2: #FAFAF7;
  --ink: #1B2A4A;
  --ink-2: #3E4A63;
  --muted: #69707F;
  --line: #E4E1D8;
  --line-2: #D6D2C6;
  --primary: #1B2A4A;
  --primary-ink: #FFFFFF;
  --tint: #E9ECF3;
  --ok: #2E6B4E;
  --ok-soft: #E2EFE8;
  --warn: #87661F;
  --warn-soft: #F7EDD6;
  --bad: #A2372F;
  --bad-soft: #F8E2DF;
  --focus: #C4973B;
  --on-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(27, 42, 74, .05), 0 6px 18px rgba(27, 42, 74, .06);
  --radius: 16px;
  --font: 'Montserrat', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0E1626;
  --surface: #16223A;
  --surface-2: #1A2843;
  --ink: #EEF1F6;
  --ink-2: #C9D0DC;
  --muted: #98A2B3;
  --line: #26365A;
  --line-2: #33456B;
  --primary: #C4973B;
  --primary-ink: #13203A;
  --tint: #22314F;
  --gold-ink: #E2BF74;
  --gold-soft: #3A3120;
  --ok: #86CFA8;
  --ok-soft: #173427;
  --warn: #E6C27A;
  --warn-soft: #3A2F17;
  --bad: #F2A097;
  --bad-soft: #42201D;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25);
  --on-ink: #0E1626;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1626;
    --surface: #16223A;
    --surface-2: #1A2843;
    --ink: #EEF1F6;
    --ink-2: #C9D0DC;
    --muted: #98A2B3;
    --line: #26365A;
    --line-2: #33456B;
    --primary: #C4973B;
    --primary-ink: #13203A;
    --tint: #22314F;
    --gold-ink: #E2BF74;
    --gold-soft: #3A3120;
    --ok: #86CFA8;
    --ok-soft: #173427;
    --warn: #E6C27A;
    --warn-soft: #3A2F17;
    --bad: #F2A097;
    --bad-soft: #42201D;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25);
    --on-ink: #0E1626;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.45; font-weight: 400;
  -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.noscroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: #1B2A4A; color: #FFFFFF;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 1px 0 rgba(196, 151, 59, .55);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; background: none; border: 0; padding: 0; color: inherit; text-align: left; }
.brand-tile { width: 34px; height: 34px; border-radius: 9px; background: #FFFFFF; display: grid; place-items: center; flex: none; }
.brand-tile img { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.brand-sub { font-size: 8.5px; font-weight: 600; letter-spacing: .1em; color: #C4973B; text-transform: uppercase; white-space: nowrap; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 4px; min-width: 0; }
.cohort-pill {
  display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 46vw; flex: 0 1 auto;
  background: rgba(255, 255, 255, .09); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px; padding: 6px 8px 6px 11px; font-weight: 600; font-size: 13px;
}
.cohort-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cohort-pill svg { width: 14px; height: 14px; flex: none; opacity: .8; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: inherit;
  display: grid; place-items: center; flex: none;
}
.icon-btn svg { width: 22px; height: 22px; }
.topbar .icon-btn:active { background: rgba(255, 255, 255, .12); }
.offline-dot { width: 8px; height: 8px; border-radius: 50%; background: #E6C27A; display: inline-block; }

/* ---------- layout ---------- */
main { max-width: 760px; margin: 0 auto; padding: 14px 16px calc(104px + env(safe-area-inset-bottom, 0px)); }
main.no-tabs { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); margin: 0 0 12px;
}
.card.flush { padding: 0; overflow: hidden; }
.card.tight { padding: 12px; }
.section-h {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 20px 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink);
}
.section-h:first-child { margin-top: 4px; }
.section-h .count { color: var(--muted); letter-spacing: .04em; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 4px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.hr { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; text-align: center;
  transition: transform .06s ease, background-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.gold { background: #C4973B; border-color: #C4973B; color: #1B2A4A; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink); }
.btn.quiet { background: var(--tint); border-color: transparent; }
.btn.danger { color: var(--bad); border-color: var(--bad-soft); background: var(--surface); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #FFFFFF; }
.btn.block { width: 100%; }
.btn.big { min-height: 54px; font-size: 16px; border-radius: 14px; }
.btn.small { min-height: 38px; padding: 7px 12px; font-size: 13.5px; border-radius: 10px; }
.btn.small svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn { text-wrap: balance; }   /* when a long label has to take two lines, split it evenly instead of leaving one word alone */
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 0; min-width: 0; }
.btn-row > .btn.fit { flex: 0 0 auto; }
.btn-col { display: flex; flex-direction: column; gap: 8px; }
.link { background: none; border: 0; padding: 0; color: var(--gold-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- chips and badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  background: var(--tint); color: var(--ink-2); font-size: 12px; font-weight: 600; line-height: 1.35; white-space: nowrap;
}
.chip svg { width: 13px; height: 13px; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.gold { background: var(--gold-soft); color: var(--gold-ink); }
.chip.navy { background: #1B2A4A; color: #FFFFFF; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips > .chip { max-width: 100%; white-space: normal; }   /* a label longer than its row wraps inside itself instead of sticking out */
button.chip { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); padding: 6px 11px; font-size: 12.5px; min-height: 32px; cursor: pointer; }
button.chip:active { background: var(--tint); }
.kind-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.kind-badge.theory { background: var(--tint); color: var(--ink); }
.kind-badge.clinical { background: var(--gold-soft); color: var(--gold-ink); }
.kind-badge.makeup { background: var(--warn-soft); color: var(--warn); }

/* ---------- avatars ---------- */
.av {
  width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  background: var(--tint); color: var(--ink); font-weight: 700; font-size: 14px; letter-spacing: .02em;
  border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line);
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.lg { width: 84px; height: 84px; font-size: 26px; }
.av.sm { width: 32px; height: 32px; font-size: 12px; }
.av.on-ok { box-shadow: 0 0 0 2px var(--ok); }
.av.on-bad { box-shadow: 0 0 0 2px var(--bad); }
.av.on-warn { box-shadow: 0 0 0 2px var(--gold); }

/* ---------- module picture ---------- */
.micon {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold-ink);
}
.micon svg { width: 20px; height: 20px; }
.micon.sm { width: 28px; height: 28px; border-radius: 8px; }
.micon.sm svg { width: 17px; height: 17px; }

/* ---------- forms ---------- */
.field { display: block; margin: 0 0 12px; }
.field > span, .label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 500;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.4; }
.field textarea.short { min-height: 0; field-sizing: content; }
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
.field .hint, .hint { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.two > .field { margin-bottom: 12px; }
select.input, .field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; padding: 6px 0; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: #1B2A4A; flex: none; }

/* segmented control */
.seg { display: flex; background: var(--tint); border-radius: 12px; padding: 3px; gap: 3px; margin: 0 0 12px; }
.seg button {
  flex: 1 1 0; min-width: 0; min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2);
  font-weight: 600; font-size: 14px; padding: 6px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg.choice button.on.ok { background: var(--ok); color: var(--on-ink); }
.seg.choice button.on.bad { background: var(--bad); color: var(--on-ink); }
.seg.choice button.on.warn { background: var(--gold); color: #1B2A4A; }
.seg.wrap4 { flex-wrap: wrap; }
.seg.wrap4 button { flex: 1 1 calc(50% - 3px); }

/* stepper */
.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--surface); width: max-content; }
.stepper button { width: 52px; height: 48px; border: 0; background: var(--tint); color: var(--ink); display: grid; place-items: center; }
.stepper button svg { width: 18px; height: 18px; }
.stepper output { min-width: 86px; text-align: center; font-weight: 700; font-size: 18px; }
/* Side by side with another field, the stepper fills its own column and never spills into the next one. */
.two .stepper { width: 100%; }
.two .stepper button { flex: none; width: 44px; }
.two .stepper output { flex: 1 1 0; min-width: 0; font-size: 17px; white-space: nowrap; }

/* progress */
.bar { height: 8px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: #1B2A4A; }
:root[data-theme="dark"] .bar > span { background: #C4973B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bar > span { background: #C4973B; } }
.bar.ok > span { background: var(--ok); }
.bar.warn > span { background: var(--gold); }
.bar.bad > span { background: var(--bad); }

/* callouts */
.callout { display: flex; gap: 10px; padding: 12px; border-radius: 12px; background: var(--tint); color: var(--ink-2); font-size: 13.5px; margin: 0 0 12px; }
.callout svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.callout.ok { background: var(--ok-soft); color: var(--ok); }
.callout.warn { background: var(--warn-soft); color: var(--warn); }
.callout.bad { background: var(--bad-soft); color: var(--bad); }
.callout b { color: inherit; }
.callout p { margin: 0; }
.callout p + p { margin-top: 6px; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--surface); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 0 max(4px, env(safe-area-inset-left, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-right, 0px));
}
.tab {
  position: relative; min-height: 58px; border: 0; background: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 7px 2px 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .01em;
}
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--ink); }
.tab.on::before { content: ''; position: absolute; top: 0; left: 26%; right: 26%; height: 3px; border-radius: 0 0 4px 4px; background: #C4973B; }
.tab .tab-dot { position: absolute; top: 8px; left: calc(50% + 9px); width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 2px solid var(--surface); }

/* ---------- day strip ---------- */
.strip-wrap { margin: 0 -16px 12px; }
.strip { display: flex; gap: 14px; overflow-x: auto; padding: 2px 16px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip-week { display: flex; flex-direction: column; gap: 6px; flex: none; }
.strip-week-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-left: 2px; }
.strip-days { display: flex; gap: 6px; }
.dchip {
  scroll-snap-align: center; flex: none; width: 50px; min-height: 58px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 2px; position: relative;
}
.dchip b { font-size: 16px; font-weight: 700; line-height: 1.1; }
.dchip small { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.dchip.clinical { background: var(--surface-2); }
.dchip.makeup { border-style: dashed; }
.dchip.makeup b { font-size: 13px; }
.dchip.done { background: var(--ok-soft); border-color: transparent; }
.dchip.done small { color: var(--ok); }
.dchip.today { border-color: #C4973B; border-width: 2px; }
.dchip.sel { background: #1B2A4A; border-color: #1B2A4A; color: #FFFFFF; }
.dchip.sel small { color: #E2BF74; }
:root[data-theme="dark"] .dchip.sel, :root[data-theme="dark"] .mchip.sel { background: #C4973B; border-color: #C4973B; color: #13203A; }
:root[data-theme="dark"] .dchip.sel small, :root[data-theme="dark"] .mchip.sel small { color: #13203A; }
:root[data-theme="dark"] .mchip.sel .micon { background: rgba(19, 32, 58, .14); color: #13203A; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dchip.sel, :root:not([data-theme="light"]) .mchip.sel { background: #C4973B; border-color: #C4973B; color: #13203A; }
  :root:not([data-theme="light"]) .dchip.sel small, :root:not([data-theme="light"]) .mchip.sel small { color: #13203A; }
  :root:not([data-theme="light"]) .mchip.sel .micon { background: rgba(19, 32, 58, .14); color: #13203A; }
}
.dchip .dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }
.dchip.sel .dot { box-shadow: 0 0 0 2px #1B2A4A; }
.dchip.add { border-style: dashed; color: var(--muted); }
.dchip.add svg { width: 18px; height: 18px; }

/* ---------- day card ---------- */
.day-card { position: relative; overflow: hidden; }
.day-card::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: #1B2A4A; }
.day-card.clinical::after { background: #C4973B; }
.day-card.makeup::after { background: repeating-linear-gradient(180deg, #C4973B 0 14px, #E9D3A3 14px 20px); }
.day-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.day-meta span { display: inline-flex; align-items: center; gap: 6px; }
.day-meta svg { width: 16px; height: 16px; color: var(--gold-ink); }
details.lesson { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
details.lesson > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-weight: 700; font-size: 14px; min-height: 36px;
}
details.lesson > summary::-webkit-details-marker { display: none; }
details.lesson > summary > svg { width: 18px; height: 18px; transition: transform .2s ease; color: var(--muted); margin-left: auto; flex: none; }
details.lesson > summary { flex-wrap: wrap; justify-content: flex-start; }
.sum-icons { display: flex; gap: 6px; }
.sum-text { margin-left: 4px; white-space: nowrap; }
details.lesson[open] > summary > svg { transform: rotate(180deg); }
.mods { list-style: none; margin: 8px 0 0; padding: 0; }
.mods li { display: flex; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--line); }
.mods li:first-child { border-top: 0; }
.mods .m-name { font-weight: 700; font-size: 14px; }
.mods .m-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.mods .m-hrs { margin-left: auto; font-weight: 700; font-size: 13px; white-space: nowrap; color: var(--ink-2); padding-left: 6px; }
.lab-box { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.lab-box b { display: block; color: var(--ink); margin-bottom: 3px; font-size: 13px; }

/* ---------- attendance ---------- */
.att-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; margin: 4px 2px 10px; }
.att-tools .btn { margin-left: auto; }
.att-count { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.att-list { display: flex; flex-direction: column; gap: 8px; }
.att-row {
  display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 8px 8px 8px 10px; box-shadow: var(--shadow);
}
.att-row.st-P { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.att-row.st-A { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.att-row.st-L, .att-row.st-E { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.att-name { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; background: none; border: 0; padding: 2px 0; text-align: left; color: inherit; }
.att-name .nm { min-width: 0; display: flex; flex-direction: column; }
.att-name .nm b { font-size: 15px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.att-name .nm small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.att-name .nm small.warn { color: var(--warn); }
.att-name .nm small.bad { color: var(--bad); }
.att-name .nm small.ok { color: var(--ok); }
.att-btns { display: flex; gap: 6px; flex: none; }
.pill {
  min-width: 64px; min-height: 42px; padding: 6px 10px; border-radius: 11px; border: 1.5px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); font-weight: 700; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.pill svg { width: 16px; height: 16px; }
.pill.here.on { background: var(--ok); border-color: var(--ok); color: var(--on-ink); }
.pill.here.on.partial { background: #C4973B; border-color: #C4973B; color: #1B2A4A; }
.pill.absent.on { background: var(--bad); border-color: var(--bad); color: var(--on-ink); }
:root[data-theme="dark"] .pill.here.on, :root[data-theme="dark"] .pill.absent.on { color: #0E1626; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.here.on, :root:not([data-theme="light"]) .pill.absent.on { color: #0E1626; } }
.pill[disabled] { opacity: .55; }
.att-row.locked .pill:not(.on) { visibility: hidden; }

.finish-bar {
  position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom, 0px)); z-index: 25;
  padding: 10px 16px; background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.finish-bar .inner { max-width: 728px; margin: 0 auto; }
.finish-bar .btn { width: 100%; box-shadow: 0 8px 20px rgba(27, 42, 74, .18); }
.finish-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 600; }
.spacer-finish { height: 84px; }

.done-card { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.done-head { display: flex; align-items: center; gap: 10px; }
.done-head .seal { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); flex: none; }
.done-head .seal svg { width: 22px; height: 22px; }
.send-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-top: 10px; font-weight: 500; }
.send-line svg { width: 17px; height: 17px; flex: none; }
.send-line.ok { color: var(--ok); }
.send-line.warn { color: var(--warn); }
.send-line.bad { color: var(--bad); }

.summary-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.summary-nums div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; text-align: center; }
.summary-nums b { display: block; font-size: 20px; font-weight: 700; }
.summary-nums span { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow);
}
.item .grow b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .grow small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.item .chev { width: 18px; height: 18px; color: var(--muted); flex: none; }
.item .chips { margin-top: 7px; }
.item.muted-item { opacity: .7; }
.stu-item { align-items: flex-start; }
.stu-item .av { margin-top: 1px; }
.stu-item .chev { align-self: center; }
.stu-item .grow small.sum { margin-top: 3px; color: var(--ink-2); font-weight: 600; }
.stu-item .chips { margin-top: 8px; }

/* rows inside cards */
.rows > .r { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.rows > .r:first-child { border-top: 0; padding-top: 2px; }
.rows > .r:last-child { padding-bottom: 2px; }
.r .lbl { flex: 1 1 auto; min-width: 0; }
.r > .btn { flex: none; white-space: nowrap; }   /* the words beside it wrap, the button keeps its label on one line */
.r .lbl b { display: block; font-weight: 600; font-size: 14.5px; }
.r .lbl small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.r .val { font-weight: 700; white-space: nowrap; font-size: 14px; }
.r svg.ic { width: 20px; height: 20px; flex: none; }
.r svg.ic.ok { color: var(--ok); }
.r svg.ic.bad { color: var(--bad); }
.r svg.ic.warn { color: var(--gold); }
.r svg.ic.muted { color: var(--muted); width: 17px; height: 17px; }
.rows > .r.tap { cursor: pointer; }
.rows > .r.tap:active { background: var(--tint); }

/* ---------- skills ---------- */
.picker { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.picker select { flex: 1 1 auto; min-width: 0; }
.sk-mod-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.sk-mod-head h3 { font-size: 14.5px; }
.sk-mod-head small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.sk-mod-head .count { margin-left: auto; font-weight: 700; font-size: 13px; white-space: nowrap; }
/* skills: one module per card, tap the circle to check a skill */
#stu-strip { position: sticky; top: var(--top-h, 60px); z-index: 20; background: var(--bg); padding-top: 10px; box-shadow: 0 1px 0 var(--line); }
main > .sr-only:first-child + #stu-strip { margin-top: -14px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sk-hint { display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.sk-hint svg { width: 18px; height: 18px; color: var(--ok); flex: none; }
.skm { padding: 0; overflow: hidden; }
.skm-head { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 12px 14px; background: none; border: 0; text-align: left; color: inherit; }
.skm-head .grow { min-width: 0; }
.skm-head .grow b { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; }
.skm-head .grow small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.gold-txt { color: var(--gold-ink); }
.bad-txt { color: var(--bad); }
.skm-count { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; flex: none; }
.skm-count.ok { color: var(--ok); }
.skm-count svg { width: 16px; height: 16px; }
.skm-chev { width: 20px; height: 20px; color: var(--muted); flex: none; transition: transform .2s ease; }
.skm.open .skm-chev { transform: rotate(180deg); }
.skm.open .skm-head { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.sk2 { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border: 0; border-top: 1px solid var(--line); background: var(--surface); color: inherit; text-align: left; }
.sk2:first-child { border-top: 0; }
.sk2:active { background: var(--tint); }
.sk2-l { flex: 1 1 auto; min-width: 0; font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.sk2-l small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.sk2.st-S .sk2-l small { color: var(--ok); }
.sk2.st-U .sk2-l small, .sk2.st-review .sk2-l small { color: var(--bad); }
.tick { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); }
.tick svg { width: 17px; height: 17px; }
.tick.small { width: 26px; height: 26px; }
.tick.small svg { width: 15px; height: 15px; }
.st-S .tick, .tick.st-S { background: var(--ok); border-color: var(--ok); color: var(--on-ink); }
.st-U .tick, .tick.st-U { border-color: var(--bad); color: var(--bad); }
.st-review .tick { background: var(--bad); border-color: var(--bad); color: var(--on-ink); }
.btn.ok-btn { background: var(--ok); border-color: var(--ok); color: var(--on-ink); }
.btn.bad-btn { background: var(--surface); border-color: var(--bad); color: var(--bad); }
details.sk-more { margin-top: 14px; }
details.sk-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; min-height: 40px; font-size: 13.5px; font-weight: 600; color: var(--gold-ink); text-decoration: underline; text-underline-offset: 3px; }
details.sk-more > summary::-webkit-details-marker { display: none; }
details.sk-more[open] > summary { margin-bottom: 8px; }
.attempts { list-style: none; padding: 0; margin: 0 0 12px; }
.attempts li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.attempts li:first-child { border-top: 0; }
.attempts li .grow small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- quizzes ---------- */
.mchips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 8px; margin: 0 -16px 10px; scrollbar-width: none; }
.mchips::-webkit-scrollbar { display: none; }
.mchip {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 14px; min-height: 48px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); text-align: left;
}
.mchip b { display: block; font-size: 13px; line-height: 1.15; }
.mchip small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.mchip.sel { background: #1B2A4A; border-color: #1B2A4A; color: #FFFFFF; }
.mchip.sel small { color: #E2BF74; }
.mchip.sel .micon { background: rgba(255, 255, 255, .12); color: #E2BF74; }
.mchip.complete:not(.sel) { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.qz-head { display: flex; justify-content: space-between; padding: 10px 14px 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.qz-head span:last-child { width: 80px; text-align: center; }
.qz-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.qz-head + .qz-row { border-top: 0; }
.qz-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.qz-who .nm { min-width: 0; display: flex; flex-direction: column; }
.qz-who b { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz-st { font-size: 12px; font-weight: 700; white-space: nowrap; }
.qz-st.ok { color: var(--ok); }
.qz-st.warn { color: var(--warn); }
.qz-st.bad { color: var(--bad); }
.qz-st.none { color: var(--muted); font-weight: 600; }
.qz-row input {
  width: 80px; min-height: 44px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-size: 17px; font-weight: 700; text-align: center; padding: 6px;
}
.qz-row input.pass { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.qz-row input.fail { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.qz-retests { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 14px; padding-left: 42px; }
.qz-in { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

/* ---------- clearances ---------- */
.cl-row { padding: 12px 14px; border-top: 1px solid var(--line); }
.cl-row:first-child { border-top: 0; }
.cl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cl-head b { font-weight: 600; font-size: 14.5px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cl-dates.one { grid-template-columns: 1fr; }
.cl-dates label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; min-width: 0; }
.cl-dates input { width: 100%; min-width: 0; min-height: 42px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 500; padding: 8px 10px; }

/* ---------- student detail ---------- */
.back-row { display: flex; align-items: center; gap: 6px; margin: -4px 0 10px; }
.back-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--ink-2); font-weight: 600; padding: 8px 6px 8px 0; min-height: 40px; }
.back-btn svg { width: 20px; height: 20px; }
.profile { display: flex; align-items: center; gap: 14px; }
.profile .who { min-width: 0; flex: 1 1 auto; }
.profile h1 { font-size: 21px; overflow-wrap: anywhere; }
.profile .who small { display: block; color: var(--muted); font-weight: 600; font-size: 13px; margin-top: 2px; }
.profile-actions { margin-top: 14px; max-width: 460px; }
.photo-btn { position: relative; border: 0; background: none; padding: 0; border-radius: 50%; flex: none; }
.photo-btn .cam { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: #C4973B; color: #1B2A4A; display: grid; place-items: center; border: 2px solid var(--surface); }
.photo-btn .cam svg { width: 15px; height: 15px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.stat b { display: block; font-size: 18px; font-weight: 700; line-height: 1.2; }
.stat span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat .bar { margin-top: 7px; }
.day-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 6px; }
.dbox { border-radius: 10px; border: 1px solid var(--line); padding: 6px 4px; text-align: center; background: var(--surface-2); min-width: 0; }
.dbox b { display: block; font-size: 12px; }
.dbox span { display: block; font-size: 11px; font-weight: 700; }
.dbox.P span { color: var(--ok); }
.dbox.A { background: var(--bad-soft); border-color: transparent; }
.dbox.A span { color: var(--bad); }
.dbox.L, .dbox.E { background: var(--warn-soft); border-color: transparent; }
.dbox.L span, .dbox.E span { color: var(--warn); }
.dbox.none span { color: var(--muted); }

.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.qtile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); min-width: 0; }
.qtile b { font-size: 12px; }
.qtile span:last-child { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.qtile.ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.qtile.ok span:last-child { color: var(--ok); }
.qtile.warn { background: var(--warn-soft); border-color: transparent; }
.qtile.warn span:last-child { color: var(--warn); }
.qtile.bad { background: var(--bad-soft); border-color: transparent; }
.qtile.bad span:last-child { color: var(--bad); }

/* ---------- reports ---------- */
.rep { display: block; padding: 14px; border-top: 1px solid var(--line); }
.rep-top { display: flex; gap: 12px; align-items: flex-start; }
.rep:first-child { border-top: 0; }
.rep .grow b { display: block; font-size: 15px; font-weight: 700; }
.rep .grow small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rep .btn-row { margin-top: 10px; }
.rep-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--tint); color: var(--ink); display: grid; place-items: center; flex: none; }
.rep-ico svg { width: 21px; height: 21px; }

/* ---------- welcome ---------- */
.hero {
  position: relative; border-radius: 20px; overflow: hidden; margin: 0 0 14px; min-height: 230px; color: #FFFFFF;
  background: #1B2A4A url(img/classroom.jpg) center / cover no-repeat; display: flex; align-items: flex-end;
}
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27, 42, 74, .25) 0%, rgba(27, 42, 74, .72) 52%, rgba(27, 42, 74, .97) 100%); }
.hero .in { position: relative; padding: 20px; width: 100%; }
.hero .tile { width: 52px; height: 52px; border-radius: 14px; background: #FFFFFF; display: grid; place-items: center; margin-bottom: 12px; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.hero .tile img { width: 36px; height: 36px; }
.hero h1 { font-size: 30px; letter-spacing: .01em; }
.hero p { margin: 6px 0 0; color: rgba(255, 255, 255, .88); font-weight: 500; }
.hero .spi { font-size: 11px; font-weight: 700; letter-spacing: .18em; color: #E2BF74; text-transform: uppercase; margin-bottom: 4px; }
.steps { display: flex; gap: 6px; margin: 0 0 12px; }
.steps span { flex: 1; height: 5px; border-radius: 99px; background: var(--line-2); }
.steps span.on { background: #C4973B; }
.roster-mini { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.roster-mini .r2 { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.roster-mini .r2 .grow { font-weight: 600; font-size: 14px; }
.roster-mini .r2 small { color: var(--muted); font-weight: 600; font-size: 12px; }

/* empty states */
.empty { text-align: center; padding: 28px 16px; }
.empty .art { width: 84px; height: 84px; margin: 0 auto 12px; border-radius: 24px; background: var(--gold-soft); color: var(--gold-ink); display: grid; place-items: center; }
.empty .art svg { width: 40px; height: 40px; }
.empty h2 { margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 14px; }

/* ---------- sheet ---------- */
#sheet-root { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
#sheet-root.open { pointer-events: auto; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 16, 30, .5); opacity: 0; transition: opacity .2s ease; }
#sheet-root.open .sheet-backdrop { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--ink); border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .2);
}
#sheet-root.open .sheet { transform: translateY(0); }
.sheet-grip { width: 42px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sheet-head .grow h2 { font-size: 19px; }
.sheet-head .grow p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.sheet-x { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--tint); color: var(--ink); display: grid; place-items: center; flex: none; }
.sheet-x svg { width: 18px; height: 18px; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
@media (min-width: 680px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 560px; max-height: 86vh; border-radius: 22px; transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .2s ease, opacity .2s ease; padding-bottom: 20px; }
  #sheet-root.open .sheet { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .sheet-grip { display: none; }
}

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); z-index: 80;
  background: #1B2A4A; color: #FFFFFF; border-radius: 14px; padding: 10px 10px 10px 16px; min-height: 48px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  display: flex; align-items: center; gap: 10px; max-width: min(92vw, 520px); width: max-content; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast.bad { background: #A2372F; }
#toast.above-finish { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
#toast button { background: rgba(255, 255, 255, .12); border: 0; color: #E2BF74; font-weight: 700; padding: 8px 12px; border-radius: 10px; min-height: 36px; white-space: nowrap; }
#toast span { min-width: 0; }

/* update banner */
.update-bar { display: flex; align-items: center; gap: 10px; background: var(--gold-soft); color: var(--gold-ink); border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); border-radius: 14px; padding: 10px 12px; margin: 0 0 12px; font-weight: 600; font-size: 14px; }
.update-bar .grow { min-width: 0; }
.update-bar > svg { width: 20px; height: 20px; flex: none; }
.update-bar.warn { background: var(--warn-soft); }
.alarm-bar { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; background: var(--bad-soft); color: var(--ink); border: 1.5px solid var(--bad); border-radius: 14px; padding: 12px; margin: 0 0 12px; font-size: 14px; line-height: 1.4; }
.alarm-bar > svg { width: 22px; height: 22px; color: var(--bad); flex: none; margin-top: 1px; }
.alarm-bar .grow { flex: 1 1 200px; }
.alarm-bar .btn-col { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.alarm-bar .btn-col .btn { flex: 1 1 auto; white-space: nowrap; }
.meter-row { margin-top: 10px; }
.meter-row .lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.meter-row .lbl b { font-size: 14px; }
.meter-row .lbl small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
main, .sheet { overflow-wrap: break-word; }

/* ---------- wide screens ---------- */
@media (min-width: 760px) {
  main { padding-top: 22px; }
  .tabbar { left: 50%; right: auto; transform: translateX(-50%); width: min(760px, 100%); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; }
  .finish-bar { bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 479px) {
  .brand-sub { display: none; }
  .cohort-pill { max-width: calc(100vw - 210px); }
}
@media (max-width: 360px) {
  body { font-size: 14.5px; }
  h1 { font-size: 19.5px; }
  .hide-sm { display: none; }
  .sum-text { order: 1; margin-left: 0; }
  details.lesson > summary > svg { order: 2; }
  .sum-icons { order: 3; flex-basis: 100%; margin-top: 4px; }
  main { padding-left: 12px; padding-right: 12px; }
  .strip-wrap, .mchips { margin-left: -12px; margin-right: -12px; }
  .strip, .mchips { padding-left: 12px; padding-right: 12px; }
  .pill { min-width: 56px; padding: 6px 8px; font-size: 13px; }
  .brand-sub { display: none; }
  .att-row .av { width: 36px; height: 36px; font-size: 13px; }
  .summary-nums b { font-size: 18px; }
  .summary-nums { gap: 6px; }
  .summary-nums div { padding: 8px 2px; }
  .summary-nums span { font-size: 10px; letter-spacing: .03em; }
  .two { grid-template-columns: 1fr; gap: 0; }
}
/* ---------- login ---------- */
.lock-card { max-width: 460px; margin-left: auto; margin-right: auto; }
.lock-card h2 { margin-bottom: 4px; }
.lock-card form { margin-top: 14px; }
#view[data-lock^="login"] .hero, #view[data-lock^="recover"] .hero { min-height: 0 !important; }   /* the screens she sees every day stay short, so the fields sit near the top */
#view[data-lock^="login"] .hero .tile, #view[data-lock^="recover"] .hero .tile { display: none; }
.pw { position: relative; display: block; }
.pw input { width: 100%; padding-right: 72px !important; }
.pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); min-height: 36px; min-width: 56px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.pw-eye:active { background: var(--tint); }
.lk-msg { display: none; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-size: 13.5px; font-weight: 600; }
.lk-msg.on { display: block; }
.lk-msg.warn { background: var(--warn-soft); color: var(--warn); }
.lk-msg.good { background: var(--ok-soft); color: var(--ok); }
.code-box { margin: 14px 0 12px; padding: 16px 10px; border-radius: 14px; border: 1.5px dashed var(--gold); background: var(--gold-soft); color: var(--gold-ink); text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 24px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; user-select: all; -webkit-user-select: all; }
.lock-card .check { margin: 4px 0 14px; font-weight: 600; }
.sheet .code-box { margin-top: 4px; }
@media (max-width: 360px) { .code-box { font-size: 20px; letter-spacing: .05em; } }
@media (max-width: 300px) { .code-box { font-size: 17px; letter-spacing: .02em; } }
/* Two buttons side by side keep their labels on one line on small phones. */
@media (max-width: 380px) { .btn-row > .btn { padding-left: 10px; padding-right: 10px; gap: 6px; } }
@media (max-width: 350px) { .btn-row > .btn { flex: 1 1 auto; } }
/* Very narrow screens, such as the outside screen of a folding phone. */
@media (max-width: 300px) {
  .tab { font-size: 10px; letter-spacing: 0; }
  .summary-nums { gap: 4px; }
  .summary-nums span { font-size: 9px; letter-spacing: 0; }
  .profile-actions { gap: 6px; }
  .profile-actions .btn.small { padding: 7px 6px; gap: 5px; font-size: 13px; }
  .att-row .av { display: none; }                 /* the name needs the room more than the picture does */
  .skm-head { gap: 8px; padding: 12px 10px; }
  .skm-head .micon { display: none; }
  .skm-head .grow b { font-size: 14px; }
}
@media print {
  .topbar, .tabbar, .finish-bar, #toast { display: none !important; }
  main { padding: 0; }
}
