/* The Field — minimal brutalist poster
   bone-white ground, off-black ink, one red accent */

:root {
  --bone: #f4f0e6;
  --ink: #17150f;
  --ink-faint: rgba(23, 21, 15, 0.38);
  --red: #a31621;
  --display: "Oswald", "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { background: var(--bone); color: var(--ink); }

body {
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

.poster {
  /* One-screen object: guarantees the caveat footnote shares the
     viewport with the Germany mark (STORY.md caveat placement). */
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 3.2rem 3rem 1.6rem;
  display: flex;
  flex-direction: column;
}

/* ---- masthead ---- */

.masthead h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  max-width: 34ch;
}

.orientation {
  margin-top: 0.9rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.65;
  max-width: 60ch;
  line-height: 1.4;
}

/* ---- field ---- */

.field {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 1.4rem;
}

.field svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* compact (narrow-screen) SVG type */
svg.compact .match-label { font-size: 11px; }
svg.compact .germany-note { font-size: 9.5px; }
svg.compact .assist { font-size: 10px; }
svg.compact .axis-tick { font-size: 9.5px; }

/* field dots: the quiet 47 */
.dot circle.mark {
  fill: var(--ink);
  fill-opacity: 0.32;
}

/* quarterfinalists: heavier, ringed */
.dot.qf circle.mark { fill: var(--ink); fill-opacity: 0.9; }
/* Paraguay's own rank-48 dot: solid, so the constellation reads as its continuation */
.dot.paraguay circle.mark { fill: var(--ink); fill-opacity: 1; }
.dot.qf circle.ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
}

/* Paraguay constellation */
.constellation-line {
  fill: none;
  stroke: var(--ink);
  stroke-opacity: 0.3;
  stroke-width: 1;
}

.pmark circle.mark { fill: var(--ink); }
.pmark.germany circle.mark { fill: var(--red); }

.match-label {
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  fill: var(--ink);
}
.pmark.germany .match-label { fill: var(--red); }

.germany-note {
  font-family: var(--body);
  font-size: 11.5px;
  fill: var(--ink);
  fill-opacity: 0.72;
}

/* in-chart orientation annotations */
.chart-note {
  font-family: var(--body);
  font-size: 12px;
  fill: var(--ink);
  fill-opacity: 0.72;
}
.par-note {
  font-family: var(--display);
  font-weight: 500;
  font-size: 13px;
  fill-opacity: 0.95;
}
svg.compact .chart-note { font-size: 10px; }
svg.compact .par-note { font-size: 11px; }

/* x-axis zone captions */
.axis-caption {
  font-family: var(--display);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  fill: var(--ink);
  fill-opacity: 0.55;
}
svg.compact .axis-caption { font-size: 9px; letter-spacing: 0.03em; }

/* compact: numbered satellite marks + decode list under the match-order axis */
.match-num {
  font-family: var(--display);
  font-weight: 600;
  font-size: 11px;
  fill: var(--ink);
}
.pmark.germany .match-num { fill: var(--red); }
.match-list {
  font-family: var(--body);
  font-size: 9.5px;
  fill: var(--ink);
  fill-opacity: 0.8;
}
.match-list.germany-item { fill: var(--red); fill-opacity: 1; }

/* tiny possession axis */
.axis-tick {
  font-family: var(--body);
  font-size: 10.5px;
  fill: var(--ink-faint);
}
.axis-line {
  stroke: var(--ink);
  stroke-opacity: 0.14;
  stroke-width: 1;
}

/* assistive labels: hover/focus only */
.assist {
  font-family: var(--body);
  font-size: 11px;
  fill: var(--ink);
  opacity: 0;
  pointer-events: none;
}
.assist-bg {
  fill: var(--bone);
  fill-opacity: 0.92;
  opacity: 0;
  pointer-events: none;
}

.dot:hover .assist, .dot:focus .assist,
.pmark:hover .assist, .pmark:focus .assist,
.dot:hover .assist-bg, .dot:focus .assist-bg,
.pmark:hover .assist-bg, .pmark:focus .assist-bg {
  opacity: 1;
}

.dot, .pmark { outline: none; cursor: default; }
.dot:focus circle.mark, .pmark:focus circle.mark {
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-opacity: 0.9;
}
.pmark.germany:focus circle.mark { stroke: var(--red); }

/* ---- colophon ---- */

.colophon {
  margin-top: 1.2rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.caveat {
  font-size: 0.72rem;
  line-height: 1.5;
  max-width: 62ch;
  color: var(--ink);
  opacity: 0.75;
}

.source {
  font-size: 0.72rem;
  line-height: 1.5;
  white-space: nowrap;
  opacity: 0.75;
}

/* ---- reduced motion / small screens ---- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 640px) {
  /* small screens: let the poster flow; SVG labels stay legible via natural page zoom */
  .poster { height: auto; min-height: 100vh; padding: 2rem 1.2rem 1.2rem; }
  .field svg { height: auto; max-height: none; }
  .colophon { flex-direction: column; gap: 0.4rem; }
  .source { white-space: normal; }
}
