/* Untaught Roots: the :root block as start.mjs brand printed it (the brand's black, warm white and gold),
   its type swapped for the brand's own Libre Caslon Text (SIL OFL, self-hosted), then page CSS. */
@font-face { font-family: "Libre Caslon Text"; src: url("/fonts/LibreCaslonText-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("/fonts/LibreCaslonText-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("/fonts/LibreCaslonText-Bold.woff2") format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }

:root {
  --p-bg: #121212; --p-surface: #1c1b19; --p-ink: #f4f1ea; --p-muted: #8f897d;
  --p-accent: #cda244; --p-accent-ink: #121212; --p-action: #cda244; --p-action-ink: #121212;
  --p-inv-bg: #f4f1ea; --p-inv-surface: #e2dfd9; --p-inv-ink: #121212; --p-inv-muted: #5e5d5a;
  --p-inv-accent: #121212; --p-inv-accent-ink: #f4f1ea; --p-inv-action: #121212; --p-inv-action-ink: #f4f1ea;
  --font-display: "Libre Caslon Text", Georgia, serif;
  --font-text: "Libre Caslon Text", Georgia, serif;
  --display-weight: 400;
  --display-tracking: -0.012em;
  --display-tracking-xl: -0.016em;
  --ly-scale: 1.12;
}

/* the logo: the client's own SVG, white ink on the dark bar */
.nav__logo img { display: block; height: 30px; width: auto; }
.footer .nav__logo img { height: 36px; }
@media (max-width: 639px) { .nav__logo img { height: 24px; } }

/* gold as a text accent (the brand's), never a ground */
.gold { color: var(--p-accent); }

/* real cards: a hairline so a dark card reads on the dark ground */
.card-img { display: block; width: 100%; height: auto; border-radius: var(--r-md); outline: 1px solid color-mix(in oklab, var(--ink) 14%, transparent); outline-offset: -1px; background: var(--surface); }

/* #rights: the peek frame shows the pack's 16:9 desktop card whole */
#rights .frame { aspect-ratio: 16 / 9; background: none; }
#rights .frame .frame__img { object-fit: contain; }

/* history tiles: the 4:5 card whole in the tile */
.pack-tile .tile__img { aspect-ratio: 4 / 5; }

/* picture-develops: the episode portrait, the split's right column */
.develop { margin: 0; border-radius: var(--r-lg); overflow: hidden; height: min(600px, var(--ly-fit, 600px)); }
.develop > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
@media (max-width: 1023px) { .develop { height: auto; aspect-ratio: 4 / 5; margin-top: var(--s-7); } }

/* the pack page's preview grid and switcher */
.switch { display: flex; flex-wrap: wrap; gap: var(--s-5); align-items: end; margin-bottom: var(--s-6); }
.switch__group { display: flex; flex-direction: column; gap: var(--s-2); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-btn); overflow: hidden; }
.seg button { font: 500 var(--t-small)/1 var(--font-text); min-height: 44px; padding: 0 var(--s-5); background: none; color: var(--ink); border: 0; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg button:disabled { color: var(--muted); cursor: not-allowed; opacity: .55; }
.cards-grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
.cards-grid[data-format="story"], .cards-grid[data-format="phone"] { --cols: 6; }
.cards-grid[data-format="desktop"] { --cols: 3; }
@media (max-width: 1023px) { .cards-grid { --cols: 3 !important; } .cards-grid[data-format="desktop"] { --cols: 2 !important; } }
@media (max-width: 639px) { .cards-grid { --cols: 2 !important; gap: var(--s-3); } .cards-grid[data-format="desktop"] { --cols: 1 !important; } }
#cards { height: auto; min-height: 100svh; }
.dl-row { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; margin-bottom: var(--s-6); }

/* socials list */
.social-row { display: flex; align-items: center; gap: var(--s-4); }
.socials a { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; color: var(--ink); }

/* a cream card on the cream band keeps its edge */
.pack-tile .tile__media { outline: 1px solid color-mix(in oklab, var(--ink) 14%, transparent); outline-offset: -1px; }

/* #history at 390: the six tiles two-up, so each group holds one phone screen */
@media (max-width: 639px) {
  #history .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #history .grid > .tile { grid-column: auto; }
  #history .tile__head { flex-direction: column; gap: var(--s-1); }
}

/* a phone: the main action lives in the hero and the close; the bar keeps the logo and the menu */
@media (max-width: 639px) { header.nav:not(.is-open) .nav__actions { display: none; } header.nav:not(.is-open) .nav__actions + .nav__toggle { margin-left: auto; } }

/* phone: the size switch fills the column, four even buttons; the follow rows keep their verb on one line */
@media (max-width: 639px) {
  .switch, .switch__group, .seg { width: 100%; }
  .seg button { flex: 1 1 0; padding: 0 var(--s-2); }
  #follow .rows > li { grid-template-columns: minmax(0, 1fr); }
  #follow .rows__value { grid-column: 1; grid-row: 2; text-align: left; max-width: none; white-space: nowrap; }
}

/* signup (footer): inside .closing__cta; kit .form/.field */
.closing__signup { display: grid; gap: var(--s-4, 16px); padding-top: var(--s-6, 32px); border-top: 1px solid var(--line, #2c2924); align-items: start; }
@media (min-width: 900px) { .closing__signup { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--s-7, 40px); } }
.signup__title { font: 600 var(--t-body, 17px)/1.3 var(--font-display, Georgia, serif); color: var(--ink); margin-bottom: var(--s-2, 8px); }
.signup { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.signup > .btn-row { grid-column: auto; }
.signup > p.t-small { grid-column: 1 / -1; }
@media (max-width: 639px) { .signup { grid-template-columns: minmax(0, 1fr); } .signup .btn { width: 100%; } }
.signup__done { font-size: var(--t-body, 17px); color: var(--ink); padding: var(--s-4, 16px) 0; }

/* episode pages (2026-11-25): a transcript is many screens long, so these sections grow to fit. The kit's
   one-screen sections clipped them and drew Sources, the packs band and the footer over the transcript. */
main.ep > section:is(.section, .hero) { height: auto; min-height: 0; }
main.ep > section > .wrap { height: auto; }
.ep-video { margin-top: var(--s-7); width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden;
  background: #000; border: 1px solid var(--line); }
.ep-video iframe { display: block; width: 100%; height: 100%; border: 0; }
/* the source's site goes under its title on a phone: "caravans.library.northwestern.edu" beside a title
   pushed the episode page 110px wider than the screen (2026-11-25) */
@media (max-width: 639px) {
  main.ep #sources .rows > li { grid-template-columns: minmax(0, 1fr); }
  main.ep #sources .rows__value { grid-column: 1; grid-row: 2; text-align: left; max-width: none; overflow-wrap: anywhere; }
}

/* SITEWIDE (2026-11-25): a section grows when its content needs more than its screens, at every width.
   The kit did this on phones and tablets only; at 1280+ (and the hero at 640+) a section was a fixed height,
   so long content ran under the next section: Privacy lost half its text under the packs band, Submit's form
   ran over the footer on a tablet, the episode transcripts covered Sources and the footer. A section that
   fits keeps exactly its height (min-height = the old height), so nothing that fit has moved. */
@media (min-width: 1280px) {
  main > :is(section, .section):not(.hero, .section--hero), footer.closing {
    height: auto; min-height: calc(var(--h, 1) * 100vh); min-height: calc(var(--h, 1) * 100svh);
  }
  :where(main > :is(section, .section):not(.hero, .section--hero), footer.closing) { display: flex; flex-direction: column; }
  main > :is(section, .section):not(.hero, .section--hero) > :is(.wrap, .container), footer.closing > .wrap { flex: 1 0 auto; height: auto; min-height: 0; }
}
@media (min-width: 640px) {
  main > :is(.hero, .section--hero) { height: auto; min-height: 100vh; min-height: 100svh; }
  main > :is(.hero, .section--hero):has(> :is(.wrap, .container)) { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; grid-auto-rows: auto; }
  main > :is(.hero, .section--hero) > :is(.wrap, .container) { height: auto; }
}

/* episode pages: the fast player, "Did you know?", the Shorts, the signup (2026-11-25) */
.lite { position: relative; width: 100%; height: 100%; background: #000; }
.lite iframe { display: block; width: 100%; height: 100%; border: 0; }
.lite__btn { all: unset; position: absolute; inset: 0; cursor: pointer; display: block; }
.lite__btn img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s var(--ease-out, ease), filter .35s; filter: brightness(.86); }
.lite__btn:hover img { transform: scale(1.02); filter: brightness(1); }
.lite__play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center;
  width: 72px; height: 72px; border-radius: 50%; background: var(--accent, #CDA244); color: #121212;
  box-shadow: 0 8px 30px rgb(0 0 0 / .45); transition: scale .2s; }
.lite__btn:hover .lite__play { scale: 1.06; }
.lite__btn:focus-visible { outline: 2px solid var(--accent, #CDA244); outline-offset: 3px; }
.ep-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--gutter); }
.ep-facts li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: var(--s-4); align-items: baseline;
  padding-top: var(--s-4); border-top: 1px solid var(--line); }
.ep-facts__n { font: 400 22px/1.1 var(--font-display); color: var(--accent, #CDA244); }
.ep-facts p { margin: 0; font-size: 17px; line-height: 1.55; }
.ep-shorts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 280px)); gap: var(--gutter); }
.ep-shorts .lite { aspect-ratio: 9 / 16; height: auto; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.ep-shorts__t { margin: var(--s-3) 0 0; font-size: 15px; line-height: 1.4; }
.ep-signup { align-self: end; }
@media (max-width: 767px) {
  .ep-facts { grid-template-columns: minmax(0, 1fr); }
  .ep-facts li { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
  .ep-shorts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ep-signup { grid-column: 1 / -1; }
}
/* a Short's cover carries its own headline mid-frame: its play button sits in the corner, smaller */
.lite--v .lite__play { left: auto; top: auto; right: 12px; bottom: 12px; translate: none; width: 48px; height: 48px; }
.lite--v .lite__play svg { width: 20px; height: 20px; }

/* "Who should we cover next?" (2026-11-26): six portraits, then a tally after the vote */
.vote__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-4); }
.vote__grid > li { display: flex; }
.vote__btn { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; width: 100%; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface, #1a1a1a); transition: translate .2s var(--ease-out, ease), border-color .2s; }
.vote__btn img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%; filter: grayscale(.15) brightness(.9);
  transition: transform .35s var(--ease-out, ease), filter .35s; }
.vote__btn:hover { translate: 0 -2px; border-color: var(--accent, #CDA244); }
.vote__btn:hover img { transform: scale(1.03); filter: none; }
.vote__btn:active { translate: 0 0; }
.vote__btn:focus-visible { outline: 2px solid var(--accent, #CDA244); outline-offset: 3px; }
.vote__btn:disabled { cursor: progress; opacity: .7; }
.vote__label { display: grid; gap: 2px; padding: var(--s-3) var(--s-3) var(--s-4); }
.vote__n { font-size: 15px; line-height: 1.3; font-weight: 600; }
.vote__l { font-size: 13px; color: var(--muted, #9a958c); }
.vote__bars { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: var(--s-4); max-width: 720px; }
.vote__bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--s-2) var(--s-4); }
.vote__name { font-size: 16px; }
.vote__pct { font: 400 18px/1.2 var(--font-display); }
.vote__bars li.is-mine .vote__pct { color: var(--accent, #CDA244); }
.vote__track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.vote__track span { display: block; height: 100%; border-radius: 3px; background: var(--muted, #9a958c); transition: width .6s var(--ease-out, ease); }
.vote__bars li.is-mine .vote__track span { background: var(--accent, #CDA244); }
@media (max-width: 1023px) { .vote__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 479px) { .vote__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
