/* ====== Reading companion page (U0 Block 2, Lovelock) ====== */

.source-callout .reading-citation {
  font-size: 14px;
  margin-bottom: 8px;
}
.source-callout .companion-note {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0;
}

/* Unverified-translation notice. Warning tint, never dismissible. */
.verify-banner {
  background: var(--do);
  border-left: 4px solid var(--spine-do);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 20px 0;
}
.verify-banner p {
  font-size: 14px;
  color: var(--deep-do);
  margin: 0;
}

.reading-controls {
  background: var(--panel-bg);
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 24px;
}
.lang-select {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.lang-select label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.lang-select select {
  font: inherit;
  font-size: 14px;
  padding: 4px 8px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: white;
  color: var(--ink);
}
.reading-lede {
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 10px;
}

/* ====== Launch card + supports ======
   The reader is an Apps Script web app restricted to the school domain. It
   cannot be framed (Google's sign-in refuses framing outright), so it opens in
   its own window and this page carries the supports behind it. */
.reader-launch {
  background: var(--panel-bg);
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 24px;
}
.reader-launch h2 {
  font-size: 20px;
  color: var(--deep-concepts);
  margin-bottom: 4px;
}
.reader-launch p { font-size: 14px; margin-bottom: 12px; }
.reader-open-btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: 7px;
  text-decoration: none;
}
.reader-open-btn:hover { background: var(--accent-dark); color: white; }
.reader-launch-note {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 0 !important;
}
.placeholder-frame {
  background: var(--paper);
  border-style: dashed;
  border-color: var(--muted);
}
.placeholder-frame p:last-child { margin-bottom: 0; }
.placeholder-frame code {
  background: var(--soft);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 13px;
}

/* Supports read as one column at a comfortable measure. */
.support-body { max-width: 46rem; }
.rail-block { margin-bottom: 22px; }
.rail-block h2 { font-size: 17px; color: var(--deep-concepts); margin-bottom: 2px; }
.rail-sub { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.rail-origin { margin: 0 0 10px 18px; font-size: 13px; }
.rail-origin li { margin-bottom: 3px; }

.reading-section { margin-bottom: 28px; }
.reading-section h2 {
  font-size: 20px;
  color: var(--deep-concepts);
  margin-bottom: 4px;
}
.reading-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}

/* Origin/Purpose list: not the argument, but where the paper came from. */
.origin-list { list-style: decimal; margin: 0 0 12px 22px; }
.origin-list li { margin-bottom: 8px; font-size: 14px; }
.origin-what { font-weight: 700; display: block; }
.origin-why { color: var(--muted); }
.sic-note {
  font-size: 13px;
  color: var(--muted);
  background: white;
  border-left: 4px solid var(--spine-story);
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
}

/* The ten path paragraphs. Concepts-family spine marks the path. */
.path-list { list-style: none; margin: 0; padding: 0; counter-reset: path; }
.path-item {
  background: white;
  border-left: 4px solid var(--spine-concepts);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin-bottom: 12px;
  counter-increment: path;
}
.path-locator {
  font-size: 14px;
  margin: 0;
}
.path-locator::before {
  content: counter(path) ". ";
  font-weight: 700;
  color: var(--deep-concepts);
}
.path-locator q { font-style: italic; }
.path-extra { color: var(--muted); font-size: 13px; }

/* Glossary term marks. */
button.term {
  font: inherit;
  border: none;
  padding: 0 1px;
  background: rgba(46, 83, 149, 0.08);
  border-bottom: 2px dotted var(--accent);
  color: inherit;
  cursor: pointer;
}
button.term:hover { background: var(--accent-light); }
button.term[aria-expanded="true"] { background: var(--accent-light); }

.term-pos { color: var(--muted); font-size: 12px; }

/* Definition card, injected next to the tapped term. */
.term-card {
  background: white;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 10px 0;
  font-size: 14px;
  max-width: 520px;
}
.tc-head { margin: 0 0 4px; }
.tc-pos { font-weight: 400; color: var(--muted); font-size: 12px; }
.tc-plain { margin: 0 0 6px; }
.tc-note { margin: 0 0 6px; color: var(--muted); font-style: italic; }
.tc-translation {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  background: var(--do);
  border-radius: 6px;
  padding: 6px 10px;
  margin: 0 0 6px;
}
.tc-translation.is-verified { background: var(--show); }
.tc-lang {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.tc-term { font-weight: 700; font-size: 16px; }
.tc-unverified {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--spine-do);
  color: white;
  padding: 1px 6px;
  border-radius: 4px;
}
.tc-verified {
  font-size: 11px;
  font-weight: 700;
  color: var(--deep-show);
}
.tc-flag {
  font-size: 13px;
  background: var(--warn);
  border-left: 3px solid var(--spine-reflect);
  padding: 6px 10px;
  margin: 0 0 6px;
  color: var(--deep-reflect);
}
.tc-links { margin: 0; font-size: 13px; }

/* ====== Word bank (glossary section) ====== */
.wb-source { font-size: 14px; font-style: italic; margin-bottom: 6px; }
.wb-verify {
  background: var(--do);
  border-left: 4px solid var(--spine-do);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 20px 0 24px;
}
.wb-verify p { font-size: 14px; color: var(--deep-do); margin: 0; }

.wb-list { list-style: none; margin: 0; padding: 0; }
.wb-entry {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin-bottom: 14px;
  scroll-margin-top: 80px;
}
/* Path words carry the concepts spine, matching the reading companion. */
.wb-entry.is-path { border-left-color: var(--spine-concepts); }
.wb-entry:target { box-shadow: 0 0 0 3px var(--accent-light); }
.wb-term { font-size: 19px; color: var(--deep-concepts); margin: 0 0 4px; }
.wb-pos { font-size: 13px; font-weight: 400; color: var(--muted); }
.wb-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.wb-tag {
  font-size: 11px;
  font-weight: 600;
  background: var(--soft);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 999px;
}
.wb-tag.is-path-tag { background: var(--accent-light); color: var(--accent-dark); }
.wb-plain { font-size: 14px; margin: 0 0 6px; }
.wb-note { font-size: 13px; color: var(--muted); font-style: italic; margin: 0 0 6px; }
.wb-flag {
  font-size: 13px;
  background: var(--warn);
  border-left: 3px solid var(--spine-reflect);
  color: var(--deep-reflect);
  padding: 6px 10px;
  margin: 0 0 8px;
}
.wb-translations { width: auto; margin: 0 0 8px; border-collapse: collapse; font-size: 13px; }
.wb-translations th, .wb-translations td {
  text-align: left;
  padding: 3px 12px 3px 0;
  border: none;
  vertical-align: baseline;
}
.wb-translations th { font-weight: 600; color: var(--muted); font-size: 12px; }
.wb-translation { font-weight: 700; font-size: 15px; }
.wb-status { font-size: 11px; color: var(--deep-show); }
.wb-unverified {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--spine-do);
  color: white;
  padding: 1px 6px;
  border-radius: 4px;
}
.wb-back { font-size: 13px; margin: 0; }

/* Close-reading path toggle: dim everything off the path. */

/* ====== Argument carousel ======
   Every slide is in the DOM. JS hides all but one with the `hidden` attribute,
   so with JS off nothing hides, the nav never unhides, and this reads as a
   numbered list. Do not swap to a CSS-only .is-active rule: that version looks
   identical and disappears entirely when a script fails to load. */
.slides { margin-bottom: 20px; }
.slide {
  background: var(--concepts);
  border-left: 4px solid var(--spine-concepts);
  border-radius: 0 8px 8px 0;
  padding: 16px 18px;
  margin-bottom: 12px;
}
/* Slide 9 pivots from summary to task, so it changes family. */
.slide.is-task {
  background: var(--do);
  border-left-color: var(--spine-do);
}
.slide-count {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--spine-concepts);
  margin-bottom: 4px;
}
.slide.is-task .slide-count { color: var(--spine-do); }
.slide-title { font-size: 19px; margin-bottom: 8px; color: var(--deep-concepts); }
.slide.is-task .slide-title { color: var(--deep-do); }
.slide-title:focus-visible { outline: 3px solid var(--spine-concepts); outline-offset: 3px; }
.slide-body { margin-bottom: 10px; }
.slide-figure { margin: 12px 0; }
.slide-figure img { max-width: 100%; height: auto; }
.slide-terms { margin-bottom: 10px; }
.slide-terms-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 4px;
}
.slide-find {
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-bottom: 0;
}

.slide-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.slide-btn {
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  cursor: pointer;
}
.slide-btn:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }
.slide-btn:disabled { background: var(--soft); border-color: var(--border); color: var(--muted); cursor: default; }
.slide-pos { font-size: 13px; color: var(--muted); }
.slide-showall-row { margin-bottom: 0; }
.slide-showall {
  font: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  color: var(--accent);
  cursor: pointer;
}
.slide-showall:hover { border-color: var(--accent); }

/* ====== Word list ======
   Visible on screen and printed. Every term from the paper, not just the ones
   the steps use, because a student reading the PDF hits words the steps skip. */
.wl-list { list-style: none; margin: 0; padding: 0; }
.wl-entry {
  background: white;
  border-left: 3px solid var(--border);
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.wl-entry.is-slide { border-left-color: var(--spine-concepts); }
.wl-head { margin: 0 0 4px; font-size: 15px; }
.wl-pos { font-weight: 400; color: var(--muted); font-size: 12px; }
.wl-tag {
  font-size: 11px;
  font-weight: 600;
  background: var(--concepts);
  color: var(--deep-concepts);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.wl-plain { margin: 0; font-size: 14px; }
.wl-note { margin: 4px 0 0; font-size: 13px; color: var(--muted); font-style: italic; }

@media (max-width: 640px) {
  .term-card { max-width: 100%; }
}

/* ====== Print ====== */
@media print {
  .reading-controls,
  .verify-banner,
  .term-cards { display: none; }
  /* The paper prints from the reader itself, not from this page. */
  .reader-launch { display: none; }
  .support-body { max-width: none; }
  /* All nine steps print, in order, whatever the carousel is showing on screen.
     The `hidden` attribute has to be overridden explicitly here. */
  .slides .slide[hidden] { display: block; }
  .slide { break-inside: avoid; border-left: 2pt solid #999; background: none; }
  .slide.is-task { border-left-width: 4pt; }
  .slide-nav,
  .slide-showall-row { display: none; }
  button.term {
    background: none;
    border-bottom: 1px dotted #333;
    color: inherit;
  }
  /* The word list prints on its own page. Translations omitted. */
  .word-list { page-break-before: always; }
  .wl-entry { break-inside: avoid; border-left: 2pt solid #999; }
  .path-item { break-inside: avoid; }
}

/* ====== Earth as a Planet (U1) ====== */
/* Slide provenance. Same muted family as .slide-find: present when you look for
   it, never competing with the slide body. .slide-cite carries the section a
   slide is adapted from; .slide-credit carries a figure's original OpenStax
   credit line and sits inside the figure so attribution cannot drift from the
   image it belongs to. */
.slide-cite {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0;
}
.slide-credit {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.table-caption {
  font-size: 13px;
  color: var(--muted);
}
/* The deck-3 Extension marker. It cannot reuse the choice board's tag: that rule
   is scoped `.choice .udl-tag`, so it does not reach a reading page. Same look,
   reachable here. */
.deck-extension-note {
  font-size: 13px;
  color: var(--muted);
}
.deck-extension-note .udl-tag {
  display: inline-block;
  font-size: 11px;
  background: var(--soft);
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
  color: var(--muted);
}
.license-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 13px;
  color: var(--muted);
}
.license-box p:last-child { margin-bottom: 0; }
