﻿:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --line: #d6dde6;
  --line-strong: #aeb9c7;
  --ink: #15202b;
  --muted: #5f6d7c;
  --accent: #1f5fa8;
  --accent-strong: #16497f;
  --accent-soft: #e7f0fb;
  --success: #1f7a46;
  --success-soft: #e8f6ee;
  --warning: #7b5a1d;
  --warning-soft: #f8f1df;
  --danger: #b5493c;
  --danger-soft: #fceceb;
  --tag: var(--warning);
  --tag-soft: var(--warning-soft);
  --shadow: 0 14px 34px rgba(21, 32, 43, 0.08);
  --space-1: 0.32rem;
  --space-2: 0.45rem;
  --space-3: 0.7rem;
  --space-4: 0.75rem;
  --space-5: 1rem;
  --space-6: 1.25rem;
  --space-7: 2rem;
}

body.night-mode {
  color-scheme: dark;
  --bg: #0f151c;
  --surface: #161e27;
  --surface-soft: #111922;
  --line: #2d3a48;
  --line-strong: #4a5a6a;
  --ink: #eef4fb;
  --muted: #a8b5c3;
  --accent: #75a9e6;
  --accent-strong: #9bc4f3;
  --accent-soft: #1d334d;
  --success: #65c78d;
  --success-soft: #143524;
  --warning: #f0cf78;
  --warning-soft: #332b18;
  --danger: #f08f84;
  --danger-soft: #3b1e1e;
  --tag: var(--warning);
  --tag-soft: var(--warning-soft);
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button {
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: 0.78rem 1rem;
  border-radius: 4px;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

button:hover,
.button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

button.secondary,
.button.secondary {
  background: #fff;
  color: var(--accent);
}

button.secondary:hover,
.button.secondary:hover {
  background: var(--accent-soft);
}

button.ghost,
.button.ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

button.ghost:hover,
.button.ghost:hover {
  background: #fff;
  border-color: var(--line-strong);
}

body.night-mode button.secondary {
  background: var(--surface);
  color: var(--accent-strong);
}

body.night-mode button.secondary:hover,
body.night-mode button.ghost:hover {
  background: var(--accent-soft);
}

body.night-mode input,
body.night-mode select,
body.night-mode textarea {
  background: #0d141c;
  border-color: var(--line);
  color: var(--ink);
}

body.night-mode input::placeholder,
body.night-mode textarea::placeholder {
  color: #7e8b99;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.hidden {
  display: none !important;
}

.demo-app {
  min-height: 100vh;
}

.app-header,
.session-summary,
.viewer-stage,
.navigator-drawer,
.setup-tray {
  width: min(1180px, calc(100vw - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.85rem 0 0.55rem;
}

.header-kicker,
.panel-kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.32rem;
}

.header-kicker-link {
  display: inline-flex;
  text-decoration: none;
}

.header-kicker-link:hover {
  color: var(--accent-strong);
}

.project-meta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.45rem;
}

.status-badge,
.version-badge,
.build-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0.2rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
}

body.night-mode .status-badge,
body.night-mode .version-badge,
body.night-mode .build-badge {
  background: var(--surface);
}

.version-badge,
.build-badge {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-weight: 600;
}

.build-badge {
  color: var(--muted);
}

.status-prototype {
  border-color: #dcc58f;
  background: var(--tag-soft);
  color: var(--tag);
}

.app-header h1,
.setup-tray-head h2,
.empty-state h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.05rem);
}

.header-copy,
.muted {
  color: var(--muted);
}

.header-copy {
  margin: 0.35rem 0 0;
  max-width: 50rem;
  line-height: 1.5;
  font-size: 0.95rem;
}

.header-actions,
.tray-actions,
.button-row,
.viewer-footer,
.question-controls {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.header-actions {
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.header-actions button {
  padding: 0.52rem 0.65rem;
  white-space: nowrap;
  font-size: 0.92rem;
}

.theme-toggle,
.fullscreen-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.theme-toggle::before {
  content: "☾";
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle[aria-pressed="true"]::before {
  content: "☼";
}

.theme-toggle[aria-pressed="true"],
.fullscreen-toggle[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent);
}

.fullscreen-toggle::before {
  content: "⛶";
  font-size: 0.95rem;
  line-height: 1;
}

.setup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 25, 34, 0.4);
  z-index: 18;
}

body.night-mode .setup-backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.setup-tray {
  position: relative;
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 1.1rem 1.1rem 1.2rem;
  margin-bottom: 1rem;
  transform-origin: top center;
  transition: opacity 180ms ease, transform 180ms ease, max-height 180ms ease, margin 180ms ease, padding 180ms ease;
  max-height: 2000px;
  opacity: 1;
}

.setup-tray:not(.open) {
  max-height: none;
  opacity: 1;
  overflow: visible;
  transform: none;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 0;
}

.setup-tray:not(.open) > :not(.session-summary) {
  display: none;
}

.setup-tray-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.tray-actions {
  display: grid;
  gap: 0.45rem;
  justify-items: end;
  min-width: min(32rem, 100%);
}

.tray-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.launch-settings-summary {
  width: 100%;
  border: 1px solid rgba(31, 95, 168, 0.2);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  padding: 0.45rem 0.55rem;
  text-align: left;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.setup-card-wide {
  background: var(--surface-soft);
}

.filter-grid,
.settings-grid,
.settings-grid-inner {
  display: grid;
  gap: 0.65rem;
}

.settings-grid {
  align-items: start;
}

.filter-grid {
  grid-template-columns: minmax(260px, 1.15fr) repeat(2, minmax(170px, 0.75fr)) minmax(210px, 0.85fr);
  align-items: start;
}

.question-type-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  padding: 0.48rem 0.62rem;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
}

body.night-mode .question-type-choice {
  background: var(--surface);
}

.settings-grid {
  grid-template-columns: minmax(210px, 0.75fr) minmax(500px, 1.65fr) minmax(280px, 0.9fr);
}

.settings-grid-inner {
  grid-template-columns: minmax(170px, 0.7fr) minmax(300px, 1.3fr);
  gap: 0.55rem;
  padding: 0.5rem 0.6rem 0.6rem;
}

.settings-column {
  min-width: 0;
}

.settings-column-wide {
  min-width: 280px;
}

.settings-panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
}

.settings-panel-head,
.settings-static-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7rem, auto);
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.settings-panel-head small,
.settings-static-head small {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.76rem;
  text-align: right;
}

.settings-panel-head.compact-head {
  padding-bottom: 0.5rem;
}

.settings-panel .resume-box {
  border: 0;
}

.advanced-settings {
  background: var(--surface-soft);
}

.advanced-settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.42rem;
  padding: 0.5rem 0.55rem 0.6rem;
}

.advanced-settings .tier-dot {
  margin-right: 0.45rem;
  vertical-align: middle;
}


.settings-panel .toggle {
  margin-bottom: 0.28rem;
  gap: 0.42rem;
  line-height: 1.25;
}

.settings-panel .field {
  margin-bottom: 0.38rem;
}

.settings-panel .field span {
  margin-bottom: 0.22rem;
  font-size: 0.82rem;
}

.settings-panel .field input,
.settings-panel .field select,
.settings-panel .field textarea {
  padding: 0.42rem 0.5rem;
}

.settings-panel .button-row {
  gap: 0.45rem;
}

.session-tools-panel .button-row button {
  flex: 1 1 6.2rem;
  min-height: 2.05rem;
  padding-inline: 0.55rem;
}

.panel-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.8rem;
}

.mode-switch-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.mode-pill {
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  display: grid;
  gap: 0.35rem;
  border-radius: 4px;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.mode-pill strong {
  font-size: 1.05rem;
}

.mode-pill span:last-child {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.mode-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mode-pill.standard.selected {
  border-color: #3a77b8;
  background: #eaf3ff;
}

.mode-pill.qouture.selected {
  border-color: #b84334;
  background: #fff0ed;
}

body.night-mode .mode-pill {
  background: var(--surface);
}

body.night-mode .mode-pill.standard.selected {
  background: rgba(74, 137, 201, 0.18);
}

body.night-mode .mode-pill.qouture.selected {
  background: rgba(196, 82, 64, 0.18);
}

body.standard-mode .setup-grid > .panel-card:nth-child(2) {
  display: none;
}

.setup-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(8rem, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

.preview-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.75rem 0.8rem;
}

.preview-chip span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.preview-chip strong {
  font-size: 1.15rem;
}

.panel-title,
.resume-title,
.question-step,
.feedback-summary,
.session-title {
  font-weight: 700;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: 0.55rem;
}

.panel-title {
  margin-bottom: 0.55rem;
}

.panel-title-row .panel-title {
  margin-bottom: 0;
}

.panel-meta {
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

.settings-subtitle {
  margin: 0.35rem 0 0.35rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-version {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-block p,
.about-copy {
  margin: 0;
  line-height: 1.55;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.about-section {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.9rem;
}

.about-heading {
  font-weight: 700;
}

.about-list {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.5;
}

.about-list li + li {
  margin-top: 0.35rem;
}

.about-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
}

.about-dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 1120px);
  max-height: 92vh;
  margin: 4vh auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.about-dialog-body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  overflow: auto;
  max-height: calc(92vh - 4.5rem);
}

.resume-box {
  display: grid;
  gap: 0.42rem;
  padding: 0.55rem;
}

.session-library {
  margin-top: 0.35rem;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.session-library-list {
  display: grid;
  gap: 0.55rem;
}

.session-entry {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.65rem 0.75rem;
}

.session-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.session-entry-title {
  font-weight: 700;
  font-size: 0.92rem;
}

.session-entry-meta {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.session-entry-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
}

.result-score-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.45rem;
}

.result-pill {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
}

.result-pill.correct {
  border-color: #99d0ad;
  background: var(--success-soft);
}

.result-pill.wrong {
  border-color: #efb1a8;
  background: var(--danger-soft);
}

.result-pill.neutral {
  border-color: #b8c0ca;
  background: #f1f4f7;
}

.resume-meta,
.small,
.field small {
  font-size: 0.88rem;
  color: var(--muted);
}

.field {
  display: block;
  margin-bottom: 0.62rem;
}

.field span {
  display: block;
  margin-bottom: 0.24rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.54rem 0.62rem;
  resize: vertical;
}

.field select[multiple] {
  padding: 0.35rem;
}

.speed-run-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0 0 0.45rem;
}

.field.compact {
  margin-bottom: 0;
}

.field.compact span {
  font-size: 0.78rem;
}

.field.compact select {
  padding: 0.5rem 0.65rem;
}

.field small {
  display: block;
  margin-top: 0.35rem;
  line-height: 1.35;
}

.module-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.38rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.module-check {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.34rem 0.48rem;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.9rem;
  cursor: pointer;
}

.module-check:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.module-check:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.module-check input {
  width: auto;
  margin: 0;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.session-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.setup-tray .session-summary {
  width: 100%;
  margin: 0 0 1rem;
  background: var(--surface-soft);
  box-shadow: none;
}

.setup-tray:not(.open) .session-summary {
  background: var(--surface);
  box-shadow: var(--shadow);
}

.session-heading {
  margin-bottom: 0.9rem;
}

.session-title {
  font-size: 1.3rem;
  margin-bottom: 0.24rem;
}

.session-subtitle {
  color: var(--muted);
}

.session-tier-summary {
  margin-top: 0.45rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.55rem;
  padding: 0.14rem 0.38rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.84rem;
}

.tier-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  display: inline-block;
}

.tier-dot.red {
  background: #cf4d4d;
}

.tier-dot.black {
  background: #15171a;
}

.tier-dot.yellow {
  background: #d4a629;
}

.tier-dot.green {
  background: #2f8a4b;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.8rem;
}

.stat-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.8rem 0.85rem;
}

.stat-chip span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.18rem;
}

.stat-chip strong {
  font-size: 1.2rem;
}

body.long-session-active .session-summary {
  position: sticky;
  top: 0;
  z-index: 18;
  box-shadow: 0 8px 20px rgba(21, 32, 43, 0.08);
}

.progress-overview {
  display: flex;
  gap: 2px;
  align-items: stretch;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 4px 14px rgba(21, 32, 43, 0.08);
  backdrop-filter: blur(8px);
}

.progress-segment {
  flex: 1 1 0;
  min-width: 3px;
  height: 0.48rem;
  padding: 0;
  border: 0;
  border-radius: 1px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.progress-segment.unanswered {
  background: #d7dde5;
}

.progress-segment.correct {
  background: #11823b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 0 0 1px rgba(17, 130, 59, 0.18);
}

.progress-segment.wrong {
  background: #cf4d4d;
}

.progress-segment.locked {
  background:
    repeating-linear-gradient(
      135deg,
      #9aa3af 0,
      #9aa3af 3px,
      #d7dde5 3px,
      #d7dde5 6px
    );
  cursor: not-allowed;
  opacity: 0.88;
}

.progress-segment.locked:hover {
  filter: none;
  transform: none;
}

.progress-segment.locked::after {
  content: "";
}

.progress-segment.current {
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px #fff;
  filter: saturate(1.15);
  transform: translateY(-1px);
  z-index: 1;
}

.progress-segment:hover {
  filter: brightness(0.94);
  transform: translateY(-1px);
}

.progress-overview.aggregate {
  padding: 0.35rem;
}

.progress-aggregate-bar {
  position: relative;
  display: flex;
  width: 100%;
  height: 0.54rem;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 2px;
  background: #d7dde5;
  cursor: pointer;
}

.progress-aggregate-part {
  height: 100%;
  min-width: 0;
}

.progress-aggregate-part.correct {
  background: #11823b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.progress-aggregate-part.wrong {
  background: #cf4d4d;
}

.progress-aggregate-part.unanswered {
  background: #d7dde5;
}

.progress-aggregate-part.locked {
  background:
    repeating-linear-gradient(
      135deg,
      #9aa3af 0,
      #9aa3af 4px,
      #d7dde5 4px,
      #d7dde5 8px
    );
}

.progress-current-marker {
  position: absolute;
  top: -0.18rem;
  bottom: -0.18rem;
  width: 2px;
  background: var(--ink);
  box-shadow: 0 0 0 1px #fff;
  transform: translateX(-1px);
}

body.night-mode .progress-overview {
  background: rgba(22, 30, 39, 0.96);
}

body.night-mode .preview-chip,
body.night-mode .launch-settings-summary,
body.night-mode .settings-panel,
body.night-mode .advanced-settings,
body.night-mode .about-section,
body.night-mode .about-dialog,
body.night-mode .session-entry,
body.night-mode .module-checklist,
body.night-mode .tier-pill,
body.night-mode .stat-chip,
body.night-mode .progress-overview,
body.night-mode .question-jump,
body.night-mode .badge.subtle,
body.night-mode .option-card,
body.night-mode .feedback-item,
body.night-mode .resource-links a {
  background: var(--surface);
}

body.night-mode .module-check:hover {
  background: var(--surface);
}

body.night-mode .navigator-drawer {
  background: rgba(22, 30, 39, 0.98);
  box-shadow: 0 -14px 34px rgba(0, 0, 0, 0.4);
}

body.night-mode .question-jump.answered,
body.night-mode .option-card.selected {
  background: var(--accent-soft);
}

body.night-mode .question-jump.locked {
  background: #101721;
}

body.night-mode .jump-icon.meq {
  background: var(--surface);
}

body.night-mode .question-images img,
body.night-mode .option-image,
body.night-mode .explanation-image {
  background: #f7f7f7;
}

body.night-mode .progress-segment.current {
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--surface);
}

body.night-mode .progress-current-marker {
  box-shadow: 0 0 0 1px var(--surface);
}

.benchmarks {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.benchmark-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
  font-size: 0.93rem;
}

.navigator-drawer {
  position: fixed;
  left: 50%;
  bottom: 0.9rem;
  transform: translate(-50%, calc(100% + 1rem));
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 6px 6px 0 0;
  box-shadow: 0 -10px 30px rgba(21, 32, 43, 0.16);
  padding: 1rem;
  z-index: 24;
  width: min(1180px, calc(100vw - 1rem));
  max-height: 62vh;
  overflow: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.navigator-drawer.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.2rem, 1fr));
  gap: 0.55rem;
}

.question-jump {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-height: 3.1rem;
  padding: 0.4rem 0.3rem;
  border-radius: 3px;
}

.jump-main {
  display: block;
  font-weight: 700;
}

.jump-sub {
  display: block;
  font-size: 0.64rem;
  color: var(--muted);
  line-height: 1.2;
  margin-top: 0.14rem;
}

.jump-icon {
  margin-left: 0.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.04rem 0.24rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
}

.jump-icon.meq {
  background: #fff;
  border: 1px solid var(--accent-soft);
}

.question-jump.answered {
  background: #eef5fd;
  border-color: #9ebee3;
}

.question-jump.correct {
  background: var(--success-soft);
  border-color: #97cfab;
}

.question-jump.current {
  outline: 2px solid var(--accent);
}

.question-jump.bookmarked {
  box-shadow: inset 0 0 0 2px #c79036;
}

.question-jump.locked {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f5f7fa;
}

.question-jump.locked .jump-main::after {
  content: " låst";
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.viewer-stage {
  padding-bottom: 6rem;
}

.empty-state,
.completion-panel,
.question-card,
.question-list-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.empty-state {
  padding: 2rem;
}

.completion-panel {
  padding: 1.4rem 1.5rem;
}

.completion-kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.completion-panel h2 {
  margin: 0;
  font-size: 1.6rem;
}

.completion-copy {
  color: var(--muted);
  margin: 0.45rem 0 1rem;
}

.completion-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(7rem, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.completion-stat {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 0.75rem;
}

.completion-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}

.completion-stat strong {
  font-size: 1.25rem;
}

.completion-stat.correct {
  border-color: #99d0ad;
  background: var(--success-soft);
}

.completion-stat.wrong {
  border-color: #efb1a8;
  background: var(--danger-soft);
}

.completion-stat.neutral {
  border-color: #b8c0ca;
  background: #f1f4f7;
}

.completion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.completion-review {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.review-item {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 0.85rem;
}

.review-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.review-question-text {
  color: var(--text);
  margin: 0 0 0.65rem;
}

.review-answer {
  border-left: 3px solid var(--accent);
  color: var(--muted);
  margin: 0.65rem 0;
  padding-left: 0.65rem;
}

.review-explanations {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.review-explanation {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.55rem 0.65rem;
}

.review-explanation.correct {
  border-color: #99d0ad;
  background: var(--success-soft);
}

.completion-note {
  margin-top: 0.8rem;
}

.completion-note p {
  margin: 0.25rem 0;
}

.completion-challenge {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 800;
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
}

.completion-challenge.beaten {
  border-color: #99d0ad;
  background: var(--success-soft);
}

.completion-challenge.missed {
  border-color: #efb1a8;
  background: var(--danger-soft);
}

.challenge-hall {
  border: 1px solid var(--line);
  background: var(--surface);
  margin-top: 0.85rem;
  padding: 0.85rem;
}

.challenge-hall-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.challenge-hall-list {
  display: grid;
  gap: 0.45rem;
}

.challenge-hall-row {
  display: grid;
  grid-template-columns: 3rem minmax(8rem, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 0.55rem 0.65rem;
}

.challenge-rank {
  color: var(--accent);
  font-weight: 900;
}

.challenge-submit {
  display: grid;
  grid-template-columns: auto minmax(9rem, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  border-top: 1px solid var(--line);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.challenge-submit label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.challenge-submit input {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  min-height: 2.35rem;
  padding: 0.45rem 0.6rem;
}

.completion-rules {
  border-top: 1px solid var(--line);
  margin-top: 0.85rem;
  padding-top: 0.85rem;
}

.completion-rule {
  display: grid;
  grid-template-columns: minmax(5rem, 8rem) 1fr;
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.completion-rule span {
  color: var(--accent);
  font-weight: 800;
}

.question-card {
  padding: 1.2rem 1.25rem;
}

.question-list-view {
  display: grid;
  gap: 1rem;
}

.question-list-item {
  padding: 1rem 1.1rem;
  scroll-margin-top: 1rem;
}

.question-list-item.current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(31, 95, 168, 0.12);
}

.question-meta,
.resource-panel {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.question-meta {
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--line);
}

.question-step {
  margin-bottom: 0.4rem;
  color: var(--muted);
}

.question-origin {
  margin-bottom: 0.5rem;
}

.question-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 3px;
  border: 1px solid rgba(31, 95, 168, 0.15);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
}

.badge.subtle {
  background: #fff;
  color: var(--muted);
  border-color: var(--line);
}

.badge.tag {
  background: var(--tag-soft);
  color: var(--tag);
  border-color: rgba(123, 90, 29, 0.15);
}

.question-body {
  padding: 1rem 0;
}

.question-body h2 {
  margin: 0 0 0.95rem;
  font-size: clamp(1.3rem, 2.1vw, 1.8rem);
}

.question-images {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.question-text {
  line-height: 1.7;
  font-size: 1.02rem;
}

.question-images img,
.question-image,
.option-image,
.explanation-image {
  display: block;
  width: auto;
  max-width: min(100%, 860px);
  height: auto;
  max-height: min(52vh, 620px);
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: zoom-in;
}

.question-images img,
.question-image {
  justify-self: start;
}

.option-image,
.explanation-image {
  max-width: min(100%, 640px);
  max-height: min(42vh, 460px);
}

.options-list {
  display: grid;
  gap: 0.8rem;
}

.option-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 0.95rem 1rem;
  cursor: pointer;
}

.option-card button {
  width: 100%;
  justify-content: flex-start;
  align-items: stretch;
  text-align: left;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.option-header {
  display: flex;
  width: 100%;
  gap: 0.85rem;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
}

.option-index {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}

.option-content {
  flex: 1;
  min-width: 0;
  line-height: 1.55;
  text-align: left;
}

.option-card.selected {
  border-color: var(--accent);
  background: #f4f8fe;
}

.option-card.revealed.correct {
  border-color: #99d0ad;
  background: var(--success-soft);
}

.option-card.revealed.incorrect.selected {
  border-color: #efb1a8;
  background: var(--danger-soft);
}

.feedback-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.feedback-summary {
  margin-bottom: 0.7rem;
}

.feedback-list {
  display: grid;
  gap: 0.7rem;
}

.feedback-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.8rem 0.9rem;
  background: #fff;
}

.feedback-item.correct {
  border-color: #99d0ad;
  background: var(--success-soft);
}

.feedback-item.incorrect {
  border-color: #efb1a8;
  background: var(--danger-soft);
}

.feedback-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.resource-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}

.resource-links {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.resource-links a {
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 0.55rem 0.8rem;
}

.viewer-footer {
  margin-top: 1.15rem;
  justify-content: space-between;
  align-items: center;
}

.footer-status {
  text-align: center;
  flex: 1;
  color: var(--muted);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  border-radius: 0;
  background: rgba(12, 17, 22, 0.74);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  max-height: 92vh;
  margin: 4vh auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.lightbox-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  overflow: auto;
}

.lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 6rem);
}

@media (max-width: 1120px) {
  .filter-grid,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advanced-settings-grid {
    grid-template-columns: 1fr;
  }

  .custom-settings-details {
    grid-column: 1 / -1;
  }

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

  .stats-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .app-header,
  .session-summary,
  .viewer-stage,
  .navigator-drawer,
  .setup-tray {
    width: calc(100vw - 1rem);
  }

  .app-header,
  .setup-tray-head,
  .tray-button-row,
  .question-meta,
  .resource-panel,
  .viewer-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .app-header {
    padding-top: 0.8rem;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.1rem;
  }

  .setup-tray {
    position: relative;
    margin-bottom: 0.8rem;
  }

  .mode-switch-card,
  .setup-grid,
  .filter-grid,
  .settings-grid,
  .settings-grid-inner,
  .advanced-settings-grid,
  .speed-run-options,
  .stats-strip {
    grid-template-columns: 1fr;
  }

  .setup-preview {
    grid-template-columns: repeat(4, minmax(7rem, 1fr));
  }

  .navigator-drawer {
    width: calc(100vw - 0.5rem);
    bottom: 0.25rem;
  }

  .question-card,
  .completion-panel,
  .empty-state,
  .session-summary,
  .setup-tray {
    border-radius: 6px;
  }

  .completion-stats {
    grid-template-columns: 1fr;
  }

  .completion-rule {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .challenge-hall-row,
  .challenge-submit {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  body.long-session-active .session-summary {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.45rem;
    padding: 0.28rem;
  }

  body.long-session-active:not(.long-summary-expanded) .session-heading,
  body.long-session-active:not(.long-summary-expanded) .stats-strip,
  body.long-session-active:not(.long-summary-expanded) .benchmarks {
    display: none;
  }

  body.long-session-active .progress-overview {
    order: -1;
    margin-top: 0;
    padding: 0.2rem;
    min-height: 1rem;
    cursor: pointer;
  }

  body.long-session-active .progress-segment,
  body.long-session-active .progress-aggregate-bar {
    height: 0.38rem;
  }

  body.long-session-active.long-summary-expanded .session-summary {
    padding: 0.75rem;
  }

  body.long-session-active.long-summary-expanded .progress-overview {
    margin-bottom: 0.1rem;
  }

  .footer-status {
    text-align: left;
  }
}



.feedback-item.answer-key-warning {
  border-color: #c58b28;
  background: #fff4dc;
}

body.night-mode .feedback-item.answer-key-warning {
  background: rgba(197, 139, 40, 0.16);
  border-color: #c58b28;
}


body.night-mode .progress-segment.locked,
body.night-mode .progress-aggregate-part.locked {
  background:
    repeating-linear-gradient(
      135deg,
      #5d6875 0,
      #5d6875 4px,
      #1f2933 4px,
      #1f2933 8px
    );
}




.self-rating-answer {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 4px;
  padding: 0.95rem 1rem;
  line-height: 1.6;
}

.self-rating-answer strong {
  display: block;
  margin-bottom: 0.45rem;
}

.self-rating-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.self-rating-choice {
  display: grid;
  gap: 0.2rem;
  text-align: left;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.self-rating-choice span {
  color: var(--muted);
  font-size: 0.88rem;
}

.self-rating-choice.self-correct.selected,
.feedback-item.self-rating-feedback.correct,
.progress-segment.correct {
  border-color: #99d0ad;
  background: var(--success-soft);
}

.self-rating-choice.self-unsure.selected,
.feedback-item.self-rating-feedback.neutral {
  border-color: #b8c0ca;
  background: #f1f4f7;
}

.self-rating-choice.self-wrong.selected,
.feedback-item.self-rating-feedback.wrong {
  border-color: #efb1a8;
  background: var(--danger-soft);
}

.progress-segment.neutral,
.progress-aggregate-part.neutral {
  background: #9aa3af;
}

body.night-mode .self-rating-choice {
  background: var(--surface);
}

body.night-mode .self-rating-choice.self-unsure.selected,
body.night-mode .feedback-item.self-rating-feedback.neutral {
  background: #202a36;
}

@media (max-width: 720px) {
  .self-rating-row {
    grid-template-columns: 1fr;
  }
}


.mobile-answer-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  display: none;
  min-width: 4.25rem;
  box-shadow: var(--shadow);
}

.mobile-answer-panel {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 80;
  display: none;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: var(--shadow-strong);
  padding: 0.75rem;
}

.mobile-answer-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.mobile-answer-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(3.1rem, 1fr));
  gap: 0.5rem;
}

.mobile-answer-button {
  min-height: 3rem;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}

.mobile-answer-button.selected {
  border-color: var(--accent);
  background: #e8f1ff;
}

body.answer-flash-correct::after,
body.answer-flash-wrong::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  border: 8px solid transparent;
  animation: answer-frame-flash 900ms ease forwards;
}

body.answer-flash-correct::after {
  border-color: rgba(34, 137, 77, 0.9);
  box-shadow: inset 0 0 0 9999px rgba(34, 137, 77, 0.06);
}

body.answer-flash-wrong::after {
  border-color: rgba(190, 52, 41, 0.9);
  box-shadow: inset 0 0 0 9999px rgba(190, 52, 41, 0.06);
}

@keyframes answer-frame-flash {
  0% { opacity: 0; }
  16% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 760px) {
  .mobile-answer-toggle:not(.hidden) {
    display: inline-flex;
  }

  .mobile-answer-panel:not(.hidden) {
    display: block;
  }
}


.choice-landing {
  position: relative;
  width: min(1180px, calc(100vw - 2rem));
  margin: 1rem auto 1.2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    radial-gradient(circle at 18% 18%, rgba(70, 132, 205, 0.25), transparent 34%),
    radial-gradient(circle at 82% 24%, rgba(190, 65, 45, 0.18), transparent 32%),
    linear-gradient(135deg, #f8fbff 0%, #eef4fa 46%, #f7f3ef 100%);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2vw, 1.5rem);
}

body.night-mode .choice-landing {
  background:
    radial-gradient(circle at 18% 18%, rgba(71, 133, 203, 0.22), transparent 34%),
    radial-gradient(circle at 82% 24%, rgba(190, 65, 45, 0.2), transparent 32%),
    linear-gradient(135deg, #101923 0%, #141f29 48%, #211716 100%);
}

.landing-preferences {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.9rem;
}

.landing-humor-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.62rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(21, 32, 43, 0.06);
  cursor: pointer;
}

.landing-humor-toggle span {
  display: grid;
  gap: 0.05rem;
}

.landing-humor-toggle strong {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.landing-humor-toggle small {
  color: var(--muted);
  font-size: 0.72rem;
}

.landing-humor-toggle input {
  width: 2.35rem;
  height: 1.2rem;
  accent-color: var(--accent);
}

body.night-mode .landing-humor-toggle {
  background: rgba(22, 30, 39, 0.82);
}

body.humor-off .choice-landing {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.94)),
    linear-gradient(135deg, #f8fbff 0%, #eef3f7 100%);
  box-shadow: 0 16px 36px rgba(21, 32, 43, 0.07);
}

body.night-mode.humor-off .choice-landing {
  background:
    linear-gradient(180deg, rgba(18, 26, 35, 0.96), rgba(14, 22, 30, 0.94)),
    linear-gradient(135deg, #101923 0%, #151d26 100%);
}

body.humor-off .medical-rain,
body.humor-off .arcade-teasers {
  display: none;
}

body.humor-off .matrix-pill {
  visibility: hidden;
  opacity: 0;
}

body.humor-off .choice-orbit {
  opacity: 0.28;
  box-shadow: inset 0 0 0 2.5rem rgba(31, 95, 168, 0.04);
}


body.humor-off .choice-pill {
  min-height: 10rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(21, 32, 43, 0.06);
}

body.humor-off .choice-pill.blue,
body.humor-off .choice-pill.red {
  border-color: var(--line-strong);
}

body.humor-off .choice-pill.blue:hover,
body.humor-off .choice-pill.red:hover {
  background: #f4f8fb;
  border-color: var(--accent);
}

body.humor-off .choice-pill strong {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

body.humor-off .landing-stat-card::before,
body.humor-off .landing-stat-number.is-counting {
  animation: none;
}

body.humor-off .landing-stat-card::before {
  opacity: 0.2;
  transform: translateX(0);
}

.choice-orbit {
  position: absolute;
  inset: auto -6rem -12rem auto;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  border: 1px solid rgba(31, 95, 168, 0.18);
  box-shadow: inset 0 0 0 2.5rem rgba(255,255,255,0.18);
  pointer-events: none;
}


.medical-rain {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 0.1rem;
  padding: 0.25rem 0.55rem;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.62;
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.medical-rain::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(47, 138, 75, 0.24), transparent 22%),
    radial-gradient(circle at 78% 72%, rgba(31, 95, 168, 0.2), transparent 28%),
    linear-gradient(180deg, transparent 0 46%, rgba(255, 255, 255, 0.28) 50%, transparent 54%);
  background-size: auto, auto, 100% 3.4rem;
  opacity: 0.78;
}

.medical-rain::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 2.8rem, rgba(31, 95, 168, 0.12) 2.8rem 2.9rem),
    repeating-linear-gradient(180deg, transparent 0 0.75rem, rgba(47, 138, 75, 0.08) 0.75rem 0.85rem);
  mix-blend-mode: multiply;
  opacity: 0.68;
}

.medical-rain span {
  display: block;
  min-height: 7.4rem;
  color: rgba(31, 95, 168, 0.98);
  font-family: "Courier New", monospace;
  font-size: clamp(0.8rem, 1.85vw, 1.18rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-shadow:
    0 0 5px rgba(255, 255, 255, 0.55),
    0 0 18px rgba(31, 95, 168, 0.44);
  writing-mode: vertical-rl;
  animation: medical-rain-fall 7.2s linear infinite;
  transform: translateY(-130%);
}

.medical-rain span:nth-child(3n) {
  color: rgba(47, 138, 75, 0.92);
  animation-duration: 9.5s;
}

.medical-rain span:nth-child(4n) {
  color: rgba(181, 73, 60, 0.84);
  animation-duration: 11s;
}

.medical-rain span:nth-child(6n) {
  color: rgba(25, 124, 129, 0.9);
  animation-duration: 8.4s;
}

.medical-rain span:nth-child(2n) { animation-delay: -2s; }
.medical-rain span:nth-child(5n) { animation-delay: -4s; }
.medical-rain span:nth-child(7n) { animation-delay: -6s; }
.medical-rain span:nth-child(n + 13) { transform: translateY(-260%); }

body.night-mode .medical-rain {
  opacity: 0.72;
}

body.night-mode .medical-rain span {
  color: rgba(85, 216, 137, 0.92);
  text-shadow:
    0 0 6px rgba(85, 216, 137, 0.55),
    0 0 22px rgba(85, 216, 137, 0.44);
}

@keyframes medical-rain-fall {
  from { transform: translateY(-140%); }
  to { transform: translateY(170%); }
}

@media (prefers-reduced-motion: reduce) {
  .medical-rain span {
    animation: none;
    transform: translateY(0);
  }
}

.choice-copy {
  position: relative;
  max-width: 55rem;
}

.choice-copy h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
}

.choice-copy p {
  max-width: 48rem;
  min-height: 3.1rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.landing-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 58rem;
  margin-top: 1.25rem;
}

.landing-stat-card {
  position: relative;
  overflow: hidden;
  min-height: 7rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(25, 124, 129, 0.28);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.58)),
    repeating-linear-gradient(180deg, rgba(31, 95, 168, 0.08) 0 1px, transparent 1px 8px);
  box-shadow: 0 18px 42px rgba(21, 32, 43, 0.07);
}

.landing-stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(244, 201, 108, 0.24), transparent),
    linear-gradient(180deg, transparent 0 43%, rgba(25, 124, 129, 0.14) 49%, transparent 55%);
  transform: translateX(-120%);
  animation: landing-stat-scan 6.8s ease-in-out infinite;
  pointer-events: none;
}

.landing-stat-card:nth-child(2)::before { animation-delay: 0.9s; }
.landing-stat-card:nth-child(3)::before { animation-delay: 1.7s; }

.landing-stat-label,
.landing-stat-note {
  position: relative;
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-stat-number {
  position: relative;
  display: block;
  margin: 0.1rem 0 0.18rem;
  color: var(--ink);
  font-family: "Cascadia Mono", "Courier New", monospace;
  font-size: clamp(1.75rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.08em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(255,255,255,0.55);
}

.landing-stat-number.is-counting {
  animation: landing-digit-tick 0.72s steps(4, end) infinite;
}

.landing-stat-note {
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.72rem;
  line-height: 1.25;
}

body.night-mode .landing-stat-card {
  background:
    linear-gradient(180deg, rgba(14, 24, 27, 0.88), rgba(14, 24, 27, 0.66)),
    repeating-linear-gradient(180deg, rgba(85, 216, 137, 0.08) 0 1px, transparent 1px 8px);
  border-color: rgba(85, 216, 137, 0.24);
}

body.night-mode .landing-stat-number {
  color: #d8ffe4;
  text-shadow: 0 0 16px rgba(85, 216, 137, 0.24);
}

@keyframes landing-stat-scan {
  0%, 52% { transform: translateX(-120%); opacity: 0; }
  62% { opacity: 1; }
  82%, 100% { transform: translateX(120%); opacity: 0; }
}

@keyframes landing-digit-tick {
  0% { transform: translateY(0); filter: blur(0); }
  38% { transform: translateY(-0.12rem); filter: blur(0.7px); }
  100% { transform: translateY(0); filter: blur(0); }
}

.choice-actions {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.choice-pill {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 10rem;
  gap: 0.35rem;
  padding: 1rem;
  text-align: left;
  justify-content: stretch;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.78);
  color: var(--ink);
  box-shadow: 0 18px 40px rgba(21, 32, 43, 0.08);
}

.matrix-pill {
  position: relative;
  display: inline-block;
  margin-left: 0.55rem;
  width: 3.15rem;
  height: 1.38rem;
  border-radius: 999px;
  transform: rotate(-22deg);
  vertical-align: -0.42rem;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    inset -0.45rem -0.2rem 0 rgba(0, 0, 0, 0.18),
    0 0.5rem 1.1rem rgba(35, 31, 28, 0.24);
}

.matrix-pill::before {
  content: "";
  position: absolute;
  inset: 0.18rem auto auto 0.42rem;
  width: 1.05rem;
  height: 0.32rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transform: rotate(-9deg);
}

.matrix-pill::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.12rem;
  bottom: 0.12rem;
  width: 1px;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.18);
}

.matrix-pill.blue-pill {
  background: linear-gradient(135deg, #8bc6ff 0%, #2377c7 45%, #0d3c87 100%);
  filter: drop-shadow(0 0 0.45rem rgba(31, 95, 168, 0.34));
}

.matrix-pill.red-pill {
  background: linear-gradient(135deg, #ffb09f 0%, #c74335 45%, #7f1d19 100%);
  filter: drop-shadow(0 0 0.45rem rgba(181, 73, 60, 0.34));
}

.choice-pill strong {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.choice-pill span:last-child {
  color: var(--muted);
}

.choice-kicker {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.choice-pill.blue {
  border-color: rgba(31, 95, 168, 0.45);
}

.choice-pill.blue:hover {
  background: #e9f3ff;
  border-color: #2f73bb;
}

.choice-pill.red {
  border-color: rgba(181, 73, 60, 0.45);
}

.choice-pill.red:hover {
  background: #fff0ed;
  border-color: #b5493c;
}

.standard-quick-panel {
  position: relative;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(31, 95, 168, 0.25);
  border-radius: 6px;
  background: rgba(255,255,255,0.72);
}

body.night-mode .choice-pill,
body.night-mode .standard-quick-panel {
  background: rgba(22, 30, 39, 0.82);
}

.standard-quick-panel h3 {
  margin: 0;
  font-size: 1.35rem;
}

.standard-subject-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.9rem;
}

.standard-subject-section {
  display: grid;
  gap: 0.45rem;
}

.standard-subject-heading {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.standard-subject-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.8rem, 1fr));
  gap: 0.55rem;
}

.standard-subject-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.45rem;
  justify-content: stretch;
  text-align: left;
  min-height: 3.9rem;
  padding: 0.55rem 0.6rem;
  border-color: rgba(31, 95, 168, 0.28);
  background: #fff;
  color: var(--ink);
}

.standard-subject-card:hover {
  background: var(--accent-soft);
}

.standard-subject-icon {
  display: inline-grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid rgba(31, 95, 168, 0.18);
  border-radius: 4px;
  background: var(--surface-soft);
  font-size: 1.05rem;
}

.standard-subject-body {
  display: grid;
  gap: 0.04rem;
  min-width: 0;
}

.standard-subject-card span {
  color: var(--muted);
  font-size: 0.8rem;
}

.standard-subject-card strong {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.05;
}

.standard-subject-card small {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
}

body.landing-mode .setup-tray {
  display: none;
}

body.landing-mode .viewer-stage {
  display: none;
}

@media (max-width: 760px) {
  .landing-stats {
    grid-template-columns: 1fr;
  }

  .landing-stat-card {
    min-height: 5.8rem;
  }

  .choice-actions {
    grid-template-columns: 1fr;
  }
}


.standard-key-help {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.standard-key-help span {
  border: 1px solid rgba(31, 95, 168, 0.18);
  background: rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.standard-feedback-toast {
  position: sticky;
  top: 0.5rem;
  z-index: 65;
  width: min(1180px, calc(100vw - 2rem));
  margin: 0.55rem auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.65rem 0.8rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.standard-feedback-toast.correct {
  border-color: rgba(31, 122, 70, 0.35);
  background: var(--success-soft);
}

.standard-feedback-toast.wrong {
  border-color: rgba(181, 73, 60, 0.35);
  background: var(--danger-soft);
}

.standard-feedback-toast strong {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.standard-feedback-toast span {
  color: var(--ink);
  line-height: 1.35;
}

.standard-feedback-rows {
  display: grid;
  gap: 0.55rem;
}

.standard-feedback-row {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
}

.standard-feedback-row > .feedback-status-word {
  padding-top: 0.08rem;
}

body.standard-quiz-active .app-header,
body.standard-quiz-active .setup-tray,
body.standard-quiz-active .resource-panel,
body.standard-quiz-active .feedback-panel,
body.standard-quiz-active .viewer-footer {
  display: none;
}

body.standard-quiz-active .viewer-stage {
  padding-bottom: 0.8rem;
  width: min(1040px, calc(100vw - 1rem));
}

body.standard-quiz-active .question-card {
  padding: 0.85rem 0.95rem;
}

body.standard-quiz-active .question-meta {
  margin-bottom: 0.35rem;
}

body.standard-quiz-active .question-body {
  padding: 0.55rem 0;
}

body.standard-quiz-active .question-body h2 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

body.standard-quiz-active .question-text {
  font-size: 0.98rem;
}

body.standard-quiz-active .question-images img {
  max-height: min(26vh, 260px);
}

body.standard-quiz-active .options-list {
  gap: 0.48rem;
}

body.standard-quiz-active .option-card {
  padding: 0.62rem 0.75rem;
}

body.standard-quiz-active .option-index {
  width: 1.75rem;
  height: 1.75rem;
}

@media (max-width: 760px) {
  .standard-feedback-toast {
    top: 0;
    margin-top: 0;
    width: 100%;
    border-radius: 0;
  }

  .standard-feedback-row {
    grid-template-columns: 4.2rem minmax(0, 1fr);
    gap: 0.55rem;
  }
}


.standard-feedback-lines {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.standard-feedback-lines b {
  font-weight: 800;
}


.standard-feedback-toast.correct .feedback-status-word,
.feedback-status-word.correct-word {
  color: var(--success);
}

.standard-feedback-toast.wrong > .feedback-status-word {
  color: var(--danger);
}

.feedback-status-word.wrong-word {
  color: var(--danger);
}



.arcade-teasers {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.arcade-teaser {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem;
  border: 1px dashed rgba(88, 74, 62, 0.38);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.42);
  color: inherit;
  text-decoration: none;
}

.arcade-teaser[data-arcade-href] {
  cursor: default;
}

body.arcade-unlocked .arcade-teaser[data-arcade-href] {
  cursor: pointer;
}

body.arcade-unlocked .arcade-teaser[data-arcade-href] .choice-kicker::after {
  content: " · åben";
}

.arcade-teaser strong {
  font-size: 1.05rem;
}

.arcade-teaser > span:last-child {
  color: var(--muted);
  line-height: 1.35;
}

.arcade-teaser.boss {
  border-color: rgba(181, 73, 60, 0.38);
}

.arcade-teaser.pinball {
  border-color: rgba(31, 95, 168, 0.36);
  background:
    linear-gradient(135deg, rgba(31, 95, 168, 0.1), transparent 45%),
    rgba(255, 255, 255, 0.42);
}

.arcade-teaser.shooter {
  border-color: rgba(31, 95, 168, 0.46);
  background:
    linear-gradient(135deg, rgba(101, 166, 255, 0.14), transparent 48%),
    rgba(255, 255, 255, 0.42);
}

.arcade-teaser.strip {
  border-color: rgba(183, 131, 47, 0.42);
}

.arcade-teaser.meat {
  border-color: rgba(147, 53, 39, 0.45);
  background:
    linear-gradient(135deg, rgba(181, 73, 60, 0.1), transparent 48%),
    rgba(255, 255, 255, 0.42);
}

.arcade-teaser.quest {
  border-color: rgba(27, 127, 76, 0.42);
  background:
    linear-gradient(135deg, rgba(27, 127, 76, 0.1), transparent 45%),
    rgba(255, 255, 255, 0.42);
}

.arcade-teaser.pensumdyr {
  border-color: rgba(31, 95, 168, 0.42);
  background:
    linear-gradient(135deg, rgba(31, 95, 168, 0.1), transparent 45%),
    rgba(255, 255, 255, 0.42);
}

.arcade-teaser.idle {
  border-color: rgba(183, 131, 47, 0.44);
  background:
    linear-gradient(135deg, rgba(183, 131, 47, 0.13), transparent 48%),
    rgba(255, 255, 255, 0.42);
}

.arcade-teaser.risk {
  border-color: rgba(27, 127, 76, 0.46);
  background:
    linear-gradient(135deg, rgba(27, 127, 76, 0.14), transparent 48%),
    rgba(255, 255, 255, 0.42);
}

.arcade-teaser.casino {
  border-color: rgba(183, 131, 47, 0.5);
  background:
    radial-gradient(circle at 82% 20%, rgba(181, 73, 60, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(183, 131, 47, 0.16), transparent 48%),
    rgba(255, 255, 255, 0.42);
}

.arcade-teaser.life {
  border-color: rgba(181, 73, 60, 0.48);
  background:
    radial-gradient(circle at 86% 22%, rgba(26, 127, 55, 0.2), transparent 25%),
    radial-gradient(circle at 18% 82%, rgba(181, 73, 60, 0.18), transparent 28%),
    linear-gradient(90deg, transparent 0 46%, rgba(181, 73, 60, 0.16) 49%, transparent 52%),
    radial-gradient(circle at 82% 22%, rgba(31, 95, 168, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(181, 73, 60, 0.1), transparent 48%),
    rgba(255, 255, 255, 0.42);
}

.arcade-teaser.focus {
  border-color: rgba(216, 162, 50, 0.5);
  background:
    radial-gradient(circle at 14% 16%, rgba(31, 95, 168, 0.18), transparent 24%),
    radial-gradient(circle at 82% 74%, rgba(107, 63, 36, 0.28), transparent 24%),
    radial-gradient(circle at 78% 25%, rgba(216, 162, 50, 0.2), transparent 18%),
    linear-gradient(90deg, rgba(6, 16, 22, 0.14), transparent 38%, rgba(6, 16, 22, 0.1)),
    linear-gradient(45deg, rgba(216, 162, 50, 0.2) 0 2px, transparent 2px 22px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.56), rgba(216, 162, 50, 0.1));
}

body.arcade-unlocked .arcade-teaser[data-arcade-href]:hover,
body.arcade-unlocked .arcade-teaser[data-arcade-href]:focus-visible {
  border-style: solid;
  transform: translateY(-1px);
  outline: 2px solid rgba(31, 95, 168, 0.18);
  outline-offset: 2px;
}

body.night-mode .arcade-teaser {
  background: rgba(22, 30, 39, 0.62);
}

body.night-mode .arcade-teaser.meat {
  background:
    linear-gradient(135deg, rgba(181, 73, 60, 0.16), transparent 48%),
    rgba(22, 30, 39, 0.62);
}

body.night-mode .arcade-teaser.quest {
  background:
    linear-gradient(135deg, rgba(27, 127, 76, 0.18), transparent 48%),
    rgba(22, 30, 39, 0.62);
}

body.night-mode .arcade-teaser.pensumdyr {
  background:
    linear-gradient(135deg, rgba(31, 95, 168, 0.18), transparent 48%),
    rgba(22, 30, 39, 0.62);
}

body.night-mode .arcade-teaser.pinball,
body.night-mode .arcade-teaser.shooter {
  background:
    linear-gradient(135deg, rgba(31, 95, 168, 0.18), transparent 48%),
    rgba(22, 30, 39, 0.62);
}

body.night-mode .arcade-teaser.idle {
  background:
    linear-gradient(135deg, rgba(183, 131, 47, 0.18), transparent 48%),
    rgba(22, 30, 39, 0.62);
}

body.night-mode .arcade-teaser.risk {
  background:
    linear-gradient(135deg, rgba(27, 127, 76, 0.18), transparent 48%),
    rgba(22, 30, 39, 0.62);
}

body.night-mode .arcade-teaser.casino {
  background:
    radial-gradient(circle at 82% 20%, rgba(181, 73, 60, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(183, 131, 47, 0.22), transparent 48%),
    rgba(22, 30, 39, 0.62);
}


.arcade-teaser.ects {
  border-color: rgba(45, 102, 143, 0.5);
  background:
    linear-gradient(90deg, transparent 0 47%, rgba(31, 127, 79, 0.14) 49%, transparent 52%),
    radial-gradient(circle at 78% 24%, rgba(255, 248, 230, 0.22), transparent 24%),
    linear-gradient(135deg, rgba(45, 102, 143, 0.16), transparent 48%),
    rgba(255, 255, 255, 0.42);
}

body.night-mode .arcade-teaser.ects {
  background:
    linear-gradient(90deg, transparent 0 47%, rgba(31, 127, 79, 0.22) 49%, transparent 52%),
    radial-gradient(circle at 78% 24%, rgba(255, 248, 230, 0.16), transparent 24%),
    linear-gradient(135deg, rgba(45, 102, 143, 0.2), transparent 48%),
    rgba(22, 30, 39, 0.62);
}
body.night-mode .arcade-teaser.life {
  background:
    linear-gradient(90deg, transparent 0 46%, rgba(181, 73, 60, 0.18) 49%, transparent 52%),
    radial-gradient(circle at 82% 22%, rgba(31, 95, 168, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(181, 73, 60, 0.18), transparent 48%),
    rgba(22, 30, 39, 0.62);
}

@media (max-width: 760px) {
  .arcade-teasers {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 761px) and (max-width: 1120px) {
  .arcade-teasers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.standard-progress-shell {
  position: sticky;
  top: 0;
  z-index: 66;
  width: min(1040px, calc(100vw - 1rem));
  margin: 0.35rem auto 0.45rem;
  padding: 0.18rem;
  border: 1px solid rgba(88, 74, 62, 0.18);
  border-radius: 3px;
  background: rgba(255, 250, 241, 0.86);
  backdrop-filter: blur(10px);
}

.standard-progress-bar {
  display: flex;
  gap: 2px;
  width: 100%;
}

.standard-progress-segment {
  flex: 1 1 0;
  min-width: 3px;
  height: 0.34rem;
  padding: 0;
  border: 0;
  border-radius: 1px;
  background: #d7dde5;
  cursor: pointer;
}

.standard-progress-segment.correct,
.standard-progress-part.correct {
  background: #11823b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38), 0 0 0 1px rgba(17, 130, 59, 0.14);
}

.standard-progress-segment.wrong,
.standard-progress-part.wrong {
  background: #cf4d4d;
}

.standard-progress-segment.neutral,
.standard-progress-part.neutral {
  background: #9aa3af;
}

.standard-progress-segment.unanswered,
.standard-progress-part.unanswered {
  background: #d7dde5;
}

.standard-progress-segment.locked,
.standard-progress-part.locked {
  background: repeating-linear-gradient(135deg, #9aa3af 0, #9aa3af 4px, #d7dde5 4px, #d7dde5 8px);
  cursor: not-allowed;
}

.standard-progress-segment.current {
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px #fff;
  transform: translateY(-1px);
  z-index: 1;
}

.standard-progress-aggregate {
  position: relative;
  display: flex;
  width: 100%;
  height: 0.42rem;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 2px;
  background: #d7dde5;
  cursor: pointer;
}

.standard-progress-part {
  display: block;
  height: 100%;
}

.standard-progress-current {
  position: absolute;
  top: -0.16rem;
  bottom: -0.16rem;
  width: 2px;
  background: var(--ink);
  box-shadow: 0 0 0 1px #fff;
}

.standard-shortcuts {
  position: fixed;
  left: 50%;
  bottom: 0.45rem;
  z-index: 67;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  width: min(1040px, calc(100vw - 1rem));
  padding: 0.35rem 0.5rem;
  transform: translateX(-50%);
  border: 1px solid rgba(88, 74, 62, 0.16);
  border-radius: 3px;
  background: rgba(255, 250, 241, 0.84);
  color: var(--muted);
  font-size: 0.74rem;
  backdrop-filter: blur(10px);
}

.standard-shortcuts strong {
  color: var(--ink);
}

body.standard-quiz-active .viewer-stage {
  padding-bottom: 2.8rem;
}

body.night-mode .standard-progress-shell,
body.night-mode .standard-shortcuts {
  background: rgba(22, 30, 39, 0.88);
}

@media (max-width: 760px) {
  .standard-shortcuts {
    gap: 0.35rem;
    font-size: 0.68rem;
  }
}



.inline-question-image {
  margin: 1rem 0;
}

.inline-question-image .question-image {
  justify-self: start;
}


.progress-segment.answered,
.progress-aggregate-part.answered {
  background: var(--color-accent-muted, #b7c3d0);
}


.standard-progress-segment.answered,
.standard-progress-part.answered {
  background: var(--color-accent-muted, #b7c3d0);
}


.settings-panel .settings-subtitle {
  margin: 0.2rem 0 0.28rem;
}

.settings-panel .muted.small {
  font-size: 0.78rem;
  line-height: 1.35;
}
