/* SomethingPR — components. Depends on tokens.css and base.css.
   Two layout widths only (tokens.css PART 2, both provisional):
     < 1000 px  narrow: one column
     ≥ 1000 px  wide: columns side by side, nav links shown */

/* ───────── Fitted headline lines ─────────
   A lockup is a stack of lines with one fixed gap. Each .fit line is sized by CSS alone:
   font-size = width of the lockup ÷ --k, where --k is that line's own width in ems
   (written into the markup; fit.js re-checks it once the font has loaded).
   Lines are ordinary blocks in normal flow, so they cannot overlap at any width.
   If the wrong font is showing, a line wraps onto a second row; it does not spill sideways. */
.lockup {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap-2);
  container-type: inline-size;
}
.fit {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--wt-black);
  font-stretch: var(--wd-condensed);
  text-transform: uppercase;
  line-height: var(--lh-display);
  margin-block: var(--trim-top) var(--trim-bottom);
  font-size: max(var(--fs-1), calc((100cqi - var(--fit-inset, 0px)) / var(--k, 8)));
  overflow-wrap: break-word;
}
.fit.wide { font-stretch: var(--wd-expanded); }
/* Arrival (js/arrive.js): while a hero line resolves, its type is transparent and a pixel
   picture of the same words sits exactly on its capitals. */
.fit { position: relative; }
.fit.is-resolving { color: transparent; }
.fit > canvas.resolve {
  position: absolute; left: 0;
  top: calc(var(--trim-top) * -1);
  height: calc(var(--cap) * 1em);
  image-rendering: pixelated;
  pointer-events: none;
}
/* A line on a bar: the bar is padded, the line inside is fitted to what is left. */
.bar {
  display: block;
  padding: var(--gap-2);
  --fit-inset: calc(var(--gap-2) * 2);
  background: var(--bar-bg, var(--ink));
  color: var(--bar-fg, var(--yellow));
}

/* Two columns at wide width: a lockup beside reading text (problem, Signs, help). */
.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap-5); align-items: start; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap-2); align-content: start; }
.stack--loose { gap: var(--gap-3); }
@media (min-width: 1000px) {
  .two { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); }
}

/* Reading text set beside a lockup hangs from the same line as the lockup's capitals. */
@media (min-width: 1000px) {
  .two > .thesis > .body:first-child,
  .signs > .signs__lede { margin-top: var(--trim-read-top); }
  .two > .stack > .heading:first-child { margin-top: var(--trim-top); }
}

/* ───────── Mark and wordmark ─────────
   The mark replaces the O. Its size and seat are the O's own, measured from Archivo
   condensed black (see BUILD-PLAN). */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: var(--fs-4);
  font-weight: var(--wt-black);
  font-stretch: var(--wd-condensed);
  text-transform: uppercase;
  line-height: var(--lh-display);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark__o {
  width: var(--o-size, 0.712em);
  height: var(--o-size, 0.712em);
  margin-inline: var(--o-side, 0.04em);
  position: relative;
  top: var(--o-drop, 0.012em);
  fill: currentColor;
  flex: none;
}
.wordmark__pr { color: var(--ac); }
.mark { fill: currentColor; }

/* ───────── Nav ───────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  border-bottom: var(--line) solid var(--fg);
}
.nav__in {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: var(--gap-2) var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--gap-3);
}
.nav__links { display: none; align-items: center; gap: var(--gap-3); margin-left: auto; }
.nav__links a {
  font-family: var(--font-display);
  font-size: var(--fs-3);
  font-weight: var(--wt-black);
  font-stretch: var(--wd-condensed);
  text-transform: uppercase;
  line-height: var(--lh-display);
  text-decoration: none;
}
.nav__links a:hover { color: var(--ac); }
@media (min-width: 1000px) { .nav__links { display: flex; } }

/* ───────── Buttons, chips, tags: one build, one padding, one line weight ───────── */
.btn, .chip, .tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-3);
  font-weight: var(--wt-black);
  font-stretch: var(--wd-condensed);
  text-transform: uppercase;
  line-height: var(--lh-display);
  padding: var(--gap-1) var(--gap-2);
  border: var(--line) solid var(--fg);
  background: transparent;
  color: var(--fg);
  text-decoration: none;
  text-align: center;
}
.btn, .chip { cursor: pointer; }
.btn { background: var(--fg); color: var(--bg); }
.btn:hover { background: transparent; color: var(--fg); }
.btn--ghost { background: transparent; color: var(--fg); }
.btn--ghost:hover { background: var(--fg); color: var(--bg); }
.btn--accent { background: var(--ac); border-color: var(--ac); color: var(--bg); }
.btn--accent:hover { background: transparent; color: var(--ac); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.chip:hover { text-decoration: underline; text-underline-offset: var(--line); }

/* A group of buttons, chips or tags: borders shared, not doubled. */
.group {
  display: flex; flex-wrap: wrap;
  padding: 0 var(--line) var(--line) 0;
}
.group > * { margin: 0 calc(var(--line) * -1) calc(var(--line) * -1) 0; }

/* ───────── Hero ─────────
   Rows: label · line 1 · sphere · line 2 · line 3 · lede · actions · facts.
   At wide width the lede, sphere and actions share the row between line 1 and line 2.
   The three lines stay inside one h1; subgrid lets the sphere's row sit between them.
   Without subgrid the h1 is simply a stack and the sphere follows it: still no overlap. */
.hero { container-type: inline-size; }
.hero__h { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap-3); }
.hero__sphere { width: var(--sphere); max-width: 100%; aspect-ratio: 1; justify-self: center; }
/* the still image and the canvas are two layers of one drawing, stacked inside the slot */
.hero__sphere { position: relative; }
.hero__sphere > * { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__act { display: grid; gap: var(--gap-2); justify-items: start; }
@supports (grid-template-rows: subgrid) {
  /* every part is placed by hand; none is left for the grid to seat beside another */
  .hero > * { grid-column: 1; }
  .hero__label  { grid-row: 1; }
  .hero__h      { grid-row: 2 / span 4; grid-template-rows: subgrid; }
  .hero__h > :nth-child(1) { grid-row: 1; }
  .hero__h > :nth-child(2) { grid-row: 3; }
  .hero__h > :nth-child(3) { grid-row: 4; }
  .hero__sphere { grid-row: 3; }
  .hero__lede   { grid-row: 6; }
  .hero__act    { grid-row: 7; }
  .hero .tiles  { grid-row: 8; }
  @media (min-width: 1000px) {
    .hero { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: var(--gap-4); }
    .hero__label, .hero__h, .hero .tiles { grid-column: 1 / -1; }
    .hero__lede   { grid-row: 3; grid-column: 1; align-self: center; }
    .hero__sphere { grid-row: 3; grid-column: 2; }
    .hero__act    { grid-row: 3; grid-column: 3; align-self: center; justify-items: end; }
    .hero__act .group { justify-content: flex-end; }
    .hero .tiles  { grid-row: 6; }
  }
}

/* ───────── Tiles: fact tiles (hero), word tiles (shift) ─────────
   Filled blocks side by side, each on its own ground, as on the original page. */
.tiles {
  display: grid;
  grid-template-columns: repeat(var(--tiles-narrow, 1), minmax(0, 1fr));
}
.tile { padding: var(--gap-3); display: grid; gap: var(--gap-1); align-content: start; }
.tiles--words { --tiles-narrow: 2; }
@media (min-width: 1000px) {
  .tiles { grid-template-columns: repeat(var(--tiles-wide, 3), minmax(0, 1fr)); }
  .tiles--words { --tiles-wide: 4; }
}

/* ───────── Thesis (problem): reading column with one ruled break ───────── */
.thesis { display: grid; gap: var(--gap-3); }
.thesis__more { display: grid; gap: var(--gap-3); border-top: var(--line) solid var(--fg); padding-top: var(--gap-3); }

/* ───────── Three ways: panels ───────── */
.panels {
  display: grid; grid-template-columns: minmax(0, 1fr);
  padding: 0 var(--line) var(--line) 0;
}
.panel {
  margin: 0 calc(var(--line) * -1) calc(var(--line) * -1) 0;
  border: var(--line) solid var(--fg);
  padding: var(--gap-3);
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: var(--gap-2) var(--gap-3);
  align-content: start;
}
.panel__nums { display: flex; align-items: flex-start; gap: var(--gap-1); }
.panel__num { color: var(--ac); }
/* the word that runs up beside the numeral on the original page */
.panel__unit { writing-mode: vertical-rl; transform: rotate(180deg); }
.panel__main { display: grid; gap: var(--gap-1); align-content: start; }
.panel__more { grid-column: 1 / -1; display: grid; gap: var(--gap-2); justify-items: start; align-content: start; }
@media (min-width: 1000px) {
  .panels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Without subgrid: the lower part fills its panel and the button sits at the foot,
     so the three buttons are level. */
  .panel { grid-template-rows: auto 1fr; }
  .panel__more { grid-template-rows: auto 1fr auto; }
  .panel__more > .btn { align-self: end; }
  /* With subgrid: the three panels share four rows (text, list, time line, button),
     so the rules, the lists, the time lines and the buttons are each level across them. */
  @supports (grid-template-rows: subgrid) {
    .panel { grid-row: span 4; grid-template-rows: subgrid; }
    .panel__more { grid-row: 2 / span 3; grid-template-rows: subgrid; }
    .panel__more > .btn { align-self: start; }
  }
}

/* ───────── Points: a short list under a rule ─────────
   Marker: a small ink square, one gap wide. */
.points { display: grid; align-content: start; gap: var(--gap-1); border-top: var(--line) solid var(--fg); padding-top: var(--gap-2); width: 100%; }
.points li { display: grid; grid-template-columns: var(--gap-1) minmax(0, 1fr); gap: var(--gap-2); }
.points li::before {
  content: "";
  width: var(--gap-1); height: var(--gap-1);
  background: currentColor;
  margin-top: calc((var(--lh-body) * 1em - var(--gap-1)) / 2);   /* centred on the first line */
}

/* ───────── Strips (extends): filled rows, each on its own ground, as on the original ─────────
   The sentence sits directly under its heading, on the same left edge. Strips are not links,
   so nothing changes when the pointer passes over them. */
.strips { display: grid; gap: var(--gap-1); }
.strip { padding: var(--gap-3); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap-1); }

/* ───────── Ledger: term and description under a rule (who calls me, the record) ───────── */
.ledger { display: grid; }
.ledger__row {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: var(--gap-1) var(--gap-4);
  padding-block: var(--gap-2);
  border-top: var(--line) solid var(--fg);
  /* term and description both hang from the rule: their capitals start at the same height */
  align-items: start;
  text-decoration: none;
}
@media (min-width: 760px) {
  .ledger__row { grid-template-columns: minmax(0, 5fr) minmax(0, 9fr); }
}
/* ───────── Signs band ─────────
   The lockup on the left; the lede and "Read Signs" on the right. */
.signs { row-gap: var(--gap-3); }
@media (min-width: 1000px) {
  .signs { grid-template-rows: auto 1fr; }
  .signs > .lockup { grid-column: 1; grid-row: 1 / span 2; }
  .signs__lede { grid-column: 2; grid-row: 1; }
  .signs__side { grid-column: 2; grid-row: 2; }
}

/* ───────── Shift: the four signs ─────────
   One drawing and its key. Everything in the drawing is built on the pixel cell (--cell), the
   same cell as the full stop and the clock, so nothing in it is scaled.
   Colours tie the drawing to the key: person red, story and the edge it sets orange, handoff
   line the text colour (paper on a dark ground), agent and its work yellow.
   It plays by itself, 9 s a turn, in steps:
     0 – 40 %   the person holds the story; the agent's work flies outward in every direction
     40 – 50 %  the story crosses the line to the agent
     50 – 92 %  an edge stands round the agent, "where it stops"; the work has stopped flying
     92 – 100 % the story goes back
   Under prefers-reduced-motion it holds still on the second state, unless the page carries
   data-motion="always". */
.shift { row-gap: var(--gap-4); }
.handoff { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap-2); --turn: 9s; }
.handoff__stage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto calc(var(--cell) * 15);
  row-gap: var(--gap-1);
  container-type: inline-size;
  /* how far the story travels: two columns, less the room the edge and the story itself need */
  --travel: calc(50cqi - var(--cell) * 11);
}
.handoff__stops { grid-column: 1 / -1; grid-row: 1; justify-self: end; opacity: 0; animation: handoff-handed var(--turn) step-end infinite; }
.handoff__cell { grid-row: 2; position: relative; display: grid; place-items: center; }
.handoff__cell > * { grid-area: 1 / 1; }
.handoff .handoff__person { fill: var(--red); }
.handoff__story {
  width: calc(var(--cell) * 9); height: calc(var(--cell) * 8);
  fill: var(--orange); shape-rendering: crispEdges;
  position: relative; z-index: 1;
  animation: handoff-story var(--turn) steps(8, end) infinite;
}
/* the handoff line: a column of single cells, one on, one off */
.handoff__line {
  width: var(--cell); height: 100%;
  background: repeating-linear-gradient(to bottom, var(--fg) 0 var(--cell), transparent 0 calc(var(--cell) * 2));
}
.handoff__agent {
  width: calc(var(--cell) * 7); height: calc(var(--cell) * 7);
  background: var(--yellow);
  display: grid; place-items: center;
}
.handoff__agent svg { width: calc(var(--cell) * 3.5); height: calc(var(--cell) * 5.5); fill: var(--ink); shape-rendering: crispEdges; }
/* the edge round the agent: a ring of single cells, one on, one off (eleven a side, so every corner is on) */
.handoff__edge {
  width: calc(var(--cell) * 11); height: calc(var(--cell) * 11);
  --dash-x: repeating-linear-gradient(to right, var(--orange) 0 var(--cell), transparent 0 calc(var(--cell) * 2));
  --dash-y: repeating-linear-gradient(to bottom, var(--orange) 0 var(--cell), transparent 0 calc(var(--cell) * 2));
  background:
    var(--dash-x) top / 100% var(--cell) no-repeat,
    var(--dash-x) bottom / 100% var(--cell) no-repeat,
    var(--dash-y) left / var(--cell) 100% no-repeat,
    var(--dash-y) right / var(--cell) 100% no-repeat;
  opacity: 0;
  animation: handoff-handed var(--turn) step-end infinite;
}
/* the agent's work: eight cells that start one cell clear of the agent and fly two cells out */
.handoff__ray {
  position: absolute; left: 50%; top: 50%;
  width: var(--cell); height: var(--cell);
  margin: calc(var(--cell) * -0.5) 0 0 calc(var(--cell) * -0.5);
  background: var(--yellow);
  transform: translate(calc(var(--dx) * var(--cell) * 4.5), calc(var(--dy) * var(--cell) * 4.5));
  animation: handoff-ray 0.6s steps(3, end) infinite, handoff-held var(--turn) step-end infinite;
}
.handoff .tiles--words { --tiles-wide: 2; }

@keyframes handoff-story {
  0%, 40% { transform: translateX(0); }
  50%, 92% { transform: translateX(var(--travel)); }
  100% { transform: translateX(0); }
}
@keyframes handoff-ray {
  to { transform: translate(calc(var(--dx) * var(--cell) * 6.5), calc(var(--dy) * var(--cell) * 6.5)); }
}
@keyframes handoff-held   { 0% { opacity: 1; } 50% { opacity: 0; } 92% { opacity: 1; } 100% { opacity: 1; } }
@keyframes handoff-handed { 0% { opacity: 0; } 50% { opacity: 1; } 92% { opacity: 0; } 100% { opacity: 0; } }
/* Visitors who ask their device to reduce motion get the drawing held still on its second
   state, unless the page says the motion always plays (<html data-motion="always">). */
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="always"]) .handoff__story,
  html:not([data-motion="always"]) .handoff__ray,
  html:not([data-motion="always"]) .handoff__edge,
  html:not([data-motion="always"]) .handoff__stops { animation: none; }
  html:not([data-motion="always"]) .handoff__story { transform: translateX(var(--travel)); }
  html:not([data-motion="always"]) .handoff__ray { opacity: 0; }
  html:not([data-motion="always"]) .handoff__edge,
  html:not([data-motion="always"]) .handoff__stops { opacity: 1; }
}

/* ───────── Pixel disc: the full stop, the clock, the figure ───────── */
.disc { width: var(--disc); height: var(--disc); flex: none; position: relative; }
.disc svg, .disc canvas { width: 100%; height: 100%; display: block; }
.disc svg { fill: var(--disc-fill, var(--ink)); shape-rendering: crispEdges; }
.disc canvas { position: absolute; inset: 0; image-rendering: pixelated; }
.figure-px { width: calc(var(--cell) * 7); height: calc(var(--cell) * 13); flex: none; fill: var(--paper); shape-rendering: crispEdges; }

.clock { display: grid; gap: var(--gap-1); justify-items: center; text-align: center; }

/* ───────── Brief ───────── */
.brief-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap-4); align-items: center; }
.brief { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap-5); align-items: start; }
@media (min-width: 1000px) {
  .brief-head { grid-template-columns: minmax(0, 1fr) auto; }
  .brief { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); }
}
.form { display: grid; gap: var(--gap-3); }
.field { display: grid; gap: var(--gap-1); }
.field select, .field input, .field textarea {
  width: 100%; min-width: 0;
  font-size: var(--fs-2);
  font-weight: var(--wt-regular);
  line-height: var(--lh-body);
  padding: var(--gap-2);
  border: var(--line) solid var(--fg);
  background: var(--bg);
  color: var(--fg);
}
.field textarea { resize: vertical; min-height: calc(var(--fs-2) * var(--lh-body) * 4 + var(--gap-2) * 2 + var(--line) * 2); }
.field textarea.note { min-height: calc(var(--fs-2) * var(--lh-body) * 12 + var(--gap-2) * 2 + var(--line) * 2); }
/* ───────── Select: the site's own dropdown (js/select.js) ─────────
   A button that looks like the other fields, and a list that opens directly under it.
   The list floats over what is below, so the page does not move when it opens.
   Without the script the device's own select shows instead. */
.select { display: grid; position: relative; }
.select__button {
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap-2);
  width: 100%; text-align: left;
  font-size: var(--fs-2);
  font-weight: var(--wt-regular);
  line-height: var(--lh-body);
  padding: var(--gap-2);
  border: var(--line) solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
}
.select__button::after {
  content: ""; flex: none;
  border-left: var(--gap-1) solid transparent;
  border-right: var(--gap-1) solid transparent;
  border-top: var(--gap-1) solid currentColor;
}
.select__button[aria-expanded="true"]::after { transform: rotate(180deg); }
.select__list {
  position: absolute; z-index: 5; left: 0; right: 0;
  top: calc(100% - var(--line));
  border: var(--line) solid var(--fg);
  background: var(--bg);
  color: var(--fg);
}
.select__option {
  padding: var(--gap-1) var(--gap-2);
  font-size: var(--fs-2);
  line-height: var(--lh-body);
  cursor: pointer;
}
.select__option[aria-selected="true"] { font-weight: var(--wt-extrabold); }
.select__option.is-active { background: var(--fg); color: var(--bg); }

/* A field in use is marked by the ink ring alone: no yellow halo round form fields. */
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible,
.select__button:focus-visible { box-shadow: none; }
.field ::placeholder { color: var(--fg); opacity: var(--dim); }
.status { min-height: calc(var(--fs-1) * var(--lh-tight)); }

/* ───────── Close ───────── */
/* "and when." beside the figure and full stop. If the two cannot share a row without the
   words being squeezed past their longest word, the full stop moves to its own row. */
.close__end { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--gap-4); }
.close__end .big { flex: 1 1 min-content; }
.close__stop { display: flex; align-items: flex-end; gap: var(--gap-3); margin-left: auto; }
.close__meta { padding-block: var(--gap-3); }
.close__meta .wrap { gap: var(--gap-1); }

/* ───────── Colours kept from the original page where its own ground is in use ─────────
   On any other ground these lines fall back to that ground's text or accent colour. */
.on-paper .start__last { color: var(--navy); }
.help__avail { color: var(--ac); }
.on-yellow .help__avail { color: var(--red); }
.shift__closer { color: var(--ac); }
.on-navy .shift__closer, .on-ink .shift__closer { color: var(--orange); }

/* ───────── Marker: the stylesheet has arrived ─────────
   Keep this as the last rule in the last stylesheet. js/ready.js waits for it before any
   script reads a colour or a size. */
html { --styled: 1; }
