:root {
  --bg: #eef2f6;
  --ink: #1c2530;
  --muted: #667384;
  --panel: #ffffff;
  --line: #d8e0ea;
  --brand: #0f766e;
  --brand-dark: #0b5d56;
  --warning: #b45309;
  --danger: #b91c1c;
  --good: #15803d;
  --shadow: 0 18px 50px rgba(28, 37, 48, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #eef2f6 0%, #f8fafc 54%, #edf7f4 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 24px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

h2 {
  font-size: 1.1rem;
}

.eyebrow {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.score-card,
.status-pill {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 8px;
}

.score-card {
  min-width: 130px;
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow);
}

.score-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.score-card strong {
  display: block;
  margin-top: 4px;
  font-size: 2rem;
}

.layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 34px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.status-pill {
  min-width: 74px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

label {
  display: block;
  margin: 14px 0 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--ink);
  padding: 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  padding: 11px 14px;
}

button:hover {
  border-color: var(--brand);
}

.primary {
  width: 100%;
  margin-top: 14px;
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.primary:hover {
  background: var(--brand-dark);
}

.meter {
  height: 10px;
  margin-top: 12px;
  overflow: hidden;
  background: #dfe7ef;
  border-radius: 999px;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--danger);
  transition: width 180ms ease, background-color 180ms ease;
}

.tips {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.tips li,
.quiz-item,
.check-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.tips li {
  padding: 10px 12px;
  color: var(--muted);
}

.quiz-list,
.checklist {
  display: grid;
  gap: 12px;
}

.quiz-item {
  padding: 14px;
}

.quiz-item p {
  margin-bottom: 12px;
  line-height: 1.45;
}

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

.choice-row button.correct {
  border-color: var(--good);
  color: var(--good);
}

.choice-row button.wrong {
  border-color: var(--danger);
  color: var(--danger);
}

.check-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
}

.check-item input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.check-item span {
  color: var(--muted);
  line-height: 1.4;
}

.report-output {
  min-height: 144px;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f7fa;
  color: var(--ink);
  padding: 12px;
  overflow: auto;
}

@media (max-width: 820px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .score-card {
    text-align: left;
  }

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

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