/* Orion & Apollo printable sheets v2
   Drop this in after play.css. It replaces the cramped 2-column
   materials list and styles the detailed, parent-trusted build cards.
   Mobile-first. Body text never drops below 16px on screen. */

:root {
  --lime: #97B62C;
  --lime-hi: #B3D640;
  --lime-dk: #6E8A12;
  --black: #111111;
  --charcoal: #28282A;
  --bluegray: #455262;
  --teal: #288193;
  --white: #FFFFFF;
  --paper: #FFFDF8;
  --cream: #F5F6F1;
  --line: #111111;
  --muted: #455262;
  --danger: #8A3A12;
}

/* ---------- Screen: the on-site article ---------- */
.printable {
  max-width: 46rem;
  margin: 20px auto;
  background: var(--white);
  color: var(--black);
  padding: 20px 16px 40px;
  border: 2px solid #ccc;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
  font-size: 1rem; /* 16px */
  line-height: 1.5;
}
.printable *,
.printable *::before,
.printable *::after { box-sizing: border-box; }
.printable img,
.printable svg { max-width: 100%; height: auto; display: block; }
.printable h1,
.printable h2,
.printable h3 { overflow-wrap: break-word; hyphens: none; }

.printable .pr-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 4px solid var(--black);
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.printable .pr-head .brand {
  font-family: var(--display, "Russo One", "Arial Black", sans-serif);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 8px;
}
.printable .pr-head .brand .bolt { width: 16px; height: 16px; fill: var(--lime); flex: none; }
.printable .kicker {
  font-family: var(--head, Fredoka, Nunito, sans-serif);
  font-weight: 650;
  font-size: 1rem;
  color: var(--bluegray);
  margin: 0 0 4px;
  letter-spacing: 0.01em;
}
.printable h1 {
  font-family: var(--display, "Russo One", "Arial Black", sans-serif);
  font-size: 1.85rem;
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--black);
}
.printable .id-line {
  margin: 0;
  font-size: 1rem;
}
.printable .id-line .blank {
  display: inline-block;
  min-width: 10ch;
  border-bottom: 2px solid var(--black);
}

.printable h2 {
  font-family: var(--head, Fredoka, Nunito, sans-serif);
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 1.5rem 0 0.55rem;
  padding-bottom: 4px;
  border-bottom: 3px solid var(--lime);
  color: var(--black);
}
.printable h3 {
  font-family: var(--head, Fredoka, Nunito, sans-serif);
  font-size: 1.05rem;
  margin: 1rem 0 0.4rem;
}
.printable p { margin: 0 0 0.7rem; }
.printable strong { font-weight: 700; }

/* Overview chips: wrap, never squash */
.sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
}
.sheet-meta li,
.chip {
  flex: 1 1 calc(50% - 8px);
  min-width: 140px;
  background: var(--cream);
  border: 2px solid var(--black);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 1rem;
  line-height: 1.3;
}
.chip .lbl,
.sheet-meta .lbl {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bluegray);
}
.chip .val,
.sheet-meta .val { font-weight: 700; }

.safety {
  background: var(--cream);
  border: 2px solid var(--black);
  border-left: 8px solid var(--teal);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
  font-size: 1rem;
}
.safety strong { display: block; margin-bottom: 4px; }

.question-box {
  background: var(--black);
  color: var(--white);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 16px;
}
.question-box .q-label {
  font-family: var(--head, Fredoka, Nunito, sans-serif);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0 0 6px;
}
.question-box p {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--white);
}

/* Materials: ALWAYS a single column (fixes the squished 2-col list on phones).
   This must override play.css `.printable .boxes { columns: 2 }`. */
.printable .boxes,
.printable ul.boxes,
.printable .materials {
  columns: 1 !important;
  column-count: 1 !important;
  padding: 0;
  margin: 0 0 16px;
  list-style: none;
  display: block;
}
.printable .materials li,
.printable .boxes li {
  list-style: none;
  position: relative;
  padding: 10px 8px 10px 36px;
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.4;
  background: var(--cream);
  border: 2px solid var(--black);
  border-radius: 10px;
  break-inside: avoid;
  page-break-inside: avoid;
}
.printable .materials li::before,
.printable .boxes li::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 12px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--black);
  border-radius: 3px;
  background: var(--white);
}
.printable .materials .sub {
  display: block;
  color: var(--bluegray);
  font-size: 1rem;
  font-weight: 400;
  margin-top: 2px;
}
.printable .materials .qty { font-weight: 700; }

.setup, .steps { padding: 0; margin: 0 0 16px; list-style: none; counter-reset: none; }
.printable ol.setup > li,
.printable ol.steps > li.step,
.printable .step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px 12px;
  margin: 0 0 18px;
  padding: 0;
  align-items: start;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.printable ol.steps > li.step::before,
.printable ol.setup > li::before {
  content: none !important;
  display: none !important;
}
.printable ol.steps > li.step > span { padding-top: 0; }
.step.has-fig { grid-template-columns: 40px 1fr; }
.step .step-n, .setup .step-n {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--black);
  color: var(--lime);
  font-family: var(--display, "Russo One", "Arial Black", sans-serif);
  font-size: 1.05rem;
  display: grid;
  place-items: center;
  flex: none;
}
.step .step-body, .setup .step-body { min-width: 0; }
.step .step-body p, .setup .step-body p { margin: 0; font-size: 1rem; }
.step .step-title { font-weight: 700; display: block; margin-bottom: 2px; }
.step .step-fig {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding: 12px;
  border: 2px solid var(--black);
  border-radius: 12px;
  background: var(--paper);
}
.step .step-fig svg { width: 100%; max-width: 100%; height: auto; margin: 0 auto; display: block; }
.step .step-fig figcaption {
  font-size: 1rem;
  color: var(--bluegray);
  text-align: center;
  margin-top: 8px;
  line-height: 1.35;
}

.predict, .fair-test, .apollo-box, .game-tie, .deeper, .realworld, .standards-box {
  border: 2px solid var(--black);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  background: var(--white);
}
.fair-test { border-left: 8px solid var(--lime); }
.apollo-box { border-left: 8px solid var(--bluegray); background: var(--cream); }
.game-tie { border-left: 8px solid var(--teal); }
.deeper { background: var(--cream); }
.choices {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.choices li {
  border: 2px solid var(--black);
  border-radius: 999px;
  padding: 8px 12px 8px 14px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.choices .circ {
  width: 22px;
  height: 22px;
  border: 2px solid var(--black);
  border-radius: 50%;
  background: var(--white);
  flex: none;
}

.printable table,
.printable .data-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin: 0 0 16px;
}
.printable table th,
.printable table td {
  border: 2px solid var(--black);
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
.printable table th {
  background: var(--cream);
  color: var(--black, #111);
  font-family: var(--head, Fredoka, Nunito, sans-serif);
  font-weight: 650;
  font-size: 1rem;
}
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; }
.table-wrap table { margin: 0; min-width: 280px; }

.graph-fig {
  border: 2px solid var(--black);
  border-radius: 12px;
  padding: 8px;
  margin: 0 0 16px;
  background: var(--paper);
}
.graph-fig figcaption { font-size: 1rem; font-weight: 700; margin: 0 0 6px; text-align: center; }
.graph-hint { font-size: 1rem; color: var(--bluegray); text-align: center; margin: 6px 0 0; }

.vocab { list-style: none; padding: 0; margin: 0 0 16px; }
.vocab li {
  padding: 8px 0;
  border-bottom: 1px solid #ccc;
  font-size: 1rem;
}
.vocab li:last-child { border-bottom: 0; }
.vocab dt, .vocab .word { font-weight: 700; }

.troubleshoot { list-style: none; padding: 0; margin: 0 0 16px; }
.troubleshoot li {
  border: 2px solid var(--black);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 8px;
  font-size: 1rem;
}
.troubleshoot .iff { font-weight: 700; }

.levelup { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.levelup .tier {
  border: 2px solid var(--black);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--cream);
}
.levelup .tier h3 { margin: 0 0 6px; }
.levelup .tier ul { margin: 0; padding-left: 1.2em; }
.levelup .tier li { margin: 0 0 4px; font-size: 1rem; }

.draw {
  border: 3px dashed var(--black);
  border-radius: 12px;
  min-height: 8rem;
  padding: 8px 10px;
  font-weight: 700;
  margin: 8px 0 0;
  background: var(--paper);
}

.standards-box { font-size: 1rem; background: var(--cream); }
.standards-box p { margin: 0 0 8px; }
.standards-box .note { font-size: 1rem; color: var(--bluegray); margin: 0; }

.printable .pr-foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 20px;
  padding-top: 10px;
  border-top: 2px solid var(--black);
  font-size: 1rem;
}
.printable .close-line {
  font-family: var(--head, Fredoka, Nunito, sans-serif);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 8px 0;
}

/* Hide site chrome image of Apollo if present — it squeezed the title on phones */
.printable .pr-head img:not(.bm) { display: none; }

/* Wider phones / tablets: chips in a row, steps can sit beside a figure */
@media (min-width: 600px) {
  .printable { padding: 28px 28px 48px; }
  .printable h1 { font-size: 2.15rem; }
  .sheet-meta li,
  .chip { flex: 1 1 calc(33.33% - 8px); }
  /* Diagrams stay under the step text at full width so labels stay readable on screen and in print. */
  .step.has-fig {
    grid-template-columns: 40px 1fr;
  }
  .step.has-fig .step-fig {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .choices { flex-direction: row; flex-wrap: wrap; }
  .choices li { flex: 1 1 180px; }
  .printable .pr-foot { flex-direction: row; justify-content: space-between; }
}

/* ---------- Print (letter, low ink) ---------- */
@media print {
  .printable {
    border: 0;
    margin: 0;
    padding: 0;
    max-width: none;
    font-size: 10.5pt;
    line-height: 1.35;
    color: #000;
    background: #fff;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  .printable h1 { font-size: 20pt; }
  .printable h2 { font-size: 13pt; margin: 10pt 0 6pt; border-bottom-width: 2pt; }
  .printable h3 { font-size: 11pt; }
  .sheet-meta li, .chip, .safety, .materials li, .step .step-fig,
  .predict, .fair-test, .apollo-box, .game-tie, .deeper, .realworld,
  .standards-box, .troubleshoot li, .levelup .tier, .question-box {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .question-box { background: #fff; color: #000; border: 2.5pt solid #000; }
  .question-box .q-label { color: #000; }
  .question-box p { color: #000; }
  .step .step-n, .setup .step-n { background: #fff; color: #000; border: 2pt solid #000; }
  .printable table th { background: #fff; color: #000; }
  .materials li, .chip, .sheet-meta li, .safety, .deeper, .apollo-box,
  .standards-box, .levelup .tier { background: #fff; }
  .draw { min-height: 1.8in; }
  @page { size: letter; margin: 0.5in; }
}

/* Standalone preview page (not the site chrome) */
body.sheet-preview {
  margin: 0;
  background: #e8e9e4;
  color: var(--black);
  font-family: Nunito, Lexend, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
body.sheet-preview .preview-bar {
  max-width: 46rem;
  margin: 16px auto 0;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
body.sheet-preview .preview-bar a,
body.sheet-preview .preview-bar button {
  font: 700 1rem Fredoka, Nunito, sans-serif;
  background: var(--lime);
  color: var(--black);
  border: 3px solid var(--black);
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
  cursor: pointer;
}
body.sheet-preview .preview-bar a.ghost { background: var(--white); }
@media print {
  body.sheet-preview { background: #fff; }
  body.sheet-preview .preview-bar { display: none !important; }
}

/* Small Orion + Apollo brand mark in the sheet's brand line (site addition). It sits inline with the brand text,
   so it never squeezes the title the way the old big Apollo photo did. */
.printable .pr-head .brand img.bm { display: inline-block; width: 28px; height: 28px; object-fit: contain; flex: none; margin: 0; }
.printable .pr-head .brand .bm-pair { display: inline-flex; gap: 2px; flex: none; }
@media print { .printable .pr-head .brand img.bm { width: 22px; height: 22px; } }
