:root {
  color-scheme: light;
  --base: #eff1f5;
  --mantle: #e6e9ef;
  --surface: #ccd0da;
  --overlay: #9ca0b0;
  --text: #4c4f69;
  --subtext: #6c6f85;
  --blue: #1e66f5;
  --green: #40a02b;
  --button-text: #eff1f5;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background: var(--base);
  color: var(--text);
}
:root[data-theme="mocha"] {
  color-scheme: dark;
  --base: #1e1e2e;
  --mantle: #181825;
  --surface: #313244;
  --overlay: #6c7086;
  --text: #cdd6f4;
  --subtext: #a6adc8;
  --blue: #89b4fa;
  --green: #a6e3a1;
  --button-text: #1e1e2e;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100svh;
  background: var(--base);
}
button {
  font: inherit;
}
main {
  width: min(100% - 32px,620px);
  min-height: 100svh;
  margin: auto;
  display: flex;
  flex-direction: column;
  padding: 28px 0;
}
header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header {
  height: 40px;
}
header strong {
  font-size: 16px;
  letter-spacing: -.01em;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-link,
.secondary-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--surface);
  border-radius: 6px;
  color: var(--subtext);
  background: transparent;
  font-size: 12px;
  line-height: 32px;
  text-decoration: none;
  cursor: pointer;
}
.header-link:hover,
.secondary-button:hover {
  color: var(--text);
  border-color: var(--overlay);
}
.theme {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 7px;
  place-items: center;
  border: 1px solid var(--surface);
  border-radius: 6px;
  color: var(--subtext);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}
.theme svg {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme .sun {
  display: none;
}
:root[data-theme="mocha"] .theme .moon {
  display: none;
}
:root[data-theme="mocha"] .theme .sun {
  display: block;
}
.theme:hover {
  color: var(--text);
  border-color: var(--overlay);
}
.test {
  margin-top: 48px;
  border-top: 1px solid var(--surface);
  padding-top: 22px;
}
.stages {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.stages li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--subtext);
  font-size: 11px;
}
.stages b {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--surface);
  border-radius: 50%;
  font-size: 10px;
}
.stages .active {
  color: var(--blue);
}
.stages .active b {
  border-color: var(--blue);
}
.stages .done {
  color: var(--green);
}
.stages .done b {
  border-color: var(--green);
}
.reading {
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.reading strong {
  font-size: 52px;
  line-height: 1;
  letter-spacing: -.055em;
}
.reading small {
  color: var(--subtext);
  font-size: 13px;
}
.reading > span {
  padding-bottom: 5px;
  color: var(--subtext);
  font-size: 13px;
}
.progress {
  height: 3px;
  margin: 24px 0;
  background: var(--surface);
  overflow: hidden;
}
.progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--blue);
  transition: width .25s ease;
}
#start {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: var(--button-text);
  font-weight: 650;
  cursor: pointer;
}
#start:hover {
  filter: brightness(1.06);
}
#start:disabled {
  cursor: wait;
  opacity: .65;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  margin-top: 34px;
  border-top: 1px solid var(--surface);
  border-bottom: 1px solid var(--surface);
}
.metrics article {
  padding: 18px 14px;
}
.metrics article + article {
  border-left: 1px solid var(--surface);
}
.metrics span {
  display: block;
  margin-bottom: 7px;
  color: var(--subtext);
  font-size: 11px;
}
.metrics strong {
  font-size: 21px;
  letter-spacing: -.02em;
}
.metrics small {
  margin-left: 3px;
  color: var(--subtext);
  font-size: 9px;
}
.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}
.result-actions > span {
  color: var(--subtext);
  font-size: 11px;
}
.copy-result {
  line-height: normal;
}
footer {
  margin-top: auto;
  padding-top: 44px;
  color: var(--subtext);
  font-size: 11px;
}
.source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}
.source:hover {
  color: var(--text);
}
.source svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.results-page {
  margin-top: 48px;
}
.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.results-heading h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.025em;
}
.storage-note {
  margin: 0 0 20px;
  color: var(--subtext);
  font-size: 11px;
}
.secondary-button:disabled {
  cursor: default;
  opacity: .45;
}
.results-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--surface);
  border-bottom: 1px solid var(--surface);
}
.results-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  white-space: nowrap;
}
.results-table th,
.results-table td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--surface);
  text-align: left;
  font-size: 12px;
}
.results-table th {
  color: var(--subtext);
  font-size: 10px;
  font-weight: 500;
  text-align: left;
}
.results-table th:first-child {
  width: 34%;
}
.results-table th small {
  display: block;
  margin-top: 2px;
  color: var(--overlay);
  font-size: 8px;
  font-weight: 400;
}
.sort-button {
  position: relative;
  max-width: 100%;
  padding: 0 12px 0 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sort-button::after {
  content: "↕";
  position: absolute;
  top: 0;
  right: 0;
  color: var(--overlay);
  font-size: 9px;
}
.sort-button[data-direction="up"]::after {
  content: "↑";
  color: var(--blue);
}
.sort-button[data-direction="down"]::after {
  content: "↓";
  color: var(--blue);
}
.results-table th:first-child,
.results-table td:first-child {
  padding-left: 0;
  text-align: left;
}
.results-table th:last-child,
.results-table td:last-child {
  padding-right: 0;
}
.results-table tbody tr:last-child td {
  border-bottom: 0;
}
.result-date {
  display: block;
}
.empty-results {
  margin: 0;
  padding: 32px 0;
  border-top: 1px solid var(--surface);
  border-bottom: 1px solid var(--surface);
  color: var(--subtext);
  font-size: 13px;
  text-align: center;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}
.pagination span {
  color: var(--subtext);
  font-size: 11px;
}
.pagination button {
  min-width: 76px;
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
@media (max-width:520px) {
  main {
    width: min(100% - 24px,620px);
    padding: 18px 0;
  }
  .test {
    margin-top: 36px;
  }
  .results-page {
    margin-top: 36px;
  }
  .results-table th,
  .results-table td {
    padding: 12px 8px;
  }
  .results-table-wrap {
    overflow: hidden;
  }
  .results-table th,
  .results-table td {
    padding: 11px 4px;
    font-size: 11px;
  }
  .results-table th {
    font-size: 9px;
  }
  .results-table th:first-child,
  .results-table td:first-child {
    padding-left: 0;
  }
  .results-table th:last-child,
  .results-table td:last-child {
    padding-right: 0;
  }
  .stages {
    margin-bottom: 24px;
  }
  .stages li {
    gap: 5px;
  }
  .reading strong {
    font-size: 46px;
  }
  .metrics {
    grid-template-columns: repeat(2,1fr);
  }
  .metrics article:nth-child(3) {
    border-left: 0;
  }
  .metrics article:nth-child(n+3) {
    border-top: 1px solid var(--surface);
  }
  footer {
    padding-top: 32px;
  }
}
@media (prefers-reduced-motion:reduce) {
  .progress i {
    transition: none;
  }
}
