/* ============================================================
   HARVEST · PLACEMENT REPORT
   Parent Summary (the default view) and Educator Detail.

   Rewritten 2026-10-19 with js/engine/report.js (HARVEST_REPAIR.md, step 7). The ten-day plan
   table, the letter heat map, the per-domain percentage bars, the confidence "SEM" line and the
   placement card are gone with the code that drew them. The print rules for this page live in
   print.css, which is what holds the Parent Summary to one Letter page.
   ============================================================ */

.report {
  max-width: 900px;
  margin: 0 auto;
  font-family: var(--font-body);
  color: var(--ink);
}

/* ─── The two views ───────────────────────────────────────────── */
.report.report-parent-view .educator-detail { display: none; }
.report.report-educator-view .parent-summary { display: none; }

/* Things only paper needs (the session id on the summary, the start under each bar's label);
   print.css turns them on. */
.report .print-only,
.start-bar-start { display: none; }

.report-view-switcher {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  margin: 0 auto var(--sp-5);
  padding: 4px;
  background: var(--paper-warm);
  border-radius: var(--r-pill);
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--paper-deep);
}
.view-switcher-btn {
  padding: 10px 20px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-mute);
  border-radius: var(--r-pill);
  background: transparent;
  transition: all var(--t-fast) var(--ease);
}
.view-switcher-btn.active {
  background: var(--green-rich);
  color: var(--paper);
  box-shadow: var(--shadow-sm);
}
.view-switcher-btn:hover:not(.active) { color: var(--green); }

.report-actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

/* ══════════════════════════════════════════════════════════════
   PARENT SUMMARY
   ══════════════════════════════════════════════════════════════ */
.parent-summary {
  max-width: 780px;
  margin: 0 auto;
  padding: var(--sp-5);
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.parent-summary-head {
  text-align: center;
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--gold);
  margin-bottom: var(--sp-4);
}
.ps-brand {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-rich);
  font-weight: 700;
  margin-bottom: 4px;
}
.parent-summary-head h1 {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  color: var(--green);
  margin: 0;
}
.parent-summary-meta {
  font-size: var(--fs-sm);
  color: var(--ink-mute);
  margin-top: 6px;
  line-height: 1.5;
}
.ps-rescored {
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  font-style: italic;
  margin-top: 4px;
}

/* ─── Headline cards: one per subject placed ─── */
.ps-headlines {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
@media (min-width: 640px) {
  .ps-headlines.is-two { grid-template-columns: 1fr 1fr; }
}
.parent-headline {
  background: linear-gradient(135deg, var(--green-rich), var(--green));
  color: var(--paper);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  text-align: left;
}
/* A floor ("at least") is a different kind of claim, so it looks different. Deep brown, not the
   old gold: light text on #C8860A read at under 3:1. */
.parent-headline.is-floor {
  background: linear-gradient(135deg, var(--gold-rich), #8E5310);
}
.parent-headline.is-none {
  background: var(--paper-warm);
  color: var(--ink);
  border: 1.5px dashed var(--ink-faint);
}
.parent-headline-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 6px;
}
.parent-headline.is-floor .parent-headline-label { color: #FBE3B0; }
.parent-headline.is-none .parent-headline-label { color: var(--ink-mute); }
.parent-headline .parent-headline-value {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
  margin-bottom: var(--sp-2);
}
.parent-headline .parent-headline-sub {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: rgba(255, 251, 241, 0.94);
}
.parent-headline .parent-headline-note {
  font-size: var(--fs-sm);
  line-height: 1.5;
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid rgba(255, 251, 241, 0.25);
  color: rgba(255, 251, 241, 0.9);
}
.parent-headline .parent-headline-flag {
  display: inline-block;
  margin-top: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 251, 241, 0.16);
  color: var(--paper);
}
.parent-headline.is-none .parent-headline-sub { color: var(--ink-soft); }

/* ─── Where the start sits on the K–5 books ─── */
.grade-meter { margin-bottom: var(--sp-4); }
.grade-meter h3 {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--green);
  margin-bottom: var(--sp-2);
}
.start-bar {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: end;
  gap: var(--sp-3);
  padding-top: 26px;          /* room for the flag above the start cell */
  margin-bottom: var(--sp-2);
}
.start-bar-label {
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--ink);
  padding-bottom: 20px;       /* sits level with the track, above the tick row */
}
.start-bar-track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.start-bar-grade { min-width: 0; }
.start-bar-segs {
  display: flex;
  gap: 2px;
  height: 18px;
}
.start-bar-seg {
  position: relative;
  flex: 1 1 0;
  border-radius: 3px;
  background: var(--paper-deep);
}
.start-bar-seg.is-before { background: var(--sage-light); }
.start-bar-seg.is-start {
  background: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-rich);
  z-index: 1;
}
.start-bar-seg.is-open {
  background: repeating-linear-gradient(135deg, var(--paper-deep) 0 3px, var(--paper) 3px 6px);
}
.start-bar-flag {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--green-rich);
  color: var(--paper);
  font-size: var(--fs-2xs);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-xs);
}
.start-bar-flag.at-left { left: 0; transform: none; }
.start-bar-flag.at-right { left: auto; right: 0; transform: none; }
.start-bar-tick {
  display: block;
  margin-top: 3px;
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: var(--ink-mute);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.start-bar-grade.has-start .start-bar-tick { color: var(--gold-rich); }
.grade-meter-key {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  margin-top: var(--sp-1);
  line-height: 1.4;
}
.key-item { display: inline-flex; align-items: center; gap: 5px; }
.key-swatch {
  display: inline-block;
  width: 14px;
  height: 10px;
  border-radius: 2px;
  background: var(--paper-deep);
}
.key-swatch.is-start { background: var(--gold); box-shadow: 0 0 0 1px var(--gold-rich); }
.key-swatch.is-before { background: var(--sage-light); }
.key-swatch.is-open { background: repeating-linear-gradient(135deg, var(--paper-deep) 0 3px, var(--paper) 3px 6px); box-shadow: 0 0 0 1px var(--paper-deep); }

/* ─── The four lists, never mixed ─── */
.ps-lists {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
@media (min-width: 640px) {
  .ps-lists { grid-template-columns: 1fr 1fr; }
}
.ps-list {
  background: var(--paper-warm);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  border-left: 4px solid var(--gold);
  min-width: 0;
}
.ps-list-ready { border-left-color: var(--green-mid); }
.ps-list-teach { border-left-color: var(--gold); }
.ps-list-keep { border-left-color: var(--info); }
.ps-list-not-checked { border-left: 4px dashed var(--ink-faint); background: var(--paper); box-shadow: inset 0 0 0 1px var(--paper-deep); }
.ps-list .ps-list-title {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  color: var(--green-rich);
  margin-bottom: 2px;
}
.ps-list-hint {
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  line-height: 1.4;
  margin-bottom: var(--sp-2);
}
.ps-group + .ps-group { margin-top: var(--sp-2); }
.ps-group-title {
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--gold-rich);
  margin-bottom: 2px;
}
.ps-items {
  list-style: none;
  padding-left: 0;
}
.ps-item {
  font-size: var(--fs-sm);
  color: var(--ink);
  line-height: 1.4;
  padding: 3px 0 3px 14px;
  position: relative;
}
.ps-item::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-faint);
}
.ps-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: var(--ink-mute);
  background: var(--paper-cream);
  border-radius: var(--r-pill);
  padding: 0 7px;
  white-space: nowrap;
  vertical-align: 1px;
}
.ps-item[data-state="not-yet"] .ps-tag { color: var(--alert); background: var(--alert-pale); }
.ps-item[data-state="emerging"] .ps-tag { color: var(--ink-warn); background: var(--warn-pale); }
.ps-credited,
.ps-empty {
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  font-style: italic;
  line-height: 1.45;
  margin-top: 2px;
}
.ps-more { display: none; }

/* ─── Starting guidance, growth, writing pointer ─── */
.ps-guidance {
  background: var(--paper-warm);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  border-left: 4px solid var(--green);
  margin-bottom: var(--sp-4);
}
.ps-guidance h3 {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  color: var(--green-rich);
  margin-bottom: var(--sp-1);
}
.ps-guidance-list { padding-left: 1.1em; }
.ps-guidance-list li,
.ps-recheck {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: 1.5;
}
.ps-guidance-list li + li { margin-top: 2px; }
.ps-recheck {
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--paper-deep);
}
.ps-growth {
  font-size: var(--fs-sm);
  color: var(--green-rich);
  background: var(--ok-pale);
  border-radius: var(--r-sm);
  padding: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-4);
}
/* Reading aloud: the parent's own timing, and the ladder's speed guide beside it. No comparison
   with anyone else's readers. */
.ps-aloud {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--ink-soft);
  background: var(--info-pale);
  border-radius: var(--r-sm);
  padding: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-4);
}
.ps-aloud strong { color: var(--ink); }
.ed-guide { color: var(--ink-soft) !important; }
.ps-writing-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  background: var(--info-pale);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
}
.ps-writing-note p { font-size: var(--fs-sm); color: var(--ink); margin: 0; flex: 1 1 260px; }

/* ─── How sure is this ─── */
.parent-stoplight {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  background: var(--paper-warm);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
}
.stoplight-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.15);
  margin-top: 2px;
}
.stoplight-green { background: var(--ok); }
.stoplight-amber { background: var(--gold); }
.stoplight-red { background: var(--alert); }
.stoplight-text { min-width: 0; }
.stoplight-text h3 {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  color: var(--green-rich);
  margin-bottom: 4px;
}
.stoplight-band {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--ink);
}
.stoplight-text p,
.stoplight-reasons li {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: 1.5;
}
.stoplight-reasons { padding-left: 1.1em; margin-bottom: 4px; }
.stoplight-advice {
  font-weight: 600;
  color: var(--ink) !important;
  margin-top: 4px;
}
.stoplight-note {
  font-size: var(--fs-xs) !important;
  color: var(--ink-mute) !important;
  font-style: italic;
  margin-top: 4px;
}

/* ─── The parent's line, and the closing note ─── */
.parent-signature {
  display: flex;
  gap: var(--sp-5);
  margin-top: var(--sp-4);
  padding-top: var(--sp-2);
}
.sig-field { flex: 1 1 auto; }
.sig-field.sig-date { flex: 0 0 30%; }
.sig-line { border-bottom: 1px solid var(--ink); height: 30px; margin-bottom: 4px; }
.sig-label {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.parent-footer {
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  font-style: italic;
  margin-top: var(--sp-3);
}
.parent-footer + .parent-footer { margin-top: 2px; }

/* ══════════════════════════════════════════════════════════════
   EDUCATOR DETAIL
   ══════════════════════════════════════════════════════════════ */
.report-cover {
  text-align: center;
  padding: var(--sp-6) var(--sp-4) var(--sp-5);
  border-bottom: 3px double var(--gold);
  margin-bottom: var(--sp-5);
}
.cover-masthead { margin-bottom: var(--sp-4); }
.report-masthead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-5);
  flex-wrap: wrap;
}
.report-masthead-fs svg,
.report-masthead-fs img { display: block; max-width: 100%; height: auto; }
.report-masthead-divider {
  width: 1px;
  align-self: stretch;
  background: var(--fs-border-light);
  margin: var(--sp-2) 0;
}
.report-masthead-product {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.report-masthead-eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fs-secondary);
  font-weight: 700;
}
.report-masthead-product-name {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  color: var(--green);
  font-weight: 800;
  line-height: 1;
}
.report-masthead-sub {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-soft);
  font-size: var(--fs-base);
}
@media (max-width: 720px) {
  .report-masthead { flex-direction: column; gap: var(--sp-3); }
  .report-masthead-divider { width: 60px; height: 1px; }
  .report-masthead-product { text-align: center; }
}
.cover-divider {
  width: 80px;
  height: 2px;
  background: var(--gold);
  margin: var(--sp-4) auto var(--sp-3) auto;
}
.cover-eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.24em;
  color: var(--fs-secondary);
  font-weight: 700;
  margin-bottom: var(--sp-3);
}
.report-cover .student-name {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--ink);
  margin-bottom: var(--sp-2);
}
.report-cover .meta {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}
.meta-id {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--ink-mute);
  margin-top: 4px;
}
.scope-tag {
  display: inline-block;
  background: var(--warn-pale);
  border: 1.5px solid var(--gold);
  border-radius: var(--r-md);
  padding: 8px 14px;
  font-size: var(--fs-sm);
  color: var(--ink-warn);
  margin-top: var(--sp-3);
  max-width: 90%;
}
.scope-tag strong { color: var(--gold-rich); }

.report-section { margin-bottom: var(--sp-6); }
.report-section h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--green);
  border-bottom: 2px solid var(--gold);
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.report-section h3 {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--green-rich);
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-2);
}
.report-section h4 {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-rich);
  margin: var(--sp-3) 0 var(--sp-1);
}
.report-section p,
.report-section li { font-size: var(--fs-sm); line-height: 1.55; }
.report-section p + p { margin-top: var(--sp-2); }
.report-section ul { margin-top: var(--sp-1); }
.report-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: var(--paper);
  font-size: var(--fs-base);
  font-weight: 700;
  font-family: var(--font-display);
}

.ed-kv {
  display: grid;
  grid-template-columns: minmax(130px, 34%) 1fr;
  gap: 0;
  background: var(--paper-warm);
  border: 1px solid var(--paper-deep);
  border-radius: var(--r-md);
  padding: var(--sp-2) var(--sp-4);
}
.ed-kv dt,
.ed-kv dd {
  padding: 6px 0;
  border-bottom: 1px solid var(--paper-deep);
  font-size: var(--fs-sm);
}
.ed-kv dt { color: var(--ink-mute); font-weight: 600; padding-right: var(--sp-3); }
.ed-kv dd { color: var(--ink); overflow-wrap: anywhere; }
.ed-kv dt:nth-last-of-type(1),
.ed-kv dd:nth-last-of-type(1) { border-bottom: none; }

/* Tables scroll inside their own box; the page never scrolls sideways. */
.ed-table-wrap { overflow-x: auto; margin: var(--sp-2) 0 var(--sp-3); }
.ed-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  font-size: var(--fs-sm);
}
.ed-table th,
.ed-table td {
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--paper-deep);
}
.ed-table thead th {
  background: var(--green);
  color: var(--paper);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  white-space: nowrap;
}
.ed-table tbody th { font-weight: 600; color: var(--ink); }
/* Seven columns: headers wrap here, so every column fits beside a readable passage name. */
.ed-fluency-table thead th { white-space: normal; vertical-align: bottom; }
.ed-fluency-table tbody th { min-width: 150px; }
.ed-table tr[data-state="secure"] .ed-res { color: var(--green); font-weight: 600; }
.ed-table tr[data-state="credited"] .ed-res { color: var(--green-mid); font-style: italic; }
.ed-table tr[data-state="not-yet"] .ed-res { color: var(--alert); font-weight: 600; }
.ed-table tr[data-state="emerging"] .ed-res { color: var(--ink-warn); font-weight: 600; }
.ed-table tr[data-state="not-checked"] .ed-res { color: var(--ink-mute); }
.ed-table tr.is-blocking th { box-shadow: inset 4px 0 0 var(--alert-soft); }
.ed-table tr.is-passed th { box-shadow: inset 4px 0 0 var(--sage-light); }

.ed-path + .ed-path { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--paper-deep); }
.ed-path h3:first-child { margin-top: 0; }
.ed-result { font-weight: 700; color: var(--green-rich) !important; font-size: var(--fs-base) !important; }
.ed-how { color: var(--ink-mute) !important; }
.ed-path .start-bar { max-width: 620px; margin: var(--sp-2) 0 var(--sp-3); }
.ed-credited { font-style: italic; color: var(--ink-mute) !important; }
.ed-guidance-subject + .ed-guidance-subject { margin-top: var(--sp-4); }
.ed-guidance-subject h3:first-child { margin-top: 0; }
.ed-recheck {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--ok-pale);
  border-radius: var(--r-sm);
  color: var(--green-rich) !important;
}

.ed-letters h3:first-child { margin-top: 0; }
.lt-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--sp-2); }
.lt-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 42px;
  padding: 3px 8px;
  border-radius: var(--r-xs);
  border: 1px solid var(--paper-deep);
  background: var(--paper-warm);
  font-size: var(--fs-sm);
}
.lt-letter { font-family: var(--font-child); font-size: var(--fs-lg); line-height: 1; color: var(--ink); }
.lt-mark { font-weight: 700; }
.lt-chip.is-right { background: var(--ok-pale); border-color: var(--sage); }
.lt-chip.is-right .lt-mark { color: var(--green); }
.lt-chip.is-wrong { background: var(--alert-pale); border-color: var(--alert-soft); }
.lt-chip.is-wrong .lt-mark { color: var(--alert); }
.lt-chip.is-skipped .lt-mark,
.lt-chip.is-pending .lt-mark { color: var(--ink-mute); }

.ed-stamina h3 { margin-top: var(--sp-4); }

/* ─── Narrative, flags ─── */
.narrative-box {
  background: var(--paper-warm);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5);
  font-family: var(--font-heading);
  line-height: 1.7;
  color: var(--ink);
  border-left: 4px solid var(--green-rich);
  font-style: italic;
}
.narrative-box p { margin-bottom: var(--sp-3); color: inherit; font-size: var(--fs-base) !important; }
.narrative-box p:last-child { margin-bottom: 0; }

.flag-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.flag-item {
  background: var(--warn-pale);
  border-left: 4px solid var(--warn);
  padding: var(--sp-3);
  border-radius: var(--r-sm);
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}
.flag-item.alert { background: var(--alert-pale); border-left-color: var(--alert); }
.flag-item.info { background: var(--info-pale); border-left-color: var(--info); }
.flag-icon { flex-shrink: 0; color: var(--gold-rich); }
.flag-icon svg { width: 20px; height: 20px; }
.flag-item.alert .flag-icon { color: var(--alert); }
.flag-item.info .flag-icon { color: var(--info); }
.flag-title { font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.flag-detail { font-size: var(--fs-sm); color: var(--ink-soft); }

.ed-rights h3:first-child { margin-top: 0; }
.ed-rights ul { padding-left: 1.2em; }

/* ══════════════════════════════════════════════════════════════
   WRITING AWAITING REVIEW (shown in both views)
   ══════════════════════════════════════════════════════════════ */
.writing-review {
  max-width: 780px;
  margin: var(--sp-5) auto 0;
  padding: var(--sp-5);
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--sec-d);
}
.report-educator-view .writing-review { max-width: none; }
.writing-review h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--green);
  margin-bottom: var(--sp-2);
}
.wr-lead { font-size: var(--fs-sm); margin-bottom: var(--sp-4); }
.wr-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.wr-item {
  border: 1px solid var(--paper-deep);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  background: var(--paper-warm);
}
.wr-item.is-pending { border-left: 4px solid var(--sec-d); }
.wr-item.is-marked-yes { border-left: 4px solid var(--green-mid); }
.wr-item.is-marked-no { border-left: 4px solid var(--gold); }
.wr-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px var(--sp-3);
  margin-bottom: var(--sp-2);
}
.wr-head .wr-skill {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  color: var(--green-rich);
}
.wr-chip {
  font-size: var(--fs-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--sec-d-pale);
  color: var(--sec-d);
}
.wr-item.is-marked-yes .wr-chip { background: var(--ok-pale); color: var(--green); }
.wr-item.is-marked-no .wr-chip { background: var(--warn-pale); color: var(--ink-warn); }
.wr-prompt,
.wr-goal,
.wr-rubric,
.wr-meta { font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-soft); }
.wr-k { font-weight: 700; color: var(--ink); }
.wr-answer { margin: var(--sp-2) 0; }
.wr-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--paper);
  border-left: 3px solid var(--paper-deep);
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--font-child);
  font-size: var(--fs-lg);
  color: var(--ink);
}
.wr-drawing {
  display: block;
  max-width: 100%;
  max-height: 260px;
  height: auto;
  background: var(--paper);
  border: 1px solid var(--paper-deep);
  border-radius: var(--r-sm);
}
.wr-missing { font-size: var(--fs-sm); color: var(--ink-mute); font-style: italic; }
.wr-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.wr-actions .btn[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--gold-pale), var(--shadow-sm); }
.wr-status {
  font-size: var(--fs-sm);
  color: var(--green-rich);
  margin-top: var(--sp-2);
  min-height: 1em;
}
.wr-status:empty { display: none; }

/* ══════════════════════════════════════════════════════════════
   Curriculum recommendation (2026-06-24, rebuilt 2026-09-16) — KEPT AS SHIPPED
   ══════════════════════════════════════════════════════════════ */
.curriculum-rec { margin-top: var(--sp-4); }
.curriculum-rec-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 700;
  margin-bottom: var(--sp-3);
}
.curriculum-rec-primary,
.curriculum-rec-card {
  display: block;
  text-decoration: none;
  background: var(--paper-warm);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  transition: transform .18s ease, box-shadow .18s ease;
}
.curriculum-rec-primary { border-left: 5px solid var(--green); box-shadow: var(--shadow-sm); margin-bottom: var(--sp-3); }
.curriculum-rec-card { border-left: 4px solid var(--gold); box-shadow: var(--shadow-xs); }
.curriculum-rec-primary:hover,
.curriculum-rec-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.curriculum-rec-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-3); }
.curriculum-rec-title { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--green-rich); font-weight: 600; }
.curriculum-rec-desc { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.5; margin: 0.35rem 0 0.6rem; }
.curriculum-rec-cta { font-size: var(--fs-sm); font-weight: 700; color: var(--gold-rich); }
.curriculum-rec-primary:hover .curriculum-rec-cta,
.curriculum-rec-card:hover .curriculum-rec-cta { color: var(--green); }

/* The sentence that bridges a result to a product, the real cover beside it, and the one paid
   action. Restrained on purpose: this sits under a child's result, so it reads as a next step,
   never as an advertisement. */
.curriculum-rec-bridge {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 var(--sp-3);
  padding-left: var(--sp-3);
  border-left: 2px solid var(--paper-deep);
}
.curriculum-rec-bridge strong { color: var(--green-rich); }

/* The primary card becomes cover + text. Two columns where there is room, one where there is
   not; the cover keeps its 2:3 shape either way. */
.curriculum-rec-primary {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}
.curriculum-rec-cover {
  flex: 0 0 96px;
  width: 96px;
  height: auto;              /* CSS, never the attribute — the <img> carries real pixel dims */
  aspect-ratio: 340 / 510;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
  background: var(--paper-deep);
}
.curriculum-rec-body { flex: 1 1 auto; min-width: 0; }

.curriculum-rec-actions {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--paper-deep);
  text-align: center;
}
.curriculum-rec-join {
  display: inline-block;
  background: var(--green);
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--fs-base);
  padding: 0.7rem 1.6rem;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.curriculum-rec-join:hover {
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.curriculum-rec-note {
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  margin: var(--sp-2) 0 0;
}

@media (max-width: 520px) {
  .curriculum-rec-primary { flex-direction: column; }
  .curriculum-rec-cover { flex-basis: auto; width: 84px; }
}

/* ── The persistent action, after a result only (2026-09-16) ──────────
   Mirrors the actions in .curriculum-rec and hides itself whenever that block is on screen, so
   the same buttons never appear twice. It cannot show during the assessment: the element only
   exists on the report. */
.harvest-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(250, 246, 238, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--paper-deep);
  box-shadow: 0 -2px 12px rgba(61, 28, 2, 0.08);
  padding: var(--sp-3) var(--sp-4);
}
.harvest-sticky[hidden] { display: none; }

.harvest-sticky-inner {
  max-width: var(--max-w-stage);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.harvest-sticky-label {
  margin-right: auto;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--green-rich);
}
.harvest-sticky-btn {
  display: inline-block;
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--green);
  color: var(--green-rich);
  background: transparent;
}
.harvest-sticky-btn:hover { background: var(--paper-warm); color: var(--green-rich); }
.harvest-sticky-btn.is-join {
  background: var(--green);
  border-color: var(--green);
  color: var(--paper);
}
.harvest-sticky-btn.is-join:hover { color: var(--paper); opacity: 0.94; }

@media (max-width: 560px) {
  .harvest-sticky-inner { justify-content: stretch; }
  .harvest-sticky-label { width: 100%; margin-right: 0; }
  .harvest-sticky-btn { flex: 1 1 auto; text-align: center; }
}

.print-footer {
  text-align: center;
  font-size: var(--fs-2xs);
  color: var(--ink-mute);
  margin-top: var(--sp-5);
}

/* ─── Phones ─── */
@media (max-width: 560px) {
  .parent-summary,
  .writing-review { padding: var(--sp-4) var(--sp-3); }
  .parent-summary-head h1 { font-size: var(--fs-2xl); }
  .parent-headline { padding: var(--sp-3) var(--sp-4); }
  .parent-headline .parent-headline-value { font-size: var(--fs-xl); }
  .start-bar { grid-template-columns: 1fr; gap: 2px; padding-top: 0; }
  .start-bar-label { padding-bottom: 24px; }
  .start-bar-track { gap: 2px; }
  .ed-kv { grid-template-columns: 1fr; }
  .ed-kv dt { border-bottom: none; padding-bottom: 0; }

  /* Tables become one block per row: the skill on its own line, then
     "Result: Not yet · Answers right: 0 of 2 · Skipped: 0". The header row stays in the document
     for screen readers (report.js gives every cell an explicit role) but is not drawn. */
  .ed-table,
  .ed-table tbody,
  .ed-table tr { display: block; width: 100%; }
  .ed-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .ed-table tr { padding: 7px 10px; border-bottom: 1px solid var(--paper-deep); }
  .ed-table tbody th { display: block; padding: 0 0 2px; border: none; }
  .ed-table td { display: inline; padding: 0; border: none; font-size: var(--fs-xs); }
  .ed-table td::before { content: attr(data-label) ': '; color: var(--ink-mute); font-weight: 600; font-style: normal; }
  .ed-table td:not(:last-child)::after { content: ' · '; color: var(--ink-faint); font-style: normal; font-weight: 400; }
  .ed-table tr.is-blocking th,
  .ed-table tr.is-passed th { box-shadow: none; }
  .ed-table tr.is-blocking { box-shadow: inset 4px 0 0 var(--alert-soft); }
  .ed-table tr.is-passed { box-shadow: inset 4px 0 0 var(--sage-light); }
  .view-switcher-btn { padding: 8px 14px; }
  .parent-signature { gap: var(--sp-3); }
}

@media print {
  .harvest-sticky { display: none !important; }
}
