/* onlyjensen.com — styles
   Palette mirrors js/engine/palette.js. Gold is reserved for forgiveness (seams, the mend, the ask). */

@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/newsreader-latin-opsz-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/newsreader-latin-opsz-italic.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('../fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #050607;
  --coal: #0d0f12;
  --coal-2: #14171b;
  --paper: #f3efe6;
  --soft: rgba(243, 239, 230, 0.78);
  --dim: #9a9ea6;
  --line: rgba(243, 239, 230, 0.13);
  --gold: #76b900;
  --gold-hot: #e2ffa8;
  --machine: #8fb4ff;
  --ice: #cfe9ff;
  --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: clamp(1.25rem, 5.2vw, 5.5rem);
  --col: min(34rem, 42vw);
  --vh: 1svh;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: #2a2d33 var(--ink);
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: clamp(0.95rem, min(0.55vw + 0.86rem, 1.1vh + 0.62rem), 1.22rem);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection {
  background: var(--gold);
  color: var(--ink);
}
a {
  color: inherit;
  text-decoration-color: rgba(118, 185, 0, 0.6);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-color: var(--gold);
  color: var(--gold-hot);
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}
h1,
h2,
h3,
p,
blockquote,
pre {
  margin: 0;
}
em {
  font-style: italic;
}

/* ───────────────────────── canvas + fallback poster ───────────────────────── */

#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100lvh;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
  pointer-events: none;
}
.gl-drawn #gl {
  opacity: 1;
}
.no-webgl #gl,
.gl-lost #gl {
  display: none;
}
/* Shown when WebGL is unavailable (or scripts are off): a quiet gold-seamed field instead of the 3D. */
.poster {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60vmax 60vmax at 78% 38%, rgba(118, 185, 0, 0.1), transparent 62%),
    radial-gradient(70vmax 50vmax at 12% 88%, rgba(207, 233, 255, 0.05), transparent 60%),
    url('../img/seams.svg') 74% 45% / min(118vmin, 78rem) no-repeat,
    var(--ink);
}
.no-webgl .poster,
.gl-lost .poster {
  display: block;
}

/* ───────────────────────── chrome ───────────────────────── */

.skip {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  transform: translateY(-300%);
  text-decoration: none;
  font-weight: 500;
}
.skip:focus {
  transform: none;
}

.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.9rem, 2vw, 1.4rem) var(--gutter);
  padding-top: max(clamp(0.9rem, 2vw, 1.4rem), env(safe-area-inset-top));
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(5, 6, 7, 0.72), rgba(5, 6, 7, 0.34) 55%, rgba(5, 6, 7, 0));
  text-shadow: 0 1px 12px rgba(5, 6, 7, 0.9);
}
.top > * {
  pointer-events: auto;
}
.mark {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--paper);
}
.mark em {
  color: var(--gold);
}
.tag {
  display: flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: right;
}
.tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(118, 185, 0, 0.8);
  flex: none;
}
.rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: transparent;
  pointer-events: none;
}
.rail i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, rgba(118, 185, 0, 0.2), var(--gold));
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll, 0));
}

.where {
  position: fixed;
  left: var(--gutter);
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  gap: 0.5em;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.where {
  transition: opacity 0.4s ease;
}
html[data-at='message'] .where,
html[data-at='rally'] .where {
  opacity: 0;
}
.where #where-n {
  color: var(--paper);
}
.where .sep {
  opacity: 0.5;
}
.where #where-t {
  margin-left: 0.9em;
  color: var(--gold);
}
html:not(.js) .where,
html:not(.js) .rail {
  display: none;
}

/* ───────────────────────── type ───────────────────────── */

/* datelines: a short rule and an italic line, set like a magazine, not a UI tag */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8em;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.02rem, 0.4vw + 0.9rem, 1.2rem);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--soft);
  margin-bottom: 1.2rem;
}
.eyebrow .sq {
  width: 2.2rem;
  height: 1px;
  background: var(--gold);
  flex: none;
}
h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.2rem, min(14.5vw, 25vh), 14rem);
  line-height: 0.84;
  letter-spacing: -0.035em;
  margin: 0 0 0.28em -0.04em;
  text-wrap: balance;
}
h1 em,
.rally-title em {
  color: var(--gold);
  /* gold with a hot core, like the seams */
  background: linear-gradient(100deg, #76b900 10%, #c6f562 45%, #76b900 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.06em;
}
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, min(5.1vw, 9.4vh), 5rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
  margin-bottom: 0.5em;
  text-wrap: balance;
}
h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.3rem, 0.6vw + 1.1rem, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--gold);
  margin-bottom: 0.8rem;
}
/* a filename stays a filename */
.eyebrow.file-head {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.72rem;
  color: var(--dim);
}
p {
  color: var(--soft);
  text-wrap: pretty;
}
p + p {
  margin-top: 0.9em;
}
.lede {
  font-size: 1.16em;
  max-width: 30rem;
  color: var(--paper);
}
.big {
  font-family: var(--serif);
  font-size: clamp(1.6rem, min(3.5vw, 6.3vh), 3.3rem);
  line-height: 1.04;
  letter-spacing: -0.018em;
  color: var(--paper);
  margin-bottom: 0.45em;
  text-wrap: balance;
}
.big.gold {
  color: var(--gold);
  font-size: clamp(2.6rem, min(6.4vw, 12vh), 6.2rem);
  font-style: italic;
  line-height: 0.95;
}
.huge {
  font-family: var(--serif);
  font-size: clamp(2.2rem, min(6.6vw, 11.4vh), 6.8rem);
  line-height: 0.96;
  letter-spacing: -0.028em;
  color: var(--paper);
  text-wrap: balance;
}
.huge em {
  color: var(--gold);
}
.year {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}
.mono {
  font-family: var(--mono);
  font-size: 0.9em;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.note,
.fine {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--dim);
  margin-top: 1.1rem;
  max-width: 34rem;
}
.pull {
  margin: 1.3rem 0;
  padding: 0.1rem 0 0.1rem 1.25rem;
  border-left: 1px solid var(--gold);
}
.pull p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, min(2.3vw, 4.1vh), 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
  color: var(--paper);
}
.pull.small p {
  font-size: clamp(1.2rem, 1.7vw, 1.55rem);
}
.pull footer {
  margin-top: 0.7rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.cue {
  display: flex;
  align-items: center;
  gap: 0.9em;
  margin-top: 2.2rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.cue-line {
  width: 1px;
  height: 2.6rem;
  background: linear-gradient(to bottom, var(--gold), transparent);
  transform-origin: 50% 0;
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue {
  0% {
    transform: scaleY(0);
    opacity: 1;
  }
  60% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

/* ───────────────────────── chapters ───────────────────────── */

main {
  position: relative;
  z-index: 1;
}
.chapter {
  position: relative;
}
.stage {
  position: relative;
  padding: clamp(5rem, 12vh, 8rem) var(--gutter) clamp(3.5rem, 9vh, 6rem);
}
.beat + .beat {
  margin-top: clamp(3rem, 9vh, 6rem);
}
.beat > * {
  max-width: var(--col);
}

/* Pinned, scroll-choreographed mode (scripts on) */
.js .chapter.pinned {
  height: calc(var(--len, 3) * 100 * var(--vh));
}
.js .pinned .stage {
  position: sticky;
  top: 0;
  height: calc(100 * var(--vh));
  padding-block: 0;
  overflow: hidden;
  display: grid;
}
.js .pinned .beats {
  display: grid;
  align-items: center;
  height: 100%;
}
.js .pinned .beat {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  transform: translate3d(0, 1.4rem, 0);
  transition:
    opacity 0.65s var(--ease),
    transform 0.9s var(--ease);
  pointer-events: none;
  will-change: opacity, transform;
}
.js .pinned .beat.is-past {
  transform: translate3d(0, -1.4rem, 0);
}
.js .pinned .beat.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition:
    opacity 0.8s var(--ease) 0.12s,
    transform 1s var(--ease) 0.12s;
}
/* legibility scrims over the 3D, only where the copy sits */
.js .pinned .stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* feather the top and bottom so the scrim never shows an edge as a stage scrolls away */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
}
.side-left::before {
  background: linear-gradient(90deg, rgba(5, 6, 7, 0.86) 0%, rgba(5, 6, 7, 0.62) 28%, rgba(5, 6, 7, 0) 58%);
}
.js .pinned .side-low .beats {
  align-items: end;
  padding-bottom: clamp(4.5rem, 11vh, 7.5rem);
}
.side-low::before {
  background:
    linear-gradient(0deg, rgba(5, 6, 7, 0.9) 0%, rgba(5, 6, 7, 0.55) 30%, rgba(5, 6, 7, 0) 62%),
    linear-gradient(90deg, rgba(5, 6, 7, 0.6) 0%, rgba(5, 6, 7, 0) 55%);
}
.js .pinned .side-center .beats {
  justify-items: center;
  text-align: center;
}
.side-center .beat > * {
  max-width: min(35rem, 88vw);
  margin-inline: auto;
}
.side-center .beat > h2,
.side-center .beat > .big {
  max-width: min(44rem, 88vw);
}
.side-center .eyebrow {
  justify-content: center;
}
.side-center::before {
  background: radial-gradient(ellipse 46% 60% at 50% 50%, rgba(5, 6, 7, 0.82), rgba(5, 6, 7, 0) 100%);
}
.side-center .huge {
  max-width: min(64rem, 92vw);
}
.side-center .fine {
  margin-top: 2rem;
  max-width: 32rem;
}

/* terminal */
.term {
  width: min(36rem, 90vw);
  margin-inline: auto;
  text-align: left;
  background: rgba(10, 12, 14, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.term-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2b2f36;
}
.term-bar span {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--dim);
  text-transform: uppercase;
}
.term pre {
  padding: 1.1rem 1.2rem 1.3rem;
  font-family: var(--mono);
  font-size: clamp(0.7rem, 1.02vw, 0.86rem);
  line-height: 1.75;
  color: var(--paper);
  white-space: normal;
  overflow-wrap: anywhere;
}
.term .ln {
  display: block;
  white-space: pre-wrap;
  min-height: 1.75em;
}
.term .ln.gap {
  margin-top: 0.9em;
}
.term .ln b {
  color: var(--machine);
  font-weight: 500;
}
.term .out {
  color: var(--dim);
}
.term .dir {
  color: var(--gold);
}
.term .note-ln {
  margin-top: 0.9em;
  color: var(--paper);
}
.term .note-ln.nogap {
  margin-top: 0;
}
.caret {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  vertical-align: -0.18em;
  background: var(--machine);
  animation: blink 1.1s steps(1) infinite;
}
.caret.gold {
  background: var(--gold);
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.js .term-beat .ln {
  opacity: 0;
}
.js .term-beat.is-on .ln {
  animation: ln 0.01s linear forwards;
  animation-delay: calc(var(--i) * 0.32s + 0.5s);
}
@keyframes ln {
  to {
    opacity: 1;
  }
}
.term-beat .note {
  text-align: center;
  margin-inline: auto;
  color: var(--soft);
  font-size: 0.95rem;
}

.cmd {
  margin-top: 1.1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--paper);
}
.cmd b {
  color: var(--machine);
  font-weight: 500;
}
.cmd span {
  color: var(--dim);
}
.side-center .cmd {
  text-align: left;
  width: fit-content;
}

/* the five truths */
.big.after {
  margin-top: 0.9em;
  margin-bottom: 0;
}
.truth .big {
  font-size: clamp(2.3rem, min(5.4vw, 10vh), 5.2rem);
  line-height: 0.96;
}

/* hold to mend */
.mend-wrap {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  margin-top: 1.6rem;
  flex-wrap: wrap;
}
.mend {
  --mend: 0;
  position: relative;
  width: 9.5rem;
  height: 9.5rem;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(118, 185, 0, 0.2), rgba(118, 185, 0, 0.04) 62%, transparent 70%);
  color: var(--paper);
  font: inherit;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.5s var(--ease);
}
.mend svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.mend .track {
  fill: none;
  stroke: rgba(243, 239, 230, 0.16);
  stroke-width: 1.5;
}
.mend .fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--mend));
  filter: drop-shadow(0 0 6px rgba(118, 185, 0, 0.9));
}
.mend-label {
  position: relative;
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
}
.mend:not(.is-done):not(.is-holding) {
  animation: breathe 2.8s ease-in-out infinite;
}
@keyframes breathe {
  50% {
    box-shadow: 0 0 0 14px rgba(118, 185, 0, 0.07), 0 0 60px rgba(118, 185, 0, 0.22);
  }
}
.mend.is-holding {
  transform: scale(0.94);
  box-shadow: 0 0 80px rgba(118, 185, 0, 0.45);
}
.mend.is-done {
  cursor: default;
  background: radial-gradient(circle at 50% 40%, rgba(118, 185, 0, 0.32), rgba(118, 185, 0, 0.06) 62%, transparent 70%);
  color: var(--gold-hot);
}
.mend-wrap .note {
  margin: 0;
  max-width: 15rem;
}
.linkish {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: rgba(118, 185, 0, 0.6);
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.kintsugi {
  color: var(--soft);
  font-size: 0.98rem;
  max-width: 30rem;
}
.thanks {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--gold);
  opacity: 0;
  transform: translateY(0.6rem);
  transition:
    opacity 1.2s var(--ease) 0.4s,
    transform 1.2s var(--ease) 0.4s;
}
.is-mended .thanks {
  opacity: 1;
  transform: none;
}
.is-mended #mend-help {
  opacity: 0.35;
}
html:not(.js) .mend-wrap {
  display: none;
}
html:not(.js) .thanks {
  display: none;
}

/* ───────────────────────── flowing chapters (message, rally) ───────────────────────── */

.flow {
  padding: clamp(6rem, 22vh, 14rem) var(--gutter) 0;
}
.letter {
  max-width: 40rem;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: linear-gradient(180deg, rgba(13, 15, 18, 0.92), rgba(13, 15, 18, 0.84));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  position: relative;
}
.letter::before {
  /* one gold seam down the margin */
  content: '';
  position: absolute;
  left: 0;
  top: 2.2rem;
  bottom: 2.2rem;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold) 18%, var(--gold) 82%, transparent);
  opacity: 0.8;
}
.letter .md h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 4.6vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.022em;
  margin: 0 0 1.4rem;
  color: var(--paper);
  text-transform: none;
}
.md h3,
.md h4 {
  margin: 2.2rem 0 0.8rem;
}
.md p,
.md li {
  font-size: 1.08em;
  line-height: 1.7;
  color: var(--soft);
}
.md p + p {
  margin-top: 1.05em;
}
.md strong {
  color: var(--paper);
  font-weight: 560;
}
.md em {
  font-family: var(--serif);
  font-size: 1.14em;
  line-height: 1.3;
  color: var(--paper);
}
.md ul,
.md ol {
  margin: 1rem 0;
  padding-left: 1.2rem;
}
.md li + li {
  margin-top: 0.45em;
}
.md li::marker {
  color: var(--gold);
}
.md blockquote {
  margin: 1.4rem 0;
  padding-left: 1.2rem;
  border-left: 1px solid var(--gold);
}
.md hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 2.2rem 0;
}
.md code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(243, 239, 230, 0.08);
}
.md pre {
  margin: 1.2rem 0;
  padding: 1rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  overflow-x: auto;
}
.md pre code {
  padding: 0;
  background: none;
}

.rally {
  max-width: 76rem;
  margin-inline: auto;
  padding-top: clamp(4rem, 18vh, 12rem);
}
.rally-title {
  font-size: clamp(4.4rem, 15vw, 15rem);
  line-height: 0.84;
  letter-spacing: -0.035em;
  margin: 0 0 clamp(2.5rem, 7vw, 6rem) -0.04em;
}
.asks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3.2vw, 3.5rem);
  padding: clamp(1.4rem, 3.4vw, 3rem);
  background: rgba(13, 15, 18, 0.88);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.ask p {
  font-size: 1.02em;
}
.stand,
.soulfile {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  align-items: start;
  padding: clamp(1.4rem, 3.4vw, 3rem);
  background: rgba(13, 15, 18, 0.88);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.stand-form label {
  display: block;
  margin: 1.5rem 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
input[type='text'],
input[type='email'],
textarea {
  flex: 1 1 11rem;
  min-width: 0;
  padding: 0.82rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--paper);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  border-radius: 999px;
}
input[type='text']::placeholder,
textarea::placeholder {
  color: #6a6e76;
}
input[type='text']:focus,
input[type='email']:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(118, 185, 0, 0.18);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.82rem 1.25rem;
  font: inherit;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--paper);
  background: rgba(243, 239, 230, 0.07);
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.25s,
    border-color 0.25s,
    color 0.25s,
    transform 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover {
  background: rgba(243, 239, 230, 0.14);
  border-color: rgba(243, 239, 230, 0.3);
  color: var(--paper);
}
.btn:active {
  transform: scale(0.97);
}
.btn.gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a1300;
  font-weight: 560;
}
.btn.gold:hover {
  background: #8ad400;
  color: #0a1300;
}
.btn.ghost {
  background: transparent;
}
.stand-actions,
.soulfile-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}
.stand-actions[hidden] {
  display: none;
}
.stand-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.stand-card canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
}
.install {
  margin-top: 1.4rem;
  font-size: 0.9rem;
  color: var(--dim);
}
.install summary,
.sources summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  list-style: none;
}
.install summary::-webkit-details-marker,
.sources summary::-webkit-details-marker {
  display: none;
}
.install summary::before,
.sources summary::before {
  content: '+';
  display: inline-block;
  width: 1.2em;
  color: var(--gold);
}
.install[open] summary::before,
.sources[open] summary::before {
  content: '\2212';
}
.install p {
  margin-top: 0.8rem;
  font-size: 0.9rem;
}
.install pre {
  margin-top: 0.7rem;
  padding: 0.9rem 1rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--paper);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}
.soul-md {
  max-height: 34rem;
  overflow: auto;
  padding: clamp(1.2rem, 2.4vw, 2rem);
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.92rem;
  scrollbar-width: thin;
}
.soul-md h3 {
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--machine);
  margin: 0 0 1.2rem;
}
.soul-md h3::before {
  content: '# ';
  opacity: 0.6;
}
.soul-md h4 {
  font-family: var(--mono);
  font-weight: 450;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 2rem 0 0.8rem;
}
.soul-md h4::before {
  content: '## ';
  opacity: 0.6;
}

.file-head {
  font-variant-numeric: tabular-nums;
}
.md.is-placeholder h2 {
  color: var(--soft);
}
.caret-line {
  margin-top: 1.4rem;
  height: 1.4rem;
}
.md .sig {
  margin-top: 2rem;
  text-align: right;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5em;
  color: var(--paper);
}
.md:not(.is-placeholder) > p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 3.4em;
  line-height: 0.82;
  float: left;
  padding: 0.06em 0.12em 0 0;
  color: var(--gold);
}
.name {
  max-width: 44rem;
  margin: 0 0 clamp(2.5rem, 6vw, 5rem);
  padding: clamp(1.2rem, 2.6vw, 2rem) 0 0;
}
.name .big {
  color: var(--paper);
}
.napkin {
  margin-top: clamp(4rem, 10vw, 8rem);
  max-width: 60rem;
}
.napkin .huge {
  font-size: clamp(2.1rem, 4.9vw, 4.8rem);
  line-height: 1.02;
  margin-bottom: 0.5em;
}
.napkin > p:last-child {
  max-width: 36rem;
}
.sources-intro {
  margin-top: 1rem;
  font-size: 0.86rem;
  color: var(--dim);
}

/* reveal-on-view for flowing content */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 2rem, 0);
  transition:
    opacity 1s var(--ease),
    transform 1.2s var(--ease);
}
.js .reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ───────────────────────── console (easter egg) ───────────────────────── */

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.console-btn {
  position: fixed;
  right: var(--gutter);
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  z-index: 30;
  padding: 0.45rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--dim);
  background: rgba(13, 15, 18, 0.6);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.console-btn:hover {
  color: var(--machine);
  border-color: rgba(157, 184, 255, 0.5);
}
html:not(.js) .console-btn {
  display: none;
}
.console {
  position: fixed;
  right: var(--gutter);
  bottom: calc(max(0.9rem, env(safe-area-inset-bottom)) + 2.6rem);
  z-index: 40;
  width: min(34rem, calc(100vw - 2 * var(--gutter)));
  background: rgba(8, 10, 12, 0.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.65;
  overflow: hidden;
}
.console[hidden] {
  display: none;
}
.console-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.console-bar button {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--dim);
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  cursor: pointer;
}
.console-log {
  max-height: min(18rem, 42vh);
  overflow-y: auto;
  padding: 0.8rem 0.9rem 0.2rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--dim);
}
.console-log .in {
  color: var(--paper);
}
.console-log .in b,
.console form b {
  color: var(--machine);
  font-weight: 500;
}
.console-log .gold {
  color: var(--gold);
}
.console-log a {
  color: var(--paper);
}
.console form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.9rem 0.8rem;
}
.console input {
  flex: 1;
  min-width: 0;
  padding: 0.2rem 0;
  font: inherit;
  color: var(--paper);
  background: none;
  border: 0;
  border-radius: 0;
  caret-color: var(--machine);
}
.console input:focus {
  outline: none;
  box-shadow: none;
}

/* ───────────────────────── contact ───────────────────────── */

.contact .contact-form input,
.contact .contact-form textarea {
  display: block;
  width: 100%;
}
.contact .contact-form textarea {
  border-radius: 14px;
  resize: vertical;
  min-height: 8rem;
  line-height: 1.5;
}
.contact .note a {
  color: var(--paper);
}
.contact .hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
#contact-status.ok {
  color: var(--gold);
}
#contact-status.err {
  color: #ff9b8a;
}

/* ───────────────────────── footer ───────────────────────── */

.foot {
  max-width: 76rem;
  margin: clamp(5rem, 12vw, 10rem) auto 0;
  padding: 2rem 0 max(5rem, calc(env(safe-area-inset-bottom) + 4.5rem));
  border-top: 1px solid var(--line);
}
.sources ul {
  margin: 1.2rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--dim);
  max-width: 62rem;
}
.sources li + li {
  margin-top: 0.5rem;
}
.fineprint {
  margin-top: 1.2rem;
}
.disclaimer {
  margin-top: 1rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--dim);
  max-width: 62rem;
}
.colophon {
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8e96;
}

/* ───────────────────────── small screens ───────────────────────── */

@media (max-width: 860px) {
  :root {
    --col: 100%;
  }
  .tag {
    font-size: 0.6rem;
    max-width: 10.5rem;
    line-height: 1.35;
  }
  .where {
    display: none;
  }
  .js .pinned .beats {
    align-items: end;
    padding-bottom: max(2.2rem, calc(env(safe-area-inset-bottom) + 1.6rem));
  }
  .side-left::before,
  .side-low::before {
    background: linear-gradient(0deg, rgba(5, 6, 7, 0.96) 0%, rgba(5, 6, 7, 0.86) 42%, rgba(5, 6, 7, 0) 78%);
  }
  .console-btn,
  .console {
    display: none;
  }
  .js .pinned .side-low .beats,
  .js .pinned .side-center .beats {
    align-items: end;
    padding-bottom: max(2.2rem, calc(env(safe-area-inset-bottom) + 1.6rem));
  }
  .side-center::before {
    background: linear-gradient(0deg, rgba(5, 6, 7, 0.95) 0%, rgba(5, 6, 7, 0.8) 40%, rgba(5, 6, 7, 0) 72%);
  }
  h1 {
    font-size: clamp(4.4rem, 22vw, 8rem);
  }
  h2 {
    font-size: clamp(2.2rem, 9.4vw, 3.4rem);
  }
  .big {
    font-size: clamp(1.7rem, 7.4vw, 2.5rem);
  }
  .big.gold {
    font-size: clamp(3rem, 15vw, 5rem);
  }
  .huge {
    font-size: clamp(2.3rem, 10.5vw, 4rem);
  }
  .pull p {
    font-size: clamp(1.3rem, 5.6vw, 1.8rem);
  }
  .cue {
    margin-top: 1.4rem;
  }
  .cue-line {
    height: 1.8rem;
  }
  .asks,
  .stand,
  .soulfile {
    grid-template-columns: minmax(0, 1fr);
  }
  .stand-card {
    order: -1;
  }
  .mend {
    width: 8rem;
    height: 8rem;
  }
  .term pre {
    font-size: 0.68rem;
    padding: 0.9rem;
  }
  .side-center .beat > .fine {
    display: none;
  }
}
@media (max-width: 860px) and (max-height: 700px) {
  .pull {
    margin: 0.8rem 0;
  }
  .eyebrow {
    margin-bottom: 0.9rem;
  }
}

/* short viewports: small laptops, split screens, phones on their side */
@media (max-height: 700px) {
  .eyebrow {
    margin-bottom: 0.8rem;
  }
  .cue {
    margin-top: 1.1rem;
  }
  .cue-line {
    height: 1.6rem;
  }
  .pull {
    margin: 0.8rem 0;
  }
  .where {
    display: none;
  }
  .mend {
    width: 7.4rem;
    height: 7.4rem;
  }
  .term pre {
    line-height: 1.55;
    padding: 0.8rem 1rem 0.9rem;
  }
}
@media (max-height: 560px) {
  .pull.small,
  .fine,
  .kintsugi,
  .cmd,
  .term-beat .note {
    display: none;
  }
  .lede {
    font-size: 1em;
  }
}

/* ───────────────────────── motion + screenshots ───────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .js .pinned .beat,
  .js .pinned .beat.is-on,
  .js .reveal {
    transform: none !important;
    filter: none !important;
    transition-duration: 0.2s !important;
    transition-delay: 0s !important;
  }
  .cue-line,
  .mend,
  .caret {
    animation: none !important;
  }
  .js .term-beat.is-on .ln {
    animation-delay: 0s !important;
  }
  #gl {
    transition: none;
  }
}
/* ?shot=1 — deterministic stills: everything in its final state, no transitions */
.shot *,
.shot *::before,
.shot *::after {
  transition: none !important;
  animation-delay: 0s !important;
  animation-duration: 0.001s !important;
}
.shot .cue-line,
.shot .mend {
  animation: none !important;
}
.shot #gl {
  opacity: 1;
}
.shot .reveal {
  opacity: 1 !important;
  transform: none !important;
}
