/* ==========================================================================
   Encoders overview (/encoders/) + 1000T product page (/encoders/1000t/)
   Page-specific styles only; builds on site.css, demos.css and product.css.
   Flat and quiet, like a datasheet: hairlines, plain labels, no glow or float.
   ========================================================================== */

/* ---------- Overview hero: the boards at true relative scale ---------- */
.enc-hero { padding: calc(var(--header-h) + clamp(14px, 2vw, 24px)) 0 clamp(24px, 3.5vw, 40px); }
.enc-hero .crumbs { margin-bottom: 10px; }
.enc-hero__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 40px; align-items: end; margin-bottom: clamp(16px, 2.2vw, 26px); }
.enc-hero h1 { grid-column: 1 / -1; margin-bottom: 0.3em; }
.enc-hero .lead { margin: 0; max-width: 78ch; font-size: var(--fs-md); }
.enc-hero__actions { margin: 0; flex-wrap: nowrap; }
@media (max-width: 860px) {
  .enc-hero__head { grid-template-columns: minmax(0, 1fr); }
  .enc-hero__actions { margin-top: 16px; flex-wrap: wrap; }
}

/* --u is the drawn width of the 4000T; every board is that times its --s, so the boards stay in proportion at any width.
   Desktop: 3.23 = the five boards' --s added up. 188 px = panel padding, borders and the gaps between boards. */
.lineup { --u: min(300px, calc((100vw - 2 * var(--gutter) - 188px) / 3.23)); display: flex; gap: 16px; align-items: stretch; }
.lineup__fam { flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; padding: 14px 24px 16px; background: var(--stage); border: 1px solid var(--line); border-radius: var(--r-lg); }
.lineup__fam--joy { flex-basis: calc(2.31 * var(--u) + 98px); }
.lineup__fam--ball { flex: 1 1 calc(0.92 * var(--u) + 74px); }
.lineup__head { margin-bottom: 14px; }
.lineup__head h2 { margin: 0; font: 600 var(--fs-md)/1.35 var(--font-body); letter-spacing: 0; }
.lineup__head p { margin: 0; font-size: var(--fs-sm); line-height: 1.35; color: var(--text-2); }
.lineup__boards { flex: 1; display: flex; justify-content: space-between; gap: 24px; }
.lu { display: grid; grid-template-rows: 1fr auto auto; width: calc(var(--u) * var(--s)); color: var(--text); }
.lu:hover { color: var(--text); }
.lu__img { display: block; align-self: end; width: calc(var(--u) * var(--s)); }
.lu__img img { width: 100%; height: auto; }
.lu__dim { display: block; width: calc(var(--u) * var(--s)); height: 6px; margin-top: 10px; border: 1px solid var(--line-3); border-top: 0; }
.lu__label { display: flex; flex-direction: column; min-height: 6rem; padding-top: 8px; }
.lu__label strong { font: 600 1.0625rem/1.3 var(--font-body); }
.lu:hover .lu__label strong, .lu:focus-visible .lu__label strong { color: var(--cyan-hi); text-decoration: underline; text-underline-offset: 2px; }
.lu__label small { font-size: var(--fs-xs); line-height: 1.35; color: var(--text-2); }
.lu__label .price { margin-top: auto; padding-top: 6px; }
.lineup__note { margin: 8px 0 0; }
/* The ATLAS labels wrap to three lines in this range: keep the board bottoms level. */
@media (min-width: 1024px) and (max-width: 1240px) { .lu__label { min-height: 6.8rem; } }
@media (max-width: 1023px) {
  .lineup { --u: min(300px, calc((100vw - 2 * var(--gutter) - 98px) / 2.31)); flex-direction: column; }
  .lineup__fam--joy, .lineup__fam--ball { flex: 0 0 auto; }
  .lineup__boards { justify-content: flex-start; gap: 24px; }
}
@media (max-width: 640px) {
  /* Phones: panels run edge to edge so the boards can be as large as possible. 4000T on its own row, then pairs.
     The 2000T and 1000T fill a row (their --s add up to 1.31), which sets the scale for everything. */
  .lineup { --u: min(340px, calc((100vw - 24px - 8px) / 1.31)); margin-inline: calc(-1 * var(--gutter)); }
  .lineup__fam { padding: 12px; border-inline: 0; border-radius: 0; }
  .lineup__boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 8px; }
  .lu { width: auto; }
  .lu--4000t { grid-column: 1 / -1; }
  .lu--4000t .lu__label { min-height: 0; }
  .lu__label { min-height: 5.6rem; }
  .lu--4000t .lu__label .price { margin-top: 0; }
}

/* The five boards at a glance: desktop table, small key/value blocks on a phone. */
.enc-sel { margin-top: 16px; }
.enc-sel table { font-size: var(--fs-sm); }
.enc-sel thead th { position: static; border-bottom: 1px solid var(--line); }
.enc-sel tbody th { font-weight: 600; }
.enc-sel .enc-sel__fam th { padding-block: 6px; background: var(--surface-2); font-weight: 600; font-size: var(--fs-xs); color: var(--text-2); }
.enc-sel td.mono { font-size: var(--fs-sm); color: var(--text); }
.enc-sel td.is-none { color: var(--dim); }
.enc-sel__size { white-space: nowrap; }
@media (max-width: 760px) {
  .enc-sel { overflow: visible; }
  .enc-sel table, .enc-sel tbody { display: block; }
  .enc-sel caption { display: block; }
  .enc-sel thead { display: none; }
  .enc-sel tbody tr { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 4px 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .enc-sel tbody:last-child tr:last-child { border-bottom: 0; }
  .enc-sel .enc-sel__fam { display: block; padding: 0; background: var(--surface-2); }
  .enc-sel .enc-sel__fam th { display: block; padding: 6px 14px; border: 0; }
  .enc-sel tbody th, .enc-sel tbody td { padding: 0; border: 0; min-width: 0; }
  .enc-sel tbody th { grid-column: 1; font-size: 1rem; }
  .enc-sel tbody td { display: flex; flex-direction: column; }
  .enc-sel tbody td::before { content: attr(data-l); font: 400 var(--fs-xs)/1.35 var(--font-body); color: var(--muted); }
  /* Full-width lines read "Label: value". The trackball boards have no player or stick cells, so their terminals get a line too. */
  .enc-sel tbody td.enc-sel__sees, .enc-sel tbody td.enc-sel__ptr, .enc-sel__row--ball td.enc-sel__term { display: block; grid-column: 1 / -1; color: var(--text); font-family: var(--font-body); }
  .enc-sel tbody td.enc-sel__sees::before, .enc-sel tbody td.enc-sel__ptr::before, .enc-sel__row--ball td.enc-sel__term::before { content: attr(data-l) ': '; font-size: var(--fs-sm); }
  .enc-sel tbody td.is-none { display: none; }
  .enc-sel tbody td.enc-sel__size { grid-column: 2 / -1; grid-row: 1; align-items: flex-end; text-align: right; white-space: normal; font-size: var(--fs-xs); }
  .enc-sel tbody td.enc-sel__size::before { content: none; }
}

.enc-common { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 24px; margin: 16px 0 0; }
.enc-common dt { font: 500 var(--fs-xs)/1.4 var(--font-body); color: var(--muted); }
.enc-common dd { margin: 2px 0 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-2); }
@media (max-width: 960px) { .enc-common { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .enc-common { grid-template-columns: minmax(0, 1fr); } }

.enc-sub { margin: clamp(28px, 4vw, 40px) 0 12px; font-size: var(--fs-2xl); }

/* ---------- Comparison table ---------- */
.cmp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.cmp-tools .label { font-size: var(--fs-sm); color: var(--muted); margin-right: 4px; }
/* These are filters, usually all on: a quiet tick instead of five solid cyan chips. */
.cmp-tools .chip { color: var(--muted); }
.cmp-tools .chip[aria-pressed='true'] { color: var(--text); background: var(--surface-3); border-color: var(--line-3); }
.cmp-tools .chip[aria-pressed='true']::before { content: '✓'; margin-right: 2px; color: var(--cyan); }
.cmp-hint { display: none; margin-left: auto; }
.cmp-wrap { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
table.cmp { --cols: 5; min-width: calc(200px + var(--cols) * 168px); table-layout: fixed; }
table.cmp th:first-child { position: sticky; left: 0; z-index: 2; width: 200px; background: var(--surface); white-space: normal; box-shadow: 1px 0 0 var(--line); }
table.cmp thead th { position: static; font: inherit; color: inherit; background: var(--surface-2); vertical-align: top; }
table.cmp thead th.cmp__corner { position: sticky; background: var(--surface-2); }
table.cmp th.cmp__head { text-align: left; padding: 14px; }
.cmp__img { display: grid; place-items: end start; height: 190px; margin-bottom: 12px; }
.cmp__img img { max-height: 190px; max-width: 100%; width: auto; height: auto; }
.cmp__name { display: block; font: 600 1.0625rem/1.25 var(--font-body); color: var(--text); }
.cmp__name:hover { color: var(--cyan-hi); }
.cmp__short { display: block; margin-top: 2px; font: 400 var(--fs-xs)/1.35 var(--font-body); color: var(--text-2); }
table.cmp tbody th { font: 500 var(--fs-sm)/1.4 var(--font-body); color: var(--text); }
table.cmp td { font-size: var(--fs-sm); line-height: 1.5; color: var(--text-2); }
table.cmp td b { color: var(--text); font-weight: 600; }
table.cmp td .num { font: 500 var(--fs-md)/1 var(--font-mono); margin-right: 4px; }
table.cmp .cmp-note { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: var(--fs-xs); line-height: 1.45; color: var(--muted); }
/* Hairline between the joystick encoders and the trackball encoders. */
table.cmp .cmp__buy td { vertical-align: middle; }
table.cmp .cmp__buy td .btn { margin: 0 10px 8px 0; }
table.cmp.hide-4000t [data-col='4000t'], table.cmp.hide-2000t [data-col='2000t'], table.cmp.hide-1000t [data-col='1000t'],
table.cmp.hide-atlas0 [data-col='atlas0'], table.cmp.hide-atlas1 [data-col='atlas1'] { display: none; }
.cmp-fine { margin: 12px 0 0; }
@media (max-width: 1240px) { .cmp-hint { display: inline; } }
@media (max-width: 600px) {
  table.cmp { min-width: calc(118px + var(--cols) * 150px); }
  table.cmp th:first-child { width: 118px; padding-left: 12px; padding-right: 10px; }
  table.cmp td { padding: 10px 12px; }
  .cmp__img { height: 130px; }
  .cmp__img img { max-height: 130px; }
  .cmp-hint { margin-left: 0; width: 100%; }
}

/* ---------- Compatibility + trust ---------- */
.enc-works { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .enc-works { grid-template-columns: minmax(0, 1fr); } }
/* The key column is narrow on a phone; long platform names may wrap. */
@media (max-width: 520px) {
  .enc-works table.spec--kv tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .enc-works table.spec--kv tr:last-child { border-bottom: 0; }
  .enc-works table.spec--kv th, .enc-works table.spec--kv td { display: block; width: auto; padding: 0; border: 0; }
  .enc-works table.spec--kv th { margin-bottom: 2px; color: var(--text); font-weight: 500; }
}

/* ---------- Utility ---------- */
.enc-util { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.enc-util .lead { font-size: var(--fs-md); }
.enc-util__btns { margin-top: 20px; }
.enc-util__fine { margin: 12px 0 0; }
.enc-util__figs { display: grid; gap: 12px; min-width: 0; }
.enc-util__figs .photo { margin: 0; }
.enc-util__banner { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: center; }
.enc-util__banner figcaption { border-top: 0; padding: 10px 14px; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-2); }
.enc-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 32px; margin: clamp(28px, 4vw, 44px) 0 0; }
.enc-feats > div { padding-top: 12px; border-top: 1px solid var(--line); }
.enc-feats dt { margin-bottom: 4px; font-weight: 600; color: var(--text); }
.enc-feats dd { margin: 0; font-size: var(--fs-sm); line-height: 1.55; color: var(--text-2); }
@media (max-width: 960px) {
  .enc-util { grid-template-columns: minmax(0, 1fr); }
  .enc-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) { .enc-feats { grid-template-columns: minmax(0, 1fr); gap: 14px; } }
@media (max-width: 560px) { .enc-util__banner { grid-template-columns: minmax(0, 1fr); } }

/* ---------- How players switch: 2-in-1 button, mode switches, kiosk lock ---------- */
.setup3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.setup { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.setup h3 { margin: 0; font-size: var(--fs-xl); }
.setup p { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }
.setup .link-arrow { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: baseline; gap: 10px; }
.setup .link-arrow::after { margin-left: 0; }
.setup .link-arrow .price { font-size: 1rem; }
.setup__tag { font-size: var(--fs-sm); line-height: 1.3; color: var(--muted); }
.setup__wire { font-size: var(--fs-sm) !important; line-height: 2 !important; }
.setup__locks { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); }
.setup__locks li { padding-left: 12px; border-left: 2px solid var(--line-3); }
.setup__locks b { color: var(--text); font-weight: 600; }
.setup__art { height: 118px; display: grid; place-items: center; padding: 6px; border-radius: var(--r); background: var(--stage); }
.setup__art--lit { background: var(--stage-lit); }
.setup__art img { max-height: 106px; max-width: 100%; width: auto; height: auto; }
.setup .pin { font-size: var(--fs-xs); }
.setup__art--opts { grid-template-columns: auto auto; justify-content: center; gap: 14px; }
.setup__art--opts .ico { width: 32px; height: 32px; color: var(--muted); }
.setup__art--opts span { display: grid; justify-items: start; gap: 6px; }
.split-btn { height: 106px; width: auto; overflow: visible; }
.split-btn text { font: 600 13px var(--font-mono); }
.split-btn__l { fill: var(--cyan); }
.split-btn__r { fill: var(--lime); }
@media (max-width: 960px) { .setup3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Accessory link row ---------- */
.acc-links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.acc-link { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color 0.15s; }
.acc-link:hover { color: var(--text); border-color: var(--line-3); }
.acc-link__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.acc-link__top > .ico { width: 20px; height: 20px; color: var(--muted); }
.acc-link > strong { display: block; font: 600 1rem/1.25 var(--font-body); }
.acc-link > small { display: block; color: var(--text-2); font-size: var(--fs-xs); line-height: 1.4; }
.acc-link .price { font-size: 1rem; white-space: nowrap; }
@media (max-width: 1100px) { .acc-links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .acc-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } .acc-link:last-child { grid-column: 1 / -1; } }
@media (max-width: 380px) { .acc-links { grid-template-columns: 1fr; } }

/* Product cards on these pages: keep every image inside its 4:3 stage (the shared rule lets tall photos grow the card). */
.enc-cards .pcard__media { display: block; }
.enc-cards .pcard__media img { position: absolute; inset: 24px; width: calc(100% - 48px); height: calc(100% - 48px); max-height: none; object-fit: contain; }
/* The wiring kit photo is on black: match its stage so it isn't a black square on a grey one. */
.enc-cards .pcard__media:has(img[src*='wiring-']) { background: #000; }
/* Phones: product cards two-up so the accessory list stays scannable. */
@media (max-width: 600px) {
  .enc-cards.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); --gap: 10px !important; gap: 10px; }
  .enc-cards .pcard__media img { inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); }
  .enc-cards .pcard__body { padding: 12px; gap: 4px; }
  .enc-cards .pcard__title { font-size: 1rem; }
  .enc-cards .pcard__sub { font-size: var(--fs-xs); line-height: 1.4; }
  .enc-cards .pcard .spec-pills { display: none; }
  .enc-cards .pcard__foot { padding-top: 8px; flex-wrap: wrap; gap: 4px; }
  .enc-cards .pcard__foot .price { font-size: 1rem; }
  .enc-cards .pcard__foot .link-arrow { font-size: var(--fs-xs); }
}

/* ==========================================================================
   1000T page
   Decorative glows and gradients are gone. Glows that remain signal a state: a key pressed or a signal travelling.
   ========================================================================== */
/* Stick routing demo */
.rs-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 52px); align-items: center; }
.rs .chip .ico { width: 16px; height: 16px; }
.rs__note { margin-left: auto; }
.rs__body { padding: clamp(10px, 2vw, 22px); }
.rs__svg { display: block; width: 100%; height: auto; overflow: visible; user-select: none; -webkit-user-select: none; touch-action: none; }
.rs__lbl { font: 500 14px var(--font-body); fill: var(--muted); }
.rs__panel { fill: var(--surface-2); stroke: var(--line-2); }
.rs__joy { cursor: grab; outline: none; }
.rs__joy:active { cursor: grabbing; }
.rs__joybase { fill: #0a0f13; stroke: var(--line-3); stroke-width: 2; }
.rs__joy:focus-visible .rs__joybase { stroke: #fff; stroke-width: 3; }
.rs__shaft { fill: #2b3640; }
.rs__ball { transition: cx 0.08s, cy 0.08s; }
.rs__name { font: 600 20px var(--font-body); fill: var(--text); }
.rs__sub { font: 500 14px var(--font-mono); fill: var(--muted); }
.rs__wire { fill: none; stroke-width: 3; stroke-linecap: round; }
.rs__pulse { filter: url(#rsGlow); }
.rs__pad { fill: #11181e; stroke: var(--line-3); stroke-width: 2; }
.rs__o { fill: #1c262e; stroke: var(--line-2); }
.rs__well { fill: #070b0e; stroke: var(--line-3); stroke-width: 2; }
.rs__dot { transition: fill 0.4s; }
.rs__wlbl { font: 600 15px var(--font-mono); text-anchor: middle; transition: fill 0.4s; }
.rs__wsub { font: 500 13px var(--font-mono); fill: var(--muted); text-anchor: middle; }
.rs__padlbl { font: 600 14px var(--font-body); fill: var(--text-2); text-anchor: middle; paint-order: stroke; stroke: #0a0f13; stroke-width: 10px; stroke-linejoin: round; }
@media (max-width: 520px) {
  .rs__lbl { font-size: 20px; }
  .rs__name { font-size: 28px; }
  .rs__sub { font-size: 19px; }
  .rs__padlbl { font-size: 18px; }
  .rs__wlbl { font-size: 21px; }
  .rs__wsub { font-size: 19px; }
}
.rs-text h3 { margin-bottom: 14px; }
.how-box { margin-top: 18px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.how-box .label { font: 500 var(--fs-sm)/1.3 var(--font-body); color: var(--muted); }
.how-box ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 7px; }
.how-box li { position: relative; padding-left: 18px; font-size: 0.9375rem; color: var(--text-2); }
.how-box li::before { content: '›'; position: absolute; left: 2px; color: var(--muted); font-weight: 700; }
@media (max-width: 960px) { .rs-split { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .rs__note { width: 100%; margin-left: 0; } }

/* SHIFT shortcuts demo */
.sh-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.sh__body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 3vw, 30px); align-items: center; }
.sh__panel { position: relative; display: grid; grid-template-columns: repeat(3, 62px); gap: 28px 16px; padding: 18px 18px 30px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line-2); }
.sh__key { --c: var(--cyan); position: relative; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  font: 600 var(--fs-xs) var(--font-mono); color: var(--text-2); background: radial-gradient(circle at 40% 30%, #1e2a33, #0f161c); border: 2px solid color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 6px 0 #05080a; transition: transform 0.08s, box-shadow 0.08s, background 0.2s, color 0.2s; }
.sh__key:active, .sh__key.is-down { transform: translateY(4px); box-shadow: 0 2px 0 #05080a; }
.sh__key.is-flash { animation: keyFlash 1.1s var(--ease); }
@keyframes keyFlash { 0%, 35% { background: var(--c); color: #00141c; box-shadow: 0 2px 0 #05080a, 0 0 26px var(--c); transform: translateY(4px); } }
.sh__key small { position: absolute; bottom: -19px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 500 0.6875rem var(--font-mono); color: var(--muted); }
.sh__key--shift { --c: var(--amber); grid-column: 1 / -1; width: auto; height: 46px; border-radius: var(--r-lg); margin-bottom: -6px; font-size: var(--fs-sm); }
.sh__key--shift[aria-pressed='true'] { background: var(--amber); color: #1a1000; box-shadow: 0 2px 0 #05080a, 0 0 30px rgba(255, 181, 71, 0.7); transform: translateY(3px); }
.sh__ring { position: absolute; inset: -7px; border-radius: 50%; pointer-events: none; background: conic-gradient(var(--cyan) calc(var(--p, 0) * 1%), transparent 0); -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(closest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); opacity: 0; transition: opacity 0.2s; }
.sh__key.is-holding .sh__ring { opacity: 1; }
.sh.is-shift .sh__key small { color: var(--amber); }
.sh__state { display: grid; gap: 8px; }
.sh__line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); background: #04080b; border: 1px solid var(--line-2); font-family: var(--font-mono); }
.sh__line span { font-size: var(--fs-xs); color: var(--muted); }
.sh__line b { font-size: var(--fs-sm); font-weight: 600; color: #7fe3ff; text-align: right; }
.sh__line.is-flash { animation: lineFlash 0.9s var(--ease); }
@keyframes lineFlash { 20% { border-color: var(--cyan); background: rgba(59, 198, 243, 0.12); } }
.sh__line.is-kb b { color: var(--amber); }
@media (max-width: 1100px) { .sh-split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .sh__body { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .sh__state { width: 100%; }
  .sh__panel { grid-template-columns: repeat(3, 58px); gap: 28px 14px; }
  .sh__key { width: 58px; height: 58px; }
  .sh__key.sh__key--shift { width: auto; height: 46px; }
}
.sh-table th { white-space: nowrap; }
.sh-table td .mono { font-size: var(--fs-xs); white-space: nowrap; }
.sh-table td code { white-space: nowrap; }
/* Phones: each shortcut row becomes a small card (mode, then labelled instant / hold / pin). */
@media (max-width: 640px) {
  .sh-split .table-wrap { overflow: visible; border: 0; background: none; box-shadow: none; }
  .sh-table, .sh-table tbody { display: block; width: 100%; min-width: 0; }
  .sh-table thead { display: none; }
  .sh-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; margin-bottom: 10px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
  .sh-table tr > th { grid-column: 1 / -1; padding: 0; border: 0; white-space: normal; font-size: 0.9375rem; background: none; }
  .sh-table tr > td { padding: 0; border: 0; background: none; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .sh-table tr > td::before { content: attr(data-l); font: 400 var(--fs-xs)/1.2 var(--font-body); color: var(--muted); }
  .sh-table td .mono { white-space: normal; }
  .sh-table tbody tr:hover > * { background: none; }
}

/* Pinball nudge demo */
.nd__body { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(12px, 3vw, 28px); padding: clamp(22px, 4vw, 40px) clamp(16px, 3vw, 32px); }
.nd__btn { display: grid; justify-items: center; gap: 4px; width: 92px; padding: 16px 6px; border-radius: var(--r-lg); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); box-shadow: 0 6px 0 #05080a; transition: transform 0.08s, box-shadow 0.08s, border-color 0.2s; }
.nd__btn span { font: 600 var(--fs-sm) var(--font-mono); color: var(--lime); }
.nd__btn small { font-size: var(--fs-xs); color: var(--muted); }
.nd__btn::before { content: ''; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #d6ff9a, var(--lime) 45%, #4e7a12); }
.nd__btn.is-down { transform: translateY(4px); box-shadow: 0 2px 0 #05080a; border-color: var(--lime); }
.nd__btn.is-down::before { box-shadow: 0 0 22px rgba(166, 230, 74, 0.9); }
.nd__pad { display: grid; justify-items: center; gap: 12px; }
.nd__well { position: relative; width: 132px; height: 132px; border-radius: 50%; background: radial-gradient(circle, #0d1419 0 58%, #070b0e 60%); border: 2px solid var(--line-3); }
.nd__well::before, .nd__well::after { content: ''; position: absolute; background: var(--line); }
.nd__well::before { left: 50%; top: 10px; bottom: 10px; width: 1px; }
.nd__well::after { top: 50%; left: 10px; right: 10px; height: 1px; }
.nd__well i { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: var(--cyan); transform: translate(var(--nx, 0px), var(--ny, 0px)); transition: transform 0.06s linear; z-index: 1; }
.nd .demo__caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nd__both { height: 32px; }
@media (max-width: 480px) {
  .nd__body { gap: 10px; padding: 22px 12px; }
  .nd__btn { width: 74px; padding: 12px 4px; }
  .nd__well { width: 104px; height: 104px; }
  .nd__well i { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
}

/* 1000T DongleMaster timeline (reuses the shared .dg__* / .arc-btn / .slot-tile pieces from demos.css) */
.dm1__body { position: relative; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.dm1__ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.dm1__ctl .chip .ico { width: 15px; height: 15px; }
.dm1 .arc-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.dm1 .arc-btn:disabled .arc-cap { filter: grayscale(0.8); }
.dm1 .slot-tile { display: grid; align-content: center; }
.dm1 .dg__cd span:empty::before { content: 'No countdown running'; color: var(--text-2); }
@media (min-width: 861px) { .dm1 .slot-tile { min-height: 150px; } .dm1 .slot-tile .ico { width: 34px; height: 34px; } }
.dm1__hw { display: grid; gap: 10px; }
.dm1__clock { font-variant-numeric: tabular-nums; min-width: 5.5em; text-align: right; }
@media (max-width: 860px) { .dm1__body { grid-template-columns: minmax(0, 1fr); } .dm1__ctl { margin-left: 0; } }
@media (max-width: 600px) { .dm1__clock { display: none; } }
@media (max-width: 520px) { .dm1 .slots-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dm1 .slot-tile { min-height: 80px; } }
.dm1-why { position: relative; padding: clamp(16px, 2.4vw, 24px); border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--surface); }
.dm1-why__img { float: right; width: min(42%, 190px); margin: -6px -6px 10px 16px; }
.dm1-why__img img { width: 100%; height: auto; }
.dm1-why h3 { margin-top: 0; }
.dm1-why p:last-child { margin-bottom: 0; }

/* Turbo · 8-to-6 · Interlock: line the three demos up (titles, intros, demo cards and notes share rows). */
@media (min-width: 961px) {
  #turbo .feature-demos { grid-template-rows: auto auto 1fr auto; row-gap: 0; }
  #turbo .feature-demos > div { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; }
  #turbo .feature-demos .demo { height: 100%; }
}

/* Specs: front / back flip card */
.t1k-specs { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.t1k-flipwrap { display: grid; justify-items: center; gap: 14px; }
.t1k-flip { position: relative; width: min(100%, 340px); aspect-ratio: 642 / 944; padding: 0; border: 0; background: none; cursor: pointer; perspective: 1400px; -webkit-tap-highlight-color: transparent; }
.t1k-flip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 10px; border-radius: var(--r-lg); }
.t1k-flip__inner { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transition: transform 1s var(--ease); }
.t1k-flip[aria-pressed='true'] .t1k-flip__inner { transform: rotateY(180deg); }
.t1k-flip__face { position: absolute; inset: 0; display: block; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.t1k-flip__back { transform: rotateY(180deg); }
.t1k-flip__face img { width: 100%; height: 100%; object-fit: contain; }
.t1k-flip__hint { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.t1k-flip__hint .ico { width: 14px; height: 14px; color: var(--muted); }
@media (max-width: 960px) { .t1k-specs { grid-template-columns: minmax(0, 1fr); } .t1k-flip { width: min(70%, 280px); } }
@media (max-width: 600px) {
  .t1k-specs table.spec tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .t1k-specs table.spec tr:last-child { border-bottom: 0; }
  .t1k-specs table.spec th, .t1k-specs table.spec td { display: block; padding: 0; border: 0; white-space: normal; }
  .t1k-specs table.spec th { margin-bottom: 3px; font-size: var(--fs-sm); color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) { .t1k-flip__inner { transition: none; } }

/* two comparison tables: joystick encoders, then trackball encoders */
.cmp-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: clamp(22px, 3vw, 34px) 0 12px; font-size: var(--fs-xl); }
.cmp-h .muted { font: 400 var(--fs-sm) var(--font-body); }
.cmp-h:first-of-type { margin-top: 0; }
.cmp-wrap .cmp-hint { display: none; }
/* merged cells and the "same on all" group at the bottom of a comparison table */
table.cmp .cmp__group th { padding-top: 18px; font: 600 var(--fs-xs)/1.3 var(--font-body); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
table.cmp td.cmp__span { text-align: center; }
.enc-works--one { display: block; max-width: 760px; }
/* a line between board columns, so merged cells read clearly; the Add row sits under the rows that differ */
table.cmp td + td { border-left: 1px solid var(--line); }
table.cmp .cmp__buy td { border-bottom: 1px solid var(--line-2); }
.cmp-same { margin: 14px 0 0; max-width: 90ch; }
/* and one between the row names and the first board */
table.cmp th[scope="row"] + td, table.cmp thead th.cmp__corner + th { border-left: 1px solid var(--line); }
