/* Liv's weekly learning packs — screen plan + A4 print sheets. */

:root {
  --ink: #2a2622;
  --ink-soft: #6b6156;
  --paper: #faf7f1;
  --line: #e2dacb;
  --accent: #b8792a;
  --accent-soft: #f3e7d2;
  --rule: #b9b1a4;
  --sans: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* Thonburi ships with macOS and renders reliably through the headless-Chrome
     PDF route; an embedded webfont came out blank there. */
  --thai: "Thonburi", "Noto Sans Thai", "Leelawadee UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 28px 80px;
}

/* ----------------------------------------------------------- index */

.hero { padding: 24px 0 8px; border-bottom: 2px solid var(--ink); }
.eyebrow {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
h1 { font-size: 46px; line-height: 1.06; margin: 10px 0 12px; letter-spacing: -.02em; }
.sub-hero { font-size: 19px; color: var(--ink-soft); max-width: 60ch; margin: 0 0 26px; }

.block { margin: 44px 0; }
.block h2 {
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 16px; font-weight: 600;
}

.principles { margin: 0; padding-left: 20px; }
.principles li { margin-bottom: 9px; max-width: 68ch; }
.rules { background: var(--accent-soft); padding: 24px 28px; border-radius: 10px; }
.rules h2 { color: var(--accent); }

table.term { width: 100%; border-collapse: collapse; }
table.term th {
  text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); border-bottom: 1px solid var(--line); padding: 0 12px 8px 0;
  font-weight: 600;
}
table.term td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.term td.n { width: 34px; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
table.term td.ep { width: 42%; }
table.term a { font-weight: 600; text-decoration: none; }
table.term a:hover { text-decoration: underline; }
.sub { display: block; font-size: 13px; color: var(--ink-soft); font-weight: 400; margin-top: 3px; }

.bonus { list-style: none; margin: 0; padding: 0; }
.bonus li { padding: 11px 0; border-bottom: 1px solid var(--line); }
.bonus a { font-weight: 600; text-decoration: none; }

.site-foot {
  margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-soft); max-width: 62ch;
}

/* ----------------------------------------------------------- week plan */

.crumb { margin-bottom: 28px; font-size: 14px; }
.crumb a { text-decoration: none; }
.week-head { border-bottom: 2px solid var(--ink); padding-bottom: 22px; }
.wk {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.focus { font-size: 18px; color: var(--ink-soft); max-width: 62ch; margin: 0; }

.episode {
  display: flex; gap: 16px; align-items: center; text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px; color: inherit;
}
.episode:hover { border-color: var(--accent); }
.play {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  font-size: 15px; padding-left: 3px;
}
.ep-title { display: block; font-weight: 600; font-size: 17px; }
.ep-meta { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.ep-note {
  margin: 10px 0 0; font-size: 14px; color: var(--accent); font-weight: 600;
}
.watch { margin: 14px 0 0; max-width: 64ch; }

.acts { margin: 0; padding-left: 22px; }
.act { margin-bottom: 24px; max-width: 66ch; }
.act h4 { margin: 0 0 4px; font-size: 17px; }
.act p { margin: 0 0 4px; }
.act-mat { font-size: 14px; color: var(--ink-soft); }

.print-cta button {
  font: inherit; font-weight: 600; background: var(--ink); color: var(--paper);
  border: 0; border-radius: 8px; padding: 11px 20px; cursor: pointer;
}
.print-cta button:hover { background: var(--accent); }
kbd {
  font: inherit; font-size: 13px; background: #fff; border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px;
}

/* ----------------------------------------------------------- sheets */

.sheets { padding-bottom: 60px; }

.sheet {
  background: #fff;
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 26px;
  padding: 16mm 15mm;
  box-shadow: 0 2px 20px rgba(0, 0, 0, .1);
  display: flex;
  flex-direction: column;
  page-break-after: always;
  break-after: page;
}
.sheet:last-child { page-break-after: auto; break-after: auto; }

.sheet-head { border-bottom: 1.5px solid var(--ink); padding-bottom: 8px; margin-bottom: 16px; }
.sheet-head h2 { margin: 2px 0 0; font-size: 26px; letter-spacing: -.01em; }
.kicker {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 600;
}
.sheet-foot {
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 10px; color: var(--ink-soft); letter-spacing: .08em; text-transform: uppercase;
}
.lead { font-size: 15px; color: var(--ink-soft); margin: 0 0 16px; max-width: 62ch; }
.foot-note { font-size: 13px; color: var(--ink-soft); margin: 14px 0 0; max-width: 62ch; }

/* tracing */
.trace-row {
  display: flex; gap: 6mm; align-items: flex-end;
  border-bottom: 1px dashed var(--line); padding: 4mm 0;
}
.glyph { width: 32mm; height: 40mm; flex: none; }
.glyph-wide { width: 50mm; }

/* sound hunt */
.hunt-letter { text-align: center; margin: 0 0 4mm; }
.hunt-letter .glyph { width: 40mm; height: 48mm; }
.frames { display: flex; flex-direction: column; gap: 6mm; }
.frame {
  border: 2px dashed var(--rule); border-radius: 5mm; height: 48mm;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.frame-hint {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #bdb5a8;
}
.frame-line { width: 60%; border-bottom: 1px solid var(--line); margin-top: 26mm; }

/* counting */
.count-row {
  display: flex; align-items: center; gap: 6mm;
  border-bottom: 1px dashed var(--line); padding: 2mm 0;
}
.count-row .glyph { width: 24mm; height: 30mm; flex: none; }
.dots { display: flex; flex-wrap: wrap; gap: 4mm; }
.dot {
  width: 15mm; height: 15mm; border: 1.5px solid var(--rule); border-radius: 50%;
  display: block;
}

/* sorting */
.sort { display: flex; flex-direction: column; gap: 5mm; flex: 1; }
.sort-col { display: flex; flex-direction: column; flex: 1; }
.sort-label {
  font-size: 20px; font-weight: 600; text-transform: lowercase;
  letter-spacing: .02em; margin-bottom: 2mm;
}
.sort-box { border: 2px solid var(--rule); border-radius: 4mm; flex: 1; min-height: 42mm; }

/* word building — empty boxes for cut-out letters */
.blend-row {
  display: flex; align-items: center; gap: 6mm;
  border-bottom: 1px dashed var(--line); padding: 5mm 0;
}
.blend-boxes { display: flex; gap: 4mm; }
.blend-box {
  width: 26mm; height: 30mm; border: 2px solid var(--rule); border-radius: 3mm;
  display: block;
}
.blend-key {
  margin-left: auto; font-family: Futura, "Century Gothic", "Avenir Next", sans-serif;
  font-size: 15px; color: #cfc7ba; letter-spacing: .06em;
}

/* rhyme / matching mat */
.pair-heads {
  display: flex; gap: 14mm; margin-bottom: 3mm;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
}
.pair-heads span { flex: 1; }
.pair-row { display: flex; align-items: center; gap: 4mm; margin-bottom: 5mm; }
.pair-box {
  flex: 1; height: 30mm; border: 2px dashed var(--rule); border-radius: 3mm; display: block;
}
.pair-link { width: 10mm; border-top: 1.5px dotted var(--rule); flex: none; }

/* odd and even — counters laid in pairs */
.evens { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3mm; }
.even-row { display: flex; flex-direction: column; align-items: center; }
.even-row .glyph { width: 16mm; height: 20mm; }
/* a two-digit glyph carries a wider viewBox, so it needs a wider box or it
   scales down and looks smaller than its neighbours */
.even-row .glyph-wide { width: 26mm; }
.even-dots {
  display: grid; grid-template-columns: repeat(2, auto); gap: 2mm;
  justify-content: center;
}
.dot-sm { width: 9mm; height: 9mm; }

/* cut-out cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.card {
  border: 1.5px dashed var(--rule); height: 34mm;
  display: grid; place-items: center; margin: -0.75px 0 0 -0.75px;
}
.card span {
  font-family: Futura, "Century Gothic", "Avenir Next", sans-serif;
  font-size: 30px; letter-spacing: .01em;
}
/* moveable-alphabet tiles: chunky enough for three-year-old fingers */
.cards-small { grid-template-columns: repeat(4, 1fr); }
.cards-small .card { height: 42mm; }
.cards-small .card span { font-size: 44px; }

.level { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 22px 26px; }
.level p { margin: 0; max-width: 66ch; color: var(--ink-soft); }
.video-note { margin-top: 12px !important; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }

/* entry diagnostic */
.entry { background: #f2f6f2; border-radius: 10px; padding: 24px 28px; }
.entry h2 { color: #4a7a52; }
.entry-intro { margin: 0 0 14px; max-width: 66ch; }
.entry-items { margin: 0; padding-left: 20px; }
.entry-items li { margin-bottom: 9px; max-width: 68ch; }
.entry-outcome {
  margin: 16px 0 0; padding-top: 14px; border-top: 1px solid #d6e2d8;
  font-weight: 600; max-width: 66ch;
}

/* readiness gate on a week page */
.gate {
  background: #fdf3e3; border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: 16px 22px; margin: 28px 0;
}
.gate h3 {
  margin: 0 0 6px; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}
.gate p { margin: 0; max-width: 64ch; }

/* practical life + movement strands */
.strand-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.strand { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.strand h4 { margin: 0 0 6px; font-size: 15px; }
.strand p { margin: 0; font-size: 14px; color: var(--ink-soft); }

.nanny-strand {
  border: 1px solid var(--line); border-radius: 4mm;
  padding: 4mm 6mm; margin-bottom: 6mm;
}
.nanny-strand ul { margin: 0; padding-left: 18px; }
.nanny-strand li { margin-bottom: 4px; font-size: 14px; }
.nanny-strand h3, .nanny-mats h3 {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 8px; font-weight: 600;
}

/* sequence strip */
.sequence { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.sequence li {
  display: flex; align-items: center; gap: 6mm; font-size: 22px;
  padding: 4mm 0; border-bottom: 1px solid var(--line);
}
.step-n {
  flex: none; width: 12mm; height: 12mm; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 17px; font-weight: 700;
}

/* observation */
table.observe { width: 100%; border-collapse: collapse; }
table.observe th {
  text-align: left; font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); border-bottom: 1.5px solid var(--ink); padding-bottom: 6px;
}
table.observe tbody th { width: 22mm; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink); }
table.observe td { border-bottom: 1px solid var(--line); height: 22mm; }
table.observe tbody th { border-bottom: 1px solid var(--line); }

/* nanny card */
.nanny-mats {
  background: var(--accent-soft); border-radius: 4mm; padding: 5mm 6mm; margin-bottom: 6mm;
}
.nanny-mats ul { margin: 0; padding-left: 18px; }
.nanny-mats li { margin-bottom: 4px; font-size: 14px; }
.nanny-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; }
.nanny-cols h3 {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 8px; font-weight: 600;
}
.nanny-cols ul { margin: 0; padding-left: 18px; }
.nanny-cols li { margin-bottom: 9px; font-size: 14px; }
.thai { font-family: var(--thai); line-height: 1.9; text-transform: none; letter-spacing: 0; }

/* ----------------------------------------------------------- print */

@page { size: A4; margin: 14mm; }

@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .sheets { padding: 0; }
  .sheet {
    width: auto; min-height: 0; height: 100%;
    margin: 0; padding: 0; box-shadow: none;
  }
  .sheet-foot { border-top: 1px solid #ddd; }
  .rules, .nanny-mats, .step-n { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* screen-only: A4 is ~794px wide at print time and must never collapse */
@media screen and (max-width: 880px) {
  .wrap { padding: 28px 18px 60px; }
  h1 { font-size: 34px; }
  .sheet { width: 100%; min-height: 0; padding: 20px; }
  table.term td.ep { width: auto; }
  .nanny-cols { grid-template-columns: 1fr; }
}
