.tt-work {
  font-variant-numeric: tabular-nums;
  padding: 0;
  border: 0;
}
.tt-work,
.tt-toolbar {
  display: grid;
  gap: 16px;
}
.tt-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 460px;
}
.tt-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-block: 1px solid var(--ws-line);
}
.tt-metrics > div {
  min-width: 0;
  padding: 10px 12px;
}
.tt-metrics > div + div {
  border-inline-start: 1px solid var(--ws-line);
}
.tt-metrics dt {
  color: var(--ws-dim);
  font-size: 0.8125rem;
}
.tt-metrics dd {
  margin: 0;
  font-weight: 600;
  font-size: clamp(1.125rem, 4vw, 1.625rem);
}
.tt-practice {
  display: grid;
  gap: 8px;
}
.tt-passage-label,
.tt-figure figcaption {
  margin: 0;
  font-weight: 600;
  font-size: 0.875rem;
}
.tt-passage-frame {
  border: 1px solid var(--ws-line);
  background: var(--ws-2);
  border-radius: var(--r-sm);
  padding: 8px 12px;
}
.tt-passage {
  position: relative;
  height: 5.4em;
  overflow: hidden;
  color: var(--ws-dim);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}
.tt-token {
  display: inline-block;
  white-space: pre;
}
.tt-char {
  position: relative;
}
.tt-right {
  color: var(--ok);
}
.tt-wrong {
  color: var(--err);
  box-shadow: inset 0 -2px currentColor;
}
.tt-caret::before {
  content: "";
  position: absolute;
  inset-block: 0.08em;
  inset-inline-start: -1px;
  border-inline-start: 2px solid var(--ws-ink);
}
#tt-input {
  resize: vertical;
  line-height: 1.45;
  min-height: 52px;
}
.tt-hint {
  margin: 0;
}
.tt-next:empty { display: none; }
.tt-next .zt-next { margin: 0; }
.tt-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-block-start: 4px;
}
#tt-status,
#tt-best {
  color: var(--ws-dim);
  font-size: 0.8125rem;
}
.tt-result { scroll-margin-block-start: 16px; }
.tt-result h2 {
  margin: 0 0 8px;
  font: 400 2rem var(--font-display);
}
.tt-result-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.tt-figure {
  margin: 16px 0 8px;
}
.tt-figure svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 720px;
}
.tt-chart-grid {
  stroke: var(--ws-dim);
  opacity: 0.4;
}
.tt-chart-label {
  fill: var(--ws-dim);
  font-size: 16px;
}
.tt-chart-line {
  fill: none;
  stroke: var(--ws-ink);
  stroke-width: 2.5px;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.tt-details {
  border-top: 1px solid var(--ws-line);
}
.tt-details summary {
  min-height: 44px;
  padding-block: 10px;
  cursor: pointer;
  font-size: 0.875rem;
}
#tt-best {
  margin-inline-start: 12px;
  white-space: nowrap;
}
.tt-table {
  table-layout: fixed;
  font-size: 0.875rem;
  text-align: start;
}
.tt-table th,
.tt-table td {
  padding: 6px 4px;
  text-align: start;
  overflow-wrap: anywhere;
}
#tt-clear {
  margin-block-start: 12px;
}
#tt-clear:disabled {
  opacity: 0.5;
}
@media (min-width: 900px) {
  .tt-toolbar {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: end;
    gap: 24px;
  }
}
@media (max-width: 600px) {
  .tt-metrics > div {
    padding-inline: 8px;
  }
  .tt-result-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tt-result-metrics > div:nth-child(n + 4) {
    grid-column: span 3;
    border-block-start: 1px solid var(--ws-line);
    border-inline-start: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .tt-table {
    font-size: 0.8125rem;
  }
}
@media (forced-colors: active) {
  .tt-wrong {
    text-decoration: underline double;
    text-decoration-skip-ink: none;
    border-bottom: 1px solid;
  }
}
