/* Teacher programme view and school intervention report.
   Mobile-first; tokens from tokens.css (dark default, light via data-theme). */
.iv-top { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border, rgba(212,160,23,.18)); }
.iv-logo { font-family: var(--font-display); font-weight: 700; color: var(--gold, #c9a84c); text-decoration: none; }
.iv-logo span { color: var(--text, #F0EDE6); font-weight: 600; }
.iv-nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .9rem; }
.iv-nav a { color: var(--muted, #9aa3b2); text-decoration: none; padding: .25rem 0; }
.iv-nav a[aria-current="page"], .iv-nav a:hover { color: var(--gold, #c9a84c); }
.iv-main { max-width: 1200px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.iv-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-end; margin-bottom: 1rem; }
.iv-kicker { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold, #c9a84c); margin: 0 0 .25rem; }
.iv-title { font-family: var(--font-display); font-size: 1.6rem; margin: 0; }
.iv-sub { color: var(--muted, #9aa3b2); font-size: .88rem; margin: .4rem 0 0; max-width: 60ch; }
.iv-picker { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; }
.iv-picker select, .iv-row input, .iv-decide select, .iv-decide input { padding: .55rem .75rem; border-radius: 8px; background: var(--navy2, #111d33); color: inherit; border: 1.5px solid var(--border, rgba(212,160,23,.18)); font: inherit; }
.iv-status { min-height: 1.25rem; color: var(--muted, #9aa3b2); }
.iv-status.bad { color: var(--bad, #E74C3C); }
.iv-card { background: var(--navy2, #111d33); border: 1px solid var(--border, rgba(212,160,23,.18)); border-radius: 12px; padding: 1.1rem 1.1rem 1.25rem; margin-bottom: 1rem; }
.iv-card h2 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 .5rem; }
.iv-card-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between; align-items: baseline; }
.iv-note, .iv-muted { color: var(--muted, #9aa3b2); font-size: .85rem; }
.iv-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.iv-btn { background: var(--gold, #c9a84c); color: #0b1628; border: 0; border-radius: 8px; padding: .55rem .9rem; font-weight: 600; font: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
.iv-btn:focus-visible, .iv-nav a:focus-visible, .iv-grid a:focus-visible { outline: 2px solid var(--gold, #c9a84c); outline-offset: 2px; }
.iv-btn-ghost { background: transparent; color: var(--gold, #c9a84c); border: 1.5px solid var(--gold, #c9a84c); }
.iv-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1rem; }
.iv-stat { background: var(--navy2, #111d33); border: 1px solid var(--border, rgba(212,160,23,.18)); border-radius: 12px; padding: .9rem 1rem; }
.iv-stat-n { display: block; font-family: var(--font-display); font-size: 1.8rem; color: var(--gold, #c9a84c); line-height: 1.1; }
.iv-stat-l { font-size: .8rem; color: var(--muted, #9aa3b2); }
.iv-links { list-style: none; padding: 0; margin: 0; }
.iv-links li { display: flex; justify-content: space-between; gap: .75rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--border, rgba(212,160,23,.18)); }
.iv-links li:last-child { border-bottom: 0; }
.iv-legend { font-size: .8rem; color: var(--muted, #9aa3b2); margin: .5rem 0 .75rem; line-height: 2; }
.iv-sep { display: inline-block; width: .9rem; }
.iv-grid-wrap { overflow-x: auto; }
.iv-grid { border-collapse: collapse; font-size: .82rem; min-width: 100%; }
.iv-grid th, .iv-grid td { padding: .35rem .3rem; text-align: center; border-bottom: 1px solid var(--border, rgba(212,160,23,.12)); }
.iv-grid th[scope="row"] { text-align: left; white-space: nowrap; }
.iv-grid th[scope="row"] a { color: inherit; }
.iv-rot { height: 8.5rem; vertical-align: bottom; }
.iv-rot span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-weight: 500; font-size: .75rem; }
.iv-next { text-align: left !important; min-width: 12rem; }
.iv-cell { display: inline-block; min-width: 1.6rem; border-radius: 6px; font-weight: 700; }
td.iv-cell { display: table-cell; }
.lv-none { color: var(--muted, #9aa3b2); }
.lv-thin { background: rgba(154,163,178,.14); }
.lv-insecure { background: rgba(231,76,60,.22); color: #ffb4ab; }
.lv-developing { background: rgba(243,156,18,.22); color: #ffd699; }
.lv-secure { background: rgba(46,204,113,.2); color: #9af0bd; }
.lv-mastered { background: rgba(46,204,113,.38); color: #d8ffe8; }
.lv-untaught { color: var(--muted, #9aa3b2); opacity: .6; }
.iv-flag { box-shadow: inset 0 0 0 2px var(--bad, #E74C3C); }
:root[data-theme="light"] .lv-insecure { color: #9b1c12; }
:root[data-theme="light"] .lv-developing { color: #8a5300; }
:root[data-theme="light"] .lv-secure, :root[data-theme="light"] .lv-mastered { color: #166534; }
.iv-alert { color: var(--bad, #E74C3C); font-weight: 500; }
.iv-details summary { cursor: pointer; font-weight: 600; margin: .5rem 0; }
.iv-concept { border-top: 1px solid var(--border, rgba(212,160,23,.12)); padding: .75rem 0; }
.iv-concept p { margin: .3rem 0; font-size: .9rem; }
.iv-mis, .iv-steps { margin: .3rem 0 .3rem 1.1rem; font-size: .85rem; }
.iv-decided { color: var(--gold, #c9a84c); }
.iv-decide { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin-top: .5rem; font-size: .82rem; }
.iv-decide label { display: flex; flex-direction: column; gap: .2rem; }
.iv-reason { flex: 1 1 14rem; }
@media (min-width: 769px) {
  .iv-main { padding: 2rem 1.5rem 4rem; }
  .iv-stats { grid-template-columns: repeat(4, 1fr); }
  .iv-title { font-size: 2rem; }
}

/* ── School report (print-first) ── */
.rp { max-width: 820px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.rp h1 { font-family: var(--font-display); font-size: 1.7rem; margin: 0 0 .25rem; }
.rp h2 { font-family: var(--font-display); font-size: 1.2rem; margin: 1.75rem 0 .5rem; border-bottom: 1px solid var(--border, rgba(212,160,23,.25)); padding-bottom: .3rem; }
.rp h3 { font-size: 1rem; margin: 1rem 0 .3rem; }
.rp table { border-collapse: collapse; width: 100%; font-size: .85rem; margin: .5rem 0; }
.rp th, .rp td { border: 1px solid var(--border, rgba(212,160,23,.2)); padding: .35rem .5rem; text-align: left; vertical-align: top; }
.rp .rp-meta { color: var(--muted, #9aa3b2); font-size: .88rem; }
.rp .rp-caveat { font-size: .82rem; color: var(--muted, #9aa3b2); border-left: 3px solid var(--gold, #c9a84c); padding: .4rem .75rem; margin: .75rem 0; }
.rp .rp-empty { font-style: italic; color: var(--muted, #9aa3b2); }
.rp-actions { display: flex; gap: .5rem; margin: 1rem 0; }
@media print {
  .iv-top, .rp-actions { display: none !important; }
  body { background: #fff !important; color: #111 !important; }
  .rp th, .rp td { border-color: #bbb; }
  .rp h2 { border-color: #bbb; }
  .rp .rp-meta, .rp .rp-caveat { color: #444; }
  .rp section { break-inside: avoid-page; }
}
