:root {
  font-size: 17px;
}
.top {
  font-size: 14px;
}
.quiz-hero {
  background: #123f45;
  color: #f7f6f0;
  padding: 44px max(24px, calc((100vw - 1220px) / 2));
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: space-between;
}
.quiz-hero h1 {
  font-size: clamp(34px, 4vw, 56px);
  margin: 10px 0 18px;
}
.quiz-hero p {
  max-width: 620px;
  margin-bottom: 0;
}
.quiz-hero .eyebrow {
  color: #edca8f;
  font-size: 12px;
}
.quiz-layout {
  max-width: 1300px;
  margin: auto;
  padding: 40px 24px 70px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
#quiz-main {
  min-width: 0;
  overflow-wrap: anywhere;
}
#quiz-main h2 {
  font-size: 32px;
  line-height: 1.2;
}
#quiz-main h3 {
  font-size: 21px;
}
.profile-card {
  overflow-wrap: anywhere;
  background: #eef2ec;
  border: 1px solid #d0dad0;
  border-radius: 12px;
  padding: 22px;
}
.profile-card h2 {
  font-size: 26px;
}
.profile-card p,
.profile-card label,
.profile-card legend {
  font-size: 14px;
}
fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
fieldset:disabled {
  opacity: 0.7;
}
legend {
  font-weight: 700;
  padding: 0;
}
label {
  font-size: 16px;
  margin: 14px 0 6px;
}
input,
select,
button {
  font: inherit;
}
select,
input:not([type="radio"], [type="checkbox"]) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 11px;
  background: white;
  border: 1px solid #91aaa0;
  border-radius: 6px;
  font-size: 16px;
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
button:focus-visible,
select:focus-visible,
h2:focus-visible,
#quiz-main:focus-visible {
  outline: 3px solid #b16826;
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
.quiz-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  background: #175b4d;
  color: #fff;
  border: 1px solid #175b4d;
  border-radius: 7px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}
.quiz-button:hover:not(:disabled) {
  background: #104b3f;
}
.quiz-button.secondary {
  color: #183e43;
  background: #fff;
  border-color: #9eb5a8;
}
.quiz-button.secondary:hover:not(:disabled) {
  background: #e6eee7;
  color: #183e43;
}
.profile-card form .quiz-button {
  width: 100%;
  margin-top: 12px;
}
.text-button {
  display: inline-block;
  background: transparent;
  color: #205d50;
  border: 0;
  font-size: 15px;
  padding: 10px 0;
  min-height: 44px;
  margin-right: 18px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.danger {
  color: #94351f;
}
.muted,
small {
  color: #49675e;
}
.storage-note {
  border-top: 1px solid #c2d2c6;
  margin-top: 20px;
  padding-top: 20px;
  font-size: 13px;
}
.storage-note .text-button {
  font-size: 13px;
  display: block;
}
.owner-note {
  padding: 16px;
  background: #e6eee7;
  border-left: 3px solid #42786a;
}
.score-card {
  background: #123f45;
  color: #f8f6e9;
  padding: 24px;
  border-radius: 10px;
  margin: 20px 0;
}
.score-card .eyebrow {
  color: #e9c58b;
  font-size: 12px;
}
.score-card p {
  margin: 10px 0;
}
.score-card small {
  color: #d9e5df;
}
.score-value {
  font:
    400 46px/1.1 Georgia,
    serif;
}
progress {
  display: block;
  accent-color: #c39750;
  width: 100%;
  height: 10px;
  margin: 16px 0;
  border-radius: 10px;
}
.scoring-rules {
  font-size: 15px;
  margin-bottom: 32px;
}
.scoring-rules summary,
.question-jump summary {
  font-size: 16px;
}
.chapter-scores {
  margin-top: 36px;
}
.chapter-scores .score-card {
  background: #e6eee7;
  color: #183e43;
  padding: 18px;
}
.chapter-scores .eyebrow {
  color: #49675e;
}
.chapter-scores .score-value {
  font-size: 32px;
}
.quiz-row {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid #d0dad0;
}
.quiz-row small {
  display: block;
  font-size: 13px;
  margin-top: 6px;
}
.quiz-title {
  text-decoration: none;
  font-weight: 650;
}
.quiz-title:hover {
  text-decoration: underline;
}
.row-score {
  min-width: 70px;
  text-align: right;
  white-space: nowrap;
}
.instructions {
  background: white;
  border: 1px solid #d0dad0;
  border-radius: 10px;
  padding: 24px;
  margin: 24px 0;
}
.previous-result {
  margin-top: 20px;
}
.question-card {
  margin: 30px 0;
  padding: 24px;
  border: 1px solid #aabfb0;
  border-radius: 10px;
  background: #fff;
}
.question-card legend {
  float: left;
  width: 100%;
  font-size: 21px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.question-card legend + * {
  clear: both;
}
.question-help {
  font-size: 14px;
  color: #49675e;
}
.answer-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid #cbd9ce;
  border-radius: 7px;
  cursor: pointer;
  line-height: 1.5;
  margin: 10px 0;
}
.answer-option:has(input:checked) {
  border-color: #246e57;
  background: #e6f1e9;
  box-shadow: inset 3px 0 #246e57;
}
.answer-option input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 3px 0 0;
  accent-color: #246e57;
}
.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin: 24px 0;
}
.match-row {
  margin: 18px 0;
}
.match-meanings {
  list-style: none;
  padding: 16px;
  background: #eef2ec;
  border-radius: 6px;
}
.match-meanings li {
  margin: 10px 0;
}
.selected-meaning {
  margin-top: 8px;
  font-size: 14px;
  color: #49675e;
}
.match-label {
  font-weight: 650;
}
.match-row select {
  white-space: normal;
  text-overflow: ellipsis;
}
.order-list {
  list-style: decimal;
  padding-left: 25px;
}
.order-list li {
  padding: 14px 0;
  border-bottom: 1px solid #d6dfd6;
}
.order-list li::marker {
  font-weight: 700;
  color: #416c5c;
}
.order-controls {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.order-button,
.jump-button {
  background: #eef2ec;
  color: #183e43;
  border: 1px solid #9db6a7;
  border-radius: 6px;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
}
.order-status {
  font-size: 14px;
  margin-top: 12px;
}
.question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.jump-button.answered {
  background: #d6eadb;
  border-color: #246e57;
}
.jump-button[aria-current] {
  outline: 2px solid #b16826;
  outline-offset: 2px;
}
.quiz-notice {
  max-width: 1252px;
  margin: 24px auto 0;
}
.quiz-notice,
.inline-warning {
  background: #fff0d6;
  border: 1px solid #ad7138;
  border-radius: 8px;
  padding: 18px;
  color: #613c1c;
}
.inline-warning .text-button {
  display: block;
}
.number-validation {
  color: #94351f;
  font-size: 14px;
}
.answer-review {
  background: #fff;
  border: 1px solid #c4d3c8;
  border-left: 4px solid #44765e;
  padding: 18px 20px;
  border-radius: 7px;
  margin: 16px 0;
}
.answer-review.needs-review {
  border-left-color: #b16826;
}
.answer-review summary {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.5;
}
.answer-review strong {
  display: block;
  margin-top: 20px;
}
.answer-review li {
  margin-bottom: 8px;
  font-size: 15px;
}
.answer-explanation {
  background: #edf3ed;
  padding: 16px;
  margin-top: 18px;
}
.footer {
  font-size: 13px;
}
@media (max-width: 850px) {
  .quiz-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding: 24px 20px 50px;
  }
  .quiz-hero {
    display: block;
    padding: 30px 20px;
  }
  .quiz-hero > a {
    margin-top: 24px;
  }
  .profile-card {
    padding: 20px;
  }
  .quiz-notice {
    margin: 20px 20px 0;
  }
}
@media (max-width: 450px) {
  .top {
    flex-wrap: wrap;
    gap: 12px;
  }
  .quiz-layout {
    padding-inline: 16px;
  }
  #quiz-main h2 {
    font-size: 28px;
  }
  .question-card {
    padding: 16px;
  }
  .question-card legend {
    font-size: 19px;
  }
  .quiz-actions > * {
    flex: 1 1 100%;
  }
  .quiz-row {
    gap: 12px;
  }
  .score-card {
    padding: 20px;
  }
  .row-score {
    min-width: 54px;
    font-size: 15px;
  }
}
@media print {
  #quiz-profiles,
  .quiz-hero,
  .quiz-actions,
  .text-button,
  .quiz-button {
    display: none;
  }
  .quiz-layout {
    display: block;
    padding: 0;
  }
  .score-card {
    background: white;
    color: #183e43;
    border: 1px solid;
  }
}
