/* Landing: one sheet in the middle of a yellow ground, then chapters of flat colour. */
.front { min-height: 100svh; display: grid; place-items: center; padding: 18px 24px 22px; }
.sheet { position: relative; width: min(1200px, 100%); background: var(--straw); border: 2px solid var(--ink); border-radius: 4px;
  box-shadow: 0 2px 0 var(--ink), 0 18px 40px -18px rgba(28,21,12,.55); padding: 10px 22px 20px; transform-origin: 50% 0; }
.sheet::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--hair); pointer-events: none; }
html.js .sheet { animation: press 900ms var(--ease-long) both; }
@keyframes press { from { transform: perspective(1400px) rotateX(9deg) translateY(18px); opacity: 0; } }
.strip { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 8px 0 10px; }
.strip .left { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.strip .clock { font-size: 15px; font-weight: 600; white-space: nowrap; }
.strip .clock .num { font-size: 17px; font-weight: 700; }
.who-side span { font-size: 15px; }
.strip .right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.who-side { font-size: 15px; font-weight: 700; display: none; align-items: center; gap: 6px; }
.who-side.on { display: inline-flex; }
.plate-wrap { position: relative; margin: 6px 0 0; height: clamp(300px, calc(100svh - 386px), 600px); }
.plate-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.plate-cap { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 8px 4px 0; font-size: 15px; color: var(--ink-2); min-height: 32px; }
.plate-cap .latest { color: var(--ink); font-weight: 600; }
.plate-cap .latest b { font-family: var(--mono); }
.sign { position: absolute; top: 8%; left: 18%; transform-origin: 50% -26px; animation: swing 4.6s ease-in-out infinite; z-index: 2; }
.sign::before, .sign::after { content: ""; position: absolute; top: -26px; width: 2px; height: 28px; background: var(--ink); }
.sign::before { left: 18%; transform: rotate(14deg); } .sign::after { right: 18%; transform: rotate(-14deg); }
.sign span { display: block; padding: 6px 12px 7px; background: var(--straw); border: 2px solid var(--ink); outline: 1px solid var(--ink); outline-offset: -6px;
  font: 800 17px/1 var(--title); letter-spacing: .04em; white-space: nowrap; box-shadow: 0 3px 0 var(--ink); }
@keyframes swing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.head { display: grid; grid-template-columns: auto 1fr; gap: 8px clamp(20px, 3vw, 44px); align-items: end; padding: 14px 4px 0; border-top: 2px solid var(--ink); margin-top: 8px; }
.head h1 { margin: 0; font: 800 clamp(52px, 7.2vw, 108px)/.86 var(--title); letter-spacing: -.035em; }
.head h1 small { display: block; font: 700 15px/1 var(--mono); letter-spacing: 0; margin-top: 20px; color: var(--ink-2); }
.head .q { margin: 0 0 6px; font: 800 clamp(24px, 2.3vw, 34px)/1.08 var(--title); letter-spacing: -.01em; }
.head .lede { margin: 0 0 14px; max-width: 62ch; font-size: 17px; color: var(--ink-2); }
.ways { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.status { margin: 0 0 0 6px; font-size: 15px; line-height: 1.35; color: var(--ink-2); max-width: 25ch; }
.status b { color: var(--ink); }
html.js .rise { opacity: 0; transform: translateY(14px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
html.js .rise.in { opacity: 1; transform: none; }

/* chapters: each a flat colour, floor to ceiling, held together by one type and one grid */
.ch { position: relative; padding: clamp(64px, 9vw, 128px) clamp(16px, 5vw, 72px); }
.ch.sun { background: var(--sun); } .ch.straw { background: var(--straw); } .ch.ochre { background: var(--ochre); }
/* on the deep ochre band the second and faint text roles take the full ink, so small text keeps 4.5:1 */
.ch.ochre { --ink-2: var(--ink); --ink-3: #2a1f12; }
.ch.ink { background: var(--ink); color: var(--straw); }
.ch .crenel.top { position: absolute; left: 0; right: 0; top: -1px; }
.ch h2 { margin: 0 0 18px; font: 800 clamp(36px, 5vw, 76px)/.95 var(--title); letter-spacing: -.03em; max-width: 16ch; }
.ch .lead { font-size: clamp(17px, 1.3vw, 20px); max-width: 52ch; margin: 0 0 28px; }
.wrap { max-width: 1240px; margin: 0 auto; }

/* the land: a type screen hands over to one great plate */
.land { height: 260vh; padding: 0; background: var(--sun); }
.land .stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.land .type { position: absolute; top: 10vh; left: 0; right: 0; text-align: center; padding: 0 16px; }
.land .type h2 { margin: 0 auto; max-width: 18ch; }
.land .window { position: relative; width: 100%; height: 100%; clip-path: inset(var(--it, 30%) var(--is, 27.5%) var(--ib, 12%) var(--is, 27.5%) round var(--rad, 14px)); }
.land .window canvas { width: 100%; height: 100%; display: block; }
.land .note { position: absolute; left: 50%; bottom: 3vh; transform: translateX(-50%); background: var(--straw); border: 2px solid var(--ink); border-radius: 12px;
  padding: 10px 16px; font-size: 15px; width: max-content; max-width: calc(100vw - 32px); box-shadow: 0 4px 0 var(--ink); opacity: var(--noteo, 0); }
.land .note b { font-family: var(--mono); }

/* how a night is decided: split, drag through the stages, the wall comes apart as you scroll */
.how { height: 320vh; padding: 0; }
.how .stage { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: 1fr 1.1fr; gap: 4vw; align-items: center; padding: 0 clamp(16px, 5vw, 72px); }
.how .steps { position: relative; }
.how .step { display: none; }
.how .step.on { display: block; animation: fold 520ms var(--ease) both; }
@keyframes fold { from { transform: perspective(900px) rotateX(-24deg); transform-origin: 50% 0; opacity: 0; } }
.how .step h3 { margin: 0 0 12px; font: 800 clamp(30px, 3.4vw, 54px)/1 var(--title); letter-spacing: -.02em; max-width: 14ch; }
.how .step p { margin: 0; max-width: 44ch; font-size: 18px; }
.how .step .num { font-weight: 700; }
.drag { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.drag input { -webkit-appearance: none; appearance: none; width: min(320px, 60vw); height: 6px; background: var(--ink); border-radius: 3px; }
.drag input::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; border-radius: 8px; background: var(--straw); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); cursor: grab; }
.drag input::-moz-range-thumb { width: 30px; height: 30px; border-radius: 8px; background: var(--straw); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); cursor: grab; }
.drag span { font-weight: 700; font-family: var(--mono); }
.how canvas { width: 100%; height: min(78svh, 640px); display: block; }

/* poster-scale capabilities */
.posters { display: grid; gap: 6vh; }
.poster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: 24px; align-items: end; border-top: 2px solid currentColor; padding-top: 18px; }
.poster p:first-child { margin: 0; font: 800 clamp(30px, 4.6vw, 70px)/.98 var(--title); letter-spacing: -.025em; }
.poster p:last-child { margin: 0; font-size: 17px; opacity: .86; }

/* figures in tiles around one plate */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(150px, auto); gap: 12px; }
.mosaic .ph { grid-column: span 2; grid-row: span 2; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--straw); min-height: 320px; position: relative; }
.mosaic .ph canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fig { border: 2px solid var(--ink); border-radius: 6px; padding: 16px; background: var(--straw); display: flex; flex-direction: column; justify-content: space-between; }
.fig .n { font: 700 clamp(40px, 4.4vw, 68px)/1 var(--mono); letter-spacing: -.04em; }
.fig p { margin: 8px 0 0; font-size: 16px; }

/* proof: large marks on tiles, every one computed in this browser */
.proof { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.proof .tile { border: 2px solid var(--ink); border-radius: 6px; padding: 18px; min-height: 260px; display: flex; flex-direction: column; gap: 10px; background: var(--straw); }
.proof .big { font: 800 84px/1 var(--title); }
.proof h3 { margin: 0; font: 800 22px/1.1 var(--title); }
.proof p { margin: 0; font-size: 16px; color: var(--ink-2); }
.proof .val { font: 700 15px/1.4 var(--mono); word-break: break-all; color: var(--ink); }

/* questions as filled tiles that open */
.faq { display: grid; gap: 10px; max-width: 980px; }
.faq details { border: 2px solid var(--ink); border-radius: 10px; background: var(--fillc, var(--straw)); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font: 800 clamp(20px, 2vw, 28px)/1.15 var(--title); display: flex; justify-content: space-between; gap: 16px; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); }
.faq details[open] summary::after { content: "−"; }
.faq .a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 260ms cubic-bezier(.215,.61,.355,1); }
.faq details[open] .a { grid-template-rows: 1fr; }
.faq .a > div { overflow: hidden; }
.faq .a p { margin: 0; padding: 0 20px 20px; max-width: 64ch; font-size: 17px; }

/* the action tile */
.acts { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.act { display: flex; flex-direction: column; justify-content: space-between; gap: 30px; min-height: 260px; padding: 24px; border: 2px solid var(--ink); border-radius: 10px;
  text-decoration: none; background: var(--straw); color: var(--ink); box-shadow: 0 6px 0 var(--ink); transition: transform var(--press), box-shadow var(--press), background-color 180ms var(--ease); }
.act:hover { background: #fff6d2; }
.act:active { transform: translateY(4px) scale(.99); box-shadow: 0 2px 0 var(--ink); }
.act b { font: 800 clamp(34px, 4vw, 60px)/1 var(--title); letter-spacing: -.02em; }
.act span { font-size: 17px; }

/* footer: the mark, built large */
.foot { background: var(--ink); color: var(--straw); overflow: hidden; padding: 56px clamp(16px, 5vw, 72px) 28px; }
.foot .big { width: 118%; margin-left: -9%; color: var(--sun); display: block; }
.foot .big svg { width: 100%; height: auto; display: block; }
.foot .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 30px; margin-top: 18px; font-size: 15px; }
.foot a { color: var(--straw); }
.foot nav { display: flex; gap: 6px 22px; flex-wrap: wrap; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 900px) {
  .front { padding: 10px 10px 16px; }
  .sheet { padding: 8px 12px 16px; }
  .strip { grid-template-columns: 1fr auto; }
  .strip .clock { grid-column: 1 / -1; grid-row: 2; }
  .strip .left .ed { display: none; }
  .plate-wrap { height: 46svh; min-height: 260px; }
  .sign { left: 16%; } .sign span { font-size: 15px; }
  .head { grid-template-columns: 1fr; align-items: start; }
  .status { margin: 4px 0 0; }
  .how { height: auto; } .how .stage { position: relative; height: auto; grid-template-columns: 1fr; padding: 64px 16px; }
  .how .step { display: block; margin-bottom: 26px; animation: none; } .drag { display: none; }
  .how canvas { height: 56svh; }
  .poster, .acts { grid-template-columns: 1fr; }
  .mosaic, .proof { grid-template-columns: 1fr 1fr; }
  .plate-cap { flex-direction: column; gap: 4px; }
}
@media (max-width: 520px) { .mosaic, .proof { grid-template-columns: 1fr; } .mosaic .ph { grid-column: auto; } .land .type { top: 7vh; } }
@media (prefers-reduced-motion: reduce) { .sign { animation: none; } html.js .rise { opacity: 1; transform: none; } }
