:root {
  color-scheme: light dark;
  --bg: #F1F5F4; --surface: #FFFFFF; --ink: #12211E; --muted: #56665F; --line: #D3DDDA;
  --accent: #0F6B5C; --accent-ink: #FFFFFF; --tint: color-mix(in srgb, var(--ink) 4%, var(--surface));
  --signal: #E3A008; --signal-soft: color-mix(in srgb, var(--signal) 14%, var(--surface)); --signal-line: color-mix(in srgb, var(--signal) 45%, var(--line)); --signal-ink: #231A00; --signal-text: #231A00;
  --lecture: #0F6B5C; --practical: #B4531E; --other: #5A5F9E;
  --ok: #1F7A3D; --ok-soft: color-mix(in srgb, var(--ok) 12%, var(--surface)); --warn: #B4531E; --warn-soft: color-mix(in srgb, var(--warn) 10%, var(--surface));
  --danger: #C0362C; --danger-soft: color-mix(in srgb, var(--danger) 8%, var(--surface)); --danger-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(18, 33, 30, .05), 0 6px 16px -8px rgba(18, 33, 30, .10);
  --shadow-sm: 0 1px 2px rgba(18, 33, 30, .05);
  --radius: 14px;
  --head: 'Bricolage Grotesque', Figtree, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --body: Figtree, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1513; --surface: #15211E; --ink: #E6F0ED; --muted: #93A6A0; --line: #263630;
    --accent: #4FC3AC; --accent-ink: #06211B; --tint: color-mix(in srgb, var(--ink) 4%, var(--surface));
    --signal: #F2B93B; --signal-soft: color-mix(in srgb, var(--signal) 14%, var(--surface)); --signal-line: color-mix(in srgb, var(--signal) 45%, var(--line)); --signal-ink: #2a1f04; --signal-text: #F6DC98;
    --lecture: #4FC3AC; --practical: #F0894F; --other: #9AA0E8;
    --ok: #5FD087; --ok-soft: color-mix(in srgb, var(--ok) 12%, var(--surface)); --warn: #F0894F; --warn-soft: color-mix(in srgb, var(--warn) 10%, var(--surface));
    --danger: #F2766B; --danger-soft: color-mix(in srgb, var(--danger) 8%, var(--surface)); --danger-ink: #2A0905;
    --shadow: 0 1px 0 rgba(255, 255, 255, .02), 0 10px 24px -10px rgba(0, 0, 0, .5);
    --shadow-sm: 0 1px 0 rgba(255, 255, 255, .02);
  }
}
* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); line-height: 1.5; }
body.sheet-open { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; margin: 0 0 .5rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .6rem; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.hint { font-size: .85rem; color: var(--muted); }
.empty { color: var(--muted); padding: .75rem 0; }
.empty.small { padding: .25rem 0; }

/* tap feedback, as in J3 Hub */
@media (prefers-reduced-motion: no-preference) {
  .navcard, .card2, .strip[data-key], .iitem, .slot li, .days button, .seg button, .btn, .calbtn, .icon-btn { transition: transform .12s ease, background-color .12s ease; }
  .navcard:active, .card2:active, .strip[data-key]:active, .iitem:active, .slot li:active, .days button:active, .btn:active, .calbtn:active, .icon-btn:active { transform: scale(.985); }
}

/* ---------- sign-in ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; }
.auth-card { width: min(24rem, 100%); background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--accent); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.55rem; }
.sub { color: var(--muted); margin-bottom: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .9rem; }
label { font-size: .9rem; font-weight: 600; }
input[type=text], input[type=password], input[type=tel], select {
  font: inherit; font-size: 1rem; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); width: 100%;
}
.btn { font: inherit; font-weight: 600; padding: .7rem 1.1rem; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--accent); }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.msg { border-radius: 10px; padding: .7rem .9rem; margin-bottom: .9rem; border: 1px solid; }
.msg.ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.msg.err { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.msg.warn { background: var(--signal-soft); border-color: var(--signal-line); color: var(--signal-text); }

/* ---------- shell ---------- */
.top { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--ink); padding: calc(.55rem + env(safe-area-inset-top)) 1rem .55rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.top .mark { font-family: var(--head); font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; color: var(--accent); }
.top .date { font-size: .9rem; color: var(--muted); white-space: nowrap; }
.main { padding: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom)); max-width: 40rem; margin: 0 auto; }
/* the account button (top right) and its small menu */
.topright { display: flex; align-items: center; gap: .75rem; }
.acct { position: relative; }
.avatar { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--tint); color: var(--accent); font: 700 1rem/1 var(--head); display: grid; place-items: center; cursor: pointer; padding: 0; }
.avatar:empty { visibility: hidden; }
.avatar[aria-expanded="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.acctmenu { position: absolute; right: 0; top: calc(100% + .45rem); z-index: 6; min-width: 15rem; max-width: calc(100vw - 2rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow), 0 14px 30px -12px rgba(0, 0, 0, .35); padding: .35rem; }
.acctmenu[hidden] { display: none; }
.acctmenu .who { display: flex; flex-direction: column; padding: .55rem .65rem .6rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.acctmenu .who span { color: var(--muted); font-size: .85rem; }
.acctmenu .item { display: block; width: 100%; text-align: left; padding: .65rem .65rem; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; }
.acctmenu .item:hover, .acctmenu .item:focus-visible { background: var(--tint); }
.acctmenu button.item { color: var(--danger); }
/* the row of tabs is for wide screens only; on a phone the Home cards and the account button do that job */
.tabs { display: none; }
@media (min-width: 760px) {
  .top { padding: calc(.7rem + env(safe-area-inset-top)) 1rem .7rem; align-items: baseline; }
  .acct, .backlink.phone-only { display: none; }
  .tabs { position: sticky; top: 2.9rem; z-index: 5; display: grid; grid-template-columns: repeat(5, max-content); justify-content: center; gap: 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); }
  .tabs a { display: flex; flex-direction: row; align-items: center; gap: .5rem; padding: .7rem .4rem; text-decoration: none; color: var(--muted); font-size: .95rem; border-bottom: 3px solid transparent; }
  .tabs a svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabs a[aria-current="page"] { color: var(--accent); font-weight: 600; border-bottom-color: var(--signal); }
  .main { padding-bottom: 3rem; }
}

/* ---------- skeleton loaders ---------- */
.skel { display: grid; gap: .7rem; padding: .5rem 0; }
.sk-row { height: 4.2rem; border-radius: var(--radius); background: linear-gradient(90deg, var(--tint) 25%, var(--line) 37%, var(--tint) 63%); background-size: 400% 100%; }
@media (prefers-reduced-motion: no-preference) { .sk-row { animation: shimmer 1.4s ease infinite; } @keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } } }

/* ---------- Home ---------- */
.hello { margin: .25rem 0 .9rem; }
.hello h2 { margin: 0; }
.ianotice { background: var(--danger-soft); border: 1px solid var(--danger); border-radius: var(--radius); padding: .75rem .9rem; margin-bottom: .9rem; box-shadow: var(--shadow); }
.ihead { display: flex; align-items: center; gap: .5rem; font-family: var(--head); font-weight: 700; color: var(--danger); margin-bottom: .4rem; }
.ihead svg { width: 1.1rem; height: 1.1rem; }
.ihead .dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--danger); margin-left: auto; }
@media (prefers-reduced-motion: no-preference) { .ihead .dot, .strip.pulse .icon::after { animation: pulse 1.6s ease-in-out infinite; } @keyframes pulse { 50% { opacity: .35; transform: scale(1.25); } } }
.iitem { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-top: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); cursor: pointer; }
.iitem:first-of-type { border-top: 0; }
.ibody { flex: 1; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.ititle { font-weight: 700; }
.isub { font-size: .9rem; color: var(--muted); }
.iwhen { font-size: .8rem; font-weight: 700; color: var(--danger); }
.iwhen.later { color: var(--muted); }
.iwish { display: flex; gap: .45rem; align-items: flex-start; margin-top: .3rem; font-size: .92rem; }
.iwish svg { width: 1rem; height: 1rem; flex: none; margin-top: .15rem; color: var(--signal); }
.ichev svg, .schev svg, .chev svg, .chev2 svg { width: 1rem; height: 1rem; color: var(--muted); }

.strip { --tint: var(--accent); --tint-ink: var(--accent-ink); position: relative; display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; padding: .8rem 1rem; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.strip::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, color-mix(in srgb, var(--tint) 16%, transparent), transparent 65%); pointer-events: none; }
.strip.next { --tint: var(--muted); --tint-ink: var(--surface); }
.strip.date { --tint: var(--signal); --tint-ink: var(--signal-ink); }
.strip[data-key] { cursor: pointer; }
.strip .icon { position: relative; width: 2.4rem; height: 2.4rem; flex: none; border-radius: .8rem; display: grid; place-items: center; background: var(--tint); color: var(--tint-ink); }
.strip .icon svg { width: 1.25rem; height: 1.25rem; }
.strip.pulse .icon::after { content: ""; position: absolute; top: -.15rem; right: -.15rem; width: .5rem; height: .5rem; border-radius: 50%; background: var(--tint); box-shadow: 0 0 0 2px var(--surface); }
.strip .body { position: relative; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.strip .tag { display: flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--tint); }
.strip .txt { font-family: var(--head); font-weight: 800; font-size: 1.15rem; line-height: 1.25; color: var(--ink); letter-spacing: -.005em; }
.strip .ssub { font-size: .9rem; color: var(--muted); }
.strip .schev svg { color: var(--muted); }

.banner { display: flex; gap: .75rem; align-items: flex-start; margin: 0 0 .9rem; padding: .85rem 1rem; background: var(--signal-soft); border: 1px solid var(--signal-line); border-radius: var(--radius); }
.banner .icon { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--signal); color: var(--signal-ink); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.banner .icon svg { width: .9rem; height: .9rem; }
.banner .txt { flex: 1; font-size: .95rem; line-height: 1.4; color: var(--signal-text); }
.banner .txt b { display: block; }
.banner button { margin: .5rem .5rem 0 0; font: inherit; font-weight: 600; font-size: .9rem; padding: .35rem .8rem; border-radius: 8px; border: 1px solid var(--signal); background: var(--signal); color: var(--signal-ink); cursor: pointer; }
.banner button#installDismiss { background: transparent; color: var(--signal-text); }
.installlink { text-align: center; margin: .25rem 0 1rem; }
.installlink button { background: none; border: 0; color: var(--muted); font-size: .9rem; text-decoration: underline; cursor: pointer; }
[hidden] { display: none !important; }

.announce { display: flex; gap: .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: .9rem; box-shadow: var(--shadow); }
.aicon { flex: none; width: 1.6rem; color: var(--accent); }
.aicon svg { width: 1.3rem; height: 1.3rem; }
.announce .content { flex: 1; min-width: 0; }
.announce .lbl { display: block; font-family: var(--head); margin-bottom: .3rem; }
.note { padding: .45rem 0; border-top: 1px solid var(--line); }
.note:first-child { border-top: 0; padding-top: 0; }
.note .date { display: block; font-size: .82rem; color: var(--muted); }
.pre { white-space: pre-wrap; }

.cards { display: grid; gap: .7rem; margin: 1rem 0; }
.navcard { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; box-shadow: var(--shadow); }
.navcard .cicon { width: 2.4rem; height: 2.4rem; border-radius: 10px; display: grid; place-items: center; background: var(--tint); color: var(--accent); flex: none; }
.navcard .cicon svg { width: 1.3rem; height: 1.3rem; }
.navcard .left { flex: 1; min-width: 0; }
.navcard h2 { font-size: 1.1rem; margin: 0; }
.navcard p { margin: 0; color: var(--muted); font-size: .9rem; }
.navcard p.warn { color: var(--warn); font-weight: 600; }

/* ---------- cards used on several pages ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: .9rem; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .6rem; }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.lines li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: 7rem 1fr; gap: .35rem .75rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ---------- Timetable ---------- */
.panelhead { margin-bottom: .6rem; }
.panelhead h2 { margin: 0; }
.panelhead .sub { margin: .1rem 0 0; font-size: .9rem; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--tint); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; margin-bottom: .7rem; }
.seg button { border: 0; background: transparent; padding: .5rem; border-radius: 8px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.weekbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.weeknote { margin: 0; text-align: center; font-size: .95rem; color: var(--muted); }
.weeknote b { color: var(--ink); }
.icon-btn { width: 2.4rem; height: 2.4rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 1.2rem; line-height: 1; color: var(--accent); }
.days { display: flex; gap: .35rem; overflow-x: auto; padding: .1rem 0 .5rem; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.days button { flex: 1 0 3rem; display: flex; flex-direction: column; align-items: center; gap: .05rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .4rem 0 .3rem; cursor: pointer; color: var(--ink); }
.days button span { font-size: .75rem; color: var(--muted); }
.days button small { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.days button.past { opacity: .6; }
.days button.off { color: var(--muted); border-style: dashed; }
.days button.today { border-color: var(--signal); border-width: 2px; }
.days button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); opacity: 1; }
.days button[aria-pressed="true"] span { color: color-mix(in srgb, var(--accent-ink) 75%, transparent); }
.calbtn { width: 100%; margin: .3rem 0 .2rem; padding: .6rem 1rem; border-radius: 10px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font-weight: 600; cursor: pointer; }
.calmsg { min-height: 1.2rem; margin: .1rem .2rem .5rem; font-size: .9rem; color: var(--muted); }
.head { margin: .8rem 0 .5rem; }
.head h2 { margin: 0; }
.head p { margin: 0; color: var(--muted); }
.movednote { margin: .8rem 0 0; padding: .65rem .8rem; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); font-size: .95rem; }
.notice { margin: .8rem 0 0; padding: .75rem .9rem; border-radius: 10px; border: 1px dashed var(--line); background: var(--surface); color: var(--muted); font-size: .92rem; }
.holiday { margin-top: .5rem; background: var(--signal-soft); border: 1px solid var(--signal-line); border-radius: var(--radius); padding: .9rem 1rem; color: var(--signal-text); }
.holiday h3 { margin: 0 0 .2rem; }
.holiday p { margin: 0; }
.holiday.past { opacity: .65; }

.card2 { position: relative; display: grid; grid-template-columns: 4.4rem 1fr auto; gap: .8rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--other); border-radius: var(--radius); padding: .75rem .85rem; margin-top: .6rem; cursor: pointer; box-shadow: var(--shadow); }
.card2.lecture { border-left-color: var(--lecture); }
.card2.practical { border-left-color: var(--practical); }
.card2.ia { border-color: var(--danger); border-left-color: var(--danger); }
.card2.now { outline: 2px solid var(--signal); outline-offset: 1px; }
.card2.past { opacity: .55; }
.card2 .t { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; line-height: 1.25; }
.card2 .t b { font-size: 1rem; }
.card2 .t span { font-size: .85rem; color: var(--muted); }
.card2 h3 { margin: 0; font-size: 1.05rem; line-height: 1.25; }
.meta { display: flex; flex-wrap: wrap; gap: .1rem .8rem; margin: .2rem 0 0; font-size: .88rem; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: .3rem; }
.meta svg { width: .9rem; height: .9rem; flex: none; }
.meta .kind { font-weight: 600; }
/* the session topic, under the subject on a class card */
.card2 .topic { margin: .15rem 0 0; font-size: .92rem; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.card2.past .topic { color: var(--muted); }
.card2.lecture .kind svg { color: var(--lecture); }
.card2.practical .kind svg { color: var(--practical); }
.flag { display: inline-block; margin-left: .4rem; font-family: var(--body); font-size: .7rem; font-weight: 700; padding: .05rem .5rem; border-radius: 99px; vertical-align: middle; background: var(--signal); color: var(--signal-ink); }
.flag.next { background: var(--tint); color: var(--muted); border: 1px solid var(--line); }
.flag.ia { background: var(--danger); color: var(--danger-ink); }

.slot { margin-top: 1rem; }
.slot h3 { font-size: .95rem; color: var(--muted); margin-bottom: .35rem; font-variant-numeric: tabular-nums; }
.slot ul { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.slot li { display: grid; grid-template-columns: 5.2rem 1fr; gap: .2rem .8rem; padding: .65rem .8rem; border-top: 1px solid var(--line); cursor: pointer; }
.slot li:first-child { border-top: 0; }
.slot li.mine { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); box-shadow: inset 4px 0 0 var(--accent); }
.slot li.past { opacity: .55; }
.slot .rolls { font-weight: 700; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.slot small, .dist small { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; }
.slot .loc { grid-column: 2; font-size: .85rem; color: var(--muted); }

/* ---------- the class details sheet ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .45); opacity: 0; }
.sheet-bg.show { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 40rem; margin: 0 auto; max-height: 86vh; overflow-y: auto; background: var(--surface); border-radius: 18px 18px 0 0; padding: .6rem 1.1rem calc(1.4rem + env(safe-area-inset-bottom)); transform: translateY(100%); box-shadow: 0 -10px 30px rgba(0, 0, 0, .25); }
@media (prefers-reduced-motion: no-preference) { .sheet { transition: transform .3s cubic-bezier(.2, .8, .2, 1); } .sheet-bg { transition: opacity .3s; } }
.sheet.show { transform: none; }
.grab { width: 2.6rem; height: .3rem; border-radius: 99px; background: var(--line); margin: 0 auto .6rem; }
.sheet-close { position: absolute; top: .5rem; right: .7rem; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: var(--tint); color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.eyebrow { display: block; font-size: .8rem; font-weight: 700; color: var(--accent); margin-top: .3rem; }
.sheet h2 { margin: .1rem 2rem .1rem 0; }
.sheet .subj { color: var(--muted); margin-bottom: .8rem; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.tile { background: var(--tint); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem; }
.tile.wide { grid-column: 1 / -1; }
.tl { display: block; font-size: .75rem; font-weight: 700; color: var(--muted); margin-bottom: .15rem; }
.tv { font-weight: 600; }
.tv.plain { font-weight: 400; }
.tv .ln { display: block; }
.tv svg { width: .95rem; height: .95rem; margin-right: .3rem; vertical-align: -2px; color: var(--muted); }
.dist { list-style: none; margin: 0; padding: 0; }
.dist li { display: grid; grid-template-columns: 6rem 1fr; gap: .6rem; padding: .45rem .4rem; border-top: 1px solid var(--line); border-radius: 6px; }
.dist li:first-child { border-top: 0; }
.dist li.mine { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.dist .r { font-weight: 700; }

/* ---------- Mess bill ---------- */
.who { margin: .6rem 0; }
.billgroup { margin-bottom: .9rem; }
.billgroup h4 { margin: 0 0 .3rem; font-size: 1rem; color: var(--muted); font-family: var(--body); }
.billtbl { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.billtbl td { padding: .5rem .8rem; border-top: 1px solid var(--line); }
.billtbl tr:first-child td { border-top: 0; }
.billtbl td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.billtbl tr.tot td { font-weight: 700; background: var(--tint); }
.grandtotal { display: flex; justify-content: space-between; align-items: baseline; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: .9rem; box-shadow: var(--shadow); }
.grandtotal b { font-family: var(--head); font-size: 1.7rem; font-variant-numeric: tabular-nums; }

/* ---------- Attendance ---------- */
.table-wrap { overflow-x: auto; }
.atttbl { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .93rem; }
.atttbl th { text-align: right; font-size: .78rem; color: var(--muted); padding: .5rem .6rem; background: var(--tint); }
.atttbl th:first-child { text-align: left; }
.atttbl td { padding: .45rem .6rem; border-top: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.atttbl td:first-child { text-align: left; }
.atttbl tr.subjhead td { text-align: left; font-family: var(--head); font-weight: 700; background: var(--tint); }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: .05rem .55rem; border-radius: 99px; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.progress { margin: 1rem 0 .3rem; display: grid; gap: .7rem; }
.plabel { display: flex; justify-content: space-between; font-size: .95rem; }
.pbar { position: relative; height: .7rem; background: var(--tint); border: 1px solid var(--line); border-radius: 99px; margin-top: .25rem; }
.pfill { height: 100%; border-radius: 99px; }
.pfill.ok { background: var(--ok); }
.pfill.warn { background: var(--warn); }
.ptick { position: absolute; top: -.3rem; bottom: -.3rem; width: 2px; background: var(--ink); }
.avgline { margin: .8rem 0; color: var(--muted); }
.motiv { display: flex; gap: .7rem; align-items: flex-start; border-radius: var(--radius); padding: .8rem .9rem; border: 1px solid; }
.motiv p { margin: 0; color: var(--ink); }
.motiv.ok { background: var(--ok-soft); border-color: var(--ok); }
.motiv.warn { background: var(--warn-soft); border-color: var(--warn); }
.motiv.ok .micon { color: var(--ok); }
.motiv.warn .micon { color: var(--warn); }
.micon { flex: none; width: 1.5rem; height: 1.5rem; }
.micon svg { width: 100%; height: 100%; }

/* Kilroy loading screen: a full-screen overlay shown on first paint, independent of the app (so the
   app rendering can't cut it short). It fades itself out with CSS alone - no script needed, so it can
   never get stuck on screen even if the app fails to start.
   Timeline in seconds: Kilroy rises 0.08-0.63, nose and hands pop 0.50-0.80, then he looks around while the
   dots pulse; the fade-out starts at 1.70 (splash gone by 2.0s) and the app slides in at 1.65. kilroy-login.js (MORPH_AT) must stay
   close to the fade-out start. Look: splash design by Kimi, fitted to the Kilroy artwork. */
#kl-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 30px; padding: 24px; pointer-events: none; animation: kl-out .3s ease 1.7s forwards; }
.kl-bg { position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 45% at 50% 42%, rgba(255,236,190,.14), transparent 70%),
              radial-gradient(130% 110% at 50% -10%, #167061 0%, #0a3f37 52%, #062420 100%); }
#kl-overlay svg { width: min(340px, 72vw); height: auto; overflow: visible; filter: drop-shadow(0 18px 26px rgba(0,0,0,.35)); }
.kl-wall { fill: #141414; }
.kl-rise { animation: kl-rise .55s cubic-bezier(.2,.9,.3,1.15) .08s both; }
.kl-look { animation: kl-look 2.4s ease-in-out .65s infinite; }
.kl-nose { transform-box: view-box; transform-origin: 196px 126px;
  animation: kl-nose .14s ease-out .5s both, kl-nose-idle 4.2s ease-in-out .9s infinite; }
.kl-hand { transform-box: view-box; }
.kl-hl { transform-origin: 100px 129px; animation: kl-hand .2s cubic-bezier(.3,1.5,.4,1) .56s both, kl-grip 3.2s ease-in-out .9s infinite; }
.kl-hr { transform-origin: 299px 129px; animation: kl-hand .2s cubic-bezier(.3,1.5,.4,1) .6s both, kl-grip 3.2s ease-in-out 1.2s infinite; }
.kl-brand { font-family: 'Bricolage Grotesque', Figtree, system-ui, sans-serif; font-size: clamp(15px, 2.4vw, 19px); font-weight: 700;
  letter-spacing: .42em; text-indent: .42em; text-transform: uppercase;
  background: linear-gradient(100deg, #f7efdc 25%, #ffd98a 50%, #f7efdc 75%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: kl-fade .35s ease .3s both, kl-shimmer 3.2s linear infinite; }
.kl-dots { display: flex; gap: 8px; animation: kl-fade .35s ease .4s both; }
.kl-dots span { width: 7px; height: 7px; border-radius: 50%; background: #f7efdc; opacity: .35; animation: kl-dot 1.2s ease-in-out infinite; }
.kl-dots span:nth-child(2) { animation-delay: .15s; }
.kl-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes kl-rise { from { transform: translateY(126px); } to { transform: translateY(0); } }
@keyframes kl-look { 0%, 6% { transform: translateX(0); } 22%, 38% { transform: translateX(7px); } 56%, 72% { transform: translateX(-7px); } 100% { transform: translateX(0); } }
@keyframes kl-nose { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes kl-nose-idle { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(3deg); } }
@keyframes kl-hand { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes kl-grip { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@keyframes kl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kl-shimmer { from { background-position: 200% 0; } to { background-position: -20% 0; } }
@keyframes kl-dot { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: 1; transform: scale(1.35); } }
@keyframes kl-out { to { opacity: 0; visibility: hidden; } }
#app { animation: app-in .42s cubic-bezier(.16,1,.3,1) 1.65s backwards; }
@keyframes app-in { from { opacity: 0; transform: translateY(56px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .kl-rise, .kl-look, .kl-nose, .kl-hand, .kl-hl, .kl-hr, .kl-brand, .kl-dots, .kl-dots span { animation: none; }
  #kl-overlay { animation-delay: .5s; }
  #app { animation: none; }
}

/* "Offline - showing what was last loaded" note under the top bar / tabs */
.offline-note { margin: .6rem auto 0; max-width: 46rem; padding: .45rem .8rem; border-radius: 10px; font-size: .88rem; text-align: center;
  background: color-mix(in srgb, #E3A008 18%, transparent); border: 1px solid color-mix(in srgb, #E3A008 55%, transparent); }
.offline-note[hidden] { display: none; }

/* logo + smoothness */
.top .mark { display: inline-flex; align-items: center; gap: .5rem; }
.marklogo { width: 28px; height: 28px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.18); flex: none; }
.authlogo { display: block; width: 64px; height: 64px; border-radius: 16px; margin: 0 0 1rem; box-shadow: 0 8px 22px rgba(12,44,38,.3); }
.tab-in { animation: tab-in .3s cubic-bezier(.16,1,.3,1); }
@keyframes tab-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#view a, #view button, #view [role="button"], .tabs a { transition: transform .12s ease, box-shadow .18s ease, background-color .18s ease; }
#view a:active, #view button:active:not([disabled]), #view [role="button"]:active { transform: scale(.985); }
@media (prefers-reduced-motion: reduce) {
  .tab-in { animation: none; }
  #view a, #view button, #view [role="button"], .tabs a { transition: none; }
  #view a:active, #view button:active, #view [role="button"]:active { transform: none; }
}

/* ---- empty states: the sign-in artwork grips the top edge of the box, so the hands go over the border ---- */
.peek-empty { --pw: 130px; position: relative; margin: 3.5rem 0 .6rem; padding: 3rem 1.1rem 1.25rem; text-align: center; background: var(--tint);
  border: 2px dashed color-mix(in srgb, var(--muted) 35%, var(--line)); border-radius: var(--radius); }
.peek-empty b { display: block; font-family: var(--head); font-size: 1.1rem; margin-bottom: .2rem; }
.peek-empty > span:not(.peek-art):not(.zzz) { display: block; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.peek-empty.past { opacity: .7; }
/* the picture's wall line sits on the middle of the 2px border: top = -(wall height in px) - 1px */
.peek-art { position: absolute; left: 50%; top: calc(var(--pw) * -0.32857 - 1px); width: var(--pw); height: calc(var(--pw) * 0.54592); margin-left: calc(var(--pw) / -2);
  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYgAAADWCAMAAAD8buUnAAAAn1BMVEXm49v38uyvracnJyfAvrZ3dnJnZmaAf3pAPz0uLS1KSUiQkIr//38AAAD28+oUFBQGBgfw7uUkJCPc2tKioJoTExNmZWETExMTExMXFxeYlpETExPFwrtiYV5dXFk5OTdHRkT///8TExODgn0TExPW0cxAQD7OzMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxBA9hAAAAKHRSTlP+Lf4S//8J//+leC0CAP79/v7w/v4p/leqEf6P///+//8Ccf/PM//+4KTGZAAAEWlJREFUeNrtnWlj6iwWgJ1u7ztLQyDBEJNqxzq9//8fTpTtsMVoUEkLn669jVYezsrhsHrPI4mxylOQQeSRQfgGzSBSoMAQQiyDePho0HE0GcSjB8sgMogMAgxyAkEziCRMBMkgHu0zoUdrpgwCWAiS44gkFNNDBeJ3gqBN01BHMRGaQdyZAzE9JK6YUE5xPNgiCMXE3jOIh7hIUgK4fDxYMf1KEEITSducgOv6O0FIgZC6qHm86/o7QTQmCKGZmgzi3oNIENxINClY6t8IQmmmYfZpOgLxM0BQOS7RTHz6aRoWYuEghgiZkWGomT2+YEbUHPSZOAghECyDmEOBoNBgQRZCAsSjDKUQVC8ZxBgFPtUBFo2YeOPx5j2DuM4DtSiUclhyQUOaiUKbjdB7BnGNMDBiQTiZhtOwWZDGq5nYYNZZWgKxPBCNJQlkXfcFFqOu18SUDAuFjhooSYrD0kA0DFBA63Vd4cIcVb9erxFgYSgoUKxBWVB/ZRDnBsQwQChCo6oJQNHYPpOkOoxkvtqSQGhtUpKv/jjh2EcBH3+Kj0rKEYomIV20WBBUicOgk6oQBQnjKBaDhrKEgqUSNSwYRKMxHHXSGAXFovpSKAahkD4rySAicBhswyQM0lgQKBSpZFoXDIIp41AXFww82AqFohHvkkFE4LDGxaVDmwqG0jURywDBpDj0F2glPWoE4+00BWIRICSHwTpcgWF4BliKVAViCSAUh6vEgVuKdZlBxOJQF3PGlyRBMoi5HHAcEhnEQzloEk0G8VAOg/OUNInVr+GQOImkQTRROWgSNIO4bETmoOxEip5TwiDE9sMQP8TiUBQinmgyiIsNxDGOizcwSZVEuiDoDThoEjSDuIgDIlVcDkWFUql2XQgIFttQSxJ1msopVRBNfENtGWyaQUw3ECQ+hkIqJ5ZBTA+p6+IWI0nltEpZIOoC34REisopSRC8hCm25wprO9JTTkmCaGJsBU3wnGgGMT7IbQVCKSeWQUxJutY3BJGeSCQIgt4uhLBFgmQQ5wWiKm45qtR2JhIEQe4gEDg5K7FKVSDq4rYjNSux+pUCkaDjlBwIeg8LkaCVSA4Eu5NASCvRZBD+cR8Loa0EyyDCpvoOAqGtRD7eOyIQVVH8NpFIDAS9eZbJTcJmEEHNVN9FM6VlrhMDQU4bpPfRTEXRJ7QtsUpSM2H3+HpRXC8mGAceJemY67RAMN+GEOZTia/WQOfMdW4T5AgE8ZZuVPX62Ixp/Vd1nVQc+9X0VTi6JhnEFJ/peE5aNii74lxpxTs4Hfs6hXRTBjHFZzIOSV/YeGB4WrduGljUju35SsZIJAXC4zPVVp++C3oPnE71lkbDM8cfq5Lxm1YJaibsVCDB2Zxa/Wedc5edbSzddvqVDMKvmRx54OtarO6JYQbgADtgmooPp5NvSgkEM/NMqvxoUO7VMGohHpNSgrh4QfLpdT0MqaVsE5SKA7tKTTMRZ+vm1KGJzxpf45NSIOJEiuh2ph+2nq5yS+qzIIRq0T049CmTakJCr1QNbWQ4uC5d1VblJu1nogipvmFYIZXV2fSsehgZgYd4mqS4KZEQCMtWV8idNXlA96xyEg8jKwCs3ae/ynx/hMdWg7V+WqquiyR+jCcV3juBuPq5tSmRQdjh3NpavC/2VHLlP1opjn0r33h6nV4kkQ4Iamqmdek1BmKSx60EltONzyJKJsuRDgjTRFTBM0P4nEhIVj7fCtuqLZltunRAwL0INZe4uEYk1mXYoDuE6wwiDEIu+5cRxdOPb/cE7LmLOJGQLhkQ1Ei9jqx6qV2+gh7smEC4qq3KNzMG42phQUNzWfkCDOe/8bgFUZCrMoMIJziOizocLPAlX50RiPFgT5nyKo1dusRACI+zGg+fR801JufSUQYpoekyCDW0rZbePpjL1Wpll+iFdFPly0aZj5u/kUG4YYSce66Z9DRuhv/aruxMRT/VVD9tEdo92Y9Xhv9KMwg302Qt2T87nv1+snST3wx8l7ZmeuWPa5KmFenzxeK2RPC5x2qe+aJeqS3nJ1M3eXfqKmJrplf5+DZgY07WOoMYAWFNJNoZysUPwhGWJ107sPHCwhmEH4Q0n0K7/EHOTGLzNxwTYaSZduB5r5HIIFwQtdYVasFuYT3Mylr3OBAk6J9Djkq3mY+vMwgwiA2i9kykVi6hHVNsmwiD487zuAjj2U8H0V4OooeK49UA8So9nTIQSZxcIJCHMjkqkQCRu9BzPwxEu+8OrNM+ecNQ19ELQdQwitiZM7kCeYnwtlHvukym4wQc2B8JQt4W14m0xYG/3F8GAoZz1opWusmxyQAElJTdrwTRHpBB4nDBTcUahJFcfUL+mfwO7FesLUmxQEiJ+uEgOvOybnbJVVcBEBs0NpO998AD8KZsgZJGov7RIKh521t7yeVvqnTA2i/YekG4tsAI1TQIW6CktX9BIH70gWibrtsDR2N4ado6uh9+0rRJgtiD0m3UCvmYeHdGo0HATaGVPZHoD5xxB0RvxRevARAgVPGC2Fsqldn3TrDY18PHBHHgOoWr5U4Y7g/LXtPGu5ACIBzNpIJrPwg70HMEaufYEh8IaqrUVl2k3Voc4mVtI4Lgc7nDFTwZ8iFr6/lXaA6BhRQA8RoCwWey9m9nKxCuQHGJEt5VCMSzmnhi2T5mCIzBJh0QqgzjQx/UKTfy5d78Rs00EDvkX9LYm/bDtlfrChQHCR/3gOhM4waNXQO99Jj1H/FAtKqfCQBxfLk5vTyYX9AmEQCBgkvam3895e/AXrcHxLYAQSP2SgR0Oo6qhyFTAKg6iBTRTMQDwf2enT5gwjUTFhsvyPqClkjHAWEXcIRBVGpD0AXBgJMxRESNMe1UrqfyWxx9IW9pgdiLmS+ASHAlvis5iIPxjdiVIF7HQJAIIJ6FLHPj1vF5L78qeZKiVXfuVBE9p3gg+Drp4Znck3zIUgC5ssjHt6fB5HQQ2wskYncNCHVghtfZiPVfiUckGFKputkuLRBMCYSoaFGzybOpIsr4wFJiWKIglNMBzngP7yl3o4TF6E+GnrNqUwLRgplXIDanl/C8c1npo3D0LIg/8UGIiHAExOk9/sb6hi7550Awn7CUfJ8SCD6TIsISRkKAAG7USWSwp4mbH8TTA0CAPhTquD2f9x6AWMcunF3FtdUijWaAwMKBBYVL/O8/tCmCULYOiAD/ICjZlXECOSUQTEuEBlFbIIQNkY4U9Sb9poAoZGgcHYRIZ1QeEAUpLYGIeCh1FdVEyLBXgOAhrgkCg7Oc1JMGnyURq/kgntVbQBC12RlEquCIRiIWCApAaH/DAbExKoU7VyKwUV7mAVEKifir1P+2SgeI1SpuEghiOa/YsM5QoxpJlGh3qa2imoidceZAOrPARshSIiEzjWUj1uYxxpVvRfP34JvWW59qQkhu3G3KUEAIK5tE11H+t7Tw4FIlvb+/CxPEp90WECUCQuyRahAEKCK9spSJUDJzOIi1RPn4xzDAP/9njH+J5XgaJRQwXTxT6t8gMof6T/Nt/qE/5O34z3+LD9TpPKXc1lb7Dt2WxT65nQgIikwQfMHrI6LE6dHzohbr5aUJquuPfVYFcxC69ZxRyjD9I1TFk6FilUUA6Xf1K2mD6C0Q4MRD7Qfx32GAf5qjcexF7wdhjc59K/Ehb8d//scFIReMULEEmx0+tDeQKoiPwrAKlQUCVELWMyQiCIKbcBfExRJhgrAlAmimVEGISFpsgH1YNhRWDfe3AdHHBdEbE69AwAOtFYqT94vkNTXMA+LvwtBUhkSIkK5rLsght40a+wAIEfx2DRz00hWlJcJqmcYtm/GxiYEQ7qsJ4rswnVXgNEkQV+ctCQrXNc2Ir94sY/xpNvXoXR8hNRB0GghsgaCzdKEHxHZesVhrORV+EK5EoIWDYPM+jrhFyJt5R0QngfD0olswiNOPDm1cEDKYbm4JAsbViwchHdxZqslJNc1X2a3l3f0CEPNONzfw4zxHt55nJZF1UvfTLLHNEuHdIN+Gr/lrM4iROMK1EdeCaIVm8hzv3ZbzQehKzp8Bwo6s47mvDfLmXrWkNbNAvCwexIdpAaxcUzwQDAV7mM2z1j6JADm+xYCwsq8vDggrsj5c92GiWtvfFGWWbnqzem6dQHwWZ0GwtEGMpMFnBXQ03MJM6qb99e8M3/gTOh0jIPaJghB9bu0dOph9nbOQgiYCLNHnq9/ZATFBIrpUQXj3rEtnP+I6ELriJQwC3QtEXaYsEX2giqO3/v7DDIHYhjrFbWf4TWdA1DYIHK3tVrS6psOEuiYQCvczJIKNaaZ5ZZCjIOTJMBdEhDLkaJV+BzjzH36JAG7THHefoPEGvNvrF+mVICIc34pccumvfdUVc1ZdU3u9Fgy2sZTcu18KovHVvtrV4CpUcir9rg3iI8d0jfd2nSoIQsTeCZVc6prJ41+8Mwuzdk7t65zO6Ptzl8DP8JssEOaOnA9EFav9WbwTQwfPiaEPM57TbtWcHWsy6jPNC65tibC2Rj8dENF67cc+Q1cZNaI7+5pLISMvM5xXGs68zk/8WUm/2gRR2ZWvEW+fiAyC13NbRcfwAPwOaxvSzTBGm/G7z64NsoykHygowyAdAPwEnN75CJh/xTvjYIo4HsS7P5yM7KzdG3bGeZ11b1BrvrkFQpa+9va1g+/pgTiu+C9QbocL5U2qg9jCF7nS5yPnJYIbCTJXIqStUyBIaecuEzy6JUrzS7MFhD4lu5e1SDt5V2U7A8SY0zRnH9bcKq2QCeLbLgaPeB1LxKYo6jgjMZqiCJ+JWv2crv7ryegtHjNT4RzEt3VpLbxMAYKJeWVXRBCiNUIt+i5wXf5R69PtuuXfnJKm897rjNi6NVIzFgh5pgNsUCR44F05sKp5CLN6iZgkmlmmaDN2RWZ0EARbpebmjQeJtYAwu88czCp6eUDrMJeD+JDqRhLxbFgg5XVUhZky+4p/h92tulzu30G3Uf23tvxXWPt+QxCyK0139VeoC8M4E8NW65BOmL82ORAUCgR8CbtSdaxrZn7G2Ttjq3kgZI7ss4T5ANCGihSBThaJgNC97qgpIZFhjyU4ZoIAnTj0zHPr/Gl65SoeogmCECeHutZ8SR8D4poKWJhE1jmyYywtj7YTdUEztxCkTRHEYAWGEX55VxDXKO8WHJoDXYLWCovuq1XHbOmX0n3WSYA4qVNuA2qzK5DsuiGPYv8lSoTeMoibgGhEEwmrT1ZVS2vXIiNBkGAD3vuM5h4gBv9UNezjqkh0vdy/m9135zjiWSLGQzoZwvUyNUmQ1fV/jy65BiCDuA5EK+/nIjI6J3aC4Dl+Z/AMIhRbr9elmTSGbyjyA/H00oJBFDeKI1QSudT1gp27/tumY/uo15suEsTZXNOsEm23g3ln3x5xg7FMEOQMiH4OiNbthB+49CKDGN+ynlV0CUWCtff7XosD0d50Y4h/BIt7R8fPBBE+Yh0NxPAZR5eV3fWu8eWBuGnxgNaATXvfr7VMiQidKI3T1uAhY5kSMa3ArM0gbjm6qSWX3XsGccsxpQg57l19GcSI/zqhLJ9mEDcdz1MPqrxlELcdE49uLctWLxEERWdEIlZXhgzijJEgozVmWPSlziDuFEn0484rajOI+0QSwbzfJmIhZAZx3oEN6qZtubwoYpkgxruiVPdPYf9aEM35DmZL00zLBPGOwiKhj+xlEPfSTR4rIS+3WZxALBQEReMtqRdnqpcKQt8p7XeZyHsGcUcP1snBqi4gNIO4q0hY9lpxYO8ZxH1FwiCBVWMomkHc216fSOBja6LTsc8yUlviDOLSqE4dPh9wbMhyFdOSQcjKyJJsTkMePSRtBvGIsM6+IpYs9MssGUTL3Oswl8ph0SCsc4UL1kuLB/FODaEg+8VyWDoI2WUCGZ0nMojHoOg6RrpuTxf9LX4AiJ8xMogMIo8MIsHxf68wf6HvlOBIAAAAAElFTkSuQmCC) 0 0 / 100% 100% no-repeat; pointer-events: none; }
.peek-empty .zzz { position: absolute; right: 1.4rem; top: -2.2rem; font-weight: 700; color: var(--accent); letter-spacing: .1em; font-size: .95rem; }

/* ---------- Exam schedule (Home card, strip, and the #exams screen) ---------- */
.exbox { display: contents; }
.navcard.ex { border-color: var(--signal-line); background: linear-gradient(120deg, var(--signal-soft), var(--surface) 70%); }
.navcard.ex .cicon { background: var(--signal); color: var(--signal-ink); }
.navcard.ex.today { outline: 2px solid var(--signal); outline-offset: 1px; }
.navcard.ex p.exnext { color: var(--ink); font-weight: 600; }
.navcard.ex .exwish { display: flex; gap: .45rem; align-items: flex-start; margin-top: .3rem; font-size: .92rem; color: var(--ink); }
.navcard.ex .exwish svg { width: 1rem; height: 1rem; flex: none; margin-top: .15rem; color: var(--signal); }
.backlink { display: inline-block; margin: 0 0 .5rem; padding: .35rem 0; font-weight: 600; color: var(--accent); text-decoration: none; }
.exbatch { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .9rem; }
.exbatch span { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.exbatch b { padding: .3rem .8rem; border-radius: 99px; background: var(--signal-soft); border: 1px solid var(--signal-line); color: var(--ink); }
.exsec h3 { margin-bottom: .2rem; }
.exline { margin: 0 0 .5rem; font-size: .92rem; color: var(--muted); }
.exlist { list-style: none; margin: 0; padding: 0; }
.exrow { display: flex; align-items: center; gap: .8rem; padding: .6rem .5rem; border-top: 1px solid var(--line); border-radius: 10px; }
.exrow:first-child { border-top: 0; }
.exdate { flex: none; width: 3.6rem; display: flex; flex-direction: column; line-height: 1.2; font-size: .85rem; color: var(--muted); }
.exdate b { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
.exwhat { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.exwhat b { font-weight: 700; }
.exwhat small { color: var(--muted); font-size: .85rem; }
.exflag { flex: none; font-size: .72rem; font-weight: 700; padding: .1rem .6rem; border-radius: 99px; background: var(--signal); color: var(--signal-ink); }
.excheck { flex: none; display: grid; place-items: center; color: var(--ok); }
.excheck svg { width: 1.1rem; height: 1.1rem; }
.exrow.next { background: var(--signal-soft); box-shadow: inset 4px 0 0 var(--signal); }
.exrow.today { outline: 2px solid var(--signal); outline-offset: -2px; }
.exrow.over .exwhat, .exrow.over .exdate { opacity: .55; }
.exnotes { padding: .2rem 1rem; }
.exnotes summary { cursor: pointer; padding: .7rem 0; font-weight: 700; font-family: var(--head); }
.exnotes p { margin: 0 0 .6rem; font-size: .92rem; }

/* ===================== Night band, October 2026 =====================
   The splash's night carries on into the app: deep pine teal, a warm lamplight glow, cream type, and brass for whatever is
   live right now. The top of every page is a night band holding that page's answer in big type (the class time, the bill
   total, the attendance gauges, the exam countdown); the detail sits on light paper under it, and on Home Kilroy grips the
   paper's top edge the way he grips the sign-in card. Layout and colour only: nothing here changes what a screen does. */
:root {
  --night: #0A3F37; --night-deep: #072E28;
  --cream: #F7EFDC; --cream-2: rgba(247, 239, 220, .76); --cream-3: rgba(247, 239, 220, .5);
  --glass: rgba(247, 239, 220, .07); --glass-2: rgba(247, 239, 220, .13); --glass-line: rgba(247, 239, 220, .2);
  --brass: #E3A008; --brass-hi: #FFD98A; --mint: #86E0B9; --ember: #F6A06A;
  --gutter: max(1rem, calc((100% - 38rem) / 2));
  --r-paper: 26px; --r-card: 18px;
  --lift: 0 1px 2px rgba(18, 33, 30, .06), 0 12px 26px -16px rgba(18, 33, 30, .30);
}
@media (prefers-color-scheme: dark) {
  :root { --lift: 0 1px 0 rgba(255, 255, 255, .03), 0 14px 28px -16px rgba(0, 0, 0, .8); }
}
html { background: var(--night-deep); }
body { background: var(--night-deep); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
#app { flex: 1 0 auto; display: flex; flex-direction: column; }
h1, h2, h3, h4 { letter-spacing: -.018em; line-height: 1.15; }
input[type=text], input[type=password], input[type=tel], select { min-height: 2.8rem; border-radius: 12px; }
input[type=text]:focus, input[type=password]:focus, input[type=tel]:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.btn { min-height: 2.8rem; border-radius: 12px; }

/* ---- sign-in: the same night as the splash, so Kilroy lands on the card without the page changing under him ---- */
.auth { flex: 1 0 auto; padding: 3.5rem 1.25rem 2rem;
  background: radial-gradient(60% 45% at 50% 42%, rgba(255, 236, 190, .14), transparent 70%),
              radial-gradient(130% 110% at 50% -10%, #167061 0%, #0a3f37 52%, #062420 100%); }
.auth-card { border: 0; border-radius: 22px; padding: 1.7rem 1.6rem 1.5rem; box-shadow: 0 34px 60px -26px rgba(0, 0, 0, .65), 0 0 0 1px rgba(0, 0, 0, .04); }
.auth-card h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; }

/* ---- the top bar and the desktop tabs sit on the night ---- */
.top { background: var(--night); border-bottom: 0; color: var(--cream); }
.top .mark { color: var(--cream); letter-spacing: -.015em; }
.top .date { color: var(--cream-2); }
.marklogo { box-shadow: 0 0 0 1px rgba(247, 239, 220, .16), 0 2px 8px rgba(0, 0, 0, .35); }
.avatar { background: var(--glass); border-color: var(--glass-line); color: var(--cream); }
.avatar[aria-expanded="true"] { background: var(--cream); border-color: var(--cream); color: var(--night); }
.acctmenu { color: var(--ink); }
@media (min-width: 760px) {
  .top { align-items: center; }
  .tabs { background: var(--night); border-bottom: 1px solid rgba(247, 239, 220, .08); }
  .tabs a { color: var(--cream-2); }
  .tabs a:hover { color: var(--cream); }
  .tabs a[aria-current="page"] { color: var(--cream); border-bottom-color: var(--brass); }
}
.offline-note { max-width: none; margin: 0; border: 0; border-radius: 0; padding: .5rem 1rem; color: var(--cream);
  background: color-mix(in srgb, var(--brass) 20%, var(--night)); }

/* ---- page frame: night band, then paper that rises over its lower edge ---- */
.main { max-width: none; width: 100%; margin: 0; padding: 0; flex: 1 0 auto; display: flex; flex-direction: column; }
.band { position: relative; padding: .35rem var(--gutter) calc(var(--r-paper) + 1.6rem); color: var(--cream);
  background:
    radial-gradient(34% 46% at calc(50% + 12rem) 74%, rgba(255, 236, 190, .11), transparent 72%),
    radial-gradient(70% 62% at calc(50% + 10rem) 80%, rgba(22, 112, 97, .7), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, var(--night-deep) 100%); }
.paper { position: relative; z-index: 1; flex: 1 0 auto; margin-top: calc(-1 * var(--r-paper));
  padding: 1.4rem var(--gutter) calc(2.2rem + env(safe-area-inset-bottom)); background: var(--bg); border-radius: var(--r-paper) var(--r-paper) 0 0; }
.band .backlink, .band .backlink.phone-only { display: inline-flex; margin: .2rem 0 0; padding: .4rem 0; color: var(--cream-2); font-weight: 600; }
.band .backlink:hover { color: var(--cream); }
@media (min-width: 760px) { .band .backlink.phone-only { display: none; } .band { padding-top: 1.1rem; } }
.bhead { margin: .3rem 0 0; }
.bhead h2 { margin: 0; color: var(--cream); font-size: 2.15rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.04; }
.bhead .sub { margin: .4rem 0 0; color: var(--cream-2); font-size: .95rem; }
.bhead .sub + .sub { margin-top: .1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0 0; }
.chips span { padding: .22rem .7rem; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-line); color: var(--cream);
  font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- Home: the greeting, then the hero (what is on now / next) ---- */
.band.home { padding-bottom: calc(var(--r-paper) + 4.4rem); }
.band .hello { margin: .9rem 0 0; }
.band .hello h2 { margin: 0; color: var(--cream); font-size: 2.05rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.06; }
.sk-hello { display: block; height: 2.3rem; width: min(17rem, 72%); border-radius: 12px; background: var(--glass-2); }
.band .strip { display: block; margin: 1.6rem 0 0; padding: 1.15rem 0 0; overflow: visible; color: var(--cream); background: none;
  border: 0; border-top: 1px solid var(--glass-line); border-radius: 0; box-shadow: none; }
.band .strip::before { display: none; }
.s-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.band .strip .tag { display: inline-flex; align-items: center; gap: .5rem; font-size: .92rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--cream-2); }
.band .strip.now .tag, .band .strip.date .tag { color: var(--brass-hi); }
.band .strip.pulse .tag::before { content: ""; flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--brass); box-shadow: 0 0 0 4px rgba(227, 160, 8, .2); }
.s-left { color: var(--cream-2); font-size: .88rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.s-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.s-time { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .55rem; margin: .4rem 0 0; font-family: var(--head); line-height: 1; color: var(--cream); }
.s-time b { font-size: 3.5rem; font-weight: 800; letter-spacing: -.045em; }
.s-time span { font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; color: var(--cream-2); }
.s-what { margin: .6rem 0 0; }
.band .strip .txt { display: block; font-family: var(--head); font-size: 1.6rem; font-weight: 700; line-height: 1.12; letter-spacing: -.025em; color: var(--cream); }
.band .strip.date .s-what, .band .strip.holiday .s-what { margin-top: .45rem; }
.band .strip.date .txt, .band .strip.holiday .txt { font-size: 1.95rem; font-weight: 800; letter-spacing: -.035em; }
.s-where { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin: .5rem 0 0; color: var(--cream-2); font-size: .95rem; }
.s-loc { display: inline-flex; align-items: center; gap: .35rem; min-width: 0; }
.s-loc svg { width: .95rem; height: .95rem; flex: none; }
.s-kind { max-width: 15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: .08rem .55rem; border: 1px solid var(--glass-line); border-radius: 99px; font-size: .8rem; font-weight: 600; }
.s-prog { position: relative; height: 4px; margin: 1.05rem 0 0; overflow: hidden; border-radius: 99px; background: var(--glass-2); }
.s-prog i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brass), var(--brass-hi)); }
.band .strip .schev { flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: .1rem; border-radius: 50%; background: var(--glass); border: 1px solid var(--glass-line); }
.band .strip .schev svg { width: 1rem; height: 1rem; color: var(--cream); }
.band .strip[data-key]:focus-visible, .band .strip[data-href]:focus-visible { outline-offset: 6px; border-radius: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .band .strip.pulse .tag::before { animation: pulse 1.6s ease-in-out infinite; }
  .band .strip[data-key]:active, .band .strip[data-href]:active { transform: none; }
  .band .strip[data-key]:active .schev, .band .strip[data-href]:active .schev { transform: scale(.92); }
}

/* Kilroy grips the top edge of Home's paper; his nose and fingers hang over it like on the sign-in card */
.paper.home { padding-top: 1.95rem; }
.paper > .kl-peek { --kl-w: 118px; left: auto; right: calc(var(--gutter) + .35rem); margin-left: 0; top: calc(var(--kl-w) * -.3286); z-index: 2; }

/* ---- Home paper ---- */
.paper .ianotice, .paper .banner { border-radius: var(--r-card); }
.paper .cards { gap: 0; margin: 0 0 1.7rem; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--lift); }
.paper .cards .navcard { margin-top: -1px; padding: 1rem 1rem; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.paper .cards .navcard:active { transform: none; background: var(--tint); }
.paper .cards .navcard .cicon { width: 2.6rem; height: 2.6rem; border-radius: 13px; background: color-mix(in srgb, var(--accent) 11%, var(--surface)); color: var(--accent); }
.paper .cards .navcard h2 { font-size: 1.1rem; letter-spacing: -.015em; }
.nval { margin-left: auto; padding-left: .5rem; font-family: var(--head); font-weight: 800; font-size: 1.32rem; letter-spacing: -.025em; white-space: nowrap; }
.nval.warn { color: var(--warn); }
.paper .cards .navcard.ex { background: linear-gradient(100deg, var(--signal-soft), transparent 85%); box-shadow: inset 4px 0 0 var(--signal); }
.paper .cards .navcard.ex .cicon { background: var(--signal); color: var(--signal-ink); }
.paper .cards .navcard.ex.today { outline-offset: -2px; }
.paper .announce { gap: .75rem; margin: 0 0 1.4rem; padding: .95rem 1rem; background: linear-gradient(100deg, var(--signal-soft), var(--surface) 88%); border: 1px solid color-mix(in srgb, var(--signal) 45%, var(--line));
  border-radius: var(--r-card); box-shadow: inset 5px 0 0 var(--signal), var(--lift); }
.paper .announce .aicon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: var(--signal); color: var(--signal-ink); }
.paper .announce .aicon svg { width: 1.25rem; height: 1.25rem; }
.paper .announce .note { font-size: 1.02rem; line-height: 1.4; }
.paper .announce .note + .note { border-top: 1px solid color-mix(in srgb, var(--signal) 25%, var(--line)); }
.comingup.urgent .kdate { border-top-color: var(--signal); }
.paper .announce .lbl { margin-bottom: .3rem; font-size: 1.15rem; letter-spacing: -.015em; }
.paper .note { padding: .75rem 0; }
.paper .note .date { margin-top: .25rem; }
.comingup { margin: 0 0 1.7rem; }
.comingup h3 { margin: 0 0 .55rem; font-size: 1.15rem; }
.comingup .lines li { align-items: center; justify-content: flex-start; gap: .9rem; padding: .65rem 0; }
.kdate { flex: none; width: 3.25rem; padding: .3rem 0; text-align: center; font-size: .72rem; line-height: 1.1; color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-top: 4px solid var(--night); border-radius: 11px; }
.kdate b { display: block; font-family: var(--head); font-size: 1.32rem; letter-spacing: -.02em; color: var(--ink); }
.kwhat { display: flex; flex-direction: column; font-weight: 600; line-height: 1.25; }
.kwhat small { font-size: .85rem; font-weight: 400; }
.banner.install { margin-bottom: .6rem; }

/* ---- Timetable: the week and the day picker on the night, the classes on the paper ---- */
.band .weekbar { margin: 1.25rem 0 0; }
.band .weeknote { color: var(--cream-2); font-size: .92rem; }
.band .weeknote b { color: var(--cream); font-family: var(--head); font-size: 1.12rem; letter-spacing: -.015em; }
.band .icon-btn { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); color: var(--cream); }
.band .days { gap: .35rem; margin: .9rem 0 0; padding: .1rem 0 .15rem; }
.band .days button { flex: 1 0 2.55rem; padding: .5rem 0 .45rem; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-line); color: var(--cream); }
.band .days button span { font-size: .74rem; color: var(--cream-2); }
.band .days button small { font-family: var(--head); font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; }
.band .days button.off { background: transparent; border-style: dashed; color: var(--cream-3); }
.band .days button.past { opacity: .55; }
.band .days button.today { border-color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass); }
.band .days button[aria-pressed="true"] { background: var(--cream); border-color: var(--cream); color: var(--night); opacity: 1; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .6); }
.band .days button[aria-pressed="true"] span { color: color-mix(in srgb, var(--night) 72%, transparent); }
.band .days button[aria-pressed="true"].today { box-shadow: inset 0 0 0 2px var(--brass), 0 8px 18px -10px rgba(0, 0, 0, .6); }
.paper .seg { margin: 0 0 .3rem; border-radius: 14px; }
.paper .seg button { border-radius: 11px; min-height: 2.5rem; }
.paper .head { margin: 1.2rem 0 .6rem; }
.paper .head h2 { font-size: 1.65rem; font-weight: 800; letter-spacing: -.03em; }
.paper .movednote, .paper .notice { border-radius: 14px; }
.card2 { grid-template-columns: 4.7rem 1fr auto; padding: .85rem .95rem; border-radius: 16px; box-shadow: none; }
.card2 .t b { font-family: var(--head); font-size: 1.22rem; font-weight: 800; letter-spacing: -.025em; }
.card2.now { background: var(--night); border-color: var(--night); color: var(--cream); outline: 0; box-shadow: 0 16px 30px -18px rgba(6, 36, 32, .8); }
.card2.now.lecture { border-left-color: var(--mint); }
.card2.now.practical { border-left-color: var(--ember); }
.card2.now h3 { color: var(--cream); }
.card2.now .t span, .card2.now .meta { color: var(--cream-2); }
.card2.now .topic { color: var(--cream); }
.card2.now .kind svg { color: var(--brass-hi); }
.card2.now .chev2 svg { color: var(--cream-2); }
.card2.now .flag:not(.ia) { background: var(--brass); color: #231A00; }
.paper .slot ul { border-radius: 16px; }
.paper .calbtn { margin-top: 1.2rem; min-height: 2.8rem; border-radius: 14px; }

/* ---- Mess bill: the total on the night ---- */
.bfig { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 1.4rem 0 0; }
.bfl { display: flex; flex-direction: column; min-width: 0; }
.bl { color: var(--cream-2); font-size: .9rem; }
.bnum { margin-top: .25rem; font-family: var(--head); font-size: 3.6rem; font-weight: 800; line-height: 1; letter-spacing: -.045em; color: var(--cream); }
.bnote { margin-top: .5rem; color: var(--cream-2); font-size: .92rem; }
.band .field { margin: 1.15rem 0 0; }
.band .field label { color: var(--cream-2); font-size: .85rem; }
.band select { background-color: var(--glass); color: var(--cream); border-color: var(--glass-line); }
.band select option { color: #12211E; background: #FFFFFF; }
.paper .who { margin: 0 0 .9rem; font-size: 1.15rem; }
.paper .billtbl { border-radius: 16px; }
.paper .billgroup h4 { font-size: .95rem; }
.grandtotal { align-items: center; padding: 1rem 1.1rem; background: var(--night); color: var(--cream); border-radius: var(--r-card); box-shadow: var(--lift); }
.grandtotal b { font-size: 1.9rem; letter-spacing: -.035em; }

/* ---- Attendance: two gauges with the minimum marked ---- */
.band .progress { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1.2rem 1.4rem; margin: 1.4rem 0 0; }
.band .plabel { display: flex; flex-direction: column; font-size: inherit; }
.band .plabel span { color: var(--cream-2); font-size: .9rem; }
.band .plabel b { margin-top: .15rem; font-family: var(--head); font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -.045em; color: var(--cream); }
.band .plabel small { margin-top: .4rem; color: var(--cream-2); font-size: .82rem; }
.band .prow.warn .plabel small { color: var(--brass-hi); }
.band .pbar { height: .5rem; margin-top: .65rem; background: var(--glass-2); border: 0; }
.band .pfill.ok { background: var(--mint); }
.band .pfill.warn { background: var(--brass); }
.band .ptick { top: -.3rem; bottom: -.3rem; width: 2px; border-radius: 2px; background: var(--cream); }
.band .avgline { margin: 1.1rem 0 0; color: var(--cream-2); }
.band .avgline b { color: var(--cream); font-family: var(--head); font-size: 1.1rem; }
.paper .motiv { margin: 0 0 .2rem; padding: .95rem 1rem; border-radius: var(--r-card); }
.paper .sechead { margin: 1.4rem 0 .65rem; font-size: 1.15rem; }
.paper .atttbl { border-radius: 16px; box-shadow: none; }

/* ---- Account ---- */
.whoband { display: flex; align-items: center; gap: 1rem; margin: .75rem 0 0; }
.bavatar { flex: none; display: grid; place-items: center; width: 4.1rem; height: 4.1rem; border-radius: 50%; background: var(--brass); color: #231A00;
  font: 800 1.85rem/1 var(--head); box-shadow: 0 0 0 5px rgba(227, 160, 8, .18); }
.whoband h2 { margin: 0; color: var(--cream); font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.whoband .chips { margin-top: .55rem; }
.paper .card { padding: 1.15rem 1.1rem; border-radius: var(--r-card); box-shadow: var(--lift); }
.paper .card > h3 { font-size: 1.15rem; }

/* ---- Exam schedule ---- */
.exfig { align-items: flex-end; }
.bname { margin-top: .25rem; font-family: var(--head); font-size: 1.95rem; font-weight: 800; line-height: 1.08; letter-spacing: -.035em; color: var(--cream); }
.bcount { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.bcount b { font-family: var(--head); font-size: 3.5rem; font-weight: 800; line-height: .92; letter-spacing: -.045em; color: var(--brass-hi); }
.bcount span { margin-top: .3rem; color: var(--cream-2); font-size: .85rem; white-space: nowrap; }
.exbatch span, .exdate b { text-transform: none; letter-spacing: 0; }
.exbatch span { font-size: .88rem; }
.exdate b { font-size: .88rem; }
.paper .exsec { border-radius: var(--r-card); }

/* ---- the class details sheet ---- */
.sheet { border-radius: 24px 24px 0 0; }
.eyebrow { color: var(--accent); }

@media (min-width: 760px) {
  .bhead h2 { font-size: 2.5rem; }
  .band .hello h2 { font-size: 2.4rem; }
  .s-time b { font-size: 4.1rem; }
  .band .strip .txt { font-size: 1.85rem; }
  .bnum, .bcount b { font-size: 4.2rem; }
  .band .plabel b { font-size: 3.4rem; }
}
@media (max-width: 359px) {
  .top { gap: .6rem; padding-left: .8rem; padding-right: .8rem; }
  .top .mark { font-size: 1.05rem; white-space: nowrap; }
  .top .date { font-size: .78rem; }
  .topright { gap: .5rem; }
  .s-time b { font-size: 2.9rem; }
  .bnum, .bcount b { font-size: 3rem; }
  .band .plabel b { font-size: 2.5rem; }
}
@media (max-width: 339px) { .top .date { display: none; } }

/* ===================== Motion and life, October 2026 =====================
   The sky behind the band follows the clock in Pune, and College Day (4 August) has a gold one of its own. Kilroy is drawn
   live, so his eyes follow a tap, he blinks, and his face follows the cadet's day. Pages hand over to each other: the band
   stays on screen and changes height, the paper rises from the bottom (or drops away when going back), and a Home card's
   title and figure glide into the page they open. A class card grows into its details. While a page loads, Kilroy waits on
   the paper's edge instead of grey bars. Home keeps a slim "what's next" bar once the band scrolls away, days slide, Home
   can be pulled down to refresh, first-timers get a short tour, and a few moments earn a burst of gold sparkles.
   Phones set to reduce motion get every change without the movement. */

/* ---- the sky ---- */
@property --sky-base { syntax: '<color>'; inherits: true; initial-value: #072E28; }
@property --sky-mid { syntax: '<color>'; inherits: true; initial-value: rgba(22, 112, 97, .7); }
@property --sky-lamp { syntax: '<color>'; inherits: true; initial-value: rgba(255, 236, 190, .11); }
@property --sky-sun { syntax: '<color>'; inherits: true; initial-value: rgba(255, 246, 220, 0); }
@property --sky-low { syntax: '<color>'; inherits: true; initial-value: rgba(255, 236, 190, 0); }
@property --sky-stop { syntax: '<percentage>'; inherits: true; initial-value: 100%; }
/* night (and the starting point): the band as it was designed, deep pine teal with the lamplight glow */
:root { --sky-base: #072E28; --sky-mid: rgba(22, 112, 97, .7); --sky-lamp: rgba(255, 236, 190, .11); --sky-sun: rgba(255, 246, 220, 0); --sky-low: rgba(255, 236, 190, 0); --sky-stop: 100%; }
:root[data-sky="dawn"], :root[data-sky="day"], :root[data-sky="dusk"], :root[data-sky="college"] { --sky-stop: 58%; }
/* dawn: cool and pale, a rose light along the bottom and a pale glow where the sun comes up */
:root[data-sky="dawn"] { --sky-base: #0F4548; --sky-mid: rgba(46, 116, 124, .5); --sky-lamp: rgba(255, 226, 204, .04); --sky-sun: rgba(255, 228, 216, .2); --sky-low: rgba(255, 176, 160, .5); }
/* day: the brightest teal, with the sun high on the right */
:root[data-sky="day"] { --sky-base: #0E5749; --sky-mid: rgba(28, 128, 108, .34); --sky-lamp: rgba(255, 244, 214, .04); --sky-sun: rgba(255, 250, 232, .26); --sky-low: rgba(70, 176, 150, .3); }
/* dusk: warmer, an ember glow along the bottom, the first stars */
:root[data-sky="dusk"] { --sky-base: #183B35; --sky-mid: rgba(22, 96, 84, .4); --sky-lamp: rgba(255, 190, 140, .08); --sky-sun: rgba(255, 168, 104, .16); --sky-low: rgba(250, 136, 70, .58); }
/* College Day: gold */
:root[data-sky="college"] { --sky-base: #0D4A3F; --sky-mid: rgba(22, 112, 97, .5); --sky-lamp: rgba(255, 217, 138, .18); --sky-sun: rgba(255, 217, 138, .26); --sky-low: rgba(240, 172, 24, .48); }
.band { isolation: isolate;
  background:
    radial-gradient(60% 70% at 92% 0%, var(--sky-sun), transparent 70%),
    radial-gradient(34% 46% at calc(50% + 12rem) 74%, var(--sky-lamp), transparent 72%),
    radial-gradient(120% 36% at 50% 100%, var(--sky-low), transparent 72%),
    radial-gradient(70% 62% at calc(50% + 10rem) 80%, var(--sky-mid), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, var(--sky-base) var(--sky-stop), var(--sky-base) 100%);
  transition: --sky-base 2.4s ease, --sky-mid 2.4s ease, --sky-lamp 2.4s ease, --sky-sun 2.4s ease, --sky-low 2.4s ease, --sky-stop 2.4s ease; }
:root[data-sky="college"] .kl-bg { background: radial-gradient(60% 45% at 50% 42%, rgba(255, 217, 138, .26), transparent 70%),
  radial-gradient(130% 110% at 50% -10%, #167061 0%, #0a3f37 52%, #062420 100%); }

/* stars and a crescent moon at night; a few gold sparkles on College Day */
.sky { position: absolute; left: 0; right: 0; top: 0; height: 78%; z-index: -1; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 2.4s ease; }
.sky b { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #FFF4D6; box-shadow: 0 0 5px 1px rgba(255, 244, 214, .5); }
.sky b:nth-child(1) { left: 7%; top: 16%; }
.sky b:nth-child(2) { left: 18%; top: 58%; width: 3px; height: 3px; }
.sky b:nth-child(3) { left: 31%; top: 9%; }
.sky b:nth-child(4) { left: 44%; top: 40%; }
.sky b:nth-child(5) { left: 57%; top: 13%; width: 3px; height: 3px; }
.sky b:nth-child(6) { left: 66%; top: 62%; }
.sky b:nth-child(7) { left: 76%; top: 31%; }
.sky b:nth-child(8) { left: 88%; top: 54%; width: 3px; height: 3px; }
.sky b:nth-child(9) { left: 94%; top: 22%; }
.sky .moon { left: auto; right: calc(var(--gutter) + .2rem); top: .5rem; width: 19px; height: 19px; background: none;
  box-shadow: inset -5px 3px 0 0 #F7EFDC; filter: drop-shadow(0 0 7px rgba(247, 239, 220, .4)); }
:root[data-sky="night"] .sky, :root[data-sky="college"] .sky { opacity: 1; }
:root[data-sky="dusk"] .sky { opacity: .45; }
:root[data-sky="dusk"] .sky .moon { opacity: 0; }
:root[data-sky="college"] .sky b { background: var(--brass-hi); box-shadow: 0 0 8px 2px rgba(255, 217, 138, .55); }
:root[data-sky="college"] .sky .moon { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .sky b:not(.moon) { animation: kh-twinkle 4.6s ease-in-out infinite; }
  .sky b:nth-child(2n) { animation-duration: 6.2s; animation-delay: -2s; }
  .sky b:nth-child(3n) { animation-duration: 3.9s; animation-delay: -1.2s; }
  .sky b:nth-child(5n) { animation-delay: -3.4s; }
}
@keyframes kh-twinkle { 0%, 100% { opacity: .95; transform: scale(1); } 50% { opacity: .2; transform: scale(.55); } }

/* ---- Kilroy, drawn live ---- */
.kl-peek.hk { background: none; }
.hk-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hk-eyes { transform: translate(var(--ex, 0px), var(--ey, 0px)); }
.kl-peek.down .hk-eyes { transform: translate(var(--ex, 0px), 3px); }   /* looks down at the page while you scroll */
.hk-lid { transform: translateY(-54px); }                               /* open: the eyelid waits above the eye */
.hk-nose { transform-box: view-box; transform-origin: 196px 126px; }
.hk-hand { transform-box: view-box; }
.hk-hl { transform-origin: 100px 129px; }
.hk-hr { transform-origin: 299px 129px; }
.hk-brow, .hk-drop, .hk-z, .hk-stars { display: none; }
.hk-brow { fill: none; stroke: #141414; stroke-width: 6; stroke-linecap: round; }
.hk-drop { fill: #A8DDF2; stroke: #141414; stroke-width: 4.5; stroke-linejoin: round; }
.hk-z text { font-family: var(--head); font-size: 40px; font-weight: 800; fill: var(--cream); }
.hk-z text:nth-child(2) { font-size: 50px; }
.hk-z text:nth-child(3) { font-size: 62px; }
.hk-stars path { fill: var(--brass-hi); stroke: #141414; stroke-width: 3.5; stroke-linejoin: round; }
/* moods: asleep on a holiday, worried when attendance is short, wishing luck before an exam, celebrating College Day */
.kl-peek[data-mood="sleep"] .hk-lid { transform: none; }
.kl-peek[data-mood="sleep"] .hk-z { display: block; }
.kl-peek[data-mood="worry"] .hk-brow, .kl-peek[data-mood="worry"] .hk-drop { display: block; }
.kl-peek[data-mood="luck"] .hk-stars, .kl-peek[data-mood="party"] .hk-stars { display: block; }
.hk-sign { position: absolute; right: 66%; bottom: 80%; z-index: 1; padding: .34rem .66rem .38rem; color: #141414; background: #FFFCF3;
  border: 2px solid #141414; border-radius: 13px; font-family: var(--head); font-size: .84rem; font-weight: 700; line-height: 1.1; letter-spacing: -.005em;
  white-space: nowrap; box-shadow: 0 10px 18px -12px rgba(0, 0, 0, .6); transform-origin: 100% 100%; pointer-events: none; }
.hk-sign::after { content: ""; position: absolute; right: .7rem; bottom: -7px; width: 11px; height: 11px; background: inherit;
  border: solid #141414; border-width: 0 2px 2px 0; transform: rotate(45deg) skew(-8deg, -8deg); }
.kl-peek[data-mood="party"] .hk-sign { background: var(--brass-hi); }
@media (prefers-reduced-motion: no-preference) {
  .kl-peek.hk .hk-lid { animation: kh-blink 6.5s ease-in-out 2.2s infinite; }
  .kl-peek.hk[data-mood="worry"] .hk-lid { animation: kh-blink2 4.4s ease-in-out 1.4s infinite; }
  .kl-peek.hk[data-mood="sleep"] .hk-lid { animation: none; }
  .kl-home .hk-eyes, .pullk .hk-eyes { transition: transform .5s cubic-bezier(.3, .7, .3, 1); }
  .hk-z text { animation: kh-z 3.6s ease-in-out infinite; }
  .hk-z text:nth-child(2) { animation-delay: 1.2s; }
  .hk-z text:nth-child(3) { animation-delay: 2.4s; }
  .hk-drop { animation: kh-sweat 2.6s ease-in-out infinite; }
  .hk-stars path { transform-box: fill-box; transform-origin: center; animation: kh-sparkle 2.2s ease-in-out infinite; }
  .hk-stars path:nth-child(2) { animation-delay: -.7s; }
  .hk-stars path:nth-child(3) { animation-delay: -1.4s; }
  .hk-stars path:nth-child(4) { animation-delay: -1s; }
  .hk-sign { animation: kh-pop .42s cubic-bezier(.3, 1.5, .5, 1) .6s both; }
}
@keyframes kh-blink { 0%, 93%, 100% { transform: translateY(-54px); } 95.5%, 96.5% { transform: none; } }
@keyframes kh-blink2 { 0%, 84%, 91%, 100% { transform: translateY(-54px); } 86.5%, 87.5%, 93.5%, 94.5% { transform: none; } }
@keyframes kh-z { 0% { opacity: 0; transform: translate(0, 12px); } 25%, 70% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -18px); } }
@keyframes kh-sweat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes kh-sparkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.55) rotate(25deg); opacity: .55; } }
@keyframes kh-pop { from { opacity: 0; transform: scale(.5) translateY(8px); } }

/* ---- while a page loads, Kilroy waits on the paper's edge (where he sits on Home), and ducks when it arrives ---- */
.paper.loading { min-height: 50vh; }
.kl-wait { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.paper > .kl-duck.kl-peek { pointer-events: none !important; }
@media (prefers-reduced-motion: no-preference) {
  .kl-loader .hk-rise { animation: kl-rise .5s cubic-bezier(.2, .9, .3, 1.15) .1s both; }
  .kl-loader .hk-nose { animation: kl-nose .14s ease-out .42s both; }
  .kl-loader .hk-hl { animation: kl-hand .2s cubic-bezier(.3, 1.5, .4, 1) .46s both; }
  .kl-loader .hk-hr { animation: kl-hand .2s cubic-bezier(.3, 1.5, .4, 1) .5s both; }
  .kl-loader .hk-eyes { animation: kl-look 2.4s ease-in-out .7s infinite; }
  .kl-duck .hk-rise { animation: kh-sink .38s cubic-bezier(.5, 0, .8, .4) .05s both; }
  .kl-duck .hk-nose, .kl-duck .hk-hand { animation: kh-let-go .22s ease-in .3s both; }
  .paper.arrive > :not(.kl-peek) { animation: kh-fade-in .28s ease both; }
}
@media (prefers-reduced-motion: reduce) { .kl-duck { display: none; } }
@keyframes kh-sink { to { transform: translateY(126px); } }
@keyframes kh-let-go { to { opacity: 0; transform: translateY(10px) scale(.8); } }

/* ---- moving between pages (view transitions) ---- */
@keyframes kh-fade-in { from { opacity: 0; } }
@keyframes kh-fade-out { to { opacity: 0; } }
@keyframes kh-rise-up { from { transform: translateY(85vh); } }
@keyframes kh-drop-away { to { transform: translateY(92vh); } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; }
::view-transition-group(kl-band) { z-index: 1; overflow: hidden; animation-duration: .46s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
/* the band's words: the new page's fade in over the old ones (no dip, no double text for long) */
::view-transition-old(kl-band) { animation: kh-fade-out .16s ease both; mix-blend-mode: normal; }
::view-transition-new(kl-band) { animation: kh-fade-in .24s ease both; mix-blend-mode: normal; }
::view-transition-group(kl-paper-out), ::view-transition-group(kl-paper-in) { z-index: 2; }
::view-transition-old(kl-paper-out) { animation: kh-fade-out .26s ease .04s both; }
::view-transition-new(kl-paper-in) { animation: kh-rise-up .52s cubic-bezier(.16, 1, .3, 1) both; }
html.kl-back::view-transition-group(kl-paper-out) { z-index: 3; }
html.kl-back::view-transition-old(kl-paper-out) { animation: kh-drop-away .36s cubic-bezier(.5, 0, .9, .45) both; }
/* going back, the title and figure set off once the page has started to fall, so they don't fly over its rows */
html.kl-back::view-transition-group(kl-title), html.kl-back::view-transition-group(kl-fig) { animation-delay: .1s; animation-duration: .44s; }
html.kl-back::view-transition-new(kl-paper-in) { animation: kh-fade-in .2s ease both; }
::view-transition-group(kl-title), ::view-transition-group(kl-fig) { z-index: 4; animation-duration: .48s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-group(kl-mini) { z-index: 4; }
::view-transition-group(kl-top), ::view-transition-group(kl-tabs) { z-index: 5; }
/* titles and figures that glide hug their text, so the glide lands on the letters */
.bhead h2, .paper .cards .navcard h2, .bfl .bnum { width: fit-content; }
.bfl .bnum { align-self: flex-start; }

/* ---- a card grows into its details sheet; from Home's "what's next", the time and subject fly into the sheet ---- */
.sheet.instant, .sheet-bg.instant { transition: none !important; }
::view-transition-group(kl-dim) { z-index: 6; }
::view-transition-group(kl-card), ::view-transition-group(kl-sheet) { z-index: 7; }
::view-transition-group(kl-card) { animation-duration: .44s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-image-pair(kl-card) { overflow: hidden; border-radius: 18px; background: var(--surface); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .55); }
::view-transition-new(kl-card) { width: 100%; height: 100%; object-fit: cover; object-position: top; mix-blend-mode: normal; animation: kh-fade-in .26s ease .06s both; }
::view-transition-old(kl-card) { width: 100%; height: auto; object-fit: none; object-position: left top; mix-blend-mode: normal; animation: kh-fade-out .15s ease both; }
html.kl-closing::view-transition-old(kl-card) { width: 100%; height: 100%; object-fit: cover; object-position: top; animation: kh-fade-out .17s ease both; }
html.kl-closing::view-transition-new(kl-card) { width: 100%; height: auto; object-fit: none; object-position: left top; animation: kh-fade-in .22s ease .14s both; }
::view-transition-new(kl-sheet) { animation: kh-sheet-up .42s cubic-bezier(.2, .8, .2, 1) both; }
::view-transition-old(kl-sheet) { animation: kh-sheet-down .3s cubic-bezier(.4, 0, .8, .5) both; }
::view-transition-group(kl-time), ::view-transition-group(kl-sub) { z-index: 8; animation-duration: .46s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
@keyframes kh-sheet-up { from { transform: translateY(100%); } }
@keyframes kh-sheet-down { to { transform: translateY(100%); } }
.band .strip .txt, .sheet #sheetTitle, .tiles > .tile:first-child .tv { width: fit-content; }
/* what was tapped has become the sheet, so it is not also shown behind it */
.strip.lent .s-time, .strip.lent .s-what { visibility: hidden; }

/* ---- Home: the slim bar that keeps "what's next" in view once the band has scrolled away ---- */
#view .minibar { position: fixed; left: 0; right: 0; top: 0; z-index: 4; display: flex; align-items: center; gap: .6rem; min-height: 2.75rem;
  padding: .45rem var(--gutter); color: var(--cream); background: rgba(9, 54, 47, .93);
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid rgba(247, 239, 220, .1); box-shadow: 0 14px 24px -18px rgba(0, 0, 0, .85);
  font-size: .92rem; line-height: 1.2; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(-105%);
  transition: transform .26s cubic-bezier(.2, .8, .2, 1), opacity .2s ease, visibility 0s linear .26s; }
#view .minibar.show { opacity: 1; visibility: visible; transform: none; transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .2s ease; }
#view .minibar[hidden] { display: none; }
.mb-dot { flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--cream-3); }
.minibar.now .mb-dot { background: var(--brass); box-shadow: 0 0 0 3px rgba(227, 160, 8, .22); }
.minibar b { flex: none; font-family: var(--head); font-size: 1rem; font-weight: 800; letter-spacing: -.02em; }
.mb-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mb-l { flex: none; color: var(--brass-hi); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.minibar.next .mb-l, .minibar.holiday .mb-l { color: var(--cream-2); }
#view .minibar:focus-visible { outline-offset: -3px; }
#view .lent:not(.strip) { visibility: hidden; }
@media (prefers-reduced-motion: no-preference) { .minibar.now .mb-dot { animation: pulse 1.6s ease-in-out infinite; } }
@media (prefers-reduced-motion: reduce) { #view .minibar, #view .minibar.show { transition: none; } }

/* ---- Timetable: the classes slide in from the side of the day you moved to; swipe sideways to change day ---- */
#out { touch-action: pan-y pinch-zoom; }
@media (prefers-reduced-motion: no-preference) {
  #out.day-next { animation: kh-day-next .34s cubic-bezier(.2, .8, .2, 1); }
  #out.day-prev { animation: kh-day-prev .34s cubic-bezier(.2, .8, .2, 1); }
}
@keyframes kh-day-next { from { opacity: 0; transform: translateX(48px); } }
@keyframes kh-day-prev { from { opacity: 0; transform: translateX(-48px); } }

/* ---- Home: pull down to refresh; Kilroy hangs on the band's top edge as it comes down ---- */
html.kh-home, html.kh-home body { overscroll-behavior-y: contain; }
.pullk { position: fixed; left: 0; right: 0; top: 0; z-index: 4; height: 4rem; display: flex; align-items: flex-end; justify-content: center; gap: .7rem;
  pointer-events: none; opacity: 0; transform: translateY(-4rem); }
.pullk > .kl-peek { --kl-w: 74px; position: relative; left: auto; top: auto; flex: none; margin: 0 0 calc(var(--kl-w) * -.2173); pointer-events: none !important; }
.pull-t { margin: 0 0 1.05rem; color: var(--cream-2); font-size: .85rem; font-weight: 600; }
.pullk.ready .hk-eyes { transform: translate(0, -7px); }
@media (prefers-reduced-motion: no-preference) { .pullk.busy .hk-eyes { animation: kl-look 1.3s ease-in-out infinite; } }

/* ---- a three-step tour for first-timers ---- */
.tour { position: fixed; inset: 0; z-index: 30; }
.tour-hole { position: fixed; border-radius: 20px; pointer-events: none;
  box-shadow: 0 0 0 200vmax rgba(3, 20, 17, .68), 0 0 0 2px var(--brass-hi), 0 0 24px 4px rgba(255, 217, 138, .25); }
.tour-card { position: fixed; padding: 2.05rem 1.15rem 1rem; color: var(--ink); background: var(--surface); border-radius: 20px;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .75); }
.tour-card > .kl-peek { --kl-w: 96px; --kl-top: calc(var(--kl-w) * -.3286); }
.tour-text { margin: 0 0 1rem; font-size: 1rem; line-height: 1.45; }
.tour-foot { display: flex; align-items: center; gap: .4rem; }
.tour-dots { display: flex; align-items: center; gap: .3rem; margin-right: auto; }
.tour-dots i { width: .45rem; height: .45rem; border-radius: 99px; background: var(--line); transition: width .25s ease, background-color .25s ease; }
.tour-dots i.on { width: 1.15rem; background: var(--accent); }
.tour-skip, .tour-next { min-height: 2.6rem; padding: 0 1rem; border: 0; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; }
.tour-skip { background: none; color: var(--muted); }
.tour-next { background: var(--accent); color: var(--accent-ink); }
.tour.out { opacity: 0; transition: opacity .25s ease; }
@media (prefers-reduced-motion: no-preference) {
  .tour { animation: kh-fade-in .3s ease both; }
  .tour-hole, .tour-card { transition: left .38s cubic-bezier(.2, .8, .2, 1), top .38s cubic-bezier(.2, .8, .2, 1), width .38s cubic-bezier(.2, .8, .2, 1), height .38s cubic-bezier(.2, .8, .2, 1); }
}

/* ---- one-time gold sparkles ---- */
.kl-burst { position: fixed; z-index: 25; width: 0; height: 0; pointer-events: none; }
.kl-burst i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; background: var(--brass-hi);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.kl-burst i.c { background: var(--cream); width: 7px; height: 7px; left: -3.5px; top: -3.5px; border-radius: 50%; clip-path: none; }

/* ---- Attendance: one card per subject ---- */
.subjs { display: grid; gap: .7rem; }
@media (min-width: 760px) { .subjs { grid-template-columns: 1fr 1fr; } }
.subj { padding: .95rem 1rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.subj.warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); box-shadow: inset 4px 0 0 var(--warn); }
.stitle { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.stitle h4 { margin: 0; font-size: 1.08rem; letter-spacing: -.015em; }
.srows { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: .9rem 1.1rem; }
.shead { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.slabel { color: var(--muted); font-size: .88rem; font-weight: 600; }
.spct { font-family: var(--head); font-size: 1.3rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.srow.warn .spct { color: var(--warn); }
.sbar { position: relative; height: .5rem; margin-top: .35rem; border-radius: 99px; background: var(--tint); box-shadow: inset 0 0 0 1px var(--line); }
.sfill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: inherit; background: var(--ok); }
.srow.warn .sfill { background: var(--warn); }
.stick { position: absolute; top: -.28rem; bottom: -.28rem; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--ink); }
.snote { margin: .4rem 0 0; color: var(--muted); font-size: .82rem; }
.snote b { display: block; color: var(--warn); font-weight: 700; }

.paper .announce .more summary { cursor: pointer; padding: .7rem 0 .1rem; font-weight: 700; color: var(--signal-text); border-top: 1px solid color-mix(in srgb, var(--signal) 25%, var(--line)); }
.paper .announce .more .note:first-of-type { border-top: 0; }
/* who posted an announcement: a department, the Training Officer, the Mess office or the super admin by name */
.note .from { display: block; margin-top: .25rem; font-size: .82rem; font-weight: 600; color: var(--signal-text); }
/* a class split into sub-batches (C1 / C2, Unit 1 / Unit 2 ...): one card, each sub-batch on its own line inside it */
.subl { list-style: none; margin: .45rem 0 0; padding: .4rem 0 0; border-top: 1px dashed var(--line); display: grid; gap: .3rem; }
.subl li { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .55rem; row-gap: .05rem; font-size: .86rem; line-height: 1.3; }
.subl b { font-weight: 700; color: var(--ink); min-width: 3.2rem; }
.subl .st { color: var(--ink); }
.subl .sv { color: var(--muted); display: inline-flex; align-items: center; gap: .2rem; }
.subl .sv svg, .subd svg { width: .85rem; height: .85rem; color: var(--muted); }
.card2.past .subl b, .card2.past .subl .st { color: var(--muted); }
.subd { list-style: none; margin: 0; padding: 0; }
.subd li { display: grid; gap: .1rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.subd li:first-child { border-top: 0; padding-top: .1rem; }
.subd b { font-weight: 700; }
.subd span { font-weight: 500; }
.subd .f { color: var(--muted); font-size: .9rem; }
/* notifications: the Account card and the offer on Home */
.pset { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin: .45rem 0 0; font-weight: 600; }
.pset input[type=checkbox] { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.pset select { margin-left: auto; min-height: 2.4rem; font: inherit; font-weight: 500; padding: .2rem .5rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.banner.push { margin-bottom: .6rem; }
.banner button.later { background: transparent; color: var(--signal-text); }

/* ---- the first sign-in: "what should I call you?", over a blurred Home ---- */
.namecall { position: fixed; inset: 0; z-index: 31; display: grid; place-items: start center; padding: max(5rem, 16vh) 16px 16px; overflow-y: auto;
  background: rgba(3, 20, 17, .42); -webkit-backdrop-filter: blur(12px) saturate(.75); backdrop-filter: blur(12px) saturate(.75); }
.nc-card { position: relative; width: min(380px, 100%); padding: 2.4rem 1.3rem 1.2rem; color: var(--ink); background: var(--surface);
  border-radius: 22px; box-shadow: 0 0 0 2px var(--brass-hi, #E9C46A), 0 30px 70px -24px rgba(0, 0, 0, .8); }
.nc-card > .kl-peek { --kl-w: 104px; --kl-top: calc(var(--kl-w) * -.3286); }
.nc-from { margin: 0 0 .35rem; font-size: .85rem; font-weight: 700; color: var(--accent); }
.nc-card h2 { margin: 0 0 .6rem; font-size: 1.55rem; line-height: 1.15; letter-spacing: -.01em; }
.nc-card h2:focus { outline: none; }
.nc-text { margin: 0 0 .5rem; line-height: 1.5; }
.nc-text b { font-weight: 700; }
.nc-q { margin: .9rem 0 .55rem; font-family: var(--head); font-size: 1.12rem; font-weight: 700; }
#ncName { width: 100%; box-sizing: border-box; min-height: 3.1rem; padding: 0 .95rem; font: inherit; font-size: 1.15rem; font-weight: 600; color: var(--ink);
  background: var(--tint); border: 2px solid var(--line); border-radius: 14px; }
#ncName:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.nc-ideas { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 0; }
.nc-idea { min-height: 2.3rem; padding: 0 .85rem; font: inherit; font-weight: 600; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 99px; cursor: pointer; }
.nc-idea:hover { border-color: var(--accent); }
.nc-err { min-height: 1.3rem; margin: .45rem 0 .2rem; font-size: .88rem; color: var(--danger); }
.nc-go { display: block; width: 100%; min-height: 3rem; border: 0; border-radius: 14px; font: inherit; font-size: 1.05rem; font-weight: 700;
  color: var(--accent-ink); background: var(--accent); cursor: pointer; }
.nc-skip { display: block; width: 100%; min-height: 2.6rem; margin-top: .35rem; border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.nc-go:disabled, .nc-skip:disabled { opacity: .6; cursor: default; }
.namecall.out { opacity: 0; transition: opacity .3s ease; }
@media (prefers-reduced-motion: no-preference) {
  .namecall { animation: kh-fade-in .35s ease both; }
  .nc-card { animation: nc-in .5s cubic-bezier(.2, .9, .25, 1.15) both .1s; }
}
@keyframes nc-in { from { opacity: 0; transform: translateY(18px) scale(.96); } }

/* Account: what the app calls you */
.callrow { display: flex; gap: .5rem; margin-top: .45rem; }
.callrow input { flex: 1 1 auto; width: auto; min-width: 0; }
.callrow .btn { flex: none; width: auto; padding-left: 1.2rem; padding-right: 1.2rem; }
.callform label { display: block; }
#callMsg .msg { margin: .6rem 0 0; }

/* Kilroy's clue after the tour: a speech bubble to the left of the Home Kilroy, its tail pointing at him */
.kl-hint { position: absolute; z-index: 3; top: -.9rem; right: calc(var(--gutter) + .35rem + 118px + 12px); max-width: min(15rem, calc(100% - 2 * var(--gutter) - 130px));
  padding: .6rem .8rem; font-size: .9rem; line-height: 1.35; color: var(--ink); background: var(--surface); border: 1.5px solid var(--brass, #E3A008);
  border-radius: 14px 14px 4px 14px; box-shadow: var(--lift, 0 10px 24px -12px rgba(0, 0, 0, .4)); pointer-events: none; }
.kl-hint::after { content: ''; position: absolute; right: -8px; top: 1.1rem; width: 12px; height: 12px; background: inherit;
  border-top: 1.5px solid var(--brass, #E3A008); border-right: 1.5px solid var(--brass, #E3A008); transform: rotate(45deg); }
.kl-hint b { display: block; font-family: var(--head); }
.kl-hint.out { opacity: 0; transition: opacity .3s ease; }
@media (prefers-reduced-motion: no-preference) {
  .kl-hint { animation: nc-in .45s cubic-bezier(.2, .9, .25, 1.15) both; transform-origin: right top; }
  .kl-nudge { animation: kl-nudge .5s ease-in-out 3; }
}
@keyframes kl-nudge { 50% { transform: translateY(-6px) rotate(-4deg); } }

/* ---- My tracker (Attendance > My tracker, and the Attended / Missed buttons on timetable cards) ----
   Three states per subject, in the colours the cadet already reads as good / careful / short: green (can miss the next X),
   brass yellow (don't miss the next one), red (attend the next X). */
.trk-intro { margin: .2rem 0 1rem; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.trk-intro b { color: var(--ink); }
.trk-empty { display: grid; gap: .25rem; padding: 1rem 1.05rem; border: 1px dashed var(--line); border-radius: var(--r-card); background: var(--surface); }
.trk-empty span { color: var(--muted); font-size: .9rem; }
.tcards { display: grid; gap: .75rem; }
@media (min-width: 760px) { .tcards { grid-template-columns: 1fr 1fr; align-items: start; } }
.tcard { padding: .95rem 1rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.tremove { font-size: .85rem; color: var(--muted); }
.trows { display: grid; gap: 1rem; }
.trow { --tc: var(--muted); --tsoft: var(--tint); }
.trow.green { --tc: var(--ok); --tsoft: var(--ok-soft); }
.trow.yellow { --tc: color-mix(in srgb, var(--signal) 70%, var(--ink)); --tsoft: var(--signal-soft); }
.trow.red { --tc: var(--danger); --tsoft: var(--danger-soft); }
.thead { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.tlabel { color: var(--muted); font-size: .88rem; font-weight: 600; }
.tpct { font-family: var(--head); font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; color: var(--tc); }
.trow .sfill { background: var(--tc); }
.tmsg { margin: .55rem 0 0; padding: .45rem .7rem; border-radius: 10px; background: var(--tsoft); color: var(--tc); font-weight: 700; font-size: .95rem; }
.trow.none .tmsg { font-weight: 500; }
.tnote { margin: .35rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.tbtns { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.tbtn { flex: 1 1 6.5rem; min-height: 2.6rem; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.tbtn[data-tap="1"] { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); color: var(--ok); }
.tbtn[data-tap="0"] { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); color: var(--danger); }
.tbtn.undo { flex: 0 1 auto; padding: 0 .9rem; color: var(--muted); font-weight: 600; }
.tbtn:disabled { opacity: .55; }
.thint { margin: .8rem 0 0; color: var(--muted); font-size: .85rem; }
.trk-add { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem; }
.trk-add button { display: grid; gap: .1rem; text-align: left; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.trk-add button b { color: var(--accent); }
.trk-add button small { color: var(--muted); font-size: .8rem; }
#trkMsg:not(:empty) { margin-top: .8rem; }

/* the Attended / Missed choice on a timetable card */
.trk { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .4rem; margin-top: .55rem; }
.trk button { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.1rem; padding: 0 .75rem; border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); color: var(--muted); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.trk button svg { width: .85rem; height: .85rem; }
.trk button[data-att="1"][aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.trk button[data-att="0"][aria-pressed="true"] { background: var(--danger); border-color: var(--danger); color: var(--danger-ink); }
.trk-k { color: var(--muted); font-size: .75rem; }
.trk-err { flex-basis: 100%; color: var(--danger); font-size: .8rem; }
.card2.now .trk button:not([aria-pressed="true"]) { background: transparent; border-color: var(--glass-line); color: var(--cream-2); }
.card2.now .trk-k { color: var(--cream-2); }

/* ===================== Cadet UI and navigation refinement, November 2026 =====================
   Keep the night-and-paper identity, but make Home easier to scan and every section one tap away.
   Motion is short, directional and shared across pages; reduced-motion users keep instant changes. */
.avatar { width: 2.75rem; height: 2.75rem; }
.band .icon-btn, .sheet-close { width: 2.75rem; height: 2.75rem; }
.paper .seg button { min-height: 2.75rem; }
.band .days button { min-height: 3.6rem; }
.acctmenu { transform-origin: top right; }
@media (prefers-reduced-motion: no-preference) {
  .acctmenu:not([hidden]) { animation: kh-menu-in .18s cubic-bezier(.2,.8,.2,1) both; }
  .avatar, .tabs a, .tabs a svg, .navcard .chev, .card2 .chev2 { transition: transform .18s ease, background-color .18s ease, color .18s ease; }
}
@keyframes kh-menu-in { from { opacity: 0; transform: translateY(-5px) scale(.97); } }

/* On larger screens Home can breathe without making the data-heavy pages uncomfortably wide. */
@media (min-width: 760px) { .band.home, .paper.home { --gutter: max(1.5rem, calc((100% - 62rem) / 2)); } }

/* Pointer feedback adds depth without making touch screens wait on hover. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .paper .cards .navcard:hover { background: var(--tint); }
  .paper .cards .navcard:hover .chev, .card2:hover .chev2 { transform: translateX(3px); }
  .card2 { transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
  .card2:hover { transform: translateY(-2px); box-shadow: var(--lift); }
}

/* Page hand-offs stay spatially continuous: a small directional slide, not a full-screen lift. */
.tab-in { animation: tab-in .26s cubic-bezier(.16,1,.3,1); }
@keyframes tab-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .24s; }
::view-transition-group(kl-band) { animation-duration: .38s; }
::view-transition-old(kl-paper-out) { animation: kh-page-out .18s ease both; }
::view-transition-new(kl-paper-in) { animation: kh-page-forward .34s cubic-bezier(.16,1,.3,1) both; }
html.kl-back::view-transition-old(kl-paper-out) { animation: kh-page-out-back .24s cubic-bezier(.4,0,.8,.4) both; }
html.kl-back::view-transition-new(kl-paper-in) { animation: kh-page-back .3s cubic-bezier(.16,1,.3,1) both; }
::view-transition-group(kl-title), ::view-transition-group(kl-fig) { animation-duration: .4s; }
::view-transition-new(kl-sheet) { animation-duration: .34s; }
::view-transition-old(kl-sheet) { animation-duration: .24s; }
@keyframes kh-page-forward { from { opacity: 0; transform: translateX(24px) scale(.985); } }
@keyframes kh-page-back { from { opacity: 0; transform: translateX(-20px) scale(.985); } }
@keyframes kh-page-out { to { opacity: 0; transform: translateX(-12px) scale(.99); } }
@keyframes kh-page-out-back { to { opacity: 0; transform: translateX(16px) scale(.99); } }

@media (prefers-reduced-motion: no-preference) {
  #out.day-next, #out.day-prev { animation-duration: .26s; }
  .sheet { transition-duration: .28s; }
  .sheet-bg { transition-duration: .22s; }
}
@keyframes kh-day-next { from { opacity: 0; transform: translateX(26px); } }
@keyframes kh-day-prev { from { opacity: 0; transform: translateX(-26px); } }
@media (prefers-reduced-motion: reduce) {
  .acctmenu, .tab-in { animation: none; }
  .band, .sky, .tabs a, .tabs a svg, .navcard .chev, .card2 .chev2 { transition: none; }
}

/* the SLO in a class's details: the title line, then the points as a short list */
.slo p { margin: 0; color: var(--ink); font-weight: 600; line-height: 1.4; }
.slo ul { margin: .35rem 0 0; padding-left: 1.15rem; line-height: 1.4; }
.slo li + li { margin-top: .2rem; }
.subd .slo { flex-basis: 100%; margin-top: .3rem; font-size: .9rem; }
.subd .slo ul { list-style: disc; padding-left: 1.15rem; margin-top: .25rem; }
.subd .slo li { display: list-item; border: 0; padding: 0; margin: 0; }
.subd .slo li + li { margin-top: .15rem; }

/* ===================== Paper, November 2026 =====================
   The band, Kilroy, Home and the "now" class stay as they were. Under the band, each page is one quiet sheet rather than a
   stack of boxes: the day hangs on a time spine with the free time between classes, the bill is a mess chit, attendance is a
   ruled ledger, and settings fold away until they are needed. Same tokens, fonts and radii as before. */

/* ---- view switches (Mine / Roll-wise, Office report / My tracker): a small pill, not a full-width bar ---- */
.paper .seg { display: inline-grid; grid-auto-flow: column; grid-template-columns: none; width: auto; margin: 0; padding: 3px; gap: 2px;
  border-radius: 99px; background: var(--tint); }
.paper .seg button { min-height: 2.5rem; padding: 0 .95rem; border-radius: 99px; font-size: .86rem; white-space: nowrap; }
.paper .seg button[aria-pressed="true"] { box-shadow: 0 1px 2px rgba(18, 33, 30, .12), 0 0 0 1px var(--line); }

/* ---- the day heading carries the switch on its right ---- */
.paper .head { margin: .1rem 0 .7rem; }
.paper .head:has(> div) { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; }   /* the cadet day heading with its switch; other pages keep a plain heading */
.paper .head > div:first-child { min-width: 0; }
.paper .head h2 { line-height: 1.05; }
.paper .head p { margin-top: .2rem; font-size: .9rem; }
.paper .head .seg { flex: none; margin-bottom: .05rem; }
.paper .movednote { margin: 0 0 .9rem; }
/* a note about the programme: a quiet line with a brass rule, not a dashed box */
.paper .notice { margin: .1rem 0 .9rem; padding: .05rem 0 .05rem .8rem; border: 0; border-left: 2px solid var(--signal); border-radius: 0; background: none;
  font-size: .84rem; line-height: 1.45; }

/* ---- the time spine: times on the paper, a rail with a node per class, and the class itself to the right of it ---- */
.spine { --tcol: 3.6rem; --rail: calc(var(--tcol) + .85rem); position: relative; }
.spine::before { content: ""; position: absolute; top: .9rem; bottom: .9rem; left: var(--rail); width: 2px; margin-left: -1px; border-radius: 2px; background: var(--line); }
.spine .card2 { grid-template-columns: var(--tcol) 1fr auto; column-gap: 1.5rem; align-items: start; margin-top: .55rem; padding: .85rem .8rem .85rem 0;
  background: none; border: 0; border-radius: 0; box-shadow: none; isolation: isolate; }
.spine .card2:first-child { margin-top: 0; }
.spine .card2::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; right: 0; left: calc(var(--rail) + .65rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: inset 3px 0 0 var(--other); }
.spine .card2.lecture::before { box-shadow: inset 3px 0 0 var(--lecture); }
.spine .card2.practical::before { box-shadow: inset 3px 0 0 var(--practical); }
.spine .card2.ia::before { border-color: var(--danger); box-shadow: inset 3px 0 0 var(--danger); }
.spine .card2.now { background: none; border: 0; outline: 0; box-shadow: none; }
.spine .card2.now::before { background: var(--night); border-color: var(--night); box-shadow: 0 16px 30px -18px rgba(6, 36, 32, .8); }
.spine .card2.now .t b { color: var(--ink); }
.spine .card2.now .t span { color: var(--muted); }
.spine .card2 .t { position: relative; align-items: flex-end; text-align: right; padding-top: .05rem; }
.spine .card2 .t b { font-size: 1.12rem; }
.spine .card2 .t span { font-size: .8rem; }
/* the node on the rail, in the colour of the kind of class; brass and ringed for the one on now */
.spine .card2 .t::after { content: ""; position: absolute; top: .5rem; right: calc(-.85rem - 5px); width: 10px; height: 10px; border-radius: 50%;
  background: var(--other); box-shadow: 0 0 0 3px var(--bg); }
.spine .card2.lecture .t::after { background: var(--lecture); }
.spine .card2.practical .t::after { background: var(--practical); }
.spine .card2.ia .t::after { background: var(--danger); }
.spine .card2.past .t::after { background: var(--bg); box-shadow: 0 0 0 2px var(--line), 0 0 0 4px var(--bg); }
.spine .card2.now .t::after { background: var(--brass); box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px color-mix(in srgb, var(--brass) 35%, transparent); }
.spine .card2 > div:not(.t) { min-width: 0; padding-left: .95rem; }
.spine .card2 .chev2 { align-self: center; }
@media (prefers-reduced-motion: no-preference) {
  .spine .card2:hover { transform: none; box-shadow: none; }
  .spine .card2:hover::before { box-shadow: inset 3px 0 0 var(--other), var(--lift); }
  .spine .card2.lecture:hover::before { box-shadow: inset 3px 0 0 var(--lecture), var(--lift); }
  .spine .card2.practical:hover::before { box-shadow: inset 3px 0 0 var(--practical), var(--lift); }
  .spine .card2.now .t::after { animation: kh-node 2.4s ease-in-out infinite; }
  @keyframes kh-node { 50% { box-shadow: 0 0 0 3px var(--bg), 0 0 0 9px color-mix(in srgb, var(--brass) 12%, transparent); } }
}
/* free time between two classes, written on the spine */
.spine .gap { position: relative; margin: .55rem 0 0 calc(var(--rail) + 1.6rem); color: var(--muted); font-size: .8rem; line-height: 1.3; }
.spine .gap::before { content: ""; position: absolute; left: calc(-1.6rem - 1px); top: -.55rem; bottom: -.55rem; width: 2px; background: var(--bg);
  background-image: linear-gradient(var(--line) 50%, transparent 0); background-size: 2px 6px; }
.spine .gap.past { opacity: .6; }
.spine .gap.freenow { color: var(--signal-text); font-weight: 700; }
@media (prefers-color-scheme: light) { .spine .gap.freenow { color: color-mix(in srgb, var(--signal) 55%, var(--ink)); } }
.spine .gap.freenow::after { content: ""; position: absolute; left: calc(-1.6rem - 5px); top: .25rem; width: 10px; height: 10px; border-radius: 50%;
  background: var(--brass); box-shadow: 0 0 0 3px var(--bg); }

/* ---- roll-wise: the slot time sits on the left like the spine, your row lit ---- */
.paper .slot { margin-top: .9rem; }
.paper .slot:first-of-type { margin-top: 0; }
.paper .slot h3 { margin-bottom: .4rem; font-size: .95rem; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.paper .slot ul { box-shadow: none; }
.paper .slot li { padding: .7rem .9rem; }

/* ---- add to calendar: a plain action under the day, not a second big button ---- */
.paper .calbtn { display: inline-flex; align-items: center; gap: .5rem; width: auto; min-height: 2.75rem; margin: 1rem 0 0; padding: 0 .2rem;
  border: 0; border-radius: 10px; background: none; font-size: .92rem; }
.paper .calbtn svg { width: 1.05rem; height: 1.05rem; }
.paper .calbtn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- the class sheet: a title, the time and batch as two figures, then ruled rows ---- */
.sheet .sheet-sub { margin: .2rem 2rem .9rem 0; color: var(--muted); font-size: .92rem; }
.sheet .tiles { gap: 0; border-top: 1px solid var(--line); }
.sheet .tile { padding: .75rem 0; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.sheet .tiles > .tile:nth-child(2):not(.wide) { padding-left: 1rem; border-left: 1px solid var(--line); }
.sheet .tiles > .tile:nth-child(-n+2):not(.wide) .tv { font-family: var(--head); font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sheet .tile:last-child { border-bottom: 0; }
.sheet .tl { margin-bottom: .2rem; font-size: .78rem; font-weight: 600; }

/* ---- mess bill: one mess chit, the charges with dotted leaders, the grand total under a double rule ---- */
.chit { --s: 7px; position: relative; margin: 0 0 1rem; padding: 1.05rem 1.1rem calc(1.3rem + var(--s)); background: var(--surface);
  border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-card) var(--r-card) 0 0;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--s)) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--s)) 100%; }
.chit-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; padding-bottom: .75rem; border-bottom: 1px dashed var(--line); }
.paper .chit .who { margin: 0; font-size: 1.05rem; }
.chit-head span { flex: none; color: var(--muted); font-size: .85rem; }
.paper .chit .billgroup { margin: 0; }
.paper .chit .billgroup h4 { margin: .95rem 0 .25rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.paper .chit .billtbl { background: none; border: 0; border-radius: 0; overflow: visible; }
.chit .billtbl td { padding: .32rem 0; border: 0; }
.chit .billtbl td:first-child { width: 100%; background-image: radial-gradient(circle, color-mix(in srgb, var(--muted) 55%, transparent) .9px, transparent 1.2px);
  background-size: 6px 6px; background-repeat: repeat-x; background-position: 0 calc(100% - .62rem); }
.chit .billtbl td:first-child span { padding-right: .45rem; background: var(--surface); }
.chit .billtbl td:last-child { padding-left: .45rem; white-space: nowrap; }
.chit .billtbl tr.tot td { padding-top: .45rem; background: none; border-top: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.chit .billtbl tr.tot td:last-child { color: var(--ink); font-weight: 700; }
.chit .empty.small { padding: .2rem 0; font-size: .9rem; }
.paper .chit .grandtotal { align-items: baseline; margin: 1.1rem 0 0; padding: .7rem 0 0; background: none; color: var(--ink); border-top: 3px double var(--ink);
  border-radius: 0; box-shadow: none; }
.paper .chit .grandtotal span { font-weight: 700; }
.paper .chit .grandtotal b { font-family: var(--head); font-size: 1.85rem; font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.chit-note { margin: 0 .2rem; }

/* ---- attendance: one ruled ledger, a row per subject, theory and practical side by side ---- */
.paper .motiv { align-items: center; padding: .75rem .9rem; border: 0; border-radius: 14px; font-size: .93rem; line-height: 1.4; }
.paper .motiv .micon svg { display: block; width: 1.15rem; height: 1.15rem; }
.sechead-row { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin: 1.35rem 0 .55rem; }
.sechead-row .sechead { margin: 0; }
.sechead-row .hint { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paper .subjs { gap: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--lift); }
.paper .subj { padding: .8rem 1rem .9rem; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.paper .subj:first-child { border-top: 0; }
.paper .subj.warn { background: linear-gradient(90deg, var(--warn-soft), transparent 70%); box-shadow: inset 3px 0 0 var(--warn); }
.paper .subj .stitle { margin-bottom: .45rem; }
.paper .subj .stitle h4 { font-size: 1rem; }
.paper .subj .badge { display: inline-flex; align-items: center; gap: .25rem; padding: 0; background: none; font-size: .8rem; }
.paper .subj .badge svg { width: .85rem; height: .85rem; }
.paper .subj .srows { grid-template-columns: 1fr 1fr; gap: .3rem 1.3rem; }
.paper .subj .shead { display: flex; align-items: baseline; gap: .35rem; }
.paper .subj .slabel { color: var(--muted); font-size: .8rem; }
.paper .subj .sfrac { margin-left: auto; color: var(--muted); font-size: .74rem; }
.paper .subj .spct { font-family: var(--head); font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; }
.paper .subj .sbar { height: .32rem; margin-top: .3rem; }
.paper .subj .snote { margin: .3rem 0 0; font-size: .76rem; color: var(--warn); }
@media (min-width: 760px) {
  .paper .subjs { grid-template-columns: 1fr 1fr; }
  .paper .subj:nth-child(2) { border-top: 0; }
  .paper .subj:nth-child(even) { border-left: 1px solid var(--line); }
}

/* ---- my tracker: the same ledger, and subjects to add as small pills ---- */
.paper .trk-intro { margin: .9rem 0 .9rem; font-size: .85rem; }
.paper .tcards { gap: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--lift); }
.paper .tcard { padding: .85rem 1rem .95rem; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.paper .tcard:first-child { border-top: 0; }
@media (min-width: 760px) { .paper .tcards { grid-template-columns: 1fr; } }
.paper .trk-empty { padding: .9rem 1rem; border-style: solid; }
.paper .trk-add { display: flex; flex-wrap: wrap; gap: .45rem; }
.paper .trk-add button { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.6rem; padding: 0 .9rem 0 .75rem; border-radius: 99px; }
.paper .trk-add button::before, .trk-legend span::before { content: ""; flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); }
.paper .trk-add button.manual::before, .trk-legend .manual::before { background: var(--practical); }
.paper .trk-add button b { font-weight: 700; }
.trk-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .7rem 0 0; color: var(--muted); font-size: .78rem; }
.trk-legend span { display: inline-flex; align-items: center; gap: .4rem; }

/* ---- account: ruled details, and the password form folded away ---- */
.paper .kv { gap: 0 .9rem; }
.paper .kv dt, .paper .kv dd { padding: .5rem 0; border-top: 1px solid var(--line); }
.paper .kv dt:first-of-type, .paper .kv dt:first-of-type + dd { border-top: 0; padding-top: .1rem; }
.paper .card.fold { padding: 0 1.1rem; }
.fold > summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 3.6rem; cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h3 { margin: 0; font-size: 1.15rem; }
.fold > summary svg { width: 1.1rem; height: 1.1rem; color: var(--muted); }
.fold[open] > summary svg { transform: rotate(90deg); }
@media (prefers-reduced-motion: no-preference) { .fold > summary svg { transition: transform .2s ease; } }
.fold > summary:focus-visible { outline-offset: 4px; border-radius: 8px; }
.foldbody { padding: 0 0 1.1rem; }
.foldbody > span:first-child:empty { display: none; }
.foldbody .sub { margin: 0 0 .9rem; color: var(--muted); font-size: .9rem; }
.paper .signout { margin: 1.2rem 0 0; }
.paper .signout .btn { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }

@media (max-width: 359px) {
  .spine { --tcol: 3.2rem; }
  .paper .seg button { padding: 0 .7rem; }
  .paper .head h2 { font-size: 1.45rem; }
}
.paper .tourline { margin: .9rem 0 0; }
.paper .tourline .linklike { min-height: 2.5rem; padding: 0; font-weight: 600; color: var(--accent); }

/* ---- accessibility, 4 Nov 2026 ----
   A class card (and a roll-wise row) is a plain block with a real button on its subject: screen readers read the whole
   card, the Attended / Missed buttons inside it are reachable, and the focus ring is drawn round the whole card.
   Past classes are dimmed with the muted colour instead of see-through text, so they still read at 4.5:1. */
.card2 h3 .open, .slot .what .open { display: inline; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.card2 h3 .open::after, .slot .what .open::after { content: ""; position: absolute; inset: 0; }   /* the whole card is the tap area */
.card2 h3 .open:focus-visible, .slot .what .open:focus-visible { outline: none; }
.card2:has(.open:focus-visible) { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 16px; }
.spine .card2:has(.open:focus-visible) { outline: 0; }
.spine .card2:has(.open:focus-visible)::before { outline: 3px solid var(--signal); outline-offset: 2px; }
.slot li:has(.open:focus-visible) { outline: 3px solid var(--signal); outline-offset: -3px; }
@supports not selector(:has(*)) { .card2 h3 .open:focus-visible, .slot .what .open:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; } }
.slot li { position: relative; }
.card2 .trk, .card2 .trk button { position: relative; z-index: 1; }   /* Attended / Missed stay tappable above the card's tap area */
#view .card2 .open:active, #view .slot .open:active { transform: none; }
.card2.past, .slot li.past { opacity: 1; }
.card2.past h3, .card2.past .t b, .card2.past .topic { color: var(--muted); }
.spine .card2.past::before { background: color-mix(in srgb, var(--surface) 45%, var(--bg)); }
.slot li.past .rolls, .slot li.past .what b { color: var(--muted); }
.spine .gap.past { opacity: 1; }
.stitle h3 { margin: 0; font-size: 1.08rem; letter-spacing: -.015em; }

/* ---- "A new version is ready": a small night bar at the foot of the screen ---- */
.updbar { position: fixed; z-index: 30; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: .5rem; width: max-content; max-width: calc(100% - 2rem); padding: .45rem .45rem .45rem 1rem;
  background: var(--night); color: var(--cream); border: 1px solid var(--glass-line); border-radius: 99px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6);
  font-size: .9rem; line-height: 1.3; }
.updbar span { min-width: 0; }
.updbar button { flex: none; min-height: 2.5rem; padding: 0 1rem; border: 0; border-radius: 99px; background: var(--brass); color: #231A00; font: inherit; font-weight: 700; cursor: pointer; }
.updbar button.later { padding: 0 .7rem; background: none; color: var(--cream-2); font-weight: 600; }
.updbar button:disabled { opacity: .8; cursor: progress; }
@media (prefers-reduced-motion: no-preference) { .updbar { animation: kh-upd .35s cubic-bezier(.2, .8, .2, 1) both; } @keyframes kh-upd { from { opacity: 0; transform: translate(-50%, 1rem); } } }
@media (max-width: 400px) { .updbar { left: 1rem; right: 1rem; width: auto; transform: none; } .updbar span { flex: 1; }
  @media (prefers-reduced-motion: no-preference) { @keyframes kh-upd { from { opacity: 0; transform: translateY(1rem); } } } }
.approw { display: flex; align-items: center; justify-content: space-between; gap: .9rem; }
.approw h3 { margin: 0 0 .1rem; }
.approw .hint { margin: 0; }
.approw .btn { width: auto; flex: none; padding: 0 1rem; }
#updMsg:not(:empty) { margin-top: .75rem; }
#updMsg .msg { margin: 0; }
.upd-ok { margin: 0; }
.upd-ok .linklike { min-height: 2.25rem; }

/* ---- design critique fixes, 4 Nov 2026 ---- */
/* 3. "Clear" is quiet, so only a subject that needs classes catches the eye */
.paper .subj .badge.ok { color: var(--muted); font-weight: 500; font-size: .8rem; }
.paper .subj .badge.ok svg { color: var(--muted); width: .8rem; height: .8rem; }
.paper .subj:not(.warn) .stitle h4 { font-weight: 700; }
.paper .subj .badge.warn { font-weight: 700; }

/* 2. the tracker in the ledger style: the advice as a coloured line, small + / − pills, a quiet Remove */
.paper .tcard .stitle { margin-bottom: .55rem; }
.paper .tremove { min-height: 2.25rem; padding: 0 .1rem; color: var(--muted); font-size: .82rem; font-weight: 600; text-decoration: none; }
.paper .tremove:hover { color: var(--danger); }
.paper .trows { gap: .95rem; }
.paper .trow .thead { align-items: baseline; }
.paper .trow .tlabel { font-size: .8rem; }
.paper .trow .tpct { font-size: 1.1rem; }
.paper .trow .sbar { height: .32rem; margin-top: .3rem; }
.paper .tmsg { display: flex; align-items: center; gap: .45rem; margin: .5rem 0 0; padding: 0; background: none; border-radius: 0; font-size: .9rem; }
.paper .tmsg::before { content: ""; flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--tc); }
.paper .tnote { margin-top: .15rem; padding-left: .95rem; }
.paper .tbtns { gap: .4rem; margin-top: .55rem; padding-left: .95rem; }
.paper .tbtn { flex: 0 0 auto; min-height: 2.5rem; padding: 0 .95rem; border-radius: 99px; font-size: .88rem; }
.paper .tbtn.undo { border-color: transparent; background: none; padding: 0 .5rem; }
.paper .thint { margin-top: .75rem; font-size: .82rem; }

/* 5. one label style, and nothing smaller than .8rem (12.8px) */
.sheet .tl, .paper .chit .billgroup h4, .paper .subj .slabel, .paper .trow .tlabel { font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.paper .subj .sfrac, .trk-legend, .paper .subj .snote { font-size: .8rem; }
.spine .gap { font-size: .82rem; }

/* ---------- Motion, November 2026 ----------
   Two springs for the whole app (the same curves are EASE.soft / EASE.pop in cadet.js):
   soft settles in ~440 ms with no overshoot; pop takes ~540 ms and overshoots 7%. */
:root { --sp-soft: cubic-bezier(.2, .8, .2, 1); --sp-pop: cubic-bezier(.34, 1.3, .64, 1); }
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --sp-soft: linear(0, 0.0212, 0.074, 0.1458, 0.2273, 0.312, 0.3955, 0.4749, 0.5484, 0.6151, 0.6746, 0.727, 0.7726, 0.8119, 0.8454, 0.8738, 0.8977, 0.9176, 0.934, 0.9476, 0.9586, 0.9676, 0.9749, 0.9807, 0.9853, 0.989, 0.9918, 0.994, 0.9958, 0.9971, 0.998, 0.9988, 1);
    --sp-pop: linear(0, 0.0462, 0.1589, 0.3057, 0.4622, 0.6116, 0.7434, 0.8523, 0.9367, 0.9976, 1.038, 1.0612, 1.0712, 1.0716, 1.0658, 1.0562, 1.0451, 1.0338, 1.0235, 1.0147, 1.0077, 1.0023, 0.9987, 0.9963, 0.9951, 0.9948, 0.995, 0.9955, 0.9963, 0.9971, 0.9979, 0.9986, 1);
  }
}

/* The selected day, and the selected side of a switch, is a pill drawn by ::before, so it can slide from one to the next */
.band .days button, .seg button { position: relative; isolation: isolate; }
.band .days button[aria-pressed="true"] { background: transparent; border-color: transparent; box-shadow: none; }
.band .days button[aria-pressed="true"].today { box-shadow: inset 0 0 0 2px var(--brass); }
.band .days button[aria-pressed="true"]::before { content: ""; position: absolute; z-index: -1; inset: -1px; border-radius: inherit; background: var(--cream);
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .6); transform-origin: left center; }
.seg button[aria-pressed="true"], .paper .seg button[aria-pressed="true"] { background: transparent; box-shadow: none; }
.seg button[aria-pressed="true"]::before { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: var(--surface);
  box-shadow: var(--shadow); transform-origin: left center; }
.paper .seg button[aria-pressed="true"]::before { box-shadow: 0 1px 2px rgba(18, 33, 30, .12), 0 0 0 1px var(--line); }

@media (prefers-reduced-motion: no-preference) {
  /* pressing: in quickly, out on a spring (Home's links keep their own quiet press) */
  .card2, .slot li, .iitem, .band .days button, .seg button, .btn, .calbtn, .icon-btn, .tbtn, .trk-add button {
    transition: transform .52s var(--sp-pop), background-color .15s ease, color .15s ease; }
  #view :is(.card2, .slot li, .iitem):active,
  #view :is(.band .days button, .seg button, .btn, .calbtn, .icon-btn, .tbtn, .trk-add button):active:not([disabled]) {
    transform: scale(.965); transition-duration: .1s; transition-timing-function: ease-out; }
  #view .spine .card2:active { transform: scale(.975); transform-origin: 60% 50%; }

  /* a day coming in: from the side it is on, overshooting a touch; further out when it was swiped */
  #out.day-next, #out.day-prev { animation: kh-day-in .54s var(--sp-pop) both; }
  #out.day-next { --dsign: 1; }
  #out.day-prev { --dsign: -1; }
  @keyframes kh-day-in { from { opacity: 0; transform: translateX(calc(var(--dsign, 1) * var(--din, 34px))); } 40% { opacity: 1; } }

  /* arriving on the timetable: the spine draws down, each class follows it in, its node pops onto the rail */
  .paper.enter .spine::before { transform-origin: top; animation: kh-rail .62s var(--sp-soft) both; }
  @keyframes kh-rail { from { transform: scaleY(0); } }
  .paper.enter .spine > *, .paper.enter .slot > ul > li { animation: kh-row-in .5s var(--sp-soft) both; animation-delay: calc(var(--i, 0) * 45ms + 70ms); }
  @keyframes kh-row-in { from { opacity: 0; transform: translateX(16px); } }
  .paper.enter .spine .card2 .t::after { animation: kh-node-in .54s var(--sp-pop) both; animation-delay: calc(var(--i, 0) * 45ms + 140ms); }
  @keyframes kh-node-in { from { transform: scale(0); } }

  /* arriving on the mess bill: the chit feeds out from under the band, torn edge first */
  .paper.enter .chit { animation: kh-feed .68s var(--sp-soft) .06s both; }
  @keyframes kh-feed { from { transform: translateY(-100%); clip-path: inset(100% -20px -20px -20px); } to { transform: none; clip-path: inset(0 -20px -20px -20px); } }

  /* arriving on attendance: each bar fills to its figure */
  .paper.enter .sbar .sfill { animation: kh-fill .7s var(--sp-soft) both; animation-delay: calc(var(--i, 0) * 40ms + 120ms); }
  @keyframes kh-fill { from { width: 0; } }
}
