/* The exchange chamber, release 2026-09-03. */

:root {
  color-scheme: light;
  --bg-canvas: #e7ece7;
  --bg-surface: #f8faf5;
  --bg-raised: #ffffff;
  --bg-recessed: #d7dfda;
  --bg-chamber: #0d151b;
  --bg-chamber-raised: #17232b;
  --text-primary: #090d16;
  --text-secondary: #1e293b;
  --text-muted: #475569;
  --text-inverse: #f7faf5;
  --text-inverse-muted: #c8d4cf;
  --signal: #8f241f;
  --signal-strong: #751a17;
  --signal-on-dark: #ff8a7f;
  --brass: #7a520e;
  --brass-bright: #e7bb62;
  --steel: #283740;
  --steel-light: #73858b;
  --rule: rgb(9 13 22 / 24%);
  --rule-soft: rgb(9 13 22 / 12%);
  --rule-inverse: rgb(247 250 245 / 24%);
  --shadow: 0 1.5rem 4rem rgb(9 13 22 / 18%);
  --shadow-deep: 0 2rem 5rem rgb(0 0 0 / 38%);
  --display: "Barlow Counter", "Arial Narrow", sans-serif;
  --body: "Noto Ledger", system-ui, sans-serif;
  --figure: "Plex Figure", ui-monospace, monospace;
  --max-width: 86rem;
  --reading: 70ch;
  --gutter: clamp(1rem, 3.3vw, 3rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-canvas: #080d11;
  --bg-surface: #111a20;
  --bg-raised: #162229;
  --bg-recessed: #0b1217;
  --bg-chamber: #05090c;
  --bg-chamber-raised: #111b21;
  --text-primary: #f7faf5;
  --text-secondary: #d8e2dd;
  --text-muted: #aabbb5;
  --text-inverse: #f7faf5;
  --text-inverse-muted: #c8d4cf;
  --signal: #ff8075;
  --signal-strong: #ff9a91;
  --signal-on-dark: #ff8a7f;
  --brass: #e9bd65;
  --brass-bright: #f2ca77;
  --steel: #34464f;
  --steel-light: #91a2a7;
  --rule: rgb(247 250 245 / 27%);
  --rule-soft: rgb(247 250 245 / 13%);
  --shadow: 0 1.5rem 4rem rgb(0 0 0 / 42%);
  --shadow-deep: 0 2rem 5rem rgb(0 0 0 / 62%);
}

* {
  scrollbar-color: var(--signal) var(--bg-recessed);
}

html {
  background: var(--bg-canvas);
}

body {
  color: var(--text-secondary);
  background-color: var(--bg-canvas);
  background-image:
    radial-gradient(circle at 16% 24%, rgb(255 255 255 / 52%) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 64%, var(--rule-soft) 0 0.8px, transparent 1.2px);
  background-size: 19px 23px, 29px 31px;
  font-family: var(--body);
}

:root[data-theme="dark"] body {
  background-image:
    radial-gradient(circle at 16% 24%, rgb(255 255 255 / 9%) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 64%, rgb(255 255 255 / 5%) 0 0.8px, transparent 1.2px);
}

body::before {
  opacity: 0.22;
  background:
    repeating-radial-gradient(ellipse at 0 36%, transparent 0 23px, var(--rule-soft) 24px 25px, transparent 26px 33px),
    repeating-radial-gradient(ellipse at 100% 72%, transparent 0 21px, color-mix(in srgb, var(--signal) 11%, transparent) 22px 23px, transparent 24px 32px);
  mask-image: linear-gradient(90deg, #000, transparent 22%, transparent 78%, #000);
}

a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.28em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}

a:hover {
  color: var(--signal);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 4px;
}

::selection {
  color: var(--text-inverse);
  background: var(--signal-strong);
}

.skip-link {
  color: var(--text-inverse);
  background: var(--signal-strong);
}

.site-header {
  position: absolute;
  min-height: 5.25rem;
  color: var(--text-primary);
  border-color: var(--rule);
}

.identity-link,
.language-link,
.library-link {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.site-nav {
  gap: clamp(0.5rem, 1.7vw, 1.4rem);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.35rem 0.65rem;
  color: var(--text-primary);
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg-surface);
  font-family: var(--figure);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--bg-surface);
  background: var(--text-primary);
}

.theme-toggle svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.theme-icon-moon,
:root[data-theme="dark"] .theme-icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-icon-moon {
  display: block;
}

.hero {
  min-height: 100svh;
  padding: clamp(7.25rem, 13vh, 9rem) var(--gutter) clamp(3rem, 7vh, 5rem);
  color: var(--text-primary);
  border-color: var(--rule);
}

.hero::before {
  content: "1947";
  position: absolute;
  right: -0.05em;
  bottom: -0.18em;
  z-index: -2;
  color: transparent;
  -webkit-text-stroke: 1px var(--rule-soft);
  font-family: var(--display);
  font-size: min(42vw, 38rem);
  font-weight: 900;
  line-height: 0.7;
  letter-spacing: -0.04em;
}

.hero::after {
  top: 11%;
  right: 4%;
  width: min(39vw, 34rem);
  opacity: 0.55;
  border-color: var(--rule-soft);
  background:
    repeating-radial-gradient(circle, transparent 0 11px, var(--rule-soft) 12px 13px),
    repeating-conic-gradient(from 8deg, transparent 0 8deg, color-mix(in srgb, var(--signal) 9%, transparent) 8deg 9deg);
}

.hero-inner {
  grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 0.72fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
}

.eyebrow,
.section-index {
  display: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero h1 {
  max-width: 9ch;
  font-size: clamp(4.25rem, 8.2vw, 6rem);
  line-height: 0.83;
  letter-spacing: -0.035em;
}

.hero h1 span {
  color: var(--signal);
}

.hero-deck {
  max-width: 42rem;
  margin-top: clamp(1.5rem, 3.5vh, 2.5rem);
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 1.55vw, 1.3rem);
  line-height: 1.55;
}

.hero-link {
  min-height: 48px;
  margin-top: 1.4rem;
  padding: 0.7rem 0;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: 0.07em;
}

.hero-link::after {
  content: "";
  width: 1.25rem;
  height: 1.25rem;
  border-right: 2px solid var(--signal);
  border-bottom: 2px solid var(--signal);
  transform: rotate(45deg) translateY(-0.25rem);
}

.hero-docket {
  position: relative;
  align-self: center;
  min-height: 34rem;
  justify-content: flex-end;
  overflow: hidden;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  color: var(--text-inverse);
  border: 0;
  background: var(--bg-chamber-raised);
  box-shadow: var(--shadow-deep);
}

.hero-docket::before,
.hero-docket::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-docket::before {
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, transparent 49.8%, var(--rule-inverse) 50%, transparent 50.2%),
    linear-gradient(180deg, rgb(255 255 255 / 4%), transparent 42%);
}

.hero-docket::after {
  inset: 0.75rem;
  z-index: 3;
  border: 1px solid var(--rule-inverse);
  box-shadow: inset 0 0 2.5rem rgb(0 0 0 / 36%);
}

.hero-ceilings {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 1px;
  padding: 0.8rem 0.8rem 17rem;
}

.hero-ceilings span {
  position: relative;
  height: var(--hero-level);
  border-top: 2px solid var(--signal-on-dark);
  background:
    linear-gradient(90deg, transparent 48%, rgb(247 250 245 / 12%) 49% 51%, transparent 52%),
    color-mix(in srgb, var(--brass-bright) 15%, transparent);
}

.hero-ceilings span::before {
  content: "";
  position: absolute;
  inset: -0.25rem 0 auto;
  height: 0.5rem;
  background: repeating-linear-gradient(90deg, var(--signal-on-dark) 0 0.2rem, transparent 0.2rem 0.38rem);
}

.hero-ceilings b {
  position: absolute;
  top: -2.2rem;
  left: 50%;
  color: var(--text-inverse);
  font-family: var(--figure);
  font-size: clamp(0.72rem, 1.2vw, 0.9rem);
  font-weight: 400;
  transform: translateX(-50%);
}

.hero-ceiling-15 { --hero-level: 15%; }
.hero-ceiling-30 { --hero-level: 30%; }
.hero-ceiling-50 { --hero-level: 50%; }
.hero-ceiling-75 { --hero-level: 75%; }

.hero-docket > :not(.hero-ceilings) {
  position: relative;
  z-index: 4;
}

.hero-docket .docket-label {
  color: var(--brass-bright);
}

.rate-figure {
  margin-top: 0.8rem;
  color: var(--text-inverse);
  font-size: clamp(2.6rem, 4.5vw, 4rem);
  letter-spacing: -0.04em;
}

.rate-caption {
  color: var(--text-inverse-muted);
}

.deadline-stamp {
  color: var(--signal-on-dark);
  border-color: var(--signal-on-dark);
}

.counter-section {
  position: relative;
  overflow: clip;
  padding: clamp(4.5rem, 9vw, 8rem) 0 clamp(6rem, 11vw, 10rem);
  color: var(--text-inverse);
  background:
    linear-gradient(90deg, rgb(255 255 255 / 2%) 1px, transparent 1px) 0 0 / 4rem 100%,
    radial-gradient(circle at 50% 0, rgb(231 187 98 / 12%), transparent 28rem),
    var(--bg-chamber);
}

.counter-section::before {
  content: "BANCA NAȚIONALĂ A ROMÂNIEI  ·  OPERAȚIUNEA MONETARĂ  ·  AUGUST 1947";
  display: block;
  width: min(100% - (2 * var(--gutter)), var(--max-width));
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  padding: 0.8rem 1rem;
  color: var(--text-inverse-muted);
  border: 1px solid var(--rule-inverse);
  font-family: var(--figure);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-align: center;
}

html[lang="en"] .counter-section::before {
  content: "NATIONAL BANK OF ROMANIA  ·  MONETARY OPERATION  ·  AUGUST 1947";
}

.counter-intro {
  grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 0.62fr);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.counter-intro h2,
.essay h2,
.sources h2,
.legal-aftermath h2 {
  margin-top: 0;
  font-size: clamp(3.25rem, 6.5vw, 6rem);
  letter-spacing: -0.03em;
}

.counter-intro p {
  color: var(--text-inverse-muted);
}

.amount-panel {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.36fr);
  overflow: hidden;
  border: 1px solid var(--rule-inverse);
  background: var(--bg-chamber-raised);
  box-shadow: var(--shadow-deep);
}

.amount-control {
  border-color: var(--rule-inverse);
}

.amount-control label,
.window-index,
.docket-label,
.evidence-label {
  color: var(--brass-bright);
}

.amount-number {
  color: var(--text-inverse);
  border-color: var(--text-inverse);
}

.number-unit,
.range-scale,
.fixed-rule span {
  color: var(--text-inverse-muted);
}

.amount-range {
  accent-color: var(--signal-on-dark);
}

.amount-range::-webkit-slider-thumb {
  width: 1.25rem;
  height: 1.25rem;
  border: 0.2rem solid var(--text-inverse);
  border-radius: 50%;
  background: var(--signal-on-dark);
  box-shadow: 0 0.45rem 1rem rgb(0 0 0 / 35%);
}

.preset-button,
.copy-button {
  color: var(--text-inverse);
  border-color: var(--rule-inverse);
}

.preset-button:hover,
.preset-button[aria-pressed="true"] {
  color: var(--bg-chamber);
  border-color: var(--brass-bright);
  background: var(--brass-bright);
}

.fixed-rule {
  background:
    repeating-linear-gradient(135deg, transparent 0 0.65rem, rgb(231 187 98 / 7%) 0.65rem 0.72rem),
    color-mix(in srgb, var(--brass-bright) 8%, transparent);
}

.fixed-rule strong {
  color: var(--brass-bright);
}

.scope-caution {
  margin-top: 1.5rem;
  padding: 1rem 0;
  color: var(--text-inverse-muted);
  border: 0;
  border-top: 1px solid var(--rule-inverse);
  border-bottom: 1px solid var(--rule-inverse);
  background: transparent;
}

.scope-caution strong {
  color: var(--text-inverse);
}

.exchange-wall {
  position: relative;
  z-index: 1;
  gap: clamp(0.45rem, 1vw, 0.9rem);
  margin-top: clamp(2rem, 4vw, 3.5rem);
  padding: clamp(0.5rem, 1vw, 0.9rem);
  border: 1px solid var(--rule-inverse);
  background: #05090c;
  box-shadow: var(--shadow-deep);
  perspective: 1200px;
}

.exchange-wall::before {
  content: "ARTICOLUL 8  /  PATRU FERESTRE  /  ACELAȘI TEANC";
  position: absolute;
  right: 0;
  bottom: 100%;
  padding: 0.55rem 0.8rem;
  color: var(--bg-chamber);
  background: var(--brass-bright);
  font-family: var(--figure);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
}

html[lang="en"] .exchange-wall::before {
  content: "ARTICLE 8  /  FOUR WINDOWS  /  THE SAME STACK";
}

.exchange-window {
  --lane: 0;
  position: relative;
  overflow: hidden;
  border: 0;
  background: var(--bg-chamber-raised);
  box-shadow: 0 1rem 2.5rem rgb(0 0 0 / 35%);
}

.exchange-window:nth-child(2) { --lane: 1; }
.exchange-window:nth-child(3) { --lane: 2; }
.exchange-window:nth-child(4) { --lane: 3; }

.window-head {
  position: relative;
  z-index: 6;
  min-height: 11.5rem;
  padding: 1.15rem;
  color: var(--text-inverse);
  border: 0;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 4%), transparent),
    var(--steel);
}

.window-head::after {
  content: "";
  position: absolute;
  right: 1rem;
  bottom: 0.85rem;
  left: 1rem;
  height: 0.22rem;
  background: var(--signal-on-dark);
}

.window-head h3 {
  color: var(--text-inverse);
  font-size: clamp(1.45rem, 2.1vw, 2.25rem);
  letter-spacing: -0.02em;
}

.aperture {
  position: relative;
  height: clamp(21rem, 34vw, 29rem);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px) 0 0 / 10% 100%,
    linear-gradient(180deg, #020405, #0a1115 70%, #020405);
}

.aperture::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  height: calc(100% - var(--limit));
  border-bottom: 0.65rem solid var(--steel-light);
  background:
    linear-gradient(90deg, rgb(255 255 255 / 7%), transparent 18% 82%, rgb(0 0 0 / 24%)),
    repeating-linear-gradient(180deg, var(--steel) 0 0.7rem, #1b282f 0.7rem 0.82rem);
  box-shadow: 0 1rem 2rem rgb(0 0 0 / 54%);
}

.aperture::after {
  inset: 0;
  z-index: 7;
  border: 0.65rem solid #26343c;
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 10%),
    inset 0 0 3rem rgb(0 0 0 / 68%);
}

.requested-stack,
.admitted-stack {
  right: 16%;
  left: 16%;
  transition:
    height 540ms var(--ease-out),
    filter 540ms var(--ease-out),
    box-shadow 540ms var(--ease-out);
}

.requested-stack {
  z-index: 1;
  border: 1px solid var(--signal-on-dark);
  background:
    repeating-linear-gradient(0deg, transparent 0 0.55rem, rgb(255 138 127 / 45%) 0.55rem 0.65rem),
    rgb(143 36 31 / 42%);
  filter: saturate(0.85);
}

.requested-stack::after,
.admitted-stack::after {
  content: "";
  position: absolute;
  inset: 0.55rem -0.35rem auto;
  height: 0.38rem;
  background: currentColor;
  box-shadow: 0 0.55rem 0 currentColor, 0 1.1rem 0 currentColor;
}

.requested-stack::after {
  color: rgb(255 138 127 / 38%);
}

.admitted-stack {
  z-index: 3;
  color: var(--text-inverse);
  border: 1px solid var(--text-inverse);
  background:
    repeating-radial-gradient(ellipse at 50% 100%, transparent 0 0.55rem, rgb(13 21 27 / 22%) 0.6rem 0.67rem, transparent 0.72rem 1.05rem),
    #c7d5ca;
  box-shadow: 0 -0.75rem 2rem rgb(231 187 98 / 16%);
}

.limit-rule {
  right: 7%;
  left: 7%;
  z-index: 8;
  min-height: 1.65rem;
  color: var(--text-inverse);
  border-color: var(--signal-on-dark);
  background: rgb(5 9 12 / 78%);
  font-size: 0.66rem;
}

.limit-rule::after {
  background: var(--signal-on-dark);
}

.window-result {
  min-height: 19rem;
  padding: 1.25rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
}

.result-label {
  color: var(--text-muted);
}

.new-amount {
  color: var(--text-primary);
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
}

.accepted-line {
  color: var(--text-muted);
}

.accepted-line [data-output-old] {
  color: var(--text-primary);
}

.remainder-line {
  color: var(--signal-strong);
  border-color: var(--rule);
}

:root[data-theme="dark"] .remainder-line {
  color: var(--signal);
}

.clause-details {
  border-color: var(--rule);
}

.clause-details summary {
  color: var(--text-primary);
}

.clause-details summary::after,
.clause-details a {
  color: var(--signal);
}

.insight-strip {
  position: relative;
  margin-top: 0;
  padding: clamp(1.35rem, 3vw, 2.2rem);
  color: #090d16;
  background: var(--brass-bright);
  box-shadow: var(--shadow-deep);
}

.insight-strip::before {
  content: "CONCLUZIE";
  position: absolute;
  top: 0;
  left: clamp(1.35rem, 3vw, 2.2rem);
  padding: 0.28rem 0.55rem;
  color: var(--text-inverse);
  background: var(--signal-strong);
  font-family: var(--figure);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  transform: translateY(-50%);
}

html[lang="en"] .insight-strip::before {
  content: "FINDING";
}

.insight-strip p {
  color: #090d16;
}

.copy-button {
  color: #090d16;
  border-color: #090d16;
}

.copy-button:hover {
  color: #f7faf5;
  background: #090d16;
}

.no-script-note {
  color: #090d16;
  background: var(--brass-bright);
}

.legal-aftermath {
  padding: clamp(5rem, 10vw, 9rem) 0;
  color: var(--text-secondary);
}

.legal-aftermath h2,
.sources h2,
.essay h2,
.scope-title h2 {
  color: var(--text-primary);
}

.aftermath-heading p {
  color: var(--text-secondary);
}

.timeline {
  border-color: var(--text-primary);
}

.timeline-step {
  border-color: var(--rule);
}

.timeline-step::before {
  background: var(--signal);
}

.timeline-step time,
.timeline-step .time-marker {
  color: var(--signal-strong);
  font-weight: 700;
}

:root[data-theme="dark"] .timeline-step time,
:root[data-theme="dark"] .timeline-step .time-marker {
  color: var(--signal);
}

.timeline-step h3 {
  color: var(--text-primary);
}

.timeline-step p {
  color: var(--text-secondary);
}

.blocked-ledger {
  overflow: hidden;
  border: 0;
  background: var(--bg-surface);
  box-shadow: var(--shadow);
}

.ledger-mark {
  background:
    repeating-linear-gradient(0deg, transparent 0 1.9rem, rgb(247 250 245 / 12%) 1.9rem calc(1.9rem + 1px)),
    var(--signal-strong);
}

.ledger-mark span {
  border-color: var(--text-inverse);
}

.ledger-copy h3 {
  color: var(--text-primary);
}

.scope-section {
  color: var(--text-inverse);
  background:
    radial-gradient(circle at 10% 15%, rgb(255 255 255 / 7%), transparent 24rem),
    #671917;
}

:root[data-theme="dark"] .scope-section {
  background:
    radial-gradient(circle at 10% 15%, rgb(255 255 255 / 6%), transparent 24rem),
    #3b1110;
}

.scope-title h2 {
  color: var(--text-inverse);
}

.scope-title p {
  color: #f0dad7;
}

.other-counters {
  border-color: rgb(247 250 245 / 50%);
}

.other-counters > div {
  border-color: rgb(247 250 245 / 50%);
}

.essay {
  color: var(--text-secondary);
}

.essay-copy {
  max-width: var(--reading);
}

.pull-figure {
  position: relative;
  margin: clamp(2.5rem, 6vw, 5rem) 0;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  color: var(--signal-strong);
  border: 0;
  border-top: 2px solid var(--signal);
  border-bottom: 2px solid var(--signal);
  font-size: clamp(2.7rem, 5.4vw, 5.5rem);
  letter-spacing: -0.025em;
}

:root[data-theme="dark"] .pull-figure {
  color: var(--signal);
}

.sources {
  color: var(--text-secondary);
  border-color: var(--rule);
  background: var(--bg-recessed);
}

.source-list {
  border-color: var(--text-primary);
}

.source-list li {
  border-color: var(--text-primary);
}

.source-list p {
  color: var(--text-secondary);
}

.source-downloads a {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.source-downloads a:hover {
  color: var(--bg-surface);
  background: var(--text-primary);
}

.method-note {
  color: var(--text-secondary);
  border: 1px solid var(--rule);
  background: var(--bg-surface);
}

.site-footer {
  color: var(--text-inverse);
  background: var(--bg-chamber);
}

.footer-meta {
  color: var(--text-inverse-muted);
}

.footer-links a:hover {
  color: var(--brass-bright);
}

.back-to-top {
  color: var(--text-inverse);
  border-color: var(--rule-inverse);
  background: var(--signal-strong);
  box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 24%);
}

.not-found-inner {
  color: var(--text-secondary);
  border-color: var(--rule);
  background: var(--bg-surface);
  box-shadow: var(--shadow);
}

.not-found h1 {
  color: var(--text-primary);
}

@supports (animation-timeline: view()) {
  .hero-docket {
    animation: docket-arrival 1s var(--ease-out) both;
  }

  .pull-figure {
    animation: proof-reveal linear both;
    animation-range: entry 15% cover 45%;
    animation-timeline: view();
  }
}

.js-ready .exchange-wall.is-awake .aperture::before {
  animation: shutter-drop 900ms var(--ease-out) both;
  animation-delay: calc(var(--lane) * 100ms);
}

@keyframes shutter-drop {
  from {
    filter: brightness(1.4);
    transform: translateY(-105%);
  }
  to {
    filter: brightness(1);
    transform: translateY(0);
  }
}

@keyframes docket-arrival {
  from {
    clip-path: inset(0 0 100% 0);
    filter: brightness(1.45);
  }
  to {
    clip-path: inset(0);
    filter: brightness(1);
  }
}

@keyframes proof-reveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0);
  }
}

@media (max-width: 68rem) {
  .hero-inner,
  .counter-intro,
  .aftermath-heading,
  .sources-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    min-height: 0;
  }

  .hero-docket {
    width: 100%;
    min-height: 28rem;
  }

  .exchange-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exchange-window {
    border: 0;
  }
}

@media (max-width: 50rem) {
  .site-header {
    min-height: 4.7rem;
  }

  .library-link {
    display: none;
  }

  .theme-toggle {
    padding-inline: 0.55rem;
  }

  .back-to-top {
    right: 0.55rem;
    bottom: 0.55rem;
    min-width: 44px;
    min-height: 44px;
  }

  .hero {
    padding-top: 6.25rem;
  }

  .hero h1 {
    font-size: clamp(3.55rem, 17vw, 4.8rem);
  }

  .hero::before {
    right: -0.15em;
    bottom: 0;
    font-size: 63vw;
  }

  .hero::after {
    top: 17%;
    right: -28%;
    width: 78vw;
  }

  .hero-docket {
    min-height: 27rem;
  }

  .hero-ceilings {
    padding-bottom: 15rem;
  }

  .amount-panel,
  .scope-grid,
  .essay-grid,
  .blocked-ledger,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .amount-control {
    border-right: 0;
    border-bottom: 1px solid var(--rule-inverse);
  }

  .exchange-wall {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .exchange-wall::before {
    right: auto;
    left: 0;
    max-width: 100%;
  }

  .window-head {
    min-height: auto;
    padding-bottom: 2rem;
  }

  .aperture {
    height: 24rem;
  }

  .window-result {
    min-height: 0;
  }

  .insight-strip {
    grid-template-columns: 1fr;
  }

  .copy-wrap {
    justify-items: start;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .timeline-step,
  .timeline-step:nth-child(-n + 2) {
    padding: 1.5rem 0 1.5rem 1.5rem;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    border-left: 1px solid var(--rule);
  }

  .ledger-mark {
    min-height: 16rem;
  }

  .essay h2 {
    position: static;
  }

  .pull-figure {
    font-size: clamp(2.7rem, 14vw, 4.2rem);
  }

  .footer-links {
    justify-items: start;
  }
}

@media (max-width: 24rem) {
  .identity-link {
    font-size: 0.62rem;
  }

  .theme-label {
    display: none;
  }

  .theme-toggle {
    width: 44px;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-docket,
  .pull-figure,
  .js-ready .exchange-wall.is-awake .aperture::before {
    animation: none;
  }

  .requested-stack,
  .admitted-stack {
    transition: none;
  }
}

@media print {
  .theme-toggle,
  .back-to-top {
    display: none;
  }
}
