:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --border: #e4ddd3;
  --text: #2b2620;
  --text-muted: #6b6259;
  --accent: #6a5acd;
  --accent-hover: #574abf;
  --shadow: 0 2px 10px rgba(43, 38, 32, 0.06);
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1815;
    --surface: #242019;
    --border: #3a352c;
    --text: #ece7de;
    --text-muted: #a89e8f;
    --accent: #9a8cf0;
    --accent-hover: #b0a4f5;
    --shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
  }
}

:root[data-theme="light"] {
  --bg: #faf8f5;
  --surface: #ffffff;
  --border: #e4ddd3;
  --text: #2b2620;
  --text-muted: #6b6259;
  --accent: #6a5acd;
  --accent-hover: #574abf;
  --shadow: 0 2px 10px rgba(43, 38, 32, 0.06);
}

:root[data-theme="dark"] {
  --bg: #1b1815;
  --surface: #242019;
  --border: #3a352c;
  --text: #ece7de;
  --text-muted: #a89e8f;
  --accent: #9a8cf0;
  --accent-hover: #b0a4f5;
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

header.site-header {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}

header.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.brand span {
  color: var(--accent);
}

nav.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 22px;
  font-weight: 600;
  font-size: 0.95rem;
}

nav.site-nav a:hover,
nav.site-nav a.active {
  color: var(--accent);
}

main {
  padding: 40px 0 60px;
}

h1 {
  font-size: 1.9rem;
  margin: 0 0 8px;
}

p.lede {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 0 28px;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 20px;
}

.chart-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  cursor: zoom-in;
  background: #fff;
}

.chart-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 32px 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.callout strong {
  color: var(--text);
}

/* Quiz */
.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  min-height: 260px;
}

.quiz-progress {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.quiz-question {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 24px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.quiz-option:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
}

.quiz-trail {
  margin-top: 28px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.quiz-trail a {
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}

.quiz-trail a:hover {
  text-decoration: underline;
}

.result-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 6px;
}

.result-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 10px;
}

.quiz-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
