/* boltbeam.fyi. Dark, data first.
   Colour has one meaning each: green = measured / the floor, orange = time above
   the floor, pink = the roofline. Links are plain ink with an underline.
   Spacing is an 8-point scale; type is a 1.25 scale on a 16px body. */
:root {
  --bg: #0a0a0b; --raise: #121214; --raise-2: #18181b; --track: #222226; --line: #27272a;
  --ink: #f4f4f5; --ink-2: #d4d4d8; --soft: #a1a1aa; --faint: #71717a;
  --green: #84cc16; --green-dim: #3f6212; --hot: #f59e0b; --roof: #f472b6;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --t-xs: 12px; --t-sm: 14px; --t-md: 16px; --t-lg: 20px; --t-xl: 25px; --t-2xl: 31px; --t-3xl: 39px; --t-4xl: 49px;
  --r: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--s5); }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--t-md)/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; overflow-x: hidden; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---- frame */
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.top a { text-decoration: none; }
.brand { font-weight: 700; font-size: var(--t-md); }
.logo { color: var(--green); letter-spacing: -2px; font-size: var(--t-xs); }
.tld { color: var(--soft); font-weight: 400; }
.top nav { display: flex; gap: var(--s1); font-size: var(--t-sm); }
.top nav a { color: var(--soft); padding: var(--s2) var(--s3); border-radius: 6px; }
.top nav a:hover { color: var(--ink); background: var(--raise); }
main { max-width: 1200px; margin: 0 auto; padding: var(--s5) var(--s4) var(--s8); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0; margin: 0 0 var(--s5); font-size: var(--t-sm); color: var(--soft); }
.crumbs li + li::before { content: "/"; margin-right: var(--s2); color: var(--faint); }
.crumbs a { color: var(--soft); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.foot { border-top: 1px solid var(--line); padding: var(--s7) var(--s4); color: var(--soft); font-size: var(--t-sm); }
.foot-cols { max-width: 1200px; margin: 0 auto var(--s5); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--s5); }
.foot h2 { font-size: var(--t-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin-bottom: var(--s3); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.foot a { color: var(--soft); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot > p { max-width: 1200px; margin: 0 auto; }

/* ---- home hero */
.hero { padding: var(--s6) 0 var(--s6); max-width: 760px; }
.hero h1 { font-size: clamp(var(--t-2xl), 5.5vw, var(--t-4xl)); font-weight: 800; letter-spacing: -0.025em; }
.hero p { margin-top: var(--s4); font-size: var(--t-lg); color: var(--soft); line-height: 1.5; }
.term { color: var(--roof); text-decoration-style: dotted; text-decoration-color: var(--roof); }

/* ---- picker */
.picker { display: grid; gap: var(--s5); padding-bottom: var(--s6); border-bottom: 1px solid var(--line); }
.gpus { display: flex; gap: var(--s5); flex-wrap: wrap; }
.group { display: grid; gap: var(--s2); }
.group-label, .pick-title, .rail-kicker { font-size: var(--t-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); font-weight: 600; }
.pick-title { margin-bottom: var(--s3); }
.tabs { display: flex; flex-wrap: wrap; gap: var(--s1); padding: var(--s1); border-radius: var(--r); background: var(--raise); }
.tab { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4); border-radius: 7px; color: var(--soft); font-size: var(--t-sm); font-weight: 600; text-decoration: none; }
.tab:hover { color: var(--ink); background: var(--raise-2); }
.tab.on { background: var(--green); color: #0a0a0b; }
.tabs.small { display: inline-flex; margin-bottom: var(--s4); }
.cards, .chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.card, .chip { display: flex; flex-direction: column; gap: 2px; min-height: 48px; padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--raise); border: 1px solid transparent; text-decoration: none; }
.card { min-width: 200px; }
.card:hover, .chip:hover { background: var(--raise-2); }
.card b, .chip b { font-size: var(--t-md); }
.chip b { font-family: var(--mono); font-size: var(--t-sm); }
.card small, .chip span { color: var(--soft); font-size: var(--t-xs); }
.chip em { font-style: normal; color: var(--green); font-family: var(--mono); font-size: var(--t-xs); }
.card.on, .chip.on { border-color: var(--green); background: rgba(132, 204, 22, .06); }

/* ---- result: content left, summary rail right */
.result { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s6); margin-top: var(--s6); align-items: start; }
.result-main { min-width: 0; display: grid; gap: var(--s7); }
.result > .sel-head { grid-column: 1 / -1; }
.hidden { display: none; }
.sel-title { font-size: clamp(var(--t-xl), 3.6vw, var(--t-3xl)); font-weight: 800; overflow-wrap: anywhere; }
.sel-title .q { font-family: var(--mono); color: var(--green); font-weight: 500; font-size: .62em; }
.weights { margin-top: var(--s2); color: var(--soft); font-family: var(--mono); font-size: var(--t-xs); }
.note { margin-top: var(--s3); color: var(--hot); font-size: var(--t-sm); }
.sect-title { font-size: var(--t-xl); font-weight: 700; margin-bottom: var(--s4); }
.rail { position: sticky; top: var(--s5); display: grid; gap: var(--s4); }
.rail-card { background: var(--raise); border-radius: var(--r); padding: var(--s5); display: grid; gap: var(--s3); }
.rail-big { font-family: var(--mono); font-size: var(--t-3xl); font-weight: 700; color: var(--green); line-height: 1; }
.rail-big small, .big small { font-size: var(--t-sm); color: var(--soft); font-weight: 400; }
.rail-roof { font-size: var(--t-sm); color: var(--soft); }
.hf { display: grid; gap: 2px; margin-top: var(--s2); padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--green); color: #0a0a0b; text-decoration: none; }
.hf span { font-weight: 800; font-size: var(--t-sm); }
.hf b { font-family: var(--mono); font-size: var(--t-xs); overflow-wrap: anywhere; font-weight: 600; }
.hf small { font-family: var(--mono); font-size: 11px; opacity: .75; }
.hf:hover { filter: brightness(1.08); }
.jump { display: grid; gap: 2px; font-size: var(--t-sm); }
.jump a { color: var(--soft); text-decoration: none; padding: var(--s2) var(--s3); border-radius: 6px; }
.jump a:hover { color: var(--ink); background: var(--raise); }

/* ---- engine cards */
.engines { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: var(--s4); }
.engine { background: var(--raise); border-radius: var(--r); padding: var(--s5); display: grid; gap: var(--s3); min-width: 0; align-content: start; }
.eng-name { font-size: var(--t-md); display: flex; gap: var(--s2); align-items: baseline; flex-wrap: wrap; }
.eng-name small { color: var(--faint); font-family: var(--mono); font-size: var(--t-xs); font-weight: 400; }
.big { font-family: var(--mono); font-size: var(--t-3xl); font-weight: 700; color: var(--green); line-height: 1; }
.roof-track { position: relative; height: 10px; background: var(--track); border-radius: 999px; overflow: hidden; box-shadow: inset -3px 0 0 var(--roof); }
.roof-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--green-dim), var(--green)); border-radius: 999px; }
.roof-words { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s2); font-size: var(--t-xs); color: var(--soft); }
.roof-words span:last-child { color: var(--roof); }
.kv { margin: 0; display: grid; gap: var(--s1); }
.kv div { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--t-sm); }
.kv dt { color: var(--soft); }
.kv dd { margin: 0; font-family: var(--mono); text-align: right; overflow-wrap: anywhere; }
details > summary { cursor: pointer; color: var(--soft); font-size: var(--t-sm); min-height: 32px; display: flex; align-items: center; }
details > summary:hover { color: var(--ink); }
details.more { border-top: 1px solid var(--line); padding-top: var(--s2); }
details.more .kv { margin-top: var(--s2); }
code.setup { display: block; margin-top: var(--s3); font-family: var(--mono); font-size: 11.5px; color: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- bars (context, roles, kernels, compare) */
.track { position: relative; height: 12px; background: var(--track); border-radius: 999px; display: block; }
.fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--green-dim), var(--green)); border-radius: 999px; }
.limit { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--roof); border-radius: 2px; }
.val { font-family: var(--mono); font-size: var(--t-xs); text-align: right; white-space: nowrap; }
.val em { font-style: normal; color: var(--soft); }
.ctx { margin: 0; display: grid; gap: var(--s4); }
.ctx-row { display: grid; grid-template-columns: 100px 1fr; gap: var(--s4); align-items: center; min-width: 0; }
.ctx-label { font-family: var(--mono); font-size: var(--t-sm); font-weight: 700; }
.ctx-bars { min-width: 0; display: grid; gap: var(--s2); }
.ctx-bar { display: grid; grid-template-columns: 160px 1fr 150px; gap: var(--s3); align-items: center; min-width: 0; }
.ctx-eng { font-size: var(--t-sm); color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
figcaption, .small { color: var(--soft); font-size: var(--t-xs); margin-top: var(--s3); }
.compare { display: grid; gap: var(--s2); }
.cmp { display: grid; grid-template-columns: 200px 1fr 150px; gap: var(--s3); align-items: center; padding: var(--s2) var(--s3); border-radius: 8px; text-decoration: none; }
.cmp:hover { background: var(--raise); }
.cmp.here { background: var(--raise); box-shadow: inset 3px 0 0 var(--green); }
.cmp-gpu { display: flex; gap: var(--s2); align-items: baseline; font-weight: 600; font-size: var(--t-sm); }
.cmp-gpu small { color: var(--faint); font-weight: 400; font-size: var(--t-xs); }

/* ---- machine facts and breakdown */
.facts, .summary { display: grid; gap: 1px; margin: 0; background: var(--line); border-radius: var(--r); overflow: hidden; }
.facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts .wide { grid-column: 1 / -1; }
.summary { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.facts div, .summary div { background: var(--raise); padding: var(--s3) var(--s4); min-width: 0; }
.facts dt, .summary dt { font-size: 11px; color: var(--soft); text-transform: uppercase; letter-spacing: .08em; }
.facts dd { margin: 2px 0 0; font-family: var(--mono); font-size: var(--t-sm); overflow-wrap: anywhere; }
.summary dd { margin: 2px 0 0; font-family: var(--mono); font-size: var(--t-lg); color: var(--green); }
.summary dd.hot { color: var(--hot); }
.notes { color: var(--soft); font-size: var(--t-sm); margin: var(--s3) 0 0; padding-left: var(--s5); }
.breakdown { display: grid; gap: var(--s2); }
.finding { margin-top: var(--s3); padding: var(--s3) var(--s4); border-left: 3px solid var(--hot); background: rgba(245, 158, 11, .07); border-radius: 0 8px 8px 0; font-size: var(--t-sm); }
.breakdown h3 { margin-top: var(--s5); margin-bottom: var(--s2); font-size: var(--t-md); display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: baseline; }
.breakdown h3 small { color: var(--soft); font-weight: 400; font-size: var(--t-xs); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin: 0 var(--s1) 0 var(--s2); }
.key.floor { background: var(--green); }
.key.lost { background: var(--hot); }
.bar { display: grid; grid-template-columns: 220px 1fr 160px; gap: var(--s3); align-items: center; min-width: 0; }
.bar .label { font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .label.mono { font-family: var(--mono); font-size: var(--t-xs); }
.bar.other .label { color: var(--soft); }
.fill.lost { background: var(--hot); }
.fill.floor { background: var(--green); }
details.kernels { margin-top: var(--s4); }
details.kernels > summary { color: var(--ink); font-weight: 700; font-size: var(--t-md); }
.none { color: var(--soft); font-size: var(--t-sm); }
.runid { color: var(--faint); font-size: var(--t-xs); margin-top: var(--s4); }

/* ---- pages and guides */
.page { max-width: 800px; display: grid; gap: var(--s4); }
.page h1 { font-size: clamp(var(--t-2xl), 5vw, var(--t-3xl)); font-weight: 800; }
.page h2 { font-size: var(--t-xl); margin-top: var(--s6); }
.answer { font-size: var(--t-lg); color: var(--ink-2); line-height: 1.5; }
.prose > div { display: grid; gap: var(--s4); }
.prose p, .prose li { color: var(--ink-2); max-width: 68ch; }
.prose ul { margin: 0; padding-left: var(--s5); display: grid; gap: var(--s2); }
.prose strong { color: var(--ink); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--raise); padding: 1px 6px; border-radius: 4px; }
.table-wrap { overflow: auto; max-height: 80vh; border-radius: var(--r); background: var(--raise); }
table { border-collapse: collapse; width: 100%; font-size: var(--t-sm); }
th, td { padding: var(--s3) var(--s4); text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { position: sticky; top: 0; z-index: 1; font-size: var(--t-xs); color: var(--soft); font-weight: 600; background: var(--raise-2); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--raise-2); }
td.num, th.num { text-align: right; font-family: var(--mono); }
td.strong, td.strong a { color: var(--green); font-weight: 700; }
.prose table { background: var(--raise); border-radius: var(--r); display: block; overflow-x: auto; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s5); border-radius: var(--r); background: var(--green); color: #0a0a0b; font-weight: 700; text-decoration: none; justify-self: start; }
.btn:hover { filter: brightness(1.08); }
.links { padding-left: var(--s5); }
.guide-list { list-style: none; padding: 0; display: grid; gap: var(--s3); }
.guide-list a { display: grid; gap: var(--s1); padding: var(--s4) var(--s5); border-radius: var(--r); background: var(--raise); text-decoration: none; }
.guide-list a:hover { background: var(--raise-2); }
.guide-list b { font-size: var(--t-lg); }
.guide-list span { color: var(--soft); font-size: var(--t-sm); }
.next { margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid var(--line); }
.next h2 { font-size: var(--t-md); margin-bottom: var(--s3); }
.next ul { padding-left: var(--s5); display: grid; gap: var(--s2); }

/* ---- narrow screens: the rail stacks on top, the jump links become a row */
@media (max-width: 960px) {
  .result { grid-template-columns: 1fr; }
  .rail { position: static; }
  .jump { display: flex; overflow-x: auto; gap: var(--s1); position: sticky; top: 0; z-index: 2; background: var(--bg); padding: var(--s2) 0; }
  .jump a { white-space: nowrap; background: var(--raise); }
}
@media (max-width: 640px) {
  .ctx-row { grid-template-columns: 1fr; gap: var(--s2); }
  .ctx-bar, .bar, .cmp { grid-template-columns: 1fr auto; gap: var(--s1) var(--s3); }
  .ctx-bar .track, .bar .track, .cmp .track { grid-column: 1 / -1; grid-row: 2; }
  .card { min-width: 0; flex: 1 1 100%; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: var(--s4) 0 var(--s5); }
}
