/* ============================================================
   Doorbin Times — the article template
   One card per screen, scroll-snapped; a card recedes and dims
   as it leaves the middle, and long passages light phrase by phrase.
   ============================================================ */

.article-page {
  height: 100vh;
  overflow: hidden;
  background: var(--ground-page);
  color: #e8e5dd;
}

.roll {
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.roll::-webkit-scrollbar { width: 0; height: 0; }

/* the card sits in the band between the nav and the indicator dots,
   with the same air above and below it at every size */
.article-page {
  --nav-h: 73px;
  --dots-zone: 33px;
  --band-air: 34px;
}

.frame {
  position: relative;
  height: 100svh;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + var(--band-air)) 42px calc(var(--dots-zone) + var(--band-air));
}

.card {
  position: relative;
  width: 100%;
  max-width: 1240px;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: #141416;
  transform-origin: 50% 50%;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease);
}
/* hairline on colour-ground cards; image cards stay clean */
.card--ink { border: 1px solid rgba(232, 229, 221, 0.13); }
.card--light {
  background: #f4f2ed;
  color: #16150f;
  border: 1px solid rgba(22, 21, 15, 0.14);
}
/* the pull-quote turns the page over: light sheet, dark type */
.card--quote {
  background: #f4f2ed;
  color: #16150f;
  border: 1px solid rgba(22, 21, 15, 0.14);
}
.card--quote .a-attrib { color: #56524a; }

.card__pad {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 56px;
}
.card__pad--end { justify-content: flex-end; }
.card__pad--centre { align-items: center; text-align: center; }

.card__image {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.card__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(11, 11, 9, 0) 34%, rgba(11, 11, 9, 0.52) 72%, rgba(11, 11, 9, 0.88) 100%);
}
.card__veil--side {
  background: linear-gradient(105deg, rgba(11, 11, 9, 0.9) 0%, rgba(11, 11, 9, 0.5) 52%, rgba(11, 11, 9, 0.2) 100%);
}
.card__veil--soft {
  background: linear-gradient(rgba(11, 11, 9, 0.28) 0%, rgba(11, 11, 9, 0) 44%, rgba(11, 11, 9, 0.6) 100%);
}

/* ---------------- type ---------------- */
.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #b5946a;
}
.a-title {
  margin: 22px 0 0;
  max-width: 17ch;
  font-family: 'Courier Prime', monospace;
  font-weight: 400;
  font-size: clamp(32.1px, 4.9vw, 75.3px);
  line-height: 0.94;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.a-stamp {
  position: absolute;
  right: 24px; top: 24px;
  display: block;
  padding: 9px 17px;
  border: 1px solid rgba(232, 229, 221, 0.26);
  border-radius: 999px;
  background: rgba(11, 11, 9, 0.5);
  backdrop-filter: blur(8px);
  font-size: 9.5px;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}
.a-byline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(232, 229, 221, 0.2);
  font-size: 11.5px;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #a29c91;
}
.a-deck {
  margin: 0;
  max-width: 24ch;
  font-family: 'Courier Prime', monospace;
  font-size: clamp(23.7px, 3vw, 47.4px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.a-sect {
  margin: 0;
  font-family: 'Courier Prime', monospace;
  font-weight: 400;
  font-size: clamp(23.7px, 3.2vw, 46px);
  line-height: 1.05;
}
.a-rule {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(232, 229, 221, 0.16);
}
.a-body {
  margin: 36px 0 0;
  max-width: 46ch;
  font-family: 'Courier Prime', monospace;
  font-size: clamp(15.3px, 1.3vw, 19.5px);
  line-height: 1.6;
  text-wrap: pretty;
}
.a-body--quiet { color: #a8a29a; font-size: 15.3px; line-height: 1.66; }
.a-aside {
  margin: 40px 0 0;
  max-width: 34ch;
  font-family: 'Courier Prime', monospace;
  font-style: italic;
  font-size: clamp(13.9px, 1.1vw, 18.1px);
  line-height: 1.4;
  color: var(--accent);
  text-wrap: pretty;
}
.a-quote {
  margin: 0;
  max-width: 26ch;
  font-family: 'Courier Prime', monospace;
  font-size: clamp(20.9px, 2.7vw, 43.2px);
  line-height: 1.16;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.a-quote--italic { font-style: italic; max-width: 22ch; margin-top: 36px; }
.a-mark {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500;
  font-size: clamp(48.8px, 6.3vw, 90.6px);
  line-height: 0.4;
  color: var(--accent);
}
.a-attrib {
  margin: 44px 0 0;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.a-kicker {
  margin: 0;
  max-width: 42ch;
  font-family: 'Courier Prime', monospace;
  font-size: clamp(18.1px, min(2.5vw, 3.6svh), 39px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: pretty;
}
.card__pad--plate {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: auto;
  padding: 40px 56px;
}
.a-caption {
  margin: 12px 0 0;
  max-width: 36ch;
  font-family: 'Courier Prime', monospace;
  font-size: clamp(13.9px, 1.5vw, 20.9px);
  line-height: 1.26;
  text-wrap: pretty;
}

/* the kicker breaks in two on desktop, three on a phone */
.br-m { display: none; }
.br-d { display: inline; }

.a-stack { display: flex; gap: 52px; margin: 36px 0 0; }
.a-stack > * { flex: 1; margin: 0; }

/* phrase-level highlight: dim until the card settles, then light in turn */
.hl {
  color: rgba(232, 229, 221, 0.28);
  transition: color 0.7s ease;
}
.is-settled .hl { color: #e8e5dd; }
.card--light .hl { color: rgba(22, 21, 15, 0.3); }
.is-settled .card--light .hl,
.card--light.is-settled .hl { color: #16150f; }

/* reveal */
.rise {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.is-settled .rise { opacity: 1; transform: translateY(0); }

/* ---------------- chrome ---------------- */
/* one tick per card, the current one full size */
.folio {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 11px;
  pointer-events: none;
}
.folio__tick {
  display: block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #e8e5dd;
  opacity: 0.28;
  transform: scale(0.7);
  transition: opacity 0.4s ease, transform 0.4s var(--ease), background 0.4s ease;
}
.folio__tick.is-on { opacity: 1; transform: scale(1); }

@keyframes dt-drift {
  0%, 100% { transform: translateY(-2px); }
  50%      { transform: translateY(3px); }
}
/* the invitation to scroll belongs to the first card only */
.cue {
  position: fixed;
  left: 50%; bottom: 58px;
  margin-left: -7px;
  z-index: 55;
  color: rgba(232, 229, 221, 0.7);
  pointer-events: none;
  transition: opacity 0.5s ease, color 0.4s ease;
}
.cue svg {
  width: 15px; height: 15px;
  display: block;
  animation: dt-drift 2.1s ease-in-out infinite;
}

/* ---------------- closing card ----------------
   The statement holds in the middle of the sheet for two seconds,
   then rises as the recommendations come up beneath it. */
.frame--close {
  align-items: flex-start;
  padding: 124px 42px 52px;
}
.card--close {
  height: calc(100svh - 176px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(38px, 7svh, 84px) 5vw clamp(44px, 6svh, 72px);
  background: #e8e5dd;
  color: #0b0b09;
  text-align: center;
}
.close__group { display: flex; flex-direction: column; align-items: center; width: 100%; }
.close__byline {
  margin: clamp(14px, 2.4svh, 26px) 0 0;
  font-size: clamp(10px, 1.6svh, 12.5px);
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #6d6459;
}
.close__cta {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin: clamp(16px, 3svh, 34px) 0 0;
  padding: clamp(11px, 1.8svh, 15px) clamp(22px, 2.4vw, 32px);
  border: 1px solid #0b0b09;
  border-radius: 999px;
  background: #0b0b09;
  color: #e8e5dd;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  transition: background 0.35s ease, color 0.35s ease;
}
.close__cta:hover { background: none; color: #0b0b09; }
.close__cta svg { width: 15px; height: 11px; display: block; }

.close__late {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(56px);
  text-align: left;
}
.close__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(11, 11, 9, 0.2);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #6d6459;
}
/* the head carries the explore rail's chips and arrows, drawn at the card's scale */
.close__head { align-items: center; flex-wrap: wrap; row-gap: 12px; }
.close__controls { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.close__chip {
  padding: 7px 15px 6px;
  border: 1px solid rgba(22, 21, 15, 0.26);
  border-radius: 999px;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.24em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.close__chip:hover { background: rgba(22, 21, 15, 0.06); }
.close__chip[aria-pressed="true"] { background: #16150f; border-color: #16150f; color: #faf9f6; }
.close__steps { display: flex; gap: 6px; margin-left: 10px; }
.close__step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  padding: 0;
  border: 1px solid rgba(22, 21, 15, 0.26);
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.close__step:hover { background: #16150f; border-color: #16150f; color: #faf9f6; }
.close__step svg { width: 13px; height: 10px; display: block; }
.close__step[hidden] { display: none; }
.close__rail > li[hidden] { display: none; }

.close__rail {
  display: flex;
  gap: 26px;
  margin: 0 -5vw 0 0;
  padding: clamp(13px, 2.2svh, 22px) 5vw 4px 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-right: 5vw;
  scrollbar-width: none;
}
.close__rail::-webkit-scrollbar { width: 0; height: 0; }
.close__rail > li {
  scroll-snap-align: start;
  flex: 0 0 calc((100% + 5vw - 52px) / 2.35);
}
.read-card {
  display: block;
  color: inherit;
  transition: transform 0.5s var(--ease);
}
.read-card:hover { color: inherit; transform: translateY(-6px); }
.read-card__frame {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  background: #d8d3c7;
}
.read-card__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.read-card__tag {
  display: block;
  margin: clamp(9px, 1.5svh, 15px) 0 0;
  font-size: clamp(8.5px, 1.2svh, 10px);
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6d6459;
}
.read-card__title {
  margin: clamp(5px, 1svh, 9px) 0 0;
  font-family: 'Courier Prime', monospace;
  font-weight: 400;
  font-size: clamp(11.2px, 1.8svh, 16.1px);
  line-height: 1.2;
}

@media (max-width: 900px) {
  .article-page { --nav-h: 62px; --dots-zone: 23px; --band-air: 22px; }
  .frame { padding-left: 20px; padding-right: 20px; }
  .card { border-radius: 14px; }
  .card__pad { padding: 30px 24px; }
  .a-title { font-size: clamp(26.5px, 7.7vw, 41.8px); }
  .a-deck { font-size: clamp(16.7px, 4.4vw, 23.7px); }
  .a-body { font-size: 13.3px; line-height: 1.6; }
  .a-quote { font-size: clamp(18.9px, 5.3vw, 27.9px); }
  .a-sect { font-size: clamp(15.3px, 4.4vw, 22.3px); }
  .a-stack { flex-direction: column; gap: 24px; }
  .folio { left: 20px; bottom: 16px; }
  /* the row of ticks must fit the narrow sheet, so it tightens rather than overflows */
  .folio {
    left: 0; right: 0;
    transform: none;
    justify-content: center;
    gap: 7px;
    padding: 0 18px;
    bottom: 18px;
  }
  .folio__tick { width: 5px; height: 5px; }
  .cue { bottom: 44px; }
  .frame--close { height: auto; min-height: 100svh; align-items: center; padding: 64px 20px 44px; }
  .card--close { height: auto; min-height: calc(100svh - 174px); overflow: visible; }
  .close__rail { gap: 22px; }
  .close__rail > li { flex-basis: calc((100% - 22px) / 1.15); }
  /* on a phone the chips take their own row under the label, and a swipe does the stepping */
  .close__controls { width: 100%; justify-content: flex-start; flex-wrap: nowrap; gap: 5px; }
  .close__chip { padding: 6px 11px 5px; font-size: 9.5px; letter-spacing: 0.16em; }
  .close__steps { display: none; }
  .br-m { display: inline; }
}

@media print {
  html, body { height: auto; overflow: visible; background: #ffffff; color: #16150f; }
  .nav, .folio, .cue { display: none; }
  .roll { height: auto; overflow: visible; }
  .frame { height: auto; padding: 0 0 10mm; break-after: page; }
  .card { height: auto; transform: none; opacity: 1; }
  .hl, .rise { opacity: 1; color: #16150f; transform: none; }
  @page { margin: 14mm; }
}

/* ============================================================
   the article as a film roll — the craft rail's layout
   ============================================================ */
.folio, .cue { display: none !important; }

/* desktop: sideways — one card whole, the next showing its first 30% */
@media screen and (hover: hover) and (min-width: 1025px) {
  .article-page { --card-w: calc((100vw - 42px - 16px) / 1.3); }
  .roll {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: none;
    cursor: grab;
  }
  .roll.is-dragging, .roll.is-dragging * { cursor: grabbing; }
  .roll > article {
    display: flex;
    gap: 16px;
    height: 100%;
    /* room after the last card, so at the end of the roll it rests centred */
    padding: 0 calc((100vw - var(--card-w)) / 2) 0 42px;
    width: max-content;
  }
  .frame,
  .frame--close {
    flex: 0 0 var(--card-w);
    width: var(--card-w);
    height: 100%;
    padding: calc(var(--nav-h) + var(--band-air)) 0 var(--band-air);
    align-items: stretch;
    scroll-snap-align: none;
  }
  .card,
  .card--close { max-width: none; height: 100%; }
}

/* touch: vertical — one card whole, the next showing its first 30% below */
@media screen and (hover: none), screen and (max-width: 1024px) {
  .article-page { --card-h: calc((100svh - var(--nav-h) - 14px) / 1.3); }
  .roll {
    padding-top: var(--nav-h);
    scroll-padding-top: var(--nav-h);
    scroll-snap-type: y mandatory;
  }
  .roll > article {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0 20px calc((100svh - var(--nav-h) - var(--card-h)) / 2);
  }
  .frame,
  .frame--close {
    flex: none;
    height: var(--card-h);
    min-height: 0;
    padding: 0;
    align-items: stretch;
    scroll-snap-align: start;
  }
  .card { max-width: none; height: 100%; min-height: 0; overflow: hidden; }
  /* the closing card carries its own rail, so it grows past the peek height */
  .frame--close { height: auto; min-height: var(--card-h); }
  .card--close { max-width: none; height: auto; min-height: var(--card-h); overflow: visible; }
}

/* ---------------- byline: label, name, role, then the reading time ---------------- */
.a-byline { align-items: center; }
.a-byline__who {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
}
.a-byline__label {
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(232, 229, 221, 0.62);
}
.a-byline__name,
.a-byline__role {
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: none;
}
.a-byline__name { color: #e8e5dd; }
.a-byline__role {
  padding-left: 14px;
  border-left: 1px solid rgba(232, 229, 221, 0.3);
  color: rgba(232, 229, 221, 0.72);
}
.a-byline__meta {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .a-byline { align-items: flex-start; flex-direction: column; gap: 12px; }
  .a-byline__label, .a-byline__name, .a-byline__role { font-size: 14px; }
}

/* short screens: the two-column card is the tallest, so it gives up air first */
@media (max-height: 820px) {
  .card__pad { padding-top: 32px; padding-bottom: 32px; }
  .a-stack { margin-top: 22px; gap: 32px; }
  .a-stack .a-body { font-size: clamp(12.7px, 1.1vw, 16.4px); line-height: 1.5; }
  .a-rule { padding-bottom: 14px; }
}

/* desktop: the centred pull-quote sits smaller on a wider measure, so it
   settles in four lines at most */
@media screen and (min-width: 1025px) {
  .a-quote--italic {
    max-width: 32ch;
    font-size: clamp(20px, 1.9vw, 32px);
    line-height: 1.34;
  }
}

/* very short screens: the deck gives up a little size before it touches the edge */
@media (max-height: 620px) {
  .a-deck { font-size: clamp(16px, 3vw, 30px); line-height: 1.18; }
  .a-body--quiet { margin-top: 12px; font-size: 15px; line-height: 1.5; }
  .card__pad { padding-top: 24px; padding-bottom: 24px; }
}

/* ============================================================
   reading theme
   ============================================================ */
.nav__end { display: flex; align-items: center; gap: 10px; }

.theme-switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.theme-switch:hover { background: var(--wash); }
.theme-switch:active { background: var(--wash-strong); }
.theme-switch:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.theme-switch > span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: rotate(-70deg) scale(0.6);
  transition: opacity 0.35s ease, transform 0.5s var(--ease);
}
.theme-switch > span.is-on { opacity: 1; transform: none; }
.theme-switch svg { width: 17px; height: 17px; display: block; }

/* the whole page eases across when the theme changes, and only then */
html.is-theming body,
html.is-theming .nav,
html.is-theming .menu,
html.is-theming .card,
html.is-theming .hl,
html.is-theming .a-rule {
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease !important;
}

/* ---- light: paper ground, white sheets, dark type; the quote sheets turn dark ---- */
html[data-theme="light"] body.article-page {
  --ink: #16150f;
  --ground: #ece9e2;
  --ground-page: #ece9e2;
  --rule: rgba(22, 21, 15, 0.26);
  --rule-soft: rgba(22, 21, 15, 0.12);
  --wash: rgba(22, 21, 15, 0.07);
  --wash-strong: rgba(22, 21, 15, 0.13);
  background: #ece9e2;
  color: #16150f;
}

html[data-theme="light"] .card--ink {
  background: #faf9f6;
  color: #16150f;
  border-color: rgba(22, 21, 15, 0.1);
}
html[data-theme="light"] .card--ink .hl { color: rgba(22, 21, 15, 0.24); }
html[data-theme="light"] .is-settled .card--ink .hl { color: #16150f; }
html[data-theme="light"] .card--ink .a-rule { border-bottom-color: rgba(22, 21, 15, 0.14); }
html[data-theme="light"] .card--ink .a-body--quiet { color: #69645b; }

html[data-theme="light"] .card--quote {
  background: #141416;
  color: #e8e5dd;
  border-color: rgba(232, 229, 221, 0.13);
}
html[data-theme="light"] .card--quote .a-attrib { color: #a8a29a; }

html[data-theme="light"] .card--close { border: 1px solid rgba(22, 21, 15, 0.12); }

@media (max-width: 1024px) {
  .nav__end { gap: 8px; }
}

/* sharp-edged sheets, as on the craft rail */
.card, .card--close, .card--quote, .card--ink, .read-card__frame { border-radius: 0 !important; }

/* photo cards keep light ink in either theme; the sheet cards set their own */
.card:not(.card--ink):not(.card--quote):not(.card--close):not(.card--light) { color: #e8e5dd; }

/* ============================================================
   deep black sheets with a hairline; the quote sheets carry a gold
   edge that lights up while they are the card being read
   ============================================================ */
.card,
.card--ink {
  background: #050506;
  border: 1px solid rgba(232, 229, 221, 0.1);
}
.card--quote {
  background: #050506;
  color: #e8e5dd;
  border: 1px solid rgba(181, 148, 106, 0.32);
  box-shadow: 0 0 0 0 rgba(181, 148, 106, 0);
  transition: border-color 0.9s ease, box-shadow 0.9s ease;
}
.card--quote .a-attrib { color: #a8a29a; }
.is-settled .card--quote {
  border-color: rgba(206, 172, 124, 0.9);
  box-shadow:
    0 0 0 1px rgba(206, 172, 124, 0.18),
    0 0 48px 4px rgba(181, 148, 106, 0.2),
    0 0 140px 24px rgba(181, 148, 106, 0.09);
}
html[data-theme="light"] .card--quote { background: #050506; border-color: rgba(181, 148, 106, 0.32); }
html[data-theme="light"] .is-settled .card--quote { border-color: rgba(206, 172, 124, 0.9); }

/* ============================================================
   one rule for both themes: every sheet the same, the quote sheets
   told apart only by their gold edge — night is black, day is paper
   ============================================================ */

/* night: the closing sheet joins the others */
.card--close {
  background: #050506;
  color: #e8e5dd;
  border: 1px solid rgba(232, 229, 221, 0.1);
}
.card--close .close__byline,
.card--close .close__head,
.card--close .read-card__tag { color: #a8a29a; }
.card--close .close__head { border-bottom-color: rgba(232, 229, 221, 0.16); }
.card--close .read-card__frame { background: #141416; }
.card--close .close__cta { background: #e8e5dd; border-color: #e8e5dd; color: #050506; }
.card--close .close__cta:hover { background: none; color: #e8e5dd; }
.card--close .close__chip,
.card--close .close__step { border-color: rgba(232, 229, 221, 0.3); }
.card--close .close__chip:hover { background: rgba(232, 229, 221, 0.08); }
.card--close .close__chip[aria-pressed="true"],
.card--close .close__step:hover { background: #e8e5dd; border-color: #e8e5dd; color: #050506; }

/* day: paper sheets, dark type, the same hairline and the same gold */
html[data-theme="light"] .card--ink,
html[data-theme="light"] .card--quote,
html[data-theme="light"] .card--close {
  background: #faf9f6;
  color: #16150f;
  border: 1px solid rgba(22, 21, 15, 0.1);
}
html[data-theme="light"] .card--quote { border-color: rgba(181, 148, 106, 0.4); }
html[data-theme="light"] .is-settled .card--quote {
  border-color: rgba(181, 148, 106, 0.95);
  box-shadow:
    0 0 0 1px rgba(181, 148, 106, 0.2),
    0 0 48px 4px rgba(181, 148, 106, 0.22),
    0 0 140px 24px rgba(181, 148, 106, 0.1);
}
html[data-theme="light"] .card--quote .a-attrib { color: #69645b; }

html[data-theme="light"] .card--close .close__byline,
html[data-theme="light"] .card--close .close__head,
html[data-theme="light"] .card--close .read-card__tag { color: #6d6459; }
html[data-theme="light"] .card--close .close__head { border-bottom-color: rgba(22, 21, 15, 0.16); }
html[data-theme="light"] .card--close .read-card__frame { background: #dedad1; }
html[data-theme="light"] .card--close .close__cta { background: #16150f; border-color: #16150f; color: #faf9f6; }
html[data-theme="light"] .card--close .close__cta:hover { background: none; color: #16150f; }
html[data-theme="light"] .card--close .close__chip,
html[data-theme="light"] .card--close .close__step { border-color: rgba(22, 21, 15, 0.26); }
html[data-theme="light"] .card--close .close__chip:hover { background: rgba(22, 21, 15, 0.06); }
html[data-theme="light"] .card--close .close__chip[aria-pressed="true"],
html[data-theme="light"] .card--close .close__step:hover { background: #16150f; border-color: #16150f; color: #faf9f6; }

/* the gold edge is one hairline: no second ring, a touch less intense */
.is-settled .card--quote {
  border-color: rgba(206, 172, 124, 0.62);
  box-shadow:
    0 0 48px 4px rgba(181, 148, 106, 0.18),
    0 0 140px 24px rgba(181, 148, 106, 0.08);
}
html[data-theme="light"] .is-settled .card--quote {
  border-color: rgba(181, 148, 106, 0.7);
  box-shadow:
    0 0 48px 4px rgba(181, 148, 106, 0.2),
    0 0 140px 24px rgba(181, 148, 106, 0.09);
}
@media (min-resolution: 2dppx) {
  .card, .card--ink, .card--quote, .card--close { border-width: 0.5px; }
}

/* day: a black hairline, kept light so it reads finer than a full black rule */
html[data-theme="light"] .card--ink,
html[data-theme="light"] .card--close {
  border-color: rgba(0, 0, 0, 0.42);
  border-width: 0.5px;
}

/* night: the black sheets are drawn with a white line, a touch heavier than the day hairline */
html:not([data-theme="light"]) .card--ink,
html:not([data-theme="light"]) .card--close {
  border: 1px solid rgba(255, 255, 255, 0.62);
}

/* reading progress: a gold hairline across the very top */
.read-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 120;
  height: 2px;
  pointer-events: none;
}
.read-progress__bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #a8875c, #d8b784);
  box-shadow: 0 0 10px rgba(216, 183, 132, 0.45);
  transform-origin: 0 50%;
  transform: scaleX(0);
  will-change: transform;
}

/* finer: a 1px progress line, and a half-pixel white hairline on the night sheets */
.read-progress { height: 1px; }
.read-progress__bar { box-shadow: 0 0 6px rgba(216, 183, 132, 0.35); }
html:not([data-theme="light"]) .card--ink,
html:not([data-theme="light"]) .card--close {
  border: 0.5px solid rgba(255, 255, 255, 0.5);
}

html:not([data-theme="light"]) .card--ink,
html:not([data-theme="light"]) .card--close { border-color: rgba(255, 255, 255, 0.36); }

/* ============================================================
   massing: every card is the roof of a solid block seen from above.
   The block sinks into the page; the camera sits at the centre of the
   view, so walls facing the centre come into sight as a card moves off
   it. A low sun from the top left lights the north and west walls and
   throws a hard shadow onto the ground at the block's foot.
   ============================================================ */
.article-page { --depth: 96px; --sun-x: 0.95; --sun-y: 0.7; }
.roll { perspective: 1500px; perspective-origin: 50% 50%; }
.roll > article,
.frame { transform-style: preserve-3d; }

.block {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.block > .card { position: relative; z-index: 2; transform: translateZ(0); }

.block__face,
.block__shadow { position: absolute; pointer-events: none; }
.block__face--n { left: 0; right: 0; top: 0; height: var(--depth); transform-origin: 50% 0; transform: rotateX(-90deg); }
.block__face--s { left: 0; right: 0; bottom: 0; height: var(--depth); transform-origin: 50% 100%; transform: rotateX(90deg); }
.block__face--w { top: 0; bottom: 0; left: 0; width: var(--depth); transform-origin: 0 50%; transform: rotateY(90deg); }
.block__face--e { top: 0; bottom: 0; right: 0; width: var(--depth); transform-origin: 100% 50%; transform: rotateY(-90deg); }

/* night: dark concrete; sunlit walls warm, shaded walls near black */
.block__face--n { background: linear-gradient(to bottom, #3a3530, #1d1b18); }
.block__face--w { background: linear-gradient(to right, #2c2925, #161512); }
.block__face--s { background: linear-gradient(to top, #0d0d0c, #070707); }
.block__face--e { background: linear-gradient(to left, #111110, #080808); }
.block__shadow {
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  transform: translate3d(calc(var(--depth) * var(--sun-x)), calc(var(--depth) * var(--sun-y)), calc(-1 * var(--depth)));
}
.block--quote .block__face--n { background: linear-gradient(to bottom, #4a3d2c, #1f1a13); }
.block--quote .block__face--w { background: linear-gradient(to right, #3a3024, #18140f); }

/* day: plaster in hard light, and a crisp shadow on the paper */
html[data-theme="light"] .block__face--n { background: linear-gradient(to bottom, #ffffff, #efebe3); }
html[data-theme="light"] .block__face--w { background: linear-gradient(to right, #f6f3ec, #e4dfd5); }
html[data-theme="light"] .block__face--s { background: linear-gradient(to top, #a9a397, #c2bcb1); }
html[data-theme="light"] .block__face--e { background: linear-gradient(to left, #b8b2a6, #cfc9be); }
html[data-theme="light"] .block__shadow { background: rgba(22, 21, 15, 0.26); }
html[data-theme="light"] .block--quote .block__face--n { background: linear-gradient(to bottom, #fbf1e1, #eadcc4); }

@media (max-width: 1024px) {
  .article-page { --depth: 56px; }
  .roll { perspective: 1100px; }
}
@media print {
  .block__face, .block__shadow { display: none; }
  .roll { perspective: none; }
}

/* touch: the cast shadow stays inside the side gutter and never widens the roll */
@media screen and (hover: none), screen and (max-width: 1024px) {
  .article-page { --sun-x: 0.3; --sun-y: 0.8; }
  .roll { overflow-x: hidden; }
}

/* ============================================================
   massing, tuned: tall towers of varied height on a faint site grid.
   The sun crosses the sky as you read, from morning light on the east
   walls to a long late-afternoon shadow at the close. Each block rises
   out of the ground the first time you land on it.
   ============================================================ */
@property --rise { syntax: "<number>"; inherits: true; initial-value: 1; }

.article-page { --depth: 230px; --sxk: 1; }
.roll { perspective: 1600px; }

/* the ground: a faint site grid that travels with the blocks */
.roll {
  background-color: var(--ground-page);
  background-image:
    linear-gradient(rgba(232, 229, 221, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 229, 221, 0.04) 1px, transparent 1px);
  background-size: 96px 96px;
  background-attachment: local;
}
html[data-theme="light"] .roll {
  background-image:
    linear-gradient(rgba(22, 21, 15, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 21, 15, 0.055) 1px, transparent 1px);
}

.block {
  --rise: 0;
  --hh: calc(var(--h, 1) * var(--depth) * var(--rise));
  transition: --rise 1.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.block.is-risen { --rise: 1; }

.block__face--n, .block__face--s { height: var(--hh); }
.block__face--w, .block__face--e { width: var(--hh); }
.block__shadow {
  transform: translate3d(
    calc(var(--hh) * var(--sx, 0.9) * var(--sxk)),
    calc(var(--hh) * var(--sy, 0.7)),
    calc(-1 * var(--hh)));
}

/* walls: a shade colour, with sunlight laid over in proportion to how
   squarely each wall faces the sun */
.block__face { overflow: hidden; }
.block__face--n, .block__face--s, .block__face--w, .block__face--e { background: #0a0a09; }
.block__face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--lit-dir, to bottom), #5a4a39, #231e19);
  opacity: 0;
}
.block__face--n::after { --lit-dir: to bottom; opacity: var(--lit-n, 0); }
.block__face--s::after { --lit-dir: to top;    opacity: var(--lit-s, 0); }
.block__face--w::after { --lit-dir: to right;  opacity: var(--lit-w, 0); }
.block__face--e::after { --lit-dir: to left;   opacity: var(--lit-e, 0); }
.block--quote .block__face::after { background: linear-gradient(var(--lit-dir, to bottom), #7a5f3c, #2a2116); }

html[data-theme="light"] .block__face--n,
html[data-theme="light"] .block__face--s,
html[data-theme="light"] .block__face--w,
html[data-theme="light"] .block__face--e { background: #a39d91; }
html[data-theme="light"] .block__face::after { background: linear-gradient(var(--lit-dir, to bottom), #ffffff, #ebe6dc); }
html[data-theme="light"] .block--quote .block__face::after { background: linear-gradient(var(--lit-dir, to bottom), #fff6e8, #ecdcc2); }
html[data-theme="light"] .block__shadow { background: rgba(22, 21, 15, 0.22); }
.block__shadow { background: rgba(0, 0, 0, 0.62); }

@media screen and (hover: none), screen and (max-width: 1024px) {
  .article-page { --depth: 120px; --sxk: 0.3; }
  .roll { perspective: 1100px; }
}
@media (prefers-reduced-motion: reduce) {
  .block { transition: none; }
}

/* blocks stand at full height from the start */
.block { --rise: 1; transition: none; }

/* ============================================================
   blocks, settled: a fixed low sun from the top left, the walls in the
   clear tones of the first pass, and wider streets between the blocks so
   their depth reads
   ============================================================ */
.article-page { --sx: 0.95; --sy: 0.7; --street: 120px; }
.block__face::after { display: none; }
.block__face--n { background: linear-gradient(to bottom, #3a3530, #1d1b18); }
.block__face--w { background: linear-gradient(to right, #2c2925, #161512); }
.block__face--s { background: linear-gradient(to top, #0d0d0c, #070707); }
.block__face--e { background: linear-gradient(to left, #111110, #080808); }
.block--quote .block__face--n { background: linear-gradient(to bottom, #4a3d2c, #1f1a13); }
.block--quote .block__face--w { background: linear-gradient(to right, #3a3024, #18140f); }
html[data-theme="light"] .block__face--n { background: linear-gradient(to bottom, #ffffff, #efebe3); }
html[data-theme="light"] .block__face--w { background: linear-gradient(to right, #f6f3ec, #e4dfd5); }
html[data-theme="light"] .block__face--s { background: linear-gradient(to top, #a9a397, #c2bcb1); }
html[data-theme="light"] .block__face--e { background: linear-gradient(to left, #b8b2a6, #cfc9be); }
html[data-theme="light"] .block--quote .block__face--n { background: linear-gradient(to bottom, #fbf1e1, #eadcc4); }
html[data-theme="light"] .block--quote .block__face--w { background: linear-gradient(to right, #f6f3ec, #e4dfd5); }

@media screen and (hover: hover) and (min-width: 1025px) {
  .article-page { --card-w: calc((100vw - 42px - var(--street)) / 1.3); }
  .roll > article { gap: var(--street); }
}
@media screen and (hover: none), screen and (max-width: 1024px) {
  .article-page { --street: 44px; --sx: 0.3; --sy: 0.8; --card-h: calc((100svh - var(--nav-h) - var(--street)) / 1.3); }
  .roll > article { gap: var(--street); }
}

/* taller towers */
.article-page { --depth: 340px; }
@media screen and (hover: none), screen and (max-width: 1024px) {
  .article-page { --depth: 170px; }
}

/* ============================================================
   night: a street seen from above after dark. The ground is asphalt,
   lit in pools by streetlights; the grid reads as the street layout;
   the walls catch warm light from below and show lit windows; the
   blocks sit in soft darkness rather than a sun shadow.
   ============================================================ */
html:not([data-theme="light"]) .roll {
  background-color: #111113;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255, 196, 120, 0.075) 0, rgba(255, 196, 120, 0.03) 110px, transparent 240px),
    linear-gradient(rgba(232, 229, 221, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 229, 221, 0.075) 1px, transparent 1px);
  background-size: 576px 576px, 96px 96px, 96px 96px;
  background-position: 240px 180px, 0 0, 0 0;
  background-attachment: local;
}

/* walls: dark at the roof line, warming toward the lit street */
html:not([data-theme="light"]) .block__face--n { background: linear-gradient(to bottom, #0a0a0b 0%, #1d1a17 55%, #4a3a28 100%); }
html:not([data-theme="light"]) .block__face--s { background: linear-gradient(to top,    #0a0a0b 0%, #1d1a17 55%, #4a3a28 100%); }
html:not([data-theme="light"]) .block__face--w { background: linear-gradient(to right,  #0a0a0b 0%, #1a1815 55%, #3e3122 100%); }
html:not([data-theme="light"]) .block__face--e { background: linear-gradient(to left,   #0a0a0b 0%, #1a1815 55%, #3e3122 100%); }
html:not([data-theme="light"]) .block--quote .block__face--n,
html:not([data-theme="light"]) .block--quote .block__face--s { background: linear-gradient(to bottom, #0b0a08 0%, #2a2014 55%, #6a5030 100%); }
html:not([data-theme="light"]) .block--quote .block__face--s { background: linear-gradient(to top, #0b0a08 0%, #2a2014 55%, #6a5030 100%); }

/* lit windows, faint, in floors along each wall */
html:not([data-theme="light"]) .block__face::after {
  display: block;
  content: "";
  position: absolute;
  inset: 0;
  opacity: 1;
  background:
    repeating-linear-gradient(var(--win-a, 90deg), transparent 0 22px, rgba(255, 206, 140, 0.07) 22px 34px, transparent 34px 58px);
  -webkit-mask-image: repeating-linear-gradient(var(--win-b, 0deg), #000 0 10px, transparent 10px 26px);
          mask-image: repeating-linear-gradient(var(--win-b, 0deg), #000 0 10px, transparent 10px 26px);
}
html:not([data-theme="light"]) .block__face--n::after,
html:not([data-theme="light"]) .block__face--s::after { --win-a: 90deg; --win-b: 0deg; }
html:not([data-theme="light"]) .block__face--w::after,
html:not([data-theme="light"]) .block__face--e::after { --win-a: 0deg; --win-b: 90deg; }

/* no sun at night: the blocks sit in a soft pool of darkness */
html:not([data-theme="light"]) .block__shadow {
  background: rgba(0, 0, 0, 0.8);
  filter: blur(22px);
  transform: translate3d(0, calc(var(--hh) * 0.08), calc(-1 * var(--hh)));
  inset: -2%;
}

/* ============================================================
   one ground for the whole street: the grid lies on a floor plane at
   the foot of the blocks, so it sits below the roofs and moves with the
   depth, and every block stands on it
   ============================================================ */
.block { --h: 1 !important; }
.roll { background-image: none !important; }
.roll > article { position: relative; }
.floor {
  position: absolute;
  inset: -60% -30%;
  pointer-events: none;
  transform: translateZ(calc(-1 * var(--depth)));
  background-color: var(--ground-page);
  background-image:
    linear-gradient(rgba(22, 21, 15, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 21, 15, 0.07) 1px, transparent 1px);
  background-size: 96px 96px;
}
html:not([data-theme="light"]) .roll { background-color: #111113; }
html:not([data-theme="light"]) .floor {
  background-color: #111113;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255, 196, 120, 0.08) 0, rgba(255, 196, 120, 0.03) 110px, transparent 240px),
    linear-gradient(rgba(232, 229, 221, 0.085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 229, 221, 0.085) 1px, transparent 1px);
  background-size: 576px 576px, 96px 96px, 96px 96px;
  background-position: 240px 180px, 0 0, 0 0;
}
@media print { .floor { display: none; } }

/* the ground now lives behind the roll, not inside it */
.floor { display: none !important; }
.roll { background: transparent !important; }
.ground {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--ground-page);
  background-image:
    radial-gradient(circle at 50% 50%, transparent 0, transparent 1px),
    linear-gradient(rgba(22, 21, 15, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 21, 15, 0.07) 1px, transparent 1px);
}
.roll { position: relative; z-index: 1; }
html:not([data-theme="light"]) .ground {
  background-color: #111113;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255, 196, 120, 0.08) 0, rgba(255, 196, 120, 0.03) 110px, transparent 240px),
    linear-gradient(rgba(232, 229, 221, 0.085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 229, 221, 0.085) 1px, transparent 1px);
}
@media print { .ground { display: none; } }

/* ============================================================
   time of day, driven by --t (0 at the first card, 1 at the close)
   ============================================================ */
@property --t { syntax: "<number>"; inherits: true; initial-value: 0; }
.article-page { --t: 0; }
.block__shadow {
  transform: translate3d(
    calc(var(--hh) * var(--sx, 0.9) * var(--sxk) * (1 + 0.6 * var(--t))),
    calc(var(--hh) * var(--sy, 0.7) * (1 + 0.6 * var(--t))),
    calc(-1 * var(--hh)));
}

/* ---- day: midday to sunset ---- */
html[data-theme="light"] .ground {
  background-color: color-mix(in oklab, #ece9e2, #efd2b0 calc(var(--t) * 100%));
}
html[data-theme="light"] .block__shadow {
  background: color-mix(in oklab, rgba(22, 21, 15, 0.22), rgba(96, 44, 18, 0.34) calc(var(--t) * 100%));
}
html[data-theme="light"] .block__face--n::after,
html[data-theme="light"] .block__face--w::after {
  display: block;
  content: "";
  position: absolute;
  inset: 0;
  -webkit-mask-image: none;
          mask-image: none;
  background: linear-gradient(var(--sun-dir, to bottom), rgba(255, 150, 72, 0.62), rgba(255, 112, 60, 0.28));
  opacity: var(--t);
}
html[data-theme="light"] .block__face--w::after { --sun-dir: to right; }
html[data-theme="light"] .block__face--s::after,
html[data-theme="light"] .block__face--e::after { display: none; }
html[data-theme="light"] .card--ink,
html[data-theme="light"] .card--quote,
html[data-theme="light"] .card--close {
  background: color-mix(in oklab, #faf9f6, #fbe9d6 calc(var(--t) * 70%));
}

/* ---- night: deep night to blue hour ---- */
html:not([data-theme="light"]) .ground {
  background-color: color-mix(in oklab, #111113, #1b2536 calc(var(--t) * 100%));
  background-image:
    radial-gradient(circle at 50% 50%,
      color-mix(in srgb, rgba(255, 196, 120, 0.08) calc((1 - var(--t)) * 100%), transparent) 0,
      color-mix(in srgb, rgba(255, 196, 120, 0.03) calc((1 - var(--t)) * 100%), transparent) 110px,
      transparent 240px),
    linear-gradient(color-mix(in srgb, rgba(232, 229, 221, 0.085), rgba(170, 196, 235, 0.11) calc(var(--t) * 100%)) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, rgba(232, 229, 221, 0.085), rgba(170, 196, 235, 0.11) calc(var(--t) * 100%)) 1px, transparent 1px);
}
/* the sky's cool light settles on the upper walls; the windows go out */
html:not([data-theme="light"]) .block__face::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--sky-dir, to bottom), rgba(126, 156, 206, 0.42), rgba(126, 156, 206, 0) 70%);
  opacity: var(--t);
}
html:not([data-theme="light"]) .block__face--s::before { --sky-dir: to top; }
html:not([data-theme="light"]) .block__face--w::before { --sky-dir: to right; }
html:not([data-theme="light"]) .block__face--e::before { --sky-dir: to left; }
html:not([data-theme="light"]) .block__face::after { opacity: calc(1 - 0.75 * var(--t)); }
html:not([data-theme="light"]) .card--ink,
html:not([data-theme="light"]) .card--close {
  background: color-mix(in oklab, #050506, #0c1220 calc(var(--t) * 80%));
}
html:not([data-theme="light"]) .card--quote {
  background: color-mix(in oklab, #050506, #0c1220 calc(var(--t) * 80%));
}

/* touch: free scroll, as on desktop */
@media screen and (hover: none), screen and (max-width: 1024px) {
  .roll { scroll-snap-type: none !important; -webkit-overflow-scrolling: touch; }
  .frame, .frame--close { scroll-snap-align: none !important; }
}

/* softer ends: sunset and blue hour reach about half their earlier strength */
.article-page { --tw: calc(var(--t) * 0.5); }
html[data-theme="light"] .ground { background-color: color-mix(in oklab, #ece9e2, #efd2b0 calc(var(--tw) * 100%)); }
html[data-theme="light"] .block__shadow { background: color-mix(in oklab, rgba(22, 21, 15, 0.22), rgba(96, 44, 18, 0.34) calc(var(--tw) * 100%)); }
html[data-theme="light"] .block__face--n::after,
html[data-theme="light"] .block__face--w::after { opacity: var(--tw); }
html[data-theme="light"] .card--ink,
html[data-theme="light"] .card--quote,
html[data-theme="light"] .card--close { background: color-mix(in oklab, #faf9f6, #fbe9d6 calc(var(--tw) * 70%)); }

html:not([data-theme="light"]) .ground {
  background-color: color-mix(in oklab, #111113, #1b2536 calc(var(--tw) * 100%));
  background-image:
    radial-gradient(circle at 50% 50%,
      color-mix(in srgb, rgba(255, 196, 120, 0.08) calc((1 - var(--tw)) * 100%), transparent) 0,
      color-mix(in srgb, rgba(255, 196, 120, 0.03) calc((1 - var(--tw)) * 100%), transparent) 110px,
      transparent 240px),
    linear-gradient(color-mix(in srgb, rgba(232, 229, 221, 0.085), rgba(170, 196, 235, 0.11) calc(var(--tw) * 100%)) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, rgba(232, 229, 221, 0.085), rgba(170, 196, 235, 0.11) calc(var(--tw) * 100%)) 1px, transparent 1px);
}
html:not([data-theme="light"]) .block__face::before { opacity: var(--tw); }
html:not([data-theme="light"]) .block__face::after { opacity: calc(1 - 0.75 * var(--tw)); }
html:not([data-theme="light"]) .card--ink,
html:not([data-theme="light"]) .card--close,
html:not([data-theme="light"]) .card--quote { background: color-mix(in oklab, #050506, #0c1220 calc(var(--tw) * 80%)); }

/* the ground is back in the scene as a real plane; nothing fixed behind it */
.floor.ground {
  display: block !important;
  position: absolute;
  z-index: auto;
  inset: auto;
  pointer-events: none;
  transform: translateZ(calc(-1 * var(--depth)));
  background-size: 576px 576px, 96px 96px, 96px 96px;
  background-position: 240px 180px, 0 0, 0 0;
}
body.article-page { background-color: var(--ground-page); }
html:not([data-theme="light"]) body.article-page { background-color: #111113; }

/* the close: its sheet stays clean paper, and the long shadow grows less */
html[data-theme="light"] .card--close { background: #faf9f6; }
.block__shadow {
  transform: translate3d(
    calc(var(--hh) * var(--sx, 0.9) * var(--sxk) * (1 + 0.3 * var(--t))),
    calc(var(--hh) * var(--sy, 0.7) * (1 + 0.3 * var(--t))),
    calc(-1 * var(--hh)));
}
html:not([data-theme="light"]) .block__shadow {
  transform: translate3d(0, calc(var(--hh) * 0.08), calc(-1 * var(--hh)));
}

.close__cta svg[viewBox="0 0 16 16"] { width: 15px; height: 15px; }
