:root {
  --bg: #f6f1e8;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: #fffdfa;
  --line: rgba(33, 44, 47, 0.12);
  --text: #1e2729;
  --muted: #5f6c6f;
  --brand: #0f6972;
  --brand-dark: #0b4a50;
  --warm: #c18b34;
  --ok: #1d7a54;
  --bad: #b44747;
  --shadow: 0 20px 50px rgba(28, 38, 41, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font-display: "Avenir Next Condensed", "Franklin Gothic Medium", "Arial Narrow", sans-serif;
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(15, 105, 114, 0.14), transparent 28%),
    radial-gradient(circle at right top, rgba(193, 139, 52, 0.18), transparent 22%),
    linear-gradient(180deg, #f9f5ee 0%, #efe8dc 100%);
}

a {
  color: var(--brand-dark);
}

button,
input {
  font: inherit;
}

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

.hero,
.panel,
.question-card,
.floating-progress {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  display: block;
  padding: 16px 20px;
  border-radius: 24px;
}

.eyebrow,
.question-index {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--muted);
}

.hero h1,
.panel h2,
.question-card h2,
.summary-box strong,
.stat strong,
.points-badge,
.floating-stats strong,
.progress-ring-copy strong {
  font-family: var(--font-display);
}

.hero h1 {
  margin: 6px 0 4px;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1;
  max-width: 16ch;
}

.lead {
  margin: 0;
  max-width: 52ch;
  line-height: 1.45;
  font-size: 0.92rem;
  color: var(--muted);
}

.stat,
.summary-box {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
}

.stat span,
.summary-box span,
.field-label,
.floating-stats span,
.progress-ring-label {
  color: var(--muted);
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 1.45rem;
}

.floating-progress {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 24px;
}

.progress-ring-wrap {
  position: relative;
  width: 112px;
  height: 112px;
}

.progress-ring {
  width: 112px;
  height: 112px;
  transform: rotate(-90deg);
}

.progress-ring-track,
.progress-ring-value {
  fill: none;
  stroke-width: 10;
}

.progress-ring-track {
  stroke: rgba(31, 47, 49, 0.08);
}

.progress-ring-value {
  stroke: url(#progressGradient);
  stroke: var(--brand);
  stroke-linecap: round;
  transition: stroke-dashoffset 180ms ease;
}

.progress-ring-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  align-content: center;
  gap: 3px;
  padding: 18px 12px 12px;
  transform: none;
}

.progress-ring-copy > * {
  display: block;
}

.progress-ring-label {
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.04em;
}

.progress-ring-copy strong {
  font-size: 1.45rem;
  line-height: 1;
}

.progress-ring-copy small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1;
}

.floating-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  min-width: 190px;
}

.floating-stats strong {
  display: block;
  margin-top: 3px;
  font-size: 1rem;
}

.floating-reset {
  align-self: stretch;
  white-space: nowrap;
}

.result-card.is-passed {
  border-color: rgba(29, 122, 84, 0.28);
  background: rgba(29, 122, 84, 0.08);
}

.result-card.is-failed {
  border-color: rgba(180, 71, 71, 0.22);
  background: rgba(180, 71, 71, 0.08);
}

.result-lead {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.summary-box strong {
  display: block;
  margin-top: 6px;
  font-size: 1.8rem;
}

.workspace {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.panel,
.question-card {
  padding: 22px;
  border-radius: 28px;
}

.panel h2,
.question-card h2 {
  margin: 0;
  font-size: 1.45rem;
}

.panel-head,
.question-top,
.card-actions,
.summary-grid {
  display: flex;
}

.panel-head,
.question-top {
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.points-badge {
  flex: 0 0 auto;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(15, 105, 114, 0.1);
  color: var(--brand-dark);
  font-size: 1rem;
}

.question-image-wrap {
  margin: 20px 0 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.question-image-wrap img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.answer-section {
  margin-top: 20px;
}

.field-label {
  margin: 0 0 12px;
  line-height: 1.6;
}

.options-list {
  display: grid;
  gap: 12px;
}

.option-card {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(25, 42, 45, 0.14);
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.option-card:hover,
.button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-marker {
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 999px;
  border: 2px solid rgba(15, 105, 114, 0.32);
  background: rgba(255, 255, 255, 0.88);
}

.option-card input[type="checkbox"] + .option-marker {
  border-radius: 8px;
}

.option-card.is-selected {
  border-color: rgba(15, 105, 114, 0.38);
  box-shadow: inset 0 0 0 1px rgba(15, 105, 114, 0.18);
}

.option-card.is-selected .option-marker {
  background: linear-gradient(135deg, var(--brand), var(--warm));
  border-color: transparent;
}

.option-card.is-correct {
  border-color: rgba(29, 122, 84, 0.28);
  background: rgba(29, 122, 84, 0.08);
}

.option-card.is-wrong {
  border-color: rgba(180, 71, 71, 0.22);
  background: rgba(180, 71, 71, 0.08);
}

.option-text {
  line-height: 1.65;
}

.card-actions {
  gap: 12px;
  justify-content: space-between;
  margin-top: 18px;
  flex-wrap: nowrap;
}

.button,
.ghost-button {
  border-radius: 999px;
  cursor: pointer;
}

.button {
  border: 0;
  padding: 13px 18px;
}

.button-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.button-secondary,
.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
}

.ghost-button {
  padding: 9px 12px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1040px) {
  .floating-progress {
    top: auto;
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 16px, 1080px);
    padding-top: 12px;
    padding-bottom: 148px;
  }

  .hero,
  .panel,
  .question-card {
    padding: 18px;
    border-radius: 24px;
  }

  .question-top,
  .card-actions {
    display: grid;
  }

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

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

  .floating-progress {
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    justify-content: initial;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .progress-ring-wrap,
  .progress-ring {
    width: 78px;
    height: 78px;
  }

  .progress-ring-copy {
    gap: 2px;
    padding: 14px 8px 10px;
  }

  .progress-ring-label {
    font-size: 0.62rem;
  }

  .progress-ring-copy strong {
    font-size: 1rem;
  }

  .progress-ring-copy small {
    font-size: 0.64rem;
  }

  .floating-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    gap: 6px 10px;
  }

  .floating-stats span {
    font-size: 0.68rem;
  }

  .floating-stats strong {
    margin-top: 1px;
    font-size: 0.88rem;
    line-height: 1.05;
  }

  .floating-reset {
    align-self: stretch;
    padding: 8px 10px;
    font-size: 0.74rem;
  }
}
