﻿:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --ink: #192028;
  --muted: #66707a;
  --line: #ded8ca;
  --accent: #b3261e;
  --accent-2: #125c45;
  --focus: #0f62fe;
  --ok: #137333;
  --bad: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #fff7df, transparent 34rem), var(--bg);
  color: var(--ink);
}

button, select { font: inherit; }

.shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 3vw, 28px) 42px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin: 10px 0 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.5rem);
  line-height: .95;
  letter-spacing: 0;
}

.subline {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 62ch;
}

.exam-chip {
  background: #192028;
  color: #fff;
  border-radius: 8px;
  padding: 14px;
  min-width: 132px;
  text-align: center;
}

.exam-chip span {
  display: block;
  font-size: 2.2rem;
  font-weight: 850;
  line-height: 1;
}

.exam-chip small {
  display: block;
  margin-top: 6px;
  color: #dbe4ea;
}

.options-toggle {
  display: none;
  width: 100%;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  padding: 12px 14px;
  min-height: 44px;
  font-weight: 800;
  cursor: pointer;
}

.controls, .status-panel, .question-card, .review {
  background: rgba(255,253,248,.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(25,32,40,.08);
}

.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr) minmax(160px, 1.2fr) auto;
  gap: 8px;
  padding: 10px;
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
}

.mode, .ghost, .answer, .next {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 7px;
  padding: 12px 14px;
  cursor: pointer;
  min-height: 44px;
}

.mode.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.ghost {
  color: var(--accent-2);
  font-weight: 700;
}

select {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 0 12px;
  min-height: 44px;
  color: var(--ink);
}

.status-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 12px 0;
}

.status-panel div {
  padding: 12px 14px;
  background: #fffdf8;
}

.label {
  display: block;
  color: var(--muted);
  font-size: .82rem;
}

.status-panel strong { font-size: 1.35rem; }

.question-card {
  padding: clamp(16px, 4vw, 28px);
  min-height: 430px;
}

.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 18px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
}

.question-layout.no-visual {
  grid-template-columns: 1fr;
}

.question-layout {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 22px;
  align-items: start;
}

.hazard-wrap {
  min-height: 124px;
  display: grid;
  place-items: center;
}


.adr-label {
  width: 108px;
  height: 108px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.14));
}

.fallback-label {
  display: none;
}
.hazard {
  width: 92px;
  height: 92px;
  transform: rotate(45deg);
  border: 3px solid #111;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}

.hazard-face {
  transform: rotate(-45deg);
  width: 86px;
  height: 86px;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 10px 8px 7px;
  color: #111;
  text-align: center;
}

.pictogram {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.classno {
  align-self: end;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
}

.topic-badge {
  width: 92px;
  min-height: 92px;
  border: 2px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--accent-2);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
}

.topic-badge span {
  max-width: 76px;
  overflow-wrap: anywhere;
  text-align: center;
  font-weight: 900;
  font-size: 1.1rem;
}

.hazard.red { background: #e53935; }
.hazard.green { background: #18804b; }
.hazard.orange { background: #f7941d; }
.hazard.yellow { background: #ffd83d; }
.hazard.blue { background: #2d7dd2; }
.hazard.white { background: #fff; }
.hazard.blackwhite { background: linear-gradient(135deg, #fff 0 48%, #111 49% 100%); }
.hazard.yellowwhite { background: linear-gradient(#ffd83d 0 50%, #fff 51% 100%); }
.hazard.stripe { background: repeating-linear-gradient(90deg, #fff 0 10px, #e53935 10px 20px); }
.hazard.split { background: linear-gradient(#fff 0 50%, #e53935 51% 100%); }
.hazard.splitred { background: linear-gradient(#e53935 0 50%, #ffd83d 51% 100%); }
.hazard.blackstripe { background: repeating-linear-gradient(180deg, #fff 0 10px, #111 10px 15px); }

.question h2 {
  margin: 0 0 18px;
  font-size: clamp(1.28rem, 4.5vw, 2rem);
  line-height: 1.2;
}

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

.answer {
  width: 100%;
  text-align: left;
  background: #fff;
}

.answer:hover, .answer:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.answer.correct {
  border-color: var(--ok);
  background: #eaf5ed;
}

.answer.wrong {
  border-color: var(--bad);
  background: #fdebea;
  color: #7a160f;
  box-shadow: inset 4px 0 0 var(--bad);
}

.feedback {
  margin-top: 18px;
  border-left: 4px solid var(--accent-2);
  padding: 12px 14px;
  background: #eef7f3;
  border-radius: 4px;
}

.next {
  margin-top: 16px;
  width: 100%;
  background: var(--accent-2);
  color: #fff;
  border-color: var(--accent-2);
  font-weight: 800;
}

.review {
  margin-top: 12px;
  padding: 16px;
}

.review.hidden, .hidden { display: none; }
.review h2 { margin-top: 0; }
.missed { border-top: 1px solid var(--line); padding: 12px 0; }

.missed.is-wrong {
  border-left: 4px solid var(--bad);
  margin-top: 10px;
  padding: 12px 0 12px 12px;
  background: #fff7f6;
}

.picked-wrong {
  color: var(--bad);
  font-weight: 800;
}

.picked-correct {
  color: var(--ok);
  font-weight: 800;
}
.notice { color: var(--muted); }

@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr; }
  .exam-chip { text-align: left; }
  .options-toggle { display: block; }
  .controls { grid-template-columns: repeat(3, 1fr); position: static; margin-bottom: 12px; }
  .controls.collapsed { display: none; }
  .controls select, .controls .ghost { grid-column: 1 / -1; }
  .question-layout.no-visual {
  grid-template-columns: 1fr;
}

.question-layout { grid-template-columns: 1fr; }
  .hazard-wrap { min-height: 104px; }
  .status-panel strong { font-size: 1.1rem; }
}





.hazard.fallback-label {
  display: none;
}


