@font-face {
  font-family: "Work Sans";
  src: url("/work-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  font-family: "Work Sans", system-ui, sans-serif;
  --canvas: #131411;
  --surface: #1b1c18;
  --line: #3c3d35;
  --muted: #babcb1;
  --ink: #f6f5ee;
  --focus: #f8dcb8;
  --measure: 1080px;
  --gutter: clamp(20px, 4vw, 52px);
}

.mast { display: block; min-height: 0; padding: 0; }
.mast-inner { max-width: var(--measure); margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; gap: 18px; }
.school-link { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.school-link > span:last-child { min-width: 0; }
.mast .mark { width: 42px; height: 42px; border-radius: 6px; font: 650 1.1rem/1 "Work Sans", system-ui, sans-serif; letter-spacing: -.05em; }
.mast .mark:has(img) { border: 0; }
.mast strong { font-size: 1.07rem; font-weight: 670; letter-spacing: -.038em; }
#place { display: block; font-size: .79rem; line-height: 1.25; margin-top: 3px; overflow-wrap: anywhere; }
#place:empty { display: none; }
.mast button { min-height: 44px; padding: 4px 0 4px 12px; border: none; border-radius: 0; font-size: .85rem; }
.mast button:hover { text-decoration: underline; }
/* Header actions: the academy bell (#inbox) and the account page (#settings). */
.mast-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.mast-icon { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; color: inherit; }
.mast-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mast-icon[aria-current] { background: var(--surface); }
.mast-count { position: absolute; top: 3px; right: 1px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-size: .7rem; font-weight: 700; line-height: 19px; text-align: center; }
/* One tap per child instead of a dropdown when the family has two to four people. */
.student-switch { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; }
.student-switch button { flex: 1 0 auto; min-height: 44px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; }
.student-switch button[aria-pressed="true"] { background: var(--canvas); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.chat-guard { margin: 0 0 24px; padding: 12px 14px; border-left: 3px solid var(--brand); background: var(--surface); font-size: .88rem; line-height: 1.45; }
#settings #logout { min-height: 44px; }
.alert-settings { margin-top: 40px; }
.alert-settings h2 { margin-bottom: 4px; }
#competition-inbox .empty { margin: 0 0 12px; }
main { max-width: var(--measure); padding: 0 var(--gutter) 64px; }
#message:empty { display: none; }
.member-nav { gap: 30px; margin: 0; }
.member-nav a { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 58px; font-size: .875rem; font-weight: 570; }
.member-nav a:hover, .row-link:hover, .text-link:hover { color: var(--ink); }
.member-nav a[aria-current] { border-color: var(--ink); }
.member-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.member-page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 15px; padding: clamp(28px, 5vw, 64px) 0 clamp(24px, 3.7vw, 44px); }
#page-date { font-size: .85rem; color: var(--muted); font-weight: 480; margin: 0 0 5px; }
#page-title { margin: 0; font-size: clamp(2.8rem, 6vw, 4.6rem); line-height: .99; font-weight: 540; letter-spacing: -.075em; }
#page-title:focus:not(:focus-visible) { outline: none; }
#student-context { min-width: 0; max-width: 100%; display: flex; align-items: center; gap: 10px; }
#student-context > div { min-width: 0; }
.student-avatar { flex: none; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 50%; width: 42px; height: 42px; font-size: .86rem; font-weight: 600; }
#student-caption { font-size: .74rem; }
#students { max-width: min(100%, 240px); min-height: 44px; padding: .35rem .4rem; }
#single-student { display: block; font-size: .94rem; font-weight: 580; overflow-wrap: anywhere; }
h2 { font-size: 1.12rem; font-weight: 600; letter-spacing: -.035em; line-height: 1.25; }
h3 { overflow-wrap: anywhere; }
.home-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: 34px clamp(28px, 4.6vw, 60px); }
.home-layout > section { min-width: 0; }
.home-family-classes { margin-block: 1.3rem; }
.home-family-classes .row-link { padding-block: .45rem; }
.home-family-classes .row-link strong, .home-family-classes .row-link small { display: block; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; }
.section-head h2 { margin: 0; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-size: .83rem; font-weight: 550; min-height: 44px; text-decoration: none; }
.text-link:hover, .ticket-action:hover, .update-row:hover strong { text-decoration: underline; text-underline-offset: 4px; }
/* The ticket is always cream, so its ink is fixed rather than following the light or dark theme. */
.class-ticket { background: #f0ede2; color: #171714; border-radius: 10px; overflow: hidden; position: relative; }
.ticket-header { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding: 18px clamp(20px, 3vw, 32px) 0; font-size: .85rem; font-weight: 570; }
.ticket-status { padding: 4px 8px; border: 1px solid #b5b6a7; border-radius: 4px; font-size: .72rem; line-height: 1.2; }
.ticket-body { padding: clamp(26px, 3.4vw, 42px) clamp(20px, 3vw, 32px) 24px; }
.ticket-body h3 { font-size: clamp(1.75rem, 4vw, 2.9rem); letter-spacing: -.064em; font-weight: 570; line-height: 1.05; margin: 0 0 13px; }
.ticket-time { font-size: 1.1rem; font-variant-numeric: tabular-nums; font-weight: 575; }
.ticket-location { margin-top: 3px; color: #505249; font-size: .89rem; }
.ticket-footer { border-top: 1px dashed #b5b6a7; position: relative; padding: 0 clamp(20px, 3vw, 32px); }
.ticket-footer::before, .ticket-footer::after { content: ""; position: absolute; top: -6px; background: var(--canvas); width: 11px; height: 11px; border-radius: 50%; }
.ticket-footer::before { left: -6px; }
.ticket-footer::after { right: -6px; }
.ticket-action { display: flex; justify-content: space-between; align-items: center; min-height: 54px; color: inherit; text-decoration: none; font-size: .9rem; font-weight: 620; }
.ticket-action span, .row-arrow { font-size: 1.12rem; }
.ticket-action:focus-visible { outline-color: #373d29; outline-offset: -3px; }
#home-updates { border-top: 1px solid var(--line); }
.update-row, .update-fallback { min-height: 73px; border-bottom: 1px solid var(--line); padding: 13px 0; display: flex; align-items: center; gap: 16px; justify-content: space-between; text-decoration: none; }
.update-row strong, .update-row small { display: block; overflow-wrap: anywhere; }
.update-row small { font-size: .76rem; margin-bottom: 3px; line-height: 1.3; }
.update-row strong { font-size: 1rem; font-weight: 540; letter-spacing: -.025em; }
.row-arrow { color: var(--muted); }
.training-stats { margin: 0; padding: 18px 0; display: flex; flex-wrap: wrap; gap: 24px clamp(20px, 4vw, 48px); border-block: 1px solid var(--line); }
.training-stats dt { color: var(--muted); font-size: .77rem; }
.training-stats dd { margin: 4px 0 0; font-size: 1.2rem; font-weight: 550; letter-spacing: -.045em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.training-stats > div:first-child dd { font-size: 1.85rem; line-height: 1.1; }
.quiet-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.quiet-card p { color: var(--muted); font-size: .94rem; }
.quiet-card h3 + p { margin-top: 8px; }
.quiet-card :is(button, a) { margin-top: 12px; }
.loading, .empty { padding: 16px 0; font-size: .9rem; color: var(--muted); }
.schedule-layout { gap: 28px clamp(30px, 4.5vw, 60px); }
.schedule-layout > section { border: 0; padding: 0; }
.schedule-layout h2 { padding-bottom: 14px; margin: 0; border-bottom: 1px solid var(--line); }
.record { padding: 18px 0; scroll-margin: 16px; }
.record h3 { font-size: 1.1rem; letter-spacing: -.035em; }
.record p, .record small { font-size: .875rem; }
.record details { margin: 5px 0 0; }
.record .notice-body { white-space: pre-wrap; }
#tuition .payment-followup {padding-inline-start:1rem;border-inline-start:2px solid var(--brand)}
#tuition .payer-invoice-summary {display:flex;align-items:baseline;flex-wrap:wrap;gap:.15rem .75rem;margin:.4rem 0;color:var(--muted)}
.payer-invoice-summary strong {font-size:1.4rem;font-weight:640;letter-spacing:-.04em;color:var(--ink);font-variant-numeric:tabular-nums}
.payer-invoice-actions {display:flex;align-items:center;flex-wrap:wrap;gap:0 1rem;margin-top:.5rem}
.payer-invoice-actions button {min-height:44px}
.payer-invoice-actions .row-link {min-height:44px;border:0;text-decoration:underline;text-underline-offset:.2em}
.payment-tools {margin-top:.35rem}
.payment-tools summary {cursor:pointer;min-height:44px;padding:.8rem 0;color:var(--ink)}
#tuition [data-monthly-payment]>strong {display:block;margin:.5rem 0 .15rem;font-size:.95rem}
#tuition .monthly-receipts {margin:1.35rem 0 .65rem}
#tuition .monthly-receipts>h3 {margin:0 0 .4rem;font-size:1rem}
#tuition .monthly-receipt {border-block-start:1px solid var(--line);overflow-wrap:anywhere}
#tuition .monthly-receipt summary {min-height:44px;padding:.7rem 0;cursor:pointer;font-size:.93rem}
#tuition .monthly-receipt summary span {display:block;color:var(--muted);font-size:.84rem;margin:.1rem 0 0}
#tuition .monthly-receipt p {font-size:.85rem;margin:.3rem 0}
#tuition [data-monthly-refresh] {margin:.6rem 0}
.record input:not([type=checkbox]), .record select { width: 100%; }
.record form button { justify-self: start; }
.row-link { font-size: .93rem; }
button:not(#logout), .action { font-size: .9rem; }
.record button:not(.secondary), .action { background: var(--brand); color: var(--brand-ink); }
.action { gap: 16px; }
.update-fallback { color: var(--muted); }
.update-fallback button { flex: none; }
@media (max-width: 700px) {
  :root { --gutter: 20px; }
  main { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  .mast-inner { padding-block: 10px; }
  .mast strong { font-size: 1rem; }
  .member-nav { position: fixed; z-index: 3; inset: auto 0 0; margin: 0; background: var(--canvas); border: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .member-nav a { min-height: 59px; display: flex; flex-direction: column; gap: 3px; font-size: .72rem; border: 0; border-top: 2px solid transparent; }
  .member-nav a[aria-current] { border-color: var(--brand); color: var(--ink); font-weight: 680; background: var(--surface); }
  .member-nav a:focus-visible { outline-offset: -4px; }
  .member-page-head { align-items: center; gap: 16px; padding: 28px 0 18px; }
  #page-date { font-size: .78rem; }
  #page-title { font-size: 2.8rem; }
  #student-context { gap: 7px; width: 100%; flex-wrap: wrap; }
  #student-context:has(#student-switch:not([hidden])) > div:first-of-type { width: 100%; }
  .student-switch { width: 100%; }
  .student-switch button { flex: 1 1 0; padding: 0 8px; }
  .student-avatar { width: 33px; height: 33px; font-size: .75rem; }
  #students { max-width: 45vw; font-size: 1rem; }
  #single-student { max-width: 38vw; font-size: .86rem; }
  .home-layout, .schedule-layout { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .section-head { min-height: 44px; }
  .ticket-body { padding-top: 27px; padding-bottom: 20px; }
  .ticket-body h3 { font-size: 2rem; }
  .ticket-action { min-height: 50px; }
  .training-stats { padding-block: 14px; }
  .record { scroll-margin-block: 20px 82px; }
}
@media (max-width: 365px) {
  :root { --gutter: 16px; }
  .student-avatar { display: none; }
}
#message button { margin-inline-start: .75rem; }
.family-calendar { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(230px, 1fr); align-items: start; gap: clamp(24px, 5vw, 72px); }
.family-calendar h2 { margin: 0 0 18px; font-size: 1.2rem; font-weight: 570; letter-spacing: -.03em; }
.family-agenda .family-day { margin: 24px 0 0; padding: 0 0 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .85rem; font-weight: 530; }
.family-booking, .family-person { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 68px; padding: 12px 3px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); text-align: left; }
.family-booking:hover, .family-person:hover { background: var(--surface); }
.family-booking time { flex: 0 0 6.4rem; font-size: .83rem; font-weight: 530; font-variant-numeric: tabular-nums; }
.family-booking strong, .family-person strong { display: block; font-size: 1rem; font-weight: 560; }
.family-calendar button small { display: block; margin-top: 3px; font-size: .8rem; color: var(--muted); font-weight: 400; }
.family-calendar button > span:last-child { margin-left: auto; }
.family-students h2 { padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
@media (max-width: 700px) {
  .family-calendar { grid-template-columns: 1fr; gap: 35px; }
  .family-booking { gap: 10px; }
  .family-booking time { flex-basis: 5.4rem; }
}

.nearby-check-in {
  margin: 0 0 1.25rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--surface);
  overflow-wrap: anywhere;
}
.nearby-check-in summary { cursor: pointer; min-height: 44px; padding: .7rem 0; font-weight: 650; }
.nearby-check-in form { display: grid; gap: .8rem; padding: .3rem 0 1rem; max-width: 36rem; }
.nearby-check-in fieldset { min-width: 0; padding: 0; border: 0; margin: 0; }
.nearby-check-in legend { padding: 0 0 .45rem; font-weight: 600; }
.nearby-person { padding: .25rem 0 .65rem; border-top: 1px solid var(--line); }
.nearby-person label { display: flex; align-items: center; gap: .6rem; min-height: 44px; }
.nearby-person input[type=checkbox] { width: 1.15rem; height: 1.15rem; min-height: 0; }
.nearby-person select { width: 100%; min-height: 44px; }
.nearby-check-in p { margin: 0; color: var(--muted); }
.nearby-check-in > p { padding-bottom: 1rem; }
.nearby-person p { margin-left: 1.75rem; font-size: .92rem; }
.nearby-check-in button { justify-self: start; min-height: 44px; }
.nearby-check-in ul { margin: 0; padding-left: 1.4rem; }
.nearby-check-in p:empty, .nearby-check-in ul:empty { display: none; }

.home-coach-note {
  margin-block: 1.25rem;
  padding: .3rem 1.15rem;
  border-inline-start: 3px solid var(--brand);
  overflow-wrap: anywhere;
}
.home-coach-note h3 { margin: 0; font-size: 1.12rem; line-height: 1.35; }
.home-coach-note .coach-note-context { margin: .25rem 0; color: var(--muted); font-size: .9rem; }
.home-coach-note blockquote { margin: .65rem 0 .15rem; font-size: 1.12rem; line-height: 1.5; }
.home-coach-note a { display: inline-flex; align-items: center; min-height: 44px; }
.home-arrival{margin-block:0 1rem}
.home-arrival button{min-height:44px}
.home-arrival [role=status]:not(:empty){max-width:34rem;padding:.75rem 1rem;margin-top:.5rem;border-inline-start:3px solid var(--accent);overflow-wrap:anywhere}
.home-arrival [role=status] h3,.home-arrival [role=status] p{margin:0}

/* Compete: a tournament card per child, dark like a ticket stub so the date reads first. */
.compete-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 0 0 24px; background: var(--surface); }
.compete-hero { background: #1e211b; color: #f5f2eb; padding: 18px 20px 20px; display: grid; gap: 4px; }
.compete-hero small { font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; color: #c9c6bb; }
.compete-hero h2 { margin: 2px 0 0; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.08; letter-spacing: -.04em; color: inherit; }
.compete-hero p { margin: 0; font-size: .92rem; opacity: .9; font-variant-numeric: tabular-nums; }
.compete-chip { justify-self: start; margin-top: 10px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 650; }
.compete-ok { background: #e4efe5; color: #235d40; }
.compete-plain { background: #eae7dc; color: #505249; }
.compete-warn { background: #f6ead4; color: #704314; }
.compete-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; padding: 16px 20px 4px; font-size: .92rem; }
.compete-facts dt { color: var(--muted); font-weight: 560; }
.compete-facts dd { margin: 0; }
.compete-card h3 { margin: 14px 20px 6px; font-size: .95rem; }
.compete-kit { list-style: none; margin: 0; padding: 0 20px; display: grid; gap: 2px; }
.compete-kit li { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.compete-kit input { width: 22px; height: 22px; flex: none; accent-color: var(--brand); }
.compete-kit label { font-size: .92rem; }
.compete-hint { margin: 2px 20px 0; font-size: .76rem; color: var(--muted); }
.compete-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 16px 20px 18px; }
.compete-actions .action { text-decoration: none; }
#competition-inbox > h2 { margin: 8px 0 4px; }
