/* Page CSS for Eric Zhang's site: only what sits inside a visual. Layout, type and buttons come from the kit. */
:root { color-scheme: dark; --e-out: cubic-bezier(.23, 1, .32, 1); --e-move: cubic-bezier(.77, 0, .175, 1); --warn: #f4c58a; --hair: color-mix(in oklab, #fff 13%, transparent); }
button, input, textarea, label { touch-action: manipulation; }
.mono, code, pre { font-family: var(--font-mono); }

/* section shells: the visual takes what the head leaves */
#search > .wrap, #trainer > .wrap, #builds > .wrap { display: flex; flex-direction: column; }
.head-row { margin-bottom: var(--s-6); align-items: start; }
.head-row h2 { margin: 0; }
.head-row p { margin: 0; color: var(--ink); max-width: none; }

/* a dark instrument panel, one recipe for every demo */
.rig { background: transparent; border: 1px solid var(--hair); border-radius: var(--r-lg); overflow: hidden; min-height: 0; }
.rig__label { display: flex; justify-content: space-between; gap: var(--s-3); margin: 0 0 var(--s-3); font: 500 13px/1.4 var(--font-text); color: var(--p-muted); }

/* hero */
.hero--split h1 { font-size: clamp(40px, 4.3vw, 62px); }
.hero__media.city { position: relative; background: var(--p-surface); border: 1px solid var(--hair); border-radius: var(--r-lg); overflow: hidden; }
.city canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.city__query { position: absolute; z-index: 1; inset: var(--s-4) var(--s-4) auto; padding: var(--s-3) var(--s-4); background: var(--p-bg); border: 1px solid var(--hair); border-radius: var(--r-md); }
.city__query p { margin: 0; min-height: 1.5em; font: 400 15px/1.5 var(--font-mono); color: #fff; }
.city__query p + p { margin-top: var(--s-1); font-size: 13px; color: var(--p-accent); overflow-wrap: anywhere; }

/* search console */
.console { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 4.4fr) minmax(0, 3.6fr); }
.console__pane { padding: var(--s-5); min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.console__pane + .console__pane { border-left: 1px solid var(--hair); }
.console label { display: block; margin-bottom: var(--s-3); font: 500 13px/1.4 var(--font-text); color: var(--p-muted); }
.console textarea { flex: 1; min-width: 0; height: 44px; resize: none; padding: 10px var(--s-3); color: #fff; background: var(--p-bg); border: 1px solid var(--hair); border-radius: var(--r-sm); font: 400 16px/1.45 var(--font-text); transition: border-color 140ms ease; }
.console textarea:focus-visible { outline: 2px solid var(--action); outline-offset: 1px; }
.presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); margin: var(--s-3) 0 0; padding: 0; list-style: none; }
.preset { width: 100%; height: 100%; min-height: 40px; padding: 6px 10px; text-align: left; color: var(--ink); background: transparent; border: 1px solid var(--hair); border-radius: var(--r-sm); font: 400 13px/1.25 var(--font-text); cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease, transform 120ms var(--e-out); }
.preset:active { transform: scale(.985); }
.preset[aria-pressed="true"] { border-color: var(--p-accent); background: color-mix(in oklab, var(--p-accent) 10%, transparent); }
@media (hover: hover) and (pointer: fine) { .preset:hover { border-color: color-mix(in oklab, #fff 34%, transparent); } }
.json { margin: 0; flex: 0 1 auto; min-height: 96px; overflow: auto; font-size: 13px; line-height: 1.65; color: #d5dcd5; white-space: pre-wrap; overflow-wrap: anywhere; }
.j-k { color: #fff; } .j-s, .j-n, .j-b { color: var(--p-accent); }
.rejected { margin: var(--s-3) 0 0; padding: var(--s-3); list-style: none; border: 1px solid color-mix(in oklab, var(--warn) 45%, transparent); border-radius: var(--r-sm); color: var(--warn); font: 400 13px/1.5 var(--font-mono); }
.rejected b { font-weight: 500; }
.preds { margin: var(--s-4) 0 0; padding: var(--s-4) 0 0; border-top: 1px solid var(--hair); list-style: none; display: grid; gap: var(--s-2); overflow: auto; min-height: 0; }
.preds li { position: relative; display: flex; justify-content: space-between; gap: var(--s-3); padding-bottom: 5px; font-size: 13px; line-height: 1.4; }
.preds code { color: #fff; font-size: 13px; overflow-wrap: anywhere; }
.pred__n { color: var(--p-muted); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.preds i { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--p-accent); transform: scaleX(var(--w)); transform-origin: left; transition: transform 420ms var(--e-out); }
.pred__none { color: var(--p-muted); }
.console__city { position: relative; flex: 1 1 130px; min-height: 120px; }
.console__city canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.console__total { margin: var(--s-3) 0 0; font: 500 16px/1.4 var(--font-text); color: #fff; }

/* the conversation */
.chat { flex: 1 1 0; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-3); padding-right: 4px; overscroll-behavior: contain; }
.say-b { max-width: 92%; padding: 8px 12px; border-radius: var(--r-md); font-size: 15px; line-height: 1.4; }
.say-b p { margin: 0 0 var(--s-2); }
.say-b--user { align-self: flex-end; color: var(--p-accent-ink); background: var(--p-accent); }
.say-b--bot { align-self: flex-start; color: #fff; background: var(--p-surface); border: 1px solid var(--hair); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-2); }
.chip { min-height: 32px; padding: 4px 10px; color: var(--p-accent); background: transparent; border: 1px solid color-mix(in oklab, var(--p-accent) 50%, transparent); border-radius: 999px; font: 500 13px/1.2 var(--font-text); cursor: pointer; transition: background-color 150ms ease, color 150ms ease, transform 120ms var(--e-out); }
.chip:active { transform: scale(.97); }
.chip:disabled { opacity: .5; cursor: default; }
@media (hover: hover) and (pointer: fine) { .chip:not(:disabled):hover { color: var(--p-accent-ink); background: var(--p-accent); } }
.ask { display: flex; gap: var(--s-2); align-items: stretch; }
.ask .btn { flex: none; }
.rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 0 0 var(--s-3); padding: 0; list-style: none; }
.rail li { display: grid; gap: 4px; align-content: start; padding-top: 7px; border-top: 2px solid var(--hair); font-size: 13px; line-height: 1.2; color: var(--p-muted); transition: border-color 180ms ease, color 180ms ease; }
.rail i { font: 400 13px/1 var(--font-mono); }
.rail li[data-state="done"] { border-color: var(--p-accent); color: #fff; }
.rail li[data-state="stop"] { border-color: var(--warn); color: var(--warn); }
.tabs { display: flex; gap: var(--s-1); margin-bottom: var(--s-2); }
.tabs button { min-height: 32px; padding: 0 var(--s-3); color: var(--p-muted); background: transparent; border: 0; border-radius: var(--r-sm); font: 500 14px/1 var(--font-text); cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }
.tabs button[aria-pressed="true"] { color: var(--p-accent-ink); background: var(--p-accent); }
.trace { flex: 1 1 0; min-height: 150px; overflow: auto; overscroll-behavior: contain; }
.trace .json { min-height: 0; white-space: pre-wrap; }
.trace .sql { color: #d5dcd5; white-space: pre-wrap; }
.trace .preds { margin: 0; padding: 0; border: 0; overflow: visible; }
.trace-empty, .cand { margin: 0 0 var(--s-2); color: var(--p-muted); font-size: 14px; }
.closed { padding: var(--s-3); border: 1px solid color-mix(in oklab, var(--warn) 45%, transparent); border-radius: var(--r-sm); color: var(--warn); font-size: 14px; }
.closed b { font: 500 14px/1.4 var(--font-mono); }
.closed p { margin: var(--s-1) 0; color: #fff; }
.closed ul { margin: 0; padding: 0; list-style: none; font: 400 13px/1.5 var(--font-mono); }
.status { padding: 2px 8px; border-radius: 999px; font: 500 13px/1.4 var(--font-mono); color: var(--p-muted); border: 1px solid var(--hair); }
.status[data-s="ok"] { color: var(--p-accent-ink); background: var(--p-accent); border-color: var(--p-accent); }
.status[data-s="none"] { color: var(--warn); border-color: var(--warn); }
.console__total { margin-top: var(--s-2); }
.cards { margin: var(--s-2) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); }
.cards li { padding: var(--s-2) 0 0; border-top: 1px solid var(--hair); display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s-2); font-size: 14px; }
.cards b { font-weight: 500; color: #fff; white-space: nowrap; }
.cards span { color: var(--p-accent); font-family: var(--font-mono); font-size: 13px; }
.cards p { grid-column: 1 / -1; margin: 0; color: #d5dcd5; font-size: 13px; line-height: 1.35; }

/* OneMap */
#onemap > .wrap { display: flex; flex-direction: column; }
.om { --om-line: rgba(198, 241, 157, .17); --om-panel: rgba(9, 22, 12, .86); position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; border: 1px solid var(--hair); border-radius: var(--r-lg); background: radial-gradient(70% 80% at 52% 46%, #16331d 0%, #0d1f11 58%, #081509 100%); }
.om canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.om canvas:active { cursor: grabbing; }
.om__bar, .om__left, .om__right, .om__player { position: absolute; z-index: 2; background: var(--om-panel); border: 1px solid var(--om-line); border-radius: var(--r-md); }
.om__bar { inset: 12px 12px auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: var(--s-2); padding: 8px 10px; }
.om__bar label { display: grid; gap: 2px; min-width: 0; font-size: 13px; color: var(--p-muted); }
.om select { width: 100%; height: 30px; padding: 0 6px; color: #fff; background: #0f2213; border: 1px solid var(--om-line); border-radius: var(--r-sm); font: 500 14px/1 var(--font-text); }
.om select:focus-visible, .om button:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; }
.om__acts { display: flex; align-items: end; gap: var(--s-1); }
.om-btn { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 10px; color: #fff; background: transparent; border: 1px solid var(--om-line); border-radius: var(--r-sm); font: 500 14px/1 var(--font-text); cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 120ms var(--e-out); }
.om-btn:active { transform: scale(.96); }
.om-btn[aria-pressed="true"] { color: var(--p-accent-ink); background: var(--p-accent); border-color: var(--p-accent); }
.om-btn svg, .om-x svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) { .om-btn:not([aria-pressed="true"]):hover { border-color: var(--p-accent); } }
.om__left { left: 12px; top: 80px; bottom: 76px; width: 226px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.om-big { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.om-big b { font: var(--display-weight) 38px/1 var(--font-display); letter-spacing: -.03em; color: var(--p-accent); font-variant-numeric: tabular-nums; }
.om-big small { font-size: 13px; line-height: 1.2; color: #d5dcd5; }
.om-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; margin: 0; }
.om-kpis dt { font-size: 13px; line-height: 1.2; color: var(--p-muted); }
.om-kpis dd { margin: 0; font: 400 15px/1.3 var(--font-mono); color: #fff; }
.om-wide { grid-column: 1 / -1; }
.om-ring { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; align-items: center; }
.om-ring svg { width: 58px; height: 58px; }
.om-ring circle { fill: none; stroke-width: 5.5; }
.om-ring ul, .om-bars { margin: 0; padding: 0; list-style: none; }
.om-ring li { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1.3; color: #d5dcd5; }
.om-ring li i { flex: none; width: 7px; height: 7px; border-radius: 2px; }
.om-ring li b { margin-left: auto; font: 400 13px/1 var(--font-mono); color: #fff; }
.om-bars { display: grid; gap: 3px; }
.om-bars li { display: grid; grid-template-columns: 82px 1fr 34px; align-items: center; gap: 6px; font-size: 13px; color: #d5dcd5; }
.om-bars i { display: block; height: 4px; background: rgba(198, 241, 157, .12); border-radius: 2px; overflow: hidden; }
.om-bars b { display: block; height: 100%; background: var(--p-accent); transform-origin: left; transition: transform 420ms var(--e-out); }
.om-bars em { font: 400 13px/1 var(--font-mono); text-align: right; color: #fff; }
.om-none { display: block !important; color: var(--p-muted) !important; }
.om-insight { margin: auto 0 0; padding-top: 6px; border-top: 1px solid var(--om-line); font-size: 13px; line-height: 1.3; color: var(--warn); }
.om__right { right: 12px; top: 80px; bottom: auto; max-height: calc(100% - 156px); width: 268px; padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow: auto; overscroll-behavior: contain; }
.om-step { margin: 0 0 2px; font: 400 13px/1.3 var(--font-mono); color: var(--p-accent); }
.om__right h3 { margin: 0 0 4px; font: var(--display-weight) 20px/1.15 var(--font-display); letter-spacing: -.01em; }
.om-note p:last-child { margin: 0; font-size: 14px; line-height: 1.4; color: #d5dcd5; }
.om-card { position: relative; padding-top: 10px; border-top: 1px solid var(--om-line); animation: om-in 240ms var(--e-out); }
.om-x { position: absolute; right: 0; top: 8px; display: grid; place-items: center; width: 28px; height: 28px; color: #fff; background: transparent; border: 1px solid var(--om-line); border-radius: var(--r-sm); cursor: pointer; }
.om-c-rate { margin: 2px 0 8px; display: flex; align-items: baseline; gap: 6px; }
.om-c-rate b { font: var(--display-weight) 32px/1 var(--font-display); }
.om-c-rate small { font-size: 13px; color: #d5dcd5; }
.om-demands { padding-top: 10px; border-top: 1px solid var(--om-line); animation: om-in 240ms var(--e-out); }
.om-demands ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.om-demands span { display: flex; justify-content: space-between; gap: 6px; font-size: 14px; }
.om-demands b { font-weight: 500; }
.om-demands em { font: 400 13px/1.4 var(--font-mono); color: var(--warn); white-space: nowrap; }
.om-demands em[data-s="Answered"] { color: var(--p-accent); }
.om-demands p { margin: 0; font-size: 13px; line-height: 1.3; color: #d5dcd5; }
@keyframes om-in { from { opacity: 0; transform: translateY(6px); } }
.om__player { left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: var(--s-2); padding: 8px 10px; }
.om-play { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; color: var(--p-accent-ink); background: var(--p-accent); border: 0; border-radius: var(--r-sm); font: 500 15px/1 var(--font-text); cursor: pointer; transition: transform 120ms var(--e-out); }
.om-play:active { transform: scale(.97); }
.om-play svg { width: 12px; height: 12px; fill: currentColor; }
.om-play .i-pause, .om-play[data-playing="true"] .i-play { display: none; }
.om-play[data-playing="true"] .i-pause { display: block; }
.om-dots { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.om-dot { --fill: 0; position: relative; height: 24px; padding: 0; background: transparent; border: 0; cursor: pointer; }
.om-dot::before, .om-dot::after { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px; background: rgba(198, 241, 157, .2); }
.om-dot::after { background: var(--p-accent); transform: scaleX(var(--fill)); transform-origin: left; }
.om-dot[aria-current="step"]::before { background: rgba(198, 241, 157, .42); }
.om__tip { position: absolute; z-index: 3; left: 0; top: 0; display: grid; gap: 1px; width: 198px; padding: 8px 10px; pointer-events: none; background: #06110a; border: 1px solid var(--p-accent); border-radius: var(--r-sm); font-size: 13px; line-height: 1.3; color: #d5dcd5; }
.om__tip b { font-weight: 500; font-size: 14px; color: #fff; }

/* films */
.film { position: relative; margin: 0; background: #06101a; border: 1px solid var(--hair); border-radius: var(--r-lg); overflow: hidden; line-height: 0; }
.film video { display: block; width: 100%; height: auto; }
.film__play { white-space: nowrap; position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4); color: var(--p-accent-ink); background: var(--p-accent); border: 0; border-radius: var(--r-btn, 8px); font: 500 16px/1 var(--font-text); cursor: pointer; transition: transform 120ms var(--e-out), background-color 150ms ease; }
.film__play:active { transform: scale(.97); }
.film__play svg { width: 12px; height: 12px; fill: currentColor; }
.film .loop-pause { position: absolute; right: 12px; bottom: 12px; }
.film .loop-pause svg { width: 14px; height: 14px; fill: currentColor; }
.figures { display: grid; gap: var(--s-4); margin: 0; }
.figures > div { display: grid; gap: var(--s-1); padding-bottom: var(--s-4); border-bottom: 1px solid var(--hair); }
.figures p { margin: 0; }
.figures .t-stat { color: var(--p-accent); font-family: var(--font-mono); font-weight: 400; letter-spacing: -.02em; }
.figures .t-small { color: var(--ink); }
.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list li { padding: var(--s-4) 0; line-height: 1.55; border-bottom: 1px solid var(--hair); }
.plain-list li:first-child { padding-top: 0; }
.note { margin: var(--s-4) 0 0; color: var(--p-muted); font-size: 14px; line-height: 1.5; }

/* trainer */
.coach { flex: 1 1 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.coach__in { padding: var(--s-5); border-right: 1px solid var(--hair); display: grid; gap: var(--s-4); align-content: start; }
.coach__out { padding: var(--s-5); display: flex; flex-direction: column; min-width: 0; }
.slide { display: grid; grid-template-columns: 1fr auto; gap: var(--s-1) var(--s-3); font-size: 14px; }
.slide label { font: inherit; color: inherit; margin: 0; }
.slide output { font-family: var(--font-mono); font-size: 13px; color: #fff; }
.slide input { grid-column: 1 / -1; width: 100%; height: 24px; margin: 0; accent-color: var(--p-accent); }
.seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg legend { padding: 0; margin-bottom: var(--s-2); font-size: 14px; }
.seg__row { display: flex; gap: var(--s-2); }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 40px; border: 1px solid var(--hair); border-radius: var(--r-sm); font-size: 14px; transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.seg input:checked + span { color: var(--p-accent-ink); background: var(--p-accent); border-color: var(--p-accent); }
.seg input:focus-visible + span { outline: 2px solid var(--action); outline-offset: 2px; }
.checks { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.checks label { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 32px; font-size: 14px; cursor: pointer; }
.checks input { width: 18px; height: 18px; margin: 0; accent-color: var(--p-accent); }
.ladder { margin: 0; padding: 0; list-style: none; flex: 1; display: grid; }
.ladder li { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 0 var(--s-3); padding: 7px var(--s-3); border-radius: var(--r-sm); transition: background-color 180ms ease, color 180ms ease, opacity 180ms ease; }
.ladder b { font: 400 13px/1 var(--font-mono); color: var(--p-muted); grid-row: span 2; }
.ladder strong { font: 500 16px/1.3 var(--font-text); }
.ladder code { font-size: 13px; line-height: 1.4; color: var(--p-muted); overflow-wrap: anywhere; }
.ladder li[data-state="passed"] strong { color: var(--p-muted); }
.ladder li[data-state="hit"] { background: var(--p-accent); color: var(--p-accent-ink); }
.ladder li[data-state="hit"] :is(b, code, strong) { color: var(--p-accent-ink); }
.state { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); margin: var(--s-3) 0 0; padding-top: var(--s-3); border-top: 1px solid var(--hair); font-size: 13px; color: var(--p-muted); }
.state code { color: #fff; }

/* two builds */
.builds { flex: 1 1 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); min-height: 0; }
.build { padding: var(--s-5); display: flex; flex-direction: column; min-width: 0; }
.build h3 { margin: 0 0 var(--s-4); font: var(--display-weight) var(--t-card)/1.25 var(--font-display); }
.build > p { margin: 0 0 var(--s-4); }
.build__foot { margin-top: auto; padding-top: var(--s-4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.build__foot .link { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; cursor: pointer; }
.say { margin: var(--s-3) 0 0; min-height: 1.5em; font-size: 15px; line-height: 1.5; color: var(--p-accent); }
.git { --git-row: 60px; position: relative; height: 100px; flex: none; }
.node { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: calc(100% / 7 * .74); height: 38px; color: #fff; background: var(--p-bg); border: 1px solid var(--hair); border-radius: var(--r-sm); font: 400 13px/1 var(--font-mono); transition: transform 420ms var(--e-move), background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.node.has-next::after { content: ""; position: absolute; left: 100%; top: 50%; width: 35.2%; height: 1px; background: color-mix(in oklab, #fff 42%, transparent); }
.node.is-donor { color: var(--p-muted); }
.node.is-curr { color: var(--p-accent-ink); background: var(--p-accent); border-color: var(--p-accent); }
.src { margin: var(--s-3) 0 0; font-size: 13px; line-height: 1.55; color: #d5dcd5; overflow-x: auto; }
.src span { display: block; padding: 0 var(--s-2); border-radius: 4px; white-space: pre; transition: background-color 140ms ease, color 140ms ease; }
.src span.is-on { color: var(--p-accent-ink); background: var(--p-accent); }
.mail { margin: 0; padding: var(--s-3); background: var(--p-bg); border: 1px solid var(--hair); border-radius: var(--r-sm); font: 400 14px/1.4 var(--font-mono); color: #fff; }
.tree { position: relative; flex: 1 1 150px; min-height: 150px; margin-top: var(--s-3); }
.tree svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tree line { stroke: color-mix(in oklab, #fff 34%, transparent); stroke-width: 1; }
.leaf { position: absolute; transform: translate(-50%, -50%); padding: 5px 9px; white-space: nowrap; color: #fff; background: var(--p-bg); border: 1px solid var(--hair); border-radius: var(--r-sm); font: 400 13px/1.2 var(--font-mono); }
.leaf--spam { color: var(--warn); }
.leaf--ham { color: var(--p-accent); }
.leaf.is-new { border-color: var(--p-accent); animation: leaf-in 260ms var(--e-out); }
@keyframes leaf-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.94); } }

/* education and tools */
#about .plain-list li { padding: var(--s-5) 0; }
#about .tools { gap: var(--s-6); }
.tools { display: grid; gap: var(--s-5); margin: 0; }
.tools div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-3); align-items: start; }
.tools dt { padding-top: 14px; color: var(--p-muted); font-size: 14px; }
.tools dd { margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tool { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1px solid var(--hair); border-radius: var(--r-sm); font-size: 14px; }
.tool img { width: 26px; height: 26px; object-fit: contain; }

@media (min-width: 1024px) and (max-height: 820px) {
  #search, #onemap, #trainer { --h: 2; }
  .console, .om, .coach { flex: 0 0 660px; }
}
@media (max-width: 1279px) {
  #builds { --h: 2; }
  .builds { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  #search, #trainer, #builds { --h: 2; }
  .console { grid-template-columns: minmax(0, 1fr); }
  .console__pane + .console__pane { border-left: 0; border-top: 1px solid var(--hair); }
  .console__city { min-height: 240px; }
  .chat { flex: none; height: 230px; }
  .trace { flex: none; height: 300px; }
  .coach, .builds { grid-template-columns: minmax(0, 1fr); }
  #onemap { --h: 2; }
  .om { display: flex; flex-direction: column; gap: 10px; padding: 10px; overflow: visible; background: #0d1f11; }
  .om canvas { position: relative; inset: auto; order: 1; flex: 1 1 380px; min-height: 340px; border-radius: var(--r-md); background: radial-gradient(70% 80% at 52% 46%, #16331d 0%, #0d1f11 62%, #081509 100%); }
  .om__bar, .om__left, .om__right, .om__player { position: static; inset: auto; width: auto; }
  .om__bar { order: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .om__player { order: 2; } .om__right { order: 3; overflow: visible; } .om__left { order: 4; }
  .coach__in { border-right: 0; border-bottom: 1px solid var(--hair); }
}
@media (max-width: 639px) {
  #search, #trainer, #builds, #about { --hm: 2; }
  .console__pane, .coach__in, .coach__out, .build { padding: var(--s-4); }
  #onemap { --hm: 2; }
  .om canvas { flex: none; height: 320px; min-height: 320px; }
  .om-ring, .om-bars { display: none; }
  .om__bar label:nth-of-type(5) { grid-column: 1 / -1; }
  .chat { height: 190px; } .trace { height: 220px; } .console__city { min-height: 170px; }
  .presets { grid-template-columns: minmax(0, 1fr); }
  .om__bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .om select, .om-btn { height: 44px; min-width: 44px; }
  .om__acts { grid-column: 1 / -1; } .om__acts .om-btn { flex: 1; }
  .om-play { height: 44px; } .om-play span { display: none; } .om-play { width: 44px; justify-content: center; padding: 0; }
  .om-dot { height: 44px; } .om-dot::before, .om-dot::after { top: 20px; }
  .om-x { width: 44px; height: 44px; }
  .rail span { display: none; } .rail li { text-align: center; }
  .ask { flex-direction: column; } .ask textarea { flex: none; }
  .chip { min-height: 44px; } .tabs button { min-height: 44px; flex: 1; }
  .preset, .seg span { min-height: 44px; }
  .checks label { min-height: 44px; }
  .src span { white-space: pre-wrap; overflow-wrap: anywhere; }
  .tools div { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
  .tools dt { padding-top: 0; }
  .tool { min-height: 44px; padding: 0 10px; }
  .slide input { height: 44px; }
  .city__query { inset: var(--s-3) var(--s-3) auto; }
}
@media (prefers-reduced-motion: reduce) {
  .node, .preds i, .ladder li, .src span { transition-duration: 1ms; }
  .leaf.is-new, .om-card, .om-demands { animation: none; }
}

/* the directory: a fixed rail on the left from 1200px, the kit's top bar and menu below that */
@media (min-width: 1200px) {
  :root { --rail: 184px; --nav: 0px; --padt: 64px; --gut: 48px; }
  main, footer.closing { margin-left: var(--rail); }
  header.nav { inset: 0 auto 0 0; width: var(--rail); height: 100svh; border-bottom: 0; border-right: 1px solid var(--line); }
  header.nav .nav__bar { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; width: 100%; max-width: none; height: 100%; margin: 0; padding: 32px 16px 24px 24px; }
  header.nav .nav__logo { justify-self: auto; }
  header.nav .nav__links { position: static; inset: auto; transform: none; flex: 1 1 auto; display: flex; flex-direction: column; align-items: stretch; justify-content: center; align-self: stretch; gap: 2px; width: auto; margin: 0; }
  header.nav .nav__item { display: block; height: auto; }
  header.nav .nav__link { position: relative; display: flex; align-items: center; width: 100%; height: 44px; margin-left: -12px; padding: 0 12px; border-radius: var(--r-sm); color: var(--p-muted); font-size: 16px; transition: color 150ms ease, background-color 150ms ease; }
  header.nav .nav__link::before { display: none; }
  header.nav .nav__link[aria-current="location"] { color: var(--p-accent); }
  header.nav .nav__link[aria-current="location"]::after { content: ""; position: absolute; left: 0; top: 13px; bottom: 13px; width: 2px; border-radius: 2px; background: var(--p-accent); }
  header.nav .nav__actions { display: block; flex: none; }
  header.nav .nav__actions .btn { display: flex; justify-content: center; width: 100%; padding-inline: var(--s-3); }
  .hero--split h1 { font-size: clamp(40px, 3.7vw, 56px); }
}
@media (min-width: 1200px) and (hover: hover) and (pointer: fine) {
  header.nav .nav__link:hover { color: #fff; background: color-mix(in oklab, #fff 6%, transparent); }
}
/* laptop screens with the rail: the demos stay on one screen */
@media (min-width: 1200px) and (min-height: 720px) and (max-height: 820px) {
  #search, #onemap, #trainer { --h: 1; }
  .console, .om, .coach { flex: 1 1 auto; }
  .om-bars, .om-insight { display: none; }
  .head-row { margin-bottom: var(--s-4); }
  .coach__in { gap: var(--s-3); padding-block: var(--s-4); }
  .coach__out { padding-block: var(--s-4); }
  .ladder li { padding-block: 3px; }
}
