/* Homework Mode · module styles on top of the Workshop Shadow Board (luminary.css).
   Kid pages: the bench holds the one job (current step, timer, Done); the plan is a strip of numbered steps
   that fill paint-yellow; the wall shows every assignment as a slot. Parent pages: quiet office ledgers.
   Tokens only. No new colors, no new type faces. */

/* ------------------------------------------------------------------ shared bits */
.hw .chip { position: relative; }
.hw .chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.hw .chip .icon { width: 1.1em; height: 1.1em; }
.row-tight { display: inline-flex; align-items: center; gap: 8px; }
.hw-back {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; min-height: 44px; padding-right: 8px;
  font-weight: 700; color: var(--ink-2); text-decoration: none; max-width: 100%;
}
.hw-back:hover { color: var(--ink); text-decoration: underline; }
.hw-back .icon { flex: none; }
.hw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--ink-2); }
.hw-meta .mono { font-size: .9rem; }
.hw-title { overflow-wrap: anywhere; }
.hw-plain { white-space: pre-wrap; overflow-wrap: anywhere; }
.hw-center { display: flex; justify-content: center; }
.hw-two { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.hw-narrow { max-width: 320px; }
.hw fieldset legend.section-title .hint, .hw label .hint { font-weight: 400; }
.hw .field label .hint { display: block; margin-top: 2px; }
.hw-due-pick { max-width: 240px; }

/* ------------------------------------------------------------------ benches */
.hw-bench h2.is-long, .hw-check h2 { font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2rem); line-height: 1.05; }
.hw-bench h2, .hw-check h2 { overflow-wrap: anywhere; }
.hw-bench-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.hw-bench-go .hint { max-width: 46ch; }
.hw-bench:focus { outline: none; }
.hw-bench:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* the turn-in check: a job tagged in safety yellow on the bench */
.hw-check { background: var(--paint-soft); border-color: var(--paint); }
.hw-check .bench-vise { background: var(--paint); color: var(--paint-ink); }
.hw-on-paint { color: var(--ink-2); }

/* finished: the job is hung up */
.hw-bench.is-hung .bench-vise { background: var(--paint); color: var(--paint-ink); }
.hw-turnin-q { padding-top: 14px; border-top: 1px solid var(--line); }
.hw-q { font-weight: 700; font-size: var(--step-1); }

/* movement break */
.hw-break .bench-vise { background: var(--good-soft); color: var(--good); }
.hw-break-move { font-size: var(--step-1); font-weight: 700; max-width: 40ch; }

/* focus timer: mono face + a tape that runs out */
.hw-timer { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 16px; }
.hw-timer .timer-face { font-size: clamp(2.2rem, 1.8rem + 2vw, 3rem); }
.hw-timer-controls { justify-content: flex-end; gap: 8px; }
.hw-timer-tape { grid-column: 1 / -1; }
.hw-timer-tape .tape-track { height: 12px; }
.hw-done { width: 100%; }
@media (min-width: 600px) { .hw-done { width: auto; min-width: 260px; } }
@media (max-width: 440px) {
  .hw-timer { grid-template-columns: 1fr; }
  .hw-timer-controls { justify-content: flex-start; }
}

/* ------------------------------------------------------------------ focus layout */
.hw-layout { display: grid; gap: 28px; align-items: start; }
@media (min-width: 1000px) { .hw-layout { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.hw-help, .hw-truth { display: flex; flex-wrap: wrap; gap: 10px; }

/* the plan: numbered steps that fill yellow when hung up */
.hw-steps { list-style: none; margin: 0; padding: 0; }
.hw-steps .step { grid-template-columns: 34px minmax(0, 1fr) auto; transition: border-color .15s ease, box-shadow .15s ease; }
.hw-steps .step .dot .icon { width: 16px; height: 16px; }
.hw-step-text { display: grid; gap: 2px; }
.hw-step-text .step-title { overflow-wrap: anywhere; line-height: 1.35; }
.hw-step-min { font: 500 .8rem var(--font-mono); color: var(--ink-3); }
.hw-step-actions form { display: flex; }
.hw-step-edit { grid-column: 1 / -1; display: grid; gap: 8px; }
.hw-step-edit-form { display: grid; grid-template-columns: minmax(0, 1fr) 76px auto; gap: 8px; align-items: center; }
.hw-step-tools { display: flex; gap: 4px; }
.hw-step-tools .btn { min-width: 44px; }
.hw-flip .icon { transform: rotate(180deg); }
.hw-min-input { text-align: center; }
.hw-step-add { display: grid; grid-template-columns: minmax(0, 1fr) 76px auto; gap: 8px; align-items: center; }
@media (max-width: 520px) {
  .hw-step-edit-form, .hw-step-add { grid-template-columns: minmax(0, 1fr) 76px; }
  .hw-step-edit-form input[name="text"], .hw-step-add input[name="text"] { grid-column: 1 / -1; }
}

/* disclosure rows (finish early, assignment details) */
.hw-more { border-top: 1px solid var(--line); padding-top: 4px; }
.hw-more > summary {
  display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none;
  font-weight: 700; color: var(--ink-2); border-radius: var(--r-sm);
}
.hw-more > summary::-webkit-details-marker { display: none; }
.hw-more > summary::before {
  content: ""; flex: none; width: 7px; height: 7px; margin: 0 3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease;
}
.hw-more[open] > summary::before { transform: rotate(45deg); }
.hw-more > summary:hover { color: var(--ink); }
.hw-more[open] > summary { margin-bottom: 10px; }
.hw-remove { margin-top: 12px; }

/* ------------------------------------------------------------------ finish photo */
.hw-file {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 76px;
  border: 1.5px dashed var(--outline); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.hw-file:hover { border-color: var(--blue); }
.hw-file:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.hw-file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.hw-file-icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: var(--r); background: var(--blue-soft); color: var(--blue); }
.hw-file-icon .icon { width: 26px; height: 26px; }
.hw-file-text { display: grid; gap: 2px; min-width: 0; }
.hw-photo { display: block; width: 100%; max-width: 440px; max-height: 340px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); }
.hw-photo[hidden] { display: none; }

/* ------------------------------------------------------------------ wall page */
/* two tools per row on a phone so the whole week fits on one wall */
.hw .wall { grid-template-columns: repeat(auto-fill, minmax(min(100%, 132px), 1fr)); }
@media (max-width: 520px) {
  .hw .board { padding: 14px 10px; }
  .hw .wall { gap: 14px 8px; }
  .hw .slot { min-height: 150px; padding-inline: 6px; }
  .hw .slot-art { width: 72px; height: 72px; }
}
.hw-add { padding-top: 24px; border-top: 1px solid var(--line); }
.hw-add-form { max-width: 720px; }

/* pick lists (stuck, honest) */
.hw-picklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hw-pick-btn {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 64px;
  padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease;
}
.hw-pick-btn:hover { border-color: var(--blue); }
.hw-pick-btn:active { transform: translateY(1px); }
.hw-pick-btn > .icon { color: var(--ink-3); }
.hw-pick-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r); background: var(--blue-soft); color: var(--blue); }
.hw-pick-text { display: grid; gap: 2px; }
.hw-pick-text strong, .hw-pick-text .subtle { overflow-wrap: anywhere; }
.hw-pick { cursor: pointer; grid-template-columns: auto minmax(0, 1fr); transition: border-color .15s ease, box-shadow .15s ease; }
.hw-pick input { width: 22px; height: 22px; accent-color: var(--blue); }
.hw-pick:hover { border-color: var(--ink-3); }
.hw-pick:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.hw-pick:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.hw-plan-list { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }

/* ------------------------------------------------------------------ tutor */
.hw-tutor { max-width: 780px; }
.hw-on { font: 500 .85rem var(--font-mono); color: var(--ink-2); overflow-wrap: anywhere; }
.hw-transparency { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-2); font-size: .95rem; }
.hw-transparency .icon { color: var(--blue); margin-top: 2px; }
.hw-chat { min-height: 120px; }
.hw .msg { overflow-wrap: anywhere; }
.hw .msg.me .msg-who { color: var(--blue-ink); }
.hw .msg.me a { color: var(--blue-ink); }
.hw .msg.ai.is-error { border-style: dashed; }
.hw .msg form { margin-top: 10px; }
.hw-thinking { color: var(--ink-3); }
.hw-starters .chip { font-weight: 700; }
.hw-composer {
  position: sticky; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); z-index: 5;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end;
  padding: 10px 0; background: var(--ground); border-top: 1px solid var(--line);
}
.hw-composer textarea { min-height: 52px; max-height: 40vh; resize: none; }
.hw-composer[data-busy="1"] textarea { background: var(--surface-2); }
@media (min-width: 900px) { .hw-composer { bottom: 0; } }
@media (max-width: 420px) { .hw-send-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.hw-msg-time { font: 500 .72rem var(--font-mono); }
.hw-flag { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; font-size: .85rem; color: var(--warn); }
.hw-guarded { margin-top: 8px; }
.hw-guarded > summary { font-size: .85rem; min-height: 36px; }

/* ------------------------------------------------------------------ parent office */
.hw-office .page-head { align-items: flex-end; }
.hw-line { color: var(--ink-2); }
.hw-line .num { font-family: var(--font-mono); color: var(--ink); }
.hw-office-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
.hw-ledger { list-style: none; margin: 0; padding: 0; display: grid; }
.hw-ledger-row { display: grid; gap: 8px 16px; padding: 12px 6px; border-bottom: 1px solid var(--line); grid-template-columns: minmax(0, 1fr); border-radius: var(--r-sm); }
.hw-ledger-row:last-child { border-bottom: 0; }
.hw-ledger-row:target { background: var(--blue-soft); }
@media (min-width: 900px) {
  .hw-ledger-row { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
  .hw-office-grid .hw-ledger-row { grid-template-columns: minmax(0, 1fr) auto; }
}
.hw-ledger-main { display: grid; gap: 2px; }
.hw-ledger-main strong, .hw-ledger-main .subtle { overflow-wrap: anywhere; }
.hw-ledger-facts { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: .9rem; }
.hw-ledger-facts a { display: inline-flex; align-items: center; gap: 4px; }
.hw-ledger-facts .pill .icon { width: 1em; height: 1em; }
.hw-ledger-actions { display: flex; gap: 6px; align-items: center; }
.hw-ledger-actions select { min-height: 36px; padding: 6px 10px; width: auto; max-width: 220px; }
.hw-office select { cursor: pointer; }

/* IC import review */
.hw-ic-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.hw-ic-row:last-child { border-bottom: 0; }
.hw-ic-check { display: grid; place-items: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.hw-ic-check input { width: 22px; height: 22px; accent-color: var(--blue); }
.hw-ic-fields { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .hw-ic-fields { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); } }
.hw-ic-meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ------------------------------------------------------------------ school AI rule + stuck (round 1) */
/* one-line rule/notes with a leading icon: the school's AI rule, held lumens, the teacher's OK */
.hw-rule, .hw-held, .hw-ok-line { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-2); max-width: 70ch; }
.hw-rule .icon, .hw-ok-line .icon { flex: none; margin-top: 2px; color: var(--blue); }
.hw-held { color: var(--ink); }
.hw-held .icon { flex: none; margin-top: 2px; color: var(--ink-2); }
.hw-held .num { font-family: var(--font-mono); }
.hw-stuck { max-width: 780px; }
.hw-stuck .hw-rule { color: var(--ink); font-size: var(--step-0); }
a.hw-pick-btn { text-decoration: none; }
a.hw-pick-btn:hover strong { text-decoration: underline; }
.hw-pick-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hw-teacher { padding-top: 20px; border-top: 1px solid var(--line); }
.hw-teacher-form { max-width: 640px; }
.hw-question .stack-sm { flex: 1; }
.hw-question form { display: flex; }

/* the disclosure line he copies onto permitted work */
.hw-disclose { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r); background: var(--good-soft); }
.hw-disclose-head { display: flex; align-items: flex-start; gap: 8px; font-size: .95rem; }
.hw-disclose-head .icon { flex: none; margin-top: 2px; color: var(--good); }
.hw-disclose-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
.hw-quote { margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-weight: 700;
  overflow-wrap: anywhere; user-select: all; }
.hw-disclose [data-copy][data-copied="1"] { border-color: var(--good); color: var(--good); }
@media (max-width: 440px) { .hw-disclose-line { grid-template-columns: 1fr; } .hw-disclose-line .btn { justify-self: start; } }

/* parent office: permissions, per-row edit, checkbox rows */
.hw-check-row { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding-top: 4px; cursor: pointer; }
.hw-check-row input { width: 22px; height: 22px; flex: none; accent-color: var(--blue); }
.hw-ledger-row.is-off .hw-ledger-main strong { color: var(--ink-2); }
.hw-row-edit { grid-column: 1 / -1; }
.hw-row-edit > summary { min-height: 40px; font-size: .9rem; }
.hw-row-edit form { max-width: 720px; padding-bottom: 6px; }
.hw-office .panel h3.label { margin-top: 8px; }

/* IC import: conflict rows and the save row (the long label wraps instead of poking past the panel at 390px) */
.hw-ic-conflict { background: var(--warn-soft); border-radius: var(--r); padding-inline: 10px; }
.hw-ic-conflict .hw-ic-check { color: var(--warn); }
.hw-ic-title { overflow-wrap: anywhere; }
.hw-ic-choice { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; }
.hw-ic-choice .chip { position: relative; }
.hw-ic-choice .chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.hw-ic-save .btn { white-space: normal; text-align: start; max-width: 100%; }
@media (max-width: 480px) { .hw-ic-save .btn { width: 100%; justify-content: center; text-align: center; } }

/* ------------------------------------------------------------------ answered truths (ideas round 1) */
/* Parent office: one truth and the one-tap answer. Renders on /homework/manage#honesty and on the parent module's
   Tonight page (this sheet is linked on every page), so every rule is scoped under .hw-truth*. A container query
   (not the viewport) decides one or two columns, so it fits whatever column the host page gives it. */
.hw-truths { display: grid; }
.hw-truth { container-type: inline-size; min-width: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.hw-truths > .hw-truth:first-child { padding-top: 4px; }
.hw-truths > .hw-truth:last-child { border-bottom: 0; padding-bottom: 0; }
.hw-truth-in { display: grid; gap: 12px; }
@container (min-width: 720px) { .hw-truth-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px 28px; align-items: start; } }
.hw-truth-what { display: grid; gap: 4px; min-width: 0; justify-items: start; }
.hw-truth-what p { margin: 0; overflow-wrap: anywhere; }
.hw-truth-h { font: 700 var(--step-0)/1.35 var(--font-body); overflow-wrap: anywhere; }
.hw-truth-items { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; justify-self: stretch; }
.hw-truth-items li { display: grid; grid-template-columns: 10ch minmax(0, 1fr); gap: 10px; align-items: baseline; }
.hw-truth-items .mono { color: var(--ink-2); font-size: .85rem; }
.hw-truth-moved { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r); background: var(--warn-soft); color: var(--ink); font-weight: 700; }
.hw-truth-moved .icon, .hw-truth-said .icon { flex: none; margin-top: 3px; }
.hw-truth-form { display: grid; gap: 12px; min-width: 0; }
.hw-truth-form .field label .hint { display: inline; margin: 0 0 0 4px; }
.hw-truth-chips { display: grid; gap: 8px; }
.hw-truth-chips legend { margin-bottom: 8px; }
.hw-chip-btn { justify-content: flex-start; min-height: 44px; white-space: normal; text-align: start; line-height: 1.3; }
.hw-chip-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hw-truth-form.htmx-request .hw-chip-btn { opacity: .6; }
.hw-together { display: grid; grid-template-columns: minmax(0, 1fr) minmax(10rem, auto); gap: 8px; }
.hw-together select { width: auto; min-width: 10rem; cursor: pointer; }
@container (max-width: 440px) { .hw-together { grid-template-columns: 1fr; } .hw-together select { width: 100%; } }
.hw-truth-how { padding-top: 0; }
.hw-truth-how > summary { min-height: 44px; font-size: .95rem; }
.hw-truth-how ol { margin: 0 0 4px; padding-left: 1.4em; display: grid; gap: 2px; }
.hw-truth-said { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); background: var(--good-soft); color: var(--ink); }
.hw-truth-said .icon { color: var(--good); }
.hw-truth-said p { margin: 0; overflow-wrap: anywhere; }
.hw-truth-said .subtle { color: var(--ink-2); }
.hw-truth-confirm { display: grid; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--warn-soft); color: var(--ink); }
.hw-truth-confirm p { margin: 0; overflow-wrap: anywhere; }
.hw-truth-confirm .subtle { color: var(--ink-2); }

/* learner: the Answered strip on /homework/honest. A parent's answer is a note pinned on the board, not a grade. */
.hw-answers { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hw-answer { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.hw-answer-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r); background: var(--good-soft); color: var(--good); }
.hw-answer-body { display: grid; gap: 4px; }
.hw-answer-body p { margin: 0; overflow-wrap: anywhere; }
.hw-answer-note { font-weight: 700; }
.hw-answer-acks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.hw-answer-acks form { display: flex; }
.hw-answer-ack { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.hw-answer-ack .icon, .hw-got-answer .icon { flex: none; color: var(--good); }
.hw-got-answer { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-weight: 700; }
.hw-got-answer .icon { margin-top: 3px; }

/* ------------------------------------------------------------------ catch-up plan */
.hw-cu { max-width: 900px; }
.hw-free { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-weight: 700; color: var(--ink); }
.hw-free .icon { flex: none; margin-top: 3px; color: var(--ink-2); }

/* the week as pegboard hooks, two per day: each day picked hangs a tag in safety yellow (a 200ms state change) */
.hw-week {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 10px 8px 12px;
  border-radius: var(--r-lg); border: 1px solid var(--line); background-color: var(--board);
  background-image: radial-gradient(circle at 50% 50%, var(--board-hole) 0 1.5px, transparent 2px); background-size: 14px 14px;
}
.hw-week-day { display: grid; justify-items: center; gap: 6px; min-width: 0; }
.hw-week-dow { font: 700 .72rem var(--font-body); color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
.hw-week-hooks { display: flex; gap: 4px; }
.hw-hook { width: 14px; height: 22px; border-radius: 2px 2px 5px 5px; border: 1.5px solid var(--outline); background: var(--board); transition: background-color .2s ease, border-color .2s ease; }
.hw-hook.is-on { background: var(--paint); border-color: var(--paint); }
.hw-week-day.is-off .hw-hook { border-style: dashed; border-color: var(--ink-3); }
.hw-week-day.is-off .hw-week-dow { color: var(--ink-3); }

.hw-cu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hw-cu-row { display: grid; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.hw-cu-row.has-error { border-color: var(--warn); }
.hw-cu-row > p { margin: 0; }
.hw-cu-top { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.hw-cu-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r); background: var(--blue-soft); color: var(--blue); }
.hw-cu-what { display: grid; gap: 4px; }
.hw-cu-title { overflow-wrap: anywhere; line-height: 1.3; }
.hw-cu-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--ink-2); }
.hw-cu-meta .mono { font-size: .85rem; }

/* "First": the job that goes on the bench first wears the safety-yellow tag */
.hw-cu-first {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 6px 12px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 700; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.hw-cu-first > span { display: inline-flex; align-items: center; gap: 6px; }
.hw-cu-first input { position: absolute; opacity: 0; pointer-events: none; }
.hw-cu-first .icon { width: 1em; height: 1em; }
.hw-cu-first:hover { border-color: var(--ink-3); color: var(--ink); }
.hw-cu-first:has(input:checked) { background: var(--paint); border-color: var(--paint); color: var(--paint-ink); }
.hw-cu-first:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* day chips: seven across, 44px+ each even at 390px */
.hw-cu-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.hw-day {
  position: relative; display: grid; justify-items: center; align-content: center; min-width: 0; min-height: 52px; padding: 4px 0;
  border-radius: var(--r); border: 1px solid var(--field-line); background: var(--surface); color: var(--ink); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, opacity .15s ease;
}
.hw-day input { position: absolute; opacity: 0; pointer-events: none; }
.hw-day-dow { font: 700 .7rem var(--font-body); color: var(--ink-2); text-transform: uppercase; letter-spacing: .02em; }
.hw-day-num { font: 500 1.05rem/1.2 var(--font-mono); font-variant-numeric: tabular-nums; }
.hw-day:hover { border-color: var(--blue); }
.hw-day.is-today .hw-day-dow { color: var(--blue); }
.hw-day:has(input:checked) { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.hw-day:has(input:checked) .hw-day-dow { color: var(--blue-ink); }
.hw-day:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.hw-day:has(input:disabled) { cursor: not-allowed; opacity: .4; border-style: dashed; }
.hw-day:has(input:disabled):hover { border-color: var(--field-line); }
.hw-cu-days .hw-day.is-off { opacity: 1; background: transparent; color: var(--ink-3); }
.hw-cu-days .hw-day.is-off .hw-day-dow { color: var(--ink-3); }
.hw-cu-days .hw-day.is-off .hw-day-num { font-size: .78rem; }

.hw-cu-moved { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r); background: var(--warn-soft); font-weight: 700; }
.hw-cu-moved .icon { flex: none; margin-top: 3px; }
.hw-cu-ask .hint { display: block; }
@media (min-width: 760px) {
  .hw-cu-row { grid-template-columns: minmax(0, 1fr) 392px; gap: 10px 20px; align-items: start; }
  .hw-cu-row > * { grid-column: 1; }
  .hw-cu-row > .hw-cu-days { grid-column: 2; grid-row: 1 / span 2; }
}

/* the saved plan */
.hw-cu-plan { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.hw-cu-plan > li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hw-cu-plan-day { display: grid; align-content: start; }
.hw-cu-plan-day .mono { color: var(--ink-2); font-size: .85rem; }
.hw-cu-plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hw-cu-plan ul li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; overflow-wrap: anywhere; }
.hw-cu-plan .pill .icon { width: 1em; height: 1em; }
@media (max-width: 440px) {
  .hw-cu-plan > li { grid-template-columns: minmax(0, 1fr); }
  .hw-cu-plan-day { display: flex; gap: 8px; align-items: baseline; }
}

/* the entry point on /homework */
.hw-cu-banner {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px 14px; align-items: center; padding: 14px 16px;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
}
.hw-cu-banner p { margin: 0; }
.hw-cu-banner .btn { grid-column: 1 / -1; justify-self: start; white-space: normal; text-align: start; }
.hw-cu-banner-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r); background: var(--paint); color: var(--paint-ink); }
@media (min-width: 760px) { .hw-cu-banner { grid-template-columns: 44px minmax(0, 1fr) auto; } .hw-cu-banner .btn { grid-column: auto; } }
.hw-cu-line { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: var(--ink-2); }
.hw-cu-line .icon { flex: none; margin-top: 3px; color: var(--blue); }

/* ------------------------------------------------------------------ audit round 2 */
/* parent dashboard panel lists (on the parent module's page): long titles and pasted links wrap inside the panel */
.hw-panel-list { margin: 0; padding-left: 1.1em; overflow-wrap: anywhere; }

/* "Any homework tonight?" on /homework: the empty state's second answer, and the quiet line once he's answered */
.hw-ask p { margin: 0; }
.hw-ask-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hw-ask-actions form { display: flex; }
.hw-add-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; color: var(--ink-2); }
.hw-add-ask form { display: flex; }

/* Tell it straight: "Something not on my wall" */
.hw-new { display: grid; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); border: 1.5px dashed var(--outline); background: var(--surface); min-width: 0; }
.hw-new.is-open { border-style: solid; border-color: var(--line); }
.hw-new > summary { min-height: 44px; }
.hw-new .hint { margin: 0; }
.hw-new .field { max-width: 560px; }

/* Campus import: how long the read has been going, and the way out */
.hw-ic-wait { display: grid; justify-items: center; gap: 10px; padding: 0 16px 20px; text-align: center; }
.hw-ic-wait .mono { color: var(--ink-2); font-size: .85rem; font-variant-numeric: tabular-nums; }

/* parent office: one-tap "Confirm class" on a row the tutor gate is holding */
.hw-confirm-class { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.hw-confirm-class form { display: flex; }
.hw-confirm-class .btn { white-space: normal; text-align: start; }
