/* proautoclicker.org, 4.0.
 *
 * The tokens are the app's own (qml4/Pal4.qml): neutral greys, one accent
 * the visitor picks on the Remote, Inter for words, a mono face for numbers
 * and keys. The accent marks Start, "on" and "running", and little else.
 */

:root {
  --accent: #F5A524;
  --on-accent: #1C1300;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 38%, transparent);

  --ground: #111112;
  --bg: #1A1A1B;
  --bg2: #212122;
  --row: #262627;
  --row-sel: #2F2F31;
  --hi: #343437;
  --hi-hover: #3D3D40;
  --well: #1C1C1D;
  --line: #2A2A2C;
  --line2: #343436;
  --edge: #48484B;
  --text: #EDEDEE;
  --text2: #D2D2D5;
  --muted: #98989D;
  --dim: #6C6C70;
  --danger: #E0483E;

  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius: 14px;
  --fast: 120ms;
  --medium: 220ms;
  color-scheme: dark;
}
:root[data-accent="coral"] { --accent: #FF5D47; --on-accent: #200400; }
:root[data-accent="green"] { --accent: #3ECF7A; --on-accent: #03200F; }
:root[data-accent="bone"]  { --accent: #EEEEEF; --on-accent: #161617; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.9em; height: 1.75em; padding: 0 .45em;
  border: 1px solid var(--edge); border-radius: 6px;
  background: var(--hi); color: var(--text2);
  font: 500 .78em/1 var(--mono);
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.shell { width: min(1180px, 100% - 48px); margin-inline: auto; }
.shell.narrow { width: min(860px, 100% - 48px); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 14px; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

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

.display {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  text-wrap: balance;
}
.hero-h1 { font-size: clamp(2.6rem, 6vw, 4.7rem); letter-spacing: -0.045em; line-height: .98; }
.lede { margin: 18px 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.22rem); line-height: 1.55; max-width: 34em; text-wrap: pretty; }
.fine { margin: 14px 0 0; color: var(--dim); font-size: .95rem; max-width: 34em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px; color: var(--muted);
  font-size: .82rem; font-weight: 500; letter-spacing: .02em;
}
.eyebrow .ver {
  padding: 2px 8px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent);
  font: 600 .78rem/1.4 var(--mono);
}
:lang(zh-Hans) .display, :lang(ja) .display, :lang(ko) .display, :lang(hi) .display, :lang(ar) .display { letter-spacing: 0; line-height: 1.2; }

/* ------------------------------------------------------------- nav */

.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.scroll-rail {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--accent); transform-origin: left; transform: scaleX(0);
}
[dir="rtl"] .scroll-rail { transform-origin: right; }
.nav-row { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand-mark { border-radius: 7px; }
.brand-ver { color: var(--dim); font: 500 .75rem var(--mono); }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 6px 12px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: .9rem;
  transition: color var(--fast), background var(--fast);
}
.nav-links a:hover, .nav-links a.is-current { color: var(--text); background: var(--row); }
nav[aria-label="Primary"] { margin-inline-start: auto; }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.lang-wrap { position: relative; }
.lang-toggle-btn {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 11px; border-radius: 8px;
  background: transparent; border: 1px solid var(--line2); color: var(--muted);
  font-size: .85rem; cursor: pointer;
}
.lang-toggle-btn svg { width: 14px; height: 14px; }
.lang-toggle-btn:hover { color: var(--text); border-color: var(--edge); }
.lang-menu-dropdown {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  min-width: 200px; padding: 6px; border-radius: 12px;
  background: var(--bg2); border: 1px solid var(--line2);
  box-shadow: 0 20px 50px -12px rgb(0 0 0 / .7);
  display: none; z-index: 60;
}
.lang-menu-dropdown.show { display: grid; }
.lang-item { padding: 7px 10px; border-radius: 7px; text-decoration: none; color: var(--text2); font-size: .9rem; }
.lang-item:hover { background: var(--hi); }
.lang-item.selected { color: var(--text); background: var(--row-sel); box-shadow: inset 2px 0 0 var(--accent); }
[dir="rtl"] .lang-item.selected { box-shadow: inset -2px 0 0 var(--accent); }
.btn-store-nav {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 13px; border-radius: 8px;
  background: var(--text); color: var(--ground);
  font-size: .85rem; font-weight: 600; text-decoration: none;
  transition: background var(--fast);
}
.btn-store-nav:hover { background: #fff; }

/* ---------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 20px; border-radius: 11px;
  font-weight: 600; font-size: .98rem; text-decoration: none;
  transition: transform var(--fast), background var(--fast), border-color var(--fast);
}
.btn:active { transform: scale(.98); }
.btn-solid { background: var(--accent); color: var(--on-accent); }
.btn-solid:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn-ghost { border: 1px solid var(--line2); color: var(--text2); }
.btn-ghost:hover { border-color: var(--edge); background: var(--bg2); }

/* ------------------------------------------------------------ hero */

.hero { position: relative; padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin: 18px 0 0; color: var(--dim); font-size: .86rem; }

.hero-stage { position: relative; }
.stage-panel {
  position: relative; overflow: hidden;
  aspect-ratio: 1 / 1; max-height: 640px; width: 100%;
  border-radius: 24px;
  background:
    radial-gradient(60% 60% at 38% 52%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    #141415;
  border: 1px solid var(--line);
}
.rings { position: absolute; inset: -10%; width: 120%; height: 120%; max-width: none; color: var(--accent); opacity: .16; }
.rings circle { stroke-width: 1.2; }
.stage-panel .rings { left: -47%; top: -10%; }
.tally {
  position: absolute; top: 22px; inset-inline-start: 26px;
  color: var(--muted); font-size: 1.35rem; letter-spacing: .02em;
}
.readout {
  position: absolute; bottom: 22px; inset-inline-start: 22px;
  padding: 8px 14px; border-radius: 9px;
  background: var(--bg2); border: 1px solid var(--line2);
  color: var(--muted); font-size: .95rem;
}
.readout b { color: var(--accent); font-weight: 600; }
.target {
  position: absolute; left: 23%; top: 50%; width: 25%; aspect-ratio: 1;
  translate: -50% -50%;
}
.target i {
  position: absolute; inset: 0; border-radius: 26%;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 92%, #fff), var(--accent) 45%, color-mix(in srgb, var(--accent) 70%, #000));
  box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--accent) 45%, transparent), inset 0 -10px 24px rgb(0 0 0 / .18);
  transition: scale 70ms;
}
.target.hit i { scale: .94; }
.target::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; border: 2px solid rgb(255 255 255 / .9);
}
.ripple {
  position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; border: 1.5px solid rgb(255 255 255 / .7); opacity: 0;
}
.target.hit .ripple { animation: ripple 520ms ease-out; }
.target.hit .ripple + .ripple { animation-delay: 120ms; }
@keyframes ripple { from { opacity: .8; scale: 1; } to { opacity: 0; scale: 3.2; } }
.pops { position: absolute; inset: 0; pointer-events: none; }
.pop {
  position: absolute; z-index: 1; color: var(--accent); font: 600 1.4rem var(--mono);
  animation: pop 900ms ease-out forwards;
}
@keyframes pop { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 26px -90px; } }

.try-hint { margin: 14px 0 0; text-align: center; color: var(--dim); font-size: .85rem; }

/* ---------------------------------------------------------- Remote */

.remote {
  --s: 1;
  position: absolute; top: 50%; inset-inline-end: -8px; translate: 0 -50%;
  width: 340px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line2); border-radius: 12px;
  box-shadow: 0 40px 80px -24px rgb(0 0 0 / .85), 0 0 0 1px rgb(0 0 0 / .3);
  font-size: 13px; line-height: 1.3;
  user-select: none; -webkit-user-select: none;
  z-index: 2;
}
[dir="rtl"] .remote { inset-inline-end: auto; right: auto; left: -8px; }
.r-strip { display: flex; align-items: center; gap: 2px; height: 40px; padding: 0 6px 0 8px; }
.r-title { flex: 1; margin-inline-start: 6px; color: var(--muted); font-size: 12px; }
.r-win {
  display: grid; place-items: center; width: 30px; height: 26px; border-radius: 6px;
  background: transparent; border: 0; color: var(--muted); cursor: default;
}
.r-win svg { width: 15px; height: 15px; }
button.r-win { cursor: pointer; }
button.r-win:hover, button.r-win[aria-expanded="true"] { background: var(--hi); color: var(--text); }
.r-win.is-lit { background: var(--hi); color: var(--accent); }

.r-menu {
  position: absolute; top: 38px; left: 8px; z-index: 5; width: 210px;
  padding: 6px; border-radius: 10px;
  background: var(--bg2); border: 1px solid var(--line2);
  box-shadow: 0 18px 40px -10px rgb(0 0 0 / .8);
  display: grid; gap: 1px;
}
.r-menu-h { padding: 6px 8px 4px; color: var(--dim); font-size: 11px; }
.r-menu button {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border: 0; border-radius: 6px; background: transparent;
  text-align: start; font-size: 13px; cursor: pointer;
}
.r-menu button:hover { background: var(--hi); }
.r-menu button i { width: 12px; height: 12px; border-radius: 50%; }
.r-menu [data-accent="amber"] i { background: #F5A524; }
.r-menu [data-accent="coral"] i { background: #FF5D47; }
.r-menu [data-accent="green"] i { background: #3ECF7A; }
.r-menu [data-accent="bone"] i { background: #EEEEEF; }
.r-menu button[aria-checked="true"]::after { content: ""; margin-inline-start: auto; width: 8px; height: 5px; border: solid var(--text); border-width: 0 0 1.6px 1.6px; rotate: -45deg; translate: 0 -2px; }
.r-menu-note { padding: 8px 8px 4px; border-top: 1px solid var(--line2); margin-top: 4px; color: var(--dim); font-size: 11px; line-height: 1.4; }

.r-dial { position: relative; width: 208px; height: 208px; margin: 2px auto 0; touch-action: none; cursor: grab; }
.r-dial.dragging { cursor: grabbing; }
.r-ticks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.r-ticks line { stroke: var(--edge); stroke-linecap: round; }
.r-ticks line.on { stroke: var(--face, var(--accent)); }
.r-ticks circle { fill: var(--text); }
.r-go {
  position: absolute; left: 34px; top: 34px; width: 140px; height: 140px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 50%; border: 2px solid var(--face, var(--accent));
  background: var(--face, var(--accent)); color: var(--ink, var(--on-accent));
  cursor: pointer;
  transition: background var(--medium), color var(--medium), scale var(--fast), border-color var(--medium);
}
.r-go:active { scale: .97; }
.r-go-word { font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.r-go kbd { border: 0; height: 20px; min-width: 26px; font-size: 11px; background: rgb(0 0 0 / .14); color: inherit; }
.remote.running .r-go { background: transparent; color: var(--text); }
.remote.running .r-go kbd { background: var(--hi); }

.r-read { text-align: center; margin-top: 6px; }
.r-big { display: inline-flex; align-items: baseline; gap: 10px; }
.r-big b { font-size: 34px; font-weight: 500; letter-spacing: -.02em; }
.r-big span { color: var(--muted); font-size: 17px; }
.r-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.r-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 14px 18px 0; }
.r-tile {
  display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 10px;
  border: 0; border-radius: 9px; background: var(--row); text-align: start;
}
button.r-tile { cursor: pointer; }
button.r-tile:hover { background: var(--row-sel); }
.r-tile-t { display: grid; min-width: 0; }
.r-tile-t b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-tile-t small { color: var(--muted); font-size: 11.5px; }
.r-mouse svg { width: 30px; height: 30px; flex: none; }
.r-mouse svg path, .r-mouse svg rect { fill: var(--edge); transition: fill var(--fast); }
.r-mouse svg .m-b { fill: var(--hi); }
.r-mouse[data-btn="left"] .m-l, .r-mouse[data-btn="middle"] .m-m, .r-mouse[data-btn="right"] .m-r { fill: var(--accent); }
.r-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--hi); flex: none; }
.r-ico svg { width: 15px; height: 15px; }

.r-trig { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 6px 18px 0; }
.r-t {
  position: relative; display: grid; justify-items: center; gap: 3px;
  padding: 8px 2px 6px; border: 0; border-radius: 9px; background: var(--row);
  color: var(--muted); font-size: 11.5px; cursor: pointer;
}
.r-t svg { width: 16px; height: 16px; }
.r-t:hover { background: var(--row-sel); color: var(--text2); }
.r-t[aria-pressed="true"] { color: var(--text); background: var(--row-sel); }
.r-t[aria-pressed="true"]::after { content: ""; position: absolute; top: 6px; inset-inline-end: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.r-keys { display: flex; align-items: center; gap: 8px; padding: 12px 18px 0; color: var(--muted); }
.r-keys kbd { font-size: 11px; }
.r-keys .dots { letter-spacing: 1px; }
.r-presets { display: flex; gap: 6px; padding: 10px 18px 12px; }
.r-pre {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border-radius: 9px; border: 1px solid var(--edge); background: var(--well); cursor: pointer;
  transition: border-color var(--fast);
}
.r-pre img { width: 22px; height: 22px; }
.r-pre.is-on { border: 2px solid var(--accent); }
.r-pre.is-add { color: var(--muted); cursor: default; font-size: 16px; }
.r-foot {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 10px 0 18px; border-top: 1px solid var(--line2);
  color: var(--muted);
}
.r-foot > span:first-child, .r-foot #r-status-run { flex: 1; }
.remote.running #r-status-run { color: var(--accent); }
.r-count b { color: var(--text); font-weight: 500; font-size: 12px; }
.r-more { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--text2); }
.r-more:hover { background: var(--hi); }
.r-more svg { width: 15px; height: 15px; }
[dir="rtl"] .r-more svg { scale: -1 1; }

/* ---------------------------------------------------------- bands */

.band { padding: clamp(64px, 9vw, 128px) 0; position: relative; }
.band + .band { border-top: 1px solid var(--line); }
.band-head { margin-bottom: clamp(32px, 4vw, 52px); max-width: 760px; }

#trailer { padding-top: 0; border-top: 0; }
.video-frame {
  overflow: hidden; border-radius: 18px; border: 1px solid var(--line2);
  background: #000; box-shadow: 0 40px 100px -40px rgb(0 0 0 / .9);
}
.video-frame video { width: 100%; height: auto; aspect-ratio: 16 / 9; }

/* two windows */
.pair { display: grid; grid-template-columns: minmax(0, 300px) auto minmax(0, 1fr); gap: 28px; align-items: center; }
.pair figure { margin: 0; display: grid; gap: 16px; }
.pair figcaption { display: grid; gap: 4px; color: var(--muted); font-size: .95rem; max-width: 34em; }
.pair figcaption b { color: var(--text); font-weight: 600; font-size: 1.05rem; }
.pair-link { display: flex; align-items: center; gap: 6px; color: var(--dim); }
.pair-link .wire { width: 20px; height: 1px; background: var(--edge); }
.shot-btn {
  display: block; width: 100%; padding: 0; border: 1px solid var(--line2); border-radius: 12px;
  background: var(--bg); overflow: hidden; cursor: zoom-in;
  box-shadow: 0 30px 70px -30px rgb(0 0 0 / .9);
  transition: border-color var(--fast), translate var(--medium);
}
.shot-btn:hover { border-color: var(--edge); translate: 0 -2px; }
.shot-btn img { width: 100%; height: auto; }

/* split sections */
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.split.flip .split-copy { order: 2; }
.stage {
  position: relative; overflow: hidden; min-height: 460px;
  border-radius: 22px; border: 1px solid var(--line); background: #141415;
  display: grid; place-items: center;
}
.stage.wide { min-height: 0; padding: clamp(16px, 3vw, 36px); background: radial-gradient(70% 70% at 50% 40%, var(--accent-soft), transparent 70%), #141415; }
.stage .rings { left: -34%; }
.stage-remote {
  position: absolute; inset-inline-end: 6%; top: 50%; translate: 0 -50%;
  width: min(44%, 255px); height: auto; border-radius: 10px;
  border: 1px solid var(--line2); box-shadow: 0 34px 70px -24px rgb(0 0 0 / .9);
}

/* key list */
.keys { display: grid; gap: 12px; margin: 28px 0 0; }
.keys div { display: flex; align-items: center; gap: 14px; }
.keys dt { display: flex; gap: 4px; min-width: 92px; }
.keys dd { margin: 0; color: var(--muted); font-size: .95rem; }

/* segmented control */
.seg { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 26px; border-radius: 10px; background: var(--row); border: 1px solid var(--line2); }
.seg button {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; border: 0; border-radius: 7px; background: transparent;
  color: var(--muted); font-size: .9rem; font-weight: 500; cursor: pointer;
}
.seg button:hover { color: var(--text); }
.seg button.is-on { background: var(--hi); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / .4); }
.seg .sw { width: 9px; height: 9px; border-radius: 50%; background: #E5484D; }

/* scenes: drawn with CSS, looped */
.scene { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 52%; display: grid; place-items: center; }
.cursor {
  position: absolute; width: 26px; height: 34px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 70'%3E%3Cpath d='M4 3l44 30-19 4 11 24-9 4-11-24-13 13z' fill='%23fff' stroke='%23111' stroke-width='4' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  z-index: 3;
}
.cursor::before {
  content: ""; position: absolute; left: -16px; top: -16px; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid rgb(255 255 255 / .8); opacity: 0;
}
.scene.go .cursor::before { animation: tap 400ms ease-out infinite; }
@keyframes tap { from { opacity: .9; scale: .6; } to { opacity: 0; scale: 2.2; } }

.skills { display: flex; gap: 8px; padding: 10px; border-radius: 16px; background: #1D1D1F; border: 1px solid var(--line2); }
.skills i { width: 46px; height: 46px; border-radius: 12px; background: #2A2A2D; border: 1px solid var(--line2); display: grid; place-items: center; }
.skills .hot { transition: background 300ms, box-shadow 300ms; }
.skills .hot svg { width: 24px; height: 24px; fill: #5A5A5E; transition: fill 300ms; }
.scene[data-scene="colour"].go .hot { background: #E5484D; box-shadow: 0 0 0 2px #FF8A8A inset, 0 0 40px -6px #E5484D; }
.scene[data-scene="colour"].go .hot svg { fill: #FFE7E7; }
.scene[data-scene="colour"] .cursor { left: calc(50% + 22px); top: calc(50% + 2px); }

.water {
  position: relative; width: 74%; aspect-ratio: 1.3; border-radius: 16px; overflow: hidden;
  background: linear-gradient(#1C2228, #121619); border: 1px solid var(--line2);
}
.water::before { content: ""; position: absolute; left: 0; right: 0; top: 34%; height: 1px; background: rgb(255 255 255 / .12); }
.bob { position: absolute; left: 38%; top: 46%; animation: bob 2.4s ease-in-out infinite; }
.bob img { width: 56px; height: 56px; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 26px -10px; } }
.frame {
  position: absolute; left: calc(38% - 12px); top: calc(46% - 12px); width: 80px; height: 80px;
  border: 1.5px dashed rgb(255 255 255 / .5); border-radius: 8px;
  animation: bob 2.4s ease-in-out infinite;
}
.scene.go .frame { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.scene[data-scene="image"] .cursor { left: 50%; top: 56%; animation: bob 2.4s ease-in-out infinite; }

.lobby {
  position: relative; width: 74%; padding: 26px 24px; border-radius: 16px;
  background: #1D1D1F; border: 1px solid var(--line2); display: grid; gap: 12px;
}
.lobby .line { height: 9px; border-radius: 5px; background: #2C2C2F; }
.lobby .line.short { width: 60%; }
.lobby .word {
  justify-self: start; margin-top: 10px; padding: 8px 16px; border-radius: 8px;
  font-size: 1.5rem; font-weight: 800; letter-spacing: .04em;
  color: #2E2E31; background: #242427; transition: color 300ms, background 300ms;
}
.scene.go .word { color: #10140F; background: #3ECF7A; }
.scene[data-scene="text"] .cursor { left: 30%; top: 68%; }

/* sets */
.sets { position: relative; width: 56%; height: 300px; margin-inline-end: auto; margin-inline-start: 6%; }
.set {
  position: absolute; width: 74%; padding: 16px; border-radius: 14px;
  background: #1D1D1F; border: 1px solid var(--line2); text-align: start;
  display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center;
  cursor: pointer; transition: border-color var(--fast), translate var(--medium), background var(--fast);
}
.set:nth-child(1) { left: 0; top: 0; }
.set:nth-child(2) { left: 13%; top: 92px; }
.set:nth-child(3) { left: 26%; top: 184px; }
[dir="rtl"] .set:nth-child(2) { left: auto; right: 13%; }
[dir="rtl"] .set:nth-child(3) { left: auto; right: 26%; }
[dir="rtl"] .set:nth-child(1) { left: auto; right: 0; }
.set img { width: 40px; height: 40px; padding: 6px; border-radius: 9px; background: #2A2A2D; box-sizing: content-box; }
.set span { color: var(--muted); font-size: .85rem; }
.set i { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: #2A2A2D; }
.set i.short { width: 55%; }
.set:hover { translate: 0 -3px; }
.set.is-on { border: 2px solid var(--accent); z-index: 2; background: #202022; }
.set.is-on span { color: var(--accent); }

/* stop */
.screen {
  position: relative; width: 84%; aspect-ratio: 16 / 10; border-radius: 14px;
  background: #19191B; border: 1px solid var(--line2);
}
.screen .runbar { position: absolute; left: 50%; top: 14px; translate: -50% 0; width: 62%; height: auto; border-radius: 10px; box-shadow: 0 16px 30px -10px rgb(0 0 0 / .8); }
.screen .corner {
  position: absolute; right: -1px; bottom: -1px; width: 56px; height: 56px;
  border-right: 2px solid var(--danger); border-bottom: 2px solid var(--danger); border-radius: 0 0 14px 0;
  opacity: .3; animation: corner 3.2s infinite;
}
.screen .dash-path {
  position: absolute; left: 34%; top: 44%; width: 63%; height: 52%;
  border-top: 1.5px dashed var(--edge); transform-origin: left top; rotate: 34deg; opacity: .7;
}
.screen .cursor { left: 34%; top: 44%; animation: dash 3.2s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes dash { 0%, 20% { left: 34%; top: 44%; } 55%, 100% { left: calc(100% - 20px); top: calc(100% - 28px); } }
@keyframes corner { 0%, 50% { opacity: .25; } 56%, 90% { opacity: 1; } 100% { opacity: .25; } }

/* grouped rows, as in the Workshop */
.group { list-style: none; margin: 0; padding: 0; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.row { display: flex; gap: 18px; padding: 18px 22px; align-items: baseline; }
.row + .row { border-top: 1px solid var(--line); }
.row-n { color: var(--dim); font-size: .8rem; flex: none; }
.row-t { display: grid; gap: 3px; }
.row-t b { font-weight: 600; }
.row-t span { color: var(--muted); font-size: .95rem; }

/* the Workshop with search */
.ws {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  min-height: 520px; border-radius: 14px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--line2);
  box-shadow: 0 50px 100px -40px rgb(0 0 0 / .9);
}
.ws-side { display: flex; flex-direction: column; gap: 12px; padding: 16px 10px; background: var(--bg2); border-inline-end: 1px solid var(--line); }
.ws-title { padding: 0 8px; color: var(--muted); font-size: .85rem; }
.ws-search {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px;
  border-radius: 9px; background: var(--row); border: 1px solid transparent;
}
.ws-search:focus-within { border-color: var(--accent-line); }
.ws-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: .92rem; outline: 0; }
.ws-search input::placeholder { color: var(--dim); }
.ws-search input::-webkit-search-cancel-button { display: none; }
.ws-nav { display: grid; gap: 2px; }
.ws-nav hr { border: 0; height: 1px; background: var(--line2); margin: 8px; }
.ws-nav button {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px;
  border: 0; border-radius: 8px; background: transparent; color: var(--text2);
  font-size: .92rem; text-align: start; cursor: pointer;
}
.ws-nav button:hover { background: var(--row); }
.ws-nav button.is-on { background: var(--row-sel); color: var(--text); }
.ws-nav button.is-on .ws-ico { background: var(--accent); color: var(--on-accent); }
.ws-nav em { margin-inline-start: auto; color: var(--dim); font: normal .78rem var(--mono); }
.ws-ico { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--hi); color: var(--text2); flex: none; transition: background var(--fast); }
.ws-ico svg { width: 14px; height: 14px; }
.ws-main { padding: 22px 26px 26px; max-height: 620px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--edge) transparent; }
.ws-group + .ws-group { margin-top: 22px; }
.ws-group h3 { margin: 0 0 8px; padding: 0 4px; color: var(--muted); font-size: .85rem; font-weight: 500; }
.ws-group ul { list-style: none; margin: 0; padding: 0; border-radius: 12px; background: var(--row); overflow: hidden; }
.ws-group li {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 16px; font-size: .95rem; color: var(--text);
}
.ws-group li + li { border-top: 1px solid var(--line2); }
.ws-group li::after {
  content: ""; flex: none; width: 34px; height: 20px; border-radius: 10px;
  background: var(--accent) radial-gradient(circle at calc(100% - 10px) 50%, #fff 6.5px, transparent 7.5px);
}
[dir="rtl"] .ws-group li::after { background: var(--accent) radial-gradient(circle at 10px 50%, #fff 6.5px, transparent 7.5px); }
.ws-group li mark { background: var(--accent-soft); color: var(--accent); border-radius: 3px; }
.ws-none { color: var(--dim); padding: 30px 6px; }

/* specs */
.spec-wrap { border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); overflow-x: auto; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec-table th, .spec-table td { padding: 14px 20px; text-align: start; vertical-align: top; }
.spec-table tr + tr th, .spec-table tr + tr td { border-top: 1px solid var(--line); }
.spec-table th { width: 34%; color: var(--muted); font-weight: 500; }
.spec-table a { color: var(--text); text-decoration-color: var(--edge); text-underline-offset: 3px; }
.spec-table a:hover { text-decoration-color: var(--accent); }
/* Terms (glossary): same look as the spec table */
dl.spec-table { margin: 0; }
.terms .term { display: grid; grid-template-columns: 34% 1fr; gap: 0 20px; padding: 14px 20px; }
.terms .term + .term { border-top: 1px solid var(--line); }
.terms dt { color: var(--text); font-weight: 500; }
.terms dd { margin: 0; color: var(--muted); }
@media (max-width: 640px) { .terms .term { grid-template-columns: 1fr; gap: 4px; } }

/* FAQ */
.faq-list { border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); overflow: hidden; }
.faq-item + .faq-item { border-top: 1px solid var(--line); }
.faq-h { margin: 0; font-size: 1rem; }
.faq-q {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 18px;
  padding: 18px 22px; border: 0; background: transparent; text-align: start; font-weight: 500; cursor: pointer;
}
.faq-q:hover { background: var(--bg2); }
.faq-sign { position: relative; width: 12px; height: 12px; flex: none; }
.faq-sign::before, .faq-sign::after { content: ""; position: absolute; left: 0; top: 5.25px; width: 12px; height: 1.5px; background: var(--muted); transition: rotate var(--medium); }
.faq-sign::after { rotate: 90deg; }
.faq-item.open .faq-sign::after { rotate: 0deg; }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--medium); }
.faq-a > div { overflow: hidden; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a p { margin: 0; padding: 0 22px 20px; color: var(--muted); max-width: 46em; }

/* CTA */
.cta-band { padding: clamp(72px, 10vw, 140px) 0; border-top: 1px solid var(--line); background: radial-gradient(50% 80% at 78% 50%, var(--accent-soft), transparent 70%); }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; }
.cta-note { margin: 18px 0 0; color: var(--dim); font: .85rem var(--mono); }
.cta-dial { position: relative; display: grid; place-items: center; width: 260px; height: 260px; text-decoration: none; }
.cta-ticks { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 40s linear infinite; }
.cta-ticks line { stroke: var(--accent); stroke-linecap: round; }
@keyframes spin { to { rotate: 360deg; } }
.cta-face {
  display: grid; place-items: center; align-content: center; gap: 8px;
  width: 172px; height: 172px; padding: 18px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); text-align: center;
  font-weight: 700; font-size: .95rem; line-height: 1.2;
  transition: scale var(--fast), box-shadow var(--medium);
  box-shadow: 0 20px 60px -16px color-mix(in srgb, var(--accent) 60%, transparent);
}
.cta-dial:hover .cta-face { scale: 1.04; }
.cta-dial:active .cta-face { scale: .97; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--muted); font-size: .9rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.footer-tag { margin: 0; max-width: 34em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a, .footer-publisher { color: var(--text2); text-decoration: none; }
.footer-links a:hover, .footer-publisher:hover { color: var(--text); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--dim); font-size: .85rem; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 24px; background: rgb(8 8 9 / .9); backdrop-filter: blur(6px); }
.lightbox.show { display: grid; }
.lightbox img { max-width: min(1400px, 100%); max-height: 88vh; width: auto; height: auto; border-radius: 12px; border: 1px solid var(--line2); }
.lightbox-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg2); font-size: 22px; cursor: pointer; }

/* reveal */
.js-reveal .reveal { opacity: 0; translate: 0 16px; transition: opacity 600ms ease, translate 600ms cubic-bezier(.2, .7, .2, 1); }
.js-reveal .reveal.in { opacity: 1; translate: 0 0; }

/* ------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .remote { inset-inline-end: -4px; scale: .92; transform-origin: right center; }
}
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .split.flip .split-copy { order: 0; }
  .hero-stage { display: grid; justify-items: center; }
  .stage-panel { position: absolute; inset: 0 -24px; width: auto; max-height: none; aspect-ratio: auto; border-radius: 0; border-inline: 0; }
  .stage-panel .rings { left: -10%; }
  .target, .tally, .readout { display: none; }
  .remote, [dir="rtl"] .remote { position: relative; inset: auto; translate: none; scale: 1; margin: 40px 0 0; }
  .try-hint { position: relative; margin-bottom: 28px; }
  .pair { grid-template-columns: 1fr; justify-items: center; }
  .pair-remote { max-width: 300px; }
  .pair-link .wire { width: 28px; }
  .cta-inner { grid-template-columns: 1fr; justify-items: start; }
}
@media (max-width: 720px) {
  .shell, .shell.narrow { width: calc(100% - 32px); }
  .btn-store-nav span { display: none; }
  .brand-ver { display: none; }
  .stage { min-height: 380px; }
  .stage-remote { width: 40%; inset-inline-end: 4%; }
  .scene { width: 62%; }
  .skills i { width: 40px; height: 40px; }
  .skills .hot svg { width: 22px; height: 22px; }
  .sets { width: 60%; height: 250px; margin-inline-start: 4%; }
  .set { width: 86%; padding: 10px; }
  .set:nth-child(2) { top: 76px; } .set:nth-child(3) { top: 152px; }
  .ws { grid-template-columns: minmax(0, 1fr); }
  .ws-side { min-width: 0; }
  .ws-side { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .ws-nav { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .ws-nav hr { display: none; }
  .ws-nav button { flex: none; }
  .ws-nav em { display: none; }
  .ws-main { max-height: 520px; padding: 16px; }
  .spec-table th { width: 40%; }
  .spec-table th, .spec-table td { padding: 12px 14px; }
}
@media (max-width: 380px) {
  .remote { scale: .9; transform-origin: top center; margin-bottom: -50px; }
}
@media (prefers-reduced-motion: reduce) {
  .bob, .frame, .cta-ticks, .screen .cursor, .screen .corner, .scene .cursor { animation: none !important; }
  .js-reveal .reveal { opacity: 1; translate: none; transition: none; }
}
