:root {
  --atlas-paper: #f2eedf;
  --atlas-paper-deep: #d9d0b8;
  --atlas-ink: #1e302d;
  --atlas-moss: #496a4d;
  --atlas-rust: #a8522c;
  --atlas-line: rgba(30, 48, 45, .2);
}

body {
  background: var(--atlas-paper);
  color: var(--atlas-ink);
  font-family: "Inter", var(--f-body);
}

.daily-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    linear-gradient(90deg, transparent 0 49.8%, rgba(73, 106, 77, .07) 49.8% 50.2%, transparent 50.2%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(30, 48, 45, .035) 31px 32px),
    var(--atlas-paper);
}

.daily-shell [hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  background: var(--atlas-ink);
  color: var(--atlas-paper);
  border-radius: 2px;
}

.skip-link:focus { transform: translateY(0); }

.daily-masthead,
.daily-footer,
.screen {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.daily-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
  border-bottom: 1px solid var(--atlas-line);
}

.daily-brand {
  color: var(--atlas-ink);
  font-family: "Fraunces", var(--f-head);
  font-weight: 700;
}

.daily-brand:hover { color: var(--atlas-rust); }

.daily-mark,
.kicker,
.round-count {
  margin: 0;
  color: var(--atlas-moss);
  font-family: "DM Mono", monospace;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.screen { align-self: center; padding-block: clamp(44px, 8vw, 94px); }

.screen--entry {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr);
  align-items: end;
  gap: clamp(28px, 8vw, 112px);
}

.entry-card,
.questions-panel,
.reveal-panel,
.results-card {
  border: 1px solid var(--atlas-line);
  border-radius: 3px;
  background: rgba(255, 253, 245, .72);
  box-shadow: 10px 10px 0 rgba(73, 106, 77, .11);
}

.entry-card { padding: clamp(28px, 5vw, 58px); }

.entry-card h1,
.round-header h2,
.results-card h2,
.questions-panel h3,
.reveal-panel h3,
.map-panel h3 {
  color: var(--atlas-ink);
  font-family: "Fraunces", var(--f-head);
}

.entry-card h1 {
  max-width: 11ch;
  margin: 12px 0 18px;
  font-size: clamp(2.55rem, 6vw, 5.4rem);
  letter-spacing: -.05em;
  line-height: .96;
}

.entry-card > p:not(.kicker):not(.mode-note) { max-width: 39ch; font-size: clamp(1.06rem, 2vw, 1.34rem); }

.mode-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: 12px 18px;
  border: 1px solid var(--atlas-ink);
  border-radius: 2px;
  color: var(--atlas-ink);
  background: transparent;
  font-family: "DM Mono", monospace;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 1.25;
  text-align: center;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.action:hover { transform: translateY(-2px); color: var(--atlas-paper); background: var(--atlas-ink); }

.action--primary { border-color: var(--atlas-rust); color: #fffdf5; background: var(--atlas-rust); }
.action--primary:hover { background: var(--atlas-ink); border-color: var(--atlas-ink); }
.action--secondary { border-color: var(--atlas-moss); }
.action--full { width: 100%; margin-top: 24px; color: #fffdf5; background: var(--atlas-moss); border-color: var(--atlas-moss); }

.mode-note { margin-top: 18px; color: rgba(30, 48, 45, .74); font-size: .86rem; }

.field-key { border-left: 2px solid var(--atlas-rust); padding: 20px 0 20px 24px; }
.field-key__number { color: var(--atlas-rust); font-family: "DM Mono", monospace; font-size: 2rem; }
.field-key p { margin-top: 10px; max-width: 23ch; font-family: "Fraunces", var(--f-head); font-size: 1.16rem; line-height: 1.35; }

.round-header { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.round-header h2 { margin-top: 9px; font-size: clamp(2rem, 4vw, 3.5rem); }

.investigation-grid { display: grid; gap: 18px; }
.photo-panel,
.map-panel { min-width: 0; margin: 0; border: 1px solid var(--atlas-line); background: rgba(255, 253, 245, .65); }
.photo-slot,
.map-slot { min-height: clamp(280px, 44vw, 520px); background: var(--atlas-paper-deep); }
.photo-slot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-panel figcaption,
.map-panel__header,
.region-fallback { padding: 12px 14px; font-size: .84rem; }
.map-panel__header { border-bottom: 1px solid var(--atlas-line); }
.map-panel__header h3 { font-size: 1.18rem; }
.map-panel__header p { margin-top: 3px; font-size: .86rem; }
.region-fallback { margin: 0; color: var(--atlas-rust); border-top: 1px solid var(--atlas-line); }

.questions-panel,
.reveal-panel,
.results-card { margin-top: 22px; padding: clamp(22px, 4vw, 38px); }
.questions-panel h3,
.reveal-panel h3 { margin-top: 8px; font-size: clamp(1.55rem, 3vw, 2.35rem); }
.question-list { display: grid; gap: 14px; margin-block: 24px; }
.question { font-size: 1.1rem; }
.reveal-panel { border-color: rgba(168, 82, 44, .5); }

.results-card { max-width: 720px; margin-inline: auto; text-align: center; }
.results-card h2 { margin-top: 8px; font-size: clamp(2rem, 5vw, 3.6rem); }
.result-share-card { min-height: 160px; display: grid; place-items: center; margin-top: 26px; padding: 18px; border: 1px dashed var(--atlas-moss); background: rgba(73, 106, 77, .08); }

.daily-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-block: 20px;
  border-top: 1px solid var(--atlas-line);
  color: rgba(30, 48, 45, .74);
  font-size: .78rem;
}

.daily-footer a { color: var(--atlas-ink); text-decoration: underline; text-underline-offset: 3px; }
.daily-footer a:hover { color: var(--atlas-rust); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:where(.daily-shell a, .daily-shell button):focus-visible {
  outline: 3px solid var(--atlas-rust);
  outline-offset: 3px;
  box-shadow: none;
}

.mode-projector { font-size: 22px; }
.mode-projector .question { font-size: 30px; line-height: 1.35; }
.mode-projector button { min-height: 56px; font-size: 1em; }
.mode-projector .daily-mark,
.mode-projector .kicker,
.mode-projector .round-count,
.mode-projector .mode-note,
.mode-projector .field-key p,
.mode-projector .photo-panel figcaption,
.mode-projector .map-panel__header p,
.mode-projector .region-fallback,
.mode-projector .daily-footer { font-size: 22px; }
.mode-projector .map-panel h3 { font-size: 26px; }

@media (min-width: 1366px) {
  .investigation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-slot,
  .map-slot { min-height: 540px; }
}

@media (max-width: 820px) {
  .daily-masthead,
  .daily-footer { align-items: flex-start; flex-direction: column; }
  .screen--entry,
  .investigation-grid { grid-template-columns: 1fr; }
  .field-key { max-width: 38rem; }
  .round-header { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 500px) {
  .daily-masthead,
  .daily-footer,
  .screen { width: min(100% - 28px, 1180px); }
  .daily-mark { font-size: .62rem; }
  .mode-actions { display: grid; }
  .action { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ===========================================================================
   Evidence options + results, 2026-08-31.

   The markup for the four evidence questions was always correct — a <label>
   wrapping an <input> and a <span> — but NOTHING in this stylesheet ever
   targeted `.question__options` or `.question__option`. So every option was a
   plain inline element, the list wrapped mid-flow, and each radio ended up
   jammed against the PREVIOUS option's text: "…(grain / ranching)○ Plantation".
   On a wrap the first option of the new line had no visible control at all.
   Measured on 6-8 rows at EVERY width, 1900 included — this was never a
   mobile-only fault, it was just easiest to see on a phone.
   =========================================================================== */

.question {
  border: 1px solid var(--atlas-line);
  border-radius: 8px;
  padding: 16px 18px 18px;
  background: rgba(255, 255, 255, .42);
}
.question > legend {
  padding: 2px 10px;
  margin-left: -4px;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--atlas-moss);
  background: var(--atlas-paper);
  border: 1px solid var(--atlas-line);
  border-radius: 4px;
}
.question > p {
  margin: 4px 0 0;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 600;
}

/* auto-fit uses the width a desktop actually has (2-3 columns at 1280) while
   collapsing to a single column on a phone — and every option stays one
   self-contained row with its own control, which is the actual fix. */
.question__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.question__option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;            /* a real touch target */
  padding: 10px 12px;
  font-size: .92rem;
  line-height: 1.35;
  border: 1px solid var(--atlas-line);
  border-radius: 6px;
  background: var(--atlas-paper);
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease;
}
.question__option:hover { border-color: var(--atlas-moss); }
.question__option input {
  flex: none;
  margin: 2px 0 0;
  accent-color: var(--atlas-rust);
}
.question__option:has(input:checked) {
  border-color: var(--atlas-rust);
  background: rgba(168, 82, 44, .09);
  font-weight: 600;
}
.question__option:has(input:focus-visible) { outline: 2px solid var(--atlas-moss); outline-offset: 2px; }
.question__option:has(input:disabled) { cursor: default; opacity: .78; }

/* --- results ------------------------------------------------------------- */
/* `.results-card { text-align:center }` plus `place-items:center` on the share
   card centre-aligned five rounds of running prose, which is unreadable at any
   width. Centre the HEADER only; everything with sentences in it goes left. */
.results-card { text-align: left; max-width: 940px; }
.results-card > .kicker,
.results-card > h2 { text-align: center; }

.result-share-card {
  display: block;
  min-height: 0;
  place-items: initial;
  padding: 0;
  border: 0;
  background: none;
}

.results-hero { text-align: center; padding: 6px 0 22px; border-bottom: 1px solid var(--atlas-line); }
.results-hero__score {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 5rem);
  line-height: 1;
  color: var(--atlas-rust);
  font-variant-numeric: tabular-nums;
}
.results-hero__of { display: block; margin-top: 6px; font-family: "DM Mono", ui-monospace, monospace; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--atlas-moss); }
.results-hero__split { margin: 14px 0 0; font-size: .95rem; color: rgba(30, 48, 45, .8); }
.results-hero__note { margin: 10px 0 0; font-size: .9rem; font-style: italic; color: rgba(30, 48, 45, .66); }

.results-map {
  height: clamp(260px, 40vh, 400px);
  margin-top: 22px;
  border: 1px solid var(--atlas-line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--atlas-paper-deep);
}

.result-details { display: grid; gap: 14px; margin-top: 24px; }
.round-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--atlas-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .5);
}
.round-card__thumb { width: 108px; height: 84px; object-fit: cover; border-radius: 4px; display: block; background: var(--atlas-paper-deep); }
.round-card__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.round-card__n { font-family: "DM Mono", ui-monospace, monospace; font-size: .7rem; letter-spacing: .16em; color: var(--atlas-moss); }
.round-card__place { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.05rem; }
.round-card__score { margin-left: auto; font-family: "DM Mono", ui-monospace, monospace; font-size: .82rem; color: var(--atlas-rust); }
.round-card .reveal-result > p:first-child { margin-top: 0; }
@media (max-width: 560px) {
  .round-card { grid-template-columns: 1fr; }
  .round-card__thumb { width: 100%; height: 150px; }
}

/* ===========================================================================
   Round layout, 2026-08-31.

   Before: photo and map only sat side by side at >=1366px, so the most common
   laptop width (1280) got a single ~4,000px column — a ~950px photograph, then
   the map, then four question blocks, then commit. Two problems with that, and
   the second is the one that matters:
     1. Four screens of scrolling to answer one round.
     2. By the time you reach the questions THE PHOTOGRAPH IS GONE. Students
        were being asked to analyse a landscape from memory, in a game whose
        entire subject is the evidence visible in the frame.

   So from 1100px up, the plate becomes a STICKY left column and the map and
   questions stack in a right column beside it. `.investigation-grid` becomes
   display:contents so its two children join the parent grid without touching
   the markup (it is a plain <div>, so it carries no role to lose).
   =========================================================================== */

@media (min-width: 1100px) {
  .screen--game {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(430px, 1fr);
    grid-template-areas:
      "header header"
      "photo  map"
      "photo  questions"
      "reveal reveal";
    align-items: start;
    column-gap: 22px;
    row-gap: 18px;
  }
  .round-header { grid-area: header; margin-bottom: 0; }
  .investigation-grid { display: contents; }
  .photo-panel { grid-area: photo; position: sticky; top: 18px; }
  .map-panel { grid-area: map; margin: 0; }
  .questions-panel { grid-area: questions; margin-top: 0; }
  .reveal-panel { grid-area: reveal; }

  /* The plate is the evidence, so cap it to the viewport rather than letting it
     set the page height, and never crop it — see object-fit below. */
  .photo-slot { min-height: 0; height: min(72vh, 620px); }
  .map-slot { min-height: 0; height: clamp(300px, 38vh, 420px); }

  /* At 1366+ the old rule still tried to force 540px minimums onto both slots,
     which fights the capped heights above. */
  .photo-slot,
  .map-slot { min-height: 0; }
}

/* `cover` crops the frame, and in a game where the whole task is reading
   evidence out of the photograph, cropping deletes evidence. Contain, on a
   deliberately dark backing so a letterboxed plate still reads as a mounted
   print rather than as a gap. */
.photo-slot { background: #201d17; }
.photo-slot img { object-fit: contain; }

@media (min-width: 1100px) {
  .questions-panel #commitButton { width: 100%; margin-top: 4px; }
}

/* Making .photo-panel sticky also makes it POSITIONED, so it paints above later
   non-positioned siblings wherever their boxes overlap — and the reveal panel is
   exactly such a sibling. The caught symptom: "Next landscape" reported
   `covered by <figcaption>` on rounds 1-4. Same class as a modal losing to a
   footer: the fix is an explicit stacking order, not a bigger box. */
.reveal-panel { position: relative; z-index: 3; }
@media (min-width: 1100px) {
  .photo-panel { z-index: 1; }
}

/* The two-column round layout left the questions panel ~466px of inner width, and
   `minmax(230px, 1fr)` needs 468px to fit two option columns — it missed by 2px, so
   every question collapsed to a single tall column and the page stayed ~3,000px.
   Trim the panel's padding at this breakpoint and drop the track floor so two
   columns actually fit. */
@media (min-width: 1100px) {
  .questions-panel { padding: clamp(18px, 2vw, 26px); }
  .question { padding: 14px 14px 16px; }
  .question__options { grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }
}

/* ===========================================================================
   Entry centring, opaque reveal, and the score juice — 2026-08-31, from Josh's
   live review: the entry card hugged the left with a bare right half; the
   sticky plate bled through the translucent reveal card; and the points were
   inert text you had to scroll to find.
   =========================================================================== */

/* Entry: one centred column. The field key rides underneath as a centred strip
   instead of dangling in an empty right-hand column. */
.screen--entry {
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: start;
  align-content: center;
  gap: 30px;
  text-align: center;
}
.entry-card { width: min(100%, 780px); }
.entry-card h1 { margin-inline: auto; }
.entry-card > p:not(.kicker):not(.mode-note) { margin-inline: auto; }
.mode-actions { justify-content: center; }
.field-key {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
  max-width: 640px;
  padding: 20px 10px 0;
  border-left: 0;
  border-top: 2px solid var(--atlas-rust);
}
.field-key p { margin-top: 0; max-width: 48ch; text-align: left; }

/* The reveal panel sits beside/under a STICKY plate; at 72% opacity the
   photograph read straight through the field notes. Solid paper. */
.reveal-panel,
.results-card { background: #fffdf5; }

/* Reveal entrance — [hidden] toggling restarts the animation each round. */
.reveal-panel { animation: panelIn .38s ease both; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* Per-round score chips at the top of the reveal. */
.score-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 8px;
}
.score-chip {
  padding: 12px 14px;
  border: 1px solid var(--atlas-line);
  border-radius: 6px;
  background: var(--atlas-paper);
}
.score-chip--total { border-color: rgba(168, 82, 44, .5); background: rgba(168, 82, 44, .08); }
.score-chip__k {
  display: block;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--atlas-moss);
}
.score-chip__n {
  display: block;
  margin-top: 4px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1.05;
  color: var(--atlas-ink);
  font-variant-numeric: tabular-nums;
}
.score-chip--total .score-chip__n { color: var(--atlas-rust); }
.score-chip__s { display: block; margin-top: 3px; font-size: .78rem; color: rgba(30, 48, 45, .72); }
@media (max-width: 560px) { .score-strip { grid-template-columns: 1fr; } }

/* The score burst. pointer-events:none — it may never block the page. */
#scorePop {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#scorePop.show { display: flex; }
.sp-inner {
  text-align: center;
  padding: 26px 46px;
  border-radius: 6px;
  background: var(--atlas-ink);
  color: var(--atlas-paper);
  box-shadow: 0 18px 60px rgba(30, 48, 45, .45);
  animation: spIn .42s cubic-bezier(.2, 1.4, .4, 1) both;
}
.sp-tier {
  display: block;
  margin-bottom: 8px;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--atlas-paper-deep);
}
.sp-pts {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 58px;
  line-height: 1;
  color: var(--atlas-paper);
  font-variant-numeric: tabular-nums;
}
.sp-sub { display: block; margin-top: 8px; font-size: .85rem; color: rgba(242, 238, 223, .82); }
@keyframes spIn {
  0%   { transform: scale(.6) translateY(12px); opacity: 0; }
  55%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
#scorePop.out .sp-inner { animation: spOut .4s ease forwards; }
@keyframes spOut { to { transform: scale(.94) translateY(-22px); opacity: 0; } }

/* Results: the five round cards stagger in under the counting hero total. */
.round-card { animation: rowIn .5s ease both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes rowIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
