/*
  ControllerCheckup — visual system
  Idea: the page is the controller's light shell; the live tester is its dark core.
  Colour only lights up where real input is happening.
*/
/* Archivo, self-hosted (SIL Open Font Licence, see fonts/Archivo-OFL.txt). One variable file covers every weight and width. */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --shell: #eef0f4;       /* page */
  --shell-hi: #fafbfc;    /* raised surfaces */
  --line: #d9dde5;
  --ink: #1d2028;
  --muted: #5b6170;
  --core: #1a1d26;        /* tester core */
  --core-2: #222633;
  --core-line: #313646;
  --core-ink: #e8eaf1;
  --core-muted: #9aa1b4;
  --glow: #5b6cff;        /* live input */
  --glow-soft: rgba(91, 108, 255, .22);
  --accent: #4a5af0;      /* same blue, dark enough for white text and for links on light backgrounds (WCAG AA) */
  --ok: #16a372;
  --warn: #d08a00;
  --bad: #d9434b;

  --wide: "wdth" 118;
  --narrow: "wdth" 82;
  --radius-shell: 28px;
  --radius-part: 12px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--shell);
  color: var(--ink);
  font: 400 17px/1.6 "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variation-settings: "wdth" 100;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; z-index: 10; }

/* ---------- masthead ---------- */
.masthead { padding: 18px 0; }
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 24px; fill: var(--ink); }
.brand-eye { fill: var(--shell); }
.brand-name { font-weight: 700; font-variation-settings: var(--wide); letter-spacing: -.01em; font-size: 17px; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); padding: 10px 0; }
.nav a[aria-current="page"], .nav a:hover { color: var(--ink); }

/* ---------- headings ---------- */
.display {
  font-weight: 800;
  font-variation-settings: var(--wide);
  font-size: clamp(38px, 6.4vw, 76px);
  line-height: .98;
  letter-spacing: -.035em;
  margin: 0;
  max-width: 14ch;
}
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 58ch; margin: 18px 0 0; }
.hero { padding: 36px 0 32px; display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.1fr 1fr; align-items: end; gap: 48px; padding-top: 48px; }
  .hero .lede { margin: 0 0 8px; }
}
.page-head { padding: 40px 0 28px; }
.page-head .display { font-size: clamp(34px, 5vw, 58px); max-width: 20ch; }

/* ---------- the core: dark tester panel ---------- */
.core { padding: 0 0 56px; }
.console {
  position: relative;
  background: var(--core);
  color: var(--core-ink);
  border-radius: var(--radius-shell);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 30px 60px -30px rgba(26,29,38,.55);
}
@media (min-width: 900px) { .console { padding: 26px; } }

.console-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.btn-connect {
  appearance: none; border: 0; cursor: pointer;
  background: var(--accent); color: #fff;
  font: 700 16px/1 "Archivo", sans-serif; font-variation-settings: var(--wide);
  padding: 15px 22px; border-radius: 999px;
  box-shadow: 0 0 0 0 var(--glow-soft);
  transition: box-shadow .25s ease, transform .1s ease;
}
.btn-connect:hover { box-shadow: 0 0 0 8px var(--glow-soft); }
.btn-connect:active { transform: translateY(1px); }
.btn-connect[data-state="connected"] { background: transparent; color: var(--core-ink); box-shadow: inset 0 0 0 1.5px var(--core-line); }
.status { margin: 0; color: var(--core-muted); font-size: 15px; flex: 1 1 220px; }
.status strong { color: var(--core-ink); font-weight: 600; }

.mode { display: inline-flex; background: var(--core-2); border-radius: 999px; padding: 4px; }
.mode button {
  appearance: none; border: 0; background: transparent; color: var(--core-muted);
  font: 600 14px/1 "Archivo", sans-serif; padding: 9px 14px; border-radius: 999px; cursor: pointer;
}
.mode button[aria-checked="true"] { background: var(--core-ink); color: var(--core); }
.mode button:disabled { opacity: .4; cursor: not-allowed; }
.mode-note { margin: 12px 0 0; font-size: 14px; color: var(--core-muted); max-width: 70ch; }

/* bench grid */
.bench { display: grid; gap: 14px; margin-top: 18px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .bench { grid-template-columns: 1fr 1fr; } .gauge-pad { grid-column: 1 / -1; } }
@media (min-width: 1040px) {
  .bench { grid-template-columns: 230px 1fr 230px; grid-auto-rows: auto; }
  .gauge-pad { grid-column: 2; grid-row: 1; }
  .gauge-triggers, .gauge-touch, .gauge-motion, .gauge-info { grid-column: auto; }
  .bench > .gauge-triggers { grid-column: 1; }
  .bench > .gauge-touch { grid-column: 2; }
  .bench > .gauge-motion { grid-column: 3; }
  .bench > .gauge-info { grid-column: 1 / -1; }
}
.gauge { background: var(--core-2); border-radius: 18px; padding: 16px; min-width: 0; }
.gauge-pad { background: transparent; padding: 4px 0 0; display: flex; flex-direction: column; justify-content: center; }
.gauge-title { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--core-muted); font-variation-settings: "wdth" 100; }
.gauge canvas { width: 100%; height: auto; aspect-ratio: 1; border-radius: 14px; background: var(--core); }
.hint { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--core-muted); }

.readout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0 0; }
.readout div { min-width: 0; }
.readout dt { font-size: 12px; color: var(--core-muted); }
.readout dd { margin: 0; font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 600; }
.verdict { margin: 10px 0 0; font-size: 14px; min-height: 1.4em; }
.verdict[data-level="ok"] { color: #4fd3a3; }
.verdict[data-level="warn"] { color: #f2b33d; }
.verdict[data-level="bad"] { color: #ff7a80; }

.pressed { margin: 8px 0 0; text-align: center; color: var(--core-muted); font-size: 14px; min-height: 1.5em; }

/* controller drawing */
.pad { width: 100%; height: auto; max-width: 620px; margin: 0 auto; }
.pad .body { fill: #2a2f3d; stroke: #3b4152; stroke-width: 2; }
.pad .key, .pad .trig-shell { fill: #353b4b; stroke: #454c5f; stroke-width: 1.5; transition: fill .06s linear; }
.pad .key.on { fill: var(--glow); stroke: #8c98ff; }
.pad .stick-base { fill: #232733; }
.pad .stick-base.on { fill: rgba(91,108,255,.35); }
.pad .stick-cap { fill: #444b5e; stroke: #5a6278; stroke-width: 2; }
.pad .stick-cap.moving { fill: #5363e8; stroke: #9aa5ff; }
.pad .touch { fill: #2f3443; stroke: #454c5f; stroke-width: 1.5; }
.pad .touch.on { fill: #3a4064; }
.pad .lightbar { stroke: #3b4152; stroke-width: 4; stroke-linecap: round; fill: none; }
.pad .lightbar.lit { stroke: var(--lightbar, var(--glow)); filter: drop-shadow(0 0 6px var(--lightbar, var(--glow))); }
.pad .touch-dot { fill: #c9cfff; }
.pad .trig-fill { fill: var(--glow); }
.pad .glyph { fill: none; stroke: #8b93a8; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.pad .pad-label { fill: #a7aec0; font: 600 12px "Archivo", sans-serif; text-anchor: middle; pointer-events: none; }
.pad .pad-label.small { font-size: 11px; }
.pad .pad-label.tiny { font-size: 9px; fill: #c7ccda; }

/* meters */
.meter { display: grid; grid-template-columns: 28px 1fr 46px; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.meter span { color: var(--core-muted); font-weight: 600; }
.meter output { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.meter-track { height: 12px; background: var(--core); border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: var(--glow); border-radius: inherit; }

/* touchpad map */
.touchmap { width: 100%; height: auto; }
.touchmap rect { fill: var(--core); stroke: var(--core-line); stroke-width: 1.5; }
.touchmap circle { fill: var(--glow); }
.touchmap circle[data-tdot="1"] { fill: #4fd3a3; }
.touchmap [data-trails] circle { fill: rgba(91,108,255,.35); }

/* motion */
.tilt { perspective: 420px; height: 96px; display: grid; place-items: center; background: var(--core); border-radius: 14px; }
.tilt-card { width: 108px; height: 54px; border-radius: 20px 20px 26px 26px; background: linear-gradient(#3a4155, #2b3040); box-shadow: inset 0 0 0 1.5px #4a5268; transition: transform .05s linear; }

/* battery */
.battery { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.battery-cell { position: relative; width: 120px; height: 30px; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--core-line); padding: 4px; }
.battery-cell::after { content: ""; position: absolute; right: -6px; top: 9px; width: 4px; height: 12px; border-radius: 0 3px 3px 0; background: var(--core-line); }
.battery-fill { height: 100%; width: 0; border-radius: 4px; background: var(--ok); }
.battery output { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; font-variation-settings: var(--wide); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; margin: 0; }
.facts dt { font-size: 12px; color: var(--core-muted); }
.facts dd { margin: 0; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }

/* waiting overlay */
.waiting {
  position: absolute; inset: 86px 18px 18px; display: grid; place-content: center; text-align: left;
  background: rgba(26,29,38,.86); border-radius: 18px; padding: 24px;
  backdrop-filter: blur(3px);
}
.waiting[hidden] { display: none; }
.waiting-title { margin: 0 0 12px; font-size: clamp(22px, 3vw, 30px); font-weight: 700; font-variation-settings: var(--wide); letter-spacing: -.02em; }
.waiting-steps { margin: 0; padding-left: 20px; color: var(--core-muted); max-width: 52ch; }
.waiting-steps li { margin: 6px 0; }
.waiting-steps strong { color: var(--core-ink); }

/* HID-only panels in basic mode */
.bench[data-mode="gamepad"] [data-needs="hid"] { opacity: .45; }
.bench[data-mode="gamepad"] [data-needs="hid"] .gauge-title::after { content: " (full test only)"; font-weight: 400; }

/* ---------- content ---------- */
.columns { display: grid; gap: 48px; padding-bottom: 72px; }
@media (min-width: 960px) { .columns { grid-template-columns: minmax(0, 1fr) 300px; gap: 72px; } }
.prose { max-width: 70ch; }
.prose-solo { padding-bottom: 72px; }
.prose h2 { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; font-variation-settings: var(--wide); font-weight: 750; margin: 40px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 20px; margin: 28px 0 8px; }
.prose p, .prose li { color: #343845; }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; background: var(--shell-hi); border-radius: var(--radius-part); overflow: hidden; }
.prose th, .prose td { text-align: left; padding: 10px 12px; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 650; background: #e3e6ed; }
.prose tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) { .prose table { display: block; overflow-x: auto; } }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 8px 0 0; }
.contact-line { font-size: 20px; }
.btn-link { display: inline-block; background: var(--ink); color: #fff; text-decoration: none; padding: 13px 20px; border-radius: 999px; font-weight: 650; }
.btn-link:hover { color: #fff; background: var(--accent); }

/* side list of tests */
.side-title { font-size: 15px; font-weight: 650; color: var(--muted); margin: 0 0 10px; }
.testlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.testlist li { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.testlist a, .testlist span { font-weight: 600; text-decoration: none; }
.testlist small { color: var(--muted); font-size: 13px; text-align: right; }
.testlist .soon span { color: var(--muted); font-weight: 500; }
@media (min-width: 960px) { .side { position: sticky; top: 24px; align-self: start; } }

/* ---------- footer ---------- */
.footer { background: var(--shell-hi); border-top: 1px solid var(--line); padding: 44px 0 28px; font-size: 15px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .footer-grid { grid-template-columns: 1.4fr repeat(5, 1fr); } }
.footer-brand { font-weight: 750; font-variation-settings: var(--wide); margin: 0 0 6px; font-size: 18px; }
.footer-note { margin: 0; color: var(--muted); max-width: 40ch; }
.footer-head { margin: 0 0 8px; font-weight: 650; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { text-decoration: none; }
.footer-legal { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-legal p { margin: 0; max-width: 100ch; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .masthead-row { flex-wrap: wrap; gap: 10px; }
  .nav { gap: 18px; font-size: 14px; width: 100%; white-space: nowrap; overflow-x: auto; }
  .brand-name { font-size: 15px; }
  .readout dd { font-size: 14px; }
  .waiting { inset: 120px 12px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- tool pages ---------- */
.hero-tool .display { font-size: clamp(34px, 5.4vw, 64px); max-width: 16ch; }
.bench-tool { grid-template-columns: 1fr; }
@media (min-width: 760px) { .bench-tool { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .bench-tool { grid-template-columns: repeat(12, 1fr); } }
.bench-tool > .gauge { grid-column: auto; grid-row: auto; }
@media (min-width: 1040px) {
  .bench-tool > .span-3 { grid-column: span 3; }
  .bench-tool > .span-4 { grid-column: span 4; }
  .bench-tool > .span-5 { grid-column: span 5; }
  .bench-tool > .span-6 { grid-column: span 6; }
  .bench-tool > .span-7 { grid-column: span 7; }
  .bench-tool > .span-8 { grid-column: span 8; }
  .bench-tool > .span-12 { grid-column: 1 / -1; }
}
@media (min-width: 760px) and (max-width: 1039px) { .bench-tool > .wide { grid-column: 1 / -1; } }

.btn-act {
  appearance: none; border: 0; cursor: pointer; font: 600 14px/1 "Archivo", sans-serif;
  padding: 11px 15px; border-radius: 999px; background: var(--core-ink); color: var(--core);
}
.btn-act:hover { background: #fff; }
.btn-act.ghost { background: transparent; color: var(--core-ink); box-shadow: inset 0 0 0 1.5px var(--core-line); }
.btn-act.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--core-muted); }
.btn-act:disabled { opacity: .45; cursor: not-allowed; }
.btn-act[aria-pressed="true"] { background: var(--accent); color: #fff; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.big-figure { font-size: clamp(34px, 5vw, 56px); font-weight: 800; font-variation-settings: var(--wide); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; margin: 4px 0 6px; }
.figure-label { color: var(--core-muted); font-size: 13px; margin: 0; }
.progress { height: 8px; background: var(--core); border-radius: 999px; overflow: hidden; margin: 14px 0 6px; }
.progress > div { height: 100%; width: 0; background: var(--glow); }
.step-text { margin: 10px 0 0; font-size: 15px; min-height: 1.6em; }

.dtable { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 14px; }
.dtable th, .dtable td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--core-line); vertical-align: top; }
.dtable th { color: var(--core-muted); font-weight: 600; font-size: 13px; }
.dtable td { font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .dtable { font-size: 13px; }
  .dtable th, .dtable td { padding: 8px 5px; }
  .dtable:not([hidden]) { display: block; overflow-x: auto; }
}
.dtable tr:last-child td { border-bottom: 0; }
.lvl-ok { color: #4fd3a3; } .lvl-warn { color: #f2b33d; } .lvl-bad { color: #ff7a80; }

.field { display: grid; gap: 6px; margin: 0 0 12px; font-size: 13px; color: var(--core-muted); }
.field select, .field input[type=text], .field input[type=number] {
  font: 500 15px "Archivo", sans-serif; color: var(--core-ink); background: var(--core); border: 1.5px solid var(--core-line);
  border-radius: 10px; padding: 10px 12px; width: 100%;
}
.field input[type=range] { width: 100%; height: 28px; accent-color: var(--glow); }
.field output { color: var(--core-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.field-row { display: flex; justify-content: space-between; gap: 8px; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.check-tile { background: var(--core); border-radius: 12px; padding: 12px; min-height: 74px; display: grid; align-content: space-between; box-shadow: inset 0 0 0 1.5px var(--core-line); }
.check-tile strong { font-size: 15px; }
.check-tile small { color: var(--core-muted); font-size: 12px; }
.check-tile.done { box-shadow: inset 0 0 0 1.5px #2f8f6f; }
.check-tile.done small { color: #4fd3a3; }
.check-tile.live { background: var(--accent); box-shadow: none; }
.check-tile.live small { color: #dfe3ff; }
.check-tile.flag { box-shadow: inset 0 0 0 1.5px #b9853a; }
.check-tile.flag small { color: #f2b33d; }
.check-tile.na { opacity: .4; }

.ranges { display: flex; gap: 18px; flex-wrap: wrap; }
.ranges svg { width: 110px; height: 110px; }
.ranges .seg { fill: none; stroke: var(--core-line); stroke-width: 12; }
.ranges .seg.hit { stroke: var(--glow); }
.ranges text { fill: var(--core-muted); font: 600 12px "Archivo", sans-serif; text-anchor: middle; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.15); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--core-ink); }
.leds { display: flex; gap: 2px; flex-wrap: wrap; }
/* The light is 34 x 12, but the button around it is big enough to tap. */
.led { width: 42px; height: 34px; padding: 11px 4px; background-clip: content-box; border-radius: 10px; border: 0; cursor: pointer; background-color: #353b4b; }
.led[aria-pressed="true"] { background-color: #fff; filter: drop-shadow(0 0 6px rgba(255,255,255,.6)); }

.touchmap.big { max-width: 100%; }
.touchmap .cell { fill: transparent; stroke: none; }
.touchmap .cell.hit { fill: rgba(91,108,255,.18); }
.log { list-style: none; margin: 10px 0 0; padding: 0; max-height: 180px; overflow: auto; font-size: 13px; color: var(--core-muted); }
.log li { padding: 5px 0; border-bottom: 1px solid var(--core-line); font-variant-numeric: tabular-nums; }
.log li strong { color: var(--core-ink); font-weight: 600; }
.cube-wrap { perspective: 600px; height: 200px; display: grid; place-items: center; background: var(--core); border-radius: 14px; }
.cube-pad { width: 170px; height: 86px; border-radius: 30px 30px 40px 40px; background: linear-gradient(#3b4258, #2a2f40); box-shadow: inset 0 0 0 2px #4d5570; transform-style: preserve-3d; display: grid; place-items: center; color: var(--core-muted); font-size: 12px; }
.axis-bars .meter { grid-template-columns: 60px 1fr 64px; }
.axis-bars .meter-track { position: relative; }
.axis-bars .meter-fill.centred { position: absolute; left: 50%; width: 0; }

/* health check */
.hc-steps { list-style: none; margin: 0; padding: 0; counter-reset: hc; }
.hc-steps li { counter-increment: hc; display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--core-line); color: var(--core-muted); font-size: 15px; }
.hc-steps li::before { content: counter(hc); width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--core); color: var(--core-muted); flex: none; }
.hc-steps li.now { color: var(--core-ink); }
.hc-steps li.now::before { background: var(--accent); color: #fff; }
.hc-steps li.ok::before { content: "✓"; background: #1f7a5c; color: #fff; }
.hc-steps li.warn::before { content: "!"; background: #9a6a12; color: #fff; }
.hc-steps li.bad::before { content: "✕"; background: #a3343a; color: #fff; }
.hc-steps li.skip::before { content: "–"; }
.hc-steps small { margin-left: auto; font-size: 12px; }
.hc-score { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.shared-banner { background: var(--core-2); border-radius: 14px; padding: 12px 16px; margin: 0 0 14px; color: var(--core-muted); font-size: 14px; }
@media print {
  .masthead, .footer, .columns, .console-bar, .mode-note, [data-stage], .gauge:has(.hc-steps), .waiting, .acts, .hero .lede { display: none !important; }
  body, .console, .gauge { background: #fff !important; color: #000 !important; box-shadow: none !important; }
  .dtable th, .dtable td { color: #000 !important; border-color: #ccc !important; }
  [data-report] { display: block !important; }
  .print-head { display: flex !important; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 12px; font-size: 14px; }
  .print-note { display: block !important; color: #333 !important; font-size: 12px; margin-top: 16px; }
  .report-check { color: #000 !important; }
}
.print-head, .print-note { display: none; }
.report-id { margin: -4px 0 12px; font-size: 14px; color: var(--core-muted); }
.report-id b { color: var(--core-ink); letter-spacing: .04em; }
.report-check { margin-left: 8px; font-weight: 600; }

/* ---------------------------------------------------------------- contact form */
.contact-form { margin: 28px 0 32px; padding: 24px; background: var(--shell-hi); border: 1px solid var(--line); border-radius: 20px; display: grid; gap: 16px; }
.cf-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .cf-row { grid-template-columns: 1fr 1fr; } }
.cf-field { display: grid; gap: 6px; font-size: 15px; font-weight: 600; color: var(--ink); }
.cf-field input, .cf-field select, .cf-field textarea {
  font: 400 16px/1.45 "Archivo", system-ui, sans-serif; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; width: 100%;
}
.cf-field textarea { resize: vertical; min-height: 140px; }
.cf-field input:focus, .cf-field select:focus, .cf-field textarea:focus { outline: none; border-color: var(--glow); box-shadow: 0 0 0 4px var(--glow-soft); }
.cf-field [aria-invalid="true"] { border-color: var(--bad); }
.cf-error { color: var(--bad); font-weight: 500; font-size: 14px; }
.form-note { margin: 0; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.form-ok { background: rgba(22,163,114,.1); color: #0d6b4b; }
.form-bad { background: rgba(217,67,75,.1); color: #9c2229; }
.form-small { margin: 0; font-size: 14px; color: var(--muted); }
.btn-main {
  justify-self: start; appearance: none; border: 0; cursor: pointer; background: var(--ink); color: #fff;
  font: 700 16px/1 "Archivo", sans-serif; font-variation-settings: var(--wide); padding: 15px 24px; border-radius: 999px;
}
.btn-main:hover { background: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- guides */
.guide-list { list-style: none; padding: 0; margin: 0 0 72px; display: grid; gap: 16px; }
@media (min-width: 760px) { .guide-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .guide-list { grid-template-columns: repeat(3, 1fr); } }
.guide-card { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 22px; background: var(--shell-hi); border: 1px solid var(--line); border-radius: 20px; color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.guide-card:hover { border-color: var(--glow); transform: translateY(-2px); }
.guide-card h2, .guide-card h3 { margin: 0; font-size: 21px; line-height: 1.2; letter-spacing: -.015em; font-variation-settings: var(--wide); font-weight: 750; }
.guide-card p { margin: 0; color: var(--muted); font-size: 15px; }
.guide-card time { margin-top: auto; font-size: 13px; color: var(--muted); }
.empty-note { margin: 0 0 72px; color: var(--muted); }
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.crumbs a { color: inherit; display: inline-block; padding: 5px 0; }
.guide-meta { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.guide-try { margin: 40px 0; padding: 24px; border-radius: 20px; background: var(--core); color: var(--core-ink); }
.guide-try p { color: var(--core-muted); margin: 6px 0 16px; }
.guide-try h2 { margin: 0 !important; color: var(--core-ink); }
.guide-try .btn-link { background: var(--accent); }
.more-guides { margin: 0 0 72px; }
.more-guides > h2 { font-size: 24px; margin: 0 0 16px; font-variation-settings: var(--wide); }

/* ---------------------------------------------------------------- menus */
.side-group { margin: 18px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side-title + .side-group { margin-top: 0; }

/* ---------------------------------------------------------------- sound tests */
.console-plain { padding-top: 18px; }
.out-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.out-row .field { margin: 0; }
.out-field { flex: 1 1 260px; }
.vol-field { flex: 0 1 200px; }
.vol-field output { margin-left: 4px; }
.spk-stage { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; padding: 8px 4px; }
.spk { position: relative; width: 84px; height: 84px; border-radius: 22px; background: var(--core); display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--core-line); transition: box-shadow .15s; }
.spk-cone { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle, #444b5e 0 30%, #2a2f3d 31% 100%); box-shadow: inset 0 0 0 2px #454c5f; }
.spk b { position: absolute; top: 6px; left: 10px; font-size: 13px; color: var(--core-muted); }
.spk.on { box-shadow: inset 0 0 0 2px var(--glow), 0 0 0 8px var(--glow-soft); }
.spk.on .spk-cone { animation: thump .25s ease-in-out infinite alternate; }
.spk-you { color: var(--core-muted); font-size: 14px; font-weight: 600; }
@keyframes thump { to { transform: scale(1.08); } }
.big-hz { margin: 0 0 8px; font-size: 44px; font-weight: 800; font-variation-settings: var(--wide); font-variant-numeric: tabular-nums; line-height: 1; }
.big-hz small { font-size: 18px; color: var(--core-muted); font-weight: 600; }
.chips { gap: 6px; }
.chips .btn-act { padding: 9px 12px; font-size: 14px; }
.orbit { width: 100%; max-width: 360px; display: block; margin: 0 auto; }
.orbit-ring { fill: none; stroke: var(--core-line); stroke-width: 1.5; }
.orbit-ring.faint { stroke-dasharray: 3 5; }
.orbit-label { fill: var(--core-muted); font: 600 12px "Archivo", sans-serif; text-anchor: middle; }
.orbit-head { fill: #353b4b; stroke: #454c5f; stroke-width: 1.5; }
.orbit-dot { fill: var(--glow); filter: drop-shadow(0 0 8px var(--glow)); transition: r .2s; }
.room { position: relative; aspect-ratio: 4 / 3; max-height: 460px; width: 100%; background: var(--core); border-radius: 16px; margin-bottom: 14px; box-shadow: inset 0 0 0 1.5px var(--core-line); }
.room-screen { position: absolute; left: 30%; right: 30%; top: 0; height: 6px; background: #454c5f; border-radius: 0 0 6px 6px; font-size: 0; }
.room-you { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); color: var(--core-muted); font-weight: 600; font-size: 14px; padding: 10px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--core-line); }
.room-spk { position: absolute; transform: translate(-50%, -50%); min-width: 56px; min-height: 48px; padding: 6px 8px; border: 0; border-radius: 12px; cursor: pointer; background: #2a2f3d; color: var(--core-ink); box-shadow: inset 0 0 0 1.5px #454c5f; display: grid; justify-items: center; gap: 1px; font: 600 11px "Archivo", sans-serif; }
.room-spk b { font-size: 14px; }
.room-spk span { color: var(--core-muted); white-space: nowrap; }
.room-spk.on { background: var(--accent); box-shadow: 0 0 0 8px var(--glow-soft); }
.room-spk.on span { color: #e6e9ff; }
.room-spk:disabled { opacity: .35; cursor: not-allowed; }
@media (max-width: 520px) { .room-spk span { display: none; } .room-spk { min-width: 44px; } }
.acts + .field { margin-top: 14px; }
.plain-list { margin: 0 0 12px; padding-left: 18px; color: var(--core-ink); font-size: 14px; }
.plain-list li { margin: 6px 0; }

/* ---------------------------------------------------------------- Access controller */
.access-pad { width: 100%; max-width: 340px; display: block; margin: 0 auto; }
.access-body { fill: #2a2f3d; stroke: #3b4152; stroke-width: 2; }
.access-key circle { fill: #353b4b; stroke: #454c5f; stroke-width: 1.5; transition: fill .06s; }
.access-key text { fill: var(--core-ink); font: 700 14px "Archivo", sans-serif; text-anchor: middle; }
.access-key.on circle { fill: var(--accent); stroke: #8c98ff; }
.access-small { justify-content: center; margin-top: 10px; }
.pill { padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #353b4b; color: var(--core-ink); }
.pill.on { background: var(--accent); color: #fff; }
.acts-label { align-self: center; font-size: 13px; color: var(--core-muted); font-weight: 600; min-width: 110px; }
.dtable tr.on td { color: #fff; background: rgba(91,108,255,.2); }
.circ-canvas { width: 100%; max-width: 300px; height: auto; aspect-ratio: 1; display: block; margin: 0 auto; border-radius: 14px; background: var(--core); }
input[type=color] { width: 56px; height: 40px; border: 0; border-radius: 10px; background: none; cursor: pointer; padding: 0; }

/* ---------------------------------------------------------------- polling rate and triggers */
.rate-chart { width: 100%; height: 220px; display: block; background: var(--core); border-radius: 14px; }
.unit { font-size: .4em; color: var(--core-muted); font-weight: 600; letter-spacing: 0; }
.trig-meter { position: relative; height: 22px; border-radius: 999px; background: #2a2f3d; overflow: hidden; margin: 6px 0 8px; box-shadow: inset 0 0 0 1.5px var(--core-line); }
.trig-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #3f4bd1, var(--glow)); }
.trig-click { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; left: -10px; }
.log-wrap { max-height: 320px; overflow: auto; margin-top: 12px; border-radius: 12px; }
.log-table td { font-variant-numeric: tabular-nums; }
.cmp-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 12px; }
.cmp-card { background: #2a2f3d; border-radius: 16px; padding: 14px; box-shadow: inset 0 0 0 1.5px var(--core-line); }
.cmp-card.live { box-shadow: inset 0 0 0 2px var(--glow); }
.cmp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmp-head small { color: var(--core-muted); width: 100%; }
.cmp-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.cmp-sticks { display: flex; gap: 10px; justify-content: center; margin: 10px 0; }
.cmp-sticks canvas { width: 110px; height: 110px; background: var(--core); border-radius: 12px; }
.cmp-pressed { font-size: 13px; color: var(--core-muted); min-height: 1.4em; margin: 0 0 8px; }
.cmp-table th:first-child { text-align: left; }
.cmp-best { color: #fff; background: rgba(91,108,255,.25); font-weight: 700; }
.contribute { margin-top: 18px; padding: 16px; border-radius: 14px; background: rgba(91,108,255,.1); box-shadow: inset 0 0 0 1px rgba(91,108,255,.35); }
.contribute p { margin: 0 0 10px; font-size: 14px; }
@media print { .contribute { display: none !important; } }
.stat-facts { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat-big { font-size: 34px !important; font-weight: 800 !important; font-variation-settings: var(--wide); }
.stat-big small { font-size: 15px; color: var(--core-muted); font-weight: 600; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 80px 1fr 44px; gap: 10px; align-items: center; font-size: 14px; }
.bars .bar { height: 14px; border-radius: 999px; background: #2a2f3d; overflow: hidden; }
.bars .bar div { height: 100%; background: var(--glow); border-radius: 999px; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }
.preview-bar { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: #fff3d6; color: #6b4a00; font-weight: 600; font-size: 14px; }
.cal-steps { margin: 0; padding-left: 22px; display: grid; gap: 14px; }
.cal-steps li { padding: 12px 14px; border-radius: 14px; background: #2a2f3d; }
.cal-steps li::marker { color: var(--core-muted); font-weight: 700; }
.cal-steps li.now { box-shadow: inset 0 0 0 2px var(--glow); }
.cal-steps li.ok { box-shadow: inset 0 0 0 1.5px #1fa774; }
.cal-steps p { margin: 6px 0 10px; font-size: 14px; color: var(--core-muted); }
.cal-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.cal-agree input { width: 24px; height: 24px; flex: none; margin-top: 1px; }
.lang-switch { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 18px; padding-bottom: 4px; font-size: 14px; }
.lang-switch a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.lang-switch a[aria-current] { color: var(--ink); font-weight: 700; }

/* Long words in other languages (German especially) must wrap, not push the page sideways. */
.prose, .display, .lede, .gauge, .step-text, .verdict, .testlist, .footer-links { overflow-wrap: break-word; }
.prose, .lede, .step-text, .verdict, .hint { hyphens: auto; }
.display { hyphens: manual; }
@media (max-width: 640px) {
  .prose table { display: block; overflow-x: auto; }
  .display { hyphens: auto; }
}
