/* ============================================================
   KIWI COMPASS — resource documents
   The printable record and planning library. Self-contained so
   a transcript record printed this year matches the one printed
   next year.

   Screen: good paper, ink-blue linework, a faint graph ground.
   Print:  A4 or US Letter, generous writing room, no grid ink.
   ============================================================ */

:root{
  --paper:#FBFAF6; --paper2:#F3F1E9; --white:#FFFFFF;
  --ink:#21252D; --ink2:#3C4250; --mut:#63687A; --mut2:#9CA1AC;
  --blue:#27498F; --blue-deep:#1B3468; --blue-soft:#DDE5F3;
  --gold:#DFA23B; --good:#3E7C4F; --bad:#B04A3A;
  --rule:rgba(33,37,45,.42); --rule2:rgba(33,37,45,.15);
  --stx:"STIX Two Text",Georgia,"Times New Roman",serif;
  --ps:"Public Sans","Helvetica Neue",Arial,sans-serif;
  --cav:"Caveat","Bradley Hand",cursive;
  --sheet-w:210mm;
}

*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  background:var(--paper2);color:var(--ink);
  font:400 16px/1.62 var(--ps);-webkit-font-smoothing:antialiased;padding:0 0 72px;
}
a{color:inherit;text-decoration:none}
:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
::selection{background:rgba(39,73,143,.18)}

/* ---------- screen-only chrome ---------- */

.res-bar{
  position:sticky;top:0;z-index:20;background:rgba(251,250,246,.96);
  backdrop-filter:blur(10px);border-bottom:1px solid var(--rule2);
}
.res-bar__in{
  max-width:var(--sheet-w);margin:0 auto;padding:12px 18px;
  display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
}
.res-back{
  font-family:var(--ps);font-weight:700;font-size:11px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--mut);transition:.2s;
}
.res-back:hover{color:var(--blue)}
.res-print{
  font-family:var(--ps);font-weight:700;font-size:11px;letter-spacing:.12em;
  text-transform:uppercase;cursor:pointer;border:0;border-radius:6px;padding:12px 22px;
  background:var(--blue);color:#F7F9FD;transition:.25s;
}
.res-print:hover{background:var(--blue-deep)}

/* ---------- the sheet ---------- */

.doc{
  max-width:var(--sheet-w);margin:26px auto;background:var(--white);
  border:1px solid var(--rule2);border-radius:8px;
  box-shadow:0 16px 44px -26px rgba(27,52,104,.4);
  padding:24mm 20mm 18mm;
}

/* ---------- masthead ---------- */

.doc-mast{margin-bottom:22px;border-bottom:2px solid var(--blue);padding-bottom:16px}
.doc-brand{
  font-family:var(--stx);font-size:16px;font-weight:600;color:var(--blue-deep);
  display:flex;align-items:center;gap:9px;
}
.doc-brand svg{width:19px;height:19px;flex:none}
.doc-kicker{
  font-family:var(--ps);font-weight:700;font-size:10px;letter-spacing:.2em;
  text-transform:uppercase;color:var(--gold);margin:15px 0 9px;
}
.doc h1{font-family:var(--stx);font-weight:600;font-size:32px;line-height:1.16;margin-bottom:9px}
.doc h1 em{font-style:italic;color:var(--blue)}
.doc-lede{font-size:16.5px;color:var(--mut);line-height:1.6;max-width:62ch}

/* ---------- sections ---------- */

.sect{margin-top:22px}
.sect h2{font-family:var(--stx);font-weight:600;font-size:21px;line-height:1.2;margin-bottom:7px;break-after:avoid}
.sect h3{
  font-family:var(--ps);font-weight:700;font-size:10px;letter-spacing:.16em;
  text-transform:uppercase;color:var(--blue);margin:17px 0 8px;break-after:avoid;
}
.sect > p{margin-bottom:10px;max-width:68ch}
.sect .hint{color:var(--mut);font-size:14.5px;margin-bottom:11px}
.sect-head{border-top:1px solid var(--rule2);padding-top:12px;margin-top:26px;break-after:avoid}
.sect-head .n{
  font-family:var(--ps);font-weight:700;font-size:9.5px;letter-spacing:.2em;
  text-transform:uppercase;color:var(--gold);display:block;margin-bottom:4px;
}

/* ---------- lists ---------- */

ul.marks,ol.marks{list-style:none;margin:0 0 12px}
ul.marks li{padding:5px 0 5px 18px;position:relative;font-size:15px}
ul.marks li::before{content:"";position:absolute;left:0;top:12px;width:7px;height:1.5px;background:var(--blue)}
ol.marks{counter-reset:m}
ol.marks li{padding:6px 0 6px 26px;position:relative;font-size:15px;counter-increment:m;break-inside:avoid}
ol.marks li::before{
  content:counter(m) ".";position:absolute;left:0;top:6px;
  font-family:var(--ps);font-weight:700;font-size:12px;color:var(--blue);
}

ul.checks{list-style:none;margin:0 0 12px}
ul.checks li{
  padding:8px 0 8px 25px;position:relative;font-size:15px;
  border-bottom:1px solid var(--rule2);break-inside:avoid;
}
ul.checks li:last-child{border-bottom:0}
ul.checks li::before{
  content:"";position:absolute;left:0;top:12px;width:12px;height:12px;
  border:1.2px solid var(--blue);border-radius:2px;
}
ul.checks.plain li{border-bottom:0}
ul.checks li .sub{display:block;color:var(--mut);font-size:13.8px;margin-top:2px}

.cols2{columns:2;column-gap:18mm}
.cols2 > *{break-inside:avoid}

/* ---------- write-on ---------- */

.write{margin:6px 0 14px;break-inside:avoid}
.write .ln{display:block;height:10mm;border-bottom:1px solid var(--rule2)}
.write .ln:first-child{border-top:1px solid var(--rule2)}
.write.tightlines .ln{height:8mm}

.fld{margin:0 0 12px;break-inside:avoid}
.fld > .lab,label.lab{
  display:block;font-family:var(--ps);font-weight:700;font-size:9.5px;letter-spacing:.12em;
  text-transform:uppercase;color:var(--mut);margin-bottom:5px;
}
.fld .line{display:block;height:9mm;border-bottom:1px solid var(--rule2)}
.fld-row{display:flex;gap:16px;break-inside:avoid}
.fld-row > .fld{flex:1}

/* ---------- tables ---------- */

.sheet-wrap{margin:10px 0 15px;overflow-x:auto}
table.sheet{width:100%;border-collapse:collapse;font-size:13.5px;line-height:1.4}
table.sheet thead th{
  font-family:var(--ps);font-weight:700;font-size:8.5px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--blue);text-align:left;
  padding:8px;border-bottom:1.5px solid var(--blue);vertical-align:bottom;
}
table.sheet td,table.sheet tbody th{
  padding:0 8px;border-bottom:1px solid var(--rule2);height:11mm;
  text-align:left;font-weight:400;vertical-align:middle;
}
table.sheet tbody th{font-weight:700;font-size:13.5px}
table.sheet tr{break-inside:avoid}
table.sheet td + td,table.sheet td + th,
table.sheet th + td,table.sheet th + th{border-left:1px solid var(--rule2)}
table.sheet.dense td,table.sheet.dense tbody th{height:8.5mm}
table.sheet.tall td,table.sheet.tall tbody th{height:15mm}
table.sheet .tick{width:16mm;text-align:center}
table.sheet td.tick::before{
  content:"";display:inline-block;width:11px;height:11px;
  border:1.2px solid var(--blue);border-radius:2px;vertical-align:-1px;
}

/* ---------- call-outs ---------- */

.note{
  border:1px solid var(--blue-soft);background:#F4F7FC;border-radius:8px;
  padding:14px 18px;margin:15px 0;font-size:14.5px;line-height:1.6;break-inside:avoid;
}
.note strong{font-weight:700;color:var(--blue-deep)}
.bound{
  border:1px solid var(--bad);background:#FCF3F1;border-radius:8px;
  padding:13px 17px;margin:15px 0;font-size:14px;line-height:1.6;
  color:#6E2D22;break-inside:avoid;
}
.bound strong{color:var(--bad);font-weight:700}
.pencil{
  font-family:var(--cav);font-size:20px;color:var(--blue);line-height:1.4;
  margin:14px 0;break-inside:avoid;
}

/* certificate */
.cert{
  border:2px solid var(--blue);border-radius:6px;padding:26mm 18mm;text-align:center;
  margin:16px 0;break-inside:avoid;background:#FCFCFA;
}
.cert .crest{font-family:var(--ps);font-weight:700;font-size:9.5px;letter-spacing:.3em;
  text-transform:uppercase;color:var(--gold);margin-bottom:18px}
.cert h2{font-family:var(--stx);font-weight:600;font-size:28px;margin-bottom:16px}
.cert p{font-size:16px;line-height:2.1;color:var(--ink2)}
.cert .blank{display:inline-block;min-width:180px;border-bottom:1px solid var(--rule);margin:0 6px}
.cert .sig{display:flex;gap:34px;justify-content:center;margin-top:28px}
.cert .sig .fld{flex:0 1 190px;margin-bottom:0}

/* ---------- page control ---------- */
.pbreak{break-before:page;page-break-before:always}
.keep{break-inside:avoid;page-break-inside:avoid}

/* ---------- foot ---------- */
.doc-foot{
  margin-top:26px;border-top:1.5px solid var(--blue);padding-top:11px;
  font-family:var(--ps);font-weight:700;font-size:8.5px;letter-spacing:.08em;color:var(--mut2);
  line-height:1.7;display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;
  text-transform:uppercase;
}
.doc-foot .lic{
  text-transform:none;font-weight:400;font-size:12px;letter-spacing:0;
  flex-basis:100%;color:var(--mut);
}

@media screen and (max-width:820px){
  .doc{margin:14px 12px;padding:22px 18px}
  .doc h1{font-size:26px}
  .cols2{columns:1}
  .fld-row{flex-direction:column;gap:0}
  .cert{padding:22px 16px}
}

/* ============================================================
   PRINT — A4 and US Letter
   ============================================================ */

@page{ margin:14mm 13mm 15mm; }

@media print{
  html,body{background:#fff!important}
  body{font-size:10.2pt;line-height:1.48;padding:0;color:#1C2028}
  .res-bar,.res-noprint{display:none!important}
  .doc{max-width:none;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:#fff}
  .doc-mast{margin-bottom:13px;padding-bottom:10px}
  .doc-brand{font-size:10pt}
  .doc h1{font-size:20pt;margin-bottom:6px}
  .doc-lede{font-size:10.2pt}
  .doc-kicker{font-size:7pt;margin:9px 0 6px}
  .sect{margin-top:16px}
  .sect h2{font-size:13pt}
  .sect h3{font-size:7.5pt}
  .sect-head{margin-top:18px;padding-top:9px}
  ul.marks li,ol.marks li,ul.checks li{font-size:10pt}
  ul.checks li .sub{font-size:9.2pt}
  table.sheet{font-size:8.6pt}
  table.sheet thead{display:table-header-group}
  table.sheet thead th{font-size:6.8pt;padding:5px}
  table.sheet td,table.sheet tbody th{padding:0 5px;font-size:8.6pt;height:10mm}
  table.sheet.dense td,table.sheet.dense tbody th{height:7.4mm}
  table.sheet.tall td,table.sheet.tall tbody th{height:13mm}
  .note,.bound{font-size:9.2pt;padding:9px 12px}
  .cert{padding:22mm 16mm}
  .cert h2{font-size:20pt}
  .cert p{font-size:11pt}
  .doc-foot{font-size:6.8pt;margin-top:15px}
  .doc-foot .lic{font-size:8.6pt}
  .fld .line{height:8mm}
  a{color:inherit;text-decoration:none}
  h1,h2,h3{break-after:avoid;page-break-after:avoid}
  .keep,.note,.bound,.cert,.write,.fld,table.sheet tr{page-break-inside:avoid}
  .doc.compact .doc-mast{margin-bottom:9px;padding-bottom:8px}
  .doc.compact h1{font-size:16pt}
  .doc.compact .sect{margin-top:12px}
}

@media (prefers-reduced-motion:reduce){ *{animation:none!important;transition:none!important} }
