/* What remains: a guide to the Bitcoin Landscape. Cinematic observatory: near-black ground,
   ivory type, mint for data and links, amber only for invitations and motion. */

:root {
  --ink: #07090c;
  --ink-2: #0c1115;
  --ink-3: #11171c;
  --ivory: #edece4;
  --dim: #b4b5ad;
  --faint: #868880;
  --rule: rgba(237, 236, 228, 0.14);
  --rule-strong: rgba(237, 236, 228, 0.28);
  --mint: #a8d6b3;
  --amber: #edbf76;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --gutter: clamp(20px, 4.5vw, 72px);
  --gap: clamp(16px, 2vw, 32px);
  --max: 1440px;
  --measure: 62ch;
  --space: clamp(96px, 14vw, 220px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--ink);
  color: var(--ivory);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 64px;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(17px, 0.35vw + 15.6px, 19px);
  line-height: 1.65;
  font-weight: 400;
  background: var(--ink);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
[role='list'], .index ol { list-style: none; }
b { font-weight: 500; }
em { font-style: italic; }
code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--mint);
}

a { color: var(--mint); text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: rgba(168, 214, 179, 0.4); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 2px; }
::selection { background: rgba(168, 214, 179, 0.3); color: var(--ivory); }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--ivory);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.cols {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

/* ---------- labels and readouts (instrument plates) ---------- */

.label, .readout, summary, .index, kbd, .gesture, .tiers dt, .motion {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.5;
}
.label { color: var(--faint); margin: 0; }

.readout {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  overflow: hidden;
  margin-left: -13px;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}
/* Each item carries a left hairline; the one starting a line sits outside the box and is clipped. */
.readout > span {
  margin-left: -1px;
  padding: 0 12px 0 13px;
  border-left: 1px solid var(--rule-strong);
  line-height: 1.1;
}
.cap.centre .readout { justify-content: center; margin-left: 0; }

/* ---------- invitations (amber) ---------- */

.invite {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.72em 1.3em 0.74em;
  border: 1px solid var(--amber);
  color: var(--ink);
  background: var(--amber);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background-color 0.25s, color 0.25s;
}
.invite:hover { background: #f3cf94; }
.invite.ghost { background: transparent; color: var(--amber); border-color: rgba(237, 191, 118, 0.55); }
.invite.ghost:hover { border-color: var(--amber); background: rgba(237, 191, 118, 0.08); }
.invite.small { padding: 0.5em 0.95em; font-size: 14px; }
.invite.large { padding: 0.95em 1.8em; font-size: 18px; }
.invite .sep { opacity: 0.6; }
.play-glyph {
  width: 0; height: 0;
  border-left: 8px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.explore {
  display: inline-flex;
  gap: 0.45em;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mint);
  padding: 6px 0 4px;
  border-bottom: 1px solid rgba(168, 214, 179, 0.35);
}
.explore:hover { border-bottom-color: var(--mint); }

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

.masthead {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--max);
  margin-inline: auto;
  padding: 22px var(--gutter);
}
.wordmark {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory);
  text-decoration: none;
  margin-right: auto;
}
.topnav { display: flex; gap: 28px; }
.topnav a {
  color: var(--dim);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.topnav a:hover { color: var(--ivory); }

/* ---------- opening ---------- */

.opening-text {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: end;
  padding-top: clamp(28px, 4vw, 64px);
  padding-bottom: clamp(32px, 3.5vw, 56px);
}
.opening-text .label { grid-column: 1 / -1; margin-bottom: 18px; }
h1 {
  grid-column: 1 / span 7;
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(76px, 13.2vw, 212px);
  line-height: 0.84;
  letter-spacing: -0.015em;
}
h1 em { display: block; padding-left: 0.42em; }
.opening-side { grid-column: 8 / -1; padding-bottom: 0.4em; }
.subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 2.1vw, 32px);
  line-height: 1.2;
  margin-bottom: 0.8em;
}
.lede { color: var(--dim); max-width: 44ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.8em 0 0; }
.actions.centre { justify-content: center; }

.hero { position: relative; }
.hero-plate { aspect-ratio: 16 / 9; max-height: 88vh; width: 100%; }

/* ---------- previews ---------- */

.preview {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  aspect-ratio: 16 / 9;
}
.preview > img, .preview > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview > video { opacity: 0; transition: opacity 0.9s ease; }
.preview.is-live > video { opacity: 1; }

.motion {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 12px 0 10px;
  font-size: 11px;
  color: var(--ivory);
  background: rgba(7, 9, 12, 0.72);
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.motion:hover { border-color: var(--ivory); }
.motion-glyph {
  width: 0; height: 0;
  border-left: 8px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.motion[aria-pressed='true'] { color: var(--amber); border-color: rgba(237, 191, 118, 0.6); }
.motion[aria-pressed='true'] .motion-glyph {
  width: 8px; height: 10px;
  border: 0;
  border-left: 3px solid currentColor;
  border-right: 3px solid currentColor;
}

/* ---------- movement index ---------- */

.index {
  position: relative;
  z-index: 20;
  margin-top: clamp(40px, 5vw, 72px);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--ink);
}
.index ol {
  display: flex;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}
.index ol::-webkit-scrollbar { display: none; }
.index li { flex: 1 0 auto; }
.index li + li { border-left: 1px solid var(--rule); }
.index a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
  color: var(--dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s;
}
.index li:first-child a { padding-left: 0; }
.index .num {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--faint);
  min-width: 1.6em;
  transition: color 0.3s;
}
.index a:hover, .index a[aria-current] { color: var(--ivory); }
.index a[aria-current] .num { color: var(--mint); }
@media (min-width: 900px) {
  .index { position: sticky; top: 0; }
}

/* ---------- movements: shared ---------- */

.movement { padding-top: var(--space); }
.movement:first-of-type { padding-top: clamp(80px, 10vw, 160px); }

.mhead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: clamp(16px, 2vw, 28px);
  margin-bottom: clamp(28px, 3.5vw, 48px);
}
.mhead.centre { justify-content: center; }
.numeral {
  font-family: var(--serif);
  font-size: clamp(56px, 7vw, 104px);
  line-height: 0.8;
  color: var(--mint);
}
.mhead h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(44px, 5.4vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.005em;
}

.intro { max-width: var(--measure); font-size: 1.06em; line-height: 1.7; }

.plate { position: relative; }
.plate > img { width: 100%; background: var(--ink-2); }

.cap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.55;
}
.cap.small { font-size: 14px; padding-top: 12px; }
.cap-text { max-width: 62ch; }
.cap.centre { align-items: center; text-align: center; }
.cap .explore { align-self: flex-start; margin-top: 4px; }
.cap.centre .explore { align-self: center; }

.after { margin-top: 28px; }
.aside { grid-column: 1 / span 6; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.aside.right { grid-column: 7 / -1; }

/* ---------- data disclosure ---------- */

details.data {
  width: 100%;
  max-width: var(--measure);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  cursor: pointer;
  color: var(--ivory);
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 18px;
  line-height: 1;
  color: var(--mint);
  transition: transform 0.3s;
}
details[open] > summary::after { transform: rotate(45deg); }
.data-body { padding: 4px 0 18px; color: var(--dim); font-size: 16px; line-height: 1.7; }
.data-body p:last-child { margin-bottom: 0; }

/* ---------- I: full bleed ---------- */

.m-bleed .intro { grid-column: 2 / span 7; margin-bottom: clamp(40px, 5vw, 72px); }
.m-bleed .mhead { padding-left: calc((100% - 2 * var(--gutter)) / 12 + var(--gutter)); }
.bleed .preview { aspect-ratio: 16 / 9; max-height: 92vh; }
.m-bleed .cap { padding-left: calc((100% - 2 * var(--gutter)) / 12 + var(--gutter)); }
.m-bleed .aside { grid-column: 2 / span 7; }

/* ---------- II: offset, plate running off the right edge ---------- */

.offset-grid {
  display: grid;
  grid-template-columns: minmax(var(--gutter), 1fr) minmax(0, calc(var(--max) * 0.3)) minmax(0, calc(var(--max) * 0.7 - var(--gutter)));
  column-gap: clamp(32px, 4vw, 72px);
  align-items: start;
}
.offset-text { grid-column: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding-top: 4vw; }
.offset-text .intro { margin-bottom: 40px; }
.offset-text .mini { width: 100%; margin-bottom: 28px; }
.offset-plate { grid-column: 3 / -1; }
@media (min-width: 900px) {
  .offset-plate { position: sticky; top: 96px; }
}
.offset-plate .cap { padding-right: var(--gutter); }

/* ---------- III: portrait ---------- */

.portrait-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
}
.portrait-plate { grid-column: 1 / span 5; }
.portrait-plate > img { aspect-ratio: 4 / 5.4; object-fit: cover; object-position: 50% 40%; }
.portrait-text { grid-column: 7 / span 6; display: flex; flex-direction: column; align-items: flex-start; padding-top: clamp(24px, 8vw, 140px); }
.portrait-text .intro { margin-bottom: 40px; }
.portrait-text .mini { width: min(100%, 520px); margin-bottom: 28px; }
.portrait-text .explore { margin-bottom: 28px; }

.anatomy { width: 100%; max-width: 34rem; margin: 0 0 40px; border-top: 1px solid var(--rule-strong); }
.anatomy > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; padding: 9px 0 8px; border-bottom: 1px solid var(--rule); }
.anatomy dt { padding-top: 3px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mint); }
.anatomy dd { margin: 0; font-size: 16px; line-height: 1.5; }
.anatomy .dimmer { color: var(--dim); }

/* ---------- III: five places ---------- */

.places-head, .cinema-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.places-head .mhead { grid-column: 1 / span 5; margin-bottom: 0; }
.places-head .intro { grid-column: 7 / span 6; margin: 0; }
.places { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(44px, 4.5vw, 72px) var(--gap); }
.place { grid-column: span 2; display: flex; flex-direction: column; align-items: flex-start; }
.place:nth-child(-n + 2) { grid-column: span 3; }
.place > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ink-2); box-shadow: 0 0 0 1px var(--rule); }
.place .readout { margin-top: 16px; font-size: 11px; }
.place h3 { margin: 12px 0 6px; font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.3vw, 36px); line-height: 1.05; }
.place p { max-width: 46ch; margin-bottom: 12px; color: var(--dim); font-size: 15.5px; line-height: 1.6; }
.place .explore { margin-top: auto; }

/* ---------- V: cinema ---------- */

.cinema-head .mhead { grid-column: 1 / span 4; margin-bottom: 0; }
.cinema-head .intro { grid-column: 6 / span 7; margin: 0; }
.cinema { max-width: calc(var(--max) - 2 * var(--gutter) + 2 * var(--gutter)); }
.cinema .preview { box-shadow: 0 0 0 1px var(--rule); }

/* ---------- VI: from above ---------- */

.pair-links { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; }
.m-above .aside .note { margin: -8px 0 0; }

/* ---------- VII: pair ---------- */

.pair-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: clamp(40px, 5vw, 72px); }
.pair-head .intro { max-width: 58ch; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.4vw, 24px); }

/* ---------- closing ---------- */

.closing { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: var(--space); }
.closing .actions { margin: 0; }
.note { color: var(--faint); font-size: 15px; margin-top: 22px; }

/* ---------- guide ---------- */

.guide { margin-top: var(--space); padding-top: clamp(64px, 8vw, 120px); border-top: 1px solid var(--rule); background: var(--ink-2); padding-bottom: clamp(64px, 8vw, 120px); }
.section-head { margin-bottom: clamp(40px, 5vw, 80px); }
.section-head h2 {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 7vw, 112px);
  line-height: 0.9;
}
.section-head .note { margin-top: 18px; }

.g-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  padding: clamp(36px, 4vw, 64px) 0;
  border-top: 1px solid var(--rule);
}
.g-row > h3 {
  grid-column: 1 / span 3;
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 2.4vw, 38px);
  line-height: 1.05;
}
.g-body { grid-column: 4 / -1; min-width: 0; }
.g-body > p { max-width: var(--measure); }
.g-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.g-split.rev > figure { order: 0; }
.g-figure { margin: 28px 0 8px; }
.g-split .g-figure { margin-top: 6px; }
.g-figure > img { width: 100%; background: var(--ink-3); box-shadow: 0 0 0 1px var(--rule); }
.g-figure.phone { justify-self: center; width: min(100%, 18rem); }
.g-figure.phone > img { border-radius: 22px; aspect-ratio: 800 / 1733; object-fit: cover; }
.g-figure.wide { margin-top: 36px; }
.g-figure.wide-row { grid-column: 4 / -1; margin-top: 40px; }

/* The inspector: crops of the app's own panels at their native resolution. */
.inspector-split { grid-template-columns: minmax(0, 1fr) auto; }
.g-figure.crop > img { box-shadow: none; background: none; }
.hover-card { width: 306px; max-width: 100%; margin: 4px 0 32px; }
.inspector-crop { width: 430px; max-width: 100%; }
@media (min-width: 900px) {
  .inspector-crop { position: sticky; top: 32px; }
}
.inspector-parts { max-width: none; margin: 8px 0 28px; }
.inspector-parts > div { grid-template-columns: 9.5em minmax(0, 1fr); }
.inspector-parts dd { color: var(--dim); font-size: 15.5px; line-height: 1.55; }

kbd, .gesture {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 5px 7px 4px;
  margin: 0 2px 4px 0;
  border: 1px solid var(--rule-strong);
  color: var(--ivory);
  white-space: nowrap;
}
.gesture { border-color: transparent; padding-left: 0; color: var(--mint); }
p kbd { vertical-align: 0.1em; }

.keys h4 {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.keys { margin-top: 20px; }
.keys dl { margin: 0; }
.keys dl > div { display: grid; grid-template-columns: 8.4em minmax(0, 1fr); gap: 2px 12px; align-items: baseline; padding: 5px 0 4px; border-top: 1px solid var(--rule); }
.keys dt { line-height: 1.4; }
.keys dd { margin: 0; color: var(--dim); font-size: 14.5px; line-height: 1.45; }
.keys kbd { margin-bottom: 0; padding: 3px 6px 2px; font-size: 11px; }
.g-split .keys dl > div { grid-template-columns: 12em minmax(0, 1fr); }

/* All the keys in one compact reference, closed by default on touch screens (guide.js). */
.g-row > .keyref { grid-column: 1 / -1; margin-top: clamp(28px, 3vw, 44px); border-top: 1px solid var(--rule); }
.keyref > summary { padding: 13px 0; }
.keyref-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--gap); padding: 0 0 18px; }
.keyref .keys { margin-top: 10px; }
.keyref .keys dl > div { grid-template-columns: 7.4rem minmax(0, 1fr); }

.looks {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(32px, 3vw, 48px) var(--gap);
  margin-top: clamp(28px, 3vw, 48px);
}
.look { display: flex; flex-direction: column; align-items: flex-start; }
.look > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ink-3); }
.look h4 { margin: 16px 0 6px; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; }
.look p { color: var(--dim); font-size: 15px; line-height: 1.55; margin-bottom: 10px; }
.look .explore { margin-top: auto; }

.tiers { margin: 0 0 28px; }
.tiers > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; padding: 12px 0 10px; border-top: 1px solid var(--rule); }
.tiers > div:last-child { border-bottom: 1px solid var(--rule); }
.tiers dt { color: var(--mint); padding-top: 3px; }
.tiers dd { margin: 0; color: var(--dim); font-size: 15.5px; line-height: 1.55; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px var(--gap); margin-bottom: 28px; }
.facts li { border-top: 1px solid var(--rule-strong); padding-top: 14px; color: var(--dim); font-size: 15.5px; line-height: 1.55; }
.facts .label { display: block; color: var(--mint); margin-bottom: 8px; }
.links { font-size: 15.5px; }
.links span { color: var(--faint); margin: 0 8px; }

/* ---------- view index ---------- */

.views { padding: var(--space) 0; }
.views h3 {
  margin: clamp(40px, 4vw, 64px) 0 20px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.view-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 28px var(--gap); }
.view { display: flex; flex-direction: column; align-items: flex-start; }
.view > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ink-2); }
.view-title { font-family: var(--serif); font-size: 21px; line-height: 1.15; margin: 12px 0 4px; }
.view .explore { font-size: 11.5px; padding-top: 2px; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--rule); padding: clamp(48px, 6vw, 96px) 0 clamp(40px, 5vw, 72px); color: var(--dim); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 28px; }
.foot-mark { grid-column: 1 / span 4; font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--ivory); margin: 0; }
.credits { grid-column: 5 / span 8; display: grid; gap: 6px; }
.production { grid-column: 5 / span 8; color: var(--faint); font-size: 14px; max-width: 70ch; margin: 0; padding-top: 18px; border-top: 1px solid var(--rule); }

/* ---------- film dialog ---------- */

.film-dialog {
  width: min(96vw, 1600px);
  max-width: none;
  max-height: 96vh;
  padding: 0;
  border: 1px solid var(--rule-strong);
  background: var(--ink);
  color: var(--ivory);
}
.film-dialog::backdrop { background: rgba(4, 5, 7, 0.92); }
.film-head { display: flex; align-items: center; gap: 20px; padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.film-head h2 { margin: 0 auto 0 0; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1; display: flex; align-items: baseline; gap: 14px; }
.film-head .explore { padding: 4px 0 2px; }
.film-close {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivory);
  background: transparent;
  border: 1px solid var(--rule-strong);
  padding: 8px 12px;
  cursor: pointer;
}
.film-close:hover { border-color: var(--ivory); }
.film-dialog video { width: 100%; max-height: calc(96vh - 60px); background: #000; aspect-ratio: 16 / 9; }
/* The vertical film on a phone held upright: as wide as the screen allows under the header. */
.film-dialog.is-portrait { width: min(96vw, calc((96vh - 60px) * 9 / 16)); }
.film-dialog.is-portrait video { aspect-ratio: 9 / 16; }
.film-dialog.is-portrait .film-head { flex-wrap: wrap; gap: 8px 16px; }

/* ---------- reveal (enhancement only) ---------- */

.is-pending { opacity: 0; transform: translateY(18px); }
.reveal { transition: opacity 1.1s cubic-bezier(0.2, 0.6, 0.2, 1), transform 1.1s cubic-bezier(0.2, 0.6, 0.2, 1); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .preview > video, .index a, .index .num { transition: none; }
  .is-pending { opacity: 1; transform: none; }
}

/* ---------- medium ---------- */

@media (max-width: 1100px) {
  .opening-text h1 { grid-column: 1 / -1; }
  .opening-side { grid-column: 1 / span 10; padding-top: 36px; }
  .keyref-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offset-grid { grid-template-columns: var(--gutter) minmax(0, 0.9fr) minmax(0, 1.4fr); }
}

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

@media (max-width: 899px) {
  .topnav { display: none; }
  .masthead { padding-block: 16px; }
  h1 em { padding-left: 0.3em; }
  .opening-side { grid-column: 1 / -1; }
  .hero-plate { aspect-ratio: 4 / 3.2; }

  .m-bleed .mhead, .m-bleed .cap { padding-left: var(--gutter); }
  .m-bleed .intro, .m-bleed .aside, .aside, .aside.right { grid-column: 1 / -1; }

  .offset-grid { display: block; }
  .offset-text { padding: 0 var(--gutter); }
  .offset-plate { margin-top: 12px; }
  .offset-plate .cap { padding-inline: var(--gutter); }

  .portrait-plate, .portrait-text { grid-column: 1 / -1; }
  .portrait-plate { margin-inline: calc(-1 * var(--gutter)); }
  .portrait-plate .cap { padding-inline: var(--gutter); }
  .portrait-plate > img { aspect-ratio: 4 / 4.6; }
  .portrait-text { padding-top: 40px; }

  .cinema-head .mhead, .cinema-head .intro { grid-column: 1 / -1; }
  .cinema-head .intro { margin-top: 28px; }
  .places-head .mhead, .places-head .intro { grid-column: 1 / -1; }
  .places-head .intro { margin-top: 28px; }
  .places { grid-template-columns: 1fr 1fr; }
  .place, .place:nth-child(-n + 2) { grid-column: auto; }
  .place:first-child { grid-column: 1 / -1; }
  .cinema { padding-inline: 0; }
  .cinema .cap { padding-inline: var(--gutter); }

  .pair-head { align-items: flex-start; text-align: left; }
  .pair { grid-template-columns: 1fr; padding-inline: 0; gap: 40px; }
  .pair .cap { padding-inline: var(--gutter); }

  .g-row > h3, .g-body, .g-figure.wide-row { grid-column: 1 / -1; }
  .g-split { grid-template-columns: 1fr; }
  .inspector-split { grid-template-columns: minmax(0, 1fr); }
  .inspector-crop { justify-self: start; }
  .looks { grid-template-columns: 1fr 1fr; }


  .foot-mark, .credits, .production { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .masthead .invite.small { font-size: 13px; padding: 0.45em 0.8em; }
  .wordmark { font-size: 12px; letter-spacing: 0.12em; }
  .looks { grid-template-columns: 1fr; }
  .places { grid-template-columns: 1fr; }
  .view-grid { grid-template-columns: 1fr 1fr; gap: 24px 14px; }
  .view-title { font-size: 18px; }
  .g-split .keys dl > div { grid-template-columns: 10.5em minmax(0, 1fr); }
  .tiers > div { grid-template-columns: 1fr; gap: 4px; }
  .inspector-parts > div { grid-template-columns: 1fr; gap: 2px; }
  .film-head { flex-wrap: wrap; gap: 10px 16px; }
  .readout > span { padding: 0 9px 0 13px; }
  .motion { right: 10px; bottom: 10px; }
  .actions.centre { justify-content: flex-start; }
}
