/* SpecPoint: specification checklist (/ial-biology/specification/). Mobile-first; builds on site.css,
   course.css and lesson-page.css. Core practicals are blue (the lesson pages' "teach" colour). */

.sp-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.sp-intro { display: grid; gap: 8px; font-size: 0.95rem; color: var(--ink-2); max-width: 66ch; }
.sp-printed { display: none; }

/* Total, tools, storage warning */
.sp-total { display: grid; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.sp-total-note { font-size: 0.9rem; color: var(--ink-3); }
.sp-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-tools[hidden], .sp-status[hidden] { display: none; }
.sp-status { font-size: 0.92rem; background: var(--amber-tint); color: #6b4800; border-radius: 8px; padding: 8px 12px; }

/* Progress: "7 of 19 taught" and a bar */
.sp-prog { display: grid; gap: 6px; font-size: 0.9rem; color: var(--ink-2); max-width: 340px; }
.sp-count b { color: var(--leaf-strong); font-weight: 700; }
.sp-bar { display: block; height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.sp-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--leaf); transition: width .25s ease; }
.sp-prog--big { max-width: none; font-size: 1.15rem; color: var(--ink); }
.sp-prog--big .sp-bar { height: 12px; }
.sp-prog.is-complete .sp-count::after { content: " \2713"; color: var(--leaf); font-weight: 700; }

/* Jump links */
.sp-jump { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sp-jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-size: 0.88rem; font-weight: 600; }
.sp-jump a:hover { border-color: var(--leaf); color: var(--leaf-strong); }

/* Units and topics (a little tighter than the course page on phones: the summaries need the width) */
.sp-unit { padding: 18px 12px; }
.sp-unit .cu-head { gap: 8px; padding: 0 4px; }
.sp-unit-note { font-size: 0.92rem; color: var(--ink-3); max-width: 66ch; }
.sp-topic { border-top: 1px solid var(--line-soft); padding: 16px 0 6px; }
.sp-topic-head { display: grid; gap: 8px; }
.sp-topic-head h3 { font-family: var(--font-body); font-size: 1.02rem; font-weight: 600; letter-spacing: 0; line-height: 1.35; }

/* One spec point: the whole label is the tap target */
.sp-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.sp-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.sp-item.is-done { background: #f3faf6; border-color: #cfe5da; }
.sp-item--cp { background: var(--sky-tint); border-color: #b9cfe2; border-left: 5px solid var(--sky); }
.sp-item--cp.is-done { background: #eaf5f0; border-left-color: var(--leaf); }

.sp-label { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: start; min-height: 52px; padding: 12px 12px 12px 0; cursor: pointer; }
.sp-box { position: absolute; top: 0; left: 0; width: 46px; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sp-tick { grid-column: 1; justify-self: center; position: relative; width: 26px; height: 26px; border: 2px solid var(--leaf); border-radius: 7px; background: #fff; }
.sp-tick::after { content: ""; position: absolute; left: 7px; top: 2px; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); opacity: 0; }
.sp-box:checked + .sp-tick { background: var(--leaf); }
.sp-box:checked + .sp-tick::after { opacity: 1; }
.sp-box:focus-visible + .sp-tick { outline: 3px solid var(--ink); outline-offset: 2px; }
.sp-label:hover .sp-tick { border-color: var(--leaf-strong); }

.sp-body { grid-column: 2; display: grid; gap: 3px; }
.sp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sp-num { font-family: var(--font-mono); font-size: 0.86rem; font-weight: 600; color: var(--ink-2); }
.sp-cp { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sky); background: #fff; border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.sp-where { font-size: 0.82rem; color: var(--ink-3); }
.sp-text { color: var(--ink); font-size: 1rem; line-height: 1.45; }

.sp-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0 12px 12px 46px; }
.sp-links .lr-link { min-height: 40px; }

@media (min-width: 720px) {
  .sp-unit { padding: 24px 28px; }
  .sp-unit .cu-head { padding: 0; }
  .sp-label { grid-template-columns: 52px minmax(0, 1fr); padding-right: 14px; }
  .sp-box { width: 52px; }
  .sp-text { font-size: 1.0625rem; }
  .sp-total { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 20px 24px; }
  .sp-total-note, .sp-status { grid-column: 1 / -1; }
  .sp-tools { grid-column: 2; grid-row: 1; }
  .sp-topic-head { grid-template-columns: minmax(0, 1fr) 260px; align-items: end; }
  .sp-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .sp-links { padding: 8px 14px 8px 0; justify-content: flex-end; }
}

/* Print: one clean list, ticked boxes shown (drawn with borders, so they print without background graphics) */
@media print {
  .site-footer, .fb, .lp-crumb, .spec-chip, .lead, .sp-intro, .sp-total-note, .sp-tools, .sp-status,
  .sp-jump-nav, .sp-bar, .sp-links, .lp-end { display: none !important; }
  body { font-size: 10pt; }
  .course { padding: 0; }
  .course-head { gap: 4px; margin-bottom: 8pt; }
  .course-head h1 { font-size: 20pt; }
  .sp-printed { display: block; font-size: 9pt; color: #444; }
  .sp-total { display: block; border: 0; padding: 0; margin: 0 0 10pt; background: none; }
  .sp-prog, .sp-prog--big { display: block; max-width: none; color: #000; }
  .sp-prog--big { font-size: 12pt; }
  .course-unit { border: 0; border-radius: 0; padding: 0; margin: 0 0 12pt; background: none; box-shadow: none; }
  .cu-head { gap: 2pt; margin-bottom: 4pt; }
  .cu-head h2 { font-size: 14pt; }
  .sp-unit-note { font-size: 9pt; }
  .sp-topic { border-top: 0; padding: 6pt 0 0; }
  .sp-topic-head { display: block; break-after: avoid; }
  .sp-topic-head h3 { font-size: 11pt; }
  .topic-num { background: none; padding: 0; }
  .sp-list { display: block; margin: 4pt 0 0; }
  .sp-item, .sp-item.is-done, .sp-item--cp, .sp-item--cp.is-done { display: block; background: none; border: 0; border-bottom: 0.5pt solid #bbb; border-radius: 0; break-inside: avoid; }
  .sp-label { grid-template-columns: 22pt minmax(0, 1fr); min-height: 0; padding: 3pt 0; }
  .sp-tick, .sp-box:checked + .sp-tick { width: 12pt; height: 12pt; margin-top: 1pt; border: 1pt solid #000; border-radius: 2pt; background: none; }
  .sp-tick::after { left: 3.5pt; top: 0.5pt; width: 3.5pt; height: 7pt; border-color: #000; border-width: 0 1.5pt 1.5pt 0; }
  .sp-body { display: block; }
  .sp-meta { display: inline-flex; margin-right: 6pt; }
  .sp-num { color: #000; }
  .sp-cp { color: #000; border-color: #000; }
  .sp-text { color: #000; }
}
