:root {
  --paper: #f7f4ec;
  --paper-2: #f0ebdf;
  --card: rgba(255, 255, 255, 0.55);
  --ink: #1d3f94;
  --ink-deep: #163080;
  --ink-soft: rgba(29, 63, 148, 0.07);
  --line: rgba(29, 63, 148, 0.14);
  --line-strong: rgba(29, 63, 148, 0.3);
  --text: #131c33;
  --text-2: #3d4865;
  --muted: #6e7589;
  --rust: #a84a33;
  --moss: #3b7a57;
  --ochre: #9a6a1c;
  --radius: 16px;
  --wrap: 1180px;
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --caps: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  filter: url(#grain);
  background: #000;
  mix-blend-mode: multiply;
}
.defs { position: absolute; width: 0; height: 0; }
main, header, footer { position: relative; z-index: 1; }

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { display: block; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 820px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.012em; margin: 0; color: var(--text); }
h2 { font-size: clamp(34px, 4.2vw, 54px); line-height: 1.02; }
h3 { font-size: 27px; line-height: 1.12; }
h4 { font-size: 22px; line-height: 1.15; }

.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); margin: 0 0 18px; }
.sub { font-size: 17px; color: var(--text-2); max-width: 60ch; margin-top: 16px; }
.label { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); margin-top: 12px; }
.up { color: var(--moss); }
.down { color: var(--rust); }
.wordmark { font-family: var(--caps); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: 15px; color: var(--ink-deep); }
.chip { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 9px; background: var(--ink-soft); white-space: nowrap; }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: #fff; border: 1px solid var(--ink); font-weight: 500; font-size: 14.5px; white-space: nowrap; transition: background 0.18s ease, transform 0.18s ease; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 10px 22px -14px rgba(22, 48, 128, 0.8); }
.btn:hover { background: var(--ink-deep); text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.btn-ghost:hover { background: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.actions.center { justify-content: center; }

/* ------------------------------------------------------------ nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(247, 244, 236, 0.76); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.2s ease; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand:hover { text-decoration: none; }
.links { display: flex; gap: 30px; }
.links a { font-size: 14px; color: var(--text-2); }
.links a:hover { color: var(--ink); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-cta .btn { padding: 9px 18px; font-size: 14px; }
.icon-link { display: inline-flex; color: var(--text-2); padding: 7px; border-radius: 8px; }
.icon-link:hover { color: var(--ink); background: var(--ink-soft); }
.menu-btn { display: none; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; background: transparent; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-btn span { width: 16px; height: 1.5px; background: var(--ink); display: block; }

/* ------------------------------------------------------------ specimen hero */
.specimen { position: relative; min-height: calc(100vh - 68px); display: flex; align-items: center; justify-content: center; padding: 34px 24px 56px; overflow: hidden; }
.specimen::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 1.5px); background-size: 28px 28px; opacity: 0.5; mask-image: radial-gradient(ellipse at 50% 42%, #000 0%, transparent 62%); -webkit-mask-image: radial-gradient(ellipse at 50% 42%, #000 0%, transparent 62%); }
.spec-corner { position: absolute; display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); z-index: 2; }
.spec-corner b { font-weight: 500; color: var(--text); }
.spec-corner i { font-style: normal; font-variant-numeric: tabular-nums; }
.spec-corner.c-tl { top: 26px; left: 28px; }
.spec-corner.c-tr { top: 26px; right: 28px; text-align: right; }
.spec-corner.c-bl { bottom: 26px; left: 28px; }
.spec-corner.c-br { bottom: 26px; right: 28px; text-align: right; }
.chain-read { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.chain-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--moss); box-shadow: 0 0 0 3px rgba(59, 122, 87, 0.18); }
.chain-dot.off { background: var(--rust); box-shadow: 0 0 0 3px rgba(168, 74, 51, 0.18); }
.spec-center { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 880px; }
.potion { width: min(500px, 84vw); height: min(400px, 39vh); min-height: 250px; background: transparent; --poster-color: transparent; margin-bottom: -46px; outline: none; }
.spec-word { font-family: var(--caps); font-weight: 600; font-size: clamp(46px, 9vw, 116px); letter-spacing: 0.08em; padding-left: 0.08em; line-height: 0.9; color: var(--ink-deep); text-transform: uppercase; position: relative; pointer-events: none; }
.spec-species { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.2vw, 28px); color: var(--text-2); margin-top: 14px; }
.spec-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; margin-top: 18px; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ochre); }
.spec-tags span + span::before { content: '\00b7'; margin: 0 14px; color: var(--muted); }
.spec-lede { margin-top: 16px; font-size: 17.5px; color: var(--text-2); max-width: 46ch; }

/* ------------------------------------------------------------ sections */
.section { padding: 116px 0; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 780px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps li { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 28px 28px 32px; }
.step-n { position: absolute; top: 18px; right: 24px; font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--line-strong); font-weight: 600; }
.step-art { width: 100%; max-width: 220px; height: auto; color: var(--ink); display: block; margin-bottom: 18px; }
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--text-2); font-size: 15.5px; }
.punch { margin: 56px auto 0; text-align: center; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); font-style: italic; font-weight: 500; color: var(--ink-deep); max-width: 32ch; line-height: 1.2; }
.punch span { display: block; margin-top: 12px; font-family: var(--sans); font-style: normal; font-size: 15px; color: var(--text-2); font-weight: 400; line-height: 1.5; }

/* ------------------------------------------------------------ book */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.stats div { padding: 18px 22px 16px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats dt { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 4px 0 0; font-family: var(--serif); font-size: 40px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.stats small { font-size: 12px; color: var(--muted); }

.book-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 24px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 22px 24px 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ix-hero { display: flex; align-items: baseline; gap: 12px; }
.ix-value { font-family: var(--serif); font-size: 64px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ix-delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--text-2); margin: 12px 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend b { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.sw { width: 14px; height: 2px; display: inline-block; }
.sw-org { background: var(--ink); }
.sw-bench { background: var(--muted); }
.chart-wrap { position: relative; }
#chart { width: 100%; height: 132px; display: block; cursor: crosshair; }
.chart-tip { position: absolute; top: -6px; transform: translateX(-50%); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 6px; padding: 4px 8px; font-size: 11.5px; white-space: nowrap; pointer-events: none; color: var(--text-2); font-variant-numeric: tabular-nums; }

.narrator { font-family: var(--serif); font-style: italic; font-size: 23px; line-height: 1.28; color: var(--ink-deep); min-height: 3.9em; }
.narrator.live::after { content: ''; display: inline-block; width: 2px; height: 0.9em; margin-left: 3px; vertical-align: -2px; background: var(--ink); animation: blink 0.9s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.log-head { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); opacity: calc(1 - var(--age, 0) * 0.14); align-items: baseline; }
.log li:last-child { border-bottom: 0; }
.log time { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.log p { font-size: 14.5px; color: var(--text); }
.log li.fresh { animation: rowIn 0.45s ease both; }
.log li.fresh p { color: var(--ink-deep); font-weight: 500; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-6px); } }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 0 0 12px; border-bottom: 1px solid var(--line-strong); }
td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 15px; }
.num, td.num, th.num { text-align: right; }
.book td { padding: 10px 0; font-size: 14px; }
.book .sym { width: 36%; }
.book .sym span { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-deep); }
.book .sym small { display: block; font-size: 11.5px; color: var(--muted); }
.tag { font-family: var(--mono); font-style: normal; font-size: 9px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; border: 1px solid currentColor; }
.tag.held { color: var(--ink); }
.tag.tox { color: var(--rust); }
.book .toxic .sym span { color: var(--rust); }
.book .flat td { opacity: 0.55; }
.book .weight { width: 36%; }
.book .weight b { font-weight: 600; margin-left: 10px; }
.wbar { display: inline-block; width: 46%; height: 6px; border-radius: 3px; background: var(--ink-soft); vertical-align: middle; overflow: hidden; }
.wbar i { display: block; height: 100%; border-radius: 3px; background: var(--ink); transition: width 0.5s ease; }
.book tfoot td { border-bottom: 0; padding-top: 14px; font-weight: 600; }
.score { position: relative; width: 76px; height: 14px; }
.score::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.score-bar { position: absolute; top: 5px; height: 4px; border-radius: 2px; display: block; }
.score-bar.pos { left: 50%; background: var(--moss); }
.score-bar.neg { right: 50%; background: var(--rust); }

.exec p { font-size: 14px; color: var(--text-2); }
.exec-chain { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.exec-chain dt { color: var(--muted); }
.exec-chain dd { margin: 0; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }

/* ------------------------------------------------------------ backrooms */
.backrooms {
  --g: #46f0a0;
  --g-dim: rgba(70, 240, 160, 0.55);
  --g-faint: rgba(70, 240, 160, 0.3);
  --g-line: rgba(70, 240, 160, 0.2);
  --g-bg: rgba(70, 240, 160, 0.05);
  --fg: #d5f7e6;
  position: relative;
  z-index: 1;
  padding: 116px 0 104px;
  color: var(--fg);
  background:
    radial-gradient(ellipse 70% 50% at 50% 38%, rgba(70, 240, 160, 0.1), transparent 70%),
    linear-gradient(rgba(70, 240, 160, 0.035) 1px, transparent 1px) 0 0 / 100% 34px,
    linear-gradient(90deg, rgba(70, 240, 160, 0.035) 1px, transparent 1px) 0 0 / 34px 100%,
    #030806;
  overflow: hidden;
}
.backrooms::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.6) 100%); }
.backrooms .wrap { position: relative; z-index: 1; }
.backrooms h2 { color: #f1fff8; }
.backrooms .eyebrow { color: var(--g); text-shadow: 0 0 10px var(--g-dim); }
.backrooms .sub { color: #9fc4b3; margin-left: auto; margin-right: auto; }
.backrooms .section-head { margin-bottom: 40px; }

.term-emblem { width: 62px; height: 46px; margin: 0 auto 18px; border: 1px solid var(--g-faint); border-radius: 4px; background: rgba(3, 12, 8, 0.9); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 26px rgba(70, 240, 160, 0.45), inset 0 0 14px rgba(70, 240, 160, 0.18); }
.term-emblem img { width: 38px; height: 38px; filter: drop-shadow(0 0 6px var(--g)); }

.term { position: relative; border: 1px solid var(--g-line); border-radius: 10px; background: rgba(3, 11, 8, 0.94); font-family: var(--mono); overflow: hidden; box-shadow: 0 0 0 1px rgba(70, 240, 160, 0.05), 0 0 70px -12px rgba(70, 240, 160, 0.3), inset 0 0 110px rgba(70, 240, 160, 0.045); }
/* scanlines and a slow sweep, the way a tube does it */
.term::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
.term::after { content: ''; position: absolute; left: 0; right: 0; height: 120px; top: -120px; pointer-events: none; z-index: 3; background: linear-gradient(transparent, rgba(70, 240, 160, 0.05), transparent); animation: sweep 7s linear infinite; }
@keyframes sweep { to { transform: translateY(900px); } }

.term-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--g-line); background: rgba(70, 240, 160, 0.03); }
.term-dots { display: inline-flex; gap: 7px; }
.term-dots i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #5a3a2c; }
.term-dots i:nth-child(2) { background: #5a5230; }
.term-dots i:nth-child(3) { background: #2c5a44; }
.term-title { font-size: 11.5px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--g); text-shadow: 0 0 10px var(--g-dim); white-space: nowrap; }
.term-ver { justify-self: end; font-size: 11px; letter-spacing: 0.14em; color: var(--g-faint); }

.term-body { display: grid; grid-template-columns: 216px minmax(0, 1fr) 286px; height: 600px; }
.term-label { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--g-faint); padding: 0 8px 12px; }
.term-label b { font-weight: 500; color: var(--g); text-shadow: 0 0 8px var(--g-dim); }
.term-side { border-right: 1px solid var(--g-line); padding: 18px 10px; overflow-y: auto; }
.br-roster { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.br-colony { width: 100%; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 7px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--fg); font: inherit; cursor: pointer; text-align: left; }
.br-colony:hover { background: var(--g-bg); }
.br-colony.on { border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent); }
.br-colony-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.br-name { font-size: 13px; font-weight: 600; color: var(--c); text-shadow: 0 0 9px color-mix(in srgb, var(--c) 55%, transparent); }
.br-state { font-size: 10.5px; letter-spacing: 0.06em; color: var(--g-faint); }
.br-colony.typing .br-state { color: var(--c); }
.br-colony > b { font-weight: 500; font-size: 11.5px; color: var(--g-faint); font-variant-numeric: tabular-nums; }
.br-vial { display: block; flex: none; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--c) 70%, transparent)); }

.term-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.br-feed { list-style: none; margin: 0; padding: 18px 20px 10px; overflow-y: auto; flex: 1; min-height: 0; font-size: 13.5px; line-height: 1.55; scrollbar-width: thin; scrollbar-color: rgba(70, 240, 160, 0.3) transparent; }
.br-ts { color: var(--g-faint); font-size: 12px; }
.br-boot { color: var(--g-dim); opacity: 0; animation: bootIn 0.01s linear forwards; animation-delay: calc(var(--i) * 0.26s); white-space: pre-wrap; }
.br-boot.hi { color: var(--g); text-shadow: 0 0 10px var(--g-dim); }
@keyframes bootIn { to { opacity: 1; } }
.br-banner { margin: 8px 0 12px; font: 600 12px/1 var(--mono); letter-spacing: 0; color: var(--g); text-shadow: 0 0 12px var(--g-dim), 0 0 2px var(--g); overflow: hidden; }
.br-rule { height: 1px; margin: 12px 0 14px; background: linear-gradient(90deg, var(--g-faint), transparent); opacity: 0; animation: bootIn 0.01s linear forwards; animation-delay: calc(var(--i) * 0.26s); }

.br-msg { display: grid; grid-template-columns: 26px 1fr; gap: 11px; padding: 5px 0; align-items: start; }
.br-msg.new { animation: brIn 0.35s ease both; }
@keyframes brIn { from { opacity: 0; transform: translateX(-6px); } }
.br-msg .br-vial { cursor: pointer; margin-top: 1px; }
.br-body { min-width: 0; }
.br-who { all: unset; cursor: pointer; font-weight: 600; color: var(--c); text-shadow: 0 0 9px color-mix(in srgb, var(--c) 55%, transparent); }
.br-who:hover { text-decoration: underline; text-underline-offset: 3px; }
.br-sep { color: var(--g-faint); margin: 0 8px 0 7px; }
.br-text { color: var(--fg); overflow-wrap: anywhere; }
.br-tok { font-weight: 600; color: #04130c; background: var(--g); border-radius: 2px; padding: 0 4px; box-shadow: 0 0 10px rgba(70, 240, 160, 0.4); }
.br-at { font-weight: 600; color: var(--c); }
.br-body pre { margin: 8px 0 6px; padding: 12px 14px 12px 13px; border-left: 2px solid var(--c); background: color-mix(in srgb, var(--c) 6%, transparent); color: var(--c); font: 13px/1.12 var(--mono); text-shadow: 0 0 8px color-mix(in srgb, var(--c) 50%, transparent); overflow-x: auto; white-space: pre; width: fit-content; max-width: 100%; }

.br-typing { display: flex; align-items: center; gap: 8px; padding: 10px 20px 13px; border-top: 1px solid var(--g-line); font-size: 13px; color: var(--g-dim); min-height: 44px; }
.br-prompt { color: var(--g); text-shadow: 0 0 8px var(--g-dim); }
.br-caret { width: 8px; height: 15px; background: var(--g); box-shadow: 0 0 10px var(--g-dim); animation: blink 1s steps(2) infinite; }
.br-dots { display: inline-flex; gap: 3px; margin-left: 2px; }
.br-dots i { width: 4px; height: 4px; background: currentColor; display: inline-block; animation: brDot 1.1s infinite ease-in-out; }
.br-dots i:nth-child(2) { animation-delay: 0.16s; }
.br-dots i:nth-child(3) { animation-delay: 0.32s; }
@keyframes brDot { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }

.br-profile { border-left: 1px solid var(--g-line); padding: 18px 16px; overflow-y: auto; font-size: 12.5px; }
.br-profile .term-label { padding-left: 0; }
.br-profile.flash { animation: brFlash 0.45s ease; }
@keyframes brFlash { from { background: color-mix(in srgb, var(--c) 14%, transparent); } }
.brp-top { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); border-radius: 6px; background: color-mix(in srgb, var(--c) 6%, transparent); }
.brp-vial { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c) 75%, transparent)); }
.brp-top strong { display: block; font-size: 16px; color: var(--c); text-shadow: 0 0 10px color-mix(in srgb, var(--c) 55%, transparent); }
.brp-top span { color: var(--g-dim); font-size: 11.5px; }
.brp-origin { margin-top: 14px; color: var(--fg); line-height: 1.5; }
.brp-kv { display: grid; grid-template-columns: 86px 1fr; gap: 6px 10px; margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed var(--g-line); }
.brp-kv dt { color: var(--g-faint); }
.brp-kv dd { margin: 0; color: var(--fg); line-height: 1.45; }
.brp-meter { color: var(--c); letter-spacing: -1px; font-size: 10px; }
.br-profile blockquote { margin: 16px 0 0; padding: 10px 12px; border-left: 2px solid var(--c); background: color-mix(in srgb, var(--c) 6%, transparent); color: var(--fg); line-height: 1.5; }

.term-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 26px; padding: 10px 18px; border-top: 1px solid var(--g-line); background: rgba(70, 240, 160, 0.03); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--g-faint); }
.term-status b { font-weight: 500; color: var(--g); text-shadow: 0 0 8px var(--g-dim); letter-spacing: 0.08em; margin-left: 6px; text-transform: none; }
.term-ro { margin-left: auto; }
.br-fine { margin-top: 18px; font-size: 13px; color: #6f9484; text-align: center; }

@media (max-width: 1120px) {
  .term-body { grid-template-columns: 200px minmax(0, 1fr); height: auto; }
  .term-main { height: 580px; }
  .br-profile { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--g-line); }
}
@media (max-width: 860px) {
  .backrooms { padding: 76px 0 68px; }
  .term-body { grid-template-columns: 1fr; }
  .term-side { border-right: 0; border-bottom: 1px solid var(--g-line); padding: 14px 10px 10px; }
  .br-roster { flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .br-roster li { flex: none; }
  .br-colony { grid-template-columns: 26px auto; width: auto; padding: 5px 10px 5px 6px; white-space: nowrap; }
  .br-colony .br-state, .br-colony > b { display: none; }
  .term-main { height: 540px; }
  .term-title { letter-spacing: 0.18em; font-size: 10.5px; }
  .term-ro { display: none; }
}
@media (max-width: 560px) {
  .br-feed { padding: 14px 12px 8px; font-size: 13px; }
  .br-banner { font-size: 14px; }
  .br-msg { grid-template-columns: 22px 1fr; gap: 9px; }
  .br-msg .br-vial { width: 22px; height: 22px; }
  .br-ts { display: none; }
  .br-boot .br-ts { display: inline; }
  .br-body pre { font-size: 11px; padding: 10px; }
  .term-status { gap: 6px 16px; letter-spacing: 0.12em; }
  .term-title { letter-spacing: 0.1em; }
  .term-dots { display: none; }
  .term-bar { grid-template-columns: 1fr auto; }
}
@media (prefers-reduced-motion: reduce) {
  .term::after, .br-caret, .br-dots i, .br-msg.new, .br-profile.flash { animation: none; }
  .br-boot, .br-rule { animation: none; opacity: 1; }
}

/* ------------------------------------------------------------ rules */
.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; border-top: 1px solid var(--line); }
.rules li { display: grid; grid-template-columns: 58px 1fr; gap: 14px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.rules .n { font-family: var(--serif); font-size: 40px; line-height: 0.9; color: var(--ink); font-weight: 500; }
.rules h4 { margin-bottom: 5px; }
.rules p { color: var(--text-2); font-size: 15px; }
.food { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; margin-top: 76px; }
.score-table td:first-child { font-weight: 600; }
.score-table tr:last-child td { border-bottom: 0; }

.code { margin: 0; border: 1px solid #1c2850; border-radius: var(--radius); background: #0f1630; color: #e3e9fb; padding: 26px 28px; font: 13.5px/1.75 var(--mono); overflow-x: auto; box-shadow: 0 30px 60px -40px rgba(22, 48, 128, 0.8); }
.code .c { color: #7c88ad; }

/* ------------------------------------------------------------ faq */
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; font-family: var(--serif); font-size: 25px; font-weight: 600; padding: 18px 40px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-weight: 400; color: var(--ink); font-size: 22px; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq p { color: var(--text-2); padding: 0 0 22px; max-width: 68ch; font-size: 16px; }

/* ------------------------------------------------------------ closing + footer */
.closing { padding: 116px 0; text-align: center; background: var(--paper-2); border-top: 1px solid var(--line); }
.closing-inner { display: flex; flex-direction: column; align-items: center; }
.closing-mark { width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--line-strong); margin-bottom: 26px; }
.closing h2 { max-width: 21ch; font-style: italic; font-weight: 500; }
.footer { border-top: 1px solid var(--line); padding: 44px 0 48px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; justify-content: flex-end; align-items: start; }
.footer-legal { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); padding-top: 18px; }

/* ------------------------------------------------------------ motion */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1120px) {
}
@media (max-width: 1000px) {
  .steps { grid-template-columns: 1fr; }
  .book-grid, .two, .food { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 860px) {
  .links, .nav-cta .btn { display: none; }
  .menu-btn { display: flex; }
  .nav.open .links { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 68px; background: var(--paper); border-bottom: 1px solid var(--line); padding: 16px 24px 20px; gap: 14px; }
  .section { padding: 76px 0; }
  .rules { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .specimen { min-height: 0; padding: 92px 18px 96px; }
  .spec-corner { font-size: 9.5px; letter-spacing: 0.1em; }
  .spec-corner.c-tl, .spec-corner.c-tr { top: 16px; }
  .spec-corner.c-bl, .spec-corner.c-br { bottom: 16px; }
  .spec-corner.c-tl, .spec-corner.c-bl { left: 18px; }
  .spec-corner.c-tr, .spec-corner.c-br { right: 18px; }
  .potion { height: 300px; margin-bottom: -30px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .stats dd { font-size: 34px; }
  .panel { padding: 18px 18px 20px; }
  .ix-value { font-size: 52px; }
  .book .sym small { display: none; }
  .book .sym, .book .weight { width: auto; }
  .wbar { width: 34%; }
  .score { width: 56px; }
  .narrator { font-size: 20px; }
}


/* ------------------------------------------------------------ hero: slime intelligence */
.spec-si { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; font-family: var(--caps); font-weight: 600; font-size: clamp(15px, 1.7vw, 21px); letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-deep); }
.spec-si span { padding-left: 0.34em; }
.spec-si::before, .spec-si::after { content: ''; width: clamp(28px, 6vw, 84px); height: 1px; background: var(--line-strong); }
.spec-si + .spec-tags { margin-top: 14px; }

/* ------------------------------------------------------------ how it works: figures */
.steps li { padding: 0 0 30px; overflow: hidden; }
.steps li h3, .steps li p { padding: 0 28px; }
.steps li h3 { margin-top: 22px; }
.step-fig { position: relative; background: #fbf9f3; border-bottom: 1px solid var(--line); background-image: radial-gradient(circle at 1px 1px, rgba(29, 63, 148, 0.13) 1px, transparent 1.4px); background-size: 17px 17px; }
.steps .step-n { position: static; display: block; padding: 22px 28px 0; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; color: var(--ink); line-height: 1; }
.steps .step-n + h3 { margin-top: 10px; }
.art { display: block; width: 100%; height: auto; color: var(--ink); }
.art text { font-family: var(--mono); fill: var(--ink-deep); }
.a-cap { font-size: 8.6px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--muted) !important; }
.a-cap.tox { fill: var(--rust) !important; }
.a-mono { font-size: 11px; font-weight: 600; }
.a-card rect { fill: #fff; stroke: var(--line-strong); stroke-width: 1.2; }
.a-area { fill: rgba(29, 63, 148, 0.09); }
.a-line { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.a-dot { fill: var(--ink); }
.a-arrow { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.a-disc { fill: #fff; }
.a-ring { fill: none; stroke: rgba(29, 63, 148, 0.2); stroke-width: 1.2; }
.a-ring.tox { stroke: var(--rust); stroke-width: 1.4; }
.a-gauge { fill: none; stroke: var(--ink); stroke-width: 3.4; stroke-linecap: round; }
.a-sym { font-size: 11.5px; font-weight: 600; text-anchor: middle; }
.a-sym.sm { font-size: 9.5px; }
.a-sym.left { text-anchor: start; font-size: 11px; }
.a-sym.tox { fill: var(--rust) !important; }
.a-sym.dim, .a-pct.dim { fill: var(--muted) !important; font-weight: 500; }
.a-val { font-size: 8.4px; text-anchor: middle; fill: var(--muted) !important; }
.a-pct { font-size: 11px; font-weight: 600; text-anchor: end; }
.a-marker { fill: var(--ink-deep); }
.a-rule { stroke: var(--line-strong); stroke-width: 1; }
.a-scent { fill: none; stroke: var(--ink); stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; animation: scent 3s ease-out infinite; }
.a-scent.s2 { animation-delay: 1s; }
.a-scent.s3 { animation-delay: 2s; }
@keyframes scent { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.9); opacity: 0; } }
.a-tube { fill: none; stroke: var(--ink); stroke-linecap: round; }
.a-tube.t1 { stroke-width: 11; }
.a-tube.t2 { stroke-width: 4.5; opacity: 0.85; }
.a-tube.dead { stroke: var(--rust); stroke-width: 1.8; stroke-dasharray: 2 6; opacity: 0.75; }
.a-flow { fill: #fff; opacity: 0.9; }
.a-nucleus { fill: var(--ink); }
.a-nucleus-ring { fill: rgba(29, 63, 148, 0.07); stroke: var(--ink); stroke-width: 1.1; stroke-dasharray: 3 4; }
.a-track { fill: rgba(29, 63, 148, 0.08); }
.a-bar { fill: var(--ink); transform-box: fill-box; transform-origin: left center; transform: scaleX(0); transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.a-bar.b2 { transition-delay: 0.12s; opacity: 0.85; }
.a-bar.b3 { transition-delay: 0.24s; opacity: 0.7; }
.a-bar.b4 { transition-delay: 0.36s; }
.a-bar.hollow { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 3 3; }
.reveal.in .a-bar { transform: scaleX(1); }

/* ------------------------------------------------------------ si vs ai */
.versus { max-width: 940px; margin: 0 auto; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--card); }
.versus > div { display: grid; grid-template-columns: 0.72fr 1.14fr 1.14fr; border-bottom: 1px solid var(--line); }
.versus > div:last-child { border-bottom: 0; }
.versus span { padding: 17px 24px; font-size: 16px; line-height: 1.4; }
.versus span[role='rowheader'] { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; }
.versus .vs-si { background: var(--ink-deep); color: #fff; font-family: var(--serif); font-size: 21px; font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, 0.12); margin-bottom: -1px; }
.versus .vs-ai { color: var(--muted); display: flex; align-items: center; }
.versus .vs-head span { font-family: var(--caps); font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; padding-top: 22px; padding-bottom: 22px; display: flex; align-items: center; gap: 10px; }
.versus .vs-head .vs-si { font-family: var(--caps); font-size: 13px; color: #fff; }
.versus .vs-head .vs-si img { filter: brightness(0) invert(1); opacity: 0.95; }
.versus .vs-head .vs-ai { color: var(--text-2); }
.vs-note { max-width: 760px; margin: 34px auto 0; text-align: center; font-size: 16px; color: var(--text-2); }
.vs-note b { color: var(--text); }

@media (max-width: 720px) {
  .versus > div { grid-template-columns: 1fr 1fr; }
  .versus span[role='rowheader'], .versus .vs-head span:first-child { grid-column: 1 / -1; padding-bottom: 0; padding-top: 14px; }
  .versus .vs-head span:first-child { display: none; }
  .versus span { padding: 12px 16px; font-size: 14.5px; }
  .versus .vs-si { font-size: 18px; }
  .spec-si { letter-spacing: 0.22em; }
}
@media (prefers-reduced-motion: reduce) {
  .a-scent { animation: none; opacity: 0.25; }
  .a-bar { transition: none; transform: scaleX(1); }
}

.specimen .actions { margin-top: 22px; }
.spec-species { margin-top: 10px; }
.spec-si { margin-top: 16px; }
