/* Vítor Cepeda Lopes ⇄ theangrypit — private version 7 (draft)
   Layout: the whole site is one console. A haze of light behind, a CRT glass
   in front, HUD rails top and bottom, and panels of content between them.
   Identity kept: black, white, one red, Avenir, the signature.
   Colour law: black, white and one red. The only full colour on the site is
   his film frames once they have decoded. A terminal face carries readouts. */

:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: rgba(8, 8, 8, 0.82);
  --ink: #eceae2;        /* phosphor white */
  --dim: #94918a;
  --line: #2b2a27;
  --red: #e6342e;        /* his red, from the version 4 source */
  --red-soft: rgba(230, 52, 46, 0.16);
  --display: "Avenir Next Condensed", "Avenir Next", Avenir, "Arial Narrow", sans-serif;
  --body: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --hud: "VT323", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gut-l: max(18px, env(safe-area-inset-left, 0px));
  --gut-r: max(18px, env(safe-area-inset-right, 0px));
  --rail: 46px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--rail) + 18px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased;
  padding-top: var(--rail); padding-bottom: calc(var(--rail) + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, .feed:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--red); color: var(--bg); }
.skip { position: fixed; left: -999px; top: 8px; z-index: 60; background: var(--ink); color: var(--bg); padding: 8px 12px; }
.skip:focus { left: 8px; }

/* ---------- World: haze behind, glass in front ---------- */
#haze {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0;
  image-rendering: pixelated; image-rendering: crisp-edges; opacity: 1;
  background:
    radial-gradient(60% 50% at 12% 88%, rgba(230, 52, 46, 0.22), transparent 70%),
    radial-gradient(50% 45% at 90% 6%, rgba(236, 234, 226, 0.08), transparent 70%),
    var(--bg);
}
.crt {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.3) 2px 3px),
    radial-gradient(115% 95% at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.72) 100%);
  animation: hum 7s steps(1) infinite;
}
@keyframes hum { 0%, 100% { opacity: 1; } 47% { opacity: 0.94; } 48% { opacity: 1; } 83% { opacity: 0.97; } 84% { opacity: 1; } }
main, .rail { position: relative; z-index: 2; }
/* A dark veil over the haze where the reading column sits, so body text stays clean */
main::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 5, 5, 0.5), rgba(5, 5, 5, 0.92) 5%, rgba(5, 5, 5, 0.92) 95%, rgba(5, 5, 5, 0.5));
}
@media (max-width: 879px) { main::before { background: rgba(5, 5, 5, 0.9); } }

/* ---------- HUD rails ---------- */
.rail {
  position: fixed; left: 0; right: 0; height: var(--rail); z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding-left: var(--gut-l); padding-right: var(--gut-r);
  background: var(--bg); border-color: var(--line); border-style: solid; border-width: 0;
  font: 19px/1 var(--hud); letter-spacing: 0.06em; text-transform: uppercase; color: var(--amb);
}
.rail-top { top: env(safe-area-inset-top, 0px); border-bottom-width: 1px; }
.rail-bot { bottom: 0; height: calc(var(--rail) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); border-top-width: 1px; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 45; background: var(--bg); }
.rail a { text-decoration: none; }
.rail .push { margin-left: auto; }
.keys { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.keys::-webkit-scrollbar { display: none; }
.keys a { padding: 8px 9px; color: var(--ink); white-space: nowrap; }
.keys a b { color: var(--red-text); font-weight: 400; margin-right: 5px; }
.keys a:hover, .keys a.is-here { background: var(--red); color: var(--bg); }
.keys a:hover b, .keys a.is-here b { color: var(--bg); }
.rec { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.rec::before { content: ""; width: 9px; height: 9px; background: var(--red); animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }
.meter { flex: 1; height: 8px; min-width: 40px; border: 1px solid var(--line); position: relative; }
.meter i { position: absolute; inset: 0 auto 0 0; width: 0; background: repeating-linear-gradient(90deg, var(--red) 0 4px, transparent 4px 6px); }
@media (max-width: 720px) {
  .rail { gap: 10px; font-size: 17px; }
  .rail .wide { display: none; }
}

/* ---------- Identity: the signature and theangrypit share one place ---------- */
.ident { position: relative; display: block; flex: none; width: 176px; height: 36px; color: var(--ink); }
.ident > span { position: absolute; inset: 0; display: flex; align-items: center; transition: opacity 0.05s; }
.ident-a img { height: 34px; width: auto; }
.ident-b { font: 800 25px/1 var(--display); letter-spacing: -0.01em; text-transform: none; opacity: 0; }
.ident-b i { font-style: normal; color: var(--red); position: relative; }
.ident-b i::after { content: ""; position: absolute; left: -1px; right: -1px; top: 16%; bottom: 10%; background: var(--red); animation: bar 4.2s steps(1) infinite; }
@keyframes bar { 0%, 100% { opacity: 1; } 60% { opacity: 1; } 62% { opacity: 0; } 70% { opacity: 1; transform: translateX(2px); } 72% { transform: none; } 88% { opacity: 0; } 96% { opacity: 1; } }
.ident[data-face="b"] .ident-a { opacity: 0; }
.ident[data-face="b"] .ident-b { opacity: 1; }
.ident.is-tearing > span { opacity: 1; animation: tear 0.42s steps(2) both; }
.ident.is-tearing .ident-b { animation-direction: reverse; color: var(--red); }
@keyframes tear {
  0% { clip-path: inset(0 0 62% 0); transform: translateX(-7px); }
  25% { clip-path: inset(38% 0 30% 0); transform: translateX(9px) skewX(-12deg); }
  50% { clip-path: inset(70% 0 4% 0); transform: translateX(-4px); }
  75% { clip-path: inset(12% 0 55% 0); transform: translateX(6px) skewX(8deg); }
  100% { clip-path: inset(0); transform: none; }
}
@media (max-width: 720px) { .ident { width: 132px; } .ident-a img { height: 27px; } .ident-b { font-size: 21px; } }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 0.96; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(3rem, 8.4vw, 6rem); }
h2 { font-size: clamp(36px, 5.6vw, 72px); }
h3 { font-size: clamp(23px, 2.8vw, 32px); line-height: 1.04; }
h1 em, h2 em { font-style: normal; color: var(--red); }
p { margin: 0 0 1.1em; }
.lede { font-size: clamp(19px, 2vw, 23px); line-height: 1.5; }
.body { color: var(--dim); max-width: 34em; }
.hud { font: 20px/1.15 var(--hud); letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.hud b { color: var(--red-text); font-weight: 400; }
.go { display: inline-flex; align-items: center; gap: 10px; font: 20px/1 var(--hud); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; padding: 11px 14px; border: 1px solid var(--ink); }
.go::after { content: ">>"; color: var(--red-text); }
.go:hover { background: var(--red); border-color: var(--red); color: var(--bg); }
.go:hover::after { color: var(--bg); }

/* Glitch: a resting red edge, and short bursts set off by the script */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none; white-space: pre-line; }
.glitch::before { color: var(--red); }
.glitch::after { color: var(--ink); }
.glitch.is-burst::before { opacity: 0.9; animation: slice 0.36s steps(3) both; }
.glitch.is-burst::after { opacity: 0.7; animation: slice 0.36s steps(3) reverse both; }
@keyframes slice {
  0% { clip-path: inset(8% 0 70% 0); transform: translateX(-0.06em); }
  33% { clip-path: inset(52% 0 22% 0); transform: translateX(0.07em); }
  66% { clip-path: inset(80% 0 2% 0); transform: translateX(-0.04em); }
  100% { clip-path: inset(30% 0 48% 0); transform: translateX(0.03em); }
}

/* ---------- Panels ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gut-l); padding-right: var(--gut-r); }
section { padding-block: clamp(54px, 8vw, 110px); }
.ph { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(26px, 4vw, 44px); font: 22px/1 var(--hud); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.ph-n { background: var(--red); color: var(--bg); padding: 4px 8px 3px; }
.ph-t { color: var(--ink); }
.ph-rule { flex: 1; height: 9px; min-width: 20px; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 9px); }
.split { display: grid; gap: clamp(26px, 5vw, 70px); }
.split > * { min-width: 0; }
@media (min-width: 880px) { .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } .split.end { align-items: end; } }
.box { position: relative; background: var(--panel); border: 1px solid var(--line); padding: clamp(18px, 3vw, 34px); }
.box::before, .box::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--red); }
.box::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.box::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(34px, 6vw, 80px); }
.boot { min-height: 3.5em; margin-bottom: clamp(18px, 3vw, 34px); white-space: pre-line; text-transform: none; }
.boot .cur::after { content: "█"; color: var(--red-text); animation: blink 1s steps(1) infinite; }
.alias { margin-top: 18px; font: 800 clamp(20px, 2.6vw, 30px)/1.1 var(--display); letter-spacing: 0.01em; min-height: 1.2em; color: var(--red); }
.alias span { color: var(--red); }
.hero .feed { margin-top: clamp(30px, 5vw, 56px); }

/* ---------- Feeds: stills shown as monitor feeds that resolve to full colour ---------- */
.feed { margin: 0; position: relative; aspect-ratio: 16 / 9; background: #0b0b0b; overflow: hidden; border: 1px solid var(--line); }
.feed.wide { aspect-ratio: 21 / 9; }
.feed.tall { aspect-ratio: 4 / 5; }
@media (max-width: 879px) { .feed.wide { aspect-ratio: 16 / 9; } }
.feed img, .feed canvas.px { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feed img { filter: grayscale(1) contrast(1.15) brightness(1.45); transition: filter 0.5s; }
.feed canvas.px { image-rendering: pixelated; image-rendering: crisp-edges; filter: grayscale(1) contrast(1.3); opacity: 0; }
.feed.is-decoding canvas.px { opacity: 1; }
.feed .tint { position: absolute; inset: 0; background: var(--red); mix-blend-mode: multiply; transition: opacity 0.5s; }
.feed .scan { position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, 0.42) 3px 4px); transition: opacity 0.5s; }
.feed.is-live img { filter: none; }
.feed.is-live .tint { opacity: 0; }
.feed.is-live .scan { opacity: 0.1; }
.feed .tag { position: absolute; z-index: 2; font: 18px/1 var(--hud); letter-spacing: 0.08em; text-transform: uppercase; background: rgba(5, 5, 5, 0.86); color: var(--ink); padding: 5px 7px 4px; }
.feed .tag.tl { left: 8px; top: 8px; }
.feed .tag.br { right: 8px; bottom: 8px; color: var(--amb); }
.feed.is-live .tag.br { color: var(--red-text); }

.feed.portrait img { object-position: 62% center; }
.feed.is-empty img { display: none; }
.feed.is-empty { background: repeating-linear-gradient(135deg, #0c0c0c 0 12px, #111 12px 24px); }
canvas.noise { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: 0.55; }

/* ---------- Lists and tables of things ---------- */
.duo { display: grid; gap: 18px; }
@media (min-width: 880px) { .duo { grid-template-columns: 1fr 1fr; } }
.duo a.box { display: block; text-decoration: none; }
.duo a.box:hover h3 { color: var(--red-text); }
.box p { color: var(--dim); margin: 10px 0 0; max-width: 32em; }
.chip { display: inline-block; font: 17px/1 var(--hud); letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line); color: var(--dim); padding: 5px 7px 4px; margin-top: 14px; }
.chip.on { border-color: var(--red); color: var(--ink); }
.chip.on::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--red); margin-right: 7px; }
.chip.warn { border-style: dashed; border-color: var(--dim); color: var(--ink); }

.beliefs { display: grid; gap: clamp(40px, 6vw, 84px); }
.belief { display: grid; gap: 20px; }
.belief > * { min-width: 0; }
.belief p { color: var(--dim); max-width: 30em; margin: 12px 0 0; }
@media (min-width: 880px) { .belief { grid-template-columns: 1.25fr 1fr; gap: 52px; align-items: center; } .belief:nth-child(even) .feed { order: 2; } }

.creed { display: grid; gap: 14px; }
.creed p { margin: 0; font: 800 clamp(23px, 3.1vw, 40px)/1.1 var(--display); max-width: 24em; display: grid; grid-template-columns: 2.6em 1fr; gap: 6px; color: var(--ink); }
.creed p::before { content: attr(data-n); font: 22px/1.9 var(--hud); color: var(--red-text); }

.work { display: grid; gap: 38px 28px; }
@media (min-width: 700px) { .work { grid-template-columns: 1fr 1fr; } }
.work a { display: block; text-decoration: none; }
.work h3 { margin: 14px 0 6px; }
.work a:hover h3 { color: var(--red-text); }
.work .meta { color: var(--dim); font-size: 15px; margin: 0; }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { display: grid; gap: 8px 32px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.rows li > * { min-width: 0; }
.rows p { color: var(--dim); margin: 0; max-width: 38em; }
.rows a { text-decoration: none; }
.rows a:hover { color: var(--red-text); }
.rows .chip { margin-top: 2px; justify-self: start; }
@media (min-width: 880px) { .rows li { grid-template-columns: 17em minmax(0, 1fr) 15em; align-items: start; } .rows .chip { justify-self: end; } }
.lanes { display: grid; gap: 34px; }
@media (min-width: 900px) { .lanes { grid-template-columns: repeat(3, 1fr); gap: 26px; } }
.lane ul { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.lane li { padding: 15px 0; border-bottom: 1px solid var(--line); }
.lane li a { text-decoration: none; font-weight: 600; }
.lane li a:hover { color: var(--red-text); }
.lane li p { color: var(--dim); font-size: 15px; margin: 5px 0 0; }
.nosignal { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); background: #0a0a0a; display: grid; place-items: center; margin-top: 16px; }
.nosignal span { position: relative; z-index: 1; background: rgba(5, 5, 5, 0.86); padding: 6px 9px 5px; }

.titles { font: 800 clamp(22px, 2.6vw, 30px)/1.25 var(--display); margin: 18px 0 24px; }
.titles span { display: block; }
.titles span::before { content: "> "; color: var(--red-text); font: 400 0.9em/1 var(--hud); }

/* ---------- Contact ---------- */
.routes { display: grid; gap: 18px; margin-top: clamp(28px, 4vw, 46px); }
@media (min-width: 880px) { .routes { grid-template-columns: 1fr 1fr; } }
.addr { display: block; font: 24px/1.2 var(--hud); letter-spacing: 0.04em; color: var(--ink); margin: 16px 0 14px; overflow-wrap: anywhere; user-select: all; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.egg { flex: none; width: 26px; height: 26px; opacity: 0.22; }
.egg:hover { opacity: 1; animation: slice 0.5s steps(3) 2; }
.egg circle, .egg line { fill: none; stroke: var(--red); stroke-width: 1.2; }

/* ---------- Project page ---------- */
.project-title { font-size: clamp(40px, 6.4vw, 88px); }
.project-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; margin: 26px 0 30px; }
.project-meta p { margin: 0; }
.project-meta span { color: var(--dim); }
.film-player { position: relative; aspect-ratio: 16 / 9; background: #0b0b0b; overflow: hidden; border: 1px solid var(--line); }
.film-player img, .film-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.film-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--red); color: var(--bg); border: 0; cursor: pointer; font: 24px/1 var(--hud); letter-spacing: 0.08em; text-transform: uppercase; padding: 14px 18px 12px; }
.film-play:hover { background: var(--ink); }
.credits { margin: 0; border-top: 1px solid var(--line); }
.credits div { display: grid; gap: 4px 28px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.credits dt { font: 19px/1.3 var(--hud); letter-spacing: 0.06em; text-transform: uppercase; color: var(--label); }
.credits dd { margin: 0; }
@media (min-width: 620px) { .credits div { grid-template-columns: 12em 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}


/* ================= Version 7 ================= */
html { scrollbar-color: var(--red) #0b0b0b; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b0b0b; }
::-webkit-scrollbar-thumb { background: var(--red); }
a { text-underline-offset: 0.2em; }

/* Quiet signal: the visitor's own switch */
.quiet .crt { animation: none; background: radial-gradient(120% 100% at 50% 50%, transparent 62%, rgba(0, 0, 0, 0.45) 100%); }
.quiet .rec::before, .quiet .glitch::before, .quiet .glitch::after { animation: none; }
.quiet #haze { opacity: 0.45; }
.switch { background: none; border: 1px solid var(--line); color: var(--dim); font: inherit; letter-spacing: inherit; text-transform: inherit; padding: 7px 9px 6px; cursor: pointer; white-space: nowrap; }
.switch b { color: var(--ink); font-weight: 400; }
.switch:hover { border-color: var(--ink); }

/* The mark: signature and wordmark as one object */
.ident { width: 150px; height: 38px; display: flex; align-items: center; }
.ident canvas.mark { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.hero-mark { margin: clamp(18px, 3vw, 30px) 0 0; width: min(100%, 880px); }
.hero-mark canvas.mark { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.role { margin: clamp(22px, 3vw, 34px) 0 0; max-width: 30em; font-size: clamp(19px, 2vw, 23px); line-height: 1.45; }
.hero-go { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.go.solid { background: var(--red); border-color: var(--red); color: var(--bg); }
.go.solid::after { color: var(--bg); }
.go.solid:hover { background: var(--ink); border-color: var(--ink); }

/* Section ruler and inverse-video sub-headings */
.ph { gap: 12px; }
.ph-rule { height: 12px; background: repeating-linear-gradient(90deg, var(--dim) 0 2px, transparent 2px 12px); opacity: 0.5; }
h2.sub { display: inline-block; background: var(--ink); color: var(--bg); font-size: clamp(24px, 3vw, 36px); line-height: 1; padding: 0.24em 0.4em 0.2em; margin-bottom: clamp(20px, 3vw, 32px); }
.box { border: 2px solid #3a3835; background: var(--panel); }
.box::before, .box::after { content: none; }

/* Feeds: standby art, then the film's own colour */
.feed canvas.st { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; image-rendering: crisp-edges; opacity: 0; transition: opacity 0.35s; }
.feed.has-standby canvas.st { opacity: 1; }
.feed.has-standby img { opacity: 0; }
.feed.has-standby .tint { opacity: 0; }
.feed.is-decoding canvas.st, .feed.is-live canvas.st { opacity: 0; }
.feed.is-live img { opacity: 1; filter: none; }
.feed[data-mode="ascii"] canvas.st { image-rendering: auto; }
.feed { border: 2px solid #3a3835; }
.card .feed { transition: border-color 0.2s; }
.card:hover .feed, .card:focus-visible .feed { border-color: var(--red); }
.feed .tag.br::before { content: none; }
.feed.is-live .tag.br { color: var(--ink); }
.feed.is-live .tag.br::after { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--red); margin-left: 7px; }

/* Archive tuner */
.tuner { display: grid; gap: 12px; margin-bottom: clamp(24px, 4vw, 40px); }
.tuner-row { display: grid; gap: 8px 14px; align-items: center; }
@media (min-width: 720px) { .tuner-row { grid-template-columns: 5.5em minmax(0, 1fr); } }
.tuner-name { font: 20px/1 var(--hud); letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); }
.tuner-keys { display: flex; flex-wrap: wrap; gap: 6px; }
.key { background: none; border: 1px solid #3a3835; color: var(--ink); cursor: pointer; font: 20px/1 var(--hud); letter-spacing: 0.06em; text-transform: uppercase; padding: 12px 11px 10px; min-height: 44px; }
.key i { font-style: normal; color: var(--amb); margin-left: 8px; }
.key:hover { border-color: var(--ink); }
.key.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.key.is-on i { color: var(--bg); }
.tuner-read { margin: 4px 0 0; }
.tuner-read b { color: var(--ink); }
.work { gap: 34px 22px; }
@media (min-width: 1040px) { .work { grid-template-columns: repeat(3, 1fr); } }
.card[hidden] { display: none; }
.card h3 { font-size: clamp(21px, 2.1vw, 26px); }
.card .tags { font: 17px/1.25 var(--hud); letter-spacing: 0.05em; text-transform: uppercase; margin-top: 6px; }
.work.is-tuning { animation: retune 0.26s steps(4) both; }
@keyframes retune {
  0% { opacity: 0.2; transform: translateX(-10px); filter: contrast(2) grayscale(1); }
  40% { opacity: 0.7; transform: translateX(8px); }
  100% { opacity: 1; transform: none; filter: none; }
}
.nosig { margin-top: 8px; display: grid; gap: 16px; justify-items: start; }
.nosig[hidden] { display: none; }

/* The ending */
.addr { text-decoration: none; user-select: text; }
a.addr:hover { color: var(--red-text); }
.signoff { padding-block: clamp(50px, 9vw, 120px) clamp(30px, 5vw, 60px); display: grid; gap: 22px; justify-items: start; }
.signoff img { width: min(100%, 620px); height: auto; }
.film-play { display: inline-flex; align-items: center; gap: 10px; }
.film-play[hidden] { display: none; }
.film-play svg { width: 22px; height: 22px; fill: currentColor; }
.cap { color: var(--dim); font-size: 15px; margin: 12px 0 0; max-width: 46em; }

/* Phone: navigation moves to the thumb's side of the screen */
.rail-bot .keys { display: none; }
@media (max-width: 720px) {
  .rail-top .keys { display: none; }
  .rail-bot { gap: 0; padding-left: 0; padding-right: 0; }
  .rail-bot > :not(.keys) { display: none; }
  .rail-bot .keys { display: flex; flex: 1; gap: 0; overflow: visible; }
  .rail-bot .keys a { flex: 1; text-align: center; padding: 15px 2px 13px; min-height: 46px; font-size: 18px; }
  .rail-bot .keys a b { display: none; }
  .rail-top .push { margin-left: auto; }
}
@media (min-width: 721px) { .keys a { padding: 13px 9px 11px; } }


/* ================= Version 7.1: pushed further ================= */
/* Phosphor bloom on the display type */
/* (A red halo behind the red words was tried and removed: it is the stock glow of a generic dark page.) */
.glitch.is-burst { animation: jolt 0.42s steps(4) both; }
@keyframes jolt { 0% { transform: translateX(-0.03em) skewX(-3deg); } 30% { transform: translateX(0.04em); } 60% { transform: translateX(-0.02em) skewX(2deg); } 100% { transform: none; } }

/* Glass: a slow rolling band and a switch-on flash */
.crt .roll { position: absolute; left: 0; right: 0; height: 22vh; top: -22vh; background: linear-gradient(to bottom, transparent, rgba(236, 234, 226, 0.05) 45%, rgba(236, 234, 226, 0.09) 50%, transparent); animation: roll 7.5s linear infinite; }
@keyframes roll { 0% { transform: translateY(0); } 100% { transform: translateY(122vh); } }
.crt.boot::after { content: ""; position: absolute; inset: 0; background: var(--ink); opacity: 0; animation: poweron 0.7s ease-out 1 both; }
@keyframes poweron { 0% { opacity: 0.9; clip-path: inset(49.6% 0 49.6% 0); } 35% { opacity: 0.7; clip-path: inset(49.6% 0 49.6% 0); } 60% { opacity: 0.25; clip-path: inset(0); } 100% { opacity: 0; clip-path: inset(0); } }
#grain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 49; pointer-events: none; image-rendering: pixelated; opacity: 0.035; mix-blend-mode: screen; }
.quiet #grain, .quiet .crt .roll { display: none; }
.quiet .crt.boot::after { content: none; }

/* Side ladders: tick rules that carry the scroll position */
.ladder { position: fixed; top: calc(var(--rail) + 14px); bottom: calc(var(--rail) + 14px); width: 12px; z-index: 3; display: none; background: repeating-linear-gradient(to bottom, var(--dim) 0 1px, transparent 1px 10px); opacity: 0.55; }
.ladder i { position: absolute; left: -3px; right: -3px; top: 0; height: 3px; background: var(--red); }
.ladder-l { left: 24px; } .ladder-r { right: 24px; }
@media (min-width: 1360px) { .ladder { display: block; } }

/* Cards answer the pointer */
.card:hover .feed img, .card:focus-visible .feed img { animation: skew 0.28s steps(3) 1; }
@keyframes skew { 0% { transform: translateX(-6px) skewX(-4deg); filter: saturate(1.8) contrast(1.3); } 50% { transform: translateX(5px) skewX(3deg); } 100% { transform: none; filter: none; } }
.work.is-tuning { animation: retune 0.34s steps(5) both; }
@keyframes retune {
  0% { opacity: 0.15; transform: translateX(-16px) skewX(-3deg); filter: contrast(2.4) grayscale(1) brightness(1.6); }
  35% { opacity: 0.8; transform: translateX(12px); filter: contrast(1.6) grayscale(1); }
  70% { transform: translateX(-4px); filter: grayscale(0.4); }
  100% { opacity: 1; transform: none; filter: none; }
}
.fold { margin: clamp(30px, 5vw, 56px) 0 0; max-width: 40em; color: var(--ink); }

/* Reel in the opening screen */
.feed video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
.feed.is-live.has-reel video { opacity: 1; }
.feed.is-live.has-reel img { opacity: 0; }

/* Project pages */
.client { font: 22px/1.2 var(--hud); letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); margin: 0 0 12px; }
.stage { margin-top: clamp(24px, 4vw, 40px); }
.film-player video, .film-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.film-player { border: 2px solid #3a3835; }
.more-films { display: grid; gap: 14px; margin-top: 22px; }
@media (min-width: 720px) { .more-films { grid-template-columns: repeat(auto-fill, minmax(240px, 340px)); } }
.more-films .film-play { font-size: 20px; padding: 10px 12px 8px; }
.prose p { margin: 0 0 1em; max-width: 36em; color: var(--ink); font-size: 18px; }
.prose p + p { color: var(--dim); }
.pager { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: clamp(34px, 5vw, 60px); }
.go.back::after { content: none; }
.go.back::before { content: "<<"; color: var(--red-text); }
.go.back:hover::before { color: var(--bg); }


/* ================= Version 7.3: the device is the screen ================= */
/* Phosphor glow, asked for by Vítor: lit things spill a little light. */
h1, h2:not(.sub), .titles, .chan-name, .creed p { text-shadow: 0 0 22px rgba(236, 234, 226, 0.22); }
h1 em, h2 em, .glitch em { text-shadow: 0 0 24px rgba(230, 52, 46, 0.55); }
.rail, .hud, .key, .go, .chip, .ph, .tag, .tuner-name, .chan-n, .credits dt, .client, .addr { text-shadow: 0 0 9px rgba(236, 234, 226, 0.28); }
.keys a b, .hud b, .ph-n { text-shadow: 0 0 10px rgba(230, 52, 46, 0.6); }
canvas.mark { filter: drop-shadow(0 0 7px rgba(236, 234, 226, 0.38)); }
.feed.is-live, .film-player { box-shadow: 0 0 46px rgba(236, 234, 226, 0.08); }

/* The tube: rounded glass, a dark surround, light falling off at the edges */
.bezel { position: fixed; inset: 0; z-index: 55; pointer-events: none; box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.6), inset 0 0 46px rgba(230, 52, 46, 0.07); }
@media (min-width: 900px) {
  .bezel {
    inset: 8px; border-radius: 30px / 36px;
    box-shadow: 0 0 0 100vmax #010101, inset 0 0 0 2px #1d1c1a, inset 0 0 90px rgba(230, 52, 46, 0.09), inset 0 0 150px rgba(0, 0, 0, 0.6);
    background: linear-gradient(126deg, rgba(236, 234, 226, 0.05), transparent 24%);
  }
}
#dust { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 52; pointer-events: none; }
.light { position: fixed; left: 0; top: 0; width: 620px; height: 620px; margin: -310px 0 0 -310px; z-index: 48; pointer-events: none; background: radial-gradient(closest-side, rgba(236, 234, 226, 0.075), transparent); mix-blend-mode: screen; transform: translate(var(--mx, 50vw), var(--my, 30vh)); }
@media (hover: none) { .light { display: none; } }

/* Degauss */
.degauss main, .degauss .rail { animation: degauss 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes degauss {
  0% { transform: scale(1.04, 0.96) skewX(1.4deg); filter: brightness(2) contrast(1.4); }
  18% { transform: scale(0.972, 1.034) skewX(-1.8deg); }
  38% { transform: scale(1.022, 0.984) skewX(1deg); filter: brightness(1.35); }
  58% { transform: scale(0.99, 1.012) skewX(-0.5deg); }
  78% { transform: scale(1.005, 0.997); filter: none; }
  100% { transform: none; filter: none; }
}

/* Archive: sections first */
#films[hidden], #channels[hidden] { display: none; }
.chan-intro { margin: 0 0 6px; }
.chan-group { margin-top: clamp(22px, 3vw, 34px); }
.chan-group h3 { font: 400 22px/1 var(--hud); letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); margin-bottom: 14px; }
.chans { display: grid; gap: 22px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .chans { grid-template-columns: repeat(4, minmax(0, 1fr)); } .chans.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.chan { display: block; background: none; border: 0; padding: 0; margin: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.chan .feed { display: block; transition: border-color 0.2s; }
.chan-name { display: block; font: 800 clamp(20px, 2.3vw, 30px)/1.05 var(--display); margin-top: 12px; }
.chan-n { display: block; font: 18px/1.2 var(--hud); letter-spacing: 0.06em; text-transform: uppercase; color: var(--amb); margin-top: 5px; }
.chan:hover .feed, .chan:focus-visible .feed { border-color: var(--red); }
.chan:hover .chan-name { color: var(--red-text); }
.chan:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.chan-all { margin: clamp(26px, 4vw, 40px) 0 0; }
.films-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 20px; }
button.go { background: none; cursor: pointer; color: var(--ink); }
button.go:hover { background: var(--red); }

/* Command line */
.cli { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 150px; max-width: 420px; height: 32px; padding: 0 10px; border: 1px solid var(--line); }
.cli label { color: var(--red-text); }
.cli input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: inherit; letter-spacing: inherit; text-transform: none; caret-color: var(--red); }
.cli input::placeholder { color: var(--dim); opacity: 1; }
.cli:focus-within { border-color: var(--ink); }
.console { position: fixed; left: max(22px, var(--gut-l)); bottom: calc(var(--rail) + 18px); z-index: 41; width: min(580px, calc(100vw - 44px)); max-height: 46vh; overflow: auto; background: rgba(5, 5, 5, 0.97); border: 2px solid #3a3835; padding: 14px 16px; }
.console[hidden] { display: none; }
.console pre { margin: 0; font: 19px/1.32 var(--hud); letter-spacing: 0.04em; white-space: pre-wrap; color: var(--ink); text-shadow: 0 0 9px rgba(236, 234, 226, 0.28); }

/* Reticle on a feed under the pointer */
.feed .ret { position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 2; }
.feed .ret::before, .feed .ret::after { content: ""; position: absolute; background: rgba(236, 234, 226, 0.6); }
.feed .ret::before { left: var(--rx, 50%); top: 0; bottom: 0; width: 1px; }
.feed .ret::after { top: var(--ry, 50%); left: 0; right: 0; height: 1px; }
.feed .tag.xy { left: 8px; bottom: 8px; opacity: 0; }
@media (hover: hover) { .feed:hover .ret, .feed:hover .tag.xy { opacity: 1; } .feed { cursor: crosshair; } .card .feed, .chan .feed { cursor: pointer; } }


/* 7.4: keep rail contents clear of the tube's rounded corners; wider console */
@media (min-width: 900px) { .rail { padding-left: max(34px, env(safe-area-inset-left, 0px)); padding-right: max(34px, env(safe-area-inset-right, 0px)); } }
.console { width: min(640px, calc(100vw - 44px)); left: max(34px, var(--gut-l)); }


/* 7.6: the official THEANGRYPIT wordmark, shown untouched when at rest.
   Brand kit: no glow, shadow, stretch or substitute type on the core identity. */
.hero-mark, .ident { position: relative; }
.mark-b { position: absolute; left: 1%; width: 98%; top: 50%; transform: translateY(-50%); opacity: 0; pointer-events: none; filter: none; }
.show-b .mark-b { opacity: 1; }
.show-b canvas.mark { opacity: 0; }

/* ================= Version 7.7: the kit's typefaces ================= */
/* Gia, Facto and Gridlite PE are commercial. They are named here, not bundled.
   They draw where Adobe Fonts has them active on the device, or once an Adobe
   Fonts web project link is added to the pages. Otherwise the stand-ins draw. */
:root {
  --display: "Gia Variable", "gia-variable", Gia, "Avenir Next Condensed", "Avenir Next", Avenir, "Arial Narrow", sans-serif;
  --body: Facto, facto, "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --hud: "Gridlite PE Variable", "gridlite-pe-variable", "VT323", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
/* Sizes for Gia Bold, which is wide where the stand-in is narrow. Set blind:
   to be checked by eye the first time the real face is on screen. */
.kit-display h1, .kit-display h2, .kit-display h3, .kit-display .titles, .kit-display .chan-name, .kit-display .creed p { font-weight: 700; letter-spacing: 0; line-height: 1.04; }
.kit-display h1 { font-size: clamp(2.1rem, 5.6vw, 4.6rem); }
.kit-display h2 { font-size: clamp(1.7rem, 3.9vw, 3.1rem); }
.kit-display h3 { font-size: clamp(1.15rem, 1.9vw, 1.5rem); line-height: 1.12; }
.kit-display h2.sub { font-size: clamp(1.1rem, 2vw, 1.6rem); padding: 0.34em 0.5em 0.3em; }
.kit-display .project-title { font-size: clamp(1.9rem, 4.6vw, 3.8rem); }
.kit-display .belief h3 { font-size: clamp(1.4rem, 2.6vw, 2.1rem) !important; }
.kit-display .creed p { font-size: clamp(1.15rem, 2.1vw, 1.75rem); line-height: 1.2; }
.kit-display .titles { font-size: clamp(1.05rem, 1.7vw, 1.35rem); line-height: 1.4; }
.kit-display .chan-name { font-size: clamp(1rem, 1.6vw, 1.3rem); }
.kit-display .card h3 { font-size: clamp(1.05rem, 1.5vw, 1.25rem); }
/* Sizes for Gridlite PE, a heavier and wider grid face than the stand-in. Also set blind. */
.kit-hud .rail { font-size: 12px; letter-spacing: 0.04em; }
.kit-hud :is(.rail, .hud, .go, .ph, .tuner-name, .key, .client, .chan-group h3, .film-play, .sig-head, h3.group) { font-weight: 750; }
.kit-hud .hud, .kit-hud .go, .kit-hud .ph, .kit-hud .tuner-name, .kit-hud .key, .kit-hud .client, .kit-hud .chan-group h3, .kit-hud .film-play { font-size: 13px; letter-spacing: 0.04em; }
.kit-hud .chip, .kit-hud .tag, .kit-hud .chan-n, .kit-hud .card .tags, .kit-hud .credits dt { font-size: 11px; letter-spacing: 0.04em; }
.kit-hud .addr { font-size: 15px; }
.kit-hud .console pre { font-size: 12px; line-height: 1.55; }
.kit-hud .creed p::before { font: 13px/2.2 var(--hud); }
@media (max-width: 720px) { .kit-hud .rail, .kit-hud .rail-bot .keys a { font-size: 11px; } }


/* ================= 7.9: Systems ================= */
.wordmark-img { display: block; width: min(100%, 560px); height: auto; }
.readout { margin: clamp(26px, 4vw, 44px) 0 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); line-height: 1.7; }
.readout b { color: var(--ink); font-weight: 400; }
.readout i { font-style: normal; color: var(--red-text); margin: 0 6px; }
h3.group { font: 400 22px/1.2 var(--hud); letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); margin: clamp(38px, 6vw, 68px) 0 16px; }
.kit-hud h3.group { font-size: 13px; }
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: minmax(0, 15em) minmax(60px, 1fr) 2.6em; gap: 6px 16px; align-items: center; }
.bar a { text-decoration: none; font-weight: 600; }
.bar a:hover { color: var(--red-text); }
.bar-track { display: block; height: 14px; border: 1px solid var(--line); }
.bar-track i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--red) 0 6px, transparent 6px 8px); }
.bar b { font: 22px/1 var(--hud); font-weight: 400; text-align: right; }
.kit-hud .bar b { font-size: 14px; }
.bar-note { grid-column: 1 / -1; color: var(--amb); font-size: 15px; margin-top: -2px; }
@media (max-width: 620px) { .bar { grid-template-columns: minmax(0, 1fr) 2.6em; } .bar-track { grid-column: 1 / -1; order: 3; } }
@media (max-width: 720px) { .rail-bot .keys a { font-size: 15px; letter-spacing: 0.02em; padding-left: 0; padding-right: 0; } }

/* 8.0 The story: three parts, title cards, beats that are held back until reached */
.story { padding-top: 0; }
.act { min-height: min(72vh, 640px); display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(40px, 8vw, 110px) 0 clamp(26px, 4vw, 48px); margin-bottom: clamp(34px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.act-top { display: flex; align-items: center; gap: 14px; color: var(--amb); }
.act-n { background: var(--red); color: var(--bg); padding: 4px 9px 3px; min-width: 2.2em; text-align: center; }
.act-marks { display: flex; gap: 5px; margin-left: auto; }
.act-marks i { width: clamp(26px, 6vw, 64px); height: 9px; border: 1px solid var(--dim); }
.act-marks i.on { background: var(--red); border-color: var(--red); box-shadow: 0 0 10px rgba(230, 52, 46, 0.6); }
.act-w { font: 800 clamp(104px, 27vw, 360px)/0.8 var(--display); letter-spacing: -0.03em; text-transform: uppercase; margin: clamp(14px, 2vw, 26px) 0 0 -0.04em; text-shadow: 0 0 34px rgba(236, 234, 226, 0.25); }
.kit-display .act-w { font-weight: 700; letter-spacing: 0; }

.beats { list-style: none; margin: 0; padding: 0; }
.beat { display: grid; grid-template-columns: clamp(34px, 6vw, 86px) minmax(0, 1fr); gap: clamp(12px, 2.4vw, 34px); padding-bottom: clamp(60px, 13vw, 170px); position: relative; }
.beat > :last-child { min-width: 0; }
.beat::before { content: ""; position: absolute; left: clamp(16px, 3vw, 42px); top: 44px; bottom: 6px; width: 1px; background: repeating-linear-gradient(180deg, var(--dim) 0 2px, transparent 2px 10px); opacity: 0.55; }
.beat-n { font: 400 22px/1 var(--hud); letter-spacing: 0.08em; color: var(--red-text); padding-top: 0.5em; text-shadow: 0 0 10px rgba(230, 52, 46, 0.6); }
.kit-hud .beat-n { font-size: 13px; }
.say { font: 800 clamp(31px, 5.4vw, 76px)/1.06 var(--display); letter-spacing: -0.02em; max-width: 17em; margin: 0; text-wrap: balance; text-shadow: 0 0 22px rgba(236, 234, 226, 0.22); }
.kit-display .say { font-weight: 700; letter-spacing: 0; }
.say span { -webkit-box-decoration-break: clone; box-decoration-break: clone; background: linear-gradient(var(--ink), var(--ink)) no-repeat 100% 50% / 0% 86%; }
.beat .body { max-width: 34em; margin: clamp(18px, 2.4vw, 30px) 0 0; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; }
.beat-frame { padding-bottom: clamp(50px, 9vw, 120px); }
.beat-frame::before { top: 0; }
.answer { font-size: clamp(46px, 9.6vw, 150px); line-height: 0.92; max-width: 9em; margin: 0 0 clamp(50px, 9vw, 120px); }

.onward { display: flex; align-items: baseline; gap: clamp(14px, 3vw, 34px); padding: clamp(20px, 3vw, 34px) 0; margin-top: clamp(50px, 9vw, 120px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.onward .hud { color: var(--dim); }
.onward b { font: 800 clamp(30px, 4.6vw, 60px)/0.9 var(--display); text-transform: uppercase; letter-spacing: -0.02em; }
.kit-display .onward b { font-weight: 700; letter-spacing: 0; }
.onward-arrow { margin-left: auto; align-self: center; width: clamp(20px, 3vw, 34px); height: clamp(20px, 3vw, 34px); border-right: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(45deg) translate(-30%, -30%); }
.onward:hover b, .onward:focus-visible b { color: var(--red-text); }
.story .beliefs + h3.group { margin-top: clamp(60px, 10vw, 130px); }

/* held back, then let through. Only with scripts on and motion allowed. */
.story-on:not(.quiet) .say span { background-size: 100% 86%; color: transparent; text-shadow: none; transition: background-size 0.7s steps(9, end) 0.12s, color 0s linear 0.3s; }
.story-on:not(.quiet) .beat .body, .story-on:not(.quiet) .beat-frame .feed, .story-on:not(.quiet) .answer { opacity: 0; transition: opacity 0.5s steps(5, end) 0.75s; }
.story-on:not(.quiet) .beat-frame .feed, .story-on:not(.quiet) .answer { transition-delay: 0.1s; }
.story-on:not(.quiet) .beat-n { opacity: 0.35; transition: opacity 0.2s steps(2, end); }
.story-on:not(.quiet) .is-in .say span { background-size: 0% 86%; color: inherit; }
.story-on:not(.quiet) .is-in .body, .story-on:not(.quiet) .is-in.beat-frame .feed, .story-on:not(.quiet) .answer.is-in, .story-on:not(.quiet) .is-in .beat-n { opacity: 1; }
.story-on:not(.quiet) .act .act-w { clip-path: inset(0 100% 0 0); transition: clip-path 0.55s steps(8, end) 0.1s; }
.story-on:not(.quiet) .act.is-in .act-w { clip-path: inset(0 -5% 0 -5%); }
@media (max-width: 720px) { .act { min-height: min(56vh, 460px); } .beat::before { top: 34px; } }

/* 8.1 No empty screens: nothing in the story is invisible before it is reached.
   Only the large lines sit under a bar, and the bar itself is something to see. */
.story-on:not(.quiet) .beat .body, .story-on:not(.quiet) .beat-frame .feed, .story-on:not(.quiet) .answer { opacity: 1; transition: none; }
.story-on:not(.quiet) .beat-n { opacity: 1; }
.story-on:not(.quiet) .act .act-w, .story-on:not(.quiet) .act.is-in .act-w { clip-path: none; }
.story-on:not(.quiet) .say span { transition: background-size 0.45s steps(7, end), color 0s linear 0.18s; }
.act { min-height: min(46vh, 420px); padding-top: clamp(20px, 4vw, 60px); margin-bottom: clamp(26px, 5vw, 64px); }
.beat { padding-bottom: clamp(44px, 9vw, 130px); }
.beat-frame { padding-bottom: clamp(40px, 7vw, 100px); }
.answer { margin-bottom: 0; }
.onward { margin-top: clamp(36px, 7vw, 100px); }
@media (max-width: 720px) {
  section { padding-block: 40px; }
  .act { min-height: 0; padding-top: 6px; padding-bottom: 20px; margin-bottom: 28px; }
  .act-w { font-size: clamp(96px, 31vw, 150px); }
  .story .beliefs + h3.group { margin-top: 48px; }
  .signoff { padding-top: 44px; }
}

/* 8.2 Libraries: decoded lines, character-grid title cards, shader stills */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.act-art { margin: clamp(14px, 2vw, 26px) 0 0; max-width: 100%; overflow: hidden; font-family: ui-monospace, Menlo, Consolas, "DejaVu Sans Mono", monospace; line-height: 1.2; color: var(--ink); text-shadow: 0 0 18px rgba(236, 234, 226, 0.3); white-space: pre; }
/* The veil moves out of main so the shader canvas can sit between the haze and the page */
main::before { content: none; }
body::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5, 5, 5, 0.5), rgba(5, 5, 5, 0.92) 5%, rgba(5, 5, 5, 0.92) 95%, rgba(5, 5, 5, 0.5)); }
@media (max-width: 879px) { body::after { background: rgba(5, 5, 5, 0.9); } }
.feed.vfx-on { background: transparent; }
.feed.vfx-on canvas.st, .feed.vfx-on canvas.px { display: none; }

/* 8.3 Layout and responsiveness pass */
/* Top rail, 721 to 1039: the keys were squeezed to a clipped strip ("4 WH", "5 CONT") and the clock wrapped.
   Degauss and the clock are secondary and already hide under 721; they now hide until there is room. */
.keys { flex: none; }
#clock { white-space: nowrap; }
@media (min-width: 721px) and (max-width: 1039px) { .rail-top .wide { display: none; } }
/* Bottom rail: the page title and the review link wrapped to two lines and squeezed the meter. One line each. */
.rail-bot > .wide, #where { white-space: nowrap; }
#where { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rail-bot .meter { flex-shrink: 0; }

/* Phones: tap targets of 44px or more (visual size unchanged where the link is text) */
@media (max-width: 720px) {
  .rail .switch { min-height: 44px; }
  .ident { height: 44px; }
}
.rows a, .bar a, .lane li a { display: inline-block; padding-block: 11px; margin-block: -11px; }
.addr { padding-block: 8px; margin-block: 8px 6px; }

/* Archive covers: a lone last cover on the two-column phone grid now takes the full row */
@media (max-width: 759px) { .chans > .chan:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* Archive tuner: labels sit level with the first row of keys, not centred on a wrapped block */
@media (min-width: 720px) { .tuner-row { align-items: start; } .tuner-name { padding-top: 15px; } }

/* Systems rows, 880 to 1099: the description column was about 260px wide and the status chip wrapped.
   Two columns, with the chip under the description. */
@media (min-width: 880px) and (max-width: 1099px) {
  .rows li { grid-template-columns: 12em minmax(0, 1fr); }
  .rows li > .chip { grid-column: 2; justify-self: start; }
}
@media (min-width: 1100px) { .rows li { grid-template-columns: 17em minmax(0, 1fr) minmax(15em, max-content); } }

/* Project credits box: a narrower label column so the values do not stack four lines high */
@media (min-width: 620px) { .credits div { grid-template-columns: 9.5em 1fr; } }

/* Smallest phones (320 to 359) */
@media (max-width: 359px) {
  .addr { font-size: 20px; letter-spacing: 0.02em; overflow-wrap: normal; white-space: nowrap; }
  .kit-hud .addr { font-size: 12.5px; }
  .chip { letter-spacing: 0.03em; }
  .act-top { gap: 10px; }
  .act-top .hud { letter-spacing: 0.02em; white-space: nowrap; }
  .act-marks { gap: 3px; }
  .act-marks i { width: 14px; }
}

/* 8.4 Contrast, phosphor glow, irregular motion, one second colour for system states */
:root {
  --dim: #b4b1a9;                 /* secondary text, lifted from #94918a so small type reads through the scanlines */
  --blue: #008cff;                /* brand kit Electric Blue: digital links, verified states, system feedback. Nothing else. */
}
/* Contrast: running text is brighter and never below 17px; the scanlines are lighter */
.body { color: #c9c6be; font-size: max(17px, 1em); }
.beat .body { color: #c9c6be; }
.rows p, .box p, .belief p, .chan-n, .credits dd { color: #c9c6be; }
.crt {
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.2) 2px 3px),
    radial-gradient(115% 95% at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.72) 100%);
  animation: none;
}
/* The bar, the dip and the tracking line are timed by the script now, not by a loop */
.crt .roll { animation: none; }
.crt .trk { position: absolute; left: 0; right: 0; top: 50%; height: 2px; opacity: 0; background: linear-gradient(90deg, transparent, rgba(236, 234, 226, 0.9) 12%, rgba(236, 234, 226, 0.6) 70%, transparent); box-shadow: 0 0 12px rgba(236, 234, 226, 0.5); }
.quiet .crt .trk { display: none; }

/* Glow as phosphor bloom: a sharp core, a short halo, a wide faint halo,
   and a hair of red and blue at the edges where the three guns do not quite meet. */
h1, h2:not(.sub), .titles, .chan-name, .creed p, .say, .act-w, .onward b {
  text-shadow: 0 0 1px rgba(236, 234, 226, 0.6), 0 0 6px rgba(236, 234, 226, 0.26), 0 0 30px rgba(236, 234, 226, 0.13),
    -0.014em 0 0 rgba(230, 52, 46, 0.4), 0.014em 0 0 rgba(0, 140, 255, 0.34);
}
h1 em, h2 em, .glitch em { text-shadow: 0 0 1px rgba(255, 150, 140, 0.7), 0 0 8px rgba(230, 52, 46, 0.5), 0 0 36px rgba(230, 52, 46, 0.26); }
.act-art { text-shadow: 0 0 2px rgba(236, 234, 226, 0.5), 0 0 16px rgba(236, 234, 226, 0.22); }
.rail, .hud, .key, .go, .chip, .ph, .tag, .tuner-name, .chan-n, .credits dt, .client, .addr { text-shadow: 0 0 5px rgba(236, 234, 226, 0.3); }
.keys a b, .hud b, .ph-n, .beat-n { text-shadow: 0 0 1px rgba(255, 150, 140, 0.6), 0 0 9px rgba(230, 52, 46, 0.55); }
.ph-n, .act-n, .go.solid, .act-marks i.on { box-shadow: 0 0 14px rgba(230, 52, 46, 0.42); }
.feed.is-live { box-shadow: 0 0 34px rgba(236, 234, 226, 0.07); }
.story-on:not(.quiet) .beat:not(.is-in) .say span { text-shadow: none; }

/* Electric Blue, held to four jobs */
a:focus-visible, button:focus-visible, .feed:focus-visible, .chan:focus-visible, input:focus-visible { outline-color: var(--blue); }   /* 1. keyboard focus */
.console { border-color: var(--blue); } .cli label { color: var(--blue); }                                                              /* 2. the command line answering */
.meter i { background: repeating-linear-gradient(90deg, var(--blue) 0 4px, transparent 4px 6px); }                                    /* 3. how far down the page */
#systems .chip.on { border-color: var(--blue); } #systems .chip.on::before { background: var(--blue); box-shadow: 0 0 8px rgba(0, 140, 255, 0.7); } /* 4. verified states and links in the systems record */
#systems .readout b { color: var(--blue); text-shadow: 0 0 1px rgba(150, 205, 255, 0.7), 0 0 9px rgba(0, 140, 255, 0.55); }
#systems .bar-track i { background: var(--blue); box-shadow: 0 0 10px rgba(0, 140, 255, 0.45); }
#systems .rows a, #systems .bar a, #systems .body a { text-decoration-color: var(--blue); }
#systems .rows a:hover, #systems .bar a:hover, #systems .body a:hover { color: var(--blue); }
/* 8.4 spacing left open by the layout pass */
.act { min-height: 0; }
.story { padding-bottom: clamp(28px, 4vw, 56px); }
@media (max-width: 480px) { .beat { grid-template-columns: 26px minmax(0, 1fr); gap: 8px; } .beat::before { left: 11px; } }
@media (max-width: 879px) { .feed.portrait { max-width: 460px; } }

/* 8.5 Rails: three zones on one centre line, the same control height throughout,
   brighter text, a red signal on the top rail and a blue one on the bottom */
.rail { background: rgba(5, 5, 5, 0.94); }
.rail-l, .rail-r { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rail-r { margin-left: auto; justify-content: flex-end; }
.rail-top .rail-r .wide, .rail-bot .rail-r .wide { white-space: nowrap; }
.rail::after { content: ""; position: absolute; left: 50%; width: min(240px, 34vw); height: 1px; transform: translateX(-50%); pointer-events: none; }
.rail-top::after { bottom: -1px; background: linear-gradient(90deg, transparent, var(--red) 30%, var(--red) 70%, transparent); box-shadow: 0 0 12px rgba(230, 52, 46, 0.8); }
.rail-bot::after { top: -1px; background: linear-gradient(90deg, transparent, var(--blue) 30%, var(--blue) 70%, transparent); box-shadow: 0 0 12px rgba(0, 140, 255, 0.8); }
.keys a { color: var(--ink); }
.keys a.is-here, .keys a:hover { box-shadow: 0 0 16px rgba(230, 52, 46, 0.5); text-shadow: none; }
.keys a.is-here b, .keys a:hover b { text-shadow: none; }
.switch { border-color: #4b4944; color: var(--dim); }
.switch:hover { border-color: var(--ink); box-shadow: 0 0 10px rgba(236, 234, 226, 0.18); }
#signal[aria-pressed="true"] b { color: var(--ink); text-shadow: 0 0 1px rgba(236, 234, 226, 0.7), 0 0 8px rgba(236, 234, 226, 0.45); }
#clock { color: var(--amb); } #clock b { color: var(--ink); font-weight: 400; margin-left: 4px; }
#where { color: var(--ink); }
.rail-bot .rail-r a { color: var(--dim); } .rail-bot .rail-r a:hover { color: var(--ink); }
.cli { border-color: #4b4944; }
.cli:focus-within { border-color: var(--blue); box-shadow: 0 0 12px rgba(0, 140, 255, 0.35); }
.cli input { caret-color: var(--blue); }
.meter { border-color: #4b4944; } .rail-bot .meter { flex: none; width: 150px; }
.meter i { box-shadow: 0 0 8px rgba(0, 140, 255, 0.6); }
.egg { opacity: 0.5; filter: drop-shadow(0 0 4px rgba(230, 52, 46, 0.7)); }
@media (min-width: 721px) {
  .rail .switch, .rail .cli, .keys a { height: 30px; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; }
  .rail .cli { display: flex; }
  .keys { align-items: center; }
}
@media (min-width: 1200px) {
  /* left zone and right zone are the same width, so the keys and the command line share the page's centre line */
  .rail { display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); column-gap: 18px; }
  .rail-top .keys { justify-self: center; }
  .rail-bot .cli { justify-self: center; width: clamp(240px, 30vw, 420px); max-width: none; flex: none; }
  .rail-r { margin-left: 0; }
}
@media (min-width: 721px) and (max-width: 1039px) { .rail-bot .meter { flex: 1; width: auto; } .rail-bot .rail-r { flex: 1; } }
.rail .switch { gap: 0.4em; }

/* 8.6 Rails: the content sits in the part of the bar you can see.
   From 900px a black frame 8px wide covers the outer edge of each rail, so content centred in the
   whole rail looked pushed up in the top bar and down in the bottom bar. The rail is 8px taller
   there and keeps those 8px clear on the frame's side. */
@media (min-width: 900px) {
  :root { --rail: 54px; }
  .rail-top { padding-top: 8px; }
  .rail-bot { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); height: calc(var(--rail) + env(safe-area-inset-bottom, 0px)); }
  .rail-l, .rail-r, .keys { align-items: center; }
  .rail .egg, .rail .meter { align-self: center; }
}

/* 8.8 Degauss button removed; the clock is the viewer's own. Rail collisions seen in a narrow pane. */
#clock span { color: var(--amb); }
@media (min-width: 721px) and (max-width: 899px) {
  .keys a b { display: none; }               /* no room for the key numbers next to the switch */
  .rail-top .keys { min-width: 0; flex: 0 1 auto; }
  .ident { width: 128px; }
}
@media (max-width: 400px) {
  .switch .lbl { display: none; }            /* "Signal:" does not fit beside the mark; the state alone stays */
  .ident { width: 118px; }
}

/* 8.9 Responsive pass 2 */
/* Part label ("PART ONE OF THREE") wrapped to two lines beside the progress marks at 280 to 361px. One line; type and marks give way. */
.act-top { flex-wrap: nowrap; white-space: nowrap; min-width: 0; }
.act-marks { flex: none; }
@media (max-width: 400px) {
  .act-top { font-size: 18px; letter-spacing: 0.02em; gap: 8px; }
  .act-marks i { width: 12px; }
  .act-n { min-width: 2em; padding-inline: 6px; }
}
/* Section marker (.ph): "THE ONE / TELLING IT" and "THE SYSTEMS / RECORD" wrapped and the rule between collapsed to a few pixels at 280 to 320px. One line, smaller type, rule may shrink. */
.ph > span:not(.ph-rule) { white-space: nowrap; }
.ph-rule { min-width: 8px; }
@media (max-width: 400px) { .ph { font-size: 18px; letter-spacing: 0.04em; gap: 8px; } }
/* Creed (A, B, C): the label column was 2.6em wide at every size, leaving a 150px text column at 290px. Fluid label column. */
.creed p { grid-template-columns: clamp(1.5em, 8vw, 2.6em) minmax(0, 1fr); }
/* Archive covers, role group (three covers): from 480 to 759 two columns left one cover alone on a full-width row (700px wide, 400px tall). Three across instead. */
@media (min-width: 480px) and (max-width: 759px) {
  .chans.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chans.three > .chan:last-child:nth-child(odd) { grid-column: auto; }
  .chans.three .chan-name { font-size: clamp(18px, 3.4vw, 22px); }
}
/* Below 480 the lone third cover still spans the row; keep it from growing taller than the pair above it */
@media (max-width: 479px) { .chans > .chan:last-child:nth-child(odd) .feed { max-height: 56vw; } }
/* Film grid: a single column of 500 to 700px wide cards from 560 to 699px. Two columns from 600. */
@media (min-width: 600px) { .work { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .work { grid-template-columns: repeat(3, 1fr); } }
/* Email address links were 40px tall on phones. 44px tap height, spacing kept. */
.addr { min-height: 44px; padding-block: 11px; margin-block: 5px 3px; }
/* Last words of a paragraph standing alone on a line (detector: straggler). Pretty wrapping where the browser supports it. */
p, .body, .role, .lede, .fold { text-wrap: pretty; }
.say, .answer, h1, h2, h3, .titles { text-wrap: balance; }
/* Bottom rail on project pages (long page title): the title, command line, meter and "Draft 8" link overlapped at 760 to 1040px and the right zone ran off the screen at 1200 to 1320px.
   The right group never shrinks below its content; the title zone gives way and ends in an ellipsis; from 1200 the left column may shrink to 0 instead of growing to the title's full length. */
@media (min-width: 721px) {
  .rail-bot .rail-r { flex: 1 0 auto; }
  .rail-bot .rail-l { flex: 0 1 auto; min-width: 0; overflow: hidden; }
}
@media (min-width: 1200px) {
  .rail { grid-template-columns: minmax(0, 1fr) auto minmax(max-content, 1fr); }
  .rail-top .rail-l { min-width: max-content; }
}

/* 8.10 Vítor's three answers.
   Tablets held upright (721 to 899px) are touch devices: rail controls are 44px tall there, in a taller rail. */
@media (min-width: 721px) and (max-width: 899px) {
  :root { --rail: 58px; }
  .rail .switch, .rail .cli, .keys a, .rail #where, .rail .rail-r > a, .rail .ident { height: 44px; min-height: 44px; display: inline-flex; align-items: center; }
  .rail .cli { display: flex; }
  .keys a { padding-inline: 10px; }
}
/* The creed box (A, B, C) had lines of about eleven characters at 290px: smaller type on very narrow screens only. */
@media (max-width: 360px) {
  .creed p { font-size: 19px; line-height: 1.16; }
  .box.creed { padding: 14px 12px; }
}

/* 9.0 What forks into two branches */
.fork { display: grid; gap: 14px; position: relative; padding-top: 34px; }
.fork::before { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 18px; background: var(--dim); }
.fork::after { content: ""; position: absolute; left: 25%; right: 25%; top: 18px; height: 16px; border: 1px solid var(--dim); border-bottom: 0; }
.fork a { display: grid; gap: 8px; text-decoration: none; color: var(--ink); }
.fork a b { font: 800 clamp(34px, 6vw, 72px)/0.95 var(--display); text-transform: uppercase; letter-spacing: -0.02em; }
.kit-display .fork a b { font-weight: 700; letter-spacing: 0; }
.fork-n { color: #c9c6be; }
.fork a:first-child:hover, .fork a:first-child:focus-visible { border-color: var(--blue); } .fork a:first-child:hover b { color: var(--blue); }
.fork a:last-child:hover, .fork a:last-child:focus-visible { border-color: var(--red); } .fork a:last-child:hover b { color: var(--red-text); }
@media (min-width: 600px) { .fork { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .fork::after { left: 12%; right: 12%; } }

/* 9.0 How as one map: a hexagon core, six nodes, and the six beliefs beside it */
.core-wrap { display: grid; gap: clamp(26px, 5vw, 70px); }
.core-stick { justify-self: center; width: min(100%, 440px); }
.core { display: block; width: 100%; height: auto; overflow: visible; transition: transform 0.18s ease-out; }
.core polygon, .core line { fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.core .c-outer { stroke: #4b4944; }
.core .c-inner { stroke: var(--ink); }
.core .c-heart { fill: var(--red); stroke: none; filter: drop-shadow(0 0 10px rgba(230, 52, 46, 0.9)); }
.core .c-spoke, .core .c-edge { stroke: var(--ink); }
.core .c-link.red, .core .c-node.red polygon { stroke: var(--red); } .core .c-link.blue, .core .c-node.blue polygon { stroke: var(--blue); }
.core .c-node polygon { fill: rgba(5, 5, 5, 0.9); stroke-width: 2; }
.core .c-node text { font: 20px/1 var(--hud); letter-spacing: 0.04em; fill: var(--ink); }
.core .c-node { cursor: pointer; }
.core .c-node:hover polygon, .core .c-node:focus-visible polygon, .core .c-node.cur polygon { fill: var(--ink); } .core .c-node:hover text, .core .c-node:focus-visible text, .core .c-node.cur text { fill: var(--bg); }
.core .c-node.red polygon { filter: drop-shadow(0 0 8px rgba(230, 52, 46, 0.6)); } .core .c-node.blue polygon { filter: drop-shadow(0 0 8px rgba(0, 140, 255, 0.6)); }
/* with scripts on, the map starts dark and each belief reached wires its part */
.core.live .c-spoke, .core.live .c-edge, .core.live .c-link { opacity: 0.14; transition: opacity 0.25s steps(3, end); }
.core.live .c-node { opacity: 0.4; transition: opacity 0.25s steps(3, end); }
.core.live .c-heart { opacity: 0.35; transition: opacity 0.4s; }
.core.live .on { opacity: 1; } .core.live.full .c-heart { opacity: 1; } .core.live.full .c-outer { stroke: var(--ink); }
.core-key { display: flex; gap: 16px; justify-content: center; margin: 14px 0 0; color: var(--amb); }
.core-key .k-red::before, .core-key .k-blue::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; }
.k-red::before { background: var(--red); } .k-blue::before { background: var(--blue); }
#core-count { color: var(--ink); margin-left: auto; }
.core-list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(44px, 7vw, 96px); }
.node-item { display: grid; gap: 12px; scroll-margin-top: 30vh; }
.node-item h3 { font-size: clamp(28px, 3.6vw, 44px); margin: 0; }
.node-item p { margin: 0; max-width: 32em; color: #c9c6be; font-size: clamp(18px, 1.6vw, 20px); line-height: 1.5; }
.node-code { justify-self: start; padding: 4px 8px 3px; color: var(--bg); }
.node-item.red .node-code { background: var(--red); } .node-item.blue .node-code { background: var(--blue); }
.core-note { margin: clamp(40px, 6vw, 80px) 0 0; max-width: 40em; }
@media (min-width: 900px) {
  .core-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
  .core-stick { position: sticky; top: calc(var(--rail) + 6vh); justify-self: stretch; width: auto; max-width: 520px; }
  .core-list { padding-block: 10vh 14vh; }
}
@media (max-width: 899px) { .core-stick { position: sticky; top: var(--rail); z-index: 3; width: min(62vw, 250px); padding: 8px 0 6px; background: rgba(5, 5, 5, 0.92); border-bottom: 1px solid var(--line); justify-self: stretch; width: 100%; } .core-stick .core { width: min(46vw, 200px); margin: 0 auto; } .core-key { margin-top: 2px; } .core .c-node text { font-size: 30px; } }
.quiet .core { transform: none !important; }

/* 9.1 The experience page (whois.html) */
.clients { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.clients li { border: 1px solid var(--line); padding: 6px 9px 5px; color: #c9c6be; font-size: 18px; line-height: 1; }
.kit-hud .clients li { font-size: 12px; }
.xps { list-style: none; margin: 0; padding: 0; }
.xp { display: grid; gap: 12px; padding: clamp(24px, 4vw, 44px) 0; border-top: 1px solid var(--line); }
.xp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--dim); }
.xp-meta b { background: var(--red); color: var(--bg); padding: 4px 8px 3px; font-weight: 400; text-shadow: none; box-shadow: 0 0 14px rgba(230, 52, 46, 0.42); }
.xp-body { min-width: 0; }
.xp-body h3 { font-size: clamp(30px, 4vw, 52px); margin: 0 0 6px; }
.xp-role { color: var(--ink); font-size: clamp(18px, 1.7vw, 21px); margin: 0 0 14px; max-width: 34em; }
.xp-body > p:not(.xp-role), .xp-pts li { color: #c9c6be; max-width: 44em; line-height: 1.55; font-size: max(17px, 1em); }
.xp-body > p { margin: 0; }
.xp-pts { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.xp-pts li { position: relative; padding-left: 22px; }
.xp-pts li::before { content: ">"; position: absolute; left: 0; top: 0; color: var(--red-text); font: 400 1em/1.55 var(--hud); }
@media (min-width: 880px) {
  .xp { grid-template-columns: 15em minmax(0, 1fr); gap: 34px; }
  .xp-meta { flex-direction: column; align-items: flex-start; position: sticky; top: calc(var(--rail) + 24px); align-self: start; }
}
.skills { display: grid; gap: 14px; }
.skills .box h3 { font-size: clamp(22px, 2.4vw, 30px); margin: 0 0 10px; }
.skills .box p { margin: 0; color: #c9c6be; }
@media (min-width: 720px) { .skills { grid-template-columns: 1fr 1fr; } }

/* 9.2 The archive viewer: one large monitor, its data, and a strip of the section's pieces */
.viewer { display: grid; gap: clamp(18px, 3vw, 34px); margin: clamp(18px, 3vw, 30px) 0 14px; }
.stage-screen { position: relative; aspect-ratio: 16 / 9; background: #0b0b0b; border: 2px solid #3a3835; overflow: hidden; box-shadow: 0 0 44px rgba(236, 234, 226, 0.08), 0 0 0 1px rgba(230, 52, 46, 0.25); }
.stage-screen img, .stage-screen iframe, .stage-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.stage-screen .scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, 0.5) 3px 4px); opacity: 0.16; }
.stage-screen .tag { position: absolute; z-index: 2; font: 18px/1 var(--hud); letter-spacing: 0.08em; text-transform: uppercase; background: rgba(5, 5, 5, 0.86); color: var(--ink); padding: 5px 7px 4px; }
.stage-screen .tag.tl { left: 10px; top: 10px; } .stage-screen .tag.br { right: 10px; bottom: 10px; }
.stage-screen .tag.br::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 7px; background: var(--red); }
.stage-screen .film-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; }
.stage-screen.is-switch img { animation: retune 0.34s steps(5) both; }
.stage-data { min-width: 0; display: grid; gap: 12px; align-content: start; }
.stage-data h3 { font-size: clamp(28px, 3.4vw, 46px); margin: 0; text-wrap: balance; }
.stage-data .client { margin: 0; }
.stage-data > p:not(.client) { margin: 0; color: #c9c6be; max-width: 34em; }
.stage-dl { margin: 4px 0 0; display: grid; gap: 8px; }
.stage-dl div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.stage-dl dt { font: 18px/1.3 var(--hud); letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); }
.stage-dl dd { margin: 0; color: var(--ink); }
.stage-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
#stage-count { margin-left: auto; color: var(--ink); }
.strip-hint { color: var(--amb); margin: 0 0 10px; }
@media (min-width: 980px) { .viewer { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; } }
@media (hover: none) { .strip-hint { display: none; } }
/* the strip */
#grid.work { display: flex; grid-template-columns: none; gap: 12px; overflow-x: auto; padding: 4px 2px 16px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--red) transparent; cursor: grab; }
#grid.work:active { cursor: grabbing; }
#grid.work .card { flex: 0 0 clamp(150px, 22vw, 230px); scroll-snap-align: center; opacity: 0.55; transition: opacity 0.15s steps(2, end); user-select: none; -webkit-user-drag: none; }
#grid.work .card:hover, #grid.work .card:focus-visible, #grid.work .card.is-cur { opacity: 1; }
#grid.work .card.is-cur .feed { border-color: var(--red); box-shadow: 0 0 18px rgba(230, 52, 46, 0.45); }
#grid.work .card h3 { font-size: 19px; line-height: 1.1; margin: 8px 0 2px; }
#grid.work .card .meta { font-size: 14px; }
#grid.work .card .tags { display: none; }
#grid.work .card img { pointer-events: none; }
#stage-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }
/* on phones the two filter rows are single lines that scroll sideways, so the monitor is on the first screen */
@media (max-width: 720px) {
  .tuner-keys { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .tuner-keys::-webkit-scrollbar { display: none; }
  .tuner-keys .key { flex: none; }
}

/* 9.3 Keys with two names. From 900px the site's own name shows and the plain one appears on hover,
   focus or a passing glitch. On phones the plain name shows and the other one flickers in. Between, plain only. */
.k2 { display: inline-grid; }
.k2 > span { grid-area: 1 / 1; white-space: nowrap; }
.k-a { display: none; }
@media (min-width: 900px) {
  .k-a { display: block; } .k-b { opacity: 0; }
  .keys a:hover .k-a, .keys a:focus-visible .k-a, .keys a.flip .k-a { opacity: 0; }
  .keys a:hover .k-b, .keys a:focus-visible .k-b, .keys a.flip .k-b { opacity: 1; }
  .keys a.flip .k-b { animation: slice 0.3s steps(3) 1; }
}
@media (max-width: 720px) {
  .k2 { display: grid; justify-items: center; }
  .k-a { display: block; opacity: 0; color: var(--red-text); }
  .keys a.is-here .k-a { color: var(--bg); }
  .keys a.flip .k-a { opacity: 1; animation: slice 0.3s steps(3) 1; } .keys a.flip .k-b { opacity: 0; }
}
.quiet .keys a.flip .k-a, .quiet .keys a.flip .k-b { animation: none; }

/* 9.4 His GitHub activity charts, as drawn for his profile */
.gh { display: grid; gap: 16px; }
.gh-fig { margin: 0; border: 1px solid var(--line); background: rgba(5, 5, 5, 0.6); padding: clamp(8px, 2vw, 20px); }
.gh-fig img { display: block; width: 100%; height: auto; }
.gh-fig:first-child img { max-width: 860px; margin: 0 auto; }
.gh-note { margin: 0; color: var(--dim); line-height: 1.5; }
.gh-note a { color: var(--ink); text-decoration-color: var(--blue); }

/* 9.5 GitHub activity drawn by the site: a field of bars, four counts, a daily trace */
.gh { display: grid; gap: clamp(18px, 3vw, 40px); }
.gh-field { min-width: 0; border: 1px solid var(--line); padding: clamp(10px, 2vw, 22px); background: rgba(5, 5, 5, 0.55); }
.gh-head { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; color: var(--dim); }
.gh-head b { color: var(--ink); font-size: 1.5em; text-shadow: 0 0 1px rgba(236, 234, 226, 0.7), 0 0 10px rgba(236, 234, 226, 0.35); }
.gh-head i { color: var(--red-text); font-style: normal; }
.gh-state { margin-left: auto; border: 1px dashed var(--dim); padding: 3px 7px 2px; color: var(--dim); }
.gh-state.live { border: 1px solid var(--blue); color: var(--ink); }
.gh-state.live::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; background: var(--blue); box-shadow: 0 0 8px rgba(0, 140, 255, 0.8); animation: blink 1.6s steps(1) infinite; }
#gh-canvas { display: block; width: 100%; filter: drop-shadow(0 0 14px rgba(230, 52, 46, 0.28)); cursor: crosshair; touch-action: pan-y; }
.gh-tip { margin: 6px 0 0; color: var(--ink); min-height: 1.3em; }
.gh-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
.gh-meter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; }
.gh-meter span { color: #c9c6be; }
.gh-meter b { font: 400 26px/1 var(--hud); color: var(--blue); text-shadow: 0 0 1px rgba(150, 205, 255, 0.7), 0 0 9px rgba(0, 140, 255, 0.55); }
.gh-meter i { grid-column: 1 / -1; height: 6px; background: #1d1c1a; display: block; }
.gh-meter u { display: block; height: 100%; width: 3%; background: var(--blue); box-shadow: 0 0 10px rgba(0, 140, 255, 0.45); transition: width 0.6s steps(12, end); }
.gh-sub { margin: 8px 0 -8px; color: var(--label); }
.gh-spark { width: 100%; height: 90px; display: block; border-bottom: 1px solid var(--line); }
.gh-spark path { fill: none; stroke: var(--red); stroke-width: 1.5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(230, 52, 46, 0.7)); }
.gh-note { margin: 0; color: var(--dim); line-height: 1.5; grid-column: 1 / -1; }
@media (min-width: 980px) { .gh { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); align-items: start; } }
.quiet .gh-state.live::before { animation: none; }

/* 9.10 Work and Contact are plain names already: below 900px they stay showing, and it is the other name that flickers in */
@media (max-width: 899px) { .k2.swap .k-a { display: block; opacity: 1; color: inherit; } .k2.swap .k-b { opacity: 0; } }
@media (min-width: 721px) and (max-width: 899px) { .k2.swap .k-b { display: none; } }
@media (max-width: 720px) {
  .k2.swap .k-b { color: var(--red-text); } .keys a.is-here .k2.swap .k-b { color: var(--bg); }
  .keys a.flip .k2.swap .k-a { opacity: 0; animation: none; } .keys a.flip .k2.swap .k-b { opacity: 1; animation: slice 0.3s steps(3) 1; }
}

/* 9.14 Keys that resize with their name. Each key is as wide as the name it shows; on hover or focus it
   slides to the width of its other name and the keys after it follow. The row is pinned at its left edge and
   reserves the room the longest growth needs, so nothing to the left of the pointer moves and the Signal
   switch is never reached. Widths are measured by the script (--wa, --wb, --kw); without it the keys stay still. */
@media (min-width: 900px) {
  .rail-top .keys { gap: 2px; width: var(--kw, auto); justify-content: flex-start; }
  .rail-top .k2 { position: relative; justify-items: start; width: var(--wa, auto); transition: width 0.24s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .rail-top .k2 > span { transition: opacity 0.14s; }
  .rail-top .k2 .k-b { position: absolute; left: 0; top: 50%; transform: translateY(-50%); grid-area: auto; }
  .rail-top .keys a:focus-visible .k2, .rail-top .keys a.open .k2 { width: var(--wb, auto); }
  .rail-top .keys a.flip:not(.open) .k2 { width: max(var(--wa, 0px), var(--wb, 0px)); }
  .rail-top .keys a.open { background: var(--red); color: var(--bg); box-shadow: 0 0 16px rgba(230, 52, 46, 0.5); text-shadow: none; }
  .rail-top .keys a.open b { color: var(--bg); text-shadow: none; }
  .rail-top .keys a.open .k-a { opacity: 0; } .rail-top .keys a.open .k-b { opacity: 1; }
  /* a key that slid under a resting pointer keeps its shown name until the pointer moves */
  .rail-top .keys.dyn a:hover:not(.open):not(.flip):not(:focus-visible) .k-a { opacity: 1; }
  .rail-top .keys.dyn a:hover:not(.open):not(.flip):not(:focus-visible) .k-b { opacity: 0; }
}
.quiet .rail-top .k2, .quiet .rail-top .k2 > span { transition: none; }
@media (prefers-reduced-motion: reduce) { .rail-top .k2, .rail-top .k2 > span { transition: none; } }

/* 9.15 How as a mind map in space. A hexagonal core, a branch for story and one for systems, three beliefs on each.
   The script turns it as the page scrolls; the still drawing comes from the build. */
.core .c-prism { fill: rgba(5, 5, 5, 0.55); stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.core .c-trunk { stroke-width: 2.5; }
.core .c-cross { stroke: #6b6862; stroke-width: 1; stroke-dasharray: 3 6; }
.core .c-hub.red polygon { fill: var(--red); stroke: none; filter: drop-shadow(0 0 9px rgba(230, 52, 46, 0.7)); }
.core .c-hub.blue polygon { fill: var(--blue); stroke: none; filter: drop-shadow(0 0 9px rgba(0, 140, 255, 0.7)); }
.core .c-hub text { font: 17px/1 var(--hud); letter-spacing: 0.1em; text-transform: uppercase; fill: var(--ink); }
.core .c-node text.c-name { font: 17px/1 var(--hud); letter-spacing: 0.05em; text-transform: uppercase; fill: var(--dim); }
.core .c-node:hover text.c-name, .core .c-node:focus-visible text.c-name, .core .c-node.cur text.c-name { fill: var(--ink); }
.core .c-pulse { fill: var(--ink); } .core .c-pulse.red { fill: #ff8a80; filter: drop-shadow(0 0 6px var(--red)); } .core .c-pulse.blue { fill: #8ccbff; filter: drop-shadow(0 0 6px var(--blue)); }
.core.live .c-cross { opacity: 0.1; transition: opacity 0.25s steps(3, end); }
.core.live .c-hub { opacity: 0.4; transition: opacity 0.25s steps(3, end); }
.core.live .c-prism { opacity: 0.6; transition: opacity 0.4s; }
.core.live .on { opacity: 1; } .core.live .c-cross.on { opacity: 0.8; } .core.live.full .c-prism { opacity: 1; }
.core { transform: none !important; }
@media (min-width: 900px) { .core-stick { max-width: 560px; } }
@media (max-width: 899px) { .core .c-node text.c-name, .core .c-hub text { display: none; } }

/* 9.15 SOUL.md, the hidden file. Its key has no number and sits between 4 and 5. It is not there until the
   visitor opens the file; on the file itself it is the lit key. Blue: the kit's colour for restricted links. */
.keys a.k-soul { display: none; }
.go2 { display: inline-grid; grid-template-columns: auto auto; align-items: center; column-gap: 0.7em; } .go2 > span { grid-area: 1 / 1; white-space: nowrap; justify-self: start; } .go2::after { grid-area: 1 / 2; margin: 0; }
.go2 .g-b { opacity: 0; } .go2:hover .g-a, .go2:focus-visible .g-a { opacity: 0; } .go2:hover .g-b, .go2:focus-visible .g-b { opacity: 1; }
@media (hover: none) { .go2 { display: inline-flex; flex-wrap: wrap; gap: 0 0.7em; } .go2 .g-b, .go2:hover .g-b, .go2:focus-visible .g-b { opacity: 0.75; } .go2:hover .g-a, .go2:focus-visible .g-a { opacity: 1; } }
@media (min-width: 900px) {
  .soul .rail-top .keys a.k-soul { display: inline-flex; color: var(--blue); outline: 1px dashed rgba(0, 140, 255, 0.6); outline-offset: -3px; text-shadow: 0 0 9px rgba(0, 140, 255, 0.65); }
  .soul .rail-top .keys a.k-soul:hover, .soul .rail-top .keys a.k-soul.open, .soul .rail-top .keys a.k-soul.is-here { background: var(--blue); color: var(--bg); outline: none; text-shadow: none; box-shadow: 0 0 16px rgba(0, 140, 255, 0.55); }
  .soul-new .rail-top .keys a.k-soul { animation: slice 0.3s steps(3) 4; }
}
@media (min-width: 900px) and (max-width: 1099px) { .soul .rail-top .keys a b { display: none; } }
.quiet .soul-new .rail-top .keys a.k-soul { animation: none; }

/* the short terminal sequence between the story and the file */
.jack { position: fixed; inset: 0; z-index: 39; display: grid; align-items: center; padding: 0 max(22px, 8vw); background: rgba(5, 5, 5, 0.94); animation: jackbg 0.25s steps(3) both; }
.jack-in { display: grid; gap: 0.5em; font-size: clamp(20px, 3.4vw, 40px); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.jack p { margin: 0; opacity: 0; animation: jackln 0.01s linear forwards; }
.jack p:nth-child(1) { animation-delay: 0.1s; } .jack p:nth-child(2) { animation-delay: 0.4s; color: var(--dim); }
.jack p:nth-child(3) { animation-delay: 0.65s; color: var(--dim); } .jack p:nth-child(4) { animation-delay: 0.9s; }
.jack-go { color: var(--blue); text-shadow: 0 0 12px rgba(0, 140, 255, 0.7); } .jack-go b { font-weight: 400; color: var(--ink); animation: blinkk 0.3s steps(2) infinite; }
.jacking main { animation: slice 0.28s steps(3) 2; }
@keyframes jackbg { from { opacity: 0; } to { opacity: 1; } }
@keyframes jackln { to { opacity: 1; } }
@keyframes blinkk { 50% { opacity: 0.2; } }

/* the file itself: a bar that says where you are, and a tear on arrival */
.filebar { position: sticky; top: calc(var(--rail) + env(safe-area-inset-top, 0px)); z-index: 5; margin-top: var(--rail); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px;
  padding: 9px max(22px, var(--gut-l, 22px)) 8px; background: rgba(5, 5, 5, 0.95); border-bottom: 1px solid rgba(0, 140, 255, 0.55); color: var(--dim); }
.filebar a { color: var(--ink); } .filebar a:hover { color: var(--blue); }
.filebar .fb-file { background: var(--blue); color: var(--bg); padding: 4px 8px 3px; box-shadow: 0 0 14px rgba(0, 140, 255, 0.45); }
.at-soul main { animation: soulin 0.75s steps(7) both; }
@keyframes soulin {
  0% { opacity: 0; clip-path: inset(0 0 92% 0); transform: translateX(-10px); }
  30% { opacity: 1; clip-path: inset(0 0 60% 0); transform: translateX(8px); }
  60% { clip-path: inset(0 0 25% 0); transform: translateX(-4px); }
  100% { opacity: 1; clip-path: inset(0); transform: none; }
}
.quiet.at-soul main, .quiet .jacking main { animation: none; }
@media (prefers-reduced-motion: reduce) { .at-soul main, .soul-new .rail-top .keys a.k-soul { animation: none; } }
@media (max-width: 899px) { .core-stick .core { width: min(58vw, 240px); } }
.core .c-hub text { display: none; } /* the key under the map already names the two branches */
@media (max-width: 899px) { .core-stick { background: var(--bg); } }


/* ---- 9.16: landing, the file's first screen, a core that faces front ---- */
/* The script places every section itself (see "Landing" in app.js). Without the script the browser
   jumps straight to the anchor; scroll-padding keeps the marker clear of the top bar. */
html { scroll-behavior: auto; scroll-padding-top: calc(var(--rail) + 26px); }
.at-soul { scroll-padding-top: calc(var(--rail) + 70px); }
/* the file bar sits right under the top bar, and the file's first screen holds the name and its buttons */
.filebar { margin-top: 0; }
.at-soul .hero { padding-top: clamp(22px, 3.2vw, 40px); }
/* the core is a flat hexagon seen head on; the network turns round it */
.core .c-prism { fill: rgba(5, 5, 5, 0.94); stroke: var(--ink); stroke-width: 2; stroke-linejoin: miter; }
.core .c-heart { transform-box: fill-box; transform-origin: center; animation: corebeat 3.2s ease-in-out infinite; }
@keyframes corebeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.82); } }
.quiet .core .c-heart { animation: none; }
@media (prefers-reduced-motion: reduce) { .core .c-heart { animation: none; } }

/* ---- 9.17: less empty space in the title cards, so What shows both branches on its first screen ---- */
@media (min-width: 900px) {
  .act { padding-bottom: 22px; margin-bottom: 30px; }
  .act-art { margin-top: 14px; }
  #what > h2 { margin-bottom: 20px !important; }
  .fork a { padding: 22px clamp(18px, 3vw, 34px); }
}

/* ---- 9.18: SOUL.md opens as a file, not as a second copy of "Who am I" ---- */
.soulfile { padding-top: clamp(18px, 2.4vw, 30px) !important; }
.sf { display: grid; gap: clamp(22px, 4vw, 56px); align-items: start; }
.sf-pane { min-width: 0; border: 1px solid var(--line); background: rgba(8, 8, 8, 0.72); }
.sf-tab { display: flex; gap: 18px; align-items: center; margin: 0; padding: 7px 14px 6px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase; }
.sf-tab .sf-name { color: var(--ink); text-transform: none; }
.sf-tab span:last-child { margin-left: auto; }
.sf-code { counter-reset: ln; padding: 14px 16px 6px 0; font: 21px/1.38 var(--hud); letter-spacing: 0.03em; color: var(--ink); }
.sf-l { counter-increment: ln; display: block; padding-left: 62px; position: relative; min-height: 1.38em; }
.sf-l::before { content: counter(ln, decimal-leading-zero); position: absolute; left: 0; width: 44px; text-align: right; color: var(--dim); opacity: 0.6; }
.sf-l.in { padding-left: 86px; }
.sf-l .k { color: var(--red-text); }
.sf-l.dim, .sf-l .dim { color: var(--dim); }
.sf-h { display: flex; align-items: baseline; gap: 0.35em; margin-top: 10px; }
.sf-h > .dim { font-size: 30px; }
.soulfile h1 { margin: 0; font-size: clamp(36px, 4.6vw, 66px); line-height: 1; }
.soulfile .hero-go { margin: 18px 16px 18px 62px; }
/* the picture is an attachment to the file: smaller, and never taller than the room between the bars */
.soulfile .sf-pic { margin: 0; width: 100%; max-width: 460px; }
@media (min-width: 880px) {
  .sf { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
  .soulfile .sf-pic { justify-self: end; max-width: none; width: min(100%, calc((100vh - 2 * var(--rail) - 126px) * 0.8)); }
}
@supports (height: 100svh) { @media (min-width: 880px) { .soulfile .sf-pic { width: min(100%, calc((100svh - 2 * var(--rail) - 126px) * 0.8)); } } }
@media (max-width: 599px) { .sf-code { font-size: 18px; } .sf-l { padding-left: 44px; } .sf-l::before { width: 30px; } .sf-l.in { padding-left: 62px; } .soulfile .hero-go { margin-left: 14px; } }

/* ---- 9.19: the map of How as the centre piece. The page holds the stage while six beliefs come out of the core,
   each with its text. Everything here is under .eco, which the script adds; without scripts the list stays a list. ---- */
.core .c-hit { fill: transparent; stroke: none; }
.core .c-ring { fill: none; stroke: var(--ink); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.core .c-ring.go { animation: corering 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes corering { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(4.6); } }
.core .c-dust { fill: var(--ink); stroke: none; }
.core .c-pulse { stroke: none; }
.core-hint, .core-nav { display: none; }
.core-wrap.eco { --stage: calc(100vh - 2 * var(--rail) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); display: block; height: calc(var(--stage) + 6 * 58vh); }
@supports (height: 100svh) { .core-wrap.eco { --stage: calc(100svh - 2 * var(--rail) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); } }
.eco .core-stage { position: sticky; top: calc(var(--rail) + env(safe-area-inset-top, 0px)); height: var(--stage); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; gap: 10px; padding-block: 10px 12px; }
.eco .core-stick { position: relative; top: auto; z-index: auto; width: 100%; max-width: none; min-height: 0; padding: 0; border: 0; background: none; justify-self: stretch; display: grid; grid-template-rows: minmax(0, 1fr) auto; touch-action: pan-y; cursor: grab; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.eco .core-stick.grab { cursor: grabbing; }
.eco .core-stick .core { width: 100%; height: 100%; min-height: 0; margin: 0; }
.eco .core-key { margin: 4px 0 0; }
.eco .core .c-core { cursor: pointer; }
.eco .core .c-node:not(.on) { pointer-events: none; }
.eco .core-hint { display: block; position: absolute; left: 0; top: 0; margin: 0; font-size: 17px; color: var(--dim); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.eco.begun .core-hint { opacity: 0.9; } .eco.used .core-hint { opacity: 0; }
.eco .core-list { display: grid; gap: 0; padding: 0; min-height: 0; }
.eco .node-item { grid-area: 1 / 1; align-content: start; gap: 8px; scroll-margin: 0; opacity: 0; pointer-events: none; transition: opacity 0.16s steps(3, end); }
.eco .node-item.cur { opacity: 1; pointer-events: auto; }
.eco .node-item:not(.cur) .feed { display: none; }
.eco .node-item.cur h3 { animation: nodein 0.42s steps(9, end); }
.eco .node-item.cur p { animation: nodeup 0.5s ease-out; }
@keyframes nodein { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes nodeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.quiet .eco .node-item.cur h3, .quiet .eco .node-item.cur p { animation: none; }
.eco .core-nav { display: flex; align-items: center; gap: 4px; }
.cn-step { flex: none; width: 46px; height: 42px; border: 1px solid #3a3835; background: none; color: var(--ink); font: inherit; cursor: pointer; padding: 0; }
.cn-step:hover, .cn-step:focus-visible { background: var(--ink); color: var(--bg); }
.cn-pips { flex: 1; display: flex; justify-content: center; }
.cn-pip { width: 44px; height: 42px; padding: 0; border: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.cn-pip i { width: 13px; height: 15px; background: #4b4944; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); transition: transform 0.2s steps(3, end), background-color 0.2s steps(2, end); }
.cn-pip.red.on i { background: var(--red); } .cn-pip.blue.on i { background: var(--blue); }
.cn-pip[aria-current] i { background: var(--ink) !important; transform: scale(1.7); }
.cn-pip:focus-visible { outline: 2px solid var(--ink); outline-offset: -6px; }
@media (max-width: 899px) {
  .eco .node-item .feed { display: none; }
  .eco .node-item h3 { font-size: clamp(23px, 6.4vw, 30px); line-height: 1.05; }
  .eco .node-item p { font-size: 17px; line-height: 1.42; }
  /* signals and nodes drawn without glow: a filter redrawn on every frame is what makes a phone stutter */
  .eco .core .c-node polygon, .eco .core .c-hub polygon, .eco .core .c-pulse, .eco .core .c-heart { filter: none !important; }
  .eco .core .c-pulse.red { fill: #ff8a80; } .eco .core .c-pulse.blue { fill: #8ccbff; }
}
@media (max-width: 899px) and (max-height: 620px) { .eco .node-item p { font-size: 16px; line-height: 1.36; } .eco .core-stage { gap: 6px; padding-block: 6px 6px; } .eco .core-key { display: none; } }
@media (min-width: 900px) {
  .eco .core-stage { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; column-gap: clamp(26px, 5vw, 70px); padding-block: 14px 18px; }
  .eco .core-stick { grid-row: 1 / 3; }
  .eco .core-list { padding-block: clamp(10px, 7vh, 80px) 0; align-content: start; }
  .eco .node-item .feed { width: min(100%, calc((var(--stage) - 400px) * 1.78)); min-width: 180px; }
  .eco .node-item h3 { font-size: clamp(28px, 3.2vw, 42px); }
}
@media (min-width: 900px) and (max-height: 700px) { .eco .node-item .feed { display: none; } }
.eco .core .c-node.cur .c-name { display: none; } /* the belief being read has its name beside the map already */
@media (max-width: 899px) { .eco .core .c-node text { font-size: 26px; } }

/* 9.20 The GitHub field as a drawn plate: line towers on springs. The plate gets corner marks, like a figure on a sheet. */
.gh-field { position: relative; }
.gh-field::before, .gh-field::after { content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; border: 0 solid var(--red); }
.gh-field::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.gh-field::after { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; }
#gh-canvas { filter: none; }
@media (min-width: 900px) { #gh-canvas { filter: drop-shadow(0 0 12px rgba(230, 52, 46, 0.22)); } }

/* 9.21 The cloud of small points and ties round the six beliefs, on a canvas under the drawing */
.core-cloud { display: none; }
.eco .core-cloud { display: block; position: absolute; pointer-events: none; z-index: 0; }
.eco .core-stick .core { position: relative; z-index: 1; }

/* 9.22 Contrast pass. The brand red (4.75:1 on the ground) stays for shapes, lines and large type; small red type
   uses var(--red-text), a lighter red (7.7:1), so it reads through the scanlines: changed where each rule is written,
   above. Hairlines are a little lighter. The bars are solid. */
:root { --red-text: #ff7466; --line: #3d3b36; }
.rail { background: var(--bg); }
.gh-spark path { stroke: var(--red-text); }

/* 9.23 Hierarchy. Three greys, each with one job. --label (14:1): the console-type labels that organise content
   (group headings, field names). --dim (9.5:1): secondary sentences and notes that are meant to be read.
   --amb (5.5:1): the console's own furniture, which is there to be glanced at (bars, clock, counts, hints, legends).
   Set where each rule is written, above. */
:root { --label: #dbd8cf; --amb: #8b8881; }
h3.group::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 12px; background: var(--red); vertical-align: 0.02em; }

/* 9.24 The groups of the Systems record sit in panels, as the contact boxes and the activity plate do: a solid
   ground, a hairline, and the same two red corner marks. From version 6. */
#systems .rows, #systems .bars { position: relative; background: rgba(9, 9, 9, 0.92); border: 1px solid var(--line); padding-inline: clamp(14px, 2.4vw, 28px); }
#systems .bars { padding-block: clamp(16px, 2.2vw, 24px); }
#systems .rows li:last-child { border-bottom: 0; }
#systems .rows::before, #systems .rows::after, #systems .bars::before, #systems .bars::after { content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; border: 0 solid var(--red); }
#systems .rows::before, #systems .bars::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
#systems .rows::after, #systems .bars::after { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; }


/* ================= Version 9.25: one name, two places ================= */
/* Opening page only (class set in the head, so nothing flashes). The small mark in the bar is absent
   while the large one is on screen, travels in as the large one leaves, and sits in the bar after. */
.mark-fly .rail-top .ident { visibility: hidden; transform-origin: 0 0; }
.mark-fly.mark-air .rail-top .ident, .mark-fly.mark-dock .rail-top .ident { visibility: visible; }
.mark-air .rail-top .ident { pointer-events: none; will-change: transform; z-index: 3; }
.mark-air .rail-top .ident canvas.mark { filter: drop-shadow(0 0 calc(7px / var(--ms, 1)) rgba(236, 234, 226, 0.38)); }
.mark-air .hero-mark, .mark-dock .hero-mark { visibility: hidden; }
.go-sep { color: var(--red-text); margin: 0 0.15em; }


/* ================= Version 9.26: small repairs ================= */
/* The note under the GitHub counts is three sentences: sentence case, so it can be read. */
.gh-note { text-transform: none; letter-spacing: 0.03em; }


/* ================= Version 9.28: a film that cannot play in place ================= */
.film-out { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; align-content: center; gap: 14px; padding: 16px; text-align: center; background: rgba(5, 5, 5, 0.78); }
.film-out .hud { margin: 0; color: var(--label); }
.film-player { position: relative; }


/* ================= Version 9.29: nothing wider than the screen ================= */
/* The map's cloud is drawn 44px past its stage on every side. On a phone that reached past the screen and
   widened the whole page. Clipping at main keeps the stage sticky (clip makes no scroll container). */
main { overflow-x: clip; }

/* The map's step row (two arrows, six pips) asked for 364px; a 375px phone gives it 339 and a 320px one 284,
   so the Next arrow sat past the edge. The pips now give way; the arrows keep their size. */
.cn-pips { min-width: 0; }
.cn-pip { flex: 1 1 44px; min-width: 0; max-width: 44px; }

/* ================= Version 10.12: the client marks roll ================= */
/* His old experience page had a strip of client logos rolling sideways. Here it is a band on the console: every
   mark in the one phosphor white, lit and lined like the rest of the glass; each name is its picture's alternative text. It holds
   under the pointer and under focus; with Signal quiet or reduced motion it does not roll and
   is one row to scroll by hand. */
.sig { margin-top: 4px; }
.sig-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; font-size: 20px; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.sig-head > span:first-child { white-space: nowrap; }
.sig-win { position: relative; overflow-x: auto; border-block: 1px solid var(--line); background: linear-gradient(rgba(236, 234, 226, 0.035), rgba(236, 234, 226, 0) 40%); padding: 16px 0 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
.sig-win:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.sig-track { position: relative; display: flex; width: max-content; }
.sig-track::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.34) 0 1px, transparent 1px 3px); }
.sig-group { display: flex; align-items: center; gap: 60px; flex-shrink: 0; list-style: none; margin: 0; padding: 0 60px 0 0; }
.sig-group:first-child { padding-left: 60px; }
.sig-group li { display: flex; align-items: center; height: 66px; }
.sig-group img { max-width: none; opacity: 0.8; filter: drop-shadow(0 0 5px rgba(236, 234, 226, 0.4)); transition: opacity 0.2s, filter 0.2s; }
.kit-hud .sig-head { font-size: 13px; }
.sig-group li:hover img { opacity: 1; filter: drop-shadow(0 0 4px rgba(236, 234, 226, 0.75)) drop-shadow(0 0 14px rgba(236, 234, 226, 0.45)); }
.sig-group[aria-hidden="true"] { display: none; }
@keyframes sig-roll { to { transform: translateX(-50%); } }
.sig[data-anim="true"] .sig-win { overflow: hidden; }
.sig[data-anim="true"] .sig-group[aria-hidden="true"] { display: flex; }
.sig[data-anim="true"] .sig-group:first-child { padding-left: 0; }
.sig[data-anim="true"] .sig-track { animation: sig-roll var(--sig-d, 80s) linear infinite; animation-play-state: paused; }
.sig[data-anim="true"][data-run="true"] .sig-track { animation-play-state: running; }
.sig[data-anim="true"] .sig-win:hover .sig-track, .sig[data-anim="true"] .sig-win:focus-within .sig-track, .sig[data-anim="true"] .sig-win:focus .sig-track { animation-play-state: paused; }
@media print { .sig-group[aria-hidden="true"] { display: none !important; } .sig-track { animation: none !important; flex-wrap: wrap; width: auto; } }
/* the band closes its section: what follows starts close under it, not a full section's breath away */
.wrap:has(> .sig:last-child) { padding-bottom: 0; }
.wrap:has(> .sig:last-child) + .wrap { padding-top: clamp(20px, 2.4vw, 28px); }
/* and the same breath above its heading as below the band */
.wrap:has(> .sig:last-child) > h3.group:has(+ .sig) { margin-top: clamp(34px, 4.2vw, 50px); }

/* ================= Version 9.31: the kit's typefaces, seen ================= */
/* Gia, Facto and Gridlite PE now draw on the live site, and the sizes written blind in version 7.7 were wrong
   for them. Gridlite's weight is the size of its dots: below about 850 the letters are a faint grid, at 900 they
   are solid. So every piece of console text takes weight 900, and sizes that were 11 to 13 px are raised.
   Everything here is under .kit-hud or .kit-display, so the stand-in faces are untouched. */
:root.kit-hud .rail,
:root.kit-hud .hud,
:root.kit-hud .go,
:root.kit-hud .ph,
:root.kit-hud .feed .tag,
:root.kit-hud .chip,
:root.kit-hud .creed p::before,
:root.kit-hud .titles span::before,
:root.kit-hud .addr,
:root.kit-hud .film-play,
:root.kit-hud .credits dt,
:root.kit-hud .tuner-name,
:root.kit-hud .key,
:root.kit-hud .card .tags,
:root.kit-hud .client,
:root.kit-hud .chan-group h3,
:root.kit-hud .chan-n,
:root.kit-hud .console pre,
:root.kit-hud h3.group,
:root.kit-hud .bar b,
:root.kit-hud .beat-n,
:root.kit-hud .core .c-node text,
:root.kit-hud .xp-pts li::before,
:root.kit-hud .stage-screen .tag,
:root.kit-hud .stage-dl dt,
:root.kit-hud .gh-meter b,
:root.kit-hud .core .c-hub text,
:root.kit-hud .core .c-node text.c-name,
:root.kit-hud .sf-code { font-weight: 900; }
:root.kit-hud .rail :is(b, i, em, span, a, strong, small), :root.kit-hud .hud :is(b, i, em, span, a, strong, small), :root.kit-hud .go :is(b, i, em, span, a, strong, small), :root.kit-hud .ph :is(b, i, em, span, a, strong, small), :root.kit-hud .feed .tag :is(b, i, em, span, a, strong, small), :root.kit-hud .chip :is(b, i, em, span, a, strong, small), :root.kit-hud .addr :is(b, i, em, span, a, strong, small), :root.kit-hud .film-play :is(b, i, em, span, a, strong, small), :root.kit-hud .credits dt :is(b, i, em, span, a, strong, small), :root.kit-hud .tuner-name :is(b, i, em, span, a, strong, small), :root.kit-hud .key :is(b, i, em, span, a, strong, small), :root.kit-hud .card .tags :is(b, i, em, span, a, strong, small), :root.kit-hud .client :is(b, i, em, span, a, strong, small), :root.kit-hud .chan-group h3 :is(b, i, em, span, a, strong, small), :root.kit-hud .chan-n :is(b, i, em, span, a, strong, small), :root.kit-hud .console pre :is(b, i, em, span, a, strong, small), :root.kit-hud h3.group :is(b, i, em, span, a, strong, small), :root.kit-hud .bar b :is(b, i, em, span, a, strong, small), :root.kit-hud .beat-n :is(b, i, em, span, a, strong, small), :root.kit-hud .core .c-node text :is(b, i, em, span, a, strong, small), :root.kit-hud .stage-screen .tag :is(b, i, em, span, a, strong, small), :root.kit-hud .stage-dl dt :is(b, i, em, span, a, strong, small), :root.kit-hud .gh-meter b :is(b, i, em, span, a, strong, small), :root.kit-hud .core .c-hub text :is(b, i, em, span, a, strong, small), :root.kit-hud .core .c-node text.c-name :is(b, i, em, span, a, strong, small), :root.kit-hud .sf-code :is(b, i, em, span, a, strong, small) { font-weight: inherit; }
/* sizes for Gridlite at weight 900: the rails, the ordinary console text, the small tags */
:root.kit-hud .rail { font-size: 13px; letter-spacing: 0.05em; }
:root.kit-hud .hud, :root.kit-hud .go, :root.kit-hud .ph, :root.kit-hud .tuner-name, :root.kit-hud .key, :root.kit-hud .client, :root.kit-hud .chan-group h3, :root.kit-hud .film-play, :root.kit-hud h3.group, :root.kit-hud .sig-head { font-size: 14px; letter-spacing: 0.05em; }
:root.kit-hud .chip, :root.kit-hud .tag, :root.kit-hud .chan-n, :root.kit-hud .card .tags, :root.kit-hud .credits dt, :root.kit-hud .stage-dl dt, :root.kit-hud .beat-n { font-size: 12px; letter-spacing: 0.05em; }
:root.kit-hud .addr { font-size: 16px; }
:root.kit-hud .console pre, :root.kit-hud .sf-code { font-size: 14px; line-height: 1.6; }
@media (max-width: 720px) { :root.kit-hud .rail, :root.kit-hud .rail-bot .keys a { font-size: 12px; } }
/* the clock in the top rail, which had its own lighter weight */
:root.kit-hud .rail .wide b { font-weight: 900; }
/* the captions under the nodes of the method map: brighter, and held off the lines behind them */
:root.kit-hud .core .c-node text.c-name { fill: #b4b1a9; paint-order: stroke; stroke: #050505; stroke-width: 3px; }
:root.kit-hud .core .c-node:hover text.c-name, :root.kit-hud .core .c-node:focus-visible text.c-name, :root.kit-hud .core .c-node.cur text.c-name { fill: var(--ink); }
/* the experience page's file bar stays readable over the text that scrolls under it */
.filebar { background: rgba(5, 5, 5, 0.94); }
