:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --blue: #1d4ed8;
  --blue-dark: #1e3a8a;
  --green: #15803d;
  --yellow: #a16207;
  --red: #b91c1c;
  --border: #e5e7eb;
  --soft-blue: #eff6ff;
  --soft-green: #ecfdf5;
  --soft-yellow: #fffbeb;
  --soft-red: #fef2f2;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* =========================
   TOP NAV
========================= */

.top-nav {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.top-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.nav-brand {
  font-size: 18px;
  font-weight: 700;
  color: #17365f;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.top-nav-links a {
  text-decoration: none;
  color: #374151;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.top-nav-links a:hover {
  color: #17365f;
}

/* MOBILE */

@media (max-width: 768px) {
  .top-nav-inner {
    flex-direction: column;
    padding: 12px 16px;
  }

  .top-nav-links {
    justify-content: center;
    gap: 16px;
  }

  .top-nav-links a {
    font-size: 14px;
  }

  .nav-brand {
    font-size: 17px;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

header {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: white;
  padding: 56px 20px 44px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: center;
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  margin-bottom: 18px;
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.88);
  max-width: 760px;
}

.hero-box {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  padding: 24px;
}

.hero-box strong {
  display: block;
  font-size: 18px;
  margin-bottom: 10px;
}

.hero-box ul {
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.9);
}

main {
  padding: 34px 20px 70px;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.info-card,
.result-card,
.question-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.info-card {
  padding: 22px;
}

.info-card h3 {
  margin-bottom: 8px;
  color: var(--blue-dark);
  font-size: 18px;
}

.info-card p {
  color: var(--muted);
  font-size: 15px;
}

.result-card {
  padding: 24px;
  margin-bottom: 28px;
  position: sticky;
  top: 12px;
  z-index: 5;
}

.result-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.score {
  font-size: 34px;
  font-weight: 800;
  color: var(--blue-dark);
}

.status-pill {
  padding: 8px 13px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  background: var(--soft-yellow);
  color: var(--yellow);
}

.bars {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: 150px 1fr 50px;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}

.bar {
  height: 10px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--blue);
  border-radius: 99px;
  transition: width 0.25s ease;
}

.section-title {
  margin: 34px 0 16px;
}

.section-title h2 {
  font-size: 26px;
  color: var(--blue-dark);
  margin-bottom: 6px;
}

.section-title p {
  color: var(--muted);
}

.question-list {
  display: grid;
  gap: 16px;
}

.question-card {
  padding: 22px;
}

.question-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.question-card h3 {
  font-size: 18px;
  color: #111827;
}

.priority {
  white-space: nowrap;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
}

.priority.high {
  background: var(--soft-red);
  color: var(--red);
}

.priority.medium {
  background: var(--soft-yellow);
  color: var(--yellow);
}

.priority.low {
  background: var(--soft-green);
  color: var(--green);
}

.explain {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 14px;
}

.answers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.answers label {
  cursor: pointer;
  border: 1px solid var(--border);
  background: #f9fafb;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  user-select: none;
}

.answers input {
  margin-right: 6px;
}

.solution {
  display: none;
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f9fafb;
}

.solution.show {
  display: block;
}

.solution h4 {
  margin-bottom: 8px;
  color: var(--blue-dark);
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.mini {
  padding: 10px;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--border);
  font-size: 14px;
}

.mini strong {
  display: block;
  color: #111827;
  margin-bottom: 3px;
}

.summary {
  margin-top: 34px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.summary h2 {
  color: var(--blue-dark);
  margin-bottom: 12px;
}

#todoList {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.todo-item {
  padding: 12px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid var(--border);
  font-size: 15px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  background: var(--blue);
  color: white;
}

button.secondary {
  background: #111827;
}

footer {
  color: var(--muted);
  text-align: center;
  padding: 28px 20px 45px;
  font-size: 14px;
}

@media print {

  header,
  .actions,
  footer {
    display: none;
  }

  body {
    background: white;
  }

  .result-card {
    position: static;
  }

  .question-card,
  .summary,
  .result-card {
    box-shadow: none;
    page-break-inside: avoid;
  }

  .solution {
    display: block !important;
  }
}

@media (max-width: 860px) {

  .hero,
  .intro-grid,
  .solution-grid {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }

  .result-card {
    position: static;
  }
}