:root {
  --bg: #0c0d0f;
  --surface: #16181c;
  --surface-2: #1e2126;
  --border: #2b2f36;
  --border-strong: #3a3f47;
  --text: #f2f3f5;
  --text-2: #a6abb4;
  --text-3: #6f757e;
  --green: #4ade80;
  --green-dim: #14301f;
  --amber: #fbbf24;
  --amber-dim: #332810;
  --red: #f87171;
  --red-dim: #331919;
  --accent: #c4b5fd;
  --radius: 14px;
  --radius-lg: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12, 13, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 26px; height: 26px;
  border: 1.5px solid var(--accent);
  border-radius: 7px;
  display: grid; place-items: center;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.header-note { font-size: 12px; color: var(--text-3); }

/* Hero */
.hero { padding: 56px 0 36px; }
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(34px, 9vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 750;
  margin-bottom: 16px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p {
  color: var(--text-2);
  font-size: 16px;
  max-width: 480px;
  margin-bottom: 8px;
}
.hero .micro {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 14px;
}

/* Section */
.section { padding: 12px 0 60px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-head h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.section-head span { font-size: 12px; color: var(--text-3); }

/* Test cards */
.test-list { display: grid; gap: 12px; }
.test-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.test-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.test-card:active { transform: translateY(0); }
.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
}
.chip.hot { color: var(--green); border-color: #2a5c3b; background: var(--green-dim); }
.card-title { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 5px; }
.card-tagline { color: var(--text-2); font-size: 14px; margin-bottom: 14px; }
.card-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.card-meta span { display: flex; align-items: center; gap: 5px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--text-3);
  font-size: 12px;
}
.site-footer p + p { margin-top: 6px; }

/* Test page */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  margin: 24px 0 20px;
}
.back-link:hover { color: var(--text); }

.challenge-banner {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 20px;
}
.challenge-banner strong { color: var(--accent); }

.test-hero { padding: 8px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.test-hero h1 { font-size: clamp(30px, 8vw, 42px); line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 12px; }
.test-hero .tagline { font-size: 17px; color: var(--text); margin-bottom: 10px; }
.test-hero .description { color: var(--text-2); font-size: 14px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.step-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.step-title { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 8px; }
.step-desc { color: var(--text-2); font-size: 15px; margin-bottom: 20px; }

.quote-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px 22px;
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.tips { list-style: none; margin-bottom: 28px; }
.tips li {
  position: relative;
  padding-left: 24px;
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 12px;
}
.tips li::before {
  content: "";
  position: absolute;
  left: 4px; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, border-color 0.15s;
}
.btn:hover { border-color: var(--text-3); }
.btn:active { opacity: 0.8; }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: #fff; border-color: #fff; }
.btn-ghost { background: transparent; }

.origin {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 28px;
}
.origin h3 { font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.origin p { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.origin .source { font-size: 11px; color: var(--text-3); margin-top: 8px; }

/* Reaction options */
.option-list { display: grid; gap: 10px; margin-bottom: 24px; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.option:hover { border-color: var(--border-strong); background: var(--surface-2); }
.option-dot {
  flex: 0 0 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  margin-top: 1px;
  position: relative;
}
.option:hover .option-dot { border-color: var(--text-2); }
.option-body { flex: 1; }
.option-hint { display: block; font-size: 12px; color: var(--text-3); margin-top: 5px; line-height: 1.5; }

/* Result */
.result-card {
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  text-align: center;
  border: 1px solid;
  margin-bottom: 20px;
}
.result-card.green { background: var(--green-dim); border-color: #2a5c3b; }
.result-card.amber { background: var(--amber-dim); border-color: #6b531a; }
.result-card.red { background: var(--red-dim); border-color: #6b2a2a; }
.verdict-label {
  display: inline-block;
  font-size: 11px; font-weight: 800; letter-spacing: 0.14em;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.green .verdict-label { background: #2a5c3b; color: var(--green); }
.amber .verdict-label { background: #6b531a; color: var(--amber); }
.red .verdict-label { background: #6b2a2a; color: var(--red); }
.result-headline { font-size: 28px; font-weight: 750; letter-spacing: -0.03em; margin-bottom: 12px; }
.result-card.green .result-headline { color: var(--green); }
.result-card.amber .result-headline { color: var(--amber); }
.result-card.red .result-headline { color: var(--red); }
.result-desc { font-size: 15px; line-height: 1.6; color: var(--text); }

.science-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 24px;
}
.science-note h3 { font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.science-note p { font-size: 13px; color: var(--text-3); line-height: 1.6; }

.action-stack { display: grid; gap: 10px; margin-bottom: 20px; }

.share-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}
.share-preview-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
#shareCanvas { width: 100%; height: auto; display: block; border-radius: 10px; }

.disclaimer { font-size: 11px; color: var(--text-3); text-align: center; line-height: 1.6; padding: 8px 0 40px; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.hidden { display: none !important; }

@media (min-width: 600px) {
  .action-stack { grid-template-columns: 1fr 1fr; }
  .option-list { grid-template-columns: 1fr 1fr; }
}
