/* ==========================================================================
   ANTIHORIZN: History (timeline.html)
   Loaded after site.css and brand.css. Type, colour and spacing come from
   their tokens; nothing here names a font or a hue.

   H1  The plates as a column     the default: no script, a phone, reduced motion
   H2  The stage                  data-mode="pin": the row, the counter, the ruler
   H3  The empty frame            the last plate
   H4  Charts
   H5  Closing
   H6  Small screens and reduced motion
   ========================================================================== */

.hx { display: block; }

/* --- H1. The plates as a column ----------------------------------------- */

.hx-reel { position: relative; overflow: clip; }
.hx-reel__pin { position: relative; }

.hx-plate { position: relative; }
.hx-plate + .hx-plate { border-top: 1px solid var(--line-night); }
.hx-plate__in {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(64px, 10vh, 128px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 5vw, 96px);
  align-items: center;
}
.hx-plate__text { min-width: 0; }

/* The line over the title: which machine, which year, how long after the last. */
.hx-plate__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--dim);
}
/* In the column each plate carries its own year, large and hollow. On the
   stage the counter behind the row does that job and this becomes small. */
.hx-plate__year {
  order: -1;
  flex-basis: 100%;
  margin-bottom: 10px;
  font-family: var(--display);
  font-size: clamp(88px, 15vw, 220px);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-transform: none;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(244, 244, 245, 0.5);
}
.hx-plate__gap { color: var(--on-dark); }

.hx-plate__title {
  margin-top: 16px;
  font-size: clamp(34px, 4.1vw, 68px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

/* One large thing per machine: a figure and its unit, or a phrase. */
.hx-plate__big {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin-top: clamp(18px, 3vh, 34px);
}
.hx-plate__big b {
  font-family: var(--display);
  font-size: clamp(56px, 7.4vw, 124px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.hx-plate__big span {
  max-width: 14ch;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.006em;
  color: var(--dim);
}
.hx-plate__big--say {
  max-width: 15ch;
  font-family: var(--display);
  font-size: clamp(26px, 2.5vw, 40px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--grey);
  text-wrap: balance;
}

.hx-plate__body {
  margin-top: clamp(18px, 3vh, 30px);
  max-width: 50ch;
  color: var(--on-dark-soft);
}

.hx-plate__media { margin: 0; min-width: 0; }
.hx-plate__frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--night-2);
}
.hx-plate__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
}
.hx-plate__frame--contain img { object-fit: contain; }
.hx-plate__credit {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--dim);
}

/* The opening plate. */
.hx-plate--open .hx-plate__in {
  grid-template-columns: minmax(0, 1fr);
  padding-top: calc(var(--nav-h) + clamp(56px, 10vh, 120px));
}
.hx-open__title {
  margin-top: 18px;
  max-width: 12ch;
  font-size: clamp(44px, 6.6vw, 112px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--grey);
  text-wrap: balance;
}
.hx-open__title em { color: var(--hot); white-space: nowrap; }
.hx-open__lede { margin-top: clamp(20px, 3.4vh, 36px); max-width: 31ch; }
.hx-open__cue {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(28px, 5vh, 56px);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-dark);
}
.hx-open__cue i { display: block; width: 56px; height: 1px; background: currentColor; transform-origin: left; animation: hxCue 2.4s var(--ease-out) infinite; }
.hx-open__cue-pin { display: none; }
@keyframes hxCue {
  0% { transform: scaleX(0); opacity: 1; }
  60% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

/* Stage furniture is for the stage only. */
.hx-odo-layer, .hx-hud, .hx-steps, .hx-ruler { display: none; }

/* In the column, a plate develops when it is reached. .hx-js is set by
   history.js, so without the script nothing is ever held back. */
.hx-js[data-mode="stack"] .hx-plate:not(.hx-plate--open) .hx-plate__frame,
.hx-js[data-mode="stack"] .hx-you__frame {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1300ms var(--ease-out);
}
.hx-js[data-mode="stack"] .hx-plate:not(.hx-plate--open) .hx-plate__text {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}
.hx-js[data-mode="stack"] .hx-plate.is-in .hx-plate__frame,
.hx-js[data-mode="stack"] .hx-plate.is-in .hx-you__frame { clip-path: inset(0 0 0 0); }
.hx-js[data-mode="stack"] .hx-plate.is-in .hx-plate__text { opacity: 1; transform: none; }

/* --- H2. The stage ------------------------------------------------------- */
/* One screen, held while the page scrolls underneath it. history.js writes
   the row's position, and on each nearby plate --d (how far it is from the
   middle, in plates, signed), --r (how far its photo has opened) and --o. */

.hx-reel[data-mode="pin"] { height: calc(100vh + var(--n, 15) * 72vh); overflow: visible; }
.hx-reel[data-mode="pin"] .hx-reel__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  overflow: clip;
  --rail: clamp(104px, 15vh, 148px);          /* the band the ruler lives in */
  --top: calc(var(--nav-h) + clamp(52px, 8vh, 84px));
}
/* Film grain, the size of the stage and no larger. */
[data-mode="pin"] .hx-reel__pin::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-mode="pin"] .hx-strip {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  height: 100%;
  will-change: transform;
}
[data-mode="pin"] .hx-plate { flex: 0 0 100%; height: 100%; border: 0; }
[data-mode="pin"] .hx-plate__in {
  height: 100%;
  padding: var(--top) var(--gutter) var(--rail);
  gap: clamp(32px, 5vw, 96px);
}

[data-mode="pin"] .hx-plate__year {
  order: 0;
  flex-basis: auto;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  color: var(--on-dark);
  -webkit-text-stroke: 0;
}
[data-mode="pin"] .hx-plate__gap { color: var(--dim); }
[data-mode="pin"] .hx-plate__n { display: none; }          /* the stage says it, top left */
[data-mode="pin"] .hx-plate__meta { font-size: 14px; letter-spacing: 0.03em; }
[data-mode="pin"] .hx-plate__title { font-size: clamp(34px, min(4.1vw, 7vh), 68px); }
[data-mode="pin"] .hx-plate__big b { font-size: clamp(56px, min(7.4vw, 13vh), 124px); }

/* Depth: the three parts of the text travel at slightly different speeds. */
[data-mode="pin"] .hx-plate__text { opacity: var(--o, 1); }
[data-mode="pin"] .hx-plate__meta  { transform: translate3d(calc(var(--d, 0) * 5vw), 0, 0); }
[data-mode="pin"] .hx-plate__title { transform: translate3d(calc(var(--d, 0) * 9vw), 0, 0); }
[data-mode="pin"] .hx-plate__big   { transform: translate3d(calc(var(--d, 0) * 15vw), 0, 0); }
[data-mode="pin"] .hx-plate__body  { transform: translate3d(calc(var(--d, 0) * 7vw), 0, 0); }

/* The photo. Its frame is as tall as the stage allows and keeps 4:3. */
[data-mode="pin"] .hx-plate__media {
  justify-self: end;
  width: min(100%, calc((100vh - var(--top) - var(--rail) - 44px) * 4 / 3));
}
/* It develops: the frame opens upward from its foot behind a bright line,
   the picture comes up out of the dark, and it sits a little deeper than the
   frame so it drifts as the plate passes. */
[data-mode="pin"] .hx-plate__frame { clip-path: inset(calc((1 - var(--r, 1)) * 100%) 0 0 0); }
[data-mode="pin"] .hx-plate__frame img {
  transform: translate3d(calc(var(--d, 0) * 10%), 0, 0) scale(1.22);
  will-change: transform;
}
[data-mode="pin"] .hx-plate__frame--contain img { transform: translate3d(calc(var(--d, 0) * 6%), 0, 0); }
[data-mode="pin"] .hx-plate__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--night);
  opacity: calc((1 - var(--r, 1)) * 0.92);
  pointer-events: none;
}
[data-mode="pin"] .hx-plate__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-top: 2px solid #FFFFFF;
  transform: translate3d(0, calc((1 - var(--r, 1)) * 100%), 0);
  opacity: min(1, calc((1 - var(--r, 1)) * 14));
  pointer-events: none;
}
/* The credit keeps a clear strip of ground behind it, so the counter never runs through the words. */
[data-mode="pin"] .hx-plate__credit {
  display: table;
  margin-top: 8px;
  padding: 2px 8px 2px 0;
  background: var(--night);
  opacity: var(--o, 1);
}

/* The opening plate on the stage: the words on the left, the counter alone on the right. */
[data-mode="pin"] .hx-plate--open .hx-plate__in { align-items: start; padding-top: calc(var(--top) + clamp(4px, 2vh, 24px)); }
[data-mode="pin"] .hx-open__title { font-size: clamp(44px, min(6.6vw, 11.5vh), 112px); transform: translate3d(calc(var(--d, 0) * 10vw), 0, 0); }
[data-mode="pin"] .hx-open__lede { transform: translate3d(calc(var(--d, 0) * 6vw), 0, 0); }
[data-mode="pin"] .hx-open__cue-pin { display: inline; }
[data-mode="pin"] .hx-open__cue-stack { display: none; }

/* The year counter. Four windows, a column of digits in each; history.js
   turns the columns. It is drawn hollow and sits in front of the photographs,
   low on the right, like the date printed on a frame of film. */
[data-mode="pin"] .hx-odo-layer {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
}
/* The stacking order inside the row: photographs, then the counter, then words. */
[data-mode="pin"] .hx-plate__frame, [data-mode="pin"] .hx-you__frame { z-index: 1; }
[data-mode="pin"] .hx-plate__text, [data-mode="pin"] .hx-plate__credit { position: relative; z-index: 3; }
[data-mode="pin"] .hx-odo {
  position: absolute;
  right: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  bottom: calc(var(--rail) + 6px);
  display: flex;
  margin-right: -0.035em;
  /* on the opening plate the counter is the picture: it stands a little larger */
  transform: scale(calc(1 + var(--open, 0) * 0.16));
  transform-origin: 100% 100%;
  font-family: var(--display);
  font-size: clamp(150px, min(21vw, 38vh), 340px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(244, 244, 245, 0.52);
  transition: -webkit-text-stroke-color 600ms var(--ease-out);
}
/* On the opening and on the empty frame the counter is the picture, so it is drawn at full strength. */
[data-mode="pin"][data-at="open"] .hx-odo,
[data-mode="pin"][data-at="now"] .hx-odo { -webkit-text-stroke-color: rgba(244, 244, 245, 0.9); }
.hx-odo__win {
  display: block;
  height: 0.84em;
  width: 0.635em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
}
.hx-odo__col { display: block; will-change: transform; }
.hx-odo__col > span { display: block; height: 0.84em; line-height: 0.84em; text-align: center; }

/* Where we are: 03 / 14, top left. Steps, top right. */
[data-mode="pin"] .hx-hud {
  position: absolute;
  z-index: 3;
  top: calc(var(--nav-h) + clamp(18px, 3.4vh, 34px));
  left: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  display: flex;
  align-items: baseline;
  gap: 22px;
  pointer-events: none;
}
.hx-hud__where { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.hx-hud__where b { font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.hx-hud__where span { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--dim); }
.hx-hud__hint { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dimmer); }

[data-mode="pin"] .hx-steps {
  position: absolute;
  z-index: 3;
  top: calc(var(--nav-h) + clamp(10px, 2.4vh, 24px));
  right: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  display: flex;
  gap: 8px;
}
.hx-step {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--line-night-2);
  color: var(--on-dark);
  transition: background-color 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), opacity 180ms var(--ease), transform 140ms var(--ease-out);
}
.hx-step svg { width: 20px; height: 20px; }
.hx-step:active { transform: scale(0.95); }
.hx-step:disabled { opacity: 0.3; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .hx-step:not(:disabled):hover { background: #FFFFFF; border-color: #FFFFFF; color: var(--ink); }
}

/* The ruler. A tick for every year, a taller one for each machine. The line
   is the bar of the mark and the playhead is its peak: together they are the
   logo, standing on the year the stage is showing. */
[data-mode="pin"] .hx-ruler {
  position: absolute;
  z-index: 3;
  left: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  right: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  bottom: 0;
  height: var(--rail);
  display: block;
}
.hx-ruler__line {
  position: absolute;
  left: 0; right: 0;
  top: 34px;
  height: 4px;
  background: rgba(244, 244, 245, 0.16);
}
.hx-ruler__line i {
  position: absolute;
  inset: 0;
  background: #FFFFFF;
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}
.hx-ruler__head {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 34px;
  color: #FFFFFF;
  will-change: transform;
}
.hx-ruler__head svg { position: absolute; left: -15px; bottom: 4px; width: 30px; height: 15px; }
.hx-ruler__head b {
  position: absolute;
  left: 24px;
  bottom: 3px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* near the right-hand end the year reads on the other side of the peak */
[data-at="now"] .hx-ruler__head b, [data-at="open"] .hx-ruler__head b { left: auto; right: 24px; }
.hx-ruler__minor {
  position: absolute;
  left: 0; right: 0;
  top: 38px;
  height: 7px;
  background-image: linear-gradient(90deg, rgba(244, 244, 245, 0.3) 0 1px, transparent 1px);
  background-size: calc(100% / var(--years, 80)) 100%;
  border-right: 1px solid rgba(244, 244, 245, 0.3);
}
.hx-ruler__ticks { position: absolute; left: 0; right: 0; top: 38px; }
.hx-ruler__ticks li { position: absolute; left: calc(var(--x) * 100%); top: 0; width: 0; }
.hx-ruler__ticks button {
  position: absolute;
  left: -14px;
  top: 0;
  width: 28px;
  height: 52px;
  color: var(--dim);
  transition: color 220ms var(--ease-out);
}
.hx-ruler__ticks i {
  position: absolute;
  left: 13px;
  top: 0;
  width: 2px;
  height: 16px;
  background: currentColor;
  transform-origin: top;
  transition: transform 320ms var(--ease-out);
}
.hx-ruler__ticks span {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: opacity 220ms var(--ease-out);
}
.hx-ruler__ticks li[data-label="off"] span { opacity: 0; }
.hx-ruler__ticks li[data-past] button { color: rgba(244, 244, 245, 0.82); }
.hx-ruler__ticks li[data-on] button { color: #FFFFFF; }
.hx-ruler__ticks li[data-on] i { transform: scaleY(1.5); }
.hx-ruler__ticks li[data-on] span { font-weight: 700; }
.hx-ruler__now span { left: auto; right: 13px; transform: none; text-transform: uppercase; letter-spacing: 0.04em; }
.hx-ruler__ticks li:first-child span { left: 13px; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .hx-ruler__ticks button:hover { color: #FFFFFF; }
  .hx-ruler__ticks button:hover i { transform: scaleY(1.5); }
  .hx-ruler__ticks li[data-label="off"] button:hover span { opacity: 1; }
}

/* --- H3. The empty frame ------------------------------------------------- */

.hx-plate--you .hx-plate__title { font-size: clamp(40px, 5.2vw, 88px); font-weight: 700; letter-spacing: -0.035em; }
[data-mode="pin"] .hx-plate--you .hx-plate__title { font-size: clamp(40px, min(5.2vw, 9vh), 88px); }
.hx-you__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(24px, 4vh, 40px); }
[data-mode="pin"] .hx-you__actions { transform: translate3d(calc(var(--d, 0) * 5vw), 0, 0); }

.hx-you__frame {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  color: var(--on-dark);
  background: rgba(244, 244, 245, 0.025);
  transition: background-color 320ms var(--ease-out);
}
[data-mode="pin"] .hx-you__frame { clip-path: inset(calc((1 - var(--r, 1)) * 100%) 0 0 0); }
.hx-you__corner { position: absolute; width: 26px; height: 26px; border: 0 solid #FFFFFF; transition: transform 420ms var(--ease-out); }
.hx-you__corner--tl { left: 0; top: 0; border-left-width: 2px; border-top-width: 2px; }
.hx-you__corner--tr { right: 0; top: 0; border-right-width: 2px; border-top-width: 2px; }
.hx-you__corner--bl { left: 0; bottom: 0; border-left-width: 2px; border-bottom-width: 2px; }
.hx-you__corner--br { right: 0; bottom: 0; border-right-width: 2px; border-bottom-width: 2px; }
.hx-you__text[data-typed] { color: #FFFFFF; }
.hx-you__prompt {
  position: absolute;
  left: clamp(20px, 3vw, 44px);
  right: clamp(20px, 3vw, 44px);
  top: clamp(22px, 3.4vw, 48px);
  font-family: var(--display);
  font-size: clamp(22px, 2.3vw, 36px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--grey);
}
.hx-you__caret {
  display: inline-block;
  width: 3px;
  height: 1em;
  margin-left: 6px;
  vertical-align: -0.14em;
  background: #FFFFFF;
  animation: hxBlink 1000ms steps(1) infinite;
}
@keyframes hxBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (hover: hover) and (pointer: fine) {
  .hx-you__frame:hover { background: rgba(244, 244, 245, 0.07); }
  .hx-you__frame:hover .hx-you__corner--tl { transform: translate3d(-6px, -6px, 0); }
  .hx-you__frame:hover .hx-you__corner--tr { transform: translate3d(6px, -6px, 0); }
  .hx-you__frame:hover .hx-you__corner--bl { transform: translate3d(-6px, 6px, 0); }
  .hx-you__frame:hover .hx-you__corner--br { transform: translate3d(6px, 6px, 0); }
  .hx-you__frame:hover .hx-you__prompt { color: #FFFFFF; }
}

/* --- H4. Charts ---------------------------------------------------------- */

.hc-sec { background: var(--paper); }
.hc-intro {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: end;
  margin-bottom: clamp(40px, 7vh, 88px);
}
.hc-intro .display { font-size: clamp(44px, 7vw, 116px); font-weight: 700; line-height: 0.98; letter-spacing: -0.035em; }
.hc-intro .lede { max-width: 42ch; padding-bottom: 8px; }

.hc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.hc {
  --hc-line: var(--ink);
  --hc-soft: rgba(11, 11, 12, 0.07);
  --hc-grid: rgba(11, 11, 12, 0.1);
  --hc-mute: var(--ink-mute);
  --hc-second: var(--grey);
  --hc-ground: var(--paper);
  position: relative;
  margin: 0;
  min-width: 0;
  padding: clamp(22px, 2.4vw, 36px);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--hc-ground);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "head call" "plot plot" "src src";
  gap: clamp(18px, 2.4vh, 28px) 24px;
  align-items: start;
}
.hc.night {
  --hc-line: #FFFFFF;
  --hc-soft: rgba(244, 244, 245, 0.08);
  --hc-grid: rgba(244, 244, 245, 0.13);
  --hc-mute: var(--dim);
  --hc-second: var(--grey);
  --hc-ground: var(--night);
  color: var(--on-dark);
}
.hc__head { grid-area: head; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hc__title { font-size: clamp(20px, 1.64vw, 24px); font-weight: 600; line-height: 1.2; letter-spacing: -0.012em; text-wrap: balance; }
.hc__note { max-width: 44ch; font-size: 14px; line-height: 1.45; letter-spacing: -0.006em; color: var(--hc-mute); }

/* The point of the chart, as two figures: where the line starts and where it ends. */
.hc__call { grid-area: call; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; font-size: 12px; line-height: 1.2; color: var(--hc-mute); white-space: nowrap; }
.hc__call b { font-family: var(--display); font-variant-numeric: tabular-nums; }
.hc__from b { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; color: var(--hc-mute); }
.hc__to { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.hc__to b { font-size: clamp(34px, 3.5vw, 56px); font-weight: 700; line-height: 0.95; letter-spacing: -0.035em; color: var(--hc-line); }
.hc__to--b b { color: var(--hc-second); }
.hc__src { grid-area: src; font-size: 12px; line-height: 1.45; letter-spacing: 0; color: var(--hc-mute); }

/* The two wide figures: words and the big figure on the left, the drawing on the right. */
.hc--wide {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  grid-template-areas: "head plot" "call plot" "src plot";
  grid-template-rows: auto 1fr auto;
  column-gap: clamp(28px, 4vw, 72px);
  padding: clamp(28px, 3.4vw, 56px);
}
.hc--wide .hc__call { align-items: flex-start; align-self: end; gap: 14px; text-align: left; white-space: normal; }
.hc--wide .hc__to { align-items: flex-start; gap: 10px; }
.hc--wide .hc__to b { font-size: clamp(72px, 10.5vw, 176px); line-height: 0.9; margin-left: -0.04em; }
.hc--wide .hc__call--pair { flex-direction: row; flex-wrap: wrap; gap: 18px clamp(24px, 3vw, 48px); }
.hc--wide .hc__call--pair .hc__to b { font-size: clamp(48px, 6vw, 100px); }
.hc--wide .hc__plot { align-self: center; }

.hc__plot { grid-area: plot; position: relative; min-width: 0; outline: none; cursor: crosshair; touch-action: pan-y; }
.hc__plot:focus-visible { outline: 1.5px solid var(--hc-line); outline-offset: 6px; }
.hc__axes, .hc__data, .hc__data svg, .hc__hover { position: absolute; inset: 0; display: block; }
.hc__plot text { font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.hc__tick { fill: var(--hc-mute); }
.hc__gridline { stroke: var(--hc-grid); stroke-width: 1; }
.hc__base { stroke: var(--hc-line); stroke-width: 1; opacity: 0.5; }
.hc__projline { stroke: var(--hc-mute); stroke-width: 1; stroke-dasharray: 2 4; }

/* The drawing arrives from the left when the figure is reached. */
.hc__data { clip-path: inset(-12px 100% -12px -12px); transition: clip-path 1700ms var(--ease-out) 150ms; }
.hc.is-drawn .hc__data { clip-path: inset(-12px -12px -12px -12px); }
.hc__line { fill: none; stroke: var(--hc-line); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.hc__line.hc__s--b { stroke: var(--hc-second); }
.hc__line--proj { stroke-dasharray: 2 7; }
.hc__area { fill: var(--hc-soft); }
.hc__hatch { stroke: var(--hc-line); stroke-width: 1; opacity: 0.2; }
.hc__pt { fill: var(--hc-ground); stroke: var(--hc-line); stroke-width: 1.5; }
.hc__pt.hc__s--b { stroke: var(--hc-second); }
.hc__end { fill: var(--hc-line); }
.hc__end.hc__s--b { fill: var(--hc-second); }
.hc__name { fill: var(--hc-line); font-weight: 600; }
.hc__name.hc__s--b { fill: var(--hc-mute); }

/* The reading. */
.hc__hover { pointer-events: none; opacity: 0; transition: opacity 160ms var(--ease-out); }
.hc__plot[data-reading] .hc__hover { opacity: 1; }
.hc__cross { position: absolute; left: 0; width: 1px; margin-left: -0.5px; background: var(--hc-line); opacity: 0.55; transition: transform 140ms var(--ease-out); }
.hc__dot {
  position: absolute;
  left: -7px; top: -7px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--hc-ground);
  border: 3px solid var(--hc-line);
  transition: transform 140ms var(--ease-out);
}
.hc__dot--b { border-color: var(--hc-second); }
.hc__read {
  position: absolute;
  left: 0; top: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  background: var(--hc-line);
  color: var(--hc-ground);
  white-space: nowrap;
  transition: transform 140ms var(--ease-out);
}
.hc__read-year { font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.66; }
.hc__read-row { display: flex; align-items: baseline; gap: 8px; }
.hc__read-row b { font-family: var(--display); font-size: 20px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hc__read-row em { font-size: 12px; line-height: 1; opacity: 0.72; }

/* --- H5. Closing --------------------------------------------------------- */

.hx-close__row {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: start;
}
.hx-close .display { font-size: clamp(40px, 5.4vw, 92px); font-weight: 700; line-height: 1; letter-spacing: -0.035em; }
.hx-close__side .prose { color: var(--on-dark-soft); }
.hx-close__turn {
  margin-top: 1.2em;
  max-width: 24ch;
  font-family: var(--display);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: #FFFFFF;
}
.hx-close .actions { margin-top: clamp(28px, 4vh, 48px); }

/* --- H6. Small screens and reduced motion -------------------------------- */

@media (max-width: 900px) {
  .hx-plate__in { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hx-plate__year { font-size: clamp(88px, 30vw, 200px); }
  .hx-plate__big span { max-width: none; }
  .hc-intro { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .hc-grid { grid-template-columns: minmax(0, 1fr); }
  .hc, .hc--wide {
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "call" "plot" "src";
    grid-template-rows: auto;
  }
  .hc__call, .hc__to { align-items: flex-start; text-align: left; white-space: normal; }
  .hc--wide .hc__to b { font-size: clamp(64px, 22vw, 120px); }
  .hx-close__row { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .hx-open__cue i, .hx-you__caret { animation: none; }
  .hc__data { clip-path: none; transition: none; }
  .hc__cross, .hc__dot, .hc__read, .hc__hover { transition: none; }
}
