/* The setup-first app. System fonts only: the page asks nothing of any server
   but this one. */
:root {
  --ground: #F4F5F7; --surface: #FFFFFF; --ink: #111827; --ink2: #374151; --muted: #4B5563;
  --line: #E2E5EA; --line2: #D5D9E0; --accent: #1F4FD8; --accent-soft: #E8EEFF; --accent-ink: #163BA6;
  --warn-bg: #FFF7EC; --warn-line: #F3D9B5; --warn-ink: #5C3300; --ok-bg: #EEF8F1; --ok-ink: #1C5B33; --ok: #23A55A;
  --dark: #16191F; --dark2: #2A2F37; --fault: #B42328;
  --head: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.5 var(--body); }
a { color: var(--accent); } a:hover { color: var(--accent-ink); }
button, input, select { font: inherit; color: inherit; }
h1, h2 { font-family: var(--head); letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
h2 { font-size: 24px; line-height: 1.2; }
h2 small { font-family: var(--body); font-size: 14px; font-weight: 400; letter-spacing: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-top: 32px; padding-bottom: 64px; }
.muted { color: var(--muted); } .small { font-size: 14px; } .tiny { font-size: 12px; }
.lead { font-size: 17px; color: var(--muted); margin: 8px 0 0; max-width: 680px; }
.eyebrow, .label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.eyebrow { letter-spacing: .06em; text-transform: uppercase; }
.label { margin-bottom: 8px; }

/* header */
header { background: var(--surface); border-bottom: 1px solid var(--line); }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 18px var(--head); color: var(--ink); text-decoration: none; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 6px; }
.logo i { border-radius: 2px; background: #fff; } .logo i:nth-child(2), .logo i:nth-child(3) { background: #4C7DFF; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; flex: 1 1 auto; }
.steps li { border-radius: 999px; }
.steps a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.steps a:hover { background: #F1F2F4; color: var(--ink); }
.steps li.now a { background: var(--ink); color: #fff; font-weight: 600; }
.steps li.done a { background: var(--ok-bg); color: var(--ok-ink); }
.steps li.done a:hover { background: #DFF2E6; }
.top nav { flex: 1 1 auto; }
.headlink { font-size: 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 14px; background: #F1F2F4; color: var(--ink2); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink); border: 1px solid #CFE8D6; }
.chip.warn { background: var(--warn-bg); color: #7A4300; border: 1px solid var(--warn-line); }
.chip.blue { background: var(--accent-soft); color: var(--accent-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* the last thing that happened: framed like .notice, so the two read as one family */
.status { margin: 0 0 20px; padding: 12px 14px; border-radius: 12px; background: var(--ok-bg); border: 1px solid #B5DEC1; color: var(--ok-ink); }
.status.fault { background: #FDECEC; border-color: #EFB4AE; color: var(--fault); }
.notice { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); }

/* building blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.card.dark { background: var(--dark); border-color: var(--dark); color: #fff; }
.card.dashed { background: transparent; border-style: dashed; border-color: #C9CED6; }
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-top: 24px; }
.split > :first-child { flex: 999 1 560px; min-width: 0; }
.split > .panel { flex: 1 1 340px; min-width: 0; }
.split.wide-panel > :first-child { flex-basis: 420px; } .split.wide-panel > .panel { flex-basis: 480px; }
.panel { display: flex; flex-direction: column; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.row-between { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.grow { flex: 1 1 auto; min-width: 0; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.narrow { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.center { align-items: center; text-align: center; }

button, .button { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surface); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); }
button:disabled { opacity: .5; cursor: default; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.primary:hover { background: var(--accent-ink); color: #fff; }
.big { min-height: 52px; padding: 0 24px; border-radius: 12px; font-size: 16px; }
.link { border: 0; background: none; padding: 0 2px; min-height: 32px; color: var(--accent); justify-content: flex-start; }
.link.sel { font-weight: 700; text-decoration: underline; }
:focus-visible { outline: 3px solid #9DB7FF; outline-offset: 2px; }

.seg { display: inline-flex; gap: 4px; padding: 4px; background: #E7E9ED; border-radius: 14px; }
.seg > * { border: 0; background: transparent; border-radius: 10px; min-height: 48px; padding: 4px 16px; display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center; text-decoration: none; color: var(--ink); cursor: pointer; }
.seg > .on { background: var(--surface); box-shadow: 0 1px 2px rgba(17,24,39,.12); }
.seg small { font-size: 12px; color: var(--muted); }
.seg.tabs { display: flex; } .seg.tabs > * { flex: 1; align-items: center; min-height: 40px; font-weight: 600; }

/* gate */
.gate { max-width: 720px; display: flex; flex-direction: column; gap: 20px; }
.card.note { padding: 16px 18px; font-size: 15px; }

/* choose */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.setup { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 12px; text-align: left; min-height: 210px; padding: 22px; border: 2px solid var(--line); border-radius: 16px; }
.setup.sel { border-color: var(--accent); }
.icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.icon.media { background: #E8EEFF; color: #1F4FD8; } .icon.robot { background: #FFF0E5; color: #B4480B; }
.icon.sim { background: #E9F6EE; color: #1C6B3A; } .icon.stick { background: #F1ECFE; color: #5B3CC4; }
.setup-name { font: 600 22px var(--head); } .setup-blurb { color: var(--muted); font-size: 15px; } .setup-where { margin-top: auto; font-size: 13px; color: var(--muted); }
.panel p { margin: 0; }

/* the board */
.stage { display: flex; flex-direction: column; gap: 16px; }
.board { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.tile { background: var(--dark); border-radius: 18px; padding: 14px 16px 16px; color: #E5E7EB; display: flex; flex-direction: column; gap: 10px; }
.tile-name { font-size: 12px; font-weight: 600; color: #C3C8D0; }
.keys { display: grid; gap: 10px; }
.key { position: relative; width: 92px; height: 92px; padding: 8px; border-radius: 12px; background: var(--dark2); border: 3px solid var(--dark2); color: #fff;
  flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; line-height: 1.2; text-align: center; }
.keys.round .key { border-radius: 50%; }
.key .led { width: 24px; height: 5px; border-radius: 3px; background: var(--led, #3A3F47); }
.key.sel { border-color: #4C7DFF; box-shadow: 0 0 0 5px rgba(76,125,255,.25); }
.key.down { background: #3A4250; }
.knobs { display: flex; gap: 12px; }
.knob { width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #5A616C, #2A2F37 70%); border: 3px solid #3A3F47; color: #fff; font-size: 13px; font-weight: 600; }
.knob.sel { border-color: #4C7DFF; }
.tile .tiny { color: #C3C8D0; margin: 0; } .tile .link { color: #9DB7FF; }

.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice { justify-content: flex-start; min-height: 52px; border: 2px solid var(--line); text-align: left; }
.choice.sel { border-color: var(--accent); background: var(--accent-soft); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line2); }
.swatch.sel { box-shadow: 0 0 0 3px var(--ink); }
.swatch.off { width: auto; border-radius: 20px; padding: 0 12px; font-size: 13px; }
.try { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--ground); font-size: 14px; color: var(--ink2); }
.record { display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field input { min-height: 44px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 10px; font-family: var(--mono); }

/* robot */
.progress { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 18px; margin-top: 24px; }
.bar { flex: 1 1 200px; height: 8px; border-radius: 4px; background: #E7E9ED; overflow: hidden; }
.bar i { display: block; height: 8px; background: var(--ok); }
.pad { position: relative; width: 100%; max-width: 500px; aspect-ratio: 2 / 1; background: var(--ground); border-radius: 24% 24% 18% 18% / 48% 48% 36% 36%; }
.padbtn { position: absolute; min-height: 0; padding: 0; border: 2px solid #C9CED6; font-size: 12px; font-weight: 600; }
.padbtn.r { border-radius: 8px; } .padbtn.p { border-radius: 15px; } .padbtn.c { border-radius: 50%; }
.padbtn.used, .numgrid .used { background: #DADDE2; }
.padbtn.sel, .numgrid .sel { background: var(--accent); border-color: var(--accent); color: #fff; }
.numgrid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.numgrid button { padding: 0; font-weight: 600; }
.code { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--ink); color: #AEB4BE; font-size: 13px; }
.code code { font: 15px var(--mono); color: #fff; }

/* sim */
.list { padding: 0; overflow: hidden; }
.list-head { display: flex; justify-content: space-between; gap: 8px; padding: 14px 22px; border-bottom: 1px solid var(--line); background: #FAFBFC; }
.list-row { display: flex; align-items: center; gap: 16px; padding: 12px 22px; border-bottom: 1px solid #EEF0F3; flex-wrap: wrap; }
.num { width: 44px; height: 44px; border-radius: 10px; background: var(--dark); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 700 17px var(--head); }
.switch { gap: 10px; }
.switch i { width: 40px; height: 24px; border-radius: 12px; background: #C9CED6; position: relative; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked="true"] i { background: var(--accent); } .switch[aria-checked="true"] i::after { left: 19px; }
.lamps { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; margin: 14px 0; }
.lamps span { height: 26px; border-radius: 6px; background: #23272E; color: #9CA3AF; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.lamps .mine { background: #3A404A; color: #fff; } .lamps .on { background: #34D17A; color: #0B2915; }
.livechip { font-size: 13px; color: #9FE6B8; }

/* stick */
.stickview { position: relative; width: 260px; height: 260px; margin: 0 auto; border-radius: 50%; background: var(--ground); border: 2px solid var(--line2); }
.stickview::before, .stickview::after { content: ""; position: absolute; background: var(--line); }
.stickview::before { left: 50%; top: 0; bottom: 0; width: 1px; } .stickview::after { top: 50%; left: 0; right: 0; height: 1px; }
.stickview .dot { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; z-index: 2; }
.stickview .raw { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #9CA3AF; z-index: 1; }
.stickview .dz { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(240,122,26,.15); border: 1.5px dashed #C25E0C; }
.calrow { display: flex; align-items: center; gap: 10px; font-size: 14px; } .calrow > span:first-child { width: 44px; }
.calrow .bar i { background: var(--accent); }

/* save */
.tick { width: 72px; height: 72px; border-radius: 50%; background: var(--ok); }

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .key { width: 72px; height: 72px; font-size: 12px; }
  .choices { grid-template-columns: 1fr; }
}

/* extras */
nav.extras { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 24px; }
nav.extras a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; }
nav.extras a.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
nav.extras a.skip { margin-left: auto; border: 0; background: none; color: var(--accent); }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 24px; }
.jobs { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.jobs li.now { font-weight: 600; } .jobs li.now .muted { color: #B4480B; }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.field select { min-height: 44px; border: 1px solid var(--line2); border-radius: 10px; padding: 0 10px; background: var(--surface); }
.job { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.keychip { font-size: 13px; padding: 4px 10px; border-radius: 8px; background: var(--dark); color: #fff; }
.sentence { margin: 0; font-size: 16px; line-height: 2; color: var(--ink2); }
.sentence code { font: 13px var(--mono); background: #F1F2F4; padding: 2px 6px; border-radius: 4px; }
.var { padding: 2px 8px; border-radius: 6px; background: #F1ECFE; color: #4B2BA8; font-weight: 600; }
input.inline { width: 4.2em; min-height: 34px; padding: 0 6px; border: 1px solid #B8C8F5; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; text-align: center; }
.swatchdot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; box-shadow: 0 0 0 1px var(--line2); }
.panelview { background: #05070A; border: 10px solid #1D2128; border-radius: 10px; padding: 8px; display: flex; flex-direction: column; font: 700 15px/1.35 var(--mono); margin: 8px 0 12px; overflow-x: auto; }
.prow { white-space: pre; } .prow.tall { font-size: 22px; line-height: 1.2; }
.rows { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.rowedit { min-height: 36px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 8px; font: 14px var(--mono); }
.chips .chip { border: 0; min-height: 36px; cursor: pointer; font-weight: 600; }
.counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 14px 0; }
.counts > div { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: #23272E; border-radius: 10px; padding: 6px; }
.counts span { display: flex; flex-direction: column; align-items: center; } .counts b { font: 700 22px var(--head); } .counts small { color: #C3C8D0; font-size: 12px; }
.counts button { min-height: 40px; min-width: 40px; padding: 0; border: 0; background: #3A404A; color: #fff; font-size: 18px; }
button.ghost { background: transparent; border-color: #3A404A; color: #E5E7EB; width: 100%; }
.slots { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.slot { position: relative; aspect-ratio: 5 / 4; min-height: 0; padding: 0; border-radius: 8px; border: 3px solid transparent; background: #2A2F37; color: #fff; overflow: hidden; }
.slot.empty { background: #FAFBFC; border: 1.5px dashed #C9CED6; color: var(--muted); }
.slot.sel { border: 3px solid var(--ink); }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.slot .n { position: absolute; left: 4px; top: 1px; font-size: 11px; font-weight: 600; text-shadow: 0 0 3px rgba(0,0,0,.6); }
.slot.empty .n { text-shadow: none; }
.slot .fmt { font-size: 11px; color: #C3C8D0; }
.slot .code { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; background: rgba(31,79,216,.85); color: #fff; }
.glass { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 360px; align-self: center; border: 10px solid #1D2128; border-radius: 10px; background: #000; overflow: hidden; }
.glass img, canvas.glass { width: 100%; image-rendering: pixelated; }
canvas.glass { display: block; height: auto; margin: 8px auto 6px; }
.facts2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .facts2 > div { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; background: var(--ground); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.danger { color: var(--fault); border-color: #F2C4C5; }
.drop { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; min-height: 64px; padding: 10px; border: 1.5px dashed #C9CED6; border-radius: 12px; background: #FAFBFC; cursor: pointer; text-align: center; }
.store { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; background: #EEF4FF; color: var(--accent-ink); }
.store .bar i { background: var(--accent); }
@media (max-width: 600px) { .slots { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* scenes */
.strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; margin-top: 20px; }
.scene { flex: none; width: 200px; min-height: 150px; padding: 12px; border: 2px solid var(--line); border-radius: 16px; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; text-align: left; }
.scene.sel { border-color: var(--accent); }
.scene.new { width: 160px; border-style: dashed; color: var(--accent); font-weight: 600; justify-content: center; align-items: center; gap: 4px; }
.scene .mini { height: 70px; border-radius: 8px; background: #05070A; border: 4px solid #1D2128; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.scene .mini img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.minitext { font: 700 14px var(--mono); color: #E6F1FF; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.minitext.muted { color: #9CA3AF; font-weight: 500; }
.scene .dots { display: flex; gap: 4px; min-height: 10px; } .scene .dots i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line2); }
.small-seg > * { min-height: 36px; padding: 2px 12px; font-size: 14px; }
.slots.pick { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.rowline { display: flex; gap: 6px; } .rowline .rowedit { flex: 1; min-width: 0; }
.rowline select { border: 1px solid var(--line2); border-radius: 8px; background: var(--surface); padding: 0 6px; }
.code code + code { margin-top: -2px; }

/* tile names and the full colour picker */
.tile-name { min-height: 28px; padding: 2px 6px; margin: -2px -6px 0; border: 0; border-radius: 6px; background: transparent; color: #C3C8D0; font-size: 12px; font-weight: 600; justify-content: flex-start; gap: 6px; }
.tile-name:hover { background: #2A2F37; color: #fff; } .tile-name .pen { opacity: .5; }
.tile-name-edit { min-height: 30px; padding: 0 8px; border: 1px solid #4C7DFF; border-radius: 6px; background: #0F1115; color: #fff; font-size: 13px; }
.swatches { gap: 8px; } .swatch { width: 34px; height: 34px; min-height: 34px; }
.swatch.pick { position: relative; display: inline-flex; cursor: pointer; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.swatch.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.stack.tight { gap: 10px; }

/* your board */
.headlink.on { font-weight: 700; text-decoration: none; }
.tilerow { align-items: flex-start; gap: 12px 20px; }
.tile-title { min-height: 32px; padding: 0 6px; margin-left: -6px; border: 0; background: none; font: 600 17px var(--head); gap: 6px; }
.tile-title:hover { background: var(--ground); } .tile-title .pen { opacity: .4; font-size: 13px; }
.tile-name-edit { min-height: 32px; padding: 0 8px; border: 1px solid #4C7DFF; border-radius: 6px; font-size: 15px; }
.list-row .tile-name-edit { background: var(--surface); color: var(--ink); }
.good { color: var(--ok-ink); font-weight: 600; } .bad { color: var(--fault); font-weight: 600; }
.narrowf input { width: 6em; min-height: 40px; border: 1px solid var(--line2); border-radius: 8px; padding: 0 8px; }
.field input[type=number] { min-height: 40px; border: 1px solid var(--line2); border-radius: 8px; padding: 0 8px; width: 7em; }
table.facts { border-collapse: collapse; margin: 8px 0 12px; font-size: 14px; } table.facts th { text-align: left; color: var(--muted); font-weight: 500; padding: 4px 16px 4px 0; } table.facts td { padding: 4px 0; }

/* groups, combos, knobs */
.group-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 12px; border-radius: 10px; background: var(--ground); }
.chip .x { min-height: 24px; min-width: 24px; padding: 0; margin-left: 2px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 16px; }
.chip .x:hover { background: var(--line2); color: var(--ink); }
.chip:disabled { opacity: .45; cursor: not-allowed; }
.dirs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.code code { display: block; }

/* firmware */
.fwrow.stale { background: #FFFBF3; }
.fwrow .bar { display: block; margin: 8px 0 4px; max-width: 360px; } .fwrow .bar i { background: var(--accent); }
.fwsteps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.fwsteps li > * { margin-top: 6px; } .fwsteps .button, .fwsteps button { display: flex; width: fit-content; }

/* big panels */
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tile-tool { min-height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: #2A2F37; color: #E5E7EB; font-size: 12px; }
.tile-tool:hover { background: #3A404A; } .tile-tool:disabled { opacity: .4; }
.key.picked { background: var(--accent); border-color: #9DB7FF; }
.key.unset { border-style: dashed; border-color: #F0A54A; } .key.unset .key-label { color: #F5B66B; }
.key.unset.picked .key-label { color: #fff; }
.key.now { border-color: #F07A1A; box-shadow: 0 0 0 5px rgba(240,122,26,.35); }
.key.taught { border-color: var(--ok); }
.panelboard .key { user-select: none; touch-action: none; }
.plan { font-size: 13px; color: var(--ink2); }
.dots7 { display: flex; flex-wrap: wrap; gap: 6px; } .dots7 i { width: 26px; height: 8px; border-radius: 4px; background: var(--line2); } .dots7 i.done { background: var(--ok); } .dots7 i.now { background: #F07A1A; }
.prompt { background: var(--dark); color: #fff; border-color: var(--dark); display: flex; flex-direction: column; gap: 14px; }
.prompt h2 { font-size: 30px; } .prompt .muted { color: #C3C8D0; }

/* counting from nothing */
h3.section { margin: 12px 0 0; font: 600 15px var(--head); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.namef { flex-direction: row; align-items: center; gap: 10px; } .namef input { font: 600 17px var(--mono); width: 9em; }
.countnow { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; } .countnow b { font: 700 20px var(--head); color: var(--ink); }
select.inline { min-height: 34px; padding: 0 6px; border: 1px solid #B8C8F5; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
select.inline.var { background: #F1ECFE; border-color: #D6CAF7; color: #4B2BA8; }
input.colour { width: 40px; height: 30px; padding: 0 2px; border: 1px solid var(--line2); border-radius: 6px; vertical-align: middle; }
.codecard { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.inline-check { display: inline-flex; font-size: 16px; }
.addview { min-height: 56px; color: var(--accent); font-weight: 600; justify-content: flex-start; }
.sentence .x { vertical-align: middle; }
button.x { min-height: 28px; min-width: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; }
button.x:hover { background: var(--line); color: var(--fault); }
.versions { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.version { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--ground); }
.version button, .version .button { min-height: 36px; font-size: 14px; }
.notice.update { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 20px; background: var(--accent-soft); border-color: #C9D7FB; color: var(--accent-ink); }
.notice.update .button { min-height: 40px; }
.lineui { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); flex: none; }
.lineui select { min-height: 34px; border: 1px solid var(--line2); border-radius: 8px; background: var(--surface); padding: 0 4px; font-size: 13px; color: var(--ink); }
.talls { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; }
.rows .rowline { flex-wrap: wrap; }
.rowline .rowedit { flex: 1 1 12em; min-width: 10em; }
.rowline .lineui { margin-bottom: 4px; }

/* Sim rig: the hat and a knob as an axis */
.num.hatnum { background: var(--accent); }
.hatpick select { min-height: 36px; }
.knobrow .knobaxis { flex-basis: 100%; display: grid; gap: 10px; padding-left: 60px; }
.knobrow > .seg { margin-left: 60px; }
.lamps .hat { background: #23272E; color: #5B6270; text-decoration: line-through; }
.hatpad { display: grid; grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(3, 52px); gap: 6px; margin: 14px auto; justify-content: center; }
.hatpad span { border-radius: 10px; background: #23272E; color: #6B7280; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 20px; line-height: 1; }
.hatpad span small { font-size: 11px; margin-top: 2px; }
.hatpad span.mine { background: #3A404A; color: #fff; }
.hatpad span.on { background: #34D17A; color: #0B2915; }
.hatpad i.mid { border-radius: 50%; background: #2C313A; margin: 12px; }
@media (max-width: 640px) { .knobrow .knobaxis { padding-left: 0; } .knobrow > .seg { margin-left: 0; } }

/* Keep score on seven-segment digits and an LED bar */
.segview svg { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
.ledbar { display: flex; gap: 4px; padding: 6px 2px; }
.ledbar i { flex: 1; height: 22px; border-radius: 4px; }
.addview:disabled { opacity: .6; cursor: not-allowed; }
.tilerow .tiletools { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.tilerow .tiletools .grow { min-width: 200px; }
.tilerow .tiletools p { flex-basis: 100%; margin: 0; }
.tilerow .tiletools input[type=range] { width: 100%; }
.narrowin { width: 8em; }
.card > .row-between > .label { flex: 1; min-width: 0; }
.barpick { display: flex; gap: 4px; margin: 8px 0 6px; touch-action: none; }
.barpick button { flex: 1; min-width: 0; height: 30px; padding: 0; border-radius: 5px; border: 2px solid transparent; opacity: .55; cursor: pointer; }
.barpick button.own { opacity: 1; }
.barpick button.sel { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; opacity: 1; }
.rowedit.digits { flex: 0 1 12em; }

/* Check your board */
.knob.seen { border-color: var(--ok); }
.progress.slim { padding: 0; margin: 10px 0; background: none; box-shadow: none; border: 0; }
.tablewrap { overflow-x: auto; }
table.wire { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
table.wire th, table.wire td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid #EEF0F3; vertical-align: top; }
table.wire thead th { color: var(--muted); font-weight: 500; }
table.wire tr.lost th { color: #B42318; }
.holdgrid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; margin: 12px 0; }
.holdgrid button { min-height: 36px; padding: 0; font-variant-numeric: tabular-nums; }
.holdgrid button.on { background: #34D17A; border-color: #34D17A; color: #0B2915; }
.msglog { max-height: 320px; overflow: auto; margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: #0F1216; color: #C9D1D9; font: 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; }
.checkkeys .key.taught { background: #1E4D33; border-color: var(--ok); }
.checkkeys .key.down { background: #34D17A; }
.checkkeys .knob.seen { background: #1E4D33; color: #fff; }

/* MIDI controller */
.icon.midi { background: #FDEBF3; color: #A8235F; }
.big-answer { font: 700 20px var(--head); margin: 4px 0 12px; }
.notename { align-self: flex-end; padding-bottom: 10px; font: 700 18px var(--mono); color: var(--accent-ink); }
.intro .lay { flex: 0 0 auto; }
.gamelink { margin: 4px 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); }
