/* UMLA — one hand washes the other. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --red: #e9462b;
  --paper: #eae8e3;
  --ink: #0b0b0b;
  --yellow: #f2ee1c;
  --alert: #b42318;
  --bg: var(--red);
  --fg: var(--ink);
  --pad: clamp(16px, 2vw, 28px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--fg);
  transition: background-color 0.7s ease, color 0.7s ease;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "Archivo", "Arial Narrow", Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-stretch: 100%;
  font-size: 16px;
  line-height: 1.05;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Without JavaScript every section carries its own colour. */
html:not(.js) [data-bg="red"] { background: var(--red); color: var(--ink); }
html:not(.js) [data-bg="paper"] { background: var(--paper); color: var(--ink); }
html:not(.js) [data-bg="yellow"] { background: var(--yellow); color: var(--ink); }
html:not(.js) [data-bg="ink"] { background: var(--ink); color: var(--paper); }

a { color: inherit; }
p, h1, h2, h3 { margin: 0; }
button { font: inherit; text-transform: inherit; color: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.skip:focus { left: 8px; }

/* ── the mark: both hands wash the face ───────────────────────────────────────
   Traced from the GPT Image 2 drawing (tools/trace-logo.mjs). One colour: currentColor. */
.mark { display: block; overflow: visible; }
.mark .body { transform-box: view-box; }
/* The opening: the mark fills from the bottom up, like water rising. The clip leaves room
   below for the drops, which fall past the drawing's box. */
.js .mark-full {
  clip-path: inset(100% -10% -40% -10%);
  transform: translateY(14px);
  transition: clip-path 1.5s cubic-bezier(0.6, 0, 0.2, 1) 0.35s, transform 1.4s var(--ease) 0.35s;
}
.js .mark-full.ready { clip-path: inset(-10% -10% -40% -10%); transform: none; }
/* The water keeps running off the hands. */
.mark-full .drop {
  transform-box: fill-box;
  transform-origin: 50% 0;
  animation: drip 2.6s cubic-bezier(0.55, 0, 0.9, 0.55) infinite;
  animation-delay: calc(var(--d, 0) * 0.85s);
}
.mark-full .drop-2 { --d: 1; }
.mark-full .drop-3 { --d: 2; }
@keyframes drip {
  0% { transform: translateY(-18px) scaleY(0.5); opacity: 0; }
  14% { transform: translateY(0) scaleY(1); opacity: 1; }
  72% { transform: translateY(64px) scaleY(1.15); opacity: 1; }
  100% { transform: translateY(96px) scaleY(1.2); opacity: 0; }
}
/* A click (or the right words): the head dips into the water, the drops let go at once. */
.mark-full.washing { animation: wash 1.1s var(--ease); }
.mark-full.washing .drop { animation-duration: 0.9s; animation-delay: calc(var(--d, 0) * 0.08s); }
@keyframes wash {
  0% { transform: none; }
  35% { transform: translateY(14px) rotate(4deg); }
  65% { transform: translateY(-4px) rotate(-1.5deg); }
  100% { transform: none; }
}

/* ── header ───────────────────────────────────────────────────────────────── */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: calc(var(--pad) * 0.6) var(--pad);
  background: var(--bg);
  transition-property: opacity, transform, background-color, color;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition-duration: 0.4s, 0.4s, 0.7s, 0.7s;
  transition-timing-function: ease, var(--ease), ease, ease;
}
.past-hero .bar { opacity: 1; transform: none; pointer-events: auto; }
.bar-mark { color: inherit; display: block; }
.bar-mark .mark { width: 50px; height: 50px; }
.bar-nav { align-self: center; display: flex; gap: clamp(14px, 2vw, 28px); font-size: clamp(16px, 1.5vw, 20px); }
.bar-nav a { text-decoration: none; }
.bar-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
/* X: the logo drawn inline, in whatever colour the section gives the text */
.x-link { display: inline-flex; align-items: center; gap: 0.45em; text-decoration: none; }
.x-logo { flex: none; width: 0.95em; height: 0.95em; fill: currentColor; transition: transform 0.25s var(--ease); }
.x-link:hover .x-logo { transform: rotate(-8deg) scale(1.15); }
.x-foot:hover span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ── hero ─────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr); /* the nowrap wordmark must not size its own column */
  padding: var(--pad) var(--pad) 0;
}
.wordmark {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.78;
  letter-spacing: -0.04em;
  white-space: nowrap;
  min-width: 0;
  font-size: 26vw;
}
.wordmark span { display: inline-block; padding-right: 0.05em; } /* gives back the last letter's negative tracking */
.hero .wordmark {
  transform-origin: 0 0;
  transform: translateY(calc(var(--hero-p, 0) * -10vh)) scale(calc(1 - var(--hero-p, 0) * 0.3));
  opacity: calc(1 - var(--hero-p, 0) * 0.9);
}
.hero-hands {
  justify-self: center;
  align-self: center;
  background: none;
  border: 0;
  padding: 2vh;
  cursor: pointer;
}
.hero-hands > .mark-wrap {
  display: block;
  transform: translateY(var(--lift, 0)) rotate(var(--lean, 0deg));
  transition: transform 0.6s var(--ease);
}
.hero-hands .mark { width: min(46vh, 70vw); height: auto; }
.hero-line {
  text-align: center;
  font-size: clamp(16px, 4.4vw, 42px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  padding-bottom: calc(var(--pad) * 1.3);
}

/* ── story ────────────────────────────────────────────────────────────────── */
.manifesto { padding: 26vh var(--pad) 20vh; }
.kicker { font-size: clamp(16px, 1.4vw, 20px); margin-bottom: 5vh; }
.big {
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(34px, 6.3vw, 108px);
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.w > span {
  display: inline-block;
  transform: translateY(112%);
  transition: transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 26ms);
}
.in .w > span { transform: none; }

.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }

.code { padding: 6vh var(--pad) 22vh; }
.label { font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; margin-bottom: 3vh; }
.chapters { list-style: none; padding: 0; margin: 0; border-bottom: 2px solid currentColor; }
.chapters li {
  display: grid;
  grid-template-columns: 7ch 1.1fr 1fr;
  gap: 2vw;
  align-items: start;
  border-top: 2px solid currentColor;
  margin: 0 calc(var(--pad) * -1);
  padding: 22px var(--pad) 40px;
  transition: background-color 0.35s ease, color 0.35s ease, opacity 0.8s ease, transform 0.8s var(--ease);
}
.chapters li:hover { background: var(--fg); color: var(--bg); }
.js .chapters li { transition: background-color 0.35s ease, color 0.35s ease, opacity 0.8s ease, transform 0.8s var(--ease); }
.num { font-size: clamp(16px, 1.4vw, 20px); padding-top: 0.3em; }
.chapters h3 {
  font-weight: 900;
  font-stretch: 120%;
  font-size: clamp(30px, 4.4vw, 70px);
  line-height: 0.88;
  letter-spacing: -0.035em;
}
.chapters p { font-size: clamp(15px, 1.25vw, 19px); line-height: 1.08; max-width: 34ch; padding-top: 0.3em; }

.slogan { min-height: 92svh; display: grid; place-items: center; text-align: center; padding: 12vh var(--pad); }
.slogan .big { font-size: clamp(46px, 10vw, 170px); font-stretch: 125%; font-weight: 900; max-width: 11ch; }

/* ── the door ─────────────────────────────────────────────────────────────── */
/* #door is this section: "Enter" lands on it, the title clear of the fixed header. */
.gate { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: max(14vh, 100px) var(--pad) 14vh; }
.gate-title {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(54px, 12.5vw, 230px);
  line-height: 0.8;
  letter-spacing: -0.045em;
  margin-bottom: 7vh;
}
.door-riddle { margin: -3vh 0 5vh; max-width: 30ch; font-size: clamp(18px, 2.2vw, 30px); line-height: 1.05; }
.open .door-riddle { display: none; }
.door label { display: block; font-size: clamp(16px, 1.5vw, 20px); margin-bottom: 10px; }
.door-row { display: flex; gap: 16px; align-items: stretch; flex-wrap: wrap; }
.door input {
  flex: 1 1 320px;
  min-width: 0;
  background: transparent;
  border: 0;
  border-bottom: 3px solid currentColor;
  border-radius: 0;
  color: inherit;
  font: inherit;
  font-weight: 900;
  font-size: clamp(28px, 5vw, 76px);
  letter-spacing: 0.06em;
  padding: 6px 0;
  text-transform: uppercase;
}
.door input:focus { outline: none; border-bottom-color: var(--red); }
.door input::placeholder { color: currentColor; opacity: 0.22; }
/* Already inside: no empty, greyed field, just the way in (and a way out). */
.open .door label, .open .door-row { display: none; }
.door .door-lock {
  display: block;
  min-height: 44px; /* a thumb-sized target, not a 15px line */
  margin-top: 8px;
  padding: 0;
  background: none;
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: 0.7;
}
.door .door-lock:hover { background: none; opacity: 1; }
.door .door-lock[hidden] { display: none; }
.door button {
  background: var(--red);
  color: var(--ink);
  border: 0;
  padding: 0 clamp(22px, 3vw, 44px);
  min-height: 64px;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 900;
  cursor: pointer;
  transition: background-color 0.25s ease;
}
.door button:hover { background: var(--paper); }
.door button:disabled { opacity: 0.4; cursor: default; }
.door-msg { min-height: 1.3em; margin-top: 22px; font-size: clamp(16px, 1.6vw, 22px); }
.open .door-msg { color: var(--red); }
.door.wrong { animation: shake 0.45s var(--ease); }
@keyframes shake {
  20% { transform: translateX(-14px); }
  40% { transform: translateX(12px); }
  60% { transform: translateX(-8px); }
  80% { transform: translateX(4px); }
}

/* ── the workshop (behind the door) ───────────────────────────────────────── */
.workshop { padding: 16vh var(--pad) 18vh; }
.workshop[hidden] { display: none; }
.ws-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid currentColor; padding-bottom: 16px; }
.ws-head .label { margin: 0; font-size: clamp(40px, 7vw, 120px); font-weight: 900; font-stretch: 125%; line-height: 0.85; letter-spacing: -0.04em; }
.wallet { display: flex; gap: 14px; align-items: center; }
#account { font-size: 15px; text-transform: none; }

.tabs { display: flex; margin: 26px 0 0; }
.tabs button {
  flex: 1;
  background: transparent;
  border: 2px solid currentColor;
  padding: 16px 10px;
  cursor: pointer;
  font-size: clamp(15px, 1.4vw, 20px);
}
.tabs button + button { margin-left: -2px; }
.tabs button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

#launch { margin-top: 26px; }
fieldset { border: 0; border-top: 2px solid currentColor; margin: 0; padding: 22px 0 34px; min-width: 0; }
legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 8px;
  font-weight: 900;
  font-stretch: 118%;
  font-size: clamp(26px, 3.2vw, 48px);
  line-height: 0.9;
  letter-spacing: -0.03em;
}
legend + * { clear: both; }
.workshop label { display: block; font-size: 14px; letter-spacing: 0.02em; margin-top: 16px; }
.workshop input:not([type="range"]):not([type="file"]),
.workshop textarea,
.workshop select {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid currentColor;
  border-radius: 0;
  padding: 10px 0;
  color: inherit;
  font: 600 18px/1.25 "Archivo", Arial, sans-serif;
  font-stretch: 100%;
  text-transform: none;
  letter-spacing: 0;
}
.workshop textarea { resize: vertical; }
.workshop select {
  appearance: none;
  cursor: pointer;
  padding-right: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230b0b0b' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 4px center / 14px 10px;
}
.workshop input:focus, .workshop textarea:focus, .workshop select:focus { outline: none; border-bottom-color: var(--red); border-bottom-width: 3px; }
.workshop input[type="file"] { display: block; margin-top: 8px; font: 600 14px/1.2 "Archivo", Arial, sans-serif; text-transform: none; }
.workshop input[type="range"] { display: block; width: 100%; margin-top: 12px; accent-color: var(--ink); }
.workshop ::placeholder { color: currentColor; opacity: 0.38; }
.tax strong { font-size: clamp(26px, 3vw, 44px); font-weight: 900; margin-left: 10px; vertical-align: -0.1em; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 28px; }
.row-end { align-items: end; }
details { margin-top: 16px; }
summary { cursor: pointer; font-size: 14px; }
.hint { font-size: 13px; letter-spacing: 0.02em; line-height: 1.25; margin-top: 8px; opacity: 0.72; }
code { font-size: 0.95em; text-transform: none; }

.logo { display: flex; gap: 22px; align-items: flex-start; }
.logo > div { flex: 1; min-width: 0; }
.logo img { width: 104px; height: 104px; object-fit: cover; border: 2px solid currentColor; margin-top: 16px; }

.btn {
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  padding: 14px 22px;
  cursor: pointer;
  font-weight: 800;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover:not(:disabled) { background: var(--red); border-color: var(--red); color: var(--ink); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-big { width: 100%; padding: 24px; font-size: clamp(22px, 3vw, 44px); font-weight: 900; font-stretch: 122%; letter-spacing: -0.02em; }
.go { border-top: 2px solid currentColor; padding-top: 26px; }

.notice { margin-top: 18px; border: 2px solid currentColor; background: var(--yellow); color: var(--ink); padding: 14px 16px; }
.error { color: var(--alert); margin-top: 14px; white-space: pre-wrap; word-break: break-word; text-transform: none; font-size: 16px; }

.claim { margin-top: 12vh; border-top: 2px solid currentColor; padding-top: 22px; }
.claim > .label { font-size: clamp(32px, 4vw, 64px); font-weight: 900; font-stretch: 122%; letter-spacing: -0.03em; margin: 0; }
.claim-info { border: 2px solid currentColor; padding: 16px; margin: 16px 0; display: grid; gap: 6px; text-transform: none; }
.claim-info b { font-variant-numeric: tabular-nums; }

/* "Out of UMLA": every token from the factories (src/out-panel.js) */
.out { margin-top: 12vh; border-top: 2px solid currentColor; padding-top: 22px; }
.out-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; }
.out-head .label { font-size: clamp(32px, 4vw, 64px); font-weight: 900; font-stretch: 122%; letter-spacing: -0.03em; margin: 0; }
.out-count { font-size: clamp(14px, 1.2vw, 17px); font-weight: 700; }
.tabs[hidden] { display: none; }
.out .tabs { margin-top: 16px; }
.out-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.out-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-areas: "logo names" "logo meta" "acts acts";
  gap: 4px 14px;
  align-items: center;
  border: 2px solid currentColor;
  padding: 14px;
}
.out-logo { grid-area: logo; width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; background: var(--ink); color: var(--paper); font-weight: 900; font-stretch: 125%; font-size: 26px; }
.out-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.out-names { grid-area: names; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.out-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; font-stretch: 115%; font-size: 20px; letter-spacing: -0.01em; }
.out-sym { white-space: nowrap; font-size: 14px; opacity: 0.7; }
.out-meta { grid-area: meta; font-size: 12px; letter-spacing: 0.02em; line-height: 1.3; opacity: 0.72; }
.out-acts { grid-area: acts; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; padding-top: 4px; border-top: 2px solid currentColor; }
.out-ca { background: none; border: 0; padding: 8px 0; font: inherit; font-size: 13px; text-transform: none; font-variant-numeric: tabular-nums; cursor: pointer; }
.out-acts a { padding: 8px 0; font-size: 13px; font-weight: 700; text-decoration: none; }
.out-claim { background: none; border: 0; padding: 8px 0; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.out-ca:hover, .out-claim:hover, .out-acts a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Launched from this page just now: lands lit, at the top. */
.out-item.fresh { background: var(--yellow); color: var(--ink); border-color: var(--ink); animation: freshIn 0.9s var(--ease); }
@keyframes freshIn { from { transform: translateY(-14px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.out-more { margin-top: 16px; }
.wallet .account { text-transform: none; font-variant-numeric: tabular-nums; }

/* ── a network not open for launches yet (config/chains.json "soon") ─────────────
   The door's ink, a huge "Soon.", and the loading screen's water rising and falling at the
   bottom, three waves rolling on it: the water is still rising here. */
.soon {
  --head-bg: var(--red);
  --crest-back: var(--yellow);
  --crest-mid: #f7a18c;
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  --water-low: clamp(70px, 12vh, 120px);
  --water-high: clamp(110px, 19vh, 180px);
  margin-top: 26px;
  background: var(--ink);
  color: var(--paper);
}
.soon[hidden] { display: none; }
/* The water keeps to its own room under the words (the text block reserves it): it never covers them. */
.soon-water { position: absolute; left: 0; right: 0; bottom: 0; height: var(--water-low); background: var(--red); animation: level 6s ease-in-out infinite alternate; }
@keyframes level { to { height: var(--water-high); } }
.soon-crest { position: absolute; left: 0; right: 0; bottom: calc(100% - 2px); height: 60px; overflow: hidden; }
.soon-in { position: relative; z-index: 1; display: grid; gap: 18px; padding: clamp(22px, 4vw, 48px) clamp(22px, 4vw, 48px) calc(var(--water-high) + 76px); }
.soon-kicker { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; }
.soon-kicker::before { content: ""; flex: none; width: 0.7em; height: 0.7em; background: var(--red); border-radius: 0 50% 50% 50%; transform: rotate(45deg); }
.soon-title { font-weight: 900; font-stretch: 125%; font-size: clamp(76px, 16vw, 230px); line-height: 0.8; letter-spacing: -0.05em; }
.soon-line { max-width: 32ch; font-size: clamp(17px, 1.7vw, 22px); font-weight: 800; font-stretch: 108%; line-height: 1.15; }
.soon-small { font-size: clamp(14px, 1.3vw, 16px); font-weight: 600; opacity: 0.75; }
.soon-btn { justify-self: start; min-height: 60px; padding: 14px 26px; background: var(--red); border-color: var(--red); color: var(--ink); font-size: clamp(15px, 1.6vw, 19px); font-weight: 900; font-stretch: 118%; }
.soon-btn:hover:not(:disabled) { background: var(--paper); border-color: var(--paper); color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .soon-water,
  .soon .crest { animation: none; }
}

/* ── the review popups (src/review.js) ────────────────────────────────────────────
   Built like the landing: a coloured head that says where things stand (red: read this;
   ink: in the wallet, on the chain; yellow: done), the body rising into it like water, thick
   rules, expanded capitals, and the door's red button to sign. */
:root {
  --chk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2'%3E%3Cpath d='M4 12.5 9.5 18 20 6'/%3E%3C/svg%3E");
}
/* The dialog is a transparent column: three waves on top (.review-crest), the panel under them
   (it scrolls). It rises from below like the loading screen's water and sinks when it closes. */
.review {
  --head-bg: var(--red);
  --head-fg: var(--ink);
  --crest-back: var(--yellow);
  --crest-mid: #f7a18c;
  --crest-h: 60px;
  width: min(660px, calc(100vw - 24px));
  max-height: calc(100svh - 12px);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.review[open] { display: flex; flex-direction: column; }
.review[data-state="busy"],
.review[data-state="fail"] { --head-bg: var(--ink); --head-fg: var(--paper); }
.review[data-state="done"] { --head-bg: var(--yellow); --head-fg: var(--ink); --crest-back: var(--red); }

.review-crest { position: relative; flex: none; height: var(--crest-h); margin-bottom: -2px; overflow: hidden; pointer-events: none; }
.crest { position: absolute; left: 0; bottom: 0; display: block; width: 200%; height: 100%; animation: roll 6s linear infinite; }
.crest path { transition: fill 0.5s ease; }
.crest-back { animation-duration: 9s; animation-direction: reverse; }
.crest-back path { fill: var(--crest-back); }
.crest-mid { animation-duration: 5.5s; }
.crest-mid path { fill: var(--crest-mid); }
.crest-front { animation-duration: 3.6s; animation-direction: reverse; }
.crest-front path { fill: var(--head-bg); }
.review-panel { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; background: var(--paper); }
/* the grids below set display: hidden must still win */
.review [hidden] { display: none !important; }
.review::backdrop { background: color-mix(in srgb, var(--ink) 82%, transparent); backdrop-filter: blur(3px); animation: dim 0.5s ease; }
@keyframes dim { from { opacity: 0; } }
/* Water rising into place; and sinking out (src/review.js adds .draining, then closes). */
.review[open] { animation: rise 0.9s cubic-bezier(0.22, 0.9, 0.3, 1); }
.review.draining { animation: sink 0.55s cubic-bezier(0.6, 0, 0.8, 0.4) forwards; }
.review.draining::backdrop { animation: undim 0.55s ease forwards; }
@keyframes rise { from { transform: translateY(calc(50vh + 100%)); } }
@keyframes sink { to { transform: translateY(calc(50vh + 100%)); } }
@keyframes undim { to { opacity: 0; } }

.review-head {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: clamp(18px, 3vw, 28px) clamp(18px, 3vw, 30px) calc(clamp(18px, 3vw, 28px) + 20px);
  background: var(--head-bg);
  color: var(--head-fg);
  transition: background-color 0.5s ease, color 0.5s ease;
}
/* a drop before the kicker, the same drop as the rain and the logo */
.review-kicker { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; }
.review-kicker::before { content: ""; flex: none; width: 0.7em; height: 0.7em; background: currentColor; border-radius: 0 50% 50% 50%; transform: rotate(45deg); }
.review-title { font-weight: 900; font-stretch: 125%; font-size: clamp(34px, 6vw, 64px); line-height: 0.86; letter-spacing: -0.04em; overflow-wrap: anywhere; }
/* the body rises into the head like water */
.review-wave { position: absolute; left: 0; bottom: -1px; display: block; width: 200%; height: 22px; animation: roll 7s linear infinite; }
.review-wave path { fill: var(--paper); }

.review-in { display: grid; gap: 18px; padding: 6px clamp(18px, 3vw, 30px) clamp(18px, 3vw, 30px); }
.review-body { display: grid; gap: 16px; }

.review-token { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px; background: var(--ink); color: var(--paper); }
.review-logo { width: 76px; height: 76px; display: grid; place-items: center; overflow: hidden; background: var(--red); color: var(--ink); font-weight: 900; font-stretch: 125%; font-size: 38px; }
.review-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.review-names { display: grid; gap: 4px; min-width: 0; }
.review-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; font-stretch: 122%; font-size: clamp(22px, 3.2vw, 30px); line-height: 0.95; letter-spacing: -0.02em; }
.review-sym { font-size: 14px; font-weight: 800; color: var(--red); }
.review-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.3; text-transform: none; opacity: 0.8; }

.review-rows { margin: 0; border-top: 3px solid var(--ink); }
.review-row { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 11px 0; border-bottom: 2px solid var(--ink); }
.review-row dt { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; opacity: 0.6; }
.review-row dd { margin: 0; overflow-wrap: anywhere; font-size: 16px; font-weight: 800; font-stretch: 110%; line-height: 1.15; }
.review-row.strong dd { font-size: clamp(18px, 2.4vw, 22px); font-weight: 900; font-stretch: 120%; }
.review-row dd.mono { text-transform: none; font-stretch: 100%; font-variant-numeric: tabular-nums; font-size: 14px; }
.review-row.strong dd.mono { font-size: 15px; }
.review-warn { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px 14px; background: var(--yellow); font-size: 14px; font-weight: 800; line-height: 1.2; }
.review-warn::before { content: ""; width: 12px; height: 12px; margin: 3px 2px 0; background: var(--ink); border-radius: 0 50% 50% 50%; transform: rotate(45deg); }
.review-hint { font-size: 12px; font-weight: 600; line-height: 1.35; opacity: 0.7; }

/* The steps, numbered like the chapters. In progress: a drop falls into a red box. Done: an ink
   box with a paper tick (the pseudo-elements share the first cell, the text sits in the second). */
.review-steps { display: grid; margin: 0; padding: 0; list-style: none; counter-reset: step; border-top: 3px solid var(--ink); }
.review-steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 2px solid var(--ink); font-size: clamp(16px, 2vw, 19px); font-weight: 900; font-stretch: 112%; opacity: 0.3; transition: opacity 0.3s ease; }
.review-steps li::before { content: counter(step, decimal-leading-zero); grid-column: 1; grid-row: 1; display: grid; place-items: center; width: 44px; height: 44px; box-sizing: border-box; border: 2px solid currentColor; font-size: 15px; font-stretch: 125%; }
.review-steps li.now,
.review-steps li.done { opacity: 1; }
.review-steps li.now::before { content: ""; background: var(--red); border-color: var(--red); }
.review-steps li.now::after { content: ""; grid-column: 1; grid-row: 1; place-self: center; width: 12px; height: 12px; background: var(--ink); border-radius: 0 50% 50% 50%; animation: dripStep 1.1s cubic-bezier(0.55, 0, 0.85, 0.45) infinite; }
@keyframes dripStep {
  0% { transform: translateY(-14px) rotate(45deg) scale(0.6); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateY(14px) rotate(45deg) scale(1); opacity: 0; }
}
.review-steps li.done::before { content: ""; background: var(--ink); border-color: var(--ink); }
.review-steps li.done::after { content: ""; grid-column: 1; grid-row: 1; place-self: center; width: 22px; height: 22px; background: var(--paper); -webkit-mask: var(--chk) center / contain no-repeat; mask: var(--chk) center / contain no-repeat; }
@keyframes spin { to { transform: rotate(1turn); } }
.review-msg { padding: 12px 14px; background: var(--red); color: var(--ink); font-size: 14px; font-weight: 800; line-height: 1.25; text-transform: none; }

.review-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 16px; font-weight: 900; font-stretch: 112%; }
.review-links a { padding: 4px 0; text-decoration: none; border-bottom: 2px solid currentColor; }
.review-links a:hover { color: var(--red); }

/* The door's buttons: "Back" outlined, the signature in red. */
.review-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.review-actions:has(> [hidden]) { grid-template-columns: 1fr; }
.review-actions [hidden] { display: none; }
.review-actions .btn { min-height: 62px; padding: 12px 18px; font-size: clamp(15px, 1.8vw, 19px); font-weight: 900; font-stretch: 118%; letter-spacing: 0.01em; }
.review-actions #reviewGo { background: var(--red); border-color: var(--red); color: var(--ink); }
.review-actions #reviewGo:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.review-actions #reviewBack:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

@media (max-width: 560px) {
  /* a sheet from the bottom of the screen: the water comes up to it */
  .review { --crest-h: 46px; width: 100vw; max-width: 100vw; max-height: 96svh; margin: auto 0 0; }
  .review-row { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .review-actions { grid-template-columns: 1fr 1.4fr; }
}
@media (prefers-reduced-motion: reduce) {
  .review[open],
  .review.draining,
  .review::backdrop,
  .crest,
  .review-wave,
  .review-steps li.now::after { animation: none; }
}

/* ── Reown AppKit (src/reown.js), dressed like the door: ink, paper, the red button ──
   AppKit sets these on :root from its own <style> tags; html:root outranks them. */
html:root {
  --apkt-tokens-theme-overlay: rgba(11, 11, 11, 0.82);
  --apkt-tokens-theme-backgroundPrimary: #0b0b0b;
  --apkt-tokens-theme-backgroundInvert: #eae8e3;
  --apkt-tokens-theme-textPrimary: #eae8e3;
  --apkt-tokens-theme-textSecondary: #a39f97;
  --apkt-tokens-theme-textTertiary: #c9c5bd;
  --apkt-tokens-theme-textInvert: #0b0b0b;
  --apkt-tokens-theme-borderPrimary: #2b2a28;
  --apkt-tokens-theme-borderPrimaryDark: #3a3936;
  --apkt-tokens-theme-borderSecondary: #55534f;
  --apkt-tokens-theme-foregroundPrimary: #171716;
  --apkt-tokens-theme-foregroundSecondary: #20201e;
  --apkt-tokens-theme-foregroundTertiary: #2b2a28;
  --apkt-tokens-theme-iconDefault: #a39f97;
  --apkt-tokens-theme-iconInverse: #eae8e3; /* in dark mode, the LIGHT icons (header ?, ✕) */
  --apkt-tokens-core-backgroundAccentPrimary: #e9462b;
  --apkt-tokens-core-textAccentPrimary: #e9462b;
  --apkt-tokens-core-borderAccentPrimary: #e9462b;
  --apkt-tokens-core-iconAccentPrimary: #e9462b;
  --apkt-tokens-core-foregroundAccent010: rgba(233, 70, 43, 0.1);
  --apkt-tokens-core-foregroundAccent020: rgba(233, 70, 43, 0.2);
  --apkt-tokens-core-foregroundAccent040: rgba(233, 70, 43, 0.4);
  --apkt-tokens-core-foregroundAccent060: rgba(233, 70, 43, 0.6);
  --apkt-fontWeight-regular: 500;
  --apkt-fontWeight-medium: 800;
}

/* ── footer ───────────────────────────────────────────────────────────────── */
.foot { padding: 18vh var(--pad) var(--pad); overflow: hidden; }
.foot-lines { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; font-size: clamp(15px, 1.4vw, 20px); }
.foot-mark { margin-top: 8vh; }

@media (max-width: 720px) {
  .chapters li { grid-template-columns: 4ch 1fr; row-gap: 12px; }
  .chapters p { grid-column: 2; }
  .logo { flex-direction: column; gap: 0; }
  .bar-mark .mark { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .mark-full { opacity: 1; transform: none; }
  .mark-full .drop { animation: none; }
  .w > span { transform: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ── finishing ────────────────────────────────────────────────────────────── */
#account:empty { display: none; }
.workshop input[type="file"]::file-selector-button {
  font: 800 14px/1 "Archivo", Arial, sans-serif;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  padding: 10px 14px;
  margin-right: 12px;
  cursor: pointer;
}
.workshop input[type="file"]::file-selector-button:hover { background: var(--red); border-color: var(--red); color: var(--ink); }

/* ── server-side door, workshop page ──────────────────────────────────────── */
.door-go {
  display: inline-block;
  margin-top: 18px;
  font-size: clamp(22px, 3vw, 44px);
  font-weight: 900;
  font-stretch: 120%;
  letter-spacing: -0.02em;
  color: var(--red);
  text-decoration: none;
}
.door-go:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.door-go[hidden] { display: none; }
.bar-leave {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: inherit;
  font-weight: 700;
}
.bar-leave:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ── 04 — Its address ─────────────────────────────────────────────────────── */
.ca-value {
  margin: 14px 0 10px;
  padding: 16px;
  border: 2px solid currentColor;
  font: 700 clamp(15px, 2.1vw, 26px)/1.2 "Archivo", Arial, sans-serif;
  font-stretch: 100%;
  letter-spacing: 0.01em;
  text-transform: none;
  word-break: break-all;
  user-select: all;
}
.ca-value.muted { font-size: 15px; user-select: auto; opacity: 0.7; }
.ca-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hint.warn { background: var(--yellow); color: var(--ink); padding: 8px 10px; opacity: 1; }
.fees-yours { margin: 14px 0 22px; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.25; }
.fees-yours strong { background: var(--yellow); color: var(--ink); padding: 1px 5px; }

/* === landing v2: an experience ========================================== */

/* -- the opening: letters rise, lines rise, hints appear -- */
.hero { position: relative; overflow: hidden; }
.hero > .wordmark, .hero > .hero-hands, .hero > .hero-line { position: relative; z-index: 1; }
.wordmark .ch { display: inline-block; padding-right: 0; }
/* the letters rise from their own baseline: clipped below, free above */
.js .hero .wordmark > span { clip-path: inset(-40% -6% 0 -6%); vertical-align: top; }
.js .hero .wordmark .ch { transform: translateY(102%); }
.intro .hero .wordmark .ch { transform: none; transition: transform 1.1s cubic-bezier(0.2, 0.9, 0.2, 1) calc(var(--i) * 90ms); }
.hero-line .line { display: block; overflow: hidden; }
.hero-line .line > span { display: inline-block; }
.js .hero-line .line > span { transform: translateY(110%); }
.intro .hero-line .line > span { transform: none; transition: transform 0.9s var(--ease) 0.9s; }
.intro .hero-line .line + .line > span { transition-delay: 1.02s; }
.hero-hint {
  position: absolute;
  z-index: 1;
  left: var(--pad);
  right: var(--pad);
  bottom: calc(var(--pad) * 1.3);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
.intro .hero-hint { opacity: 0.65; transition-delay: 1.6s; }
.past-hero .hero-hint { opacity: 0; transition-delay: 0s; }
.hero-hint span:first-child::after { content: ""; --arw: var(--arw-d); animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }
@media (max-width: 720px) { .hero-hint { display: none; } }
/* The hints get their own row under the two lines: centred text and corner hints never meet. */
@media (min-width: 721px) { .hero-line { padding-bottom: calc(var(--pad) * 1.3 + 30px); } }

/* -- arrows and separators drawn here, not taken from the font: Archivo has no ↓ → ↗ ✺, and
   every device would fill the gap with a different typeface (or an emoji) -- */
:root {
  --arw-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.8'%3E%3Cpath d='M2 12h18M13 5l7 7-7 7'/%3E%3C/svg%3E");
  --arw-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.8'%3E%3Cpath d='M12 2v18M5 13l7 7 7-7'/%3E%3C/svg%3E");
  --arw-ne: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.8'%3E%3Cpath d='M5 19 18 6M8 5h11v11'/%3E%3C/svg%3E");
}
.arw,
.hero-hint span:first-child::after {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-left: 0.32em;
  vertical-align: -0.08em;
  background: currentColor;
  -webkit-mask: var(--arw) center / contain no-repeat;
  mask: var(--arw) center / contain no-repeat;
}
.arw-r { --arw: var(--arw-r); }
.arw-d { --arw: var(--arw-d); }
.arw-ne { --arw: var(--arw-ne); }

/* -- water under the cursor -- */
.ripple {
  position: absolute;
  z-index: 0;
  width: 140px;
  height: 140px;
  margin: -70px 0 0 -70px;
  border: 2px solid currentColor;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: ripple 1.25s cubic-bezier(0.2, 0.6, 0.3, 1) forwards;
}
@keyframes ripple {
  0% { transform: scale(0.08); opacity: 0.5; }
  100% { transform: scale(calc(1.5 * var(--s, 1))); opacity: 0; }
}

/* -- a cursor that knows what it is over -- */
.cursor { display: none; }
.has-cursor .cursor {
  display: grid;
  place-items: center;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 80;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 2px solid currentColor;
  border-radius: 50%;
  pointer-events: none;
  color: var(--fg);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease), background-color 0.3s ease, opacity 0.25s ease, color 0.7s ease;
}
.cursor.hover { width: 62px; height: 62px; margin: -31px 0 0 -31px; background: color-mix(in srgb, currentColor 14%, transparent); }
.cursor.label { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--fg); }
.cursor.label::after { content: attr(data-label); color: var(--bg); }
.cursor.text, .cursor.away { opacity: 0; }

/* -- reading progress, under the bar: a faint rail and the part already read -- */
.bar-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: color-mix(in srgb, currentColor 16%, transparent);
}
.bar-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  transform-origin: 0 50%;
  transform: scaleX(var(--read, 0));
}

/* -- the manifesto lights up as you read -- */
.js .rw > span { opacity: 0.14; transition: opacity 0.4s ease; }
.js .rw.lit > span { opacity: 1; }

/* -- the band -- */
.marquee {
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(14px, 2vw, 26px) 0;
  margin: 2vh 0;
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  white-space: nowrap;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(34px, 6.5vw, 104px);
  line-height: 1;
  letter-spacing: -0.035em;
  will-change: transform;
}
/* a drop between the phrases (the same drop as the rain and the logo) */
.marquee-track i { flex: none; width: 0.42em; height: 0.42em; margin: 0 0.1em; background: var(--red); border-radius: 0 50% 50% 50%; transform: rotate(45deg); }

/* -- the code, chapter by chapter -- */
.code-num, .code-bar, .code-count { display: none; }
@media (min-width: 900px) {
  .code { padding-top: 10vh; }
  .code-grid { display: grid; grid-template-columns: minmax(280px, 40%) 1fr; gap: 4vw; align-items: start; }
  .code-aside { position: sticky; top: 13vh; height: 74vh; display: flex; flex-direction: column; }
  .code-num {
    display: block;
    flex: 1;
    margin: 2vh 0;
    overflow: hidden;
    font-weight: 900;
    font-stretch: 125%;
    font-size: clamp(150px, 21vw, 360px);
    line-height: 0.82;
    letter-spacing: -0.06em;
  }
  .code-num span { display: inline-block; }
  .code-num .in-up { animation: numUp 0.65s var(--ease); }
  .code-num .in-down { animation: numDown 0.65s var(--ease); }
  .code-bar { display: block; height: 3px; background: color-mix(in srgb, currentColor 16%, transparent); }
  .code-bar span { display: block; height: 100%; background: currentColor; transform-origin: 0 50%; transform: scaleX(0.1667); transition: transform 0.6s var(--ease); }
  .code-count { display: block; margin-top: 12px; font-size: 16px; }
  .chapters { border-bottom: 0; }
  .chapters li {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2.5vh;
    min-height: 66vh;
    margin: 0;
    padding: 0;
    border-top: 0;
    opacity: 0.18;
    transition: opacity 0.5s ease;
  }
  .chapters li.active { opacity: 1; }
  .chapters li:hover { background: none; color: inherit; }
  .chapters li .num { display: none; }
  .chapters h3 { font-size: clamp(48px, 6vw, 108px); }
  .chapters p { font-size: clamp(17px, 1.5vw, 23px); max-width: 30ch; padding: 0; }
}
@keyframes numUp { from { transform: translateY(70%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes numDown { from { transform: translateY(-70%); opacity: 0; } to { transform: none; opacity: 1; } }

/* -- from the top to the table -- */
.slogan {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 118svh;
  padding: 12vh var(--pad);
  text-align: center;
}
.slogan-line {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(44px, 9vw, 168px);
  line-height: 0.88;
  letter-spacing: -0.045em;
}
.rain { position: absolute; left: 0; right: 0; top: 30%; bottom: 25%; pointer-events: none; }
.raindrop {
  position: absolute;
  top: 0;
  left: var(--x);
  width: calc(16px * var(--size));
  height: calc(16px * var(--size));
  opacity: 0;
  animation: fall var(--dur) cubic-bezier(0.55, 0, 0.85, 0.45) var(--delay) infinite;
  animation-play-state: paused;
}
.rain.on .raindrop { animation-play-state: running; }
.raindrop::before { content: ""; position: absolute; inset: 0; background: currentColor; border-radius: 0 50% 50% 50%; transform: rotate(45deg); }
@keyframes fall {
  0% { transform: translateY(-20px) scaleY(0.6); opacity: 0; }
  12% { opacity: 1; transform: translateY(0) scaleY(1); }
  88% { opacity: 1; }
  100% { transform: translateY(var(--fall, 320px)) scaleY(1.2); opacity: 0; }
}

/* -- the door opens: water rises and fills the screen, three waves rolling on top. The workshop
   opens under the same water (web/arrive.js) and the level drops (src/umla.js). -- */
.flood { position: fixed; inset: 0; z-index: 90; overflow: hidden; pointer-events: none; visibility: hidden; }
.flood.go,
.arriving .flood { visibility: visible; }
.flood-water {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  background: var(--red);
  color: var(--ink);
  transform: translateY(calc(100% + 130px)); /* below the screen, crests included */
  transition: transform 1.6s cubic-bezier(0.5, 0, 0.3, 1);
}
.flood.go .flood-water,
.arriving .flood-water { transform: none; }
.arriving .flood-water { transition: transform 1.4s cubic-bezier(0.65, 0, 0.35, 1); }
.arriving .flood.drain .flood-water { transform: translateY(calc(100% + 130px)); }
/* Each wave is 200 % wide and rolls by half its width: no seam. Three colours, three speeds,
   two directions, so the crests read as separate waves. */
.wave { position: absolute; left: 0; bottom: calc(100% - 2px); display: block; width: 200%; animation: roll 4s linear infinite; }
/* Each wave sinks a little deeper into the water than the one behind it, so the front one covers
   the others' bottom edges: no hairline where they meet the water. */
.wave-back { height: 120px; animation-duration: 7.5s; animation-direction: reverse; }
.wave-mid { bottom: calc(100% - 8px); height: 96px; animation-duration: 4.8s; }
.wave-front { bottom: calc(100% - 16px); height: 74px; animation-duration: 3.1s; animation-direction: reverse; }
/* Colours that stand out on the ink door AND on the paper workshop it drains over. */
.wave-back path { fill: var(--yellow); }
.wave-mid path { fill: #f7a18c; }
.wave-front path { fill: var(--red); }
@keyframes roll { to { transform: translateX(-50%); } }
/* The landing opens under DARK water: its crests (yellow, salmon, ink) sweep down over the red
   hero, and the opening plays as it passes. The door's water stays red. */
.arrive-ink .flood-water { background: var(--ink); color: var(--paper); }
.arrive-ink .wave-front path { fill: var(--ink); }
/* Safety net: if the script never drains it, the water still goes. */
.arriving .flood { animation: dry 0.01s 5s forwards; }
@keyframes dry { to { visibility: hidden; } }
.flood-body { position: absolute; inset: 0; display: grid; place-items: center; }
.flood-body .mark { width: min(28vh, 40vw); height: auto; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-12px) rotate(-2deg); } }
.gate-title { transition: letter-spacing 0.6s var(--ease); }
.gate:focus-within .gate-title { letter-spacing: -0.07em; }

/* -- the footer breathes -- */
.foot-mark .ch { transition: font-stretch 0.35s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .js .mark-full { clip-path: none; transform: none; }
  .js .hero .wordmark .ch, .js .hero-line .line > span { transform: none; }
  .js .rw > span { opacity: 1; }
  .flood { display: none; }
}
