/* The Last Scribe — styles for the content pages (parents, quiz, families,
   Sabbath School, youth groups, class plan, chapter pages, about, press).
   Everything shared lives in style.css; this file holds only what those
   pages need beyond it. CSP is style-src 'self': nothing inline. */

/* ---------- Page layout ---------- */

.pg-lead { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.pg-lead p { color: var(--ink-dim); max-width: 62ch; }
.pg-lead p + p { margin-top: 14px; }
.pg-lead figure { margin: 0; }
.pg-lead figcaption { color: var(--ink-faint); font-size: 0.9rem; margin-top: 10px; }
.pg-lead img {
  width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  image-rendering: pixelated;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-card, 6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.pg-narrow { max-width: 760px; margin: 0 auto; }
.pg-narrow h2, .pg-section h2 { margin-top: 44px; margin-bottom: 14px; }
.pg-narrow h2:first-child, .pg-section h2:first-child { margin-top: 0; }
.pg-narrow h3, .pg-section h3 { font-size: 1.15rem; margin: 26px 0 8px; }
.pg-narrow p, .pg-narrow li, .pg-section p, .pg-section li { color: var(--ink-dim); }
.pg-narrow p + p, .pg-section p + p { margin-top: 12px; }
.pg-narrow ul, .pg-narrow ol, .pg-section ul, .pg-section ol { padding-left: 1.25em; display: grid; gap: 8px; margin: 12px 0; }
.pg-narrow li strong, .pg-section li strong { color: var(--ink); }

.pg-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* ---------- Callouts ---------- */

.pg-note {
  border-left: 3px solid var(--gold);
  background: rgba(212, 175, 55, 0.07);
  border-radius: 0 var(--r-card, 6px) var(--r-card, 6px) 0;
  padding: 14px 18px; margin: 22px 0;
  color: var(--ink-dim);
}
.pg-note strong { color: var(--ink); }

/* ---------- Fact lists (press, chapter facts) ---------- */

.pg-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; }
.pg-facts div {
  background: rgba(10, 12, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-card, 6px);
  padding: 18px 20px;
}
.pg-facts dt { font-family: var(--font-brand); font-size: 1.6rem; color: var(--gold-bright); letter-spacing: 0.02em; }
.pg-facts dd { color: var(--ink-dim); margin: 4px 0 0; font-size: 0.95rem; }

/* ---------- Tables (class plan, chapter lists) ---------- */

.pg-table-wrap { overflow-x: auto; margin: 16px 0; }
.pg-table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.pg-table th, .pg-table td {
  text-align: left; vertical-align: top; padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink-dim);
}
.pg-table th { color: var(--gold-bright); font-weight: 600; letter-spacing: 0.02em; }
.pg-table td:first-child { color: var(--ink); white-space: nowrap; }

/* ---------- Sample quiz (questions shown without their answers marked) ---------- */

.pg-quiz { display: grid; gap: 18px; margin: 20px 0; }
.pg-quiz-q {
  background: rgba(10, 12, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-card, 6px);
  padding: 20px 22px;
}
.pg-quiz-q p { color: var(--ink); font-weight: 600; margin-bottom: 12px; }
.pg-quiz-q ol { list-style: upper-alpha; padding-left: 1.6em; display: grid; gap: 6px; margin: 0; }
.pg-quiz-q li { color: var(--ink-dim); }
.pg-quiz-q .pg-ref { display: block; color: var(--ink-faint); font-size: 0.88rem; margin-top: 12px; }

/* ---------- Breadcrumbs (chapter pages and the /play/ hub) ---------- */

.pg-crumbs { font-size: 0.9rem; color: var(--ink-faint); margin-bottom: 14px; }
.pg-crumbs a { color: var(--ink-dim); text-decoration: none; border-bottom: 1px solid var(--line-faint); }
.pg-crumbs a:hover, .pg-crumbs a:focus-visible { color: var(--gold-bright); border-color: currentColor; }
.pg-crumbs [aria-current] { color: var(--ink); }

/* ---------- Sample quiz: the answer, behind a tap ---------- */

.pg-answer { margin-top: 12px; }
.pg-answer summary {
  cursor: pointer; display: inline-flex; align-items: center; min-height: 44px;
  color: var(--gold-bright); font-weight: 600; list-style: none;
}
.pg-answer summary::-webkit-details-marker { display: none; }
.pg-answer summary::before { content: "+"; display: inline-block; width: 1.1em; }
.pg-answer[open] summary::before { content: "–"; }
.pg-answer p { color: var(--ink-dim); font-weight: 400; margin: 4px 0 0; }
.pg-answer p strong { color: var(--ink); }

/* ---------- The /play/ hub: a card per chapter or story ---------- */

.pg-group { margin: 40px 0 16px; }
.pg-group:first-child { margin-top: 0; }
.pg-cards {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px;
}
.content-page .pg-card a {
  display: grid; gap: 6px; height: 100%; text-decoration: none; color: inherit; align-content: start;
  background: rgba(10, 12, 24, 0.55); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-card, 6px); padding: 0 0 14px; overflow: hidden;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.pg-card a:hover, .pg-card a:focus-visible { border-color: color-mix(in srgb, var(--gold) 60%, transparent); transform: translateY(-2px); }
.pg-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; image-rendering: pixelated; }
.pg-card-name { font-family: var(--font-brand); color: var(--ink); font-size: 1.05rem; padding: 6px 14px 0; }
.pg-card-line { color: var(--ink-dim); font-size: 0.95rem; padding: 0 14px; }
.pg-free {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--r-pill, 999px);
  background: var(--gold); color: var(--on-gold); font-family: var(--font-display); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle;
}
.pg-hub-note { color: var(--ink-faint); margin-top: 32px; max-width: 70ch; }
@media (prefers-reduced-motion: reduce) { .pg-card a { transition: none; } .pg-card a:hover { transform: none; } }

/* ---------- Checklists (printable) ---------- */

.pg-check { list-style: none; padding: 0; display: grid; gap: 10px; margin: 14px 0; }
.pg-check li { position: relative; padding-left: 34px; color: var(--ink-dim); }
.pg-check li::before {
  content: ""; position: absolute; left: 0; top: 3px;
  width: 20px; height: 20px; border-radius: 4px;
  border: 1.5px solid var(--gold);
}

/* ---------- Press assets ---------- */

.pg-assets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 20px 0; }
.pg-assets figure { margin: 0; display: grid; gap: 8px; }
.pg-assets img {
  width: 100%; height: auto; image-rendering: pixelated;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-card, 6px);
}
.pg-assets figcaption { color: var(--ink-dim); font-size: 0.93rem; }
.pg-assets figcaption a { margin-left: 6px; }
.pg-logo-row { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin: 16px 0; }
.pg-logo-row figure {
  margin: 0; display: grid; gap: 8px; justify-items: center;
  background: rgba(10, 12, 24, 0.55); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-card, 6px); padding: 20px 28px;
}
.pg-logo-row img { image-rendering: auto; }
.pg-logo-row figcaption { color: var(--ink-faint); font-size: 0.88rem; }

/* ---------- Boilerplate blocks (press) ---------- */

.pg-copyblock {
  background: rgba(10, 12, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-card, 6px);
  padding: 18px 20px; margin: 14px 0;
  color: var(--ink);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .pg-lead { grid-template-columns: 1fr; }
  .pg-facts { grid-template-columns: 1fr 1fr; }
  .pg-assets { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .pg-facts { grid-template-columns: 1fr; }
  .pg-table td:first-child { white-space: normal; }
}

/* ---------- Print (the class plan is meant to be printed) ---------- */

@media print {
  .site-header, .site-footer, .cta-band, .skip-link, .pg-actions, .pg-noprint { display: none !important; }
  body { background: #fff; color: #111; font-size: 11pt; }
  .pg-narrow p, .pg-narrow li, .pg-section p, .pg-section li, .pg-table th, .pg-table td,
  .pg-check li, .pg-note, .pg-quiz-q li, .pg-quiz-q .pg-ref { color: #222; }
  h1, h2, h3, .pg-quiz-q p, .pg-table td:first-child { color: #000; }
  .pg-note, .pg-quiz-q, .pg-facts div, .pg-copyblock { background: none; border-color: #999; }
  .pg-check li::before { border-color: #333; }
  .pg-answer p { color: #222; }
  .pg-crumbs { display: none; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
  section { padding: 12pt 0; }
  section[data-biome], .page-hero { background: none; }
}
