/* Layout: the 7" board sits on a workbench; a short spec line and the gesture legend below it. */
:root {
  /* the device's dark-mode colours, same as the project page */
  --bench: #0b1016; --bench-ink: #e4ebe6; --muted: #9aa8a4;
  --bezel: #05070a; --bezel-edge: #2f3f47; --pcb: #0f5a4a;
  --accent: #ffb239; --green: #6ae28b;
  --chip: #141d24; --chip-edge: #24323a;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
body { margin: 0; background: radial-gradient(1000px 600px at 50% 30%, #13202a, var(--bench) 70%) fixed, var(--bench); color: var(--bench-ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
.wrap { max-width: 1000px; margin: 0 auto; padding-inline: 16px; padding-block: 28px 40px; display: grid; gap: 18px; }
header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4.6vw, 44px); letter-spacing: 0.01em; text-transform: uppercase; text-wrap: balance; }
h1 .q { color: var(--accent); }
.spec { margin: 0; font-family: var(--font-mono); font-size: 12px; color: var(--green); letter-spacing: 0.06em; }
.device {
  background: var(--bezel); border: 1px solid var(--bezel-edge); border-radius: 18px;
  padding: clamp(10px, 2.2vw, 22px); box-shadow: 0 18px 40px -18px rgba(10, 16, 30, 0.55);
  position: relative;
}
.device::after {           /* the little status LED on the bezel */
  content: ""; position: absolute; right: clamp(12px, 2vw, 20px); bottom: 6px; width: 6px; height: 6px;
  border-radius: 50%; background: #3ddc84; box-shadow: 0 0 6px #3ddc84;
}
.screen { position: relative; aspect-ratio: 800 / 480; max-width: 100%; background: #16243f; border-radius: 3px; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; image-rendering: auto; }
canvas:active { cursor: grabbing; }
canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.status[hidden] { display: none; }
.status { pointer-events: none; user-select: none; -webkit-user-select: none; position: absolute; inset: 0; display: grid; place-items: center; color: #dbe3f2; font-family: var(--font-mono); font-size: 13px; text-align: center; padding: 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 8px; background: var(--chip); border: 1px solid var(--chip-edge); border-radius: 8px; padding: 6px 12px; font-size: 14px; }
.legend b { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 15px; color: var(--accent); }
.tryrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.try { font: 700 14px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: #15110a; background: var(--accent); border: 0; border-radius: 6px; padding: 10px 18px; cursor: pointer; }
.try:hover { box-shadow: 0 0 22px rgba(255,178,57,.35); }
.try:hover { filter: brightness(1.08); }
.hint b { font-weight: 600; }
.try:focus-visible { outline: 3px solid var(--bench-ink); outline-offset: 2px; }
.hint { font-size: 14px; color: var(--muted); min-width: 0; }
.note { margin: 0; max-width: 68ch; color: var(--muted); font-size: 14px; }
.alt { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.alt .bar { width: 160px; max-width: 40vw; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, #e24c28, #f28a1e, #e8be1e, #6eb438, #20a08c, #2870d6, #7642ce); }
@media (prefers-reduced-motion: reduce) { .device::after { box-shadow: none; } }
.back a { color: var(--accent); }
