/* FONT:<file> is replaced by the font's hashed URL at build time. */
@font-face {
  font-family: "DM Mono";
  src: url(/assets/DMMono-latin.fd7521f353.woff2) format("woff2");
  font-display: block;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "DM Mono";
  src: url(/assets/DMMono-latin-ext.7f8712cbbd.woff2) format("woff2");
  font-display: block;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Quando";
  src: url(/assets/Quando-latin.fe2345d1be.woff2) format("woff2");
  font-display: swap;
}

/* light: plosca.ru's paper and ink, Analytico's semantics */
:root {
  --bg: #ffffff;
  --main: #b53a2b;
  --main-big: #d64937;
  --caret: #d64937;
  --sub: #766a64;
  --sub-alt: #f5f2f0;
  --text: #282421;
  --error: #9f1d20;
  --error-extra: #c57779;
  --rule: #eeeeee;
  --border: #d9d9d9;
  --wash: rgba(214, 73, 55, 0.07);
  --selection: rgba(0, 0, 0, 0.12);
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Quando", Georgia, serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 10px;
  --shadow: 0 10px 30px rgba(40, 36, 33, 0.1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171717;
    --main: #ff6f61;
    --main-big: #ff6f61;
    --caret: #ff6f61;
    --sub: #9a9a9a;
    --sub-alt: #202020;
    --text: #eeeeee;
    --error: #ff7777;
    --error-extra: #cc8282;
    --rule: #262626;
    --border: #383838;
    --wash: rgba(240, 107, 93, 0.1);
    --selection: rgba(240, 107, 93, 0.34);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #171717;
  --main: #ff6f61;
  --main-big: #ff6f61;
  --caret: #ff6f61;
  --sub: #9a9a9a;
  --sub-alt: #202020;
  --text: #eeeeee;
  --error: #ff7777;
  --error-extra: #cc8282;
  --rule: #262626;
  --border: #383838;
  --wash: rgba(240, 107, 93, 0.1);
  --selection: rgba(240, 107, 93, 0.34);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  accent-color: var(--main-big);
}

::selection {
  background: var(--selection);
}

a {
  color: var(--main);
  text-decoration: none;
  transition: color 160ms var(--ease);
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--caret);
  outline-offset: 4px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------ header */

.top {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.6rem 1.25rem;
}

.mark {
  color: var(--main-big);
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.mark:hover {
  text-decoration: none;
}

.theme {
  margin: 0;
}

.theme button {
  padding: 0.2rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--main-big);
  font: 0.95rem var(--display);
  cursor: pointer;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}

.theme button:hover {
  border-color: var(--main-big);
}

.theme .glyph::after {
  content: "◐";
}

:root[data-theme="dark"] .theme .glyph::after {
  content: "◑";
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .glyph::after {
    content: "◑";
  }
}

.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  margin-left: auto;
}

.top nav a {
  color: var(--sub);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.top nav a[aria-current],
.top nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.top nav a {
  position: relative;
}

.top nav a[aria-current]::after {
  content: "";
  position: absolute;
  right: 0.14em;
  bottom: -0.5rem;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--main-big);
}

.top nav .me {
  color: var(--main);
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.85rem;
}

.top nav .me[aria-current] {
  color: var(--main);
}

.top nav .me[aria-current]::after {
  right: 0;
}

main {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.8rem 1.25rem 3rem;
}

main:focus {
  outline: none;
}

/* A page that takes a moment to arrive: a thin bar along the top. */
html.loading::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: 2px;
  background: var(--main-big);
  transform-origin: left;
  animation: loading 1.1s var(--ease) infinite;
}

@keyframes loading {
  from {
    transform: scaleX(0);
  }
  70% {
    transform: scaleX(0.85);
    opacity: 1;
  }
  to {
    transform: scaleX(1);
    opacity: 0;
  }
}

/* ------ setup bar: the test's options, and the leaderboard's */

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0.4rem auto 3.4rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius);
  background: var(--sub-alt);
  font-size: 0.82rem;
}

.bar .group {
  display: flex;
}

.bar a,
.bar .off > span {
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  color: var(--sub);
  white-space: nowrap;
}

.bar a:hover {
  color: var(--text);
  text-decoration: none;
}

.bar a.on {
  color: var(--main);
}

/* punctuation and numbers, which quotes don't take */
.bar .off > span {
  opacity: 0.38;
  cursor: default;
}

.bar .sep {
  width: 3px;
  height: 1.1rem;
  margin: 0 0.4rem;
  border-radius: 2px;
  background: var(--bg);
}

/* Every mode's options in one cell, so the bar never changes width. */
.bar .stack {
  display: grid;
}

.bar .stack > .set {
  display: flex;
  grid-area: 1 / 1;
  justify-content: center;
}

.bar .stack > .set[inert] {
  visibility: hidden;
}

/* ------ typing stage */

.stage {
  position: relative;
  min-height: 180px;
}

/* Out of focus, the words blur and say how to come back. */
.stage .lines-clip {
  transition: filter 220ms var(--ease), opacity 220ms var(--ease);
}

.stage.unfocused .lines-clip {
  filter: blur(4px);
  opacity: 0.4;
}

.stage.unfocused::after {
  content: "click or press any key to type";
  position: absolute;
  top: 45px;
  right: 0;
  left: 0;
  display: grid;
  height: 135px;
  place-items: center;
  color: var(--text);
  font-size: 0.92rem;
  pointer-events: none;
  animation: appear 220ms var(--ease);
}

@keyframes appear {
  from {
    opacity: 0;
  }
}

/* Page text above the lines, so it never moves with them. */
.timer {
  height: 45px;
  color: var(--main);
  font: 28px/45px var(--mono);
  contain: strict;
  transition: opacity 200ms var(--ease);
}

.timer:empty {
  opacity: 0;
}

/* Three lines show. The row above them, where a finished line slides away
   when the text scrolls, is clipped, and the edges fade so glyphs passing
   them soften instead of being cut. */
.lines-clip {
  position: relative;
  height: 135px;
  overflow: hidden;
  mask-image: linear-gradient(transparent, #000 7px, #000 calc(100% - 7px), transparent);
}

.lines {
  position: absolute;
  top: -45px;
  right: 0;
  left: 0;
  will-change: transform;
}

#words {
  display: block;
  cursor: text;
}

/* Moved with transform only, so the compositor animates it. The glide is a
   gentle ease in and out (Monkeytype's), which keeps an even pace when keys
   come faster than it finishes. */
.caret {
  position: absolute;
  top: 0;
  left: 0;
  width: 2.5px;
  border-radius: 2px;
  background: var(--caret);
  clip-path: inset(19% 0);
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.3, 0.1, 0.7, 0.9);
  will-change: transform, opacity;
  pointer-events: none;
}

/* Breathes rather than blinks: a soft fade out and back, from fully on. */
.caret.idle {
  animation: blink 1.1s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.typer-input {
  font-size: 16px;
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  resize: none;
  pointer-events: none;
}

.hint {
  margin-top: 3.2rem;
  color: var(--sub);
  font-size: 0.74rem;
  text-align: center;
}

kbd {
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font: 0.72rem var(--mono);
}

/* ------ result */

.after {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.8rem 1rem;
  margin-top: 2.6rem;
}

.after kbd {
  margin-left: 0.45rem;
}

.after [data-result-link] {
  color: var(--sub);
  font-size: 0.82rem;
}

/* Exact values on hover, instantly and in the page's own style. */
[data-tip] {
  position: relative;
  cursor: default;
}

[data-tip]::after {
  display: none;
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 3;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font: 0.74rem/1.3 var(--ui);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 140ms var(--ease), transform 140ms var(--ease);
}

[data-tip]:hover::after,
[data-tip]:focus::after {
  display: block;
  opacity: 1;
  transform: none;
  transition-delay: 60ms;
}

.result {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem 2.6rem;
  align-items: center;
}

.result .big .label {
  color: var(--sub);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.result .big .value {
  color: var(--main-big);
  font-family: var(--display);
  font-size: 4.2rem;
  line-height: 1.05;
  margin-bottom: 0.4rem;
}

.result .more {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}

.result .more .label,
.result .source .label {
  color: var(--sub);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.result .more .value {
  margin-top: 0.2rem;
  color: var(--text);
  font: 1.3rem var(--mono);
}

.result .source {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.result .source .label {
  margin-right: 0.6rem;
}

.result .invalid {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--error);
}

.result .when {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--sub);
  font-size: 0.8rem;
}

.chart-box {
  position: relative;
  min-width: 0;
  margin: 0;
}

.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart polyline {
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart polyline.wpm {
  stroke: var(--main-big);
  stroke-width: 2.5;
}

.chart polyline.raw {
  stroke: var(--main-big);
  stroke-opacity: 0.5;
  stroke-width: 1.75;
  stroke-dasharray: 6 6;
}

.chart polyline.burst {
  stroke: var(--sub);
  stroke-opacity: 0.8;
  stroke-width: 1.5;
}

.chart .burst-area {
  fill: var(--sub);
  opacity: 0.07;
}

.chart .err {
  fill: none;
  stroke: var(--error);
  stroke-width: 2;
  stroke-linecap: round;
}

.chart .grid {
  stroke: var(--rule);
}

.chart .axis {
  fill: var(--sub);
  font: 11px var(--ui);
}

.chart .err-axis {
  fill: var(--error);
}

[data-chart-hidden~="err"] .chart .err-axis {
  display: none;
}

/* hover readout: a guide, a dot per line and the values beside them */
.chart .hover {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms var(--ease);
}

.chart .guide {
  stroke: var(--sub);
  stroke-opacity: 0.45;
}

.chart .dot {
  stroke: var(--bg);
  stroke-width: 1.5;
}

.chart .dot.wpm,
.chart .dot.raw {
  fill: var(--main-big);
}

.chart .dot.burst {
  fill: var(--sub);
}

.chart-box .tip {
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  z-index: 5;
  gap: 0.45rem;
  min-width: 14rem;
  max-width: calc(100vw - 1.5rem);
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: var(--shadow);
  color: var(--text);
  font: 0.72rem/1.5 var(--mono);
  white-space: nowrap;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 120ms var(--ease);
}

.chart-box.hovering .hover,
.chart-box.hovering .tip {
  opacity: 1;
}

.chart-box.hovering .tip {
  display: grid;
}

.tip b {
  color: var(--sub);
  font-size: 0.68rem;
  font-weight: normal;
}

.tip .tip-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tip em {
  margin-left: auto;
  padding-left: 1rem;
  font: 0.8rem var(--mono);
  font-style: normal;
}

.tip-value {
  color: var(--main);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.3;
}

.tip-value small {
  margin-left: 0.4rem;
  color: var(--sub);
  font-size: 0.72rem;
}

.tip .tip-best {
  margin: 0.15rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule);
  color: var(--main);
  font-size: 0.68rem;
}

.chart-hover {
  opacity: 0;
  pointer-events: none;
}

.chart-active .chart-hover {
  opacity: 1;
}

.chart-hover .guide {
  stroke: var(--sub);
  stroke-opacity: 0.5;
  stroke-dasharray: 3 4;
}

.chart-selection {
  fill: var(--bg);
  fill-opacity: 0.7;
  stroke: var(--main);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

[data-chart-point].chart-point-active {
  fill: var(--main);
  opacity: 1;
}

.chart-box svg:focus-visible {
  outline-offset: 6px;
}

/* series toggles, shown while the chart is hovered */
.chart-box .legend {
  position: absolute;
  right: 0;
  bottom: -1.7rem;
  display: flex;
  gap: 0.15rem;
  opacity: 0;
  transition: opacity 160ms var(--ease);
}

.chart-box:hover .legend,
.chart-box:focus-within .legend {
  opacity: 1;
}

@media (hover: none) {
  .chart-box .legend {
    opacity: 1;
  }
}

.legend button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.55rem;
  border: 0;
  color: var(--sub);
  font-size: 0.72rem;
}

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

.swatch {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

.swatch.wpm {
  background: var(--main-big);
}

.swatch.raw {
  background: repeating-linear-gradient(90deg, var(--main-big) 0 4px, transparent 4px 7px);
  opacity: 0.7;
}

.swatch.burst {
  background: var(--sub);
}

.swatch.err {
  width: 8px;
  height: 8px;
  background: linear-gradient(45deg, transparent 40%, var(--error) 40% 60%, transparent 60%),
    linear-gradient(-45deg, transparent 40%, var(--error) 40% 60%, transparent 60%);
}

[data-chart-hidden~="raw"] .chart .raw,
[data-chart-hidden~="burst"] .chart .burst,
[data-chart-hidden~="burst"] .chart .burst-area,
[data-chart-hidden~="err"] .chart .err {
  display: none;
}

[data-chart-hidden~="raw"] .legend [data-series="raw"],
[data-chart-hidden~="burst"] .legend [data-series="burst"],
[data-chart-hidden~="err"] .legend [data-series="err"] {
  opacity: 0.45;
  text-decoration: line-through;
}

/* ------ buttons and fields */

button,
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--main-big);
  border-radius: 8px;
  background: transparent;
  color: var(--main);
  font: 0.86rem var(--ui);
  line-height: 1.2;
  cursor: pointer;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}

button:hover,
.button:hover {
  background: var(--wash);
  text-decoration: none;
}

button.quiet,
.button.quiet {
  border-color: var(--border);
  color: var(--sub);
}

button.quiet:hover,
.button.quiet:hover {
  border-color: var(--sub);
  background: transparent;
  color: var(--text);
}

button.danger:hover,
.button.danger:hover {
  border-color: var(--error);
  color: var(--error);
}

/* a destructive action behind a second, explicit step */
details.confirm > summary {
  list-style: none;
}

details.confirm > summary::-webkit-details-marker {
  display: none;
}

details.confirm[open] > summary {
  display: none;
}

details.confirm form {
  display: grid;
  gap: 0.5rem;
  justify-items: end;
}

details.confirm p {
  max-width: 18rem;
  margin: 0;
  color: var(--sub);
  font-size: 0.86rem;
  text-align: right;
}

details.confirm button {
  border-color: var(--error);
  color: var(--error);
}

input[type="text"],
input[type="search"],
input:not([type]) {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: 0.92rem var(--mono);
  transition: border-color 160ms var(--ease);
}

input:focus-visible {
  outline: none;
  border-color: var(--main-big);
}

input.key {
  color: var(--sub);
  font-size: 0.78rem;
}

input[type="search"]::-webkit-search-cancel-button {
  width: 0.7rem;
  height: 0.7rem;
  background: var(--sub);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 1l8 8M9 1l-8 8' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  cursor: pointer;
  appearance: none;
}

.tag {
  margin-left: 0.5rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--sub);
  font-size: 0.68rem;
  vertical-align: 0.1em;
}

.row {
  display: flex;
  gap: 0.5rem;
}

/* ------ pages */

h2 {
  margin: 2.8rem 0 1rem;
  color: var(--sub);
  font-size: 0.72rem;
  font-weight: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

main > h2:first-child {
  margin-top: 1rem;
}

.note {
  color: var(--sub);
  font-size: 0.82rem;
}

.empty {
  margin: 0;
  padding: 2.4rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--sub);
  font-size: 0.9rem;
  text-align: center;
}

.problem {
  margin: 0;
  color: var(--error);
  font-size: 0.84rem;
}

.message {
  color: var(--main);
}

/* A short confirmation along the bottom, gone on its own. */
.toast {
  position: fixed;
  bottom: 4.5rem;
  left: 50%;
  z-index: 20;
  margin: 0;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--text);
  box-shadow: var(--shadow);
  color: var(--bg);
  font-size: 0.84rem;
  pointer-events: none;
  animation: toast 2.6s var(--ease) forwards;
}

@keyframes toast {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  8%,
  82% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, 0);
    visibility: hidden;
  }
}

/* tables: leaderboards, history, attempts at a quote */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

th {
  padding: 0.55rem 0.8rem;
  color: var(--sub);
  font-size: 0.68rem;
  font-weight: normal;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

td {
  padding: 0.75rem 0.8rem;
  border-top: 1px solid var(--rule);
}

tbody tr {
  transition: background 120ms var(--ease);
}

tbody tr:hover {
  background: var(--sub-alt);
}

tr.you,
tr.current {
  background: var(--wash);
}

tr.you td:first-child,
tr.current td:first-child {
  box-shadow: inset 2px 0 var(--main-big);
}

tr.you a {
  color: var(--main);
}

tr.invalid td {
  color: var(--sub);
  opacity: 0.75;
}

td a {
  color: var(--text);
}

td.date,
td.date a {
  color: var(--sub);
}

.rank {
  width: 3rem;
  color: var(--sub);
}

.rank.podium {
  color: var(--main-big);
  font-weight: 600;
}

.num {
  text-align: right;
}

.strong {
  color: var(--text);
  font-weight: 600;
}

/* settings and "you": a row per setting, what on the left, how on the right */

.setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem 3rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.setting:first-child {
  padding-top: 0.6rem;
}

.setting h3 {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 600;
}

.setting p {
  max-width: 34rem;
  margin: 0;
  color: var(--sub);
  font-size: 0.86rem;
  line-height: 1.5;
}

.setting .control {
  display: grid;
  gap: 0.5rem;
  justify-items: end;
}

.setting input:not([type]) {
  width: 16rem;
}

.setting input.key {
  width: 24rem;
}

/* pill-shaped choices over real radio inputs */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--sub-alt);
}

.seg label {
  position: relative;
  cursor: pointer;
}

.seg input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.seg span {
  display: block;
  padding: 0.45rem 1rem;
  border-radius: 7px;
  color: var(--sub);
  font-size: 0.86rem;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}

.seg label:hover span {
  color: var(--text);
}

.seg input:checked + span {
  background: var(--main-big);
  color: var(--bg);
}

.seg input:focus-visible + span {
  outline: 2px solid var(--caret);
  outline-offset: 2px;
}

/* languages */

.find {
  margin: 0.6rem 0 1.8rem;
}

.find input {
  width: min(24rem, 100%);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  background: var(--sub-alt);
  border-color: transparent;
  font-family: var(--ui);
}

.languages {
  margin: 0 0 1rem;
  padding: 0;
  columns: 4 12rem;
  column-gap: 2rem;
  list-style: none;
  font-size: 0.86rem;
  line-height: 2;
}

.languages a {
  color: var(--sub);
}

.languages a:hover {
  color: var(--text);
  text-decoration: none;
}

.languages a.on {
  color: var(--main);
}

/* ------ footer */

.foot {
  margin-top: auto;
  padding: 2rem 1.25rem 1.6rem;
  color: var(--sub);
  font-size: 0.74rem;
  text-align: center;
}

.foot a {
  color: var(--sub);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 0.2em;
}

.foot a:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  .setting {
    grid-template-columns: 1fr;
  }
  .setting .control,
  details.confirm form {
    justify-items: start;
  }
  details.confirm p {
    text-align: left;
  }
  .setting input.key {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .top {
    flex-wrap: wrap;
  }
  .top nav {
    width: 100%;
    margin-left: 0;
    gap: 0.9rem 1.1rem;
  }
  /* the bar wraps by group here; separators would dangle at line ends */
  .bar {
    gap: 0.2rem 0.6rem;
  }
  .bar .sep {
    display: none;
  }
  .result {
    grid-template-columns: 1fr;
  }
  /* Wrapped statistics can sit against either edge on a phone. Keep their
     exact values inside the viewport, clear of the value being read. */
  [data-tip]::after {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    width: max-content;
    max-width: calc(100vw - 2rem);
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0s !important;
    animation: none !important;
  }
}

/* ------ history: findings, their trajectory, then specific practice */
.history-dashboard {
  padding-top: 1.2rem;
  font: 0.8rem/1.65 var(--mono);
  font-variant-numeric: tabular-nums;
}
.history-dashboard h1,
.history-dashboard h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: -0.035em;
  text-transform: none;
}
.history-dashboard h1 { font-size: 1.25rem; line-height: 1.3; }
.history-dashboard h2 { font-size: 1.06rem; line-height: 1.4; }
.history-dashboard p { max-width: 73ch; }
.history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.65rem;
}
.history-heading p { margin: 0; color: var(--sub); font-size: 0.72rem; }
.history-practice { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin: 1.2rem 0 1rem; }
.history-dashboard dt { color: var(--sub); font-size: 0.7rem; }
.history-dashboard dd { margin: 0; }
.history-practice dd { font-size: 1.2rem; }
.history-dashboard dd small { margin-left: 0.35rem; color: var(--sub); font-size: 0.7rem; }
.history-filter {
  position: relative;
  margin-bottom: 1.6rem;
  width: fit-content;
  max-width: 100%;
}
.history-filter summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 1rem;
  padding: 0.4rem 0;
  cursor: pointer;
  list-style: none;
}
.history-filter summary::-webkit-details-marker { display: none; }
.history-filter summary::after { content: ""; width: 0.45rem; height: 0.45rem; border-right: 1.5px solid var(--sub); border-bottom: 1.5px solid var(--sub); transform: translateY(-3px) rotate(45deg); }
.history-filter[open] summary::after { transform: translateY(1px) rotate(225deg); }
.history-filter summary > span:first-child { color: var(--sub); font-size: 0.7rem; }
.history-filter strong { font-weight: 400; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 0.35em; }
.history-filter-count { margin-left: auto; color: var(--sub); font-size: 0.7rem; }
.history-filter nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--rule);
}
.history-filter a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem; border-radius: 4px; color: var(--text); }
.history-filter a:hover,
.history-filter a[aria-current] { background: var(--sub-alt); text-decoration: none; }
.history-filter a[aria-current] { color: var(--main); }
.history-filter a small { flex: 0 0 auto; align-self: center; color: var(--sub); font-size: 0.65rem; }
.history-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.history-section-heading p { margin: 0; color: var(--sub); font-size: 0.7rem; }
.history-stats { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; margin: 1rem 0 0; }
.history-stats > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.6rem; }
.history-stats dd { font-size: 0.9rem; letter-spacing: -0.02em; line-height: 1.5; }
.history-stats a { color: var(--main); }
.history-trajectory { margin: 0 -0.25rem; }
.history-trajectory svg { display: block; width: 100%; height: auto; }
.history-dashboard svg text { fill: var(--sub); font: 11px var(--mono); }
.history-grid { stroke: var(--rule); stroke-width: 1; }
.history-dots circle { fill: var(--sub); }
.history-dots circle:hover { fill: var(--main); opacity: 1; r: 5; }
.history-trend { fill: none; stroke: var(--main); stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.history-trajectory figcaption { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0.4rem 0 1.4rem; color: var(--sub); font-size: 0.65rem; }
.history-trajectory figcaption span { display: inline-flex; align-items: center; gap: 0.5rem; }
.history-dot-key { width: 5px; height: 5px; border-radius: 100%; background: var(--sub); }
.history-line-key { width: 18px; height: 2px; background: var(--main); }
.history-discoveries { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); column-gap: 4rem; margin: 1.6rem 0 2.2rem; }
.history-lead { grid-row: 1 / 4; margin: 0; max-width: 28ch !important; font-size: 2rem; line-height: 1.45; letter-spacing: -0.055em; text-wrap: pretty; }
.history-observation { grid-column: 2; align-self: start; margin: 0.35rem 0 0.85rem; color: var(--sub); font-size: 0.8rem; line-height: 1.75; }
.history-sample-note { margin: 0.9rem 0 0; }
.history-best-marks path { fill: var(--bg); stroke: var(--main); stroke-width: 2; }
.history-best-marks a:hover path { fill: var(--main); }
.history-best-key { width: 8px; height: 8px; border: 1.5px solid var(--main); transform: rotate(45deg); }
.history-caption,
.history-first,
.history-wait { color: var(--sub); font-size: 0.72rem; line-height: 1.7; }
.history-first { margin: 1.6rem 0 0; }
.history-status { margin: 1.7rem 0; padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: 6px; color: var(--sub); font-size: 0.7rem; }
.history-diagnosis { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.history-diagnosis.solo { grid-template-columns: 1fr; max-width: 650px; }
.history-keys > p:first-of-type { margin: 0.7rem 0 1.5rem; }
.history-keyboard { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.35rem; max-width: 550px; padding: 1.2rem 0; }
.history-key-row { display: flex; justify-content: center; gap: 0.35rem; }
.history-key-row:nth-child(2) { padding-left: 0.8rem; }
.history-key-row:nth-child(3) { padding-right: 0.3rem; }
.history-key {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 1 2.9rem;
  min-width: 0;
  padding: 0;
  font: inherit;
  height: 2.7rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  color: var(--sub);
  cursor: help;
}
.history-key-detail {
  display: none;
  position: absolute;
  z-index: 2;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 15rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.67rem;
  line-height: 1.6;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.history-key:nth-child(-n+3) .history-key-detail { left: 0; right: auto; transform: none; }
.history-key:nth-last-child(-n+3) .history-key-detail { left: auto; right: 0; transform: none; }
.history-key:focus .history-key-detail,
.history-key:hover .history-key-detail { display: block; opacity: 1; visibility: visible; }
.history-key.level-1 { background: var(--sub-alt); color: var(--text); }
.history-key.level-2 { background: color-mix(in srgb, var(--main) 14%, var(--bg)); color: var(--text); border-color: color-mix(in srgb, var(--main) 32%, var(--border)); }
.history-key.level-3 { background: color-mix(in srgb, var(--main) 33%, var(--bg)); color: var(--text); border-color: var(--main); }
.history-key.level-4 { background: var(--main); border-color: var(--main); color: var(--bg); }
.history-key-legend { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0 1rem; color: var(--sub); font-size: 0.6rem; }
.history-key-legend > .history-accuracy-caption { display: flex; align-items: center; gap: 0.25rem; }
.history-key-legend i { width: 9px; height: 9px; border-radius: 2px; background: var(--main); }
.history-key-legend .level-3 { opacity: 0.65; }
.history-key-legend .level-2 { opacity: 0.35; }
.history-key-legend .level-1 { background: var(--sub); opacity: 0.15; }
.history-key-finding { margin: 1.1rem 0 0; font-size: 0.74rem; }
.history-key-finding kbd { color: var(--main); font-size: 0.85rem; }
.history-character-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.4rem 1.2rem; padding: 0; list-style: none; font-size: 0.65rem; }
.history-character-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--rule); }
.history-character-list li > span:first-child { color: var(--main); font-size: 0.85rem; }
.history-character-list li > span:last-child { color: var(--sub); }
.history-other-keys { margin: 1rem 0; color: var(--sub); font-size: 0.67rem; }
.history-other-keys summary { width: fit-content; cursor: pointer; }
.history-secondary { grid-column: 2; grid-row: 1 / span 2; padding-left: 2rem; border-left: 1px solid var(--rule); }
.history-keys { grid-column: 1; grid-row: 1; min-width: 0; }
.history-diagnosis > .history-pace { grid-column: 1; grid-row: 2; align-self: start; max-width: 400px; }
.history-secondary section + section { margin-top: 2rem; }
.history-pairs .history-caption { margin: 0.7rem 0 1rem; }
.history-pairs ol { margin: 0; padding: 0; list-style: none; }
.history-pairs li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--rule); }
.history-pair-letters { color: var(--main); font-size: 1.65rem; letter-spacing: 0.08em; }
.history-pairs li > span:last-child { text-align: right; }
.history-pairs strong { font-weight: 400; }
.history-pairs small { display: block; color: var(--sub); font-size: 0.6rem; }
.history-pace { min-width: 0; }
.history-pace .history-caption { margin: 0.5rem 0; }
.history-pace figure { margin: 1rem 0 0; }
.history-pace svg { display: block; width: 100%; max-width: 370px; }
.history-pace-bar { fill: var(--main); opacity: 0.7; }
.history-pace figcaption { margin-top: 0.5rem; color: var(--sub); font-size: 0.6rem; }
.history-pace-finding { font-size: 0.7rem; }
.history-rhythm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); gap: 3rem; margin-top: 2.6rem; padding-top: 1.8rem; border-top: 1px solid var(--border); }
.history-rhythm.solo { grid-template-columns: 1fr; }
.history-calendar { min-width: 0; }
.history-calendar figure { margin: 1.3rem 0 0; }
.history-calendar svg { display: block; width: 100%; }
.practice-level-0 { fill: var(--sub-alt); }
.practice-level-1 { fill: var(--main); background: var(--main); opacity: 0.22; }
.practice-level-2 { fill: var(--main); background: var(--main); opacity: 0.45; }
.practice-level-3 { fill: var(--main); background: var(--main); opacity: 0.7; }
.practice-level-4 { fill: var(--main); background: var(--main); }
.history-recent { margin-top: 2.4rem; padding-top: 1.8rem; border-top: 1px solid var(--border); }
.history-recent table { margin-top: 1rem; font-family: var(--mono); font-size: 0.72rem; }
.history-recent th { font: 0.65rem var(--mono); text-transform: none; letter-spacing: 0; }
.history-recent th,
.history-recent td { padding: 0.8rem 0.55rem; }
.history-recent th:first-child,
.history-recent td:first-child { padding-left: 0; }
.history-recent th:last-child,
.history-recent td:last-child { padding-right: 0; }
.history-recent .history-personal-best td:nth-child(2) { color: var(--main); }
.history-best-label { display: inline-block; margin-left: 0.6rem; color: var(--main); font-size: 0.6rem; }
.history-invalid { display: inline-block; margin-left: 0.5rem; color: var(--sub); font-size: 0.6rem; }
.history-pagination { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1rem; font-size: 0.7rem; }
.history-pagination span { color: var(--sub); }
.history-definitions { margin-top: 2.5rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); color: var(--sub); font-size: 0.67rem; }
.history-definitions summary { width: fit-content; cursor: pointer; }
.history-definitions > div { margin-top: 1.2rem; }
.history-definitions p { max-width: 82ch; }
.history-start { max-width: 33rem; margin: 4.5rem auto 3rem; text-align: center; }
.history-start h2 { font-size: 1.6rem; }
.history-start p { margin: 1rem auto 1.5rem; color: var(--sub); }
.history-start .button { font-family: var(--mono); }
.history-start .history-caption { max-width: 42ch; margin-top: 2rem; font-size: 0.65rem; }
.history-start.compact { margin-top: 2rem; }
.start-keys { display: flex; justify-content: center; gap: 0.4rem; margin-bottom: 2rem; }
.start-keys span { display: grid; place-items: center; width: 3rem; height: 3rem; border: 1px solid var(--border); border-bottom-width: 3px; border-radius: 6px; color: var(--main); font-size: 1.2rem; }
.history-chart-phone { display: none !important; }
@media (max-width: 760px) {
  .history-heading { align-items: flex-start; }
  .history-practice { gap: 1rem; }
  .history-diagnosis { gap: 1.4rem; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .history-secondary { padding-left: 1.3rem; }
  .history-discoveries { column-gap: 2rem; }
  .history-lead { font-size: 1.7rem; }
}
@media (max-width: 600px) {
  .history-dashboard { padding-top: 0.8rem; }
  .history-heading { gap: 0.6rem; margin-bottom: 0.6rem; }
  .history-dashboard h1 { font-size: 1.15rem; }
  .history-heading p { font-size: 0.6rem; }
  .history-discoveries { display: block; margin: 1.2rem 0 1.8rem; }
  .history-lead { font-size: 1.45rem; line-height: 1.5; margin-bottom: 1rem; }
  .history-observation { font-size: 0.72rem; margin: 0.6rem 0 0; }
  .history-practice { width: 100%; justify-content: space-between; gap: 0.6rem; }
  .history-practice dd { font-size: 1.2rem; }
  .history-filter { margin-bottom: 1rem; }
  .history-filter summary { gap: 0.2rem 0.6rem; }
  .history-filter strong { max-width: 75%; font-size: 0.72rem; overflow-wrap: anywhere; }
  .history-filter-count { display: none; }
  .history-filter summary::after { margin-left: 0.25rem; }
  .history-filter nav { grid-template-columns: 1fr; }
  .history-stats { gap: 0.7rem; justify-content: space-between; margin-top: 1rem; }
  .history-stats > div { width: 47%; display: block; }
  .history-stats dd { font-size: 0.9rem; }
  .history-section-heading { align-items: flex-start; flex-direction: column; gap: 0.4rem; }
  .history-chart-desktop { display: none !important; }
  .history-chart-phone { display: block !important; }
  .history-trajectory { margin: 0 -0.2rem; }
  .history-trajectory figcaption { gap: 0.5rem 1rem; font-size: 0.58rem; }
  .history-diagnosis, .history-diagnosis.solo { grid-template-columns: minmax(0, 1fr); gap: 2rem; margin-top: 2rem; padding-top: 1.6rem; }
  .history-keyboard { gap: 0.3rem; padding: 0.7rem 0; }
  .history-key-row { gap: 0.25rem; }
  .history-key { height: 2.2rem; font-size: 0.78rem; }
  .history-key-detail { max-width: 12rem; }
  .history-key-finding { font-size: 0.71rem; }
  .history-secondary { grid-column: auto; grid-row: auto; padding: 1.6rem 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .history-diagnosis > .history-pace { grid-column: auto; grid-row: auto; max-width: 100%; }
  .history-pairs li { padding: 0.55rem 0; }
  .history-rhythm { grid-template-columns: 1fr; gap: 2rem; }
  .history-pace svg { max-width: 100%; }
  .history-recent table { font-size: 0.66rem; }
  .history-recent th { font-size: 0.6rem; }
  .history-recent th,
  .history-recent td { padding: 0.7rem 0.3rem; }
  .history-extra { display: none; }
  .history-invalid,
  .history-best-label { display: block; margin-left: 0; }
  .history-start { margin-top: 3rem; }
  .history-start h2 { font-size: 1.4rem; }
}

.history-key-choice { display: flex; gap: 1rem; border: 0; padding: 0; margin: 0; font-size: 0.72rem; }
.history-key-choice label { display: flex; align-items: center; gap: 0.35rem; padding-bottom: 0.15rem; color: var(--sub); cursor: pointer; }
.history-key-choice label:has(input:checked) { color: var(--text); border-bottom: 1px solid var(--main); }
.history-key-choice input { margin: 0; width: 0.8rem; height: 0.8rem; }
.history-key-speed, .history-speed-caption { display: none; }
.history-keys:has(#history-speed:checked) .history-key { grid-template-rows: 1fr 1fr; padding: 0.1rem 0; line-height: 1.2; }
.history-keys:has(#history-speed:checked) .history-key-speed { display: block; font-size: 0.6rem; }
.history-keys:has(#history-speed:checked) .history-speed-caption { display: flex; }
.history-keys:has(#history-speed:checked) .history-accuracy-caption { display: none; }
.history-keys:has(#history-speed:checked) .history-key.speed-level-0 { background: var(--bg); border-color: var(--border); color: var(--sub); }
.history-keys:has(#history-speed:checked) .history-key.speed-level-1 { background: var(--sub-alt); border-color: var(--border); color: var(--text); }
.history-keys:has(#history-speed:checked) .history-key.speed-level-2 { background: color-mix(in srgb, var(--main) 14%, var(--bg)); border-color: color-mix(in srgb, var(--main) 32%, var(--border)); color: var(--text); }
.history-keys:has(#history-speed:checked) .history-key.speed-level-3 { background: color-mix(in srgb, var(--main) 33%, var(--bg)); border-color: var(--main); color: var(--text); }
.history-keys:has(#history-speed:checked) .history-key.speed-level-4 { background: var(--main); border-color: var(--main); color: var(--bg); }
.history-key-help { margin: 0.65rem 0 0; font-size: 0.65rem; }
.history-mistakes ul { margin: 0; padding: 0; list-style: none; }
.history-mistakes li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.history-mistakes li > span:last-child { text-align: right; font-size: 0.75rem; flex-shrink: 0; }
.history-mistakes li small { display: block; color: var(--sub); font-size: 0.6rem; }
.history-practice-word { font-size: 1.05rem; overflow-wrap: anywhere; }
.history-substitution { font-size: 1.25rem; }
.history-substitution small { display: inline !important; font-size: 0.7rem !important; }
.history-calendar-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.7rem; color: var(--sub); font-size: 0.6rem; }
.history-calendar-legend > span { display: inline-flex; align-items: center; gap: 0.3rem; }
.history-calendar-legend i { width: 0.65rem; height: 0.65rem; display: inline-block; border-radius: 2px; }
.history-calendar-legend .practice-level-0 { background: var(--sub-alt); border: 1px solid var(--border); }
@media (max-width: 600px) {
  .history-keys .history-section-heading { flex-direction: row; align-items: baseline; gap: 1rem; }
  .history-key-choice { gap: 0.7rem; font-size: 0.65rem; }
  .history-keys:has(#history-speed:checked) .history-key-speed { font-size: 0.48rem; }
}

.history-key-legend .history-speed-caption { display: none; }
.history-keys:has(#history-speed:checked) .history-key-legend .history-speed-caption { display: flex; align-items: center; gap: 0.25rem; }
.history-keys:has(#history-speed:checked) .history-key-legend .history-accuracy-caption { display: none; }

.results-scroll { max-width: 100%; overflow-x: auto; }
.touch-restart { display: none; }
@media (pointer: coarse) {
  /* Keep a short test page flush with the visible browser after Done. */
  body:has(main[data-page="test"]) { min-height: 100dvh; }
  .touch-restart { display: inline-block; }
  .desktop-shortcut, .after kbd { display: none; }
}
@media (max-width: 600px) {
  .results-scroll :is(th, td):nth-child(5),
  .results-scroll :is(th, td):nth-child(6) { display: none; }
}

.shaped-words {
  position: relative;
  font: 28px/45px "DM Mono", ui-monospace, monospace;
  color: var(--sub);
  white-space: pre-wrap;
}
.shaped-words span { white-space: pre; }
::highlight(typed-correct) { color: var(--text); }
::highlight(typed-error) { color: var(--error); }
::highlight(typed-extra) { color: var(--error-extra); }
