:root { color-scheme: light; --paper: #f6f5f0; --ink: #242820; --muted: #74776d; --line: #e2e3da; --accent: #de5b36; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
button, textarea, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 4px; }
.wrapper { width: min(1080px, calc(100% - 80px)); margin-inline: auto; }
.site-header { min-height: 105px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 750; font-size: 22px; text-decoration: none; letter-spacing: -1px; }
.brand-key { display: inline-flex; justify-content: center; align-items: center; background: var(--ink); color: var(--paper); border-radius: 9px; width: 37px; height: 37px; font: bold 22px monospace; box-shadow: 0 3px 0 #bfc1b5; }
.brand-key span { color: #f88d6a; }
.preview-tag { font: 9px monospace; letter-spacing: 1px; border: 1px solid #cdd0c3; padding: 5px 7px; border-radius: 4px; margin-left: 5px; color: #65695f; }
.header-note { color: var(--muted); font-size: 12px; }
.site-nav { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; color: #626859; text-decoration: none; padding: 10px 12px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
.intro { padding: 54px 0 35px; }
h1 { font-size: clamp(44px, 6vw, 67px); letter-spacing: -3.5px; line-height: 1.04; margin: 0; font-weight: 750; }
h1 span { color: #868b7b; }
.intro-copy { font-size: 15px; line-height: 1.7; color: #6b7064; margin: 20px 0 0; }
.test { border: 2px solid #939d83; border-radius: 13px; background: #fffefa; overflow: hidden; box-shadow: 0 6px 24px #343b2418; }
.test-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 19px 27px; border-bottom: 1px solid var(--line); gap: 12px; }
.test-label { display: flex; align-items: center; gap: 9px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #7c8b60; }
h2 { font-size: 13px; font-weight: 600; margin: 0; }
.durations { display: flex; padding: 3px; margin: 0; border: 0; border-radius: 6px; background: #efefe8; gap: 3px; }
.durations label { position: relative; cursor: pointer; }
.durations input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.durations span { display: block; padding: 7px 13px; font: 12px monospace; color: #6b7064; border-radius: 4px; }
.durations input:checked + span { background: var(--ink); color: white; }
.durations:disabled { opacity: .55; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1fr 1.2fr; margin: 14px 0; }
.test-settings { padding-top: 16px; background: #f4f5ed; border-bottom: 1px solid var(--line); font-size: 12px; text-align: center; }
.mode-tabs-row { display: grid; grid-template-columns: minmax(8px, 1fr) minmax(0, 580px) minmax(8px, 1fr); align-items: end; }
.custom-editor { padding: 20px; border-bottom: 1px solid var(--line); }
.custom-editor label { display: block; font-weight: 600; margin-bottom: 12px; }
.custom-editor p { font-size: 12px; line-height: 1.7; color: #555e4b; }
#custom-error { color: #a52f1c; }
[data-edit-text] { text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 10px 0; }
.passage { position: relative; white-space: pre-wrap; text-align: start; }
.mode-tabs-row::before, .mode-tabs-row::after { content: ''; border-bottom: 1px solid #939d83; }
.mode-options { display: flex; gap: 4px; min-width: 0; border: 0; border-bottom: 1px solid #939d83; padding: 0; margin: 0; }
.mode-options label { position: relative; display: flex; flex: 1; min-width: 0; cursor: pointer; }
.mode-options label span { flex: 1; }
.mode-options input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.mode-options span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 12px; margin-bottom: -1px; border: 1px solid #939d83; border-radius: 7px 7px 0 0; color: #555e4b; font-weight: 600; }
.mode-options input:not(:disabled):hover + span { background: #eceee3; }
.mode-options input:checked + span { position: relative; background: #fffefa; border-color: #939d83; border-bottom-color: #fffefa; color: #343f29; }
.mode-options input:checked:hover + span { background: #fffefa; }
.mode-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.mode-options:disabled label { opacity: .7; }
.mode-options input:disabled, .mode-options:disabled label { cursor: default; }
.test-settings p { color: #555e4b; background: #fffefa; padding: 14px 16px; margin: 0; line-height: 1.6; }
.scoring-help { color: #555e4b; font-size: 13px; line-height: 1.8; margin: 16px 0 0; border: 1px solid #d6dcc8; border-radius: 8px; background: #fffefa; }
.scoring-help summary { cursor: pointer; padding: 15px 18px; font-weight: 600; }
.scoring-help summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.scoring-explanation { padding: 0 18px 18px; max-width: 780px; }
.scoring-explanation h2 { font-size: 15px; margin: 20px 0 8px; color: var(--ink); }
.scoring-explanation h2:first-child { margin-top: 0; }
.scoring-explanation p { margin: 8px 0; }
.result-context { color: #555e4b; font-size: 12px; margin-top: 10px; }
.stat { padding: 0 28px; border-right: 1px solid var(--line); }
.stat:last-child { border: 0; }
.stat-label { color: var(--muted); font: 9px monospace; letter-spacing: 1px; }
.stat p { font: 32px/1.1 monospace; letter-spacing: -1px; margin: 5px 0 0; }
.stat:first-child p { color: var(--accent); }
.unit { font-size: 13px; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.typing-area { padding: 25px 28px 20px; border-top: 1px solid var(--line); }
.passage-heading { display: flex; justify-content: space-between; gap: 15px; font: 9px monospace; letter-spacing: 1px; color: var(--muted); }
.language { color: #8b8e82; }
.passage { font: 23px/1.85 monospace; letter-spacing: -.5px; color: #8a8e80; height: 129px; overflow: auto; margin: 20px 0; scroll-behavior: smooth; overflow-wrap: anywhere; }
.passage .correct { color: #343f29; }
.passage .incorrect { color: #b23423; background: #fbe6dd; }
.passage .current { border-left: 2px solid var(--accent); margin-left: -2px; background: #eeeede; }
textarea { display: block; width: 100%; resize: vertical; min-height: 70px; padding: 13px 15px; font: 15px/1.5 monospace; color: var(--ink); background: #f8f8f3; border: 1px solid #dfe1d5; border-radius: 6px; }
textarea:focus { outline: 2px solid #de5b3666; border-color: var(--accent); }
textarea::placeholder { color: #858a7b; }
.test-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 17px; }
.test-bottom p { color: var(--muted); font-size: 11px; margin: 0; }
button { background: transparent; border: 0; color: #515849; font-size: 12px; padding: 7px 0 7px 10px; white-space: nowrap; }
button:hover { color: var(--accent); }
button span { margin-right: 6px; font-size: 17px; vertical-align: -1px; }
.result { padding: 20px 28px; background: #edf0e4; border-top: 1px solid #d6dcc8; font-size: 14px; line-height: 1.6; }
.test [hidden] { display: none; }
#result { padding: 32px; border-top: 4px solid #c64722; scroll-margin-top: 16px; }
#result:focus { outline: none; }
#result:focus-visible { outline: 2px solid #c64722; outline-offset: -6px; }
#result-title { font-size: clamp(22px, 3vw, 30px); line-height: 1.2; letter-spacing: -.6px; }
.result-scores { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px; margin: 28px 0; }
.result-scores dt { color: #555e4b; font-size: 12px; }
.result-scores dd { margin: 6px 0 0; font: 48px/1.15 monospace; letter-spacing: -2px; }
.result-scores small { font: 14px Arial, sans-serif; letter-spacing: 0; }
.result-speed dd { color: #b43c1b; font-size: 72px; font-weight: 700; }
.result-action { border-top: 1px solid #cbd3bf; padding-top: 22px; }
.result > p { margin: 0 0 16px; }
.result-action { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.result-action p { margin: 0; font-weight: 600; }
.try-again { min-height: 48px; padding: 12px 24px; border-radius: 6px; background: #c64722; color: #fff; font-size: 15px; font-weight: 600; }
.try-again:hover { background: #a93819; color: #fff; }
.try-again span { margin: 0 0 0 14px; }
.typing-review { margin-top: 24px; border-top: 1px solid #cbd3bf; padding-top: 12px; }
.typing-review summary { cursor: pointer; padding-block: 12px; font-weight: 600; color: #343f29; }
.typing-review summary:focus-visible { outline: 2px solid #c64722; outline-offset: 4px; }
.review-help { color: #555e4b; font-size: 12px; line-height: 1.7; }
.review-text { padding: 16px; margin: 10px 0 20px; background: #fffefa; border: 1px solid #d6dcc8; border-radius: 6px; font: 16px/1.8 monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow-y: auto; }
.review-error { color: #a52f1c; background: #fbe0d5; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; padding: 34px 0 42px; }
.tip-number { font: 10px monospace; color: var(--accent); }
h3 { font-size: 13px; margin: 12px 0 8px; }
.tips p { font-size: 12px; line-height: 1.7; color: var(--muted); max-width: 245px; margin: 0; }
footer { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-block: 23px; color: var(--muted); font-size: 10px; }
.footer-slash { margin: 0 9px; color: #a4a997; }
.home-intro { padding-bottom: 40px; }
.featured-tool { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 36px; padding: 36px; margin-bottom: 48px; border: 1px solid #d8dbcf; border-radius: 13px; background: #fffefa; box-shadow: 0 6px 24px #343b2410; }
.featured-copy h2 { font-size: 37px; line-height: 1.12; letter-spacing: -1.5px; font-weight: 700; }
.featured-copy > p { max-width: 560px; font-size: 16px; line-height: 1.8; color: #6b7064; margin: 16px 0 0; }
.feature-action { text-align: center; }
.primary-link { display: inline-flex; gap: 25px; align-items: center; justify-content: center; min-height: 48px; padding: 16px 24px; border-radius: 6px; background: var(--ink); color: #fffefa; text-decoration: none; font-size: 16px; font-weight: 600; }
.primary-link:hover { background: #3e4935; }
.primary-link span { color: #f88d6a; font-size: 20px; line-height: 1; }
.paper-clay { --accent: #d64c24; }
.paper-clay h1 span { color: #717a60; }
.paper-clay .primary-link { background: var(--accent); }
.paper-clay .primary-link:hover { background: #b93c19; }
.paper-clay .primary-link span { color: #fffefa; }
.feature-detail { display: block; font-size: 12px; color: #6b7064; margin-top: 12px; }
.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; }
@media (max-width: 650px) {
  .mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .mode-options label:nth-of-type(-n+2) span { margin-bottom: 0; border-radius: 7px; }
  .mode-options label:nth-of-type(-n+2) input:checked + span { border-bottom-color: #939d83; box-shadow: inset 0 -2px 0 #939d83; }
  #result { padding: 24px 20px; }
  .result-scores { grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0; }
  .result-speed { grid-column: 1 / -1; }
  .result-scores dd { font-size: 36px; }
  .result-speed dd { font-size: 64px; }
  .try-again { width: 100%; }
  .wrapper { width: calc(100% - 32px); }
  .site-header { min-height: 80px; }
  .site-header { flex-wrap: wrap; padding-block: 18px; gap: 15px; }
  .header-note, .language { display: none; }
  .brand { font-size: 20px; gap: 8px; }
  .preview-tag { font-size: 8px; margin-left: 0; }
  .intro { padding-top: 35px; }
  h1 { letter-spacing: -2.5px; }
  .desktop-break { display: none; }
  .test-toolbar { padding: 16px; }
  .durations span { padding: 7px 9px; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .stat { padding-inline: 18px; }
  .stat:nth-child(2) { border: 0; }
  .typing-area { padding: 22px 16px 16px; }
  .passage { font-size: 20px; height: 148px; }
  .test-bottom { align-items: flex-start; }
  .test-bottom p { max-width: 155px; line-height: 1.6; }
  .tips { gap: 22px; grid-template-columns: 1fr; padding: 30px 0; }
  .tips article { display: grid; grid-template-columns: 35px 1fr; }
  .tip-number { grid-row: span 2; padding-top: 2px; }
  h3 { margin-top: 0; }
  .tips p { max-width: none; }
  footer { flex-direction: column; gap: 10px; line-height: 1.6; }
  .featured-tool { grid-template-columns: 1fr; gap: 24px; padding: 26px; margin-bottom: 35px; }
  .feature-action { text-align: left; }
  .primary-link { width: 100%; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { .passage { scroll-behavior: auto; } }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 10; padding: 12px 18px; background: #242820; color: #fffefa; border-radius: 5px; }
.skip-link:focus { top: 12px; }
.passage { color: #6c725f; }
