@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,600;0,900;1,400&display=swap');

/* ═══════════════════════════════════════════
   Design tokens
═══════════════════════════════════════════ */
:root {
  --primary:         #9fe870;
  --on-primary:      #0e0f0c;
  --primary-active:  #cdffad;
  --primary-pale:    #e2f6d5;
  --ink:             #0e0f0c;
  --body:            #454745;
  --mute:            #868685;
  --canvas:          #ffffff;
  --canvas-soft:     #e8ebe6;
  --positive:        #2ead4b;
  --positive-deep:   #054d28;
  --negative:        #d03238;
  --negative-bg:     #320707;

  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-pill: 9999px;

  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  12px;
  --sp-lg:  16px;
  --sp-xl:  24px;
  --sp-2xl: 32px;
  --sp-3xl: 48px;
}

/* ═══════════════════════════════════════════
   Reset
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: var(--canvas-soft);
  color: var(--ink);
  font-size: 16px;
  line-height: 24px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, video { max-width: 100%; display: block; }

/* ═══════════════════════════════════════════
   Device tab switcher (inline in eyebrow)
═══════════════════════════════════════════ */
.device-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.device-tabs a {
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.device-tabs a:hover   { color: var(--ink); background: rgba(14,15,12,.06); }
.device-tabs a.active  { background: var(--primary); color: var(--on-primary); }

/* ═══════════════════════════════════════════
   Page layout — flex row (macbook / generic)
═══════════════════════════════════════════ */
.page-main {
  flex: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: row;
  gap: var(--sp-xl);
  padding: var(--sp-lg) var(--sp-xl) var(--sp-xl);
  overflow: hidden;
}

/* Chromebook override — 3-row grid: header / main-area / bottom-strip */
.page-chromebook {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "eyebrow"
    "main"
    "bottom";
  row-gap: var(--sp-sm);
}

.page-chromebook .page-eyebrow { grid-area: eyebrow; }

/* Middle row: keyboard fills full width */
.cb-main {
  grid-area: main;
  display: flex;
  gap: var(--sp-lg);
  min-height: 0;
}

/* Video wrapper — fills available card height, contain so full frame is shown */
.cam-video-wrap {
  flex: 1;
  min-height: 0;
  background: #111;
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#webcam-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  transition: opacity .3s;
}

/* Override: col-keyboard is now flex inside cb-main, not a grid item */
.page-chromebook .col-keyboard {
  grid-area: unset;
  flex: 1;
}

/* Chromebook webcam card: pulled out of keyboard-scroll, sits alongside col-keyboard.
   Width = (100% - 3 gaps) / 4, matching each of the 4 hw-cards in cb-bottom exactly. */
.page-chromebook .cb-cam-card {
  flex: none;
  width: calc((100% - 3 * var(--sp-lg)) / 4);
}

/* MacBook: inherits Chromebook's single-column grid — webcam lives inside cb-main as flex child */

/* Bottom strip: mic + battery + speaker + blank */
.cb-bottom {
  grid-area: bottom;
  display: flex;
  gap: var(--sp-lg);
  height: clamp(160px, 28vh, 300px);
  flex-shrink: 0;
}
.cb-bottom .hw-card   { flex: 1; overflow: hidden; }
.cb-bottom .hwc-value { font-size: 26px; }
.cb-bottom .mic-peak  { font-size: 15px; letter-spacing: 0; }

/* Card status colors — applied via JS on webcam / mic */
.hw-card--ok {
  background: #f0fbf3;
  border: 1.5px solid rgba(46,173,75,.35);
  box-shadow: 0 0 0 4px rgba(46,173,75,.06);
}
.hw-card--error {
  background: #fdf2f2;
  border: 1.5px solid rgba(208,50,56,.35);
  box-shadow: 0 0 0 4px rgba(208,50,56,.06);
}

/* Keyboard column */
.col-keyboard {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
/* Right column: hardware tests (macbook / generic) */
.col-hw {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

/* Page eyebrow */
.page-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  flex-shrink: 0;
}
.eyebrow-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.eyebrow-left h1 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.eyebrow-left p {
  font-size: 13px;
  color: var(--mute);
}
.eyebrow-right {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
}

/* Language switcher */
.lang-select {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--mute);
  background: transparent;
  border: 1.5px solid rgba(14,15,12,.11);
  border-radius: var(--r-pill);
  padding: 5px 10px;
  cursor: pointer;
  outline: none;
  transition: color .15s, border-color .15s;
  -webkit-appearance: none;
  appearance: none;
  min-width: 54px;
  text-align: center;
}
.lang-select:hover {
  color: var(--ink);
  border-color: rgba(14,15,12,.2);
}
.lang-select:focus {
  border-color: var(--primary);
  color: var(--ink);
}

/* ═══════════════════════════════════════════
   Keyboard panel (left column, fills height)
═══════════════════════════════════════════ */
.keyboard-panel {
  flex: 1;
  min-height: 0;
  background: var(--canvas);
  border-radius: var(--r-xl);
  padding: var(--sp-xl) var(--sp-xl) var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.keyboard-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.key-counter-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}
.key-counter-label { font-size: 13px; color: var(--mute); }
.key-counter-pct {
  font-size: 20px;
  font-weight: 900;
  min-width: 64px;
  text-align: right;
  transition: color .3s;
}
.key-counter-pct.done { color: var(--positive-deep); }
.key-counter-pct.bump { animation: counter-bump .35s ease-out; }

@keyframes counter-bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); color: var(--positive); }
  100% { transform: scale(1); }
}

/* Progress bar */
.progress-area {
  position: relative;
  flex-shrink: 0;
}
.progress-track {
  height: 10px;
  background: var(--canvas-soft);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: var(--r-pill);
  transition: width .4s cubic-bezier(.4,0,.2,1), background .4s;
  box-shadow: 0 0 8px rgba(159,232,112,.45);
}
.progress-bar.done {
  background: var(--positive);
  box-shadow: 0 0 10px rgba(46,173,75,.45);
}

/* Keyboard scroll area — flex: 1 so it fills remaining panel height */
.keyboard-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: center;
}

/* Crit hit number — floats up from progress bar on each new key */
.key-crit {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 20;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--primary);
  text-shadow: 0 0 12px rgba(159,232,112,.65), 0 1px 4px rgba(0,0,0,.15);
  user-select: none;
  white-space: nowrap;
  opacity: 0;
}
.key-crit.key-crit-pop {
  animation: crit-pop .6s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes crit-pop {
  0%   { transform: translateX(-50%) translateY(4px) scale(1.3); opacity: 1; }
  40%  { transform: translateX(-50%) translateY(-2px) scale(1.0); opacity: 1; }
  100% { transform: translateX(-50%) translateY(-12px) scale(0.85); opacity: 0; }
}

/* Keyboard grid */
.keyboard {
  --ku: 44px;
  --kg: 5px;
  display: flex;
  flex-direction: column;
  gap: var(--kg);
  user-select: none;
  touch-action: none;
  margin: auto;
  flex-shrink: 0;
}

/* Chromebook & MacBook keyboards: width is set explicitly by JS for proportional scaling.
   Generic PC clusters (keyboard-main / keyboard-nav / keyboard-numpad) keep fixed sizing. */
.keyboard-responsive {
  flex-grow: 0;
}

.key-row {
  display: flex;
  gap: var(--kg);
  flex-shrink: 0;
}

/* Base key */
.key {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--ku);
  height: var(--ku);
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: var(--canvas-soft);
  border: 1.5px solid rgba(14,15,12,.11);
  font-size: calc(var(--ku) * 0.25);
  font-weight: 600;
  color: var(--body);
  cursor: default;
  text-align: center;
  line-height: 1.2;
  padding: 2px;
  position: relative;
  /* smooth hover */
  transition: background .1s, border-color .1s, color .1s, box-shadow .1s;
  will-change: transform;
}

/* Responsive keys: distribute row width by flex ratio instead of fixed px.
   Applied only where rows are uniform (Chromebook/MacBook). */
.keyboard-responsive .key         { flex: 1; width: auto; min-width: 30px; }
/* Key alone in its row (Esc): match the width of a standard 1u key in the 14-item number row */
.keyboard-responsive .key:only-child { flex: none; width: calc((100% - 13 * var(--kg)) / 15); }
.keyboard-responsive .key-1-25u   { flex: 1.25; width: auto; }
.keyboard-responsive .key-1-5u    { flex: 1.5;  width: auto; }
.keyboard-responsive .key-1-75u   { flex: 1.75; width: auto; }
.keyboard-responsive .key-2u      { flex: 2;    width: auto; }
.keyboard-responsive .key-2-25u   { flex: 2.25; width: auto; }
.keyboard-responsive .key-2-75u   { flex: 2.75; width: auto; }
.keyboard-responsive .key-6-25u   { flex: 6.25; width: auto; }
.keyboard-responsive .key-9u      { flex: 9;    width: auto; }
.key:hover:not(.key-pressed) {
  background: #dde0db;
  border-color: rgba(14,15,12,.2);
  box-shadow: 0 2px 6px rgba(14,15,12,.06);
}

/* Pressed state */
.key.key-pressed {
  background: var(--primary);
  border-color: transparent;
  color: var(--on-primary);
  box-shadow: 0 0 0 3px rgba(159,232,112,.3);
}

/* Flash animation on press */
.key.key-flash {
  animation: key-pop .28s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes key-pop {
  0%   { transform: scale(0.82); box-shadow: 0 0 0 6px rgba(159,232,112,.25); }
  55%  { transform: scale(1.07); }
  100% { transform: scale(1);    box-shadow: 0 0 0 3px rgba(159,232,112,.3); }
}

/* Function row icons */
.key-fn {
  font-size: calc(var(--ku) * 0.34);
  color: var(--mute);
}
.key-fn.key-pressed { color: var(--on-primary); }

/* Key width variants */
.key-1-25u { width: calc(1.25 * var(--ku) + 0.25 * var(--kg)); }
.key-1-5u  { width: calc(1.5  * var(--ku) + 0.5  * var(--kg)); }
.key-1-75u { width: calc(1.75 * var(--ku) + 0.75 * var(--kg)); }
.key-2u    { width: calc(2    * var(--ku) + 1    * var(--kg)); }
.key-2-25u { width: calc(2.25 * var(--ku) + 1.25 * var(--kg)); }
.key-2-75u { width: calc(2.75 * var(--ku) + 1.75 * var(--kg)); }
.key-6-25u { width: calc(6.25 * var(--ku) + 5.25 * var(--kg)); }
.key-9u    { width: calc(9    * var(--ku) + 8    * var(--kg)); }
.key-half-h { height: calc(0.5 * var(--ku) - 0.5 * var(--kg)); }

.arrow-cluster { display: flex; flex-direction: column; gap: var(--kg); }
.arrow-top-row, .arrow-bot-row { display: flex; gap: var(--kg); }

/* Keyboard tip */
.keyboard-tip {
  font-size: 12px;
  color: var(--mute);
  line-height: 18px;
  flex-shrink: 0;
  padding-top: var(--sp-xs);
}

/* ═══════════════════════════════════════════
   HW cards
═══════════════════════════════════════════ */
/* Shared card chrome — used by all pages */
.hw-card-right,
.hw-card {
  flex: 1;
  min-height: 0;
  background: var(--canvas);
  border-radius: var(--r-xl);
  padding: var(--sp-lg) var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  cursor: default;
  transition: transform .2s ease, box-shadow .2s ease;
}
.hw-card-right:hover,
.hw-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(14,15,12,.09);
}

.hwc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  flex-shrink: 0;
}
.hwc-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: .6px;
}

/* Battery value */
.hwc-value {
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
  flex: 1;
  display: flex;
  align-items: center;
}
.hwc-sub {
  font-size: 12px;
  color: var(--mute);
}

/* Speaker card description */
.hwc-desc {
  font-size: 13px;
  color: var(--body);
  line-height: 18px;
  flex: 1;
}



/* Mic bars */
.mic-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  min-height: 36px;
  max-height: 80px;
}
.mic-bar {
  flex: 1;
  background: var(--canvas-soft);
  border-radius: 3px;
  min-height: 4px;
  height: 4px;
  transition: height .07s ease-out, background .07s;
}
.mic-bar.active { background: var(--primary); }

/* Mic peak level display */
.mic-peak {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.4px;
  color: var(--ink);
  line-height: 1;
  flex-shrink: 0;
}

/* Speaker equalizer — animated bars while playing */
.speaker-eq {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 36px;
  max-height: 80px;
}
.seq-bar {
  flex: 1;
  background: var(--canvas-soft);
  border-radius: 3px;
  height: 4px;
  transition: background .3s;
}
.seq-bar.playing {
  background: var(--primary);
  transition: height .07s ease-out;
}

/* ═══════════════════════════════════════════
   Badges & Buttons
═══════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px var(--sp-sm);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .25s, color .25s;
}
.badge-positive { background: var(--primary-pale); color: var(--positive-deep); }
.badge-negative { background: var(--negative-bg);  color: #fff; }
.badge-mute     { background: var(--canvas-soft);  color: var(--mute); }
.badge-warning  { background: #fff8d6; color: #b86700; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-lg);
  border-radius: var(--r-xl);
  font-size: 14px;
  font-weight: 600;
  border: none;
  flex-shrink: 0;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: scale(.96); }

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover { background: var(--primary-active); box-shadow: 0 4px 12px rgba(159,232,112,.4); }

.btn-secondary {
  background: var(--canvas-soft);
  color: var(--ink);
}
.btn-secondary:hover { background: #dde0db; }

/* Slightly smaller variant for cards */
.btn-sm {
  padding: 6px var(--sp-md);
  font-size: 13px;
  border-radius: var(--r-lg);
}

/* ═══════════════════════════════════════════
   Footer (desktop hidden, visible on mobile)
═══════════════════════════════════════════ */
footer {
  display: none;
  background: var(--ink);
  color: var(--canvas-soft);
  padding: var(--sp-3xl) var(--sp-xl);
  flex-shrink: 0;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--sp-2xl);
}
.footer-logo {
  font-weight: 900;
  font-size: 22px;
  color: var(--primary);
  letter-spacing: -0.5px;
  margin-bottom: var(--sp-xs);
}
.footer-tagline { font-size: 13px; color: var(--mute); }
.footer-links { display: flex; gap: var(--sp-xl); list-style: none; }
.footer-links a { font-size: 14px; color: var(--canvas-soft); opacity: .55; transition: opacity .15s; }
.footer-links a:hover { opacity: 1; }
.footer-copy {
  width: 100%;
  font-size: 12px;
  color: var(--mute);
  padding-top: var(--sp-xl);
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: var(--sp-2xl);
}

/* ═══════════════════════════════════════════
   PC-page specific (numpad + nav cluster)
═══════════════════════════════════════════ */
.keyboard-outer { display: flex; gap: 16px; align-items: flex-start; }

/* Generic PC keyboard is taller than Chromebook; allow vertical scroll */
.page-generic .keyboard-scroll {
  align-items: flex-start;
  overflow-y: auto;
}

/* Screen info card */
.screen-rows {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
}
.scr-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px;
}
.scr-label { font-size: 12px; color: var(--mute); }
.scr-val   { font-size: 12px; font-weight: 600; color: var(--ink); }

/* ═══════════════════════════════════════════
   Key state markers
═══════════════════════════════════════════ */

/* Cannot produce any browser event (fn, Touch ID) */
.key-undetectable {
  opacity: 0.35;
  border-style: dashed;
  cursor: not-allowed;
}
.key-undetectable:hover:not(.key-pressed) {
  background: var(--canvas-soft);
  border-color: rgba(14,15,12,.11);
  box-shadow: none;
}

/* Needs fn combination to fire as a function key (F1–F12 on Mac) */
.key-needs-fn::after {
  content: "fn";
  position: absolute;
  bottom: 3px;
  left: 4px;
  font-size: 7px;
  font-weight: 700;
  color: var(--mute);
  opacity: 0.6;
  line-height: 1;
  pointer-events: none;
}

/* macOS Caps Lock quirk — only one direction of event fires per toggle */
.key-partial {
  border-style: dotted;
  border-color: rgba(184,103,0,.45);
}
.key-partial:hover:not(.key-pressed) {
  border-color: rgba(184,103,0,.65);
}

/* ═══════════════════════════════════════════
   Keyboard notes (below keyboard, per-device)
═══════════════════════════════════════════ */
.keyboard-notes {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 4px;
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--canvas-soft);
}
.kn-row {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  padding-right: var(--sp-md);
  margin-right: var(--sp-md);
}
.kn-row:last-child {
  padding-right: 0;
  margin-right: 0;
}
.kn-row:not(:last-child) {
  border-right: 1px solid rgba(14,15,12,.1);
}
.kn-badges {
  display: flex;
  align-items: center;
  gap: 2px;
}
.kn-badge {
  display: inline-flex;
  align-items: center;
  height: 16px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 3px;
  background: var(--canvas-soft);
  border: 1.5px solid rgba(14,15,12,.12);
  color: var(--body);
  white-space: nowrap;
  letter-spacing: .2px;
}
.kn-badge--dim {
  opacity: 0.4;
  border-style: dashed;
}
.kn-badge--warn {
  border-color: rgba(184,103,0,.4);
  border-style: dotted;
  color: #b86700;
  background: #fff9f0;
}
.kn-plus {
  font-size: 9px;
  font-weight: 500;
  color: var(--mute);
}
.kn-text {
  font-size: 11px;
  color: var(--mute);
  line-height: 1;
}

/* CSS tooltip — shown on any key with [data-tip] */
[data-tip] { overflow: visible; }
[data-tip]::before {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--canvas);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: var(--r-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 100;
}
[data-tip]:hover::before { opacity: 1; }

/* ═══════════════════════════════════════════
   Arabic: layout stays LTR, text reads RTL
═══════════════════════════════════════════ */
/* Force all structural flex/grid containers to stay left-to-right */
[dir="rtl"] .page-main,
[dir="rtl"] .footer-inner {
  direction: ltr;
}

/* Re-apply RTL only to text-bearing leaf elements */
[dir="rtl"] h1,
[dir="rtl"] p,
[dir="rtl"] .hwc-title,
[dir="rtl"] .badge,
[dir="rtl"] .btn,
[dir="rtl"] .key-counter-label,
[dir="rtl"] .keyboard-tip,
[dir="rtl"] .hwc-sub,
[dir="rtl"] .footer-tagline,
[dir="rtl"] .footer-copy,
[dir="rtl"] .scr-label,
[dir="rtl"] .kn-text {
  direction: rtl;
}

.keyboard-main  { flex-shrink: 0; }
/* Nav cluster and numpad sit side-by-side; numpad is offset down by 1 row to match real keyboard alignment */
.keyboard-right { display: flex; flex-direction: row; gap: 16px; flex-shrink: 0; align-items: flex-start; }
.keyboard-nav, .keyboard-numpad { display: flex; flex-direction: column; gap: var(--kg, 5px); flex-shrink: 0; }
.keyboard-numpad { margin-top: calc(var(--ku, 44px) + var(--kg, 5px)); }
.key-num-0 { width: calc(2 * var(--ku, 44px) + 1 * var(--kg, 5px)); }
.key-num-enter { height: calc(2 * var(--ku, 44px) + 1 * var(--kg, 5px)); }

/* ═══════════════════════════════════════════
   Responsive
═══════════════════════════════════════════ */
@media (max-width: 1199px) {
  .col-hw { width: 260px; }
}

/* Mobile — unlock viewport, stack vertically */
@media (max-width: 767px) {
  body { height: auto; overflow: auto; }
  .page-main {
    display: flex;
    flex-direction: column;
    overflow: visible;
    gap: var(--sp-lg);
    padding: var(--sp-lg);
  }
  .page-chromebook { display: flex; flex-direction: column; row-gap: var(--sp-md); }
  .cb-main { flex-direction: column; }
  .cb-bottom { height: auto; flex-wrap: wrap; }
  .cb-bottom .hw-card { flex: 1 1 calc(50% - 8px); min-height: 130px; }
  .page-chromebook .cb-cam-card { width: 100%; min-height: 160px; }
  .col-hw      { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .hw-card-right { flex: 1 1 calc(50% - 8px); min-height: 140px; }
  .keyboard-panel { min-height: 360px; flex: none; }
  .keyboard-scroll { overflow-x: auto; overflow-y: visible; align-items: flex-start; }
  .keyboard     { --ku: 36px; --kg: 4px; }
  .device-tabs  { display: none; }
  .eyebrow-left p { display: none; }
  footer { display: block; }
}

/* ═══════════════════════════════════════════
   FAQ section (mobile-only; hidden on desktop
   by body overflow:hidden)
═══════════════════════════════════════════ */
.faq-section {
  direction: ltr;
  unicode-bidi: isolate; /* creates a proper bidi isolation zone — direction alone is insufficient under a RTL parent */
  text-align: left;
  overflow-x: hidden;
  background: var(--canvas);
  border-radius: var(--r-xl);
  padding: var(--sp-3xl) var(--sp-xl);
  margin: 0 var(--sp-lg) var(--sp-lg);
}

.faq-section h2 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin-bottom: var(--sp-xl);
}

.faq-section dl {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
}

.faq-section dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--sp-xs);
}

.faq-section dd {
  font-size: 14px;
  color: var(--body);
  line-height: 22px;
}
