/* ============================================================
   GIRLY HEART — resource documents
   The chart-reference drawer: eight plain-language sheets kept
   beside a chart. Self-contained so a printed sheet stays the
   same reference it was the day it was made.

   Screen: warm paper, engraved gold rules, Fraunces.
   Print:  A4 or US Letter. Glyphs always carry their name.
   ============================================================ */

:root{
  --night:#0F1424; --night2:#171E36; --night3:#212A4C;
  --paper:#F7F2E7; --paper2:#EFE7D2; --paper3:#E7DCBF; --card:#FBF8F0;
  --ink:#232842; --mut:#585C74; --mut2:#666A85;
  --gold:#C4A055; --gold-deep:#96762F; --garnet:#7E3448; --garnet-deep:#5E2434;
  --rule:rgba(35,40,66,.38); --rule2:rgba(35,40,66,.16);
  --gline:rgba(196,160,85,.5); --gline2:rgba(196,160,85,.26);
  --fr:"Fraunces","Iowan Old Style",Georgia,"Times New Roman",serif;
  --ka:"Karla","Helvetica Neue",Arial,sans-serif;
  --sheet-w:210mm;
}

*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  background:var(--paper);color:var(--ink);
  font:400 16.5px/1.66 var(--fr);font-optical-sizing:auto;
  -webkit-font-smoothing:antialiased;padding:0 0 72px;
}
a{color:inherit;text-decoration:none}
:focus-visible{outline:2px solid var(--garnet);outline-offset:3px}
::selection{background:rgba(196,160,85,.35)}

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

.res-bar{
  position:sticky;top:0;z-index:20;background:rgba(247,242,231,.95);
  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(--ka);font-weight:600;font-size:10.5px;letter-spacing:.2em;
  text-transform:uppercase;color:var(--mut);transition:.2s;
}
.res-back:hover{color:var(--gold-deep)}
.res-print{
  font-family:var(--ka);font-weight:600;font-size:10.5px;letter-spacing:.16em;
  text-transform:uppercase;cursor:pointer;border:1px solid var(--gold);border-radius:3px;
  padding:11px 22px;background:var(--night);color:var(--paper);transition:.25s;
}
.res-print:hover{background:var(--night3);border-color:var(--gold-deep)}

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

.doc{
  max-width:var(--sheet-w);margin:28px auto;background:var(--card);
  border:1px solid var(--gline2);box-shadow:0 20px 52px -24px rgba(15,20,36,.4);
  padding:24mm 20mm 18mm;
}

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

.doc-mast{text-align:center;margin-bottom:24px}
.doc-brand{font-family:var(--fr);font-size:16px;letter-spacing:.01em}
.doc-brand .moonmark{color:var(--gold);margin-right:7px}
.doc-brand .brand-star{color:var(--gold);font-size:11px;vertical-align:3px;margin-left:5px}
.doc-kicker{
  font-family:var(--ka);font-weight:600;font-size:10px;letter-spacing:.3em;
  text-transform:uppercase;color:var(--gold-deep);margin:16px 0 10px;
}
.doc h1{font-family:var(--fr);font-weight:500;font-size:34px;line-height:1.16;margin-bottom:10px}
.doc h1 em{font-style:italic;color:var(--garnet)}
.doc-lede{font-size:17px;color:var(--mut);line-height:1.6;max-width:58ch;margin:0 auto}

.rule-star{
  display:flex;align-items:center;justify-content:center;gap:12px;margin:20px 0;color:var(--gold);
}
.rule-star::before,.rule-star::after{content:"";flex:1;max-width:130px;border-top:1px solid var(--gline)}
.rule-star span{font-size:11px;letter-spacing:.4em}

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

.sect{margin-top:24px}
.sect h2{font-family:var(--fr);font-weight:500;font-size:22px;line-height:1.2;margin-bottom:8px;break-after:avoid}
.sect h3{
  font-family:var(--ka);font-weight:600;font-size:10px;letter-spacing:.2em;
  text-transform:uppercase;color:var(--gold-deep);margin:18px 0 8px;break-after:avoid;
}
.sect > p{margin-bottom:11px;max-width:66ch}
.sect .hint{font-style:italic;color:var(--mut);font-size:15.5px;margin-bottom:12px}
.sect-head{border-top:1px solid var(--gline2);padding-top:13px;margin-top:28px;break-after:avoid}
.sect-head .n{
  font-family:var(--ka);font-weight:600;font-size:9.5px;letter-spacing:.26em;
  text-transform:uppercase;color:var(--gold);display:block;margin-bottom:5px;
}

/* ---------- entries: the shape most of these sheets use ---------- */

.entry{
  display:flex;gap:14px;align-items:baseline;padding:8px 0;
  border-bottom:1px solid var(--rule2);break-inside:avoid;
}
.entry:last-child{border-bottom:0}
.entry .gl{
  flex:0 0 34px;font-size:21px;color:var(--gold-deep);text-align:center;line-height:1;
}
.entry .gl .num{font-family:var(--fr);font-size:19px}
.entry .bd{flex:1}
.entry .nm{font-weight:600;font-size:16.5px}
.entry .df{display:block;color:var(--mut);font-size:15.5px;margin-top:1px}
.entry .kw{
  font-family:var(--ka);font-weight:600;font-size:9.5px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--garnet);
}

ul.marks,ol.marks{list-style:none;margin:0 0 12px}
ul.marks li{padding:5px 0 5px 20px;position:relative;font-size:16px}
ul.marks li::before{content:"✦";position:absolute;left:0;top:6px;color:var(--gold);font-size:10px}
ol.marks{counter-reset:m}
ol.marks li{padding:6px 0 6px 30px;position:relative;font-size:16px;counter-increment:m;break-inside:avoid}
ol.marks li::before{
  content:counter(m);position:absolute;left:0;top:6px;
  font-family:var(--ka);font-weight:600;font-size:11px;color:var(--gold-deep);
}

ul.checks{list-style:none;margin:0 0 12px}
ul.checks li{
  padding:8px 0 8px 25px;position:relative;font-size:15.5px;
  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:11px;height:11px;
  border:1px solid var(--gold);border-radius:2px;
}
ul.checks.plain li{border-bottom:0}

.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(--ka);font-weight:600;font-size:9px;letter-spacing:.16em;
  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 16px;overflow-x:auto}
table.sheet{width:100%;border-collapse:collapse;font-size:14px;line-height:1.4}
table.sheet thead th{
  font-family:var(--ka);font-weight:600;font-size:8.5px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--gold-deep);text-align:left;
  padding:8px;border-bottom:1.5px solid var(--gold);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:600;font-size:14px}
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}

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

.note{
  border:1px solid var(--gline2);border-left:2px solid var(--gold);background:var(--paper2);
  padding:14px 18px;margin:16px 0;font-size:15px;line-height:1.6;break-inside:avoid;
}
.note strong{font-weight:600;color:var(--gold-deep)}
.bound{
  border:1px solid var(--garnet);background:#FAF0F1;padding:13px 17px;margin:16px 0;
  font-size:14.5px;line-height:1.6;color:var(--garnet-deep);break-inside:avoid;border-radius:3px;
}
.bound strong{font-weight:600}
.pull{
  font-style:italic;font-size:19px;color:var(--gold-deep);line-height:1.5;
  margin:20px auto;text-align:center;max-width:52ch;break-inside:avoid;
}

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

/* ---------- foot ---------- */
.doc-foot{
  margin-top:28px;border-top:1px solid var(--gline);padding-top:12px;
  font-family:var(--ka);font-weight:600;font-size:8.5px;letter-spacing:.1em;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-family:var(--fr);font-weight:400;font-size:13px;
  font-style:italic;letter-spacing:0;flex-basis:100%;color:var(--mut);
}

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

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

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

@media print{
  html,body{background:#fff!important}
  body{font-size:10.4pt;line-height:1.5;padding:0;color:#1E2338}
  .res-bar,.res-noprint{display:none!important}
  .doc{max-width:none;margin:0;padding:0;border:0;box-shadow:none;background:#fff}
  .doc-mast{margin-bottom:13px}
  .doc-brand{font-size:10.5pt}
  .doc h1{font-size:21pt;margin-bottom:7px}
  .doc-lede{font-size:10.6pt}
  .doc-kicker{font-size:7pt;margin:9px 0 6px}
  .rule-star{margin:13px 0}
  .sect{margin-top:17px}
  .sect h2{font-size:13.5pt}
  .sect h3{font-size:7.5pt}
  .sect-head{margin-top:19px;padding-top:10px}
  .entry{padding:5px 0}
  .entry .gl{font-size:14pt;flex-basis:26px}
  .entry .nm{font-size:10.4pt}
  .entry .df{font-size:9.8pt}
  ul.marks li,ol.marks li,ul.checks li{font-size:10.2pt}
  table.sheet{font-size:8.8pt}
  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.8pt;height:10mm}
  table.sheet.dense td,table.sheet.dense tbody th{height:7.4mm}
  .note,.bound{font-size:9.4pt;padding:9px 12px}
  .pull{font-size:12pt}
  .doc-foot{font-size:6.8pt;margin-top:16px}
  .doc-foot .lic{font-size:9pt}
  .fld .line{height:8mm}
  a{color:inherit;text-decoration:none}
  h1,h2,h3{break-after:avoid;page-break-after:avoid}
  .keep,.note,.bound,.entry,.write,.fld,table.sheet tr{page-break-inside:avoid}
  .doc.compact .doc-mast{margin-bottom:9px}
  .doc.compact h1{font-size:17pt}
  .doc.compact .sect{margin-top:12px}
}

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