/* Shared product tokens and responsive shell; existing tester styling stays intact. */
:root { --muted: #a0aec2; --soft: #c2cee0; --line: #2c384a; --border: var(--line); --sans: system-ui, -apple-system, "Segoe UI", sans-serif; --mono: ui-monospace, "Cascadia Code", Consolas, monospace; color-scheme: dark; }
[hidden] { display: none !important; }
body { overflow-x: visible; }
button, input, select, textarea { font: inherit; }
button, summary, a, select, input { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .6; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; left: 14px; top: -100px; padding: 14px; background: var(--accent); color: #081510; z-index: 999; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-shell { background: var(--bg); }
.sidebar { width: 242px; min-width: 242px; padding: 24px 14px; background: #0e141e; }
.brand { padding-bottom: 22px; }
.brand small, .nav-label, .nav-icon, .nav-item em, .sidebar-footer p, .latency-badge small, .brand small { color: var(--muted); }
.connection-pill { font-size: 11px; margin: 0 0 18px; min-height: 40px; }
.hardware-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 18px; }
.hardware-tab { min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--soft); font-size: 12px; }
.hardware-tab.active { background: #19342d; color: #b8f7d9; border-color: #60917d; font-weight: 700; }
.hardware-tab.active::before { content: '• '; }
.gamepad-navigation > summary, .utility-navigation > summary { padding: 12px 8px; min-height: 44px; cursor: pointer; color: var(--soft); font-size: 12px; font-weight: 600; }
.utility-navigation { margin-top: 12px; border-top: 1px solid var(--line); }
.nav-item { min-height: 40px; font-size: 12px; }
.nav-item.active { background: #192c28; }
.nav-label-spaced { margin-top: 12px; }
.sidebar-footer { margin-top: 24px; }
.creator-area { margin-top: 24px; }
.creator-powered { font-size: 10px; }
.topbar { min-height: 72px; height: auto; padding: 16px 28px; gap: 12px; flex-wrap: wrap; }
.top-actions { min-width: 0; max-width: 100%; }
.top-actions button { min-height: 40px; }
.controller-select { min-width: 0; max-width: 260px; }
#selectedName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs { font-size: 10px; color: var(--muted); flex-wrap: wrap; }
.suite-status { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 18px 28px 0; color: var(--muted); font: 10px var(--mono); }
.suite-status > span:first-child { letter-spacing: .12em; }
.page { padding: 26px 28px 40px; }
.page-title { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.04em; }
.page-intro { font-size: 13px; line-height: 1.75; }
.eyebrow { font-size: 10px; }
.card { background: var(--panel); box-shadow: none; border-radius: 10px; }
.controller-card { min-height: 0; }
.controller-card::before { display: none; }
.section-card, .controller-card:has(.pp-graphic) { padding: 20px; }
.section-card h3, .signal-card h3, .connection-card h3 { font-size: 14px; }
.toolbar p, .card-subtitle, .empty-state, .notice, .drift-copy p, .no-events, .desktop-download-copy p { font-size: 12px; }
.toolbar, .control-row, .card-head, .stick-panel-head { flex-wrap: wrap; }
.primary-btn, .secondary-btn, .danger-btn, .ghost-btn, .service-button { min-height: 44px; font-size: 12px; }
.primary-btn:hover { box-shadow: none; }
.preset { min-height: 64px; }
.range-control label, .metric-row span, .metric-row b { font-size: 12px; }
.range-control input { min-height: 36px; }
.metric-row { gap: 14px; }
.metric-row > * { overflow-wrap: anywhere; }
.meta-item span, .kpi span, .telemetry-cell span, .input-chip small, .input-chip .chip-index, .event-row time, .monitor-table th, .pp-version { color: var(--muted); }
.kpi span, .telemetry-cell span { font-size: 10px; }
.telemetry-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.telemetry-cell, .device-row, .compare-card { min-width: 0; overflow-wrap: anywhere; }
.device-row { flex-wrap: wrap; }
.telemetry-cell b { line-height: 1.6; }
.two-col { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.two-col > *, .right-stack > *, .overview-grid > * { min-width: 0; }
.two-col > .section-card + .section-card { margin-top: 0; }
.connection-pill.connected i, .tiny-status.connected, .pulse-dot, .live-tag i, .plot-dot, .bar-fill, .input-chip.is-down { box-shadow: none; }
.input-chip.is-down { transform: none; }
.input-chip.is-down::after { content: 'DOWN'; position: absolute; right: 8px; bottom: 8px; color: var(--accent); font: 9px var(--mono); }
.pp-control.is-active .pp-key { filter: none; }
.pp-control.is-unavailable, .pp-stick.is-unavailable { opacity: .8; }
.pp-control.is-unavailable .pp-key { stroke-dasharray: 3 3; }
.pp-stage { background: none; }
.pp3d-stage { position: relative; }
.pp3d-labels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pp-mapping-note { color: var(--muted); font-size: 11px; }
.no-events { color: var(--muted); }
.pp-dialog { overflow-y: auto; background: var(--panel); }
.pp-dialog-header { background: none; }
.pp-privacy small { color: var(--muted); }
.desktop-download-card { background: var(--panel); }
.suite-footer { padding: 0 28px 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 11px; }
.suite-dialog { width: min(640px, calc(100vw - 28px)); max-height: calc(100dvh - 36px); padding: 26px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; overflow-y: auto; }
.suite-dialog::backdrop { background: #03070cdb; }
.suite-dialog h2 { margin: 0 0 20px; font-size: 26px; letter-spacing: -.035em; }
.suite-dialog h3 { font-size: 15px; }
.suite-dialog-body { color: var(--soft); font-size: 14px; line-height: 1.8; }
.suite-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.suite-dialog .service-consent { margin: 18px 0 0; max-width: 100%; }
.release-section + .release-section { border-top: 1px solid var(--line); margin-top: 24px; }
.release-section ul { padding-left: 22px; }
.release-section li { margin-bottom: 9px; }
.release-metadata { color: var(--muted); }
.capability-row { display: grid; grid-template-columns: 1fr auto; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; gap: 4px 16px; }
.capability-row h3 { margin: 0; }
.capability-row strong { font-size: 12px; color: var(--accent); }
.capability-row p { grid-column: 1 / -1; font-size: 12px; margin-top: 6px; }
.toast-region { max-width: calc(100vw - 32px); }
.toast { overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .overview-grid, .two-col { grid-template-columns: minmax(0, 1fr); }
  .right-stack { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { width: 100%; min-width: 0; min-height: 0; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 0 16px; }
  .connection-pill, .sidebar-footer, .creator-area { display: none; }
  .hardware-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
  .hardware-tab { font-size: 11px; padding: 6px 2px; }
  .main-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; overflow: visible; }
  .nav-item { min-width: 0; justify-content: flex-start; gap: 6px; padding: 8px; min-height: 44px; font-size: 11px; }
  .nav-item em, .nav-label { display: none; }
  .nav-icon { width: 15px; flex: 0 0 15px; }
  .utility-navigation { margin-top: 4px; }
  .utility-navigation[open] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .utility-navigation > summary { grid-column: 1 / -1; }
  .topbar { padding: 14px 16px; min-height: 56px; }
  .crumbs { font-size: 9px; }
  .controller-select { max-width: 190px; }
  .suite-status { padding: 16px 16px 0; font-size: 9px; }
  .page { padding: 22px 16px 32px; }
  .right-stack, .stick-test-grid, .drift-hero { grid-template-columns: minmax(0, 1fr); }
  .telemetry-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-card { padding: 16px; }
  .suite-footer { padding: 0 16px 22px; flex-wrap: wrap; }
  .desktop-download-button { margin-left: 0; white-space: normal; }
  .controller-stage { height: auto; }
  .suite-dialog { padding: 22px; }
  .capability-row { grid-template-columns: minmax(0, 1fr); }
  .it-keyboard-layout { min-width: 860px; }
  .it-keycap b { font-size: 10px; }
  .it-keyboard-capture { overflow-x: auto; }
}
@media (max-width: 400px) {
  .main-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { align-items: flex-start; flex-direction: column; }
  .hardware-tab { font-size: 10px; }
  .section-card { padding: 12px; }
  .sequence-display { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
