/* ============================================================
   THE SIMULATION SOCIETY :: a broadsheet from the future
   Aged paper on a dark desk. Pages flip as you scroll.
   Design canvas: 1240 x 840, scaled to fit the viewport.
   ============================================================ */

:root {
  --desk: #1b1712;
  --paper: #ece2ca;
  --paper-deep: #e3d7ba;
  --paper-edge: #d8caa8;
  --ink: #1d1912;
  --ink-soft: #4c453a;
  --ink-faint: #6a6252; /* AA contrast on the paper */
  --rule: rgba(29, 25, 18, 0.55);
  --rule-soft: rgba(29, 25, 18, 0.22);
  --red: #a5301c;

  --blackletter: "UnifrakturMaguntia", serif;
  --display: "Playfair Display", "Times New Roman", serif;
  --text: "Newsreader", georgia, serif;
  --mono: "IBM Plex Mono", monospace;

  --s: 1; /* page scale, set by JS */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(120% 90% at 50% 0%, #262019 0%, var(--desk) 55%, #120f0b 100%);
  color: var(--ink);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--red); color: var(--paper); }

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ============================================================
   DESK CHROME
   ============================================================ */
.chrome {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.4rem;
  pointer-events: none;
}
.chrome > * { pointer-events: auto; }

.chrome-cta {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  border: 1px solid rgba(236, 226, 202, 0.4);
  border-radius: 2px;
  padding: 0.55em 1.1em;
  background: rgba(165, 48, 28, 0.85);
  transition: background 0.25s, transform 0.3s;
}
.chrome-cta:hover { background: var(--red); transform: translateY(-1px); }

/* ============================================================
   BOOK + FLIP MECHANICS
   ============================================================ */
.book { position: relative; }

.book-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.perspective {
  position: relative;
  width: calc(1240px * var(--s));
  height: calc(840px * var(--s));
  perspective: 2800px;
  perspective-origin: 50% 50%;
}

.sheet {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform-style: preserve-3d;
  will-change: transform;
}

.page-front, .page-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  background:
    radial-gradient(140% 120% at 30% 20%, var(--paper) 0%, var(--paper-deep) 70%, var(--paper-edge) 100%);
  box-shadow:
    0 1px 0 rgba(255, 250, 235, 0.35) inset,
    0 30px 70px -30px rgba(0, 0, 0, 0.8),
    0 4px 14px rgba(0, 0, 0, 0.35);
}
/* paper mottling */
.page-front::before, .page-back::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.5 0 0 0 0 0.4 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* flip shading, driven by --shade from JS */
.page-front::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(0,0,0,0.55), rgba(0,0,0,0) 55%);
  opacity: var(--shade, 0);
}

.page-back { transform: rotateY(180deg); }
.back-inner {
  display: grid;
  place-items: center;
}
.back-inner span {
  font-family: var(--display);
  font-size: 200px;
  color: rgba(29, 25, 18, 0.06);
}

.page-inner {
  width: 1240px;
  height: 840px;
  transform: scale(var(--s));
  transform-origin: top left;
  padding: 44px 56px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ============================================================
   SHARED NEWSPAPER PIECES
   ============================================================ */
.page-foot {
  margin-top: auto;
  border-top: 1px solid var(--rule-soft);
  padding-top: 10px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.section-masthead {
  text-align: center;
  border-bottom: 3px double var(--rule);
  padding-bottom: 12px;
  margin-bottom: 22px;
}
.page-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
}
.section-title {
  font-family: var(--blackletter);
  font-weight: 400;
  font-size: 58px;
  line-height: 1.05;
  margin: 4px 0 6px;
}
.wire-line {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

.story-head {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.15;
  margin-bottom: 6px;
  text-wrap: balance;
}
.byline {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.story p {
  font-size: 15.5px;
  line-height: 1.5;
  text-align: justify;
  hyphens: auto;
  margin-bottom: 9px;
  color: var(--ink);
}
.story p sup { font-size: 0.65em; color: var(--red); }
.jumpline {
  font-family: var(--mono);
  font-size: 10.5px !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint) !important;
  text-align: left !important;
}

/* ============================================================
   PAGE 1 · FRONT PAGE
   ============================================================ */
.masthead-zone {
  display: grid;
  grid-template-columns: 130px 1fr 130px;
  align-items: center;
  gap: 16px;
}
.ear {
  border: 1px solid var(--rule);
  padding: 8px 6px;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
}
.ear-small {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 5px;
}
.masthead { text-align: center; }
.masthead-over {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2px;
}
.masthead h1 {
  font-family: var(--blackletter);
  font-weight: 400;
  font-size: 76px;
  line-height: 1;
  letter-spacing: 0.01em;
}

.dateline {
  display: flex;
  justify-content: space-between;
  border-top: 2px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 12px;
  padding: 5px 2px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.headline-zone {
  position: relative;
  text-align: center;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: 18px;
}
.banner-headline, .section-title, .subscribe-headline, .ledger-headline, .masthead h1 {
  text-shadow: 0 1px 0 rgba(255, 252, 240, 0.35);
}
.banner-headline {
  font-family: var(--display);
  font-weight: 900;
  font-size: 56px;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.deck {
  font-family: var(--text);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 780px;
  margin: 6px auto 0;
}

.stamp {
  position: absolute;
  top: 6px;
  right: 10px;
  transform: rotate(8deg);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.22em;
  color: var(--red);
  border: 2.5px solid var(--red);
  border-radius: 3px;
  padding: 6px 12px;
  opacity: 0;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0.28'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

.front-columns {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
}
.front-columns > * { padding: 0 20px; }
.front-columns > *:first-child { padding-left: 0; }
.front-columns > *:last-child { padding-right: 0; }
.front-columns > * + * { border-left: 1px solid var(--rule-soft); }

.byline + p::first-letter,
.method-columns .story p:first-of-type::first-letter {
  font-family: var(--display);
  font-weight: 700;
  font-size: 46px;
  line-height: 0.85;
  float: left;
  padding: 4px 7px 0 0;
}

.press-photo { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.city-figure {
  position: relative;
  /* the diorama takes every pixel the column can spare, then some:
     no frame, no box. The city is a 3D model standing on the paper. */
  flex: 1;
  min-height: 236px;
  overflow: visible;
  perspective: 900px;
}
#city-canvas {
  display: block;
  width: 100%;
  filter: sepia(0.45) saturate(0.55) contrast(1.04) brightness(0.98);
}
.press-photo figcaption {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft);
  padding-top: 8px;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 8px;
}
.press-photo figcaption em { color: var(--ink-faint); }

.index-box {
  border: 1px solid var(--rule);
  padding: 10px 12px;
  margin-top: 10px;
}
.index-box h4 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 6px;
  margin-bottom: 6px;
}
.index-box ol { list-style: none; }
.index-box li {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 2.5px 0;
}
.index-box li span:last-child { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }

/* ============================================================
   PAGE 2 · OUTCOMES LEDGER
   ============================================================ */
.ledger-headline {
  font-family: var(--display);
  font-weight: 900;
  font-size: 40px;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.ledger {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  flex: 1;
  min-height: 0;
}
.ledger-col { padding: 0 22px; }
.ledger-col:first-child { padding-left: 0; }
.ledger-col:last-child { padding-right: 0; }
.ledger-col + .ledger-col { border-left: 1px solid var(--rule-soft); }

.ledger-grade {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 3px double var(--rule);
}
.grade-high { color: var(--red); }
.grade-mid, .grade-med { color: var(--ink-soft); }

.ledger-cohort {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.ledger-col h4 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 14px;
  min-height: 72px;
  text-wrap: balance;
}

.bars { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.bars li {
  display: grid;
  grid-template-columns: 1fr 46px;
  grid-template-areas: "label pct" "bar pct";
  column-gap: 10px;
  row-gap: 4px;
  align-items: center;
}
.bar-label { grid-area: label; font-size: 13.5px; color: var(--ink-soft); }
.bars b {
  grid-area: pct;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bar {
  grid-area: bar;
  height: 7px;
  background: repeating-linear-gradient(90deg, var(--rule-soft) 0 1px, transparent 1px 5px);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.bars li:first-of-type .bar i { background: var(--red); }
.run .bar i { transform: scaleX(1); }

.ledger-note {
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule-soft);
  margin-top: 14px;
  padding-top: 8px;
}

/* ============================================================
   PAGE 3 · METHOD
   ============================================================ */
.pull-quote {
  font-family: var(--display);
  font-weight: 700;
  font-style: italic;
  font-size: 34px;
  text-align: center;
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: 22px;
}

.method-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  flex: 1;
  min-height: 0;
}
.method-columns .story { padding: 0 18px; }
.method-columns .story:first-child { padding-left: 0; }
.method-columns .story:last-child { padding-right: 0; }
.method-columns .story + .story { border-left: 1px solid var(--rule-soft); }

.footnotes {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  text-transform: none;
  letter-spacing: 0.02em;
  font-family: var(--text);
  font-style: italic;
  font-size: 12.5px;
  text-align: left;
}

/* ============================================================
   PAGE 4 · ADVERTISEMENTS
   ============================================================ */
.ads-zone {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 26px;
  flex: 1;
  min-height: 0;
}

.ads-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
}
.advert {
  border: 3px double var(--rule);
  padding: 16px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  transition: background 0.25s;
}
.advert:hover { background: rgba(165, 48, 28, 0.05); }
.advert h3 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.advert-shout {
  font-family: var(--display);
  font-weight: 900;
  font-size: 22px;
  line-height: 1.08;
  text-wrap: balance;
}
.advert:hover .advert-shout { color: var(--red); }
.advert > p:not(.advert-shout):not(.advert-cta) {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-soft);
}
.advert-cta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.editions {
  border-left: 1px solid var(--rule-soft);
  padding-left: 24px;
  display: flex;
  flex-direction: column;
}
.editions h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  border-bottom: 3px double var(--rule);
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.editions ul { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.editions li { display: flex; flex-direction: column; gap: 3px; }
.editions b {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--red);
}
.editions span { font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); }

/* ============================================================
   PAGE 5 · BACK PAGE
   ============================================================ */
.back-page {
  text-align: center;
  justify-content: center;
  gap: 26px;
}

.circulation {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
  padding: 10px 0;
}
.circulation b { color: var(--red); font-weight: 500; font-variant-numeric: tabular-nums; }

.subscribe-headline {
  font-family: var(--display);
  font-weight: 900;
  font-size: 96px;
  line-height: 0.95;
  text-transform: uppercase;
}
.subscribe-headline em { font-style: italic; text-transform: none; color: var(--red); }

.subscribe-deck {
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto;
}

.coupon {
  position: relative;
  border: 2px dashed var(--ink-soft);
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
  padding: 26px 30px 30px;
}
.coupon-scissors {
  position: absolute;
  top: -13px;
  left: 34px;
  background: var(--paper);
  padding: 0 8px;
  font-size: 18px;
  color: var(--ink-soft);
}
.coupon-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.coupon-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.coupon-form input {
  font-family: var(--mono);
  font-size: 14px;
  padding: 0.8em 1.2em;
  border: 1px solid var(--ink-soft);
  border-radius: 2px;
  background: rgba(255, 252, 244, 0.6);
  color: var(--ink);
  flex: 1 1 240px;
  min-width: 0;
  max-width: 320px;
}
.coupon-form input:focus { outline: none; border-color: var(--red); }
.coupon-form button {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8em 1.6em;
  border: 1px solid var(--red);
  border-radius: 2px;
  background: var(--red);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.25s, transform 0.3s;
}
.coupon-form button:hover { background: #7f2312; transform: translateY(-1px); }

.colophon { font-size: 13px; color: var(--ink-faint); display: flex; flex-direction: column; gap: 2px; }

/* ============================================================
   MOBILE + REDUCED MOTION: plain stacked pages, no flip
   ============================================================ */
@media (max-width: 899px), (prefers-reduced-motion: reduce) {
  .book { height: auto !important; }
  .book-pin { position: static; height: auto; overflow: visible; display: block; }
  .perspective { width: auto; height: auto; perspective: none; }
  /* clear the fixed chrome (sound switch + request access) */
  .sheet { position: static; transform: none; margin: 14px 10px; }
  .sheet:first-of-type { margin-top: 58px; }
  .page-back { display: none; }
  .page-front { position: static; }
  .page-front::after { display: none; }
  .page-inner {
    width: auto;
    height: auto;
    min-height: 0;
    transform: none;
    padding: 26px 20px;
  }
  .masthead h1 { font-size: clamp(38px, 11vw, 72px); }
  .masthead-zone { grid-template-columns: 1fr; }
  .ear { display: none; }
  .banner-headline { font-size: clamp(30px, 8vw, 54px); }
  .front-columns, .ledger, .method-columns, .ads-zone, .ads-grid { grid-template-columns: 1fr; }
  .mid-col .city-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  /* on the stacked edition the plate stays inside its column but
     keeps its depth: it leans with the reader's scroll */
  .city-figure .city-stage { inset: 0; transform: rotateX(var(--mtilt, 5deg)); transition: none; }
  .front-columns > *, .ledger-col, .method-columns .story { padding: 14px 0; border-left: none !important; }
  .front-columns > * + *, .ledger-col + .ledger-col, .method-columns .story + .story { border-top: 1px solid var(--rule-soft); }
  .ledger-col h4 { min-height: 0; }
  .dateline { flex-direction: column; gap: 2px; text-align: center; }
  .subscribe-headline { font-size: clamp(44px, 13vw, 84px); }
  .editions { border-left: none; padding-left: 0; border-top: 1px solid var(--rule-soft); padding-top: 16px; }
  .footnotes { flex-direction: column; gap: 4px; }
  .page-foot { margin-top: 20px; }
  .run .bar i, .bar i { transform: scaleX(1); }
}


/* ============================================================
   GOING TO PRESS :: entrance sequence
   ============================================================ */
body.loading { overflow: hidden; }

.press-loader {
  position: fixed;
  inset: 0;
  z-index: 400;
  background:
    radial-gradient(120% 90% at 50% 0%, #262019 0%, var(--desk) 55%, #120f0b 100%);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 40px;
  transition: transform 0.75s cubic-bezier(0.7, 0, 0.2, 1), opacity 0.4s ease 0.5s;
}
.press-loader.done { transform: translateY(-100%); opacity: 0; pointer-events: none; }

.press-lines {
  width: min(560px, 84vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.press-lines p {
  display: flex;
  align-items: baseline;
  gap: 0.8em;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: rgba(236, 226, 202, 0.72);
  opacity: 0;
  animation: pressLine 0.4s ease forwards;
}
.press-lines .dots { flex: 1; border-bottom: 1px dotted rgba(236, 226, 202, 0.3); }
.press-lines .pl-1 { animation-delay: 0.1s; }
.press-lines .pl-2 { animation-delay: 0.45s; }
.press-lines .pl-3 { animation-delay: 0.8s; }
.press-lines .pl-4 { animation-delay: 1.15s; color: var(--paper); }
@keyframes pressLine { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.press-name {
  font-family: var(--blackletter);
  font-size: clamp(34px, 5vw, 58px);
  color: var(--paper);
  opacity: 0;
  animation: pressName 0.7s cubic-bezier(0.16, 1, 0.3, 1) 1.3s forwards;
}
@keyframes pressName { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

/* stamp slam once the paper is on the desk */
body.pressed .stamp { animation: stampIn 0.45s cubic-bezier(0.2, 1.7, 0.5, 1) 0.4s forwards; }
@keyframes stampIn {
  0%   { opacity: 0; transform: rotate(4deg) scale(2.6); }
  55%  { opacity: 0.92; transform: rotate(9deg) scale(0.93); }
  100% { opacity: 0.85; transform: rotate(8deg) scale(1); }
}

/* content settles in as a page arrives */
body.flip-on.pressed .sheet.arrived .page-inner > * {
  animation: settleIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
body.flip-on.pressed .sheet.arrived .page-inner > *:nth-child(2) { animation-delay: 0.06s; }
body.flip-on.pressed .sheet.arrived .page-inner > *:nth-child(3) { animation-delay: 0.12s; }
body.flip-on.pressed .sheet.arrived .page-inner > *:nth-child(4) { animation-delay: 0.18s; }
body.flip-on.pressed .sheet.arrived .page-inner > *:nth-child(5) { animation-delay: 0.24s; }
body.flip-on.pressed .sheet.arrived .page-inner > *:nth-child(6) { animation-delay: 0.3s; }
@keyframes settleIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   PHYSICALITY :: cast shadow, paper stack, desk dressing
   ============================================================ */
.cast {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0) 60%);
  opacity: var(--cast, 0);
}

/* the rest of the paper beneath the open sheet */
body.flip-on .perspective::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translate(6px, 8px);
  background: var(--paper-edge);
  box-shadow:
    3px 3px 0 #c9bb98,
    6px 7px 0 #bcae8b,
    0 34px 60px -18px rgba(0, 0, 0, 0.8);
}

/* ============================================================
   CHALK MURALS :: two tall blackboards lean against the desk,
   one story per page. Real framed boards, no blend-mode tricks,
   so Safari and Chrome render them identically.
   ============================================================ */
.desk-mural {
  position: fixed;
  top: 18px;
  bottom: 18px;
  width: calc(var(--mural-w, 0px) - 26px);
  z-index: 1;
  pointer-events: none;
  display: none;
  background: #060504;
  border: 1px solid rgba(236, 226, 202, 0.14);
  border-radius: 3px;
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.85),
    0 18px 50px -18px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
/* chalk tray shadow at the boards' feet */
.desk-mural::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}
body.flip-on.pressed .desk-mural { display: block; }
body.murals-hidden .desk-mural { display: none; }
.desk-mural-left { left: 14px; }
.desk-mural-right { right: 14px; }
.desk-mural video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* cover: the murals fill the whole board, large and present.
     Clips are pre-cropped to their action column so little is lost. */
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.7s ease;
  filter: brightness(0.95);
}
.desk-mural video.on { opacity: 0.95; }
@media (prefers-reduced-motion: reduce) { .desk-mural { display: none !important; } }

/* ============================================================
   TURN ZONES :: click the desk margins to turn
   ============================================================ */
.turn-zone {
  position: fixed;
  top: 0;
  height: 100vh;
  width: clamp(48px, 6vw, 110px);
  z-index: 150;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(236, 226, 202, 0);
  font-family: var(--display);
  font-size: 46px;
  transition: color 0.3s;
  display: none;
}
body.flip-on .turn-zone { display: block; }
.turn-prev { left: 0; }
.turn-next { right: 0; }
.turn-zone:hover { color: rgba(236, 226, 202, 0.6); }
.turn-zone:focus-visible { color: rgba(236, 226, 202, 0.6); outline-offset: -6px; }

[data-page-jump] { cursor: pointer; }

/* jury-proofing: loader off, physics off where they do not belong */
/* the presses roll on every device; only reduced-motion skips the show */
@media (prefers-reduced-motion: reduce) {
  .press-loader { display: none; }
  body.loading { overflow: auto; }
  .stamp { opacity: 0.85; }
  body.pressed .stamp { animation: none; }
}


/* ============================================================
   DENSITY :: sentiment glance, sparklines, wire, pipeline, notices
   ============================================================ */
.mid-col { display: flex; flex-direction: column; }

.glance {
  border: 1px solid var(--rule);
  padding: 8px 12px 10px;
  margin-top: 10px;
}
.glance h4 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 5px;
  margin-bottom: 6px;
}
.glance ul { list-style: none; }
.glance li {
  display: flex;
  align-items: baseline;
  gap: 0.7em;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 2px 0;
  color: var(--ink-soft);
}
.glance li i { flex: 1; border-bottom: 1px dotted var(--rule-soft); }
.glance b { font-weight: 500; }
.glance .up { color: var(--ink); }
.glance .dn { color: var(--red); }

.spark {
  width: 100%;
  height: 46px;
  margin-top: 12px;
}
.spark line { stroke: var(--rule-soft); stroke-width: 1; }
.spark polyline {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}
.run .spark polyline { animation: sparkDraw 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards; }
@keyframes sparkDraw { to { stroke-dashoffset: 0; } }
.spark-cap {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  margin-top: 4px;
}

.wire-ticker {
  border-top: 3px double var(--rule);
  border-bottom: 1px solid var(--rule-soft);
  overflow: hidden;
  padding: 7px 0;
  margin-top: 16px;
  /* the max-content track must never stretch the page (stacked mode) */
  contain: inline-size;
}
.wire-track {
  display: flex;
  gap: 2.2rem;
  width: max-content;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  animation: wire 30s linear infinite;
}
.wire-track i { font-style: normal; color: var(--red); }
@keyframes wire { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.pipeline { margin-top: 4px; }
.pipeline-cap {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  text-align: center;
  margin-bottom: 8px;
}
.pipeline svg { width: 100%; height: auto; display: block; }
.pl-box rect { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.pl-box-red rect { stroke: var(--red); stroke-width: 2; }
.pl-box text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  fill: var(--ink);
}
.pl-box-red text { fill: var(--red); }
.pl-box .pl-sub { font-size: 9px; fill: var(--ink-faint); letter-spacing: 0.04em; }
.pl-box-red .pl-sub { fill: var(--red); opacity: 0.75; }
.pl-arrow { fill: none; stroke: var(--ink-soft); stroke-width: 1.4; }

.notices {
  margin-top: auto;
  border: 1px solid var(--rule-soft);
  padding: 10px 12px;
}
.notices h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.notices p {
  font-style: italic;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ============================================================
   EDITOR'S RED PENCIL :: hover marks
   ============================================================ */
.index-box li { position: relative; }
.index-box li::after {
  content: "";
  position: absolute;
  inset: -3px -8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 40' preserveAspectRatio='none'%3E%3Cellipse cx='110' cy='20' rx='106' ry='15' fill='none' stroke='%23a5301c' stroke-width='2.5' stroke-linecap='round' transform='rotate(-1 110 20)'/%3E%3Cellipse cx='110' cy='21' rx='104' ry='13' fill='none' stroke='%23a5301c' stroke-width='1.4' opacity='0.5' transform='rotate(1.2 110 20)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  opacity: 0;
  transform: scale(1.08) rotate(-0.5deg);
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.index-box li:hover::after { opacity: 0.85; transform: scale(1); }

.jumpline { position: relative; display: inline-block; }
.jumpline:hover { color: var(--red) !important; }

/* ============================================================
   SOUND TOGGLE
   ============================================================ */
.chrome-left { display: inline-flex; align-items: center; gap: 0.6rem; }
/* sound: a real switch, bare on the desk */
.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 7px 4px;
  cursor: pointer;
}
.st-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(236, 226, 202, 0.55);
  transition: color 0.25s;
}
.st-track {
  position: relative;
  width: 30px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(236, 226, 202, 0.4);
  transition: background 0.25s, border-color 0.25s;
}
.st-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(236, 226, 202, 0.8);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s;
}
.sound-toggle.on .st-track { background: var(--red); border-color: var(--red); }
.sound-toggle.on .st-knob { transform: translateX(14px); background: #fff; }
.sound-toggle.on .st-label { color: rgba(236, 226, 202, 0.95); }
.sound-toggle:hover .st-label { color: rgba(236, 226, 202, 0.95); }
/* the sound switch rides along on mobile too */


/* ============================================================
   ASK THE SOCIETY :: the visitor runs the simulation
   ============================================================ */
.ballot {
  border: 2px solid var(--ink);
  padding: 9px 12px 10px;
  margin-top: 10px;
}
.ballot h4 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.ballot-live {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--red);
  animation: liveBlink 1.6s steps(2, start) infinite;
}
@keyframes liveBlink { 50% { opacity: 0.25; } }

.ballot-options { display: flex; gap: 6px; }
.ballot-options button {
  flex: 1;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.3;
  padding: 7px 6px;
  background: none;
  border: 1px solid var(--ink-soft);
  border-radius: 2px;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.25s;
}
.ballot-options button:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
  transform: translateY(-1px);
}
.ballot.polling .ballot-options button {
  opacity: 0.4;
  pointer-events: none;
  transform: none;
}
.ballot-options button.chosen {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  opacity: 1 !important;
}

.ballot-status {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
  margin-top: 8px;
  min-height: 2.4em;
  text-transform: uppercase;
}
.ballot-status b { color: var(--red); font-weight: 500; }

@media (max-width: 899px) {
  .ballot-options { flex-direction: column; }
}


/* ============================================================
   MOVING PARTS :: pipeline pulse, live counter, masthead chars
   ============================================================ */
.pl-pulse {
  fill: var(--red);
  opacity: 0.85;
}
@media (prefers-reduced-motion: reduce) { .pl-pulse { display: none; } }

#reader-count {
  font-weight: 500;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.masthead h1 .char {
  display: inline-block;
  white-space: pre;
  will-change: transform;
}


/* ============================================================
   CITY INSTANCES :: tabs and dateline
   ============================================================ */
.city-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 7px;
}
.city-tabs button {
  flex: 1;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 4px;
  background: none;
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.city-tabs button:hover { color: var(--ink); border-color: var(--ink-soft); }
.city-tabs button.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

#dateline-city { font-weight: 500; }

/* ============================================================
   PAGE 4 :: THE ROTOGRAVURE SECTION
   Ten standing simulations as animated press engravings.
   ============================================================ */
.roto-zone {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 28px;
  flex: 1;
  min-height: 0;
}

.roto-figure {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.roto-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
  overflow: hidden;
}
.roto-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* printed into the paper, not pasted onto it */
  mix-blend-mode: multiply;
  filter: contrast(1.04) saturate(0.92);
  opacity: 1;
  transition: opacity 0.3s ease;
}
.roto-frame.switching video { opacity: 0; }
.roto-plate {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 3px 8px;
}

.roto-caption {
  padding-top: 10px;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.roto-caption b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.roto-caption b::after { content: ". "; }
.roto-caption em { color: var(--ink-faint); }

.roto-index {
  border-left: 1px solid var(--rule-soft);
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.roto-index h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  border-bottom: 3px double var(--rule);
  padding-bottom: 8px;
  margin-bottom: 6px;
}
#roto-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#roto-list li { border-bottom: 1px solid var(--rule-soft); }
#roto-list button {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: baseline;
  gap: 2px 10px;
  padding: 7px 2px 8px;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: background 0.2s;
}
#roto-list button:hover { background: rgba(165, 48, 28, 0.05); }
#roto-list .roto-no {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  transition: color 0.2s;
}
#roto-list .roto-desk {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.15;
  transition: color 0.2s;
}
#roto-list .roto-tease {
  grid-column: 2;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--ink-faint);
  font-style: italic;
}
#roto-list li.on .roto-no { color: var(--red); }
#roto-list li.on .roto-desk { color: var(--red); }
#roto-list li.on button { background: rgba(165, 48, 28, 0.05); }
/* the auto-rotation burns along the active row like a fuse */
#roto-list li.on button::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 0;
  background: var(--red);
}
#roto-list.auto li.on button::after { animation: roto-fuse 7s linear forwards; }
@keyframes roto-fuse { from { width: 0; } to { width: 100%; } }

.roto-note {
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.5;
}

@media (max-width: 899px) {
  .roto-zone { grid-template-columns: 1fr; }
  .roto-frame { flex: none; aspect-ratio: 4 / 3; }
  .roto-index { border-left: none; padding-left: 0; border-top: 1px solid var(--rule-soft); padding-top: 16px; }
  .roto-note { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  #roto-list.auto li.on button::after { animation: none; }
}

/* ============================================================
   THE CITY DIORAMA :: pixel city press photo + live bubbles
   ============================================================ */
.city-stage {
  position: absolute;
  /* the plate breaks out of its column slot, but never onto the caption */
  inset: -5% -9% 0 -9%;
  transform-style: preserve-3d;
  transform: rotateX(var(--tiltx, 6deg)) rotateY(var(--tilty, 0deg));
  transition: transform 0.35s ease-out;
  will-change: transform;
}
.city-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* contain: the whole floating slab is always in view */
  object-fit: contain;
  mix-blend-mode: multiply; /* printed into the paper */
  /* feather the frame edges so the video's cream backing melts
     into the page instead of reading as a rectangle */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 8%, #000 92%, transparent 100%);
  mask-composite: intersect;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.city-stage.switching video { opacity: 0; }

.city-bubbles { position: absolute; inset: 0; overflow: hidden; }
.cbub {
  position: absolute;
  transform: translate(-50%, -100%);
  background: #fffdf6;
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  padding: 3px 7px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(29, 25, 18, 0.22);
  animation: bub-pop 2.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.cbub::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 8px;
  height: 8px;
  background: inherit;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: translateX(-50%) rotate(45deg);
}
.cbub b { color: var(--red); font-weight: 500; }
@keyframes bub-pop {
  0% { opacity: 0; transform: translate(-50%, -88%) scale(0.4); }
  8% { opacity: 1; transform: translate(-50%, -100%) scale(1.07); }
  13% { transform: translate(-50%, -100%) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -114%) scale(0.96); }
}
@media (prefers-reduced-motion: reduce) { .cbub { animation-duration: 0.01s; display: none; } }


/* ============================================================
   RESERVED :: submitting the coupon stamps the paper
   ============================================================ */
.coupon { position: relative; }
.coupon.reserved .coupon-form { opacity: 0.3; pointer-events: none; }
.coupon.reserved::after {
  content: "RESERVED";
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%) rotate(-7deg);
  font-family: var(--mono);
  font-size: 34px;
  letter-spacing: 0.3em;
  padding: 8px 20px 8px 26px;
  color: var(--red);
  border: 3px double var(--red);
  animation: stamp-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  pointer-events: none;
}
@keyframes stamp-in {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-7deg) scale(1.7); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(-7deg) scale(1); }
}

/* ============================================================
   STACKED EDITION :: chalk dividers between sheets on mobile
   ============================================================ */
.chalk-divider { display: none; }
@media (max-width: 899px) {
  /* a blackboard rests between the sheets, the full chalk scene
     centered on it with nothing cropped */
  /* no frame: the chalk floats on the dark desk between the
     sheets. The feathered edges dissolve the video's black into
     the desk so there is no rectangle, only chalk. */
  .chalk-divider {
    display: grid;
    place-items: center;
    margin: 0;
    padding: 30px 0 34px;
    /* a pool of blackboard-dark that fades into the desk, so the
       video's black core has matching black to sit on */
    background: radial-gradient(ellipse 74% 62% at 50% 50%, #000 0%, rgba(0,0,0,0.72) 52%, transparent 82%);
  }
  .chalk-divider video {
    display: block;
    width: auto;
    height: 56vh;
    max-height: 500px;
    max-width: 92%;
    object-fit: contain;
    /* dissolve every edge into the desk, no hard border anywhere */
    -webkit-mask-image: radial-gradient(130% 108% at 50% 50%, #000 74%, transparent 100%);
            mask-image: radial-gradient(130% 108% at 50% 50%, #000 74%, transparent 100%);
  }
}

/* ============================================================
   PRINT :: it is a newspaper. It prints like one.
   ============================================================ */
@media print {
  body { background: #fff; }
  .chrome, .turn-zone, .desk-mural, .press-loader, .chalk-divider,
  .page-back, .cast, .city-bubbles { display: none !important; }
  .book { height: auto !important; }
  .book-pin { position: static; height: auto; overflow: visible; display: block; }
  .perspective { width: auto; height: auto; perspective: none; }
  .sheet { position: static; transform: none !important; page-break-after: always; }
  .page-front { position: static; box-shadow: none; background: #fff; }
  .page-inner { width: auto; height: auto; transform: none; }
  .city-stage video, .roto-frame video { display: none; }
  .city-stage { position: relative; inset: 0; transform: none; min-height: 0; }
  .wire-ticker, .ballot { display: none; }
}

/* ============================================================
   STACKED EDITION MOTION :: sheets settle onto the desk like
   fresh papers; a red wire tracks the reading
   ============================================================ */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--red);
  z-index: 300;
  display: none;
}
@media (max-width: 899px) {
  .read-progress { display: block; }
}
@media (max-width: 899px) and (prefers-reduced-motion: no-preference) {
  /* the newspaper turns: each sheet folds down onto the desk from
     its top edge as you reach it, a page being laid open */
  .book-pin { perspective: 1500px; perspective-origin: 50% 0; }
  body.pressed .sheet {
    opacity: 0;
    transform-origin: 50% 0;
    transform: rotateX(-38deg) translateY(-8px);
    transition: opacity 0.55s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.85);
  }
  body.pressed .sheet.inview {
    opacity: 1;
    transform: rotateX(0deg) translateY(0);
  }
}
