.page {
  max-width: 840px;
  margin: 0 auto;
  padding: 8px 20px 64px;
}

.stage {
  display: grid;
  gap: 14px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin: 0 -8px 28px;
  padding: 12px 8px 16px;
  background: rgba(246, 239, 228, 0.92);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

h1,
h2 {
  font-family: Fraunces, serif;
  margin: 0;
}

h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 650;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.timer {
  min-width: 180px;
  padding: 12px 16px 10px;
  border: 1px solid var(--line);
  background: var(--sheet);
  box-shadow: var(--shadow);
  text-align: right;
}

.timer-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.timer-digits {
  display: block;
  font-variant-numeric: tabular-nums;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
}

.timer.running .timer-digits {
  color: var(--regular);
}

.lead,
.note,
.meta,
.choice,
.passage p {
  line-height: 1.55;
}

.lead {
  font-size: 18px;
  max-width: 58ch;
  margin: 0 0 18px;
}

.note {
  color: var(--muted);
  margin: 0 0 22px;
}

.steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
}

.num {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #efe2d0;
  font-weight: 700;
  font-size: 14px;
}

.actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  background: linear-gradient(transparent, var(--sheet) 30%);
}

.ghost:hover {
  background: #f1e7d8;
}

.phase {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.phase.regular {
  background: #f8e1d2;
  color: #8a3b12;
}

.phase.bionic {
  background: #d7eee9;
  color: #0b5852;
}

.passage {
  font-family: "Source Serif 4", serif;
  font-size: 21px;
  line-height: 1.7;
  max-width: 62ch;
  padding-bottom: 8px;
}

.passage p {
  margin: 0;
}

.passage.hidden-text {
  filter: blur(7px);
  user-select: none;
  pointer-events: none;
}

.passage b {
  font-weight: 700;
}

.bionic-tail {
  font-weight: 400;
}

.passage.preview {
  margin: 0 0 22px;
  padding: 16px 18px;
  font-size: 19px;
  background: #fff;
  border: 1px solid var(--line);
}

.settings-card .note {
  margin-bottom: 16px;
}

.setting {
  margin: 0 0 16px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 15px;
  font-weight: 650;
}

.setting-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.setting input[type="range"] {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  accent-color: var(--ink);
}

.setting select {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.meta {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.quiz {
  display: grid;
  gap: 18px;
  margin: 8px 0 22px;
}

.question {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.question p {
  margin: 12px 0 10px;
  font-weight: 650;
}

.choices {
  display: grid;
  gap: 8px;
}

.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.choice:hover {
  border-color: #cbb79a;
}

.choice input {
  margin-top: 4px;
}

.results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0 20px;
}

.result {
  padding: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.result span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.result strong {
  display: block;
  margin-top: 6px;
  font-family: Fraunces, serif;
  font-size: 32px;
  font-weight: 650;
}

.verdict {
  padding: 16px 18px;
  background: #efe2d0;
  margin-bottom: 18px;
}

.verdict p {
  margin: 0;
  font-size: 17px;
}

.answers {
  margin: 0 0 22px;
  color: var(--muted);
}

.history {
  margin: 8px 0 22px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.history h2 {
  margin-bottom: 4px;
}

.history-scroll {
  overflow-x: auto;
  margin: 0 0 14px;
}

.history table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.history th,
.history td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--line);
}

.history th {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-settings {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 700px) {
  .top,
  .results {
    display: block;
  }

  .timer {
    margin-top: 16px;
    text-align: left;
  }

  .passage {
    font-size: 19px;
  }

  .card {
    padding: 22px 18px;
  }
}
