/* SailSeal: navy water, signal orange (life rings, race flags), one typeface in two widths.
   Wide Archivo for names and headlines, condensed Archivo for the scoreboard numbers. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --navy: #0E2A47;
  --navy-2: #1A3D62;
  --ink: #14273D;
  --muted: #56677C;
  --line: #D8E1EA;
  --mist: #EEF3F7;
  --paper: #FFFFFF;
  --signal: #F26419;      /* text on it is navy: white on this orange is too faint */
  --signal-soft: #FDE8DB;
  --tint: #E3EBF3;
  --danger: #B42318;
  --radius: 12px;
  --page: 44rem;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--mist);
  color: var(--ink);
  font: 400 1rem/1.55 var(--font);
  font-stretch: 100%;
}
body.has-tabs { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (min-width: 720px) { body.has-tabs { padding-bottom: 0; } }

a { color: var(--navy); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.icon { flex: none; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: #fff; }
.topbar-inner {
  max-width: var(--page); margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
  font-weight: 750; font-stretch: 118%; font-size: 1.2rem; letter-spacing: .01em;
}
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a {
  display: none; color: #C9D6E4; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 550;
}
.topnav a[aria-current="page"] { color: #fff; background: var(--navy-2); }
.topnav form { margin: 0; }
.topnav-button {
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px;
  background: transparent; color: #C9D6E4; cursor: pointer;
}
.topnav-button:hover { color: #fff; background: var(--navy-2); }
@media (min-width: 720px) { .topnav a { display: inline-block; } .topnav a:hover { color: #fff; } }

/* ---------- Navy band: the signature (chart grid behind the scoreboard) ---------- */
.band {
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: -1px -1px;
  color: #fff;
}
.band-inner { max-width: var(--page); margin: 0 auto; padding: 20px 16px 28px; }
.band-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.band h1 { font-size: 1.6rem; font-weight: 750; font-stretch: 112%; }
.band-kicker { color: #9FB4CA; font-weight: 600; margin-bottom: 4px; }
.band-note { background: var(--navy-2); color: #DCE6F0; padding: 10px 12px; border-radius: 10px; margin-bottom: 16px; font-size: .92rem; }
.band-note a { color: #fff; }
.band-small { color: #9FB4CA; font-size: .9rem; margin-top: 12px; }
.display {
  font-size: clamp(2.1rem, 7.5vw, 3.3rem);
  font-weight: 780; font-stretch: 115%; letter-spacing: -.012em; line-height: 1.04;
  max-width: 16ch;
}
.lead { color: #C9D6E4; font-size: 1.1rem; margin-top: 14px; max-width: 38rem; }
.band-landing .band-inner { padding-top: 48px; padding-bottom: 56px; }
.band-landing .button { margin-top: 28px; }
.band-cv .scoreboard { margin-top: 26px; }

.scoreboard {
  display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr;
  margin: 22px 0 0; border-top: 1px solid rgba(255, 255, 255, .16);
}
.score {
  display: flex; flex-direction: column-reverse; justify-content: flex-end;
  padding: 12px 0 0 14px; border-left: 1px solid rgba(255, 255, 255, .16);
}
.score:first-child { padding-left: 0; border-left: 0; }
.score dd {
  margin: 0; font-variant-numeric: tabular-nums lining-nums;
  font-size: clamp(2rem, 8.5vw, 3rem); font-weight: 700; font-stretch: 72%; line-height: 1;
}
.score-main dd { font-size: clamp(2.6rem, 11vw, 3.9rem); color: var(--signal); }
.score dt { color: #9FB4CA; font-size: .85rem; font-weight: 600; margin-top: 4px; }

/* ---------- Page ---------- */
.page { flex: 1; width: 100%; max-width: var(--page); margin: 0 auto; padding: 20px 16px 40px; }
.page-title { font-size: 1.75rem; font-weight: 760; font-stretch: 112%; margin: 6px 0 10px; }
.intro { font-size: 1.05rem; margin-bottom: 18px; max-width: 36rem; }
.section { margin-top: 30px; }
.section > h2 { font-size: 1.15rem; font-weight: 720; font-stretch: 108%; margin-bottom: 10px; }
.hint { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.section > .hint { margin: -4px 0 10px; }
.back {
  display: inline-flex; align-items: center; gap: 4px; color: var(--muted);
  text-decoration: none; font-weight: 600; margin: 2px 0 6px -4px; padding: 4px;
}
.back:hover { color: var(--navy); }
.alert { background: #FCE4E1; color: var(--danger); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-weight: 550; }
.alert-info { background: var(--tint); color: var(--ink); font-weight: 450; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.button.desktop-only { display: none; }
@media (min-width: 720px) { .button.desktop-only { display: inline-flex; } }

/* ---------- Breakdown chips ---------- */
.breakdown { display: grid; gap: 8px; margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chip {
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; font-size: .9rem; color: var(--muted);
}
.chip b { color: var(--ink); font-weight: 700; margin-left: 2px; }
.chip-role { background: var(--signal-soft); border-color: transparent; color: #7A3410; }
.chip-role b { color: #5B2408; }

/* ---------- Logbook entries ---------- */
.entries { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.entry { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; padding: 16px; }
.entry + .entry { border-top: 1px solid var(--line); }
.entry-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--tint); color: var(--navy);
}
.entry-race .entry-icon { background: var(--signal-soft); color: #B4440E; }
.entry-body { min-width: 0; }
.entry-kind { font-size: .85rem; font-weight: 650; color: var(--muted); display: flex; gap: 8px; }
.entry-kind time { font-weight: 450; }
.entry-title { font-size: 1.12rem; font-weight: 720; font-stretch: 106%; margin: 2px 0 6px; overflow-wrap: anywhere; }
.entry-title span { font-weight: 500; font-stretch: 100%; color: var(--muted); font-size: .95rem; margin-left: 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0; padding: 0; color: var(--ink); font-size: .93rem; }
.facts li { display: inline-flex; align-items: center; gap: 5px; }
.facts .icon { color: var(--muted); }
.entry-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.entry-roles span { background: var(--signal-soft); color: #7A3410; border-radius: 6px; padding: 1px 8px; font-size: .85rem; font-weight: 600; }
.entry-note { margin-top: 8px; }
.entry-route { margin-top: 4px; color: var(--muted); font-size: .93rem; }
.entry-actions { display: flex; gap: 18px; margin-top: 10px; font-size: .92rem; font-weight: 600; }
.entry-actions a { color: var(--muted); }
.entry-actions a:hover { color: var(--navy); }

.seal { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #93A4B7; width: 52px; }
.seal-text { font-size: .72rem; font-weight: 600; }

.empty { background: var(--paper); border: 1px dashed #B8C6D4; border-radius: var(--radius); padding: 28px 20px; text-align: center; }
.empty-title { font-size: 1.2rem; font-weight: 720; font-stretch: 108%; margin-bottom: 6px; }
.empty p:not(.empty-title) { color: var(--muted); max-width: 26rem; margin: 0 auto; }
.empty .button { margin-top: 18px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.field { min-width: 0; border: 0; margin: 0; padding: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
label, legend { display: block; font-weight: 650; margin-bottom: 6px; padding: 0; }
.sub-label { margin-top: 14px; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-height: 48px; padding: 11px 13px;
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid #C3CFDB; border-radius: 10px;
}
textarea { min-height: 0; resize: vertical; }
input::placeholder, textarea::placeholder { color: #8796A8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(242, 100, 25, .35); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.error { color: var(--danger); font-size: .9rem; margin-top: 6px; font-weight: 550; }
label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 450; }
label.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }

/* Kind tiles */
.kinds { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.kind-tile { margin: 0; font-weight: 600; }
.kind-tile input { position: absolute; opacity: 0; pointer-events: none; }
.kind-tile span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 84px; padding: 10px 4px; text-align: center; line-height: 1.15; font-size: .86rem;
  background: var(--paper); border: 1px solid #C3CFDB; border-radius: 12px; cursor: pointer; color: var(--ink);
}
.kind-tile span .icon { color: var(--navy); }
.kind-tile input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.kind-tile input:checked + span .icon { color: var(--signal); }
.kind-tile input:focus-visible + span { outline: 3px solid var(--signal); outline-offset: 2px; }
@media (max-width: 380px) { .kind-tile span { font-size: .78rem; min-height: 76px; } }

/* Duration: number + unit toggle */
.duration { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.segmented { display: inline-flex; background: var(--tint); border-radius: 10px; padding: 3px; }
.segmented label { margin: 0; font-weight: 600; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: grid; place-items: center; min-width: 54px; height: 42px; padding: 0 10px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.segmented input:checked + span { background: var(--paper); color: var(--navy); box-shadow: 0 1px 2px rgba(14, 42, 71, .18); }
.segmented input:focus-visible + span { outline: 3px solid var(--signal); }

/* Race roles as toggle chips */
.race-fields { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.race-fields legend { float: left; width: 100%; margin-bottom: 10px; }
.role-grid { clear: both; display: flex; flex-wrap: wrap; gap: 8px; }
.role-chip { margin: 0; font-weight: 550; }
.role-chip input { position: absolute; opacity: 0; pointer-events: none; }
.role-chip span { display: inline-block; padding: 7px 12px; border: 1px solid #C3CFDB; border-radius: 999px; cursor: pointer; font-size: .92rem; }
.role-chip input:checked + span { background: var(--signal); border-color: var(--signal); color: var(--navy); font-weight: 650; }
.role-chip input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 2px; }

/* Type-ahead */
.combo { position: relative; }
.combo-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  list-style: none; margin: 0; padding: 4px; max-height: 300px; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(14, 42, 71, .16);
}
.combo-option { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 10px; border-radius: 7px; cursor: pointer; }
.combo-option small { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.combo-option:hover, .combo-option[aria-selected="true"] { background: var(--tint); }

details.more { border-top: 1px solid var(--line); padding-top: 14px; }
details.more summary { cursor: pointer; font-weight: 650; color: var(--navy); }
details.more[open] summary { margin-bottom: 14px; }
details.more > .field + .field-row { margin-top: 14px; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 680; font-stretch: 104%; text-decoration: none; cursor: pointer;
}
.button-signal { background: var(--signal); color: var(--navy); }
.button-signal:hover { background: #E2550E; }
.button-navy { background: var(--navy); color: #fff; }
.button-navy:hover { background: var(--navy-2); }
.button-outline { background: var(--paper); color: var(--navy); border-color: var(--navy); }
.button-quiet { background: transparent; color: var(--muted); }
.button-quiet:hover { color: var(--navy); }
.button-danger { background: var(--danger); color: #fff; }
.button-block { width: 100%; }
.button-large { min-height: 54px; padding: 0 26px; font-size: 1.08rem; }
.form > .button, .panel > .button { justify-self: start; }
.link-button { background: none; border: 0; padding: 4px; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.danger-link { color: var(--danger); font-weight: 600; }

/* ---------- Profile ---------- */
.cert-list { list-style: none; margin: 0 0 12px; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.cert-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.cert-list li + li { border-top: 1px solid var(--line); }
.cert-name { font-weight: 720; font-stretch: 106%; min-width: 4.5rem; }
.cert-meta { color: var(--muted); flex: 1; }
.cert-list form { margin: 0; }
.share { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-top: 12px; }
.share input { font-size: .9rem; }
@media (max-width: 520px) { .share { grid-template-columns: 1fr 1fr; } .share input { grid-column: 1 / -1; } }
.summary-panel { margin-bottom: 14px; }

/* ---------- Landing ---------- */
.steps { list-style: none; counter-reset: step; margin: 8px 0 0; padding: 0; display: grid; gap: 22px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.2rem 1fr; column-gap: 12px; }
.steps li::before {
  content: counter(step); grid-row: span 2;
  font-size: 2.8rem; line-height: .9; font-weight: 700; font-stretch: 72%; color: var(--signal);
}
.steps h2 { font-size: 1.2rem; font-weight: 740; font-stretch: 110%; margin-bottom: 4px; }
.steps p { color: var(--muted); max-width: 32rem; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); margin-top: 16px; } }

/* ---------- Notice page ---------- */
.prose { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 42rem; }
.prose h1 { font-size: 1.4rem; font-weight: 740; margin: 4px 0 12px; }
.prose h2 { font-size: 1.05rem; font-weight: 700; margin: 22px 0 8px; }
.prose p, .prose li { margin-bottom: 8px; }
.prose ul { padding-left: 20px; }

/* ---------- Footer and tab bar ---------- */
.footer {
  max-width: var(--page); width: 100%; margin: 0 auto; padding: 18px 16px 26px;
  display: flex; gap: 16px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line);
}
.footer a { color: var(--muted); }

.tabbar {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: 1fr 1fr auto 1fr 1fr; align-items: center;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 600; padding: 4px;
}
.tabbar a[aria-current="page"] { color: var(--navy); }
.tabbar .tabbar-add {
  width: 58px; height: 58px; margin-top: -26px; border-radius: 50%;
  background: var(--signal); color: var(--navy); justify-content: center;
  box-shadow: 0 6px 16px rgba(242, 100, 25, .38), 0 0 0 5px var(--mist);
}
@media (min-width: 720px) { .tabbar { display: none; } }

/* ---------- Approval ---------- */
.seal-approved { color: var(--signal); }
.seal-approved .seal-text { color: #B4440E; }
.entry-approved { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: .88rem; font-weight: 600; color: #8A3A0E; }

/* Inbox: things waiting for this person (records to accept, attendance to take) */
.inbox { background: var(--paper); border: 1px solid var(--signal); border-left-width: 5px; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; }
.inbox > h2 { font-size: 1.08rem; font-weight: 720; font-stretch: 108%; }
.inbox > .hint { margin: 2px 0 6px; }
.inbox-list { list-style: none; margin: 0; padding: 0; }
.inbox-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.inbox-item + .inbox-item { border-top: 1px solid var(--line); }
.inbox-actions { display: flex; gap: 6px; }
.inbox-actions form { margin: 0; }

/* ---------- Lessons ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.page-head .page-title { margin: 6px 0; }
.day-head { font-size: 1rem; font-weight: 600; color: var(--muted); margin: 22px 0 8px; }
.day-head span { color: var(--ink); font-weight: 760; font-stretch: 110%; font-size: 1.12rem; margin-right: 4px; }
.lessons { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.lesson { display: grid; grid-template-columns: 4.6rem 1fr; gap: 14px; padding: 16px; }
.lesson + .lesson { border-top: 1px solid var(--line); }
.lesson-time { display: flex; flex-direction: column; text-decoration: none; color: var(--navy); border-right: 2px solid var(--signal); padding-right: 10px; }
.lesson-clock { font-size: 1.75rem; font-weight: 700; font-stretch: 72%; line-height: 1; font-variant-numeric: tabular-nums; }
.lesson-end { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; margin-top: 2px; }
.lesson-title { font-size: 1.08rem; font-weight: 720; font-stretch: 106%; margin-bottom: 6px; }
.lesson-title a { color: var(--ink); text-decoration: none; }
.lesson-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.lesson-action { margin: 0 0 0 auto; }
.lesson-action .button { min-height: 40px; }
.lesson-cancelled .lesson-time { border-color: var(--line); color: var(--muted); }
.lesson-cancelled .lesson-clock { text-decoration: line-through; }

.seats { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: .9rem; color: var(--muted); }
.seat-dots { display: inline-flex; flex-wrap: wrap; gap: 4px; max-width: 12rem; }
.seat-dots i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #9DB0C4; }
.seat-dots i.taken { background: var(--navy); border-color: var(--navy); }
.seats-full .seat-dots i.taken { background: var(--signal); border-color: var(--signal); }

.status { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; font-weight: 650; border-radius: 999px; padding: 3px 10px; }
.status-in { background: var(--tint); color: var(--navy); }
.status-wait { background: var(--signal-soft); color: #7A3410; }
.status-cancelled { background: #FCE4E1; color: var(--danger); }

.lesson-hero { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.lesson-hero .page-title { margin-top: 0; }
.lesson-hero .band-kicker { color: var(--muted); }
.lesson-when { font-size: 1.05rem; margin-bottom: 8px; }
.lesson-hero .alert { margin: 12px 0 0; }

.teach-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.roster { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .roster { grid-template-columns: 1fr; } }
.roster > div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.roster h3 { font-size: .98rem; font-weight: 700; margin-bottom: 6px; }
.roster ol { margin: 0; padding-left: 22px; }

.history { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.history li { padding: 14px 16px; }
.history li + li { border-top: 1px solid var(--line); }
.coach-note { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--signal); background: var(--mist); border-radius: 0 8px 8px 0; }
.coach-note cite { display: block; font-style: normal; color: var(--muted); font-size: .85rem; margin-top: 4px; }

.field-row-3 { grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 520px) { .field-row-3 { grid-template-columns: 1fr 1fr; } .field-row-3 > :first-child { grid-column: 1 / -1; } }
.optional { font-weight: 450; color: var(--muted); }

/* Attendance */
.att-list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.att { padding: 14px 16px; }
.att + .att { border-top: 1px solid var(--line); }
.att-toggle { display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; }
.att-toggle input { width: 22px; height: 22px; accent-color: var(--navy); }
.att-name { font-weight: 700; font-stretch: 106%; font-size: 1.05rem; flex: 1; }
.att-state::after { content: "Geldi"; color: var(--navy); font-weight: 600; font-size: .85rem; }
.att-absent .att-state::after { content: "Gelmedi"; color: var(--danger); }
.att-detail { margin-top: 10px; display: grid; gap: 10px; }
.att-absent .att-detail { display: none; }
.order-num { color: var(--navy); }

/* Club */
.band-kicker.muted { color: var(--muted); }
.club + .club { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.club-stats { display: flex; gap: 10px; margin: 6px 0 4px; }
.club-stats div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; }
.club-stats strong { display: block; font-size: 1.8rem; font-weight: 700; font-stretch: 72%; line-height: 1; color: var(--navy); }
.club-stats span { color: var(--muted); font-size: .85rem; }
.member-list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.member-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; }
.member-list li + li { border-top: 1px solid var(--line); }
.member-name { flex: 1; font-weight: 600; }
.member-toggle { margin: 0; }
.member-toggle .button { min-height: 36px; padding: 0 12px; font-size: .9rem; }
.share form { margin: 0; }
@media (max-width: 520px) { .share { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- Training groups ---------- */
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.group-list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.group-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; }
.group-list li + li { border-top: 1px solid var(--line); }
.group-list a { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); min-width: 0; }
.group-name { font-weight: 720; font-stretch: 106%; font-size: 1.05rem; }
.group-tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .9rem; font-weight: 600; color: var(--navy); background: var(--tint); border-radius: 999px; padding: 3px 12px; }
.lesson-group .lesson-time { border-color: var(--navy); }
.status-done { background: var(--signal-soft); color: #7A3410; }
.cohort-count { margin-top: 10px; color: var(--muted); }
.cohort-count strong { font-size: 1.6rem; font-weight: 700; font-stretch: 72%; color: var(--navy); margin-right: 2px; }
.lesson-hero .band-kicker a { color: inherit; }

.progress-dots { display: inline-flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 2px; }
.progress-dots i { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid #B8C6D4; }
.progress-dots i.done { background: var(--navy); border-color: var(--navy); }
.progress-dots i.missed { background: #FCE4E1; border-color: #E9A8A0; }

.student-list { list-style: none; margin: 0 0 14px; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.student { padding: 14px 16px; }
.student + .student { border-top: 1px solid var(--line); }
.student-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.student .chips { margin-top: 8px; }
.student-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.student-actions form { margin: 0; }
.student-actions .button { min-height: 38px; font-size: .92rem; }
.add-member label { margin-bottom: 8px; }
.add-member-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.cohort-lesson { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.entry-title a { color: inherit; text-decoration: none; }

.segmented-wide { display: flex; flex-wrap: wrap; }
.segmented-wide label { flex: 1; }
.segmented-wide span { width: 100%; }

/* Ratings: per position held */
.ratings { display: grid; gap: 8px; }
.rating-row { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(7rem, auto) 1fr; align-items: center; gap: 10px; }
.rating-row[hidden] { display: none; }
.rating-row legend { float: left; margin: 0; font-weight: 600; font-size: .92rem; }
.rating-row .segmented span { min-width: 0; height: 36px; font-size: .88rem; }
@media (max-width: 420px) { .rating-row { grid-template-columns: 1fr; gap: 4px; } }
.rating { font-weight: 700; }
.rating-1 { color: #8A3A0E; }
.rating-2 { color: var(--navy); }
.rating-3 { color: #166534; }

/* Completed programmes and level */
.level-badge { display: inline-flex; align-items: center; background: var(--signal); color: var(--navy); font-weight: 720; font-stretch: 106%; border-radius: 999px; padding: 4px 14px; }
.level-badge-dark { margin-top: 10px; }
.program-list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.program-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.program-list li + li { border-top: 1px solid var(--line); }
.program-name { font-weight: 720; font-stretch: 106%; }

/* Demo (development only) */
.demo-bar { background: var(--signal); color: var(--navy); text-align: center; font-size: .85rem; padding: 5px 12px; }
.demo-bar a { color: var(--navy); font-weight: 700; margin-left: 8px; }
.demo-list form { margin: 0; }
.demo-list .button { min-height: 36px; padding: 0 12px; font-size: .9rem; }
code { background: var(--tint); border-radius: 4px; padding: 1px 5px; font-size: .9em; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
