/* DeviTest — shared styles for the v7.3 tools (typing, resolution, DPI, color vision, spacebar, A/V sync) */
.big-num { font-size: clamp(40px, 9vw, 72px); font-weight: 800; color: var(--text-strong); line-height: 1.05; direction: ltr; unicode-bidi: plaintext; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.big-sub { color: var(--text-dim); font-size: 14px; margin-top: 6px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border-light); border-radius: 10px; overflow: hidden; }
.seg button { font: inherit; font-size: 14px; padding: 9px 14px; border: 0; background: var(--bg-panel); color: var(--text-dim); cursor: pointer; min-height: 42px; }
.seg button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.share-row .cta { font-size: 14px; padding: 10px 14px; }
.t3-box { margin-top: 14px; padding: 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-panel); }
/* typing */
.ty-text { height: 7.2em; overflow: hidden; font-size: clamp(18px, 2.6vw, 24px); line-height: 1.8em; color: var(--text-dimmer); user-select: none; -webkit-user-select: none; position: relative; }
.ty-text span { padding: 0 2px; border-radius: 4px; }
.ty-text .cur { background: rgba(37, 99, 235, .22); color: var(--text-strong); }
.ty-text .cur.err { background: rgba(239, 68, 68, .25); }
.ty-text .ok { color: #22c55e; }
.ty-text .bad { color: #ef4444; text-decoration: underline; text-decoration-thickness: 2px; }
.ty-in { width: 100%; box-sizing: border-box; margin-top: 12px; font: inherit; font-size: 20px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-light); background: var(--bg-panel); color: var(--text-strong); }
.ty-in:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.ty-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ty-time { font-size: 28px; font-weight: 800; color: var(--text-strong); font-variant-numeric: tabular-nums; direction: ltr; }
/* pads (spacebar, DPI) */
.t3-pad { margin-top: 14px; min-height: 220px; border-radius: 16px; border: 2px dashed var(--border-light); background: var(--bg-panel); display: grid; place-items: center; text-align: center; padding: 20px; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; color: var(--text); font-size: 16px; }
.t3-pad.active { border-color: var(--accent); border-style: solid; }
.t3-pad:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dpi-runs { margin-top: 10px; font-size: 14px; color: var(--text-dim); direction: ltr; unicode-bidi: plaintext; }
.t3-in { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.t3-in input, .t3-in select { font: inherit; font-size: 16px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--border-light); background: var(--bg-panel); color: var(--text-strong); width: 110px; }
/* color vision */
.cv-plate { display: block; margin: 14px auto 0; width: min(100%, 360px); height: auto; aspect-ratio: 1; border-radius: 50%; background: #fff; }
.cv-keys { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-width: 420px; margin: 14px auto 0; }
.cv-keys button { font: inherit; font-size: 20px; font-weight: 700; min-height: 52px; border-radius: 12px; border: 1px solid var(--border-light); background: var(--bg-panel); color: var(--text-strong); cursor: pointer; }
.cv-keys button.none { grid-column: span 5; font-size: 15px; font-weight: 600; }
.cv-step { text-align: center; color: var(--text-dim); font-size: 14px; margin-top: 10px; }
/* A/V sync */
.av-stage { margin-top: 14px; height: 220px; border-radius: 16px; background: #05070d; display: grid; place-items: center; }
.av-dot { width: 120px; height: 120px; border-radius: 50%; background: #1e293b; transition: none; }
.av-dot.on { background: #f8fafc; box-shadow: 0 0 40px rgba(248, 250, 252, .6); }
.av-ctl { margin-top: 12px; display: grid; gap: 8px; }
.av-ctl input[type=range] { width: 100%; }
.av-read { font-size: 22px; font-weight: 800; color: var(--text-strong); direction: ltr; unicode-bidi: plaintext; }

/* a11y-v74 */
[data-theme="light"] .ty-text .ok { color: #15803d; }
[data-theme="light"] .ty-text .bad { color: #b91c1c; }

/* touchpad test */
.tp-pad { --tp-trail: #22d3ee; position: relative; min-height: 280px; padding: 0; cursor: crosshair; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
[data-theme="light"] .tp-pad { --tp-trail: #0e7490; }
.tp-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tp-msg { position: absolute; inset-inline: 16px; bottom: 12px; margin: 0; text-align: center; color: var(--text-dim); font-size: 13px; pointer-events: none; }
.tp-zoom { position: absolute; left: 50%; top: 50%; width: 70px; height: 70px; border: 2px solid var(--accent); border-radius: 12px; transform: translate(-50%, -50%); opacity: .35; pointer-events: none; transition: transform .08s linear; }
.tp-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.tp-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-panel); }
.tp-st { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-light); display: grid; place-items: center; font-weight: 800; font-size: 13px; line-height: 1; }
.tp-steps li.ok { border-color: rgba(22, 163, 74, .45); }
.tp-steps li.ok .tp-st { background: #15803d; border-color: #15803d; color: #fff; }
.tp-steps li.warn { border-color: rgba(217, 119, 6, .55); }
.tp-steps li.warn .tp-st { background: #b45309; border-color: #b45309; color: #fff; }
.tp-tx b { display: block; color: var(--text-strong); font-size: 15px; line-height: 1.4; }
.tp-tx small { display: block; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.tp-val { display: block; margin-top: 3px; font-size: 13px; font-weight: 600; color: var(--text-dimmer); unicode-bidi: plaintext; }
.tp-steps li.ok .tp-val, .tp-steps li.warn .tp-val { color: var(--text); }
