/* ---------- the schema template, on screen ---------- */
.hero .bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.hint { color: var(--muted); font-size: .9rem; margin: 10px 0 0; max-width: 72ch; }
#status { color: var(--ink-2); }
.f { margin: 0 0 14px; }
.f label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 4px; color: var(--ink-2); }
input[type="text"], textarea { width: 100%; font: inherit; font-size: .97rem; color: var(--ink); border: 1px solid var(--rule); border-radius: 4px; padding: 8px 10px; background: #fff; }
input[type="text"]:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(21, 89, 176, .15); }
textarea { resize: vertical; line-height: 1.6; }
[dir="ltr"] { text-align: left; }
input[dir="ltr"], textarea[dir="ltr"], .pv.ltr { font-family: var(--font-mono); font-size: .9rem; }
.fields.three { display: grid; grid-template-columns: 1.3fr 1fr .6fr; gap: 0 16px; }
.guide { background: var(--tint); border-inline-start: 3px solid var(--navy); padding: 10px 16px; margin: 0 0 18px; font-size: .95rem; }
.guide p { margin: 0 0 .5em; } .guide p:last-child { margin: 0; }
.guide-line { color: var(--ink-2); }
.tcard { border: 1px solid var(--rule); border-radius: 6px; padding: 16px; margin: 0 0 18px; background: #fff; }
.thead-fields { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 0 16px; align-items: end; }
.rm-table { margin-bottom: 18px; white-space: nowrap; }
.cols-scroll { overflow-x: auto; }
table.cols { width: 100%; border-collapse: collapse; margin: 4px 0 10px; min-width: 680px; }
table.cols th { font-size: .82rem; font-weight: 600; color: var(--muted); text-align: start; padding: 6px 4px; border-bottom: 1.5px solid var(--navy); white-space: nowrap; }
table.cols td { padding: 4px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.cols th.chk, table.cols td.chk { width: 72px; text-align: center; }
table.cols input[type="text"] { padding: 6px 8px; }
table.cols input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--navy); }
.rm-row { border: 0; background: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; padding: 0 6px; }
.rm-row:hover { color: var(--ink); }
.multi { margin-top: 12px; display: grid; gap: 0; }
.multi .f label { font-weight: 500; }
.test { border-top: 1px solid var(--rule); padding-top: 4px; }
.f.code textarea { min-height: 110px; }
.pv, .print-only { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 700px) {
  .fields.three, .thead-fields { grid-template-columns: 1fr; }
}

/* ---------- the PDF (A4) ---------- */
@page { size: A4; margin: 14mm 13mm; }
@media print {
  body { font-size: 11pt; line-height: 1.5; }
  .no-print, button, label.btn, input[type="file"], .topbar, .hero, footer.site { display: none !important; }
  .print-only { display: block; }
  .print-head { border-bottom: 2px solid #0B2545; padding-bottom: 6px; margin-bottom: 10px; }
  .ph-title { font-family: var(--font-title); font-size: 16pt; color: #0B2545; }
  main { max-width: none; padding: 0; }
  section { margin-top: 16px; }
  h2 { font-size: 14pt; break-after: avoid; }
  h3 { font-size: 12pt; break-after: avoid; }
  /* fields print as their full text */
  input[type="text"], textarea, input[type="checkbox"] { display: none !important; }
  .pv { display: block; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.2em; padding: 2px 0 4px; border-bottom: 1px solid #C9D3DF; }
  .pv.empty { color: #888; }
  .pv.empty::before { content: "—"; }
  .f { margin: 0 0 8px; break-inside: avoid; }
  .f label { font-size: 9.5pt; margin: 0; }
  .fields.three { grid-template-columns: 1.3fr 1fr .6fr; }
  .guide { background: none; border-inline-start: 2px solid #0B2545; font-size: 9.5pt; padding: 4px 10px; }
  .tcard { border: 1px solid #B9C4D2; padding: 8px 10px; break-inside: auto; }
  .thead-fields { grid-template-columns: 1fr 1.4fr; }
  .cols-scroll { overflow: visible; }
  table.cols { min-width: 0; table-layout: fixed; font-size: 9.5pt; }
  table.cols thead { display: table-header-group; }
  table.cols tr { break-inside: avoid; }
  table.cols tr.row-empty { display: none; }
  table.cols th:nth-child(1), table.cols td:nth-child(1) { width: 24%; }
  table.cols th:nth-child(2), table.cols td:nth-child(2) { width: 20%; }
  table.cols th:nth-child(4), table.cols td:nth-child(4) { width: 26%; }
  table.cols th.chk, table.cols td.chk { width: 10%; }
  table.cols th:last-child, table.cols td:last-child { display: none; }
  table.cols td .pv { border: 0; padding: 0; }
  table.cols td.chk .pv { text-align: center; }
  table.cols td.chk .pv.empty::before { content: ""; }
  .multi .pv.empty, .multi .f:has(.pv.empty) { display: none; }
  .bsc-preview { border: 0; background: none; padding: 0; }
  .bsc-tag { display: none; }
}

/* the work record: invisible text in the PDF (instructor's checker) */
@media print {
  /* beside the printed title, on its empty left side: never adds a page */
  .print-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
  .sig-x { display: block; flex: none; color: #fff; font: 5px/7px var(--font-mono); letter-spacing: 1px; white-space: nowrap; direction: ltr; text-align: left; margin: 0; padding: 0; }
}

/* the submitters, a row each */
.students-head, .student { display: grid; grid-template-columns: 1.4fr 1fr 32px; gap: 8px 16px; align-items: center; }
.students-head { font-weight: 600; font-size: .93rem; color: var(--ink-2); margin-bottom: 4px; }
.student { margin-bottom: 8px; }
.f.dept { max-width: 420px; margin-top: 4px; }
@media print {
  .students-head, .student { grid-template-columns: 1.4fr 1fr; }
  .students-head { font-size: 9.5pt; }
  .student { margin-bottom: 2px; }
  .student.row-empty { display: none; }
}
