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

:root {
  --bg: #faf9f6;
  --text: #1a1a1a;
  --accent: #1a5276;
  --accent-light: #2980b9;
  --muted: #6c757d;
  --border: #e0dcd4;
  --card-bg: #fff;
  --success: #27ae60;
  --max-w: 960px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent-light); }
a:hover { color: var(--accent); }

/* NAV */
header {
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav-links a:hover { color: var(--accent); }

/* MAIN */
main {
  flex: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}

/* HERO */
.hero {
  text-align: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.2rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* SECTIONS */
section { margin-bottom: 3rem; }

section > h2 {
  font-size: 1.5rem;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
  margin-bottom: 0.5rem;
}

.section-intro {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* QUIZ */
.quiz-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  max-width: 640px;
  margin: 0 auto;
}

.quiz-progress {
  height: 6px;
  background: #eee;
  border-radius: 3px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: var(--accent-light);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

.quiz-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.quiz-step.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-step h3 {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-option {
  display: block;
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
  color: var(--text);
}

.quiz-option:hover {
  border-color: var(--accent-light);
  background: #f0f7fc;
}

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

.quiz-result {
  display: none;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.quiz-result.active { display: block; }

.quiz-result h3 {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.result-card {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.result-card h4 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.result-card p {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.result-scores {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.result-score-item {
  background: rgba(255,255,255,0.2);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.quiz-restart {
  padding: 0.6rem 1.5rem;
  background: none;
  border: 2px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
}

.quiz-restart:hover {
  background: var(--accent);
  color: #fff;
}

/* COMPARISON */
.filter-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-bar label {
  font-size: 0.9rem;
  color: var(--muted);
}

.filter-bar select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  background: #fff;
}

.comparison-table-wrapper {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
  padding: 0.65rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table thead th {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  position: sticky;
  top: 0;
}

.comparison-table thead th:first-child {
  border-radius: 6px 0 0 0;
}

.comparison-table thead th:last-child {
  border-radius: 0 6px 0 0;
}

.comparison-table tbody tr:hover {
  background: #f8f7f4;
}

.comparison-table td:first-child {
  font-weight: 500;
  min-width: 180px;
}

.comparison-table .highlighted {
  background: #e8f4f8;
}

.comparison-table .row-hidden {
  display: none;
}

.highlight-toggles {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.highlight-toggles p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-right: 0.5rem;
}

.highlight-btn {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.highlight-btn:hover,
.highlight-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ARTICLES */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.article-card {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.article-card:last-child { border-bottom: none; }

.article-card .date {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-card h3 {
  font-size: 1.05rem;
  margin: 0.2rem 0 0.4rem;
  font-weight: 600;
}

.article-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.article-card h3 a:hover {
  color: var(--accent);
}

.article-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

.cta { margin-top: 1rem; font-size: 0.9rem; }
.cta a { font-weight: 600; text-decoration: none; }
.cta a:hover { text-decoration: underline; }

/* PAGE CONTENT */
.page-content { max-width: 700px; }
.page-content h1 {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 1rem;
}
.page-content h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
  border: none;
  padding-bottom: 0;
}
.page-content p { margin-bottom: 1rem; font-size: 0.95rem; }
.page-content ul { margin-bottom: 1rem; padding-left: 1.5rem; }
.page-content li { margin-bottom: 0.4rem; font-size: 0.95rem; }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  background: #f5f3ef;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.6rem; }
  .hero { padding: 2rem 0; }
  nav { justify-content: center; text-align: center; }
  .nav-links { gap: 1rem; }
  .quiz-container { padding: 1.25rem; }
  .comparison-table { font-size: 0.8rem; }
  .highlight-toggles { justify-content: center; }
}
