/* SCOOP-633 — the atlas page.
   One rule runs the whole sheet: colour never lands on a country.
   Every outline is drawn in one ink. The signal red marks removed points
   and nothing else, because in this product no colour is ever a state. */

.scoop-substrate.story-page {
  --sea: #0047ab;
  --sea-deep: #00306f;
  --sea-abyss: #001b45;
  --chart: #fff3d6;
  --chart-dim: #e7d6ae;
  --ink: #0e1e36;
  --ink-soft: #40506b;
  --drop: #d6002e;
  --drop-on-sea: #ffa8b8;
  --muted-sea: #bfd6f5;
  --muted: #bfd6f5;
  --rule: rgba(255, 243, 214, .28);

  --sans: "Avenir Next Condensed", "HelveticaNeue-CondensedBold", "Arial Narrow", "Roboto Condensed", sans-serif;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;

  --measure: min(45rem, 100% - 2rem);
  --body-measure: min(34rem, 100% - 2rem);

  --scoop-masthead-font-family: var(--sans);
  --scoop-masthead-colour: var(--muted-sea);
  --scoop-masthead-scale: 1.05;

  position: relative;
  z-index: 0;
  background: var(--sea);
  color: var(--chart);
  font-family: var(--serif);
  overflow-x: hidden;
}

/* ---- the live ground: a graticule that tightens as the reader descends ---- */

.graticule {
  position: fixed;
  z-index: -2;
  top: 50%;
  left: 50%;
  width: 240vmax;
  height: 240vmax;
  margin: -120vmax 0 0 -120vmax;
  background-color: var(--sea);
  background-image:
    repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, var(--rule) 0 1px, transparent 1px 88px);
  opacity: .55;
  transform: scale(var(--depth-scale, 1));
  transform-origin: 50% 50%;
  will-change: transform;
  pointer-events: none;
}

.abyss {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, transparent 30%, var(--sea-abyss) 100%);
  opacity: calc(.18 + .5 * var(--depth, 0));
  pointer-events: none;
}

/* ---- links ---- */

.scoop-substrate.story-page a,
.scoop-substrate.story-page a:visited {
  color: var(--chart);
  text-decoration: underline;
  text-decoration-color: var(--drop-on-sea);
  text-decoration-thickness: .11em;
  text-underline-offset: .18em;
}

.scoop-substrate.story-page a:hover,
.scoop-substrate.story-page a:focus-visible {
  text-decoration-thickness: .2em;
}

.scoop-substrate.story-page a:focus-visible,
.scoop-substrate.story-page button:focus-visible {
  outline: 3px solid var(--chart);
  outline-offset: 3px;
}

button,
a {
  touch-action: manipulation;
}

.masthead-well {
  position: relative;
  z-index: 1;
  width: var(--measure);
  margin-inline: auto;
}

.story-page .masthead-well .scoop-site-masthead,
.story-page .masthead-well .scoop-site-about {
  width: 100% !important;
}

/* ---- the article ---- */

.atlas {
  position: relative;
  z-index: 1;
}

.atlas-hero {
  width: var(--measure);
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 5rem) 0 clamp(1.5rem, 4vw, 3rem);
}

.atlas-hero__kicker {
  margin: 0 0 1.1rem;
  color: var(--drop-on-sea);
  font-family: var(--sans);
  font-size: clamp(.85rem, 2.6vw, 1rem);
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.atlas-hero h1 {
  margin: 0;
  color: var(--chart);
  font-family: var(--sans);
  font-size: min(clamp(2.3rem, 8.6vw, 4.4rem), 12vw);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.02;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.atlas-hero__legend {
  display: flex;
  margin: clamp(1.4rem, 4vw, 2.4rem) 0 0;
  padding: 0;
  flex-wrap: wrap;
  gap: .35rem 1.6rem;
  list-style: none;
  font-family: var(--sans);
  font-size: clamp(.8rem, 2.4vw, .95rem);
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted-sea);
}

.atlas-hero__legend b {
  color: var(--chart);
  font-size: 1.35em;
  font-weight: 700;
  letter-spacing: .02em;
}

/* ---- poster ---- */

.atlas-poster {
  width: var(--measure);
  margin: 0 auto clamp(1.6rem, 4vw, 2.6rem);
}

.atlas-poster img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}

/* ---- body ---- */

.atlas-body {
  width: var(--body-measure);
  margin-inline: auto;
  font-size: 19px;
  line-height: 1.7;
}

.atlas-body > p {
  margin: 0;
  color: var(--chart);
}

.atlas-body > p + p {
  margin-top: 1.15rem;
}

.story-page .story-page__byline {
  margin: 0 0 .2rem;
  overflow-wrap: anywhere;
  color: var(--chart);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.story-page .story-page__dateline {
  margin: 0 0 2.2rem;
  color: var(--muted-sea);
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
}

/* ---- pictures in the run: no caption, credits collect at the foot ---- */

.plate {
  margin: clamp(1.8rem, 5vw, 3rem) 0;
}

.plate img {
  display: block;
  width: min(21rem, 100%);
  height: auto;
  margin-inline: auto;
  background: var(--sea-abyss);
  border: 1px solid var(--rule);
}

.well {
  width: var(--measure);
  margin-inline: auto;
}

/* ---- seats ---- */

.seat {
  display: block;
}

.seat:not(:empty) {
  margin: clamp(2.2rem, 6vw, 4rem) 0;
}

/* ---- instruments ---- */

.rig {
  width: var(--measure);
  margin: clamp(2.4rem, 7vw, 4.5rem) auto;
  padding: clamp(1.1rem, 3.4vw, 1.9rem);
  background: var(--chart);
  color: var(--ink);
  border: 2px solid var(--ink);
}

.seat .rig {
  margin-block: 0;
}

.rig__label {
  margin: 0;
  color: var(--drop);
  font-family: var(--sans);
  font-size: clamp(.8rem, 2.5vw, .95rem);
  font-weight: 700;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.rig__title {
  margin: .5rem 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--sans);
  font-size: min(clamp(1.5rem, 5.2vw, 2.2rem), 10vw);
  font-weight: 700;
  line-height: 1.06;
  text-transform: uppercase;
}

.rig__note {
  margin: .7rem 0 0;
  max-width: 34rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(.95rem, 2.9vw, 1.05rem);
  font-weight: 600;
  line-height: 1.4;
}

.rig__acts {
  display: flex;
  margin-top: 1.1rem;
  flex-wrap: wrap;
  gap: .6rem;
}

.act {
  min-height: 44px;
  padding: .55rem 1rem;
  background: var(--ink);
  color: var(--chart);
  border: 2px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: clamp(.9rem, 2.7vw, 1rem);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.act[aria-pressed="true"] {
  background: var(--chart);
  color: var(--ink);
  box-shadow: inset 0 0 0 3px var(--drop);
}

/* The focus ring is read against whatever ground the control sits on. */
.scoop-substrate.story-page .act:focus-visible {
  outline: 3px solid var(--drop);
  outline-offset: 3px;
}

.scoop-substrate.story-page .shape .act:focus-visible {
  outline-color: var(--chart);
}

.scoop-substrate.story-page .close .act:focus-visible {
  outline-color: var(--drop-on-sea);
}

/* readings */

.readouts {
  display: grid;
  margin-top: 1.1rem;
  gap: .55rem;
  grid-template-columns: repeat(auto-fit, minmax(min(9.5rem, 100%), 1fr));
}

.reading {
  padding: .55rem .7rem;
  background: var(--sea);
  color: var(--chart);
}

.reading dt {
  margin: 0;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted-sea);
}

.reading dd {
  margin: .15rem 0 0;
  overflow-wrap: anywhere;
  font-family: var(--sans);
  font-size: min(clamp(1.35rem, 4.6vw, 1.7rem), 9vw);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.reading--drop dd {
  color: var(--drop-on-sea);
}

/* outline stages */

.stage {
  display: grid;
  margin-top: 1.2rem;
  gap: .9rem;
  grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
}

.shape {
  display: flex;
  margin: 0;
  padding: .6rem;
  flex-direction: column;
  background: var(--sea);
  border: 1px solid var(--ink);
}

.stage .shape svg {
  height: clamp(8.5rem, 26vw, 12rem);
}

.shape .act {
  margin-top: .55rem;
  align-self: flex-start;
}

.shape__count {
  margin-top: auto;
}

.shape__name {
  margin: 0 0 .45rem;
  color: var(--chart);
  font-family: var(--sans);
  font-size: clamp(.85rem, 2.5vw, .95rem);
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.shape__count {
  margin: .45rem 0 0;
  padding-top: .45rem;
  color: var(--muted-sea);
  font-family: var(--sans);
  font-size: clamp(.85rem, 2.5vw, .95rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}

.shape__count b {
  color: var(--chart);
  font-weight: 700;
}

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

.land {
  fill: none;
  stroke: var(--chart);
  stroke-width: 8;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.land--ghost {
  stroke: var(--muted-sea);
  stroke-width: 5;
  stroke-dasharray: 9 11;
  opacity: .85;
}

.vertex {
  fill: var(--drop);
  stroke: var(--sea);
  stroke-width: 7;
  paint-order: stroke;
}

.cut {
  fill: none;
  stroke: var(--drop-on-sea);
  stroke-width: 5;
  stroke-dasharray: 14 10;
  vector-effect: non-scaling-stroke;
}

.vertex--small {
  stroke-width: 4;
}

.vertex-group {
  opacity: 0;
  transition: opacity 220ms ease;
}

.vertex-group.is-shown {
  opacity: 1;
}

/* the island */

.island {
  display: grid;
  margin-top: 1.2rem;
  gap: .9rem;
  grid-template-columns: 1fr;
}

.island .shape svg {
  max-height: 46vh;
}

/* the staged threshold band: owns the screen */

.band {
  position: relative;
  width: 100%;
  margin: clamp(2.4rem, 7vw, 4.5rem) 0;
  padding: clamp(2rem, 6vw, 4rem) 0;
  background: var(--sea-deep);
  border-block: 1px solid var(--rule);
}

.seat .band {
  margin-block: 0;
}

.band__inner {
  width: var(--measure);
  margin-inline: auto;
}

.band .rig {
  width: 100%;
  margin: 0;
}

/* the one place it speaks */

.speaks {
  width: var(--measure);
  margin-inline: auto;
  display: grid;
  gap: 1.1rem;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}

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

.speaks__say {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--chart);
  font-family: var(--sans);
  font-size: min(clamp(2rem, 7vw, 3.4rem), 11vw);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.speaks__gloss {
  margin: .7rem 0 0;
  color: var(--muted-sea);
  font-family: var(--sans);
  font-size: clamp(.85rem, 2.5vw, .95rem);
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
}

/* ---- the picture note ---- */

.picture-note {
  width: var(--body-measure);
  margin: clamp(2.4rem, 6vw, 3.4rem) auto 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted-sea);
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.45;
}

.picture-note h2 {
  margin: 0 0 .6rem;
  color: var(--chart);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.picture-note ol {
  margin: 0;
  padding-left: 1.2rem;
}

.picture-note li + li {
  margin-top: .4rem;
}

/* ---- the close ---- */

.close {
  width: 100%;
  margin-top: clamp(3rem, 9vw, 6rem);
  padding: clamp(2.6rem, 8vw, 5.5rem) 0;
  background: var(--sea-abyss);
  border-top: 1px solid var(--rule);
  text-align: center;
}

.close__inner {
  width: var(--measure);
  margin-inline: auto;
}

.close__label {
  margin: 0;
  color: var(--drop-on-sea);
  font-family: var(--sans);
  font-size: clamp(.8rem, 2.5vw, .95rem);
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.close__shape {
  width: min(15rem, 62vw);
  margin: clamp(1.4rem, 4vw, 2.2rem) auto 0;
}

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

.close__name {
  margin: clamp(1.2rem, 3.5vw, 1.8rem) 0 0;
  overflow-wrap: anywhere;
  min-height: 1.15em;
  color: var(--chart);
  font-family: var(--sans);
  font-size: min(clamp(1.7rem, 6.4vw, 2.6rem), 11vw);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.15;
  text-transform: uppercase;
}

.land--draw {
  vector-effect: none;
  stroke-width: 8;
}

.close__gloss {
  margin: clamp(1.2rem, 3.5vw, 1.8rem) auto 0;
  max-width: 28rem;
  color: var(--muted-sea);
  font-family: var(--sans);
  font-size: clamp(.85rem, 2.5vw, .95rem);
  letter-spacing: .04em;
}

.close__readouts {
  display: flex;
  margin: clamp(1.2rem, 3.5vw, 1.8rem) 0 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.4rem;
  list-style: none;
  font-family: var(--sans);
  font-size: clamp(.85rem, 2.5vw, .95rem);
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted-sea);
}

.close__readouts b {
  color: var(--chart);
  font-variant-numeric: tabular-nums;
}

.close .rig__acts {
  justify-content: center;
  margin-top: clamp(1.2rem, 3.5vw, 1.8rem);
}

.close .act {
  background: var(--chart);
  color: var(--ink);
  border-color: var(--chart);
}

.close .act[aria-pressed="true"] {
  background: var(--sea-abyss);
  color: var(--chart);
  box-shadow: inset 0 0 0 3px var(--drop-on-sea);
}

.close .vertex {
  stroke: var(--sea-abyss);
}

/* ---- closing furniture: aligned with the article measure ---- */

[data-scoop="closing"] {
  width: min(20rem, 100%);
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.4rem) 0 clamp(2.4rem, 6vw, 4rem);
  color: var(--chart);
}

/* The assembly is 320 narrow and 720 wide; the closing well is the article
   measure at both, so the site's compensating pull is not wanted here. */
.scoop-substrate.story-page [data-scoop="closing"] > .reaction-assembly {
  margin-left: 0;
}

@media (min-width: 752px) {
  [data-scoop="closing"] {
    width: min(45rem, 100% - 2rem);
  }
}

.story-page [data-scoop="closing"] .base-matter,
.story-page [data-scoop="closing"] > p {
  color: var(--muted-sea);
  line-height: 1.5;
}

/* The onward routes and the storage notice are site furniture; give them this
   page's face and a colour that reads on the sea. */
.scoop-substrate.story-page [data-scoop="closing"] .base-matter,
.scoop-substrate.story-page [data-scoop="closing"] .base-matter a,
.scoop-substrate.story-page [data-scoop="closing"] nav a,
.scoop-substrate.story-page [data-scoop="closing"] > a {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.scoop-substrate.story-page [data-scoop="closing"] .base-matter a,
.scoop-substrate.story-page [data-scoop="closing"] .base-matter a:visited,
.scoop-substrate.story-page [data-scoop="closing"] .base-matter a:hover,
.scoop-substrate.story-page [data-scoop="closing"] .base-matter a:focus-visible,
.scoop-substrate.story-page [data-scoop="closing"] .base-matter a:active {
  color: var(--chart);
}

/* ---- the screen reader's running commentary ---- */

.announce {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- narrow ---- */

@media (max-width: 751px) {
  .scoop-substrate.story-page {
    --measure: min(20rem, 100% - 2rem);
    --body-measure: min(20rem, 100% - 2rem);
  }

  .speaks {
    grid-template-columns: 1fr;
  }

  /* The simplifier toggle sets two lines at the narrow measure and one line once
     pressed. Reserve both lines so the label swap never moves the article. */
  .act[data-act="threshold"] {
    min-height: 60px;
  }

}

/* ---- reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  .vertex-group,
  .act {
    transition: none !important;
  }

  .graticule {
    transform: scale(.7);
  }
}

/* ---- forced colours: every pressed state still shows ---- */

@media (forced-colors: active) {
  .rig,
  .shape,
  .reading,
  .act {
    border: 1px solid CanvasText;
  }

  .act[aria-pressed="true"],
  .close .act[aria-pressed="true"] {
    background: Highlight;
    color: HighlightText;
    box-shadow: none;
    outline: 3px solid CanvasText;
    outline-offset: -6px;
  }

  .land {
    stroke: CanvasText;
  }

  .land--ghost {
    stroke: GrayText;
  }

  .cut {
    stroke: LinkText;
  }

  .vertex {
    fill: LinkText;
    stroke: Canvas;
  }
}
