/*
  Spell Beasts for Schools: P1's screens (docs/TEACHER-UX.md sections 5.3 and 5.5-5.9): This week
  (wk-), the challenges list and a challenge (ch-), New challenge (nc-) and the word sheet (wd-).

  Built on the shell's pieces in teach.css (t-sheet, t-btn, t-fig, t-dt, t-chip, t-bar, t-mk,
  t-egg, charts): this file only lays out P1's own screens and never restyles a t- class.
  The Today card carries the page's only yolk (primary) button; its left edge is yolk too.

  What this must never do: carry meaning in colour alone (every bar segment has its words,
  every egg its label), hide focus, or let a page scroll sideways at 390px (only a table or
  a grid inside its own box may).
*/

/* ---------- This week ---------- */

.wk-today {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  padding: 16px 20px 16px 26px;
  border: 1.5px solid var(--ink); border-radius: var(--t-radius);
  background: var(--paper-light); box-shadow: 0 var(--t-under) 0 var(--paper-shade);
  overflow: hidden;
}
.wk-today::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--yolk); border-right: 1.5px solid var(--ink); }
.wk-today--holiday::before, .wk-today--weekendSet::before { background: var(--leafy); }
.wk-today--testOpen::before, .wk-today--testDay::before { background: var(--pond); }
.wk-today-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.wk-today-main { flex: 1 1 32rem; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.wk-kicker { color: var(--ink-soft); }
.wk-say { font-size: 1.15rem; line-height: 1.45; max-width: 70ch; }
.wk-say em { font-style: normal; font-weight: 650; }
.wk-today-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; flex: 0 1 auto; }
.wk-words { display: flex; flex-wrap: wrap; gap: 8px; }
.wk-also { border-top: 1.5px dashed var(--rule); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.wk-also-k { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.wk-also-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.wk-also-item { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.wk-also-item > .t-icon { color: var(--ink-soft); }
.wk-also-t { flex: 1 1 auto; min-width: 0; }
.wk-also-item .t-btn { border-color: var(--ink); box-shadow: 0 2px 0 var(--paper-shade); flex: none; }
.wk-also-more { align-self: flex-start; font-weight: 650; }

.wk-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--t-gap); align-items: start; }
.wk-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-bottom: 12px; }
.wk-head h2 { margin: 0; }
.wk-more, .ch-more { display: inline-flex; align-items: center; gap: 2px; font-weight: 650; font-size: 0.9375rem; }
.wk-cards { display: flex; flex-direction: column; gap: 10px; }
.wk-set-acts { margin-top: 12px; }
.wk-beast { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1.5px dashed var(--rule); font-size: 0.9375rem; color: var(--ink-soft); }
.wk-beast .t-icon { color: var(--yolk-deeper); }
.wk-beast b { color: var(--ink); }
.wk-past { align-items: center; }
.wk-reg:empty { display: none; }

/* ---------- a challenge as a row (Challenges) or a card (This week) ---------- */

.ch-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: var(--t-gap); align-items: start; }
.ch-list { display: flex; flex-direction: column; gap: var(--t-gap); min-width: 0; }
.ch-sec { display: flex; flex-direction: column; gap: 8px; }
.ch-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.ch-sec-head h3 { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin: 0; }
.ch-sec-n { color: var(--ink-soft); font-weight: 600; }
.ch-sec-link { font-size: 0.9375rem; font-weight: 650; }
.ch-sec-empty { padding: 4px 2px; }
.ch-rows { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }

.ch-row, .ch-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 240px) 9.5rem; gap: 8px 18px; align-items: center;
  padding: 12px 14px; border: 1.5px solid var(--ink); border-radius: var(--t-radius);
  background: var(--paper-light); box-shadow: 0 var(--t-under) 0 var(--paper-shade);
}
.ch-card { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 14px; box-shadow: none; border-color: var(--rule); }
.ch-row.is-archived { border-style: dashed; box-shadow: none; }
.ch-row-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.teach .ch-row-title { color: var(--ink); font-weight: 750; font-size: 1.0625rem; text-decoration: none; overflow-wrap: anywhere; }
.ch-row-title:hover { text-decoration: underline; }
.ch-row-line { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 0.9375rem; color: var(--ink-soft); }
.ch-row-sub { font-size: 0.875rem; color: var(--ink-soft); }
.ch-row-status { font-weight: 650; color: var(--pond-deep); }
.ch-row-status.is-ended, .ch-row-status.is-archived { color: var(--ink-soft); }
.ch-who { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-weight: 600; }
.ch-row-prog { min-width: 0; }
.ch-prog { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ch-prog-t { font-size: 0.875rem; color: var(--ink-soft); }
.ch-prog-t b { color: var(--ink); }
.ch-prog--none { font-size: 0.875rem; color: var(--ink-soft); }
.ch-row-acts { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }

.ch-cov { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 12px; }
.ch-cov h3 { margin: 0; }
.ch-cov-n { font-size: 1rem; }

/* ---------- a challenge ---------- */

.ch-say { font-size: 1.0625rem; max-width: 80ch; }
.ch-status { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.ch-status--running { color: var(--leaf-deep); }
.ch-status--coming { color: var(--pond-deep); }
.ch-tabrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; border-bottom: 1.5px solid var(--ink); min-width: 0; }
.ch-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.ch-tabs::-webkit-scrollbar { display: none; }
.teach .ch-tab {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; margin-bottom: -1.5px;
  border: 1.5px solid var(--ink); border-bottom: none; border-radius: 10px 10px 0 0;
  background: var(--paper-deep); color: var(--ink); font: 650 0.9375rem/1.2 var(--t-font); text-decoration: none; white-space: nowrap;
}
.teach .ch-tab[aria-selected="true"] { background: var(--paper-light); box-shadow: inset 0 3px 0 var(--pond); border-bottom: 1.5px solid var(--paper-light); }
.ch-tab:hover { background: var(--paper); }
.ch-body { display: flex; flex-direction: column; gap: var(--t-gap); min-width: 0; }
.ch-sheet-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; margin-bottom: 10px; }
.ch-sheet-head h3 { margin: 0; font-size: 1.1875rem; }
.ch-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--t-gap); align-items: start; }
.ch-how { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 0.875rem; color: var(--ink-soft); }

.ch-where-bar { display: flex; min-height: 34px; border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; }
.ch-where-seg {
  display: flex; align-items: center; justify-content: center; min-width: max-content; padding: 4px 10px;
  font-weight: 700; font-size: 0.875rem; white-space: nowrap; flex-basis: 0;
}
.ch-where-seg + .ch-where-seg { border-left: 1.5px solid var(--ink); }
.ch-where-seg.is-done { background: var(--leaf); color: #fff; }
.ch-where-seg.is-way { background: var(--yolk-light); color: var(--ink); }
.ch-where-seg.is-not { background: repeating-linear-gradient(135deg, var(--paper-light) 0 6px, var(--paper-deep) 6px 9px); color: var(--ink); }
.ch-where-not { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }

.ch-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.ch-seg { display: inline-flex; padding: 3px; gap: 2px; border: 1.5px solid var(--rule); border-radius: 10px; background: var(--paper-deep); }
.ch-seg-btn { min-height: 38px; padding: 4px 14px; border: none; border-radius: 8px; background: transparent; color: var(--ink); font: 650 0.9375rem/1.2 var(--t-font); cursor: pointer; }
.ch-seg-btn[aria-pressed="true"] { background: var(--paper-light); box-shadow: 0 0 0 1.5px var(--ink); }
.ch-cprog { display: flex; flex-direction: column; gap: 3px; min-width: 7.5rem; }
.ch-wright { display: flex; flex-direction: column; gap: 3px; min-width: 8rem; }
.ch-wrote { display: inline; line-height: 1.8; }
.ch-wrote small, .wd-wrote small { color: var(--ink-soft); }
.ch-words { padding: 8px 12px; }
.ch-when h3 { margin: 0 0 10px; font-size: 1.1875rem; }
.ch-cal { border-collapse: collapse; font-size: 0.875rem; }
.ch-cal th, .ch-cal td { padding: 4px 6px; border-bottom: 1px solid var(--t-feint); text-align: center; white-space: nowrap; }
.ch-cal thead th { font-size: 0.75rem; color: var(--ink-soft); font-weight: 700; }
.ch-cal thead th small { font-weight: 600; }
.ch-cal thead th.is-holiday { background: repeating-linear-gradient(135deg, transparent 0 3px, rgba(42, 38, 51, 0.1) 3px 5px); }
.ch-cal tbody th { text-align: left; font-weight: 650; }
.teach .ch-cal tbody th a { color: var(--ink); }
.ch-cal-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ch-covpage { display: flex; flex-direction: column; gap: 12px; }
.ch-covpage h3 { margin: 0; }

/* the Words grid (progress.js): children × words, an egg in every cell */
.ch-grid-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ch-grid-scroll { overflow: auto; max-height: 72vh; max-width: 100%; border: 1.5px solid var(--rule); border-radius: 8px; background: var(--paper-light); }
.ch-grid { border-collapse: separate; border-spacing: 0; font-size: 0.875rem; }
.ch-grid th, .ch-grid td { padding: 0; border-bottom: 1px solid var(--t-feint); }
.ch-grid thead th { position: sticky; top: 0; z-index: 2; background: var(--paper-light); border-bottom: 1.5px solid var(--ink); vertical-align: bottom; }
.ch-grid tbody th, .ch-grid tfoot th { position: sticky; left: 0; z-index: 1; background: var(--paper-light); text-align: left; padding: 4px 12px 4px 10px; border-right: 1.5px solid var(--rule); min-width: 8rem; max-width: 12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.teach .ch-grid tbody th a { color: var(--ink); font-weight: 650; }
.ch-grid-corner { left: 0; z-index: 3 !important; text-align: left; padding: 8px 10px !important; border-right: 1.5px solid var(--rule); }
.ch-grid-col { width: 38px; min-width: 38px; }
.ch-grid-word { display: flex; align-items: flex-end; justify-content: center; width: 100%; padding: 10px 4px 8px; border: none; background: none; color: var(--ink); font: inherit; }
button.ch-grid-word { cursor: pointer; }
button.ch-grid-word:hover .ch-grid-w { text-decoration: underline; }
.ch-grid-w { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 0.9375rem; white-space: nowrap; max-height: 9.5rem; overflow: hidden; text-overflow: ellipsis; }
.ch-grid-cell { text-align: center; height: 36px; }
.ch-grid tbody tr:hover td, .ch-grid tbody tr:hover th { background: var(--yolk-light); }
.ch-grid tfoot th, .ch-grid tfoot td { border-top: 1.5px solid var(--ink); border-bottom: none; font-weight: 700; }
.ch-grid-total { text-align: center; padding: 6px 0 !important; font-variant-numeric: tabular-nums; }

/* ---------- New challenge ---------- */

.nc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: var(--t-gap); align-items: start; }
.nc-main { display: flex; flex-direction: column; gap: var(--t-gap); min-width: 0; }
.nc-sec { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.nc-h { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--font-display); font-variation-settings: var(--display-axes); font-size: 1.35rem; font-weight: 800; }
.nc-num { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--yolk); font-family: var(--t-font); font-size: 0.9375rem; font-weight: 800; }
.nc-from { margin: 0; }

.nc-src { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--paper-deep); width: fit-content; max-width: 100%; }
.nc-src-tab { min-height: 40px; padding: 6px 14px; border: 1.5px solid transparent; border-radius: 9px; background: transparent; color: var(--ink); font: 650 0.9375rem/1.2 var(--t-font); cursor: pointer; white-space: nowrap; }
.nc-src-tab:hover { background: var(--paper); }
.nc-src-tab[aria-selected="true"] { background: var(--paper-light); border-color: var(--ink); }
.nc-src-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nc-src-panel:focus { outline: none; }
.nc-wp-tools, .nc-packs-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.nc-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9375rem; font-weight: 600; }
.nc-check input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; margin: 0; }
.nc-sort .t-select, .nc-listsel .t-select { min-width: 0; }
.nc-find { flex: 1 1 12rem; min-width: 10rem; }
.nc-wp { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.nc-wp-row { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 4px 8px; border-bottom: 1px solid var(--t-feint); cursor: pointer; }
.nc-wp-row:hover { background: var(--paper); }
.nc-wp-row.is-on { background: var(--yolk-light); }
.nc-wp-row input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; margin: 0; }
.nc-wp-w { font-size: 1.0625rem; min-width: 0; overflow-wrap: anywhere; }
.nc-wp-sec { margin-left: auto; font-size: 0.8125rem; color: var(--ink-soft); white-space: nowrap; }
.nc-more { align-self: flex-start; font-weight: 650; }

.nc-packs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nc-pack { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: 12px; background: #fff; }
.nc-pack-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.nc-pack-top h4 { font-size: 1rem; }
.nc-pack-top small { white-space: nowrap; }
.nc-pack-rule { font-size: 0.9375rem; }
.nc-pack-words { font-size: 0.9375rem; color: var(--ink-soft); line-height: 1.6; }
.nc-pack-w { font-weight: 700; color: var(--ink); }
.nc-pack-w.is-on { background: var(--yolk-light); border-radius: 4px; padding: 0 2px; }
.nc-pack-acts { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.nc-pack-added { display: inline-flex; align-items: center; gap: 4px; color: var(--leaf-deep); font-weight: 700; font-size: 0.9375rem; }

.nc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nc-pick { display: inline-flex; align-items: center; min-height: 38px; padding: 2px 12px; border: 1.5px solid var(--ink-soft); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; }
.nc-pick:hover { border-color: var(--ink); }
.nc-pick[aria-pressed="true"] { background: var(--yolk-light); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.nc-earlier { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.nc-earlier-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; padding: 10px 0; border-bottom: 1px solid var(--t-feint); }
.nc-earlier-main { min-width: 0; flex: 1 1 18rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.nc-earlier-acc { font-size: 0.875rem; color: var(--ink-soft); }
.nc-earlier-words { flex-basis: 100%; font-family: var(--font-word); font-weight: 700; font-size: 0.9375rem; color: var(--ink-soft); overflow-wrap: anywhere; }

.nc-caution { display: flex; flex-direction: column; gap: 8px; }
.nc-caution:empty { display: none; }
.nc-caution-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.nc-caution-list li { display: flex; align-items: center; gap: 8px; }
.nc-caution-list input { width: 20px; height: 20px; accent-color: var(--ink); }

.nc-chosen { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1.5px dashed var(--ink-soft); border-radius: 12px; background: var(--paper); }
.nc-chosen-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.nc-chosen-head .t-btn { margin-left: auto; }
.nc-chosen-head .t-muted { font-size: 0.875rem; }
.nc-chosen-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.nc-chosen-list > li { display: inline-flex; align-items: center; gap: 4px; padding: 0 2px 0 12px; min-height: 36px; border: 1.5px solid var(--ink-soft); border-radius: 999px; background: #fff; max-width: 100%; }
.nc-chosen-list > li small { font-size: 0.75rem; color: var(--ink-soft); font-weight: 650; }
.nc-chosen-list > li.is-review { border-color: var(--yolk-deeper); background: var(--yolk-light); }
.nc-chosen-list > li.is-bad { border-color: var(--think-ink); background: var(--think-light); }
.nc-chosen-list > li.nc-chosen-empty { border: none; background: none; padding: 0; color: var(--ink-soft); font-size: 0.9375rem; }
.nc-review { display: flex; flex-direction: column; gap: 8px; }
.nc-sub-h { font-size: 1rem; margin: 4px 0 0; }

.nc-seg { display: flex; flex-wrap: wrap; gap: 6px; border: none; padding: 0; margin: 0; }
.nc-seg-opt { position: relative; display: inline-flex; cursor: pointer; }
.nc-seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.nc-seg-opt > span { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 16px; border: 1.5px solid var(--ink-soft); border-radius: 10px; background: #fff; font-weight: 650; }
.nc-seg-opt > span small { color: var(--ink-soft); font-weight: 700; }
.nc-seg-opt input:checked + span { background: var(--ink); color: var(--paper-light); border-color: var(--ink); }
.nc-seg-opt input:checked + span small { color: var(--paper-light); }
.nc-seg-opt input:focus-visible + span { outline: 3px solid var(--pond); outline-offset: 2px; }
.nc-who-body { display: flex; flex-direction: column; gap: 10px; }
.nc-gchips { display: flex; flex-wrap: wrap; gap: 6px; }
.nc-kids { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 2px 12px; }
.nc-kid-row { display: flex; align-items: center; gap: 8px; min-height: 38px; cursor: pointer; }
.nc-kid-row input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; margin: 0; }
.nc-kid-row small { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8125rem; }
.nc-more-kids summary { cursor: pointer; font-weight: 650; color: var(--pond-deep); min-height: 36px; display: flex; align-items: center; }
.nc-more-kids[open] summary { margin-bottom: 6px; }
.nc-also-set { border: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.nc-also-set legend { margin-bottom: 6px; }
.nc-also-set .t-hint { flex-basis: 100%; }
.nc-also:empty { display: none; }

.nc-dates { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.nc-dates .t-field { flex: 0 1 11rem; }
.nc-notest { min-height: 42px; }
.nc-goals { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.nc-goals legend { margin-bottom: 6px; }
.nc-goal { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border: 1.5px solid var(--rule); border-radius: 10px; background: #fff; cursor: pointer; }
.nc-goal.is-on { border-color: var(--ink); background: var(--yolk-light); }
.nc-goal.is-off { opacity: 0.6; cursor: not-allowed; }
.nc-goal > input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--ink); flex: none; }
.nc-goal-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nc-goal-b small { color: var(--ink-soft); font-size: 0.875rem; }
.nc-mini { width: 5rem; min-height: 34px; padding: 2px 8px; display: inline-block; margin: 0 4px; font-weight: 700; }
.nc-left { color: var(--ink-soft); font-size: 0.8125rem; }

.nc-side { position: sticky; top: 12px; min-width: 0; }
.nc-tray { display: flex; flex-direction: column; gap: 12px; }
.nc-sum { margin: 0; display: flex; flex-direction: column; }
.nc-sum > div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--t-feint); font-size: 0.9375rem; }
.nc-sum dt { font-weight: 700; color: var(--ink-soft); }
.nc-sum dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.nc-kid { padding: 12px 14px; border: 2px solid var(--ink); border-radius: 14px; background: var(--yolk); box-shadow: 0 3px 0 var(--yolk-deep); display: flex; flex-direction: column; gap: 2px; }
.nc-kid-k { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.nc-kid-t { font-family: var(--font-display); font-variation-settings: var(--display-axes); font-weight: 800; font-size: 1.2rem; line-height: 1.2; overflow-wrap: anywhere; }
.nc-kid-from { font-size: 0.875rem; font-weight: 600; }
.nc-kid-note { font-family: var(--font-word); font-size: 0.9375rem; overflow-wrap: anywhere; }
.nc-confirm { font-size: 1rem; }
/* A copied title to check, and what the new challenge clashes with. */
.nc-tray .t-field.is-check .t-input { border-color: var(--yolk-deeper); box-shadow: 0 0 0 3px var(--yolk-light); }
.nc-titlecheck, .nc-clash .t-note { font-size: 0.875rem; padding: 8px 10px; }
.nc-clash { display: flex; flex-direction: column; gap: 6px; }
.nc-clash:empty { display: none; }
.nc-tray .nc-set { width: 100%; white-space: normal; text-align: center; }
.nc-blockers { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.nc-blockers li { display: flex; gap: 6px; align-items: flex-start; font-size: 0.875rem; color: var(--think-ink); font-weight: 600; }
.nc-blockers li.is-info { color: var(--ink-soft); }
.nc-blockers .t-icon { margin-top: 2px; }
.nc-draft { display: flex; gap: 6px; align-items: flex-start; font-size: 0.8125rem; color: var(--ink-soft); }
.nc-draft .t-icon { margin-top: 1px; }
.nc-bar { display: none; }

/* ---------- the word sheet ---------- */

.wd-sheet .t-sdlg-head h2 .t-word { font-size: 1.75rem; }
.wd { display: flex; flex-direction: column; gap: 14px; }
.wd-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.wd-meta { font-size: 0.9375rem; color: var(--ink-soft); }
.wd-sec { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1.5px dashed var(--rule); }
.wd-k { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin: 0; }
.wd-v { display: flex; flex-direction: column; gap: 6px; }
.wd-wrote { line-height: 1.9; }
.wd-wrote-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.wd-wrote-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.wd-wrote-list small { color: var(--ink-soft); }
.wd-earlier { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.9375rem; }

/* ---------- narrower screens ---------- */

@media (max-width: 1100px) {
  .ch-layout { grid-template-columns: minmax(0, 1fr); }
  .ch-cov { position: static; }
  .ch-row { grid-template-columns: minmax(0, 1fr) minmax(150px, 200px) 9.5rem; }
}

@media (max-width: 1020px) {
  .wk-cols, .ch-cols { grid-template-columns: minmax(0, 1fr); }
  .nc { grid-template-columns: minmax(0, 1fr); }
  .nc-side { position: static; }
}

@media (max-width: 760px) {
  .wk-today { padding: 14px 14px 14px 22px; }
  .wk-say { font-size: 1.0625rem; }
  .wk-today-acts { justify-content: flex-start; width: 100%; }
  .wk-today-acts .t-btn { flex: 1 1 100%; }
  .wk-also-item { flex-wrap: wrap; }
  .wk-also-item .t-btn { margin-left: 28px; }
  .ch-row { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  .ch-row-acts { justify-content: flex-end; }
  .ch-tabrow { flex-wrap: wrap; }
  .teach .ch-tab { padding: 8px 12px; }
  .nc-wp { grid-template-columns: minmax(0, 1fr); }
  .nc-packs { grid-template-columns: minmax(0, 1fr); }
  .nc-src { width: 100%; }
  .nc-src-tab { flex: 1 1 auto; padding-inline: 10px; }
  .nc-tray .nc-set { display: none; }
  .nc-bar {
    position: fixed; left: 0; right: 0; bottom: var(--t-bottom-h); z-index: 55;
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    background: var(--paper-light); border-top: 1.5px solid var(--ink); box-shadow: 0 -3px 0 rgba(42, 38, 51, 0.08);
  }
  .nc-bar-text { flex: 1 1 auto; min-width: 0; min-height: 44px; border: none; background: none; text-align: left; color: var(--ink); font: 600 0.9375rem/1.25 var(--t-font); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0; }
  .nc-bar .t-btn { flex: none; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
  .nc { padding-bottom: 72px; }
  .nc-mini { width: 4.2rem; }
}

@media (max-width: 420px) {
  .ch-where-seg { font-size: 0.75rem; padding: 4px 6px; }
}

@media print {
  .wk-today, .wk-cols, .nc-bar { display: none; }
}

/* A challenge's Children table: the key to its Days marks (the register's). */
.ch-days-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; }
.ch-days-key .t-mk-legend { margin: 0; }
