/* Delivery (Nova LMS, phase 2): notifications, facilitators and coaches, attendance and the calendar.
   Every colour, size and radius is a token (tokens.css). Gold still means one thing: this needs you. */

/* Rows with their own actions on the right from a wide screen; under the name on a phone */
.nt-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.row.nt-row, .row.fc-ses, .row.cal-ev, .row.at-row { align-items: start; }
.row > a.row-main { color: inherit; text-decoration: none; }
.row > a.row-main:hover b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.row-main b a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.nt-pre { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--text) !important; }
@media (min-width: 64em) {
  .row.nt-row, .row.fc-ses, .row.cal-ev { grid-template-columns: auto minmax(0, 1fr) auto; }
  .row.nt-row > .row-end, .row.fc-ses > .row-end, .row.cal-ev > .row-end, .rows .row > .row-end.nt-acts { grid-column: auto; justify-self: end; align-self: center; }
  .rows .row:has(> .row-end.nt-acts) { grid-template-columns: auto minmax(0, 1fr) auto; }
}

/* One notification */
.nt-one { max-width: 46rem; }
.nt-dp { display: grid; gap: var(--s5); }
.nt-msg { display: grid; gap: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--line); }
.nt-subj { font-weight: 650; color: var(--ink); }
.nt-body { max-width: 62ch; white-space: pre-line; overflow-wrap: anywhere; }
.nt-to { display: grid; margin: 0; padding: 0; list-style: none; }
.nt-to li { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; }
.nt-to li + li { border-top: 1px solid var(--line); }
.nt-to b { display: block; font-weight: 600; color: var(--ink); }
.nt-to small { display: block; font-size: var(--t-s); color: var(--mute); overflow-wrap: anywhere; }
.nt-to .chip { flex: none; }

/* Tick boxes in a sheet's form */
.kf-ticks > legend { margin-bottom: var(--s1); }
.kf-tick-list { display: grid; max-height: 22rem; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.kf-tick { display: flex; align-items: flex-start; gap: var(--s3); min-height: var(--tap); padding: var(--s25) var(--s3); cursor: pointer; }
.kf-tick-list > .kf-tick + .kf-tick { border-top: 1px solid var(--line); }
.kf-tick:hover { background: var(--canvas); }
.kf-tick input { flex: none; width: 20px; height: 20px; margin: var(--s05) 0 0; accent-color: var(--navy); }
.kf-tick b { display: block; font-weight: 600; color: var(--ink); }
.kf-tick small { display: block; font-size: var(--t-s); color: var(--mute); }
.kf-tick-list > .hint { padding: var(--s3); }
form#kf { display: grid; gap: var(--s3); }
form#kf > .kf-tick { padding-left: 0; padding-right: 0; }

/* Attendance */
.at-dates { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--t-s); color: var(--mute); }
.at-dates input { width: auto; min-height: var(--tap); }
.at-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s1); grid-column: 1 / -1; }
.at-opt { position: relative; display: block; }
.at-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.at-opt span { display: grid; place-items: center; min-height: var(--tap); padding: 0 var(--s2); border: 1px solid var(--field); border-radius: var(--r-ctl); background: var(--surface); font-size: var(--t-s); font-weight: 600; color: var(--text); transition: background-color var(--t-press) ease-out; }
.at-opt:hover span { background: var(--canvas); }
.at-opt input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.at-opt input:checked + span { border-color: transparent; }
.at-opt.present input:checked + span { background: var(--ok-bg); color: var(--ok-fg); box-shadow: inset 0 0 0 1.5px var(--ok); }
.at-opt.late input:checked + span { background: var(--with-bg); color: var(--with-fg); box-shadow: inset 0 0 0 1.5px var(--navy); }
.at-opt.absent input:checked + span { background: var(--no-bg); color: var(--no-fg); box-shadow: inset 0 0 0 1.5px var(--no-fg); }
.at-opt.excused input:checked + span { background: var(--quiet-bg); color: var(--quiet-fg); box-shadow: inset 0 0 0 1.5px var(--field); }
.at-save { position: sticky; bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s3); padding: var(--s3) var(--s5); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-panel) var(--r-panel); background: var(--surface-glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.at-save .err { flex: 1 1 100%; }
@media (min-width: 53.8125em) { .at-save { bottom: 0; } }
@media (min-width: 64em) {
  .row.at-row { grid-template-columns: auto minmax(0, 1fr) minmax(22rem, 26rem); align-items: center; }
  .row.at-row > .row-end { grid-column: auto; justify-self: end; }
  .at-pick { grid-column: auto; }
}

/* Calendar: the bar, then a month grid, a week of columns, a day's list or a year of months */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.cal-nav { display: flex; align-items: center; gap: var(--s1); }
.cal-title { margin-left: var(--s2); font-family: var(--display); font-size: var(--t-h3); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); color: var(--ink); }
.cal-p { overflow: hidden; }
.cm-wrap { display: none; }
.cm-head, .cm { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.cm-head li { padding: var(--s2) var(--s3); font-size: var(--t-xs); font-weight: 650; color: var(--mute); }
.cm-d { display: flex; flex-direction: column; gap: var(--s05); min-height: 7.25rem; padding: var(--s1); border-top: 1px solid var(--line); border-left: 1px solid var(--line); min-width: 0; }
.cm-d:nth-child(7n + 1) { border-left: 0; }
.cm-d.out { background: var(--canvas); }
.cm-d.out .cm-n { color: var(--mute); }
.cm-d.hol { background: var(--sunk); }
.cm-n { align-self: flex-start; display: grid; place-items: center; min-width: 1.75rem; height: 1.75rem; padding: 0 var(--s1); border-radius: var(--r-chip); font-size: var(--t-s); font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); text-decoration: none; }
.cm-n:hover { background: var(--sunk); }
.cm-d.today .cm-n { background: var(--navy); color: var(--on-navy); }
.cm-hol { font-size: var(--t-xs); color: var(--mute); padding: 0 var(--s1); }
.cm-more { padding: 0 var(--s1); font-size: var(--t-xs); font-weight: 650; color: var(--ink); }
.ev { display: flex; align-items: baseline; gap: var(--s1); min-width: 0; padding: var(--s05) var(--s15); border-left: 3px solid var(--navy); border-radius: var(--r-xs); background: var(--with-bg); color: var(--with-fg); font-size: var(--t-xs); line-height: 1.35; text-decoration: none; }
.ev time { flex: none; font-weight: 650; font-variant-numeric: tabular-nums; }
.ev span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ev.coaching, .ev-c.coaching { border-left-color: var(--field); border-left-style: dashed; background: var(--quiet-bg); color: var(--text); }
.ev.off, .ev-c.off { text-decoration: line-through; opacity: 0.7; }
a.ev:hover, a.ev-c:hover { filter: brightness(0.97); }
.ev-c { display: grid; gap: var(--s05); padding: var(--s2) var(--s25); border-left: 3px solid var(--navy); border-radius: var(--r-s); background: var(--with-bg); color: var(--with-fg); text-decoration: none; min-width: 0; }
.ev-c time { font-size: var(--t-s); font-weight: 650; font-variant-numeric: tabular-nums; }
.ev-c b { font-size: var(--t-s); font-weight: 650; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.ev-c span, .ev-c small { font-size: var(--t-s); color: var(--mute); overflow-wrap: anywhere; }
.ev-c small { display: flex; align-items: flex-start; gap: var(--s1); }
.ev-c small .ic { margin-top: 3px; }
.ev-c .ic { width: 14px; height: 14px; flex: none; }
.ag { margin: 0; padding: 0; list-style: none; }
.ag-d { display: grid; gap: var(--s2); padding: var(--s3) var(--s4) var(--s4); }
.ag-d + .ag-d { border-top: 1px solid var(--line); }
.ag-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); min-height: var(--tap); color: inherit; text-decoration: none; }
.ag-h b { font-weight: 650; color: var(--ink); }
.ag-h span { font-size: var(--t-s); color: var(--mute); }
.ag-d.today .ag-h b { padding: var(--s05) var(--s25); border-radius: var(--r-chip); background: var(--navy); color: var(--on-navy); }
.ag-l { display: grid; gap: var(--s2); }
.cw { display: grid; margin: 0; padding: 0; list-style: none; }
.cw-d { display: grid; align-content: start; gap: var(--s2); padding: var(--s3) var(--s4) var(--s4); min-width: 0; }
.cw-d + .cw-d { border-top: 1px solid var(--line); }
.cw-d.hol { background: var(--sunk); }
.cw-h { display: flex; align-items: baseline; gap: var(--s2); min-height: var(--tap); color: var(--mute); font-size: var(--t-s); font-weight: 650; text-decoration: none; }
.cw-h b { display: grid; place-items: center; min-width: 2rem; height: 2rem; border-radius: var(--r-chip); font-size: var(--t-m); color: var(--ink); font-variant-numeric: tabular-nums; }
.cw-d.today .cw-h b { background: var(--navy); color: var(--on-navy); }
.cw-none { font-size: var(--t-s); color: var(--mute); }
.cal-t { display: grid; justify-items: center; width: 46px; flex: none; font-variant-numeric: tabular-nums; }
.cal-t b { font-weight: 700; color: var(--ink); }
.cal-t small { font-size: var(--t-xs); color: var(--mute); }
.cal-ev .row-main span { display: flex; align-items: flex-start; gap: var(--s1); }
.cal-ev .row-main .ic { margin-top: 3px; }
.cal-ev .row-main .ic { width: 15px; height: 15px; flex: none; }
.cal-ev.off .row-main b { text-decoration: line-through; }
.cy { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.cy-m { display: grid; align-content: start; }
.cy-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); min-height: var(--tap); padding: var(--s3) var(--s4) var(--s2); color: inherit; text-decoration: none; }
.cy-h b { font-family: var(--display); font-size: var(--t-h4); font-weight: var(--display-weight); color: var(--ink); }
.cy-h span { font-size: var(--t-xs); color: var(--mute); }
.cy-h:hover b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.cy-m.today { border-color: var(--navy); }
.cy-l { margin: 0; padding: 0 0 var(--s2); list-style: none; }
.cy-l a { display: grid; gap: 0; min-height: var(--tap); align-content: center; padding: var(--s15) var(--s4); color: inherit; text-decoration: none; }
.cy-l a:hover { background: var(--canvas); }
.cy-l span { font-size: var(--t-s); font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.cy-l small { font-size: var(--t-xs); color: var(--mute); }
.cy-none { padding: 0 var(--s4) var(--s4); font-size: var(--t-s); color: var(--mute); }
.cal-key { display: flex; flex-wrap: wrap; gap: var(--s3); }
.cal-key .ev { max-width: 100%; }
@media (min-width: 37.5em) { .cy { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) {
  .cm-wrap { display: block; }
  .cal-agenda { display: none; }
  .cw { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cw-d { min-height: 16rem; padding: var(--s2); }
  .cw-d + .cw-d { border-top: 0; border-left: 1px solid var(--line); }
  .cy { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 90em) { .cy { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.cw .ev-c b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.cw .ev-c > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* Materials, assignments and reports (phase 3). Files show as a button that opens them. */
.files { display: grid; gap: var(--s2); }
.file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3); width: 100%; min-height: 56px; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: background-color var(--t-press) ease-out, border-color var(--t-press) ease-out; }
button.file:hover { background: var(--canvas); border-color: var(--field); }
button.file:active { background: var(--sunk); }
.file b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.file small { display: block; font-size: var(--t-s); color: var(--mute); }
.file .ic { width: 20px; height: 20px; color: var(--mute); }
.file.gone { cursor: default; color: var(--mute); }
.cn-text { max-width: 68ch; white-space: pre-line; overflow-wrap: anywhere; }
.panel.pad > .cn-text + .files, .panel.pad > .files + .btns, .panel.pad > .cn-text + .btns, .panel.pad > .notice + .btns, .panel.pad > .files + .notice, .panel.pad > .cn-text + .notice, .panel.pad > .btns + .decide, .panel.pad > .files + .decide, .panel.pad > .cn-text + .decide, .panel.pad > .notice + .decide { margin-top: var(--s4); }
.panel.pad > .panel-sub + .cn-text, .panel.pad > .files + .hint, .panel.pad > .cn-text + .hint { margin-top: var(--s3); }
.cn-hist { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none; font-size: var(--t-s); color: var(--mute); }
.cn-hist b { color: var(--ink); font-weight: 600; }
.cn-hist span { display: block; color: var(--text); }
.cn-work { padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--canvas); }
.cn-rep { display: grid; gap: var(--s4); max-width: 52rem; }
.cn-dp .nt-msg { gap: var(--s3); }
form#kf [data-for][hidden] { display: none; }
button[aria-busy="true"] { opacity: 0.6; pointer-events: none; }

/* The participant's programme page */
.pp-sched li { position: relative; }
.pp-sched li > .chip { justify-self: start; margin-top: var(--s1); }
.pp-list, .pp-mats { display: grid; margin: 0; padding: 0; list-style: none; }
.pp-list li + li, .pp-mats li + li { border-top: 1px solid var(--line); }
.pp-list a { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); min-height: var(--tap); padding: var(--s3) 0; color: inherit; text-decoration: none; }
.pp-list a:hover b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.pp-list b, .pp-mats b { display: block; font-weight: 600; color: var(--ink); }
.pp-list small, .pp-mats small { display: block; font-size: var(--t-s); color: var(--mute); }
.pp-mats li { display: grid; gap: var(--s2); padding: var(--s3) 0; }
.pp-mats li:first-child, .pp-list li:first-child a { padding-top: 0; }
.pp-mats p { max-width: 62ch; }

/* Outcomes (phase 4): graduation, certificates and the dashboard */
.panel:not(.pad) > .panel-sub { max-width: none; margin: 0; padding: 0 var(--s5) var(--s3); }
.out-cert { display: block; width: 100%; max-width: 60rem; height: auto; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
.db-split { width: 100%; border-collapse: collapse; margin-top: var(--s3); }
.db-split th, .db-split td { padding: var(--s2) 0; text-align: left; vertical-align: middle; font-weight: 400; }
.db-split tr + tr th, .db-split tr + tr td { border-top: 1px solid var(--line); }
.db-split th { display: flex; align-items: center; gap: var(--s2); white-space: nowrap; color: var(--ink); font-weight: 600; }
.db-split th .ic { width: 18px; height: 18px; color: var(--mute); }
.db-split td:nth-child(2) { width: 46%; padding-left: var(--s3); white-space: nowrap; }
.db-split td b { font-variant-numeric: tabular-nums; color: var(--ink); }
.db-bar { display: inline-block; width: calc(var(--w) * 0.7); min-width: 2px; height: 10px; margin-right: var(--s2); border-radius: var(--r-xs); background: var(--navy); vertical-align: middle; }
.db-was { padding-left: var(--s3) !important; font-size: var(--t-s); color: var(--mute); text-align: right !important; white-space: nowrap; }
.panel.pad > .db-split + .hint { margin-top: var(--s3); }

/* The demo guide's story: each step opens the app as the person who does it */
.start-story li { padding: var(--s2) 0; }
.start-story li > span { color: var(--on-navy); }
.start-step { display: inline-flex; align-items: center; gap: var(--s1); min-height: var(--tap); padding: 0 var(--s3); margin-left: calc(-1 * var(--s3)); border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--accent-on-navy); font: inherit; font-weight: 650; cursor: pointer; }
.start-step:hover { background: var(--on-navy-hover); }
.start-step:active { background: var(--on-navy-press); }
.start-step .ic { width: 16px; height: 16px; }

/* After the design audit (20 Nov 2026) */
/* Phone tables: a row is its name and its summary line; bare number cells would stack with no labels */
@container mt (max-width: 48rem) { .mt.wide td.num-c:not(.c-end) { display: none; } }
@container mt (min-width: 48.01rem) { .mt.rep .c-main { min-width: 13rem; } .mt.rep td.nw { white-space: nowrap; } }
.mt.rep thead th { white-space: normal; vertical-align: bottom; }
/* A row's closing chevron sits at the end of its first line, never under the icon */
.row:has(> .ic:last-child) { grid-template-columns: auto minmax(0, 1fr) auto; }
.row > .ic:last-child { grid-column: 3; grid-row: 1; align-self: center; color: var(--mute); }
.row:has(> .ic:last-child) > :is(.chip, .row-end) { grid-column: 2; }
/* A panel heading beside a button wraps under it rather than breaking a word a line */
.panel-h:has(> .btn) { flex-wrap: wrap; padding-bottom: var(--s2); }
.panel-h:has(> .btn) > h2 { flex: 1 1 12rem; }
/* Decision buttons one under another when there's no room for their words */
@container (max-width: 26rem) { .dp-btns, .dp-btns.sc-btns { grid-template-columns: minmax(0, 1fr); } }
/* Date ranges: each label stays with its date */
.at-dates > span { display: inline-flex; align-items: center; gap: var(--s2); white-space: nowrap; }
/* The participant portal: amounts wrap, the full-schedule toggle is a full touch target, and lines people read are 16px on a phone */
.pt-amt { flex: 0 1 46%; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 26rem) { .pt-pays li { flex-direction: column; align-items: flex-start; } .pt-amt { flex: none; text-align: left; } }
.pt-sched-d summary { min-height: var(--tap); }
.pt-sched small { font-size: var(--t-note); }
@media (max-width: 37.4375em) { .ag-l .ev-c span, .ag-l .ev-c small, .cw .ev-c span, .cw .ev-c small { font-size: var(--t-note); } }
/* Phone tabs: ten letters fit */
.tab span { font-size: 0.75rem; letter-spacing: -0.01em; }
/* The dashboard on a phone: what needs you first, then the figures, then the rest */
.db { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
@media (max-width: 37.4375em) {
  .db { display: flex; flex-direction: column; gap: var(--s5); }
  .db > .cols, .db .col-main { display: contents; }
  .db [aria-labelledby="nd-h"] { order: -1; }
}
/* A task's title is a link people tap: it gets a full touch target */
.task-t { display: inline-flex; align-items: center; min-height: var(--tap); }

/* Module evaluations (20 Nov 2026): the participant's form and the staff results */
.ev-q { margin: 0; }
.ev-q + .ev-q { margin-top: var(--s4); }
fieldset.ev-q { border: 1px solid var(--line); }
.ev-q > legend { float: left; width: 100%; padding: 0; margin-bottom: var(--s3); font-weight: 650; color: var(--ink); }
.ev-q > legend + * { clear: both; }
.ev-scale { display: grid; gap: var(--s2); }
.ev-opt { position: relative; display: block; }
.ev-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ev-opt span { display: flex; align-items: center; min-height: var(--tap); padding: 0 var(--s4); border: 1px solid var(--field); border-radius: var(--r-ctl); background: var(--surface); font-weight: 600; color: var(--text); transition: background-color var(--t-press) ease-out; }
.ev-opt:hover span { background: var(--canvas); }
.ev-opt input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.ev-opt input:checked + span { background: var(--with-bg); color: var(--with-fg); border-color: transparent; box-shadow: inset 0 0 0 2px var(--navy); }
@media (min-width: 48em) { .ev-scale { grid-template-columns: repeat(5, minmax(0, 1fr)); } .ev-opt span { justify-content: center; padding: 0 var(--s2); text-align: center; font-size: var(--t-s); } }
form[data-form="pt-eval"] { display: grid; gap: var(--s4); }
form[data-form="pt-eval"] .ev-q + .ev-q { margin-top: 0; }
.ev-head { margin-top: var(--s4); }
.pp-done { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); min-height: var(--tap); padding: var(--s3) 0; }
.pp-list li:first-child .pp-done { padding-top: 0; }
.ev-st { font-weight: 600; }
.ev-t .c-main { min-width: 16rem; }
.ev-said { display: grid; gap: var(--s3); margin: var(--s3) 0 0; padding: 0; list-style: none; }
.ev-said li { padding: var(--s3) var(--s4); border-left: 3px solid var(--line); background: var(--canvas); border-radius: 0 var(--r-ctl) var(--r-ctl) 0; max-width: 70ch; overflow-wrap: anywhere; }
