@charset "UTF-8";

:root {
  color-scheme: dark;
  --bg: #101211;
  --surface: #191c19;
  --surface-high: #20241f;
  --line: #30362e;
  --muted: #a1a79d;
  --text: #f1f3ec;
  --lime: #c7f36a;
  --peach: #eab49b;
  --radius: 16px;
  --mono: ui-monospace,"Cascadia Code","SFMono-Regular",Consolas,monospace;
  --sans: Inter,"Segoe UI",Arial,sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,input,select {
  font: inherit;
}

button,a,select,summary {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

button:focus-visible,a:focus-visible,summary:focus-visible,select:focus-visible,input:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 5px;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--lime);
}

button,select,a,summary {
  transition: color .16s,background .16s,border-color .16s;
}

button[hidden],[hidden] {
  display: none !important;
}

h1,h2,h3,p {
  margin: 0;
}

h1,h2,h3 {
  font-weight: 600;
  line-height: 1.2;
}

svg {
  display: block;
}

fieldset {
  margin: 0;
  min-width: 0;
}

kbd {
  display: inline-block;
  border: 1px solid #4a5145;
  border-bottom-width: 2px;
  background: #272d23;
  border-radius: 5px;
  min-width: 23px;
  padding: 0 5px;
  text-align: center;
  color: #dce9ca;
  font: 12px/21px var(--mono);
}

.wrap {
  width: min(1200px,calc(100% - 80px));
  margin-inline: auto;
}

.muted {
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 10;
  padding: 12px 20px;
  background: var(--lime);
  color: #111;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 22px;
  letter-spacing: -1px;
  font-weight: 750;
  white-space: nowrap;
}

.wordmark-soft {
  font-weight: 400;
}

.wiki {
  font: 11px var(--mono);
  letter-spacing: 0;
  color: var(--muted);
  align-self: flex-end;
  margin: 0 0 6px 3px;
}

.brand-icon {
  width: 29px;
  height: 31px;
  margin-right: 11px;
  display: inline-flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
}

.brand-icon i {
  width: 4px;
  border-radius: 3px;
  background: var(--lime);
  height: 12px;
  display: block;
}

.brand-icon i:nth-child(2) {
  height: 26px;
}

.brand-icon i:nth-child(3) {
  height: 19px;
}

.brand-icon i:nth-child(4) {
  height: 8px;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--muted);
  height: 100%;
  font-size: 13px;
}

.site-header nav a {
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
}

.site-header nav .nav-active {
  color: var(--text);
}

.nav-active:after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--lime);
}

.header-note {
  font-size: 11px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: #bac1b2;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
}

.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 45px 0 30px;
}

.eyebrow,.section-label,.local-label,.metric-caption,.stage-top,.section-number {
  font: 10px/1.5 var(--mono);
  letter-spacing: 1.15px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 9px;
}

.small-line {
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--lime);
}

h1 {
  font-size: clamp(34px,3.8vw,49px);
  letter-spacing: -2px;
  margin: 10px 0 9px;
}

.heading-dot {
  color: var(--lime);
}

.intro>div>p {
  font-size: 17px;
  letter-spacing: -.25px;
}

.intro-aside {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  margin-bottom: 4px;
  line-height: 1.9;
}

.intro-aside strong {
  font-weight: 400;
  color: #d7dcce;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0,1fr) 295px;
  gap: 20px;
  scroll-margin-top: 20px;
}

.test-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-bar {
  padding: 17px 23px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-bar .section-label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #d0d9c4;
}

.local-label {
  color: #858d7d;
  font-size: 9px;
}

.test-settings {
  padding: 18px 23px 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.mode-switch {
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 7px;
  display: flex;
  flex-shrink: 0;
}

.mode-switch label {
  cursor: pointer;
  position: relative;
}

.mode-switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  pointer-events: none;
}

.mode-switch span {
  display: block;
  font-size: 11px;
  padding: 6px 12px;
  color: var(--muted);
  border-radius: 4px;
}

.mode-switch input:checked+span {
  background: #353d2b;
  color: #e2f7bd;
}

.mode-switch input:focus-visible+span {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.presets {
  display: flex;
  gap: 4px;
}

.preset {
  min-width: 34px;
  min-height: 34px;
  background: none;
  border: 1px solid transparent;
  border-radius: 5px;
  font: 11px var(--mono);
  color: var(--muted);
  padding: 5px;
}

.preset:hover {
  background: #293023;
}

.preset.selected {
  border-color: #596543;
  color: var(--lime);
  background: #272e20;
}

.input-select {
  margin-left: auto;
}

.input-select select {
  max-width: 145px;
  color: #d2d8ca;
  background: transparent;
  border: 0;
  font-size: 11px;
  padding: 9px 0;
  cursor: pointer;
}

.input-select option {
  background: var(--surface);
}

.live-stage {
  padding: 25px 28px 19px;
  position: relative;
  text-align: center;
}

.stage-top {
  display: flex;
  justify-content: space-between;
  color: #a2aa98;
  font-size: 9px;
}

.live-tag {
  font-size: 8px;
  color: #848e78;
  letter-spacing: .6px;
}

.bpm-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 17px;
  height: 125px;
}

.bpm-display>#bpm {
  font: 600 clamp(67px,7vw,90px)/1 var(--mono);
  letter-spacing: -7px;
  font-variant-numeric: tabular-nums;
}

.bpm-unit {
  display: block;
  text-align: left;
  color: var(--lime);
  font: 13px/1.5 var(--mono);
  letter-spacing: 1px;
  margin-top: 18px;
}

.bpm-unit>span {
  display: block;
  color: #929e84;
  font: 9px/1.7 var(--sans);
  letter-spacing: 0;
}

.stage-instruction {
  font-size: 12px;
  color: #afb5a5;
  min-height: 24px;
}

.stage-instruction kbd {
  margin: 0 3px;
}

.key-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 22px 0 15px;
}

.tap-key {
  background: #2a3223;
  width: 91px;
  height: 76px;
  border-radius: 11px;
  border: 1px solid #758556;
  border-bottom: 4px solid #77865a;
  color: var(--lime);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}

.tap-key>span:first-child {
  font: 500 24px var(--mono);
}

.tap-key.second {
  background: #352b25;
  border-color: #8f6e5b;
  border-bottom-color: #9b7662;
  color: var(--peach);
}

.tap-key .key-count {
  font: 9px var(--mono);
  color: #c0c8b6;
}

.tap-key.second .key-count {
  color: #cbb5a8;
}

.tap-key.is-hit {
  background: var(--lime);
  color: #182111;
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: 0 0 25px #c7f36118;
}

.tap-key.is-hit .key-count {
  color: #263419;
}

.tap-key.second.is-hit {
  background: var(--peach);
  color: #2b1a12;
}

.tap-key.second.is-hit .key-count {
  color: #36251b;
}

.alternation-symbol {
  font-size: 19px;
  color: #7e8972;
}

.stage-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  min-height: 27px;
}

.text-button {
  background: none;
  border: 0;
  padding: 8px 0;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  min-height: 30px;
}

.text-button:hover {
  color: var(--lime);
}

.action-divider {
  width: 1px;
  height: 12px;
  background: var(--line);
}

.stop-button {
  background: #36251f;
  border: 1px solid #665040;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 10px;
  color: #f0c3ac;
}

.stop-button kbd {
  font-size: 9px;
  line-height: 16px;
  background: #302721;
  color: #efd4c4;
  border-color: #715744;
  margin-left: 4px;
}

.run-progress {
  height: 2px;
  background: #30372a;
  margin-top: 0;
}

.run-progress>div {
  width: 0;
  height: 100%;
  background: var(--lime);
}

.live-metrics {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1.4fr 1fr;
  padding: 18px 23px;
  gap: 15px;
}

.metric-caption {
  display: block;
  font-size: 8px;
  letter-spacing: .5px;
  color: #a1a994;
  white-space: nowrap;
}

.live-metrics strong {
  font: 400 21px/1.7 var(--mono);
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
}

.live-metrics small {
  font-size: 10px;
  color: #99a18d;
  letter-spacing: 0;
}

.test-footnote {
  border-top: 1px solid var(--line);
  padding: 11px 23px;
  font-size: 9px;
  color: #939c87;
  display: flex;
  gap: 6px;
  align-items: center;
}

.test-footnote>span:last-child {
  margin-left: auto;
  color: #b7bfac;
}

.shield-icon {
  color: var(--lime);
}

.side-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-card {
  border: 1px solid #465236;
  background: linear-gradient(140deg,#262e20,#1b2018);
  border-radius: var(--radius);
  padding: 22px;
  flex: 1;
}

.result-card>.section-label {
  color: #b3c09f;
  font-size: 9px;
}

.result-heading {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin: 15px 0 10px;
}

.result-heading h2 {
  font-size: 24px;
  letter-spacing: -.9px;
  line-height: 1.18;
}

.result-arrow {
  font-size: 26px;
  color: var(--lime);
  line-height: 1.1;
}

.result-card>p {
  font-size: 11px;
  color: #b7c0ab;
  line-height: 1.8;
}

.result-stats {
  margin-top: 17px;
}

.result-stats>div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #3a4430;
  padding: 9px 0;
  font-size: 10px;
  color: #c0c9b4;
}

.result-stats small {
  font-size: 9px;
  color: #9da98d;
}

.result-stats strong {
  font: 400 17px var(--mono);
  color: #e4f5cc;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 20px;
  background: var(--lime);
  color: #1d2812;
  border: 0;
  border-radius: 7px;
  min-height: 40px;
  font-size: 11px;
  font-weight: 650;
}

.share-button:not(:disabled):hover {
  background: #dbff95;
}

.share-button:disabled {
  background: #343e2a;
  color: #b4bfaa;
  opacity: .7;
}

.storage-note {
  display: block;
  text-align: center;
  color: #a2ae94;
  font-size: 9px;
  margin-top: 10px;
  line-height: 1.5;
}

.tip-card {
  display: flex;
  gap: 11px;
  background: #1b1e19;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 17px;
}

.tip-icon {
  color: var(--lime);
  font-size: 23px;
  line-height: 1;
}

.tip-card h2 {
  font-size: 11px;
  margin: 0 0 6px;
  letter-spacing: -.1px;
}

.tip-card p {
  font-size: 10px;
  line-height: 1.8;
  color: #a7b09b;
}

.feedback {
  font-size: 10px;
  color: #adb69f;
  margin: 10px 3px 20px;
  min-height: 16px;
}

.feedback.error {
  color: #f1b69d;
}

.noscript {
  padding: 20px;
  background: #472b23;
  color: #ffe7c6;
  border-radius: 8px;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 23px 26px 15px;
}

.chart-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.section-label {
  color: var(--muted);
  font-size: 9px;
}

.chart-heading h2 {
  font-size: 18px;
  letter-spacing: -.5px;
  margin-top: 5px;
}

.chart-legend {
  font-size: 10px;
  color: #b8c1ae;
  display: flex;
  gap: 7px;
  align-items: center;
}

.chart-legend>span {
  width: 15px;
  height: 2px;
  background: var(--lime);
}

.chart-legend small {
  font: 9px var(--mono);
  margin-left: 12px;
  color: #929e87;
}

.chart-shell {
  height: 155px;
  position: relative;
  margin-top: 15px;
}

.chart-shell>svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-shell>p {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font: 10px var(--mono);
  color: #a1aa97;
  letter-spacing: .2px;
}

.chart-footer {
  display: flex;
  justify-content: space-between;
  font: 9px var(--mono);
  color: #909b83;
  padding-top: 6px;
}

.chart-footer>span:nth-child(2) {
  color: #a4ae97;
}

.history-section {
  margin: 32px 0 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  font-size: 23px;
  letter-spacing: -.6px;
  margin-top: 6px;
}

.section-heading h2>span {
  font: 11px var(--mono);
  color: var(--lime);
  vertical-align: middle;
  margin-left: 12px;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 18px;
  border-block: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 650px;
}

th {
  font: 9px var(--mono);
  letter-spacing: .7px;
  color: #939e86;
  padding: 13px 15px;
  background: #171a16;
}

td {
  padding: 13px 15px;
  font: 11px var(--mono);
  border-top: 1px solid #282e24;
  color: #b7c2aa;
}

td:nth-child(3) {
  color: var(--lime);
  font-weight: 600;
}

.history-empty {
  text-align: center;
  padding: 30px 15px;
  color: #9ca88d;
  font: 11px var(--sans);
}

.history-helper {
  font-size: 10px;
  color: #949f88;
  margin: 10px 0 0;
}

.guide-section {
  border-top: 1px solid var(--line);
  padding-top: 45px;
  margin-top: 58px;
}

.section-number {
  font-size: 9px;
  color: #8d9980;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 30px;
  margin: 28px 0 35px;
}

.how-grid article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 23px;
}

.step-number {
  color: var(--lime);
  font: 12px var(--mono);
}

.how-grid h3 {
  font-size: 16px;
  margin: 20px 0 10px;
  letter-spacing: -.3px;
}

.how-grid p,.reading-card p,.reading-card dd,.practice-section p,.faq-list p {
  font-size: 12px;
  line-height: 1.9;
  color: #b0baa4;
}

.reading-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.reading-card {
  background: #171b16;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
}

.reading-card h2 {
  font-size: 23px;
  letter-spacing: -.7px;
  margin: 9px 0 23px;
  max-width: 310px;
}

.reading-card dl {
  margin: 0;
}

.reading-card dl>div+div {
  margin-top: 22px;
}

.reading-card dt {
  font-size: 12px;
  color: #d8e0cf;
  margin-bottom: 6px;
  font-weight: 600;
}

.reading-card dd {
  margin: 0;
}

.formula {
  font: 15px/1.7 var(--mono);
  color: var(--lime);
  background: #242e1c;
  border: 1px solid #3c4d2b;
  border-radius: 9px;
  padding: 18px;
  margin: 23px 0 17px;
  text-align: center;
}

.reading-card .formula-example {
  margin-bottom: 18px;
}

.reading-card strong {
  color: #dbe9c9;
  font-weight: 500;
}

.reading-card h3 {
  font-size: 14px;
  margin: 26px 0 10px;
}

.reading-card p+p {
  margin-top: 14px;
}

.practice-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 65px;
  padding: 50px 5px;
  border-bottom: 1px solid var(--line);
}

.practice-section h2 {
  font-size: 29px;
  letter-spacing: -1px;
  margin: 12px 0 18px;
  max-width: 340px;
}

.practice-notes h3 {
  font-size: 13px;
  margin-bottom: 7px;
}

.practice-notes p+h3 {
  margin-top: 23px;
}

.faq-section {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 80px;
  padding: 55px 0;
}

.faq-section h2 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 12px 0 15px;
}

.faq-section>div>p {
  font-size: 12px;
  color: var(--muted);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list details:first-child {
  border-top: 1px solid var(--line);
}

.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 19px 28px 19px 0;
  font-size: 12px;
  color: #dce3d2;
  position: relative;
  line-height: 1.6;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary:after {
  content: "+";
  position: absolute;
  right: 3px;
  top: 18px;
  color: var(--lime);
  font-size: 17px;
}

.faq-list details[open] summary:after {
  content: "−";
}

.faq-list p {
  padding: 0 22px 20px 0;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 25px;
  margin-bottom: 35px;
}

.brand-icon.small {
  flex-shrink: 0;
  transform: scale(.8);
  margin: 0;
}

.privacy-note p {
  font-size: 11px;
  color: #a8b29d;
}

.privacy-note strong {
  color: #d7e1cb;
  font-weight: 500;
}

.privacy-note a {
  color: #cadcae;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-block: 25px;
  font-size: 10px;
  color: #9ca78e;
}

.footer-brand {
  font-size: 17px;
  color: #e3e9db;
}

.footer-brand .wiki {
  font-size: 9px;
  margin-bottom: 3px;
}

dialog {
  border: 1px solid #526140;
  background: #1c2218;
  border-radius: 18px;
  padding: 28px;
  max-width: 460px;
  width: calc(100% - 32px);
  color: var(--text);
  box-shadow: 0 25px 100px #0008;
}

dialog::backdrop {
  background: #090c09bc;
  backdrop-filter: blur(6px);
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.dialog-heading h2 {
  font-size: 23px;
  letter-spacing: -.6px;
}

.close-button {
  background: none;
  border: 0;
  font-size: 26px;
  color: var(--muted);
  width: 36px;
  height: 36px;
}

.dialog-heading+p {
  font-size: 12px;
  color: #b3bea8;
  margin-top: 12px;
}

.binding-slots {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.binding-slot {
  flex: 1;
  border: 1px solid #4e5d3d;
  border-bottom-width: 3px;
  border-radius: 10px;
  background: #283220;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
}

.binding-slot span {
  font: 10px var(--mono);
  color: #acba9b;
}

.binding-slot strong {
  font: 27px var(--mono);
  color: var(--lime);
}

.binding-slot small {
  font-size: 10px;
  color: #bbc6af;
}

.binding-slot.recording {
  border-color: var(--lime);
  background: #354627;
}

.binding-slots+p {
  font-size: 11px;
  min-height: 36px;
  color: #c7d6b7;
  margin-top: 17px;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.primary-button,.secondary-button {
  min-height: 42px;
  border-radius: 7px;
  padding: 8px 18px;
  font-size: 12px;
}

.primary-button {
  background: var(--lime);
  color: #202b15;
  border: 1px solid var(--lime);
  font-weight: 600;
}

.secondary-button {
  background: transparent;
  border: 1px solid #566347;
  color: #c0cbb4;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--lime);
  color: #1c2812;
  border-radius: 9px;
  padding: 13px 23px;
  font-size: 12px;
  box-shadow: 0 6px 25px #0006;
  z-index: 20;
  max-width: calc(100% - 30px);
  width: max-content;
  text-align: center;
}

body.running #live-dot {
  box-shadow: 0 0 0 4px #c7f36a15;
}

body.running .live-tag {
  color: var(--lime);
}

body.running .test-settings {
  opacity: .55;
}

@media (min-width:1500px) {
  .wrap {
    width: 1240px;
  }

  .intro {
    padding-top: 52px;
  }

  .live-stage {
    padding-top: 28px;
  }

  .bpm-display {
    height: 133px;
  }

  .tap-key {
    height: 80px;
  }
}

@media (max-width:1100px) {
  .wrap {
    width: calc(100% - 48px);
  }

  .workspace {
    grid-template-columns: minmax(0,1fr) 265px;
    gap: 16px;
  }

  .test-settings {
    gap: 8px;
    padding-inline: 17px;
  }

  .mode-switch span {
    padding-inline: 8px;
  }

  .preset {
    min-width: 29px;
  }

  .input-select select {
    max-width: 105px;
    font-size: 10px;
  }

  .live-metrics {
    gap: 10px;
    padding-inline: 17px;
  }

  .metric-caption {
    font-size: 7px;
  }

  .result-card {
    padding: 20px;
  }

  .intro-aside {
    font-size: 11px;
  }

  .site-header nav {
    gap: 22px;
  }

  .reading-card {
    padding: 23px;
  }
}

@media (max-width:900px) {
  .workspace {
    grid-template-columns: minmax(0,1fr) 240px;
  }

  .test-settings {
    flex-wrap: wrap;
    gap: 10px;
  }

  .input-select {
    margin-left: auto;
  }

  .live-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
  }

  .metric-caption {
    font-size: 8px;
  }

  .result-heading h2 {
    font-size: 22px;
  }

  .live-stage {
    padding-top: 20px;
  }

  .bpm-display {
    height: 115px;
  }

  .test-footnote {
    padding-inline: 17px;
    font-size: 8px;
  }

  .test-footnote>span:last-child {
    display: none;
  }

  .header-note {
    display: none;
  }

  .intro-aside {
    max-width: 230px;
  }

  .intro-aside br {
    display: none;
  }

  .how-grid {
    gap: 15px;
  }

  .how-grid article {
    padding: 20px;
  }

  .faq-section {
    gap: 40px;
  }

  .practice-section {
    gap: 35px;
  }
}

@media (max-width:700px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .site-header {
    height: 73px;
    gap: 15px;
  }

  .wordmark {
    font-size: 19px;
  }

  .brand-icon {
    margin-right: 7px;
    width: 23px;
    gap: 2px;
  }

  .wiki {
    font-size: 9px;
    margin-bottom: 4px;
  }

  .site-header nav {
    gap: 18px;
    font-size: 11px;
  }

  .site-header nav a:nth-child(2) {
    display: none;
  }

  .intro {
    padding: 29px 0 22px;
    display: block;
  }

  .eyebrow {
    font-size: 8px;
    letter-spacing: .9px;
  }

  h1 {
    font-size: 36px;
    letter-spacing: -1.5px;
    margin: 10px 0;
  }

  .intro>div>p {
    font-size: 15px;
  }

  .intro-aside {
    display: none;
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card-bar {
    padding: 15px 17px;
  }

  .local-label {
    font-size: 8px;
  }

  .test-settings {
    padding: 15px 15px 0;
    gap: 8px;
  }

  .mode-switch span {
    padding: 8px 10px;
  }

  .preset {
    min-width: 32px;
    min-height: 38px;
  }

  .input-select {
    margin-left: auto;
  }

  .input-select select {
    max-width: 120px;
    min-height: 40px;
  }

  .live-stage {
    padding: 20px 19px 17px;
  }

  .bpm-display {
    height: 115px;
  }

  .bpm-display>#bpm {
    font-size: 80px;
  }

  .stage-top {
    font-size: 8px;
    letter-spacing: .8px;
  }

  .stage-instruction {
    font-size: 11px;
  }

  .key-area {
    margin-top: 21px;
    gap: 22px;
  }

  .tap-key {
    width: 94px;
    height: 80px;
  }

  .text-button {
    min-height: 40px;
  }

  .live-metrics {
    grid-template-columns: 1fr 1fr;
    padding: 17px 20px;
    gap: 12px 20px;
  }

  .metric-caption {
    font-size: 8px;
  }

  .live-metrics strong {
    font-size: 22px;
  }

  .test-footnote {
    font-size: 9px;
  }

  .side-rail {
    gap: 12px;
  }

  .result-card {
    padding: 20px;
  }

  .result-heading {
    margin: 9px 0 8px;
    align-items: center;
    justify-content: space-between;
  }

  .result-heading h2 {
    font-size: 22px;
  }

  .result-stats {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 14px;
    margin-top: 13px;
  }

  .result-stats>div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 5px;
    padding-bottom: 10px;
    font-size: 9px;
  }

  .result-stats small {
    font-size: 8px;
  }

  .result-stats strong {
    font-size: 22px;
  }

  .share-button {
    margin-top: 16px;
    min-height: 44px;
  }

  .tip-card {
    padding: 15px;
  }

  .tip-card h2 {
    font-size: 12px;
  }

  .tip-card p {
    font-size: 11px;
  }

  .feedback {
    margin: 10px 2px 16px;
    line-height: 1.7;
  }

  .chart-card {
    padding: 20px 17px 15px;
  }

  .chart-heading h2 {
    font-size: 17px;
  }

  .chart-legend {
    font-size: 9px;
  }

  .chart-legend small {
    display: none;
  }

  .chart-shell {
    height: 135px;
  }

  .chart-shell>p {
    font-size: 9px;
  }

  .chart-footer {
    font-size: 8px;
  }

  .chart-footer>span:nth-child(2) {
    max-width: 70%;
    text-align: center;
  }

  .history-section {
    margin-top: 25px;
  }

  .section-heading h2 {
    font-size: 21px;
  }

  .section-heading .text-button {
    font-size: 9px;
  }

  .section-label {
    font-size: 8px;
    letter-spacing: 1px;
  }

  .history-helper {
    font-size: 9px;
  }

  .guide-section {
    margin-top: 38px;
    padding-top: 30px;
  }

  .section-number {
    display: none;
  }

  .how-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 22px;
  }

  .how-grid article {
    padding: 20px;
    display: grid;
    grid-template-columns: 24px 1fr;
    column-gap: 13px;
  }

  .how-grid .step-number {
    margin-top: 2px;
  }

  .how-grid h3 {
    margin: 0 0 8px;
    font-size: 16px;
  }

  .how-grid p {
    grid-column: 2;
  }

  .reading-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .reading-card {
    padding: 23px;
  }

  .reading-card h2 {
    font-size: 23px;
  }

  .practice-section {
    grid-template-columns: 1fr;
    padding: 35px 3px;
    gap: 25px;
  }

  .practice-section h2 {
    font-size: 26px;
    max-width: none;
  }

  .faq-section {
    grid-template-columns: 1fr;
    gap: 23px;
    padding: 35px 0;
  }

  .faq-section h2 {
    font-size: 26px;
  }

  .faq-section>div>p {
    display: none;
  }

  .faq-list summary {
    font-size: 12px;
    min-height: 55px;
  }

  .privacy-note {
    padding: 17px;
    gap: 9px;
  }

  .privacy-note p {
    font-size: 10px;
  }

  .site-footer {
    flex-wrap: wrap;
    row-gap: 12px;
    justify-content: space-between;
    padding-block: 21px;
  }

  .site-footer>span {
    display: none;
  }

  .stop-button {
    min-height: 36px;
  }

  .binding-slot {
    min-height: 115px;
  }
}

@media (max-width:380px) {
  .test-settings {
    gap: 7px;
  }

  .mode-switch span {
    padding-inline: 8px;
    font-size: 10px;
  }

  .presets {
    gap: 2px;
  }

  .preset {
    min-width: 29px;
  }

  .input-select {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
  }

  .live-stage {
    padding-top: 12px;
  }

  .result-stats {
    gap: 8px;
  }

  .stage-top {
    font-size: 7px;
  }
}

/* Keep touch targets generous without making the benchmark visually heavy. */

.preset {
  min-width: 44px;
  min-height: 44px;
}

.mode-switch span {
  min-height: 38px;
  display: flex;
  align-items: center;
}

.text-button {
  min-height: 44px;
}

.input-select select {
  min-height: 44px;
}

.how-grid p,.reading-card p,.reading-card dd,.practice-section p,.faq-list p {
  font-size: 14px;
}

.result-card>p {
  font-size: 12px;
}

.tip-card p {
  font-size: 11px;
}

.table-scroll:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}

@media (max-width:700px) {
  .mode-switch span {
    min-height: 44px;
  }

  .test-settings {
    row-gap: 7px;
  }

  .preset {
    min-width: 44px;
    min-height: 44px;
  }

  .presets {
    gap: 3px;
  }

  .input-select select {
    min-height: 44px;
  }

  .text-button {
    min-height: 44px;
  }

  .how-grid p,.reading-card p,.reading-card dd,.practice-section p,.faq-list p {
    font-size: 14px;
  }

  .privacy-note p {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

  *,*:before,*:after {
    transition: none !important;
    animation: none !important;
  }
}

/* Shared branding and site information pages. */

.brand-mark {
  display: block;
  margin-inline-end: 8px;
  border-radius: 5px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-information {
  max-width: 760px;
  margin: 0 auto 64px;
}

.site-information .intro {
  justify-content: flex-start;
}

.site-information .reading-card section {
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.site-information .reading-card h2 {
  font-size: 20px;
}

.site-information .share-button {
  display: inline-flex;
  width: auto;
  margin-top: 20px;
  padding-inline: 16px;
}

.site-information .reading-card p a,
.guide-link {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

.guide-link {
  display: inline-block;
  margin-top: 16px;
}

.practice-section > div:first-child > p + p {
  margin-top: 14px;
}

.language-picker {
  position: relative;
  color: var(--text);
  flex-shrink: 0;
}

.language-picker summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  min-height: 44px;
  padding: 0 10px;
  cursor: pointer;
}

.language-picker summary::-webkit-details-marker {
  display: none;
}

.language-picker ul {
  position: absolute;
  z-index: 5;
  inset-inline-end: 0;
  min-width: 10rem;
  list-style: none;
  padding: 4px;
  margin-top: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.language-picker li > * {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
}

.language-picker [aria-current="page"] {
  color: var(--lime);
}

.site-footer nav small {
  flex-basis: 100%;
}

@media (max-width: 700px) {
  .site-header {
    height: auto;
    flex-wrap: wrap;
    gap: 0;
    padding-top: 12px;
  }

  .site-header .wordmark {
    min-height: 40px;
  }

  .site-header nav {
    width: 100%;
    gap: 20px;
    order: 2;
  }

  .site-header nav a,
  .site-header nav a:nth-child(2) {
    display: flex;
    min-height: 44px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .site-information {
    margin-bottom: 40px;
  }
}
