:root {
  --navy: #0a2a59;
  --navy-dark: #061a3a;
  --teal: #e7782f;
  --teal-soft: #fff0e4;
  --orange: #e7782f;
  --orange-soft: #fff0e4;
  --lime: #9fd84f;
  --ink: #14243a;
  --muted: #657285;
  --line: #dfe4ea;
  --surface: #fffdf9;
  --canvas: #081d43;
  --correct: #237a57;
  --correct-soft: #e8f5ee;
  --incorrect: #b74343;
  --incorrect-soft: #fdecec;
  --shadow: 0 18px 50px rgba(20, 52, 75, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 12% 8%, rgba(231, 120, 47, 0.2), transparent 26%),
    var(--canvas);
  background-size: 32px 32px, 32px 32px, auto, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 20px;
}

.brand-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  text-decoration: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.site-header .brand-bar {
  margin-bottom: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 7px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.88rem;
  font-weight: 720;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--lime);
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.4rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0;
  color: var(--orange);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand-title {
  margin: 1px 0 0;
  color: white;
  font-size: 1.05rem;
  font-weight: 760;
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.start-card,
.result-card {
  padding: clamp(28px, 6vw, 56px);
}

.landing-shell {
  width: min(1040px, calc(100% - 32px));
}

.landing-card {
  display: grid;
  min-height: 570px;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: stretch;
  overflow: hidden;
  border: 0;
}

.landing-copy {
  display: flex;
  min-height: 570px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 7vw, 78px);
  color: white;
  background: var(--navy-dark);
}

.landing-kicker {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 830;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.landing-copy h1 {
  max-width: 620px;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
}

.landing-copy h1::after {
  display: block;
  width: 78px;
  height: 5px;
  margin-top: 20px;
  border-radius: 99px;
  background: var(--orange);
  content: "";
}

.landing-authors {
  max-width: 590px;
  margin: 22px 0 32px;
  color: rgba(255, 255, 255, 0.76);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-actions .primary-button {
  border-color: var(--orange);
  background: var(--orange);
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.16);
}

.landing-actions .primary-button:hover {
  border-color: #f08a45;
  background: #f08a45;
}

.landing-actions .secondary-button {
  border-color: rgba(255, 255, 255, 0.66);
  color: white;
  background: transparent;
}

.landing-actions .secondary-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.landing-cover {
  display: flex;
  min-height: 570px;
  align-items: center;
  justify-content: center;
  padding: 54px 38px;
  border-left: 7px solid var(--orange);
  background: #f1eee7;
}

.landing-cover img {
  display: block;
  width: min(100%, 270px);
  height: auto;
  border: 1px solid rgba(6, 26, 58, 0.2);
  border-radius: 0;
  box-shadow: 13px 18px 30px rgba(6, 26, 58, 0.22);
}

.chapter-card,
.download-card {
  padding: clamp(28px, 6vw, 56px);
}

.section-heading {
  max-width: 690px;
  margin-bottom: 30px;
}

.section-heading .eyebrow {
  margin-bottom: 7px;
}

.section-heading h1,
.download-card h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.section-heading > p:last-child,
.download-intro {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.chapter-tile {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 14px;
  min-height: 100px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: white;
  text-align: left;
}

.chapter-tile.available {
  border-color: rgba(231, 120, 47, 0.58);
  box-shadow: 0 8px 24px rgba(6, 26, 58, 0.08);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.chapter-tile.chapter-expand {
  border-color: rgba(10, 42, 89, 0.22);
  background: #f8fafc;
  transition: border-color 150ms ease, background 150ms ease;
}

.chapter-tile.chapter-expand:hover,
.chapter-tile.chapter-expand[aria-expanded="true"] {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.chapter-expand .chapter-letter {
  color: white;
  background: var(--navy);
}

.chapter-chevron {
  color: var(--navy);
  transition: transform 150ms ease;
}

.chapter-expand[aria-expanded="true"] .chapter-chevron {
  transform: rotate(180deg);
}

.chapter-tile.available:hover {
  border-color: var(--orange);
  box-shadow: 0 12px 28px rgba(6, 26, 58, 0.13);
  transform: translateY(-2px);
}

.chapter-tile.unavailable {
  cursor: not-allowed;
  opacity: 0.57;
}

.chapter-letter {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 13px;
  color: var(--navy);
  background: #eef2f7;
  font-size: 1.1rem;
  font-weight: 850;
}

.available .chapter-letter {
  color: white;
  background: var(--orange);
}

.chapter-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chapter-info strong {
  color: var(--navy-dark);
  line-height: 1.3;
}

.chapter-info small {
  color: var(--muted);
}

.available .chapter-info small {
  color: var(--orange);
  font-weight: 720;
}

.chapter-arrow {
  color: var(--orange);
  font-size: 1.35rem;
  font-weight: 800;
}

.subchapter-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 4px 0 8px;
}

.subchapter-tile {
  display: grid;
  min-height: 112px;
  grid-template-rows: auto 1fr auto;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: white;
  text-align: left;
}

.subchapter-tile strong {
  color: var(--orange);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.subchapter-tile span {
  color: var(--navy-dark);
  font-weight: 750;
  line-height: 1.28;
}

.subchapter-tile small {
  color: var(--muted);
}

.subchapter-tile.unavailable {
  cursor: not-allowed;
  opacity: 0.58;
}

.subchapter-tile.available {
  border-color: rgba(231, 120, 47, 0.5);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease;
}

.subchapter-tile.available:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
}

.text-button {
  padding: 5px 0;
  border: 0;
  color: var(--navy);
  background: transparent;
  font-weight: 760;
}

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

.start-card > .text-button {
  margin-bottom: 28px;
}

.download-card {
  min-height: 500px;
}

.login-panel {
  max-width: 610px;
  margin: 0 auto;
  padding: 22px 0;
}

.lock-symbol {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 15px;
  color: white;
  background: var(--orange);
  font-size: 1.5rem;
  font-weight: 900;
  transform: rotate(-90deg);
}

.password-form {
  margin-top: 30px;
}

.password-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--navy-dark);
  font-size: 0.88rem;
  font-weight: 780;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.password-row input {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #aebac5;
  border-radius: 12px;
  color: var(--ink);
  background: white;
  font-size: 1rem;
}

.password-row input:focus {
  border-color: var(--orange);
  outline: 3px solid rgba(231, 120, 47, 0.2);
}

.password-message {
  min-height: 24px;
  margin: 8px 0 0;
  color: var(--incorrect);
  font-size: 0.9rem;
}

.download-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.download-heading .eyebrow {
  margin-bottom: 7px;
}

.empty-downloads {
  margin-top: 34px;
  padding: 50px 24px;
  border: 1px dashed #b9c3cc;
  border-radius: 18px;
  background: #f8fafb;
  text-align: center;
}

.empty-downloads > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 1.45rem;
  font-weight: 800;
}

.empty-downloads h2 {
  margin: 0 0 6px;
  color: var(--navy-dark);
  font-size: 1.25rem;
}

.empty-downloads p {
  margin: 0;
  color: var(--muted);
}

.download-link-notice {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.download-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.download-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafb;
}

.download-file-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 1.3rem;
  font-weight: 850;
}

.download-item-copy .eyebrow {
  margin: 0 0 4px;
}

.download-item-copy h2 {
  margin: 0;
  color: var(--navy-dark);
  font-size: 1.1rem;
}

.download-item-copy > p:not(.eyebrow) {
  margin: 5px 0 7px;
  color: var(--muted);
  line-height: 1.45;
}

.download-item-copy small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.admin-shell {
  width: min(1240px, calc(100% - 32px));
}

.admin-login-card {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(30px, 6vw, 56px);
}

.admin-login-card h1 {
  margin-top: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.admin-login-card > p:not(.eyebrow) {
  color: var(--muted);
}

.admin-login-card code {
  color: var(--navy-dark);
  font-weight: 700;
}

.admin-login-form {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.admin-login-form label,
.question-form label,
.list-filter-row label {
  color: var(--navy-dark);
  font-size: 0.86rem;
  font-weight: 760;
}

.admin-login-form input,
.question-form input,
.question-form textarea,
.question-form select,
.list-filter-row select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #b8c2cb;
  border-radius: 10px;
  color: var(--ink);
  background: white;
}

.admin-login-form input:focus,
.question-form input:focus,
.question-form textarea:focus,
.question-form select:focus,
.list-filter-row select:focus {
  border-color: var(--orange);
  outline: 3px solid rgba(231, 120, 47, 0.18);
}

.admin-login-form .primary-button {
  margin-top: 10px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 24px 28px;
}

.admin-toolbar h1 {
  margin-top: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
}

.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-section-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
}

.admin-section-tab {
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 760;
}

.admin-section-tab:hover,
.admin-section-tab.active {
  border-color: var(--orange);
  background: var(--orange);
}

.admin-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 4px 4px 0;
  color: white;
}

.admin-view-toolbar .eyebrow {
  color: #f5a268;
}

.admin-view-toolbar h2 {
  margin: 3px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.question-list-card,
.question-editor-card {
  padding: 24px;
}

.question-list-card {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.list-filter-row {
  display: grid;
  gap: 6px;
}

.list-status {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-question-list {
  display: grid;
  gap: 7px;
}

.admin-question-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: white;
  text-align: left;
}

.admin-question-item:hover {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.admin-question-item strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.admin-question-meta {
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 760;
}

.admin-file-details {
  color: var(--muted);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.field-help {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
}

.question-form {
  display: grid;
  gap: 17px;
}

.question-form label {
  display: grid;
  gap: 6px;
}

.question-form textarea {
  resize: vertical;
  line-height: 1.45;
}

.editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.editor-heading h2 {
  margin: 3px 0 0;
  color: var(--navy-dark);
}

.save-state {
  color: var(--orange);
  font-size: 0.84rem;
  font-weight: 720;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-fields {
  align-items: end;
}

.checkbox-label {
  display: flex !important;
  min-height: 44px;
  flex-direction: row !important;
  align-items: center;
  gap: 9px !important;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.danger-button {
  min-height: 50px;
  padding: 12px 22px;
  border: 1px solid var(--incorrect);
  border-radius: 12px;
  color: var(--incorrect);
  background: white;
  font-weight: 760;
}

.danger-button:hover {
  color: white;
  background: var(--incorrect);
}

.start-card {
  position: relative;
  overflow: hidden;
}

.start-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--orange) 0 72%, var(--lime) 72% 100%);
  content: "";
}

.start-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 1.65fr);
  gap: clamp(34px, 6vw, 62px);
  align-items: center;
}

.cover-column {
  align-self: start;
}

.cover-frame {
  position: relative;
  max-width: 250px;
  padding: 9px;
  border: 1px solid rgba(10, 42, 89, 0.13);
  border-radius: 9px;
  background: white;
  box-shadow: 0 22px 40px rgba(6, 26, 58, 0.24);
  transform: rotate(-1deg);
}

.cover-frame::after {
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 58px;
  height: 58px;
  border-right: 5px solid var(--orange);
  border-bottom: 5px solid var(--orange);
  content: "";
}

.book-cover {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

.author-credit {
  margin: 24px 0 0;
  color: var(--navy-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  font-weight: 700;
}

.author-credit span {
  display: block;
  margin-bottom: 2px;
  color: var(--orange);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.chapter-badge,
.category-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 0.78rem;
  font-weight: 760;
}

.chapter-badge {
  padding: 6px 11px;
  margin-bottom: 14px;
}

h1,
h2,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 680px;
  margin: 0;
  color: var(--navy-dark);
  font-size: clamp(2rem, 6vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.start-content h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.start-content h1::after {
  display: block;
  width: 68px;
  height: 5px;
  margin-top: 16px;
  border-radius: 99px;
  background: var(--orange);
  content: "";
}

.intro {
  max-width: 680px;
  margin: 18px 0 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  margin: 0 0 28px;
  border: 1px solid #d8dfe6;
  border-radius: 16px;
}

.feature-row div {
  display: flex;
  min-height: 90px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-align: center;
}

.feature-row div + div {
  border-left: 1px solid var(--line);
}

.feature-row strong {
  color: var(--navy-dark);
  font-size: 1.45rem;
}

.feature-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.mode-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0;
  margin: 0 0 26px;
  border: 0;
}

.mode-picker legend {
  margin-bottom: 10px;
  color: var(--navy-dark);
  font-weight: 760;
}

.mode-picker label {
  position: relative;
}

.mode-picker input {
  position: absolute;
  opacity: 0;
}

.mode-picker span {
  display: flex;
  min-height: 74px;
  flex-direction: column;
  justify-content: center;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.mode-picker input:checked + span {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.mode-picker input:disabled + span {
  cursor: not-allowed;
  opacity: 0.46;
}

.mode-picker input:focus-visible + span {
  outline: 3px solid rgba(228, 131, 50, 0.35);
  outline-offset: 2px;
}

.mode-picker span:hover {
  transform: translateY(-1px);
}

.mode-picker small {
  color: var(--muted);
}

.primary-button,
.secondary-button {
  min-height: 50px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 760;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.primary-button {
  border: 1px solid var(--navy);
  color: white;
  background: var(--navy-dark);
  box-shadow: 0 9px 20px rgba(23, 63, 95, 0.18);
}

.primary-button:hover {
  background: var(--navy);
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--navy);
  color: var(--navy);
  background: white;
}

.secondary-button:hover {
  background: #f3f7fa;
  transform: translateY(-1px);
}

button:focus-visible {
  outline: 3px solid rgba(228, 131, 50, 0.42);
  outline-offset: 3px;
}

.hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.quiz-card {
  overflow: hidden;
  padding: clamp(24px, 5vw, 46px);
}

.quiz-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.quiz-meta > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.category-label {
  padding: 4px 9px;
}

.score-label strong {
  color: var(--navy);
}

.progress-track {
  height: 7px;
  margin: 15px 0 34px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8edf1;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), #f09a52);
  transition: width 260ms ease;
}

.quiz-card h2 {
  max-width: 730px;
  margin: 0 0 24px;
  color: var(--navy-dark);
  font-size: clamp(1.45rem, 4vw, 2.05rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.answers {
  display: grid;
  gap: 11px;
}

.answer-button {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  width: 100%;
  min-height: 61px;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: white;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.answer-button:not(:disabled):hover {
  border-color: #9fb1be;
  background: #f8fafb;
  transform: translateY(-1px);
}

.answer-letter {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--navy);
  background: #eef3f6;
  font-size: 0.84rem;
  font-weight: 800;
}

.answer-button.correct {
  border-color: var(--correct);
  background: var(--correct-soft);
}

.answer-button.correct .answer-letter {
  color: white;
  background: var(--correct);
}

.answer-button.incorrect {
  border-color: var(--incorrect);
  background: var(--incorrect-soft);
}

.answer-button.incorrect .answer-letter {
  color: white;
  background: var(--incorrect);
}

.answer-button:disabled {
  cursor: default;
}

.feedback {
  margin-top: 22px;
  padding: 16px 18px;
  border-left: 4px solid var(--orange);
  border-radius: 5px 12px 12px 5px;
  background: var(--orange-soft);
}

.feedback.is-incorrect {
  border-left-color: var(--incorrect);
  background: var(--incorrect-soft);
}

.feedback p {
  margin: 0;
}

.feedback-title {
  margin-bottom: 4px !important;
  color: var(--navy-dark);
  font-weight: 800;
}

.quiz-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.result-card > .eyebrow {
  margin-bottom: 7px;
}

.result-card h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
}

.result-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  margin: 34px 0;
}

.score-ring {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--orange) 0deg, var(--orange) 0deg, #e8edf1 0deg);
  position: relative;
}

.score-ring::before {
  position: absolute;
  width: 102px;
  height: 102px;
  border-radius: 50%;
  background: white;
  content: "";
}

.score-ring span {
  position: relative;
  color: var(--navy-dark);
  font-size: 1.55rem;
  font-weight: 850;
}

.result-message {
  margin: 0 0 5px;
  color: var(--navy-dark);
  font-size: 1.25rem;
  font-weight: 800;
}

.result-detail {
  margin: 0;
  color: var(--muted);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.review-section {
  margin-top: 38px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.review-section h2 {
  margin: 0 0 16px;
  color: var(--navy-dark);
}

.review-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.review-item:last-child {
  border-bottom: 0;
}

.review-item h3 {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: 1rem;
}

.review-item p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.review-item .correct-review {
  color: var(--correct);
  font-weight: 700;
}

.review-item .incorrect-review {
  color: var(--incorrect);
}

footer {
  padding: 0 16px 26px;
  color: rgba(255, 255, 255, 0.63);
  font-size: 0.78rem;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .app-shell {
    width: min(100% - 20px, 860px);
    padding-top: 18px;
  }

  .brand-bar {
    margin-left: 5px;
  }

  .site-header {
    align-items: flex-start;
  }

  .site-header .brand-bar {
    margin-left: 0;
  }

  .site-header .brand-title {
    max-width: 160px;
    font-size: 0.88rem;
  }

  .site-nav {
    gap: 2px;
  }

  .site-nav a {
    padding: 7px 8px;
    font-size: 0.8rem;
  }

  .card {
    border-radius: 18px;
  }

  .start-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .landing-card {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .landing-copy {
    padding: 38px 26px;
  }

  .landing-cover {
    min-height: 0;
    padding: 36px 24px;
    border-top: 7px solid var(--orange);
    border-left: 0;
  }

  .landing-actions,
  .landing-actions a {
    width: 100%;
  }

  .chapter-grid {
    grid-template-columns: 1fr;
  }

  .subchapter-panel {
    grid-template-columns: 1fr;
  }

  .chapter-tile {
    min-height: 90px;
  }

  .password-row {
    grid-template-columns: 1fr;
  }

  .download-heading {
    flex-direction: column;
  }

  .download-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .download-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .admin-toolbar,
  .admin-toolbar-actions,
  .admin-toolbar-actions button {
    width: 100%;
  }

  .admin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-section-tabs,
  .admin-section-tab,
  .admin-view-toolbar,
  .admin-view-toolbar .admin-toolbar-actions,
  .admin-view-toolbar button {
    width: 100%;
  }

  .admin-section-tabs,
  .admin-view-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .question-list-card {
    position: static;
    max-height: none;
  }

  .form-grid.two-columns {
    grid-template-columns: 1fr;
  }

  .cover-column {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 24px;
    align-items: end;
  }

  .cover-frame {
    width: 128px;
  }

  .author-credit {
    margin: 0 0 5px;
  }

  .feature-row div {
    min-height: 76px;
    padding: 10px 6px;
  }

  .feature-row strong {
    font-size: 1.25rem;
  }

  .mode-picker {
    grid-template-columns: 1fr;
  }

  .quiz-meta {
    align-items: center;
  }

  .category-label {
    display: none;
  }

  .result-summary {
    grid-template-columns: 1fr;
  }

  .score-ring {
    width: 120px;
    height: 120px;
  }

  .score-ring::before {
    width: 92px;
    height: 92px;
  }

  .result-actions,
  .result-actions button,
  .quiz-actions button,
  #start-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
