/* AEA volunteer portal. Admin: navy side rail + "Today" decisions. Volunteer pages: navy band + one next step.
   Gold is reserved for the single action that matters on a screen and for the sun mark. */
@font-face { font-family: "Switzer"; src: url("/assets/fonts/Switzer-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("/assets/fonts/Switzer-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("/assets/fonts/Switzer-Semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --navy: #1d3655; --navy-deep: #13253c; --navy-soft: #2d4f7a;
  --gold: #fed970; --gold-deep: #f4bf3a; --gold-pale: #fff6df;
  --ground: #faf7f0; --card: #fff; --sand: #f1ece1; --sand-2: #e8e1d2;
  --ink: #1d3655; --ink-2: rgba(29,54,85,.78); --ink-3: rgba(29,54,85,.76); --line: rgba(29,54,85,.11);
  --on-navy: #fff; --on-navy-2: rgba(255,255,255,.78); --on-navy-line: rgba(255,255,255,.14);
  --green: #1f7a4d; --green-bg: #e3f3ea; --red: #b23a3a; --red-bg: #f8e4e2;
  --amber: #8a5a00; --amber-bg: #fdf0cf; --blue: #2d4f7a; --blue-bg: #e6edf6;
  --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --ease: cubic-bezier(.22,1,.36,1);
  --font: "Switzer", "Helvetica Neue", Arial, system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(19,37,60,.05), 0 8px 24px -12px rgba(19,37,60,.12);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); }
body { margin: 0; font: 400 16px/1.5 var(--font); color: var(--ink); background: var(--ground); -webkit-font-smoothing: antialiased; min-height: 100vh; }
::selection { background: var(--gold); color: var(--navy-deep); }
a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -.03em; text-wrap: balance; }
h1 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.08; }
h2 { font-size: 20px; line-height: 1.25; letter-spacing: -.02em; }
p { margin: 0; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 500; text-decoration: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ico { flex: none; width: 18px; height: 18px; }
:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; border-radius: 6px; }
* { scrollbar-color: var(--sand-2) transparent; scrollbar-width: thin; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--navy); color: #fff; font: 500 15px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background .25s var(--ease), transform .2s var(--ease), box-shadow .25s var(--ease); }
.btn:hover { background: var(--navy-deep); }
.btn:active { transform: scale(.98); }
.btn--gold { background: var(--gold); color: var(--navy-deep); font-weight: 600; }
.btn--gold:hover { background: var(--gold-deep); }
.btn--ghost { background: var(--sand); color: var(--ink); }
.btn--ghost:hover { background: var(--sand-2); }
.btn--lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn--small { min-height: 40px; padding: 0 14px; }
.btn--block { width: 100%; }
.btn .ico { width: 16px; height: 16px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.link { color: var(--ink-2); font-size: 14px; }

/* ---------- admin shell ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(to right, var(--navy) 252px, transparent 252px); }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px; padding: 26px 16px 20px;
  background: var(--navy); color: var(--on-navy); }
.rail__brand { display: grid; justify-items: start; gap: 10px; padding: 2px 10px 6px; color: var(--on-navy-2); text-decoration: none; font-size: 13px; letter-spacing: .01em; }
.rail__brand img { display: block; width: 152px; height: auto; }
.rail__nav { display: flex; flex-direction: column; gap: 2px; }
.rail__nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-sm); color: var(--on-navy-2); text-decoration: none; font-size: 15px;
  transition: background .2s var(--ease), color .2s var(--ease); }
.rail__nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.rail__nav a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; }
.rail__nav a span { flex: 1; }
.rail__nav b { min-width: 24px; padding: 2px 8px; border-radius: 99px; background: var(--gold); color: var(--navy-deep); font-size: 12px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.rail__foot { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid var(--on-navy-line); display: grid; gap: 10px; font-size: 13px; color: var(--on-navy-2); overflow-wrap: anywhere; }
.rail__foot a { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.rail__foot a .ico { width: 16px; height: 16px; }
.main { padding: 36px 44px 64px; max-width: 1360px; width: 100%; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.page-head__date { font-size: 15px; color: var(--ink-3); margin-bottom: 6px; }

/* Today: three decisions; the lead one is navy and carries the gold action */
.today { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; margin-bottom: 36px; }
.decide { display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); }
.decide h2 { font-size: 17px; }
.decide__list { list-style: none; margin: 0; padding: 0; display: grid; }
.decide__list a { display: flex; flex-direction: column; gap: 2px; padding: 11px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.decide__list li:first-child a { border-top: 0; padding-top: 0; }
.decide__list span { font-weight: 500; }
.decide__list small { font-size: 13px; color: var(--ink-3); }
.decide__list a:hover span { text-decoration: underline; }
.decide__quiet, .decide__note { font-size: 14px; color: var(--ink-3); }
.decide--lead { background: var(--navy); color: var(--on-navy); box-shadow: 0 18px 40px -20px rgba(19,37,60,.55); }
.decide--lead h2 { font-size: 26px; line-height: 1.15; }
.decide__oldest { font-size: 15px; line-height: 1.5; color: var(--on-navy-2); }
.decide__oldest b { color: #fff; font-weight: 500; }
.decide--lead .decide__list a { border-color: var(--on-navy-line); }
.decide--lead .decide__list small, .decide--lead .decide__quiet { color: var(--on-navy-2); }
.decide--lead .btn--gold { margin-top: auto; align-self: flex-start; }

/* register */
.register { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.register__head { display: grid; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.register__head h2 { display: flex; align-items: center; gap: 10px; }
.count { padding: 2px 10px; border-radius: 99px; background: var(--sand); font-size: 13px; font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters select, .search input { height: 36px; font: 400 14px var(--font); color: var(--ink); background: var(--sand); border: 1px solid transparent; border-radius: var(--r-sm); padding: 0 12px; }
.search input::placeholder { color: var(--ink-3); }
.filters .btn--small { height: 36px; }
.more summary { list-style: none; cursor: pointer; font-size: 14px; color: var(--ink-2); padding: 0 6px; height: 36px; display: flex; align-items: center; text-decoration: underline; text-underline-offset: 3px; }
.more summary::-webkit-details-marker { display: none; }
.more[open] { flex-basis: 100%; display: flex; align-items: center; gap: 8px; }
.more__body { display: flex; flex-wrap: wrap; gap: 8px; }
.filters select:focus, .search input:focus { background: #fff; border-color: var(--line); outline: none; box-shadow: 0 0 0 3px var(--gold-pale); }
.search { position: relative; display: flex; align-items: center; flex: 1 1 260px; max-width: 420px; }
.search .ico { position: absolute; left: 11px; color: var(--ink-3); width: 16px; height: 16px; pointer-events: none; }
.search input { padding-left: 34px; width: 100%; }
.filters .search { flex: 1 1 260px; }
.filters .search input { width: 100%; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th:first-child, .table td:first-child { padding-left: 22px; }
.table th:last-child, .table td:last-child { padding-right: 22px; }
.table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--ink-3); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 15px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.table tbody tr { cursor: pointer; transition: background .15s var(--ease); }
.table tbody tr:hover { background: var(--ground); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .states { display: grid; justify-items: start; gap: 6px; }
.table .states__by { font-size: 12px; color: var(--ink-3); margin: -2px 0 2px 4px; white-space: nowrap; }
.empty { padding: 48px 22px; text-align: center; color: var(--ink-3); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px; }

/* detail */
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--ink); }
.back .ico { width: 16px; height: 16px; }
.profile-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.profile-head__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.profile-head__badges { display: flex; gap: 8px; flex-wrap: wrap; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-size: 14px; }
.timeline li { padding-left: 14px; border-left: 1px solid var(--sand-2); }
.timeline small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.stack { margin: 0 0 10px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- shared pieces ---------- */
.card { background: var(--card); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow); }
.card h2 { margin-bottom: 16px; }
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.dash__main > * + *, .dash__side > * + * { margin-top: 16px; }
.details { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px 16px; margin: 0; font-size: 15px; }
.details dt { color: var(--ink-3); }
.details dd { margin: 0; }
.details--compact { grid-template-columns: 110px minmax(0, 1fr); gap: 10px 12px; }
.prose { color: var(--ink-2); max-width: 68ch; }
.chip { display: inline-block; padding: 3px 9px; margin: 0 4px 4px 0; border-radius: 8px; background: var(--sand); font-size: 13px; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--green { background: var(--green-bg); color: var(--green); }
.badge--red { background: var(--red-bg); color: var(--red); }
.badge--amber { background: var(--amber-bg); color: var(--amber); }
.badge--blue { background: var(--blue-bg); color: var(--blue); }
.badge--grey { background: var(--sand); color: var(--ink-2); }
.flash { padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; font-size: 15px; }
.flash--success { background: var(--green-bg); color: var(--green); }
.flash--error { background: var(--red-bg); color: var(--red); }
.flash--info { background: var(--blue-bg); color: var(--blue); }

/* forms */
.form fieldset { border: 0; padding: 0; margin: 0 0 34px; }
.form legend { font-size: 20px; font-weight: 500; letter-spacing: -.02em; margin-bottom: 16px; padding: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; font-size: 15px; font-weight: 500; }
.field__label { font-weight: 500; }
.opt { font-weight: 400; color: var(--ink-3); font-size: 13px; }
.field input, .field select, .field textarea, .field > input { width: 100%; font: 400 16px/1.4 var(--font); color: var(--ink); background: var(--sand);
  border: 1px solid transparent; border-radius: 12px; padding: 12px 14px; transition: border-color .2s, background .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { background: #fff; border-color: var(--line); outline: none; box-shadow: 0 0 0 3px var(--gold-pale); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field textarea { resize: vertical; min-height: 110px; }
.field__err { color: var(--red); font-size: 14px; font-weight: 400; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.check { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--sand); font-weight: 400; font-size: 15px;
  cursor: pointer; transition: background .2s, box-shadow .2s; user-select: none; }
.check:hover { background: var(--sand-2); }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--navy); flex: none; }
.check:has(input:checked) { background: rgba(29,54,85,.07); box-shadow: inset 0 0 0 1.5px var(--navy); }
.checks--cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.checks--cards .check { padding: 16px; font-weight: 500; }
.check--block { display: flex; align-items: flex-start; margin-bottom: 10px; line-height: 1.45; }
.check--block input { margin-top: 2px; }
.form__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- volunteer pages: navy band ---------- */
.band { background: var(--navy); color: var(--on-navy); }
.band__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 1040px; max-width: calc(100% - 48px); margin: 0 auto; padding: 18px 0; }
.brand img { display: block; height: 46px; width: auto; }
.band__nav { display: flex; align-items: center; gap: 8px; }
.band__link { color: #fff; text-decoration: none; font-size: 15px; padding: 9px 14px; border-radius: var(--r-sm); background: rgba(255,255,255,.1); }
.band__link:hover { background: rgba(255,255,255,.18); }
.band__body { width: 1040px; max-width: calc(100% - 48px); margin: 0 auto; padding: 26px 0 40px; }
.band__body h1 { color: #fff; max-width: 18ch; }
.band__body .lead { color: var(--on-navy-2); font-size: 18px; line-height: 1.45; margin-top: 14px; max-width: 58ch; }
.band__greet { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; }
.band__id { color: var(--on-navy-2); font-size: 15px; }
.band__id b { color: #fff; font-weight: 600; font-size: 17px; margin-left: 6px; font-variant-numeric: tabular-nums; }
.steps-mini { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 24px 0 0; }
.steps-mini li { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 99px; background: rgba(255,255,255,.1); font-size: 14px; }
.steps-mini b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--navy-deep); font-size: 12px; }
.journey { list-style: none; display: grid; grid-template-columns: repeat(var(--steps, 4), 1fr); gap: 0; padding: 0; margin: 26px 0 0; }
.journey__step { position: relative; display: flex; align-items: center; gap: 10px; padding-right: 12px; font-size: 15px; color: var(--on-navy-2); }
.journey__step::after { content: ""; flex: 1; height: 1px; background: var(--on-navy-line); }
.journey__step:last-child::after { display: none; }
.journey__step.is-done { color: #fff; }
.journey__step.is-done::after { background: var(--gold); }
.journey__dot { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 600; }
.journey__dot .ico { width: 16px; height: 16px; }
.is-done .journey__dot { background: var(--gold); color: var(--navy-deep); }
.journey__step.is-current { color: #fff; font-weight: 500; }
.is-current .journey__dot { background: transparent; box-shadow: inset 0 0 0 1.5px #fff; }

/* the same steps on light cards (admin volunteer record) */
.progress-strip { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 22px; margin: -6px 0 16px; }
.journey--light { margin: 0; }
.journey--light .journey__step { color: var(--ink-3); font-size: 14px; }
.journey--light .journey__step::after { background: var(--line); }
.journey--light .journey__step.is-done { color: var(--ink); }
.journey--light .journey__step.is-done::after { background: var(--gold-deep); }
.journey--light .journey__dot { background: var(--sand); width: 26px; height: 26px; font-size: 12px; }
.journey--light .is-done .journey__dot { background: var(--gold); }
.journey--light .journey__step.is-current { color: var(--ink); }
.journey--light .is-current .journey__dot { background: #fff; box-shadow: inset 0 0 0 1.5px var(--navy); }
.editbox summary { list-style: none; cursor: pointer; display: grid; gap: 2px; }
.editbox summary::-webkit-details-marker { display: none; }
.editbox summary h2 { display: flex; align-items: center; gap: 8px; }
.editbox summary h2::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s var(--ease); }
.editbox[open] summary h2::after { transform: rotate(-135deg) translate(-2px, -1px); }
.editbox[open] summary { margin-bottom: 18px; }
.wrap { width: 1040px; max-width: calc(100% - 48px); margin: 0 auto; padding: 32px 0 72px; }
.state p { color: var(--ink-2); margin: 0 0 12px; max-width: 62ch; }
.state--action { box-shadow: var(--shadow), inset 0 0 0 2px var(--gold); }
.state--good { background: var(--green-bg); box-shadow: none; }
.state--good h2 { color: var(--green); }
.state--warn { background: var(--amber-bg); box-shadow: none; }
.state form { margin-top: 20px; }
.ticks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; color: var(--ink-2); }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold-pale) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%231d3655' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 10.5 3 3 6-6.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.idcard h2 { font-size: 15px; color: var(--ink-3); font-weight: 500; letter-spacing: 0; margin-bottom: 6px; }
.idcard__id { font-size: 24px; letter-spacing: -.01em; font-weight: 600; margin: 0 0 18px; font-variant-numeric: tabular-nums; }
.auth { max-width: 520px; margin: 24px auto 0; padding: 40px; }
.auth h1 { font-size: 34px; }
.auth .lead { font-size: 17px; color: var(--ink-2); margin-top: 12px; }
.auth form { margin-top: 24px; }
.hero-card { padding: 44px; }
.hero-card .lead { font-size: 18px; color: var(--ink-2); margin-top: 14px; max-width: 58ch; }
.hero-card .btn { margin-top: 28px; }
.foot { display: flex; justify-content: space-between; gap: 16px; width: 1040px; max-width: calc(100% - 48px); margin: 0 auto; padding: 24px 0 32px; font-size: 13px; color: var(--ink-3); border-top: 1px solid var(--line); }
.foot a { color: inherit; }

/* admin sign-in has no nav: centre the card in the main column */
.admin .rail:not(:has(.rail__nav)) + .main { display: grid; align-content: center; }

/* ---------- admin: subjects ---------- */
.page-head__sub { font-size: 15px; color: var(--ink-2); max-width: 64ch; margin-top: 8px; line-height: 1.5; }
.subjects { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.subjects__side { display: grid; gap: 16px; }
.subjects__side h2 { font-size: 17px; margin-bottom: 12px; }
.subject-add { display: grid; gap: 12px; }
.suggest { list-style: none; margin: 12px 0 0; padding: 0; display: grid; }
.suggest li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.suggest li:first-child { border-top: 0; }
.suggest b { font-weight: 500; display: block; }
.suggest small { font-size: 13px; color: var(--ink-3); }
.subject-table tbody tr { cursor: default; }
.subject-table td { vertical-align: middle; padding-top: 10px; padding-bottom: 10px; }
.subject-table .is-hidden .rename input { color: var(--ink-3); }
.rename { display: flex; align-items: center; gap: 8px; }
.rename label { flex: 1; min-width: 180px; }
.rename input { width: 100%; height: 36px; font: 400 15px var(--font); color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: var(--r-sm); padding: 0 10px; margin-left: -10px; }
.rename input:hover { background: var(--ground); }
.rename input:focus { background: #fff; border-color: var(--line); outline: none; box-shadow: 0 0 0 3px var(--gold-pale); }
.rename .btn { visibility: hidden; height: 36px; min-height: 36px; }
.rename:focus-within .btn, .rename:hover .btn { visibility: visible; }
.subject-table .btn--small { height: 36px; min-height: 36px; }

/* ---------- agreement (MOU) ---------- */
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.btn--link { background: none; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; padding: 0 8px; }
.btn--link:hover { color: var(--ink); }
.mou { max-width: 72ch; }
.mou--sheet, .card.mou { max-width: none; }
.mou__title { font-size: 26px; margin-bottom: 18px; }
.mou h3 { font-size: 17px; margin: 24px 0 8px; }
.mou p, .mou li { font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.mou p { margin: 0 0 12px; max-width: 70ch; }
.mou ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; max-width: 70ch; }
.mou-edit { font: 400 15px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace !important; min-height: 420px; }
.sign { display: grid; gap: 16px; margin-top: 16px; }
.sign h2 { font-size: 17px; }
.sign__name { font-size: 17px !important; }
.sigblock { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.sigblock dd, .mou--sheet .small { overflow-wrap: anywhere; min-width: 0; }
.mou .sigblock__name { font-size: 26px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); margin-bottom: 14px; }
.print-hide { margin-top: 16px; }
.warn { color: var(--red); font-weight: 600; }
.small { font-size: 13px; }
@media print {
  .rail, .band, .foot, .print-hide, .back, .flash { display: none !important; }
  .shell { display: block; background: none; }
  .main, .wrap { padding: 0; max-width: none; width: auto; }
  body { background: #fff; }
  .card { box-shadow: none; padding: 0; }
}

/* ---------- application form: one section per page ---------- */
.wizard__progress { display: none; }
.is-wizard .wizard__progress { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.wizard__bar { flex: 1; height: 6px; border-radius: 99px; background: var(--sand); overflow: hidden; }
.wizard__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--navy); transition: width .45s var(--ease); }
.wizard__count { font-size: 14px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.step { display: grid; gap: 16px; margin-bottom: 34px; }
.is-wizard .step { display: none; margin-bottom: 0; }
.is-wizard .step.is-current { display: grid; animation: step-in .35s var(--ease); }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } }
.step__title { font-size: 26px; line-height: 1.15; }
.step__intro { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.step__prose, .step__prose p { max-width: none; }
.step__prose p { font-size: 16px; line-height: 1.6; margin: 0 0 12px; text-align: justify; hyphens: manual; }
.step__intro { text-align: justify; hyphens: manual; }
.step__prose h3 { font-size: 17px; margin: 22px 0 8px; }
.step__error { color: var(--red); font-size: 15px; }
/* role cards (step 1): icon, name, one line; the radio is hidden but still focusable */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 14px; }
.role { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 14px; padding: 18px 18px 18px 16px;
  border-radius: var(--r-md); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; user-select: none;
  transition: box-shadow .2s var(--ease), background .2s var(--ease), transform .2s var(--ease); }
.role:hover { box-shadow: inset 0 0 0 1px rgba(29,54,85,.28); background: #fffdf8; }
.role:active { transform: scale(.99); }
.role__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.role:has(.role__input:focus-visible) { outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.role__icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--gold-pale); color: var(--navy);
  transition: background .2s var(--ease), color .2s var(--ease); }
.role__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.role__text { display: flex; flex-direction: column; gap: 4px; padding-right: 22px; min-width: 0; }
.role__text b { font-size: 16px; line-height: 1.25; font-weight: 500; }
.role__text small { font-size: 14px; line-height: 1.4; color: var(--ink-3); }
.role__tick { position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px var(--sand-2); transition: background .2s var(--ease), box-shadow .2s var(--ease); }
.role__tick svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .15s; }
.role:has(.role__input:checked) { box-shadow: inset 0 0 0 1.5px var(--navy); background: #fff; }
.role:has(.role__input:checked) .role__icon { background: var(--navy); color: var(--gold); }
.role:has(.role__input:checked) .role__tick { background: var(--navy); box-shadow: none; }
.role:has(.role__input:checked) .role__tick svg { opacity: 1; }
/* teacher: full-width lead card */
.role--teacher { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; align-items: center; padding: 20px 20px 20px 18px; background: var(--gold-pale); box-shadow: inset 0 0 0 1px rgba(244,191,58,.45); }
.role--teacher:hover { background: #fff1cc; }
.role--teacher .role__icon { width: 48px; height: 48px; border-radius: 13px; background: var(--gold); }
.role--teacher .role__icon svg { width: 26px; height: 26px; }
.role--teacher .role__text b { font-size: 18px; }
.role--teacher .role__tag { font-size: 13px; line-height: 1.2; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.75); color: var(--ink-2); margin-right: 30px; white-space: nowrap; }
.role--teacher .role__tick { top: 50%; margin-top: -10px; right: 18px; }
@media (max-width: 860px) { .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .roles { grid-template-columns: 1fr; gap: 8px; }
  .role { padding: 14px 14px 14px 12px; gap: 12px; }
  .role__icon { width: 36px; height: 36px; }
  .role--teacher { grid-template-columns: auto 1fr; }
  .role--teacher .role__tag { grid-column: 2; justify-self: start; margin: 2px 0 0; }
  .role--teacher .role__tick { top: 16px; margin-top: 0; }
}
.commit { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.commit legend { font-weight: 500; margin-bottom: 8px; padding: 0; }
.commit .check--block { margin: 0; }
.commit__all { justify-self: start; background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font: inherit; font-size: 14px; color: var(--ink-2); }
.commit__confirm { padding: 18px; border-radius: 14px; background: var(--ground); display: grid; gap: 12px; }
.commit__confirm p { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.commit__confirm .check--block { margin: 0; background: #fff; }
.wizard__nav { display: none; }
.is-wizard .wizard__nav { display: flex; align-items: center; gap: 12px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.is-wizard .wizard__nav [data-next], .is-wizard .wizard__nav [data-send] { margin-left: auto; }
.wizard__nav [hidden] { display: none !important; }
form.wizard:not(.is-wizard) .wizard__nav { display: flex; justify-content: flex-end; }
form.wizard:not(.is-wizard) [data-back], form.wizard:not(.is-wizard) [data-next] { display: none; }

/* ---------- admin: messages ---------- */
.msgs { display: grid; gap: 14px; }
.msg--new { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--gold); }
.msg__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.msg__head h2 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.msg__meta { font-size: 14px; color: var(--ink-3); margin-top: 4px; overflow-wrap: anywhere; }
.msg__meta a { color: inherit; }
.msg__when { display: grid; justify-items: end; gap: 6px; flex: none; }
.msg__when small { font-size: 13px; color: var(--ink-3); }
.msg__body { margin-top: 14px; font-size: 15px; line-height: 1.55; color: var(--ink); max-width: 75ch; overflow-wrap: anywhere; }
.msg__extra { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.msg__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.msg__del { margin-left: auto; }

@media (max-width: 1100px) {
  .subjects { grid-template-columns: 1fr; }
  .today { grid-template-columns: 1fr 1fr; }
  .decide--lead { grid-column: 1 / -1; }
  .dash { grid-template-columns: 1fr; }
  .main { padding: 28px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; background: none; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; }
  .rail__nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .rail__nav a { padding: 8px 10px; }
  .rail__foot { margin: 0 0 0 auto; padding: 0; border: 0; grid-auto-flow: column; }
  .rail__foot span { display: none; }
  .rail__brand { padding: 0 6px 0 0; }
  .rail__brand img { width: 64px; }
  .rail__brand span { display: none; }
}
@media (max-width: 640px) {
  .today { grid-template-columns: 1fr; }
  .main { padding: 20px 16px 48px; }
  .search input { width: 100%; }
  .filters { width: 100%; }
  .filters > * { flex: 1 1 calc(50% - 4px); }
  .filters .search { flex-basis: 100%; }
  .band__bar, .band__body, .wrap, .foot { max-width: calc(100% - 40px); }
  .band__body { padding: 16px 0 30px; }
  .journey { grid-template-columns: 1fr 1fr; gap: 12px; }
  .journey__step::after { display: none; }
  .card, .auth, .hero-card { padding: 22px; }
  .grid2 { grid-template-columns: 1fr; }
  .details, .details--compact { grid-template-columns: 1fr; gap: 2px; }
  .details dd { margin-bottom: 12px; }
  .foot { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
