/* lukaszbienkowski.pl — one stylesheet, no web fonts, no framework.
   Terminal-flavoured without being a terminal: a dark ground, monospace for names, labels and
   anything that is data, a plain sans for reading. One accent, phosphor green, used sparingly —
   prompts, the cursor, links on hover, results. Dark by default; the sun button switches to light. */

:root {
  --bg: #0c0f12;
  --panel: #12171c;
  --fg: #d3d9e0;
  --bright: #eef2f6;
  --dim: #7f8a96;
  --rule: #1f272f;
  --accent: #5fd49b;
  --warn: #e0b04a;
  --bad: #e5705f;
  --accent-dim: #2a5b44;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 46rem;
  --wide: 70rem;
}

:root { color-scheme: dark; }
/* Light mode, chosen with the sun button. Same structure, paper ground, a deeper green for contrast. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f2;
  --panel: #eaece6;
  --fg: #2a3036;
  --bright: #0e1215;
  --dim: #5f6973;
  --rule: #d8dcd5;
  --accent: #0b7a4b;
  --warn: #b27a08;
  --bad: #c03a2b;
  --accent-dim: #9fcfb6;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16.5px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-dim); color: var(--bright); }
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }
.wide { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }
p { margin: 0 0 1rem; }
a { color: var(--bright); text-decoration-line: underline; text-decoration-color: var(--accent-dim); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
code { white-space: nowrap; font: 0.86em var(--mono); color: var(--bright); background: var(--panel); border: 1px solid var(--rule); padding: 0.05em 0.35em; border-radius: 3px; }
.dim { color: var(--dim); }
.acc { color: var(--accent); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--panel); padding: 0.5rem 0.75rem; z-index: 10; }

/* ---------------------------------------------------------------- header */

.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.bar { display: flex; align-items: center; gap: 1.5rem; height: 3.25rem; font-family: var(--mono); font-size: 0.85rem; }
.mark { color: var(--bright); text-decoration: none; font-weight: 600; }
.theme {
  flex: none; margin-left: auto; display: grid; place-items: center; width: 1.85rem; height: 1.85rem; padding: 0; cursor: pointer;
  color: var(--dim); background: transparent; border: 1px solid var(--rule); border-radius: 3px;
}
.theme:hover { color: var(--accent); border-color: var(--accent); }
.theme svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme .sun { color: #f2c94c; fill: #f2c94c; }
.theme:hover .sun { color: #ffd966; fill: #ffd966; }
.theme .moon, :root[data-theme="light"] .theme .sun { display: none; }
:root[data-theme="light"] .theme .moon { display: block; }
/* Key hints: each hangs off the bottom right corner of what it opens. Keys are for keyboards: not on a phone. */
[data-keys], .explore, .sim-play, .sim-restart { position: relative; }
.keys { position: absolute; z-index: 1; right: -0.7rem; bottom: -0.65rem; display: flex; pointer-events: none; font: 400 0.62rem/1.4 var(--mono); letter-spacing: 0; box-shadow: 0 0 0 2px var(--bg); border-radius: 3px; }
kbd { min-width: 1.5em; padding: 0 0.35em; font: inherit; text-align: center; color: var(--fg); background: var(--panel); border: 1px solid var(--rule); }
kbd + kbd { border-left: 0; }
kbd:first-child { border-radius: 3px 0 0 3px; }
kbd:last-child { border-radius: 0 3px 3px 0; }
kbd:only-child { border-radius: 3px; }
.mark .keys { right: -1.4rem; bottom: -0.85rem; }
.sim-bar .keys { bottom: -0.85rem; }
@media (hover: none), (max-width: 560px) { .keys { display: none; } }
@media (max-width: 560px) {
  .bar { gap: 1rem; }
  .mark .dim { display: none; }
}

/* ---------------------------------------------------------------- shared type */

.label { font: 0.82rem var(--mono); color: var(--dim); margin: 0 0 0.9rem; font-weight: 400; letter-spacing: 0; }
.ps { color: var(--accent); }
h1 {
  font: 600 clamp(1.9rem, 4.8vw, 2.7rem)/1.15 var(--mono);
  color: var(--bright);
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}
.cursor {
  display: inline-block; width: 0.5em; height: 0.95em; margin-left: 0.18em; vertical-align: -0.1em;
  background: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: blink 1.1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
}
.t {
  display: inline-block; font: 0.8rem/1.5 var(--mono); color: var(--fg);
  background: var(--panel); border: 1px solid var(--rule); border-radius: 3px; padding: 0.08rem 0.45rem;
}

/* ---------------------------------------------------------------- home */

.home {
  display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 3.5rem 4rem;
  padding-top: clamp(2.5rem, 8vw, 5.5rem); padding-bottom: 2rem;
}
.city { width: 1.1em; height: 1.1em; margin: 0 0.45em 0 0.7em; vertical-align: -0.12em; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.short p { margin: 0; }
.short ul { list-style: none; padding: 0; margin: 0.35rem 0; }
.short li { position: relative; padding-left: 1.3rem; }
.short li::before { content: "-"; position: absolute; left: 0.2rem; color: var(--accent); font-family: var(--mono); }
.pitch { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2.5rem; }
.pitch .short { margin: 0; flex: 0 1 27rem; }
.pitch .ctas { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 0.9rem; }
.pitch .explore { margin: 0; justify-content: space-between; }
.role { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; font: 0.95rem var(--mono); color: var(--dim); margin-bottom: 1.6rem; }
.inline-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.inline-links a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.inline-links a:hover { color: var(--bright); border-color: currentColor; }
.short { font-size: 1.15rem; line-height: 1.6; color: var(--fg); max-width: 46rem; text-wrap: pretty; }
.explore {
  display: inline-flex; align-items: center; gap: 0.8rem; margin-top: 0.9rem;
  padding: 0.7rem 1.1rem; border: 1px solid var(--accent); border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  font: 600 1rem var(--mono); color: var(--bright); text-decoration: none;
}
.explore .arrow { color: var(--accent); font-size: 1.15rem; transition: transform 0.15s; }
.explore:hover { background: var(--accent); color: var(--bg); }
.explore:hover .ps, .explore:hover .arrow { color: var(--bg); }
.explore:hover .arrow { transform: translateX(4px); }
.links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.btn {
  font: 0.82rem var(--mono); text-decoration: none; color: var(--fg);
  padding: 0.42rem 0.85rem; border: 1px solid var(--rule); border-radius: 3px;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.btn.primary:hover { background: var(--bright); border-color: var(--bright); color: var(--bg); }

.looking-for { grid-column: 1 / -1; }
.stack dl { margin: 0; }
.stack dl > div { display: grid; gap: 0.3rem; padding: 0.6rem 0 0.75rem; border-top: 1px solid var(--rule); }
.stack dl > div:last-child { border-bottom: 1px solid var(--rule); }
.stack dt { font: 0.8rem/1.9 var(--mono); color: var(--dim); }
.stack dd { margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }


/* The panel runs beside the intro and the experience, from the first line down. */
.side { grid-column: 2; grid-row: 1 / span 2; border-left: 1px solid var(--rule); padding-left: 2rem; }
.home { grid-template-rows: auto 1fr; }
.tl { list-style: none; padding: 0; margin: 0 0 2.25rem; }
.tl > li { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 0.2rem 1.5rem; padding: 0.8rem 0; border-top: 1px solid var(--rule); font-size: 0.92rem; }
.tl:last-child { margin-bottom: 0; }
.tl .co { color: var(--bright); font-weight: 600; margin: 0; }
.tl .pos { display: flex; justify-content: space-between; gap: 0.75rem; margin: 0; color: var(--fg); }
.tl .yrs { font: 0.76rem/1.9 var(--mono); color: var(--dim); white-space: nowrap; }
.tl details { margin: 0.2rem 0 0.4rem; }
.tl summary { font: 0.74rem var(--mono); color: var(--dim); cursor: pointer; list-style: none; }
.tl summary::-webkit-details-marker { display: none; }
.tl summary::before { content: "[+] "; color: var(--accent); }
.tl details[open] > summary::before { content: "[-] "; }
.tl details ul { margin: 0.5rem 0 0; padding-left: 1rem; color: var(--dim); font-size: 0.84rem; }
.tl details li { margin-bottom: 0.55rem; }
.tl details b { font-weight: 600; font-size: 1.04em; color: var(--bright); }
.tl .see { font: 0.74rem var(--mono); color: var(--dim); margin: 0.4rem 0 0; }
.tl .see a { margin-right: 0.5rem; }

@media (max-width: 960px) {
  .home { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 3rem; }
  .side { grid-column: auto; grid-row: auto; border-left: 0; padding-left: 0; }
}
@media (max-width: 620px) { .pitch { flex-direction: column; align-items: flex-start; } .pitch .short { flex: none; } }
@media (max-width: 560px) {
  .tl > li { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
}

/* ---------------------------------------------------------------- inner pages */

.page { padding-top: clamp(2.5rem, 7vw, 4.5rem); padding-bottom: 2rem; }
.ph { margin-bottom: 2.5rem; }
.sub { color: var(--dim); font-size: 1rem; max-width: 40rem; }
.looking { max-width: 46rem; border-left: 2px solid var(--accent); padding-left: 1.1rem; }
.looking p { margin: 0; }
.looking strong { color: var(--bright); }

.notes { list-style: none; padding: 0; margin: 0; }
.notes a { display: block; text-decoration: none; padding: 1rem 0; border-top: 1px solid var(--rule); }
.notes .nt { display: block; font: 600 1.1rem/1.4 var(--sans); color: var(--bright); }
.notes a:hover .nt { color: var(--accent); }
.notes .nd { display: block; color: var(--fg); font-size: 0.92rem; margin: 0.25rem 0; }
.notes .dim { font: 0.76rem var(--mono); }

.prose h1 { font-size: clamp(1.7rem, 4.2vw, 2.3rem); margin-bottom: 1.5rem; }
.prose h2 { font: 600 1.15rem/1.4 var(--mono); color: var(--bright); margin: 2.4rem 0 0.7rem; letter-spacing: -0.01em; }
.prose h2::before { content: "## "; color: var(--accent); }
.prose p, .prose li { text-wrap: pretty; }
.prose strong { color: var(--bright); }
.prose .aside { font: 0.8rem var(--mono); color: var(--dim); margin-top: 3rem; }
.facts { list-style: none; padding: 0; margin: 0; font-size: 0.92rem; }
.facts li { padding: 0.5rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 4.5rem; }
.facts li:target { background: var(--panel); outline: 6px solid var(--panel); }
.fid { font: 0.76rem var(--mono); color: var(--accent); text-decoration: none; margin-right: 0.5rem; }
.metric { display: block; font: 0.76rem var(--mono); color: var(--dim); margin-top: 0.15rem; }
.metric::before { content: "metric: "; color: var(--accent); }

/* ---------------------------------------------------------------- /work: the slides */


.deck { min-height: calc(100vh - 3.25rem); min-height: calc(100dvh - 3.25rem); display: flex; flex-direction: column; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.progress { display: flex; gap: 5px; }
.progress a { flex: 1; height: 15px; padding: 6px 0; background: var(--rule); background-clip: content-box; border-radius: 2px; }
.progress a.done { background-color: var(--accent-dim); }
.progress a.on { background-color: var(--accent); }
.progress a:hover { background-color: var(--dim); }

.slide { flex: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 4rem; align-items: center; padding: 3rem 0; }
/* A story with no figure (visual: none): the text alone, at a comfortable reading width. */
.slide.text-only { grid-template-columns: minmax(0, 46rem); }
.slide h1 { font-size: clamp(1.55rem, 3.3vw, 2.35rem); margin-bottom: 0.7rem; }
.slide .where { font: 0.8rem var(--mono); color: var(--dim); margin-bottom: 1.5rem; }
.slide .body { font-size: 1.1rem; line-height: 1.7; max-width: 36rem; text-wrap: pretty; }
.slide ul.body { list-style: none; padding: 0; display: grid; gap: 0.55rem; }
.slide ul.body li { position: relative; padding-left: 1.3rem; }
.slide ul.body li::before { content: "-"; position: absolute; left: 0.2rem; color: var(--accent); font-family: var(--mono); }
.meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 1.5rem 0 0; }

.visual {
  margin: 0; min-height: 21rem; display: flex; flex-direction: column; justify-content: center;
  padding: 2.25rem; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px;
}
.big { font: 600 clamp(2.6rem, 6vw, 4.6rem)/1.05 var(--mono); color: var(--accent); letter-spacing: -0.04em; margin: 0 0 0.9rem; }
.big.long { font-size: clamp(2rem, 4.2vw, 3.4rem); }
.big { white-space: nowrap; }
.visual .cap { color: var(--dim); font-size: 0.92rem; margin: 0; }
.vk { font: 0.82rem var(--mono); color: var(--dim); }
.points { margin-top: 1.75rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.points ul { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.points li { padding: 0.25rem 0 0.25rem 1.1rem; position: relative; }
.points li::before { content: "›"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.v-boxes .cap { margin-top: 1.1rem; }
.box { min-width: 0; }
.boxes:has(.box:nth-of-type(3)) { gap: 0.45rem; }
.boxes:has(.box:nth-of-type(3)) .box { padding: 0.8rem 0.7rem; font-size: 0.76rem; }
.boxes:has(.box:nth-of-type(3)) .bt { font-size: 0.8rem; }
.boxes { display: flex; align-items: stretch; gap: 0.75rem; }
.box { flex: 1; border: 1px solid var(--rule); background: var(--bg); border-radius: 4px; padding: 1rem 1.1rem; font: 0.82rem/1.5 var(--mono); }
.box p { margin: 0 0 0.3rem; color: var(--dim); }
.box p:last-child { margin: 0.6rem 0 0; color: var(--accent); }
.box .bt { color: var(--bright); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.6rem; }
.boxes .link { align-self: center; color: var(--accent); font: 1.2rem var(--mono); }
@media (max-width: 560px) { .boxes { flex-direction: column; } .boxes .link { transform: rotate(90deg); } }
.inv { width: 100%; border-collapse: collapse; margin-top: 1.75rem; font-size: 0.82rem; }
.inv caption { text-align: left; font: 0.78rem var(--mono); color: var(--dim); padding-bottom: 0.5rem; }
.inv th { text-align: left; font: 400 0.7rem var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; padding: 0.3rem 0.6rem 0.3rem 0; border-bottom: 1px solid var(--rule); }
.inv td { padding: 0.45rem 0.6rem 0.45rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; line-height: 1.4; }
.inv .vd { font-family: var(--mono); white-space: nowrap; color: var(--accent); }
.inv tr.out td { color: var(--dim); }
.inv tr.out td:nth-child(2) { text-decoration: line-through; text-decoration-color: var(--dim); }
.inv tr.out .vd { color: var(--dim); }
.inv .no { font-family: var(--mono); color: var(--fg); }
.v-investigation { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.v-investigation .inv { margin-top: 0; }
.drop { min-width: 0; }
.drop .dt { font: 0.8rem var(--mono); color: var(--dim); margin: 0 0 0.4rem; }
.drop svg { display: block; width: 100%; height: auto; }
.drop .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.drop .area { fill: var(--accent); opacity: 0.1; }
.drop .base { stroke: var(--rule); }
.drop .fix line { stroke: var(--dim); stroke-dasharray: 3 4; opacity: 0.6; }
.drop .fix circle { fill: var(--bg); stroke: var(--dim); }
.drop text { font: 13px var(--mono); fill: var(--dim); dominant-baseline: central; }
.drop .fix text { fill: var(--bright); text-anchor: middle; }
/* A fix being pointed at: its marker fills in, its row lifts and grows a little. */
.drop .hit { fill: transparent; }
.drop .fix { cursor: pointer; outline: none; }
.drop .fix.hot circle { fill: var(--accent); stroke: var(--accent); }
.drop .fix.hot text { fill: var(--bg); font-weight: 700; }
.drop .fix.hot line { stroke: var(--accent); opacity: 1; }
.drop .fix:focus-visible circle { stroke: var(--bright); stroke-width: 2; }
.inv tbody tr { transform-origin: center; }
.inv tr.hot { transform: scale(1.06); }
.inv tr.hot td { background: var(--bg); color: var(--bright); border-bottom-color: var(--accent); }
.inv tr.hot td:first-child { box-shadow: inset 2px 0 0 var(--accent); padding-left: 0.5rem; }
@media (prefers-reduced-motion: no-preference) { .inv tbody tr { transition: transform 0.15s ease-out; } }
@media (max-width: 560px) { .inv tr.hot { transform: scale(1.03); } }
.drop .val { fill: var(--bright); font-weight: 600; }
.drop .ax { font-size: 11px; }
.visual .drop .cap { font-size: 0.78rem; margin-top: 0.5rem; }
@media (max-width: 900px) { .v-investigation { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }
@media (max-width: 560px) { .drop text { font-size: 18px; } .drop .ax { font-size: 17px; } .v-investigation { padding: 1.1rem; } .inv td, .inv th { padding-right: 0.4rem; } }
.tools { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tools .t { font-size: 0.95rem; padding: 0.3rem 0.7rem; background: var(--bg); }

.budget { font-family: var(--mono); font-size: 0.78rem; }
.budget .lbl { color: var(--dim); margin: 0 0 0.35rem; display: flex; justify-content: space-between; gap: 1rem; }
.budget .lbl b { color: var(--bright); font-weight: 600; }
.budget .track { height: 2.1rem; background: var(--bg); border: 1px solid var(--rule); border-radius: 3px; position: relative; overflow: hidden; }
.budget .track.thin { height: 0.9rem; }
.budget .seg { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.budget .few { width: 12%; background: linear-gradient(90deg, var(--accent) 45%, transparent); }
.budget .w1 { width: 2.5%; }
.budget .note { margin: 0.45rem 0 1.3rem; color: var(--fg); display: flex; gap: 0.5rem; align-items: center; }
.budget .sw { flex: none; width: 0.7rem; height: 0.7rem; background: var(--accent); border-radius: 2px; }
.budget .axis { display: flex; justify-content: space-between; border-top: 1px solid var(--rule); margin-top: 0.7rem; padding-top: 0.3rem; font-size: 0.7rem; color: var(--dim); }
.budget .cap { margin-top: 1.2rem !important; font-family: var(--sans); font-size: 0.82rem !important; }


/* In the gutter: next to the column on a wide screen, against the edge on a narrow one. */
.edge { position: fixed; top: 50%; z-index: 2; width: 3rem; height: 6rem; margin-top: -3rem; display: grid; place-items: center; font: 1.4rem var(--mono); color: var(--dim); opacity: 0.8; text-decoration: none; transition: opacity 0.15s, color 0.15s; }
.edge.left { left: max(0rem, calc(50% - var(--wide) / 2 - 2.5rem)); }
.edge.right { right: max(0rem, calc(50% - var(--wide) / 2 - 2.5rem)); }
.edge:hover { color: var(--accent); opacity: 1; }
@media (max-width: 1240px) { .edge { width: 1.25rem; font-size: 1.1rem; } }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--rule); padding-top: 1rem; font: 0.8rem var(--mono); }
.pager a { color: var(--dim); text-decoration: none; display: flex; gap: 0.45rem; min-width: 0; flex: 1; }
.pager a[rel="next"] { justify-content: flex-end; text-align: right; }
.pager .all { flex: none; color: var(--dim); }
.pager .pt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager .k { color: var(--accent); }
.pager a:hover { color: var(--accent); }

/* A slide with an interactive illustration: text beside it, the visual under both at full width. */
.has-sim { grid-template-columns: 19rem minmax(0, 1fr); align-items: start; align-content: start; gap: 1.5rem 2.25rem; padding: 1.75rem 0 2.5rem; }
.has-sim .lead, .has-sim .visual { grid-column: 1 / -1; min-width: 0; }
/* The timeout story: its text column is 30% wider than the 19rem other stories get. */
@media (min-width: 1041px) { .has-sim[data-story="peak-timeouts"] { grid-template-columns: 24.7rem minmax(0, 1fr); } }
.v-figure .points:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.has-sim .v-figure { min-height: 0; }
.has-sim .lead h1 { margin-bottom: 0; }
.has-sim .body { font-size: 1rem; line-height: 1.62; margin-top: -0.3rem; }
.sim { border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); padding: 1rem 1.25rem 0.9rem; }
.sim[hidden] { display: none; }
.sim-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font: 0.8rem var(--mono); color: var(--dim); margin-bottom: 1.4rem; }
.sim-bar label { display: flex; align-items: center; gap: 0.6rem; margin-right: auto; }
.sim-bar input { accent-color: var(--accent); width: min(11rem, 34vw); }
.sim-load { color: var(--fg); min-width: 7.5rem; }
.sim-bar .btn { cursor: pointer; padding: 0.25rem 0.7rem; }
.sim-bar .btn:not(.primary) { background: transparent; }
.sim { scroll-margin: 4.25rem 0 1rem; }
.sim-lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.sim-lane { min-width: 0; }
.sim-title { margin: 0; font: 0.8rem var(--mono); color: var(--dim); }
.sim-title b { color: var(--bright); }
.sim canvas { display: block; width: 100%; height: 208px; }
.sim-score { display: flex; gap: 1.5rem; margin: 0.2rem 0 0.8rem; font-family: var(--mono); }
.sim-score > div { display: flex; flex-direction: column-reverse; }
.sim-score dt { font-size: 0.72rem; color: var(--dim); }
.sim-score dd { margin: 0; font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--fg); }
.sim-score .s-served { color: var(--accent); }
.sim-score .s-timeout { color: var(--bad); }
.sim .cap { font-size: 0.8rem; color: var(--dim); margin: 0.3rem 0 0; }
.sim-goal { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; margin: 0 0 1rem; padding: 0.5rem 0.75rem; border-left: 2px solid var(--accent); background: var(--bg); font-size: 0.85rem; color: var(--fg); }
.sim-goal b { font: 600 0.8rem/1.75 var(--mono); color: var(--accent); }
.sim-goal span { font: 0.78rem/1.8 var(--mono); color: var(--dim); }
.sim-goal i { font-style: normal; color: var(--accent); }
.sim-goal i.no { color: var(--bad); }
.sim-slo { margin: 0 0 0.6rem; font: 0.82rem var(--mono); color: var(--dim); }
.sim-slo.met { color: var(--accent); }
.sim-slo.miss { color: var(--bad); }
.sim-bar .sim-switch { margin-right: 0.4rem; color: var(--fg); cursor: pointer; }
.sim-bar .sim-switch input { width: 1rem; height: 1rem; }
.sim-repeats canvas { height: 270px; }
.sim-repeats .sim-load { min-width: 2.6rem; }
.sim-repeats .sim-bar input[type="range"] { width: min(7rem, 30vw); }
.sim-repeats .sim-score { flex-wrap: wrap; gap: 0.5rem 1.75rem; margin-top: 0.9rem; }
.sim-repeats .s-answered, .sim-repeats .s-runs { color: var(--fg); }
.sim-repeats .s-shared, .sim-repeats .s-cached { color: var(--accent); }
.sim-rollout canvas { height: 300px; }
.sim-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-right: auto; }
.sim-acts .btn:not(:disabled) { border-color: var(--accent); color: var(--bright); }
.sim-acts .btn:disabled { opacity: 0.45; cursor: default; }
.sim-acts .btn.pressed, .sim-acts .btn.pressed:disabled { opacity: 1; background: var(--accent) !important; color: var(--bg); }
.sim-say { min-height: 2.5rem; align-items: center; }
@media (max-width: 1040px) { .has-sim { grid-template-columns: minmax(0, 1fr); } .has-sim .body { max-width: 46rem; } }
@media (max-width: 760px) { .sim-lanes { grid-template-columns: 1fr; gap: 0.75rem; } .sim { padding: 0.9rem; } }

@media (max-width: 900px) {
  .slide { grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; padding: 2rem 0; }
  .visual { min-height: 0; padding: 1.5rem; }
}
@media (max-width: 560px) { .pager .pt { display: none; } }

/* Moving between slides is a page load; where the browser supports it, crossfade it, header held still. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .top { view-transition-name: top; }
}

/* ---------------------------------------------------------------- footer and print */

.foot { margin-top: 4rem; border-top: 1px solid var(--rule); padding: 1.75rem 0 3rem; font-size: 0.8rem; color: var(--dim); }
.foot p { margin: 0 0 0.6rem; max-width: 52rem; }
.foot .agents a { color: var(--fg); }
.machine { font-family: var(--mono); display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.machine a { color: var(--dim); }

@media print {
  :root { --bg: #fff; --panel: #f3f3f3; --fg: #111; --bright: #000; --dim: #555; --rule: #ddd; --accent: #0b6b40; }
  .sim, .top, .keys, .edge, .links, .foot .machine, .skip, .cursor { display: none !important; }
  .home { display: block; } .inline-links, .explore { display: none; }
  .side { border: 0; padding: 0; }
}
