/* ─────────────────────────────────────────────────────────────────────
   Teacher workbook — shared styles (2026-10-10)

   The four TH pages that turn teacher-filled parts of the Academic
   Services 26-27 documents into online forms: /lesson-plan,
   /teaching-log, /appraisal-prep, /practice-notes. Built on the
   Staffroom tokens (partials/staffroom.css, --sr-*). Records live in
   teacher_workbook and are the teacher's own. Never targets .page-hero*.
   ───────────────────────────────────────────────────────────────────── */
.page-hero__inner, .page-footer__inner, .page-footer__meta, .page-wrap {
  width: 100%; max-width: var(--container-max);
  padding-left: 0 !important; padding-right: 0 !important;
  margin-left: auto; margin-right: auto;
}
body:has(> .page-footer) > .page-hero,
body:has(> .page-footer) > .page-wrap { width: 100% !important; align-self: stretch !important; }
.page-wrap { padding: 28px 0 88px; }
@media (max-width: 1240px) {
  .page-hero__inner, .page-footer__inner, .page-footer__meta, .page-wrap { padding-left: 20px !important; padding-right: 20px !important; }
}
@media (max-width: 640px) {
  .page-hero__inner, .page-footer__inner, .page-footer__meta, .page-wrap { padding-left: 16px !important; padding-right: 16px !important; }
}

/* info strip */
.wb-strip {
  background: #fff; border: 1px solid var(--sr-rule, #e4e0d6); border-left: 4px solid var(--sr-board, #1f4d3a);
  border-radius: 14px; padding: 16px 20px; margin-bottom: 22px; font-size: 14px; color: var(--sr-ink-2, #4a5450); line-height: 1.55;
}
.wb-strip p { margin: 0 0 8px; }
.wb-strip p:last-child { margin-bottom: 0; }
.wb-strip a { color: var(--sr-board, #1f4d3a); font-weight: 600; }
.wb-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wb-pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--sr-chalk, #f7f5ef); border: 1px solid var(--sr-rule, #e4e0d6); color: var(--sr-ink-2, #4a5450); }
.wb-pill--private { background: var(--sr-board-soft, #e7efe9); border-color: var(--sr-board-line, #c9dccf); color: var(--sr-board, #1f4d3a); }

/* layout: list + editor */
.wb-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .wb-layout { grid-template-columns: 1fr; } }

.wb-list {
  background: #fff; border: 1px solid var(--sr-rule, #e4e0d6); border-radius: 14px;
  padding: 16px; position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto;
}
@media (max-width: 960px) { .wb-list { position: static; max-height: none; } }
.wb-list__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.wb-list__head h2 { font-family: var(--sr-font-head, inherit); font-size: 16px; font-weight: 800; margin: 0; }
.wb-list__filter { width: 100%; height: 38px; margin-bottom: 10px; padding: 0 10px; border: 1px solid var(--sr-rule, #e4e0d6); border-radius: 9px; font: inherit; font-size: 13.5px; background: #fff; }
.wb-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wb-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; background: var(--sr-chalk, #f7f5ef);
  font: inherit; color: var(--sr-ink, #1c2421);
}
.wb-item:hover { border-color: var(--sr-board-line, #c9dccf); }
.wb-item.is-active { background: var(--sr-board-soft, #e7efe9); border-color: var(--sr-board, #1f4d3a); }
.wb-item b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.wb-item span { font-size: 12px; color: var(--sr-ink-3, #6b7470); }
.wb-empty { font-size: 13.5px; color: var(--sr-ink-3, #6b7470); padding: 8px 2px; }

.wb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border-radius: 10px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--sr-rule, #e4e0d6); background: #fff; color: var(--sr-ink, #1c2421);
}
.wb-btn:hover { border-color: var(--sr-board, #1f4d3a); color: var(--sr-board, #1f4d3a); }
.wb-btn--primary { background: var(--sr-board, #1f4d3a); border-color: var(--sr-board, #1f4d3a); color: #fff; }
.wb-btn--primary:hover { background: var(--sr-board-deep, #14301f); color: #fff; }
.wb-btn--danger:hover { border-color: var(--sr-risk, #b91c1c); color: var(--sr-risk, #b91c1c); }
.wb-btn:disabled { opacity: .55; cursor: not-allowed; }
.wb-btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; }

/* editor */
.wb-editor { min-width: 0; }
.wb-toolbar {
  position: sticky; top: 64px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(247,245,239,.96); padding: 10px 0 12px; margin-bottom: 4px; border-bottom: 1px solid var(--sr-rule, #e4e0d6);
}
.wb-toolbar__title { flex: 1; min-width: 180px; font-family: var(--sr-font-head, inherit); font-weight: 800; font-size: 18px; }
.wb-status { font-size: 13px; color: var(--sr-ink-3, #6b7470); }
.wb-status.is-dirty { color: var(--sr-amber-ink, #b45309); font-weight: 600; }
.wb-status.is-ok { color: var(--sr-ok, #15803d); }
.wb-status.is-err { color: var(--sr-risk, #b91c1c); }

.wb-type { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.wb-type button {
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--sr-rule, #e4e0d6); background: #fff; color: var(--sr-ink-2, #4a5450);
}
.wb-type button.is-on { background: var(--sr-board, #1f4d3a); border-color: var(--sr-board, #1f4d3a); color: #fff; }

.wb-card {
  background: #fff; border: 1px solid var(--sr-rule, #e4e0d6); border-radius: 14px;
  padding: 20px 22px; margin-top: 16px;
}
.wb-card h3 { font-family: var(--sr-font-head, inherit); font-size: 16.5px; font-weight: 800; margin: 0 0 4px; }
.wb-card__intro { font-size: 13.5px; color: var(--sr-ink-3, #6b7470); margin: 0 0 14px; line-height: 1.5; }
.wb-card__intro em { font-style: normal; color: var(--sr-ink-2, #4a5450); }
.wb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.wb-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .wb-grid, .wb-grid--3 { grid-template-columns: 1fr; } }
.wb-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wb-field--wide { grid-column: 1 / -1; }
.wb-field label, .wb-field .wb-label { font-size: 13px; font-weight: 600; color: var(--sr-ink, #1c2421); }
.wb-field .wb-hint { font-size: 12px; color: var(--sr-ink-3, #6b7470); margin-top: -2px; }
.wb-field input[type=text], .wb-field input[type=date], .wb-field input[type=number], .wb-field select, .wb-field textarea {
  width: 100%; border: 1px solid var(--sr-rule, #e4e0d6); border-radius: 9px; background: #fff;
  font: inherit; font-size: 14.5px; color: var(--sr-ink, #1c2421); padding: 9px 11px; outline: none;
}
.wb-field input, .wb-field select { min-height: 42px; }
.wb-field textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.wb-field :is(input, select, textarea):focus { border-color: var(--sr-board, #1f4d3a); box-shadow: 0 0 0 3px rgba(31,77,58,.13); }

.wb-phase { border: 1px solid var(--sr-rule, #e4e0d6); border-radius: 12px; padding: 14px 16px; margin-top: 12px; background: #fcfbf8; }
.wb-phase__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.wb-phase__head b { font-family: var(--sr-font-head, inherit); font-size: 15px; }
.wb-phase__head span { font-size: 12px; color: var(--sr-ink-3, #6b7470); }

.wb-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wb-checks label { display: flex; align-items: flex-start; gap: 10px; padding: 8px 6px; border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 1.45; }
.wb-checks label:hover { background: var(--sr-chalk, #f7f5ef); }
.wb-checks input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--sr-board, #1f4d3a); flex-shrink: 0; }
.wb-checks--inline { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.wb-yn { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; }
.wb-yn > span { font-size: 14px; line-height: 1.45; padding: 6px 0; border-bottom: 1px dashed var(--sr-rule, #e4e0d6); }
.wb-yn__opts { display: flex; gap: 4px; border-bottom: 1px dashed var(--sr-rule, #e4e0d6); padding: 4px 0; }
.wb-yn__opts label { position: relative; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--sr-rule, #e4e0d6); cursor: pointer; }
/* visually hidden, still focusable + operable with the keyboard */
.wb-yn__opts input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.wb-yn__opts label:has(input:focus-visible) { outline: 3px solid var(--sr-amber, #f59e0b); outline-offset: 2px; }
.wb-yn__opts input:checked + span { color: #fff; }
.wb-yn__opts label:has(input:checked) { background: var(--sr-board, #1f4d3a); border-color: var(--sr-board, #1f4d3a); color: #fff; }
.wb-yn__opts label.is-no:has(input:checked) { background: var(--sr-amber-ink, #b45309); border-color: var(--sr-amber-ink, #b45309); }

.wb-note { font-size: 13px; color: var(--sr-ink-2, #4a5450); background: var(--sr-amber-soft, #fdf3e1); border: 1px solid #f6d9a6; border-radius: 10px; padding: 10px 12px; margin-top: 12px; line-height: 1.5; }
.wb-source { font-size: 12.5px; color: var(--sr-ink-3, #6b7470); margin-top: 18px; }
.wb-source a { color: var(--sr-board, #1f4d3a); font-weight: 600; }
.wb-blank { background: #fff; border: 1px dashed var(--sr-board-line, #c9dccf); border-radius: 14px; padding: 40px 24px; text-align: center; color: var(--sr-ink-2, #4a5450); }
.wb-blank b { display: block; font-family: var(--sr-font-head, inherit); font-size: 18px; color: var(--sr-ink, #1c2421); margin-bottom: 6px; }
.wb-loading { padding: 40px; text-align: center; color: var(--sr-ink-3, #6b7470); }
[hidden] { display: none !important; }

/* print view — a clean read-only copy of the record (Print / Save as PDF) */
#wbPrint { display: none; }
@media print {
  @page { size: A4; margin: 16mm 14mm; }
  body > *:not(#wbPrint) { display: none !important; }
  #wbPrint { display: block !important; font-family: "DM Sans", Arial, sans-serif; color: #111; font-size: 11pt; line-height: 1.45; }
  #wbPrint h1 { font-size: 16pt; margin: 0 0 2pt; }
  #wbPrint .pv-meta { font-size: 9.5pt; color: #555; margin-bottom: 10pt; }
  #wbPrint h2 { font-size: 12pt; margin: 12pt 0 4pt; padding-bottom: 2pt; border-bottom: 1px solid #999; break-after: avoid; }
  #wbPrint h3 { font-size: 11pt; margin: 8pt 0 3pt; break-after: avoid; }
  #wbPrint .pv-row { display: grid; grid-template-columns: 34% 1fr; gap: 6pt; padding: 3pt 0; border-bottom: 1px solid #e3e3e3; break-inside: avoid; }
  #wbPrint .pv-row b { font-weight: 600; }
  #wbPrint .pv-val { white-space: pre-wrap; }
  #wbPrint .pv-entry { break-inside: avoid; margin-bottom: 10pt; }
  #wbPrint .pv-foot { margin-top: 14pt; font-size: 8.5pt; color: #666; }
}
