/* Scorcher Tree: the Science style (Atkinson Hyperlegible Next and Mono, light ground, square, sentence case). The wordmark keeps EB Garamond. */
@font-face { font-family: 'Atkinson Next'; src: url(/fonts/atkinson-next-latin.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Atkinson Next'; src: url(/fonts/atkinson-next-latin-italic.woff2) format('woff2'); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Atkinson Mono'; src: url(/fonts/atkinson-mono-latin.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }

@font-face { font-family: 'EB Garamond'; src: url(/fonts/eb-garamond-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url(/fonts/eb-garamond-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url(/fonts/eb-garamond-latin-400-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Jost'; src: url(/fonts/jost-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Jost'; src: url(/fonts/jost-latin-500-normal.woff2) format('woff2'); font-weight: 500 700; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
:root { --paper: #f1f2ef; --sheet: #fbfbf9; --ink: #121417; --ink2: #4a4f57; --mute: #737a83; --rule: #dcdfe2; --rule2: #eceef0; --accent: #c8401f; --accent-soft: rgba(200, 64, 31, .08);
  --fossil: #8a5a2b; --clock: #2f5f8f; --geo: #5d7a3a; --contest: #a86d12;
  --disp: 'Atkinson Next', system-ui, sans-serif; --ui: 'Atkinson Next', system-ui, sans-serif; --mono: 'Atkinson Mono', ui-monospace, monospace; --brand: 'EB Garamond', Georgia, serif; }
* { box-sizing: border-box; } [hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--ink); font: 400 14px/1.45 var(--ui); -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
kbd { font: 400 11px var(--mono); padding: 1px 5px; border: 1px solid var(--rule); border-radius: 4px; color: var(--ink2); background: #fff; }

/* top bar */
.tx-top { position: fixed; z-index: 20; left: 0; right: 0; top: 0; height: 62px; display: flex; align-items: center; gap: 20px; padding: 0 22px; border-bottom: 1px solid var(--rule); background: var(--sheet); }
.tx-brand { display: flex; align-items: baseline; gap: 9px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.tx-brand .w { font: 400 24px var(--brand); } .tx-brand .w b { font-weight: 400; font-style: italic; color: var(--accent); }
.tx-brand .s { font: 500 11px var(--ui); letter-spacing: .3em; text-transform: uppercase; color: var(--ink2); padding-left: 9px; border-left: 1px solid var(--rule); }
.tx-search { position: relative; flex: 0 1 380px; }
.tx-search label { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; color: var(--mute); }
.tx-search label:focus-within { border-color: rgba(200, 64, 31, .5); }
.tx-search svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.tx-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 400 14px var(--ui); color: var(--ink); }
.tx-res { position: absolute; left: 0; right: 0; top: 44px; max-height: 60vh; overflow: auto; padding: 6px; background: #fff; border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 18px 50px rgba(60, 40, 20, .14); }
.tx-res button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-align: left; }
.tx-res button:hover, .tx-res button.on { background: var(--paper); }
.tx-res i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); flex: none; background-size: cover; background-position: center; }
.tx-res b { font: 400 16px var(--disp); } .tx-res small { display: block; color: var(--mute); font-size: 12px; } .tx-res em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.tx-res p { margin: 8px 10px; color: var(--mute); }
.tx-nav { display: flex; gap: 4px; }
.tx-nav button, .tx-nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink2); font-weight: 500; font-size: 13px; text-decoration: none; white-space: nowrap; }
.tx-nav button:hover, .tx-nav a:hover { background: var(--paper); color: var(--ink); }
.tx-nav button.on { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.tx-sel { margin-left: auto; font-size: 12px; color: var(--mute); text-align: right; line-height: 1.3; white-space: nowrap; } .tx-sel b { color: var(--ink); font-weight: 500; }

/* stage */
.tx-main { position: fixed; top: 62px; left: 0; right: 430px; bottom: 0; }
.tx-main canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.tx-main canvas.drag { cursor: grabbing; } .tx-main canvas.hot { cursor: pointer; }
.tx-crumbs { position: absolute; z-index: 2; left: 24px; top: 10px; font-size: 12px; color: var(--mute); pointer-events: none; } .tx-crumbs b { color: var(--ink); font-weight: 500; }
.tx-banner { position: absolute; z-index: 2; right: 16px; top: 8px; max-width: 60%; padding: 6px 12px; border-radius: 99px; background: #1a1712; color: #f4efe4; font: 500 10.5px var(--ui); letter-spacing: .08em; text-transform: uppercase; }
.tx-banner button { margin-left: 8px; color: #ffb48a; text-decoration: underline; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.tx-cmp { position: absolute; z-index: 3; left: 16px; bottom: 62px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tx-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 99px; background: var(--sheet); border: 1px solid var(--rule); font-weight: 500; font-size: 13px; }
.tx-chip i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); background-size: cover; background-position: center; }
.tx-chip.empty { color: var(--mute); border-style: dashed; } .tx-chip.empty i { background: var(--rule2); }
.tx-chip .x { margin-left: 2px; color: var(--mute); font-size: 15px; line-height: 1; }
.tx-legend { position: absolute; left: 16px; bottom: 14px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 8px 14px; background: rgba(251, 248, 241, .94); border: 1px solid var(--rule); border-radius: 10px; font-size: 11.5px; color: var(--ink2); }
.tx-legend span { display: inline-flex; align-items: center; gap: 7px; } .tx-legend svg { width: 18px; height: 12px; }
.tx-zoom { position: absolute; right: 16px; bottom: 14px; display: grid; gap: 6px; }
.tx-zoom button { width: 36px; height: 36px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); font: 400 18px var(--ui); color: var(--ink2); }
.tx-zoom button:hover { color: var(--ink); border-color: #c9bda6; }
.tx-tip { position: absolute; pointer-events: none; padding: 6px 10px; border-radius: 8px; background: #1a1712; color: #fbf8f1; font-size: 12px; line-height: 1.35; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.tx-tip b { font: 400 15px var(--disp); display: block; }

/* inspector */
.tx-side { position: fixed; top: 62px; right: 0; bottom: 0; width: 430px; border-left: 1px solid var(--rule); background: var(--sheet); overflow: auto; padding: 22px 26px 28px; scrollbar-width: thin; }
.tx-grab { display: none; }
.tx-eye { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 500 10.5px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.tx-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 99px; font: 500 10px var(--ui); letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; white-space: nowrap; }
.tx-badge.rev { color: var(--accent); } .tx-badge.pend { color: var(--mute); } .tx-badge.res { color: var(--geo); } .tx-badge.deb { color: var(--contest); } .tx-badge.unr { color: var(--clock); }
.tx-side h1 { margin: 8px 0 2px; font: 400 36px/1.05 var(--disp); } .tx-side h1 i { color: var(--ink2); }
.tx-sci { margin: 0 0 12px; font: italic 400 17px var(--disp); color: var(--mute); }
.tx-lede { margin: 6px 0 14px; font: 400 16.5px/1.5 var(--disp); color: var(--ink2); }
.tx-side h3 { margin: 20px 0 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font: 500 10.5px var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.tx-side h3 em { font-style: normal; letter-spacing: .02em; text-transform: none; font-size: 11.5px; }
.tx-kv { display: grid; grid-template-columns: 118px 1fr; gap: 7px 12px; margin: 0; font-size: 13px; } .tx-kv dt { color: var(--mute); } .tx-kv dd { margin: 0; color: var(--ink); }
.tx-photo { position: relative; margin: 4px 0 12px; border-radius: 12px; overflow: hidden; background: var(--c); aspect-ratio: 4 / 3; display: grid; place-items: center; }
.tx-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tx-photo .ph { font: italic 400 15px var(--disp); color: rgba(255, 255, 255, .85); text-align: center; padding: 0 30px; }
.tx-credit { margin: -6px 0 12px; font-size: 11px; color: var(--mute); } .tx-credit a { color: inherit; }
.tx-hyp { border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.tx-hyp b { display: block; font-weight: 500; font-size: 13.5px; } .tx-hyp p { margin: 3px 0 0; font-size: 13px; color: var(--ink2); line-height: 1.45; } .tx-hyp small { display: block; margin-top: 4px; font-size: 11px; color: var(--contest); }
.tx-ages { border: 1px solid var(--rule); border-radius: 10px; background: #fff; padding: 4px 14px; }
.tx-ev { display: grid; grid-template-columns: 14px 1fr auto; gap: 4px 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--rule2); font-size: 12.5px; }
.tx-ev:first-child { border-top: 0; } .tx-ev i { width: 10px; height: 10px; margin-top: 4px; } .tx-ev b { font-weight: 500; } .tx-ev small { display: block; color: var(--mute); font-size: 11.5px; line-height: 1.4; }
.tx-ev .v { font: 400 12.5px var(--mono); color: var(--ink2); white-space: nowrap; } .tx-ev .v.none { font-family: var(--ui); font-size: 11.5px; color: var(--mute); font-style: italic; }
.tx-chart { width: 100%; display: block; margin: 0 0 8px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; padding: 8px 8px 2px; }
.tx-ev small a { color: inherit; } .tx-ev em.uv { font-style: normal; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--contest); }
.tx-caveat { display: block; margin-top: 4px; padding: 5px 8px; border-left: 2px solid var(--contest); background: rgba(168, 109, 18, .07); color: var(--ink2); border-radius: 0 6px 6px 0; }
.tx-inline { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font-size: 13px; }
.tx-drawn { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink2); }
.tx-fold { margin-top: 12px; border: 1px solid var(--rule); border-radius: 10px; padding: 10px 14px; background: var(--paper); font-size: 13px; color: var(--ink2); }
.tx-fold summary { cursor: pointer; font-weight: 500; color: var(--ink); list-style: none; display: flex; justify-content: space-between; } .tx-fold summary::-webkit-details-marker { display: none; }
.tx-fold summary::after { content: '+'; color: var(--mute); } .tx-fold[open] summary::after { content: '−'; } .tx-fold p { margin: 8px 0 0; line-height: 1.55; }
.tx-path { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12px; }
.tx-path button { padding: 3px 9px; border-radius: 99px; border: 1px solid var(--rule); background: #fff; font-size: 12px; color: var(--ink2); }
.tx-path button:hover { border-color: var(--accent); color: var(--accent); } .tx-path span { color: var(--mute); }
.tx-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tx-acts button, .tx-acts a { padding: 9px 14px; border: 1px solid var(--rule); border-radius: 8px; font-weight: 500; font-size: 13px; background: #fff; color: var(--ink); text-decoration: none; }
.tx-acts button:hover, .tx-acts a:hover { border-color: #c9bda6; } .tx-acts .p { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.tx-how { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 9px; counter-reset: h; }
.tx-how li { counter-increment: h; display: flex; gap: 10px; font-size: 13.5px; color: var(--ink2); }
.tx-how li::before { content: counter(h); flex: none; width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%; font: 400 11px var(--mono); color: var(--mute); background: #fff; }
.tx-how b { color: var(--ink); font-weight: 500; }
.tx-note { margin-top: 14px; padding: 11px 13px; border-left: 2px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; font-size: 12.5px; color: var(--ink2); line-height: 1.5; }
.tx-members { display: flex; flex-wrap: wrap; gap: 4px; } .tx-members button { padding: 2px 8px; border-radius: 6px; background: var(--paper); font-size: 12px; color: var(--ink2); } .tx-members button:hover { color: var(--accent); }

/* dialog */
.tx-dlg { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 28px 30px 26px; border: 1px solid var(--rule); border-radius: 16px; background: var(--sheet); color: var(--ink); font: 400 14px/1.6 var(--ui); box-shadow: 0 30px 90px rgba(60, 40, 20, .25); }
.tx-dlg::backdrop { background: rgba(26, 23, 18, .35); }
.tx-dlg h2 { margin: 0 0 10px; font: 400 32px/1.1 var(--disp); } .tx-dlg h3 { margin: 22px 0 6px; font: 500 11px var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.tx-dlg p, .tx-dlg li { color: var(--ink2); } .tx-dlg ul { padding-left: 18px; margin: 0; } .tx-dlg a { color: var(--accent); } .tx-dlg b { color: var(--ink); font-weight: 500; }
.tx-dlg .x { position: absolute; right: 14px; top: 12px; font-size: 22px; color: var(--mute); }

/* narrower screens */
@media (max-width: 1100px) { .tx-sel { display: none; } .tx-main { right: 380px; } .tx-side { width: 380px; } }
@media (max-width: 820px) {
  .tx-top { gap: 10px; padding: 0 14px; } .tx-brand .w { font-size: 21px; } .tx-search { flex: 1; } .tx-nav button[data-v="about"] { display: none; } .tx-nav button, .tx-nav a { padding: 8px 8px; }
  .tx-main { right: 0; bottom: 34vh; } .tx-legend { display: none; } .tx-banner { left: 12px; right: 12px; max-width: none; text-align: center; font-size: 9.5px; }
  .tx-cmp { bottom: 12px; left: 10px; } .tx-zoom { display: none; } .tx-crumbs { display: none; }
  .tx-side { top: auto; left: 0; width: auto; height: 34vh; border-left: 0; border-top: 1px solid var(--rule); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(60, 40, 20, .1); padding: 8px 18px 22px; transition: height .25s ease; z-index: 15; }
  .tx-side.open { height: 82vh; } .tx-grab { display: block; width: 100%; height: 20px; } .tx-grab::after { content: ''; display: block; width: 40px; height: 4px; margin: 6px auto 0; border-radius: 2px; background: var(--rule); }
  .tx-side h1 { font-size: 30px; }
}
@media (max-width: 520px) { .tx-nav a { display: none; } .tx-brand .s { letter-spacing: .2em; } }
@media (prefers-reduced-motion: reduce) { .tx-side { transition: none; } }

/* ===== Science style overrides */
:root:not(#_) body * { text-transform: none !important; letter-spacing: normal !important; border-radius: 0 !important; }
:root:not(#_) body :is(.tx-res i, .tx-chip i, .tx-dot, .tx-photo-dot) { border-radius: 50% !important; }
:root:not(#_) body .tx-brand .s { font: 600 15px var(--ui); color: var(--ink); }
:root:not(#_) body :is(.tx-eye, .tx-side h3, .tx-badge, .tx-ev em.uv) { font-size: 13px; font-weight: 600; }
:root:not(#_) body .tx-side h1 { font: 700 34px/1.08 var(--ui); letter-spacing: -.015em !important; }
:root:not(#_) body :is(.tx-lede) { font: 400 16px/1.55 var(--ui); }
:root:not(#_) body :is(.tx-res b, .tx-tip b) { font-weight: 600; }
:root:not(#_) body .tx-sci { font: italic 400 16px var(--ui); }
:root:not(#_) body .tx-photo .ph { font-style: normal; }
