:root {
  --bg1: #0b0f19;
  --bg2: #101a2e;

  --card: rgba(15,23,42,.84);
  --stroke: rgba(255,255,255,.10);

  --text: #e5e7eb;
  --muted: #a6b0c3;

  --accent: #7c3aed;
  --shadow: 0 20px 60px rgba(0,0,0,.45);

  --r: #ef4444;
  --y: #eab308;
  --b: #3b82f6;
  --g: #10b981;

  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

.logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 10% 10%, #1a1f3a 0%, transparent 60%),
    radial-gradient(1200px 800px at 90% 20%, #1f2a4e 0%, transparent 60%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(700px 400px at 20% 30%, rgba(124,58,237,.25), transparent 60%),
    radial-gradient(700px 400px at 80% 40%, rgba(59,130,246,.20), transparent 60%),
    radial-gradient(600px 350px at 60% 80%, rgba(239,68,68,.16), transparent 60%);
  pointer-events: none;
}

/* App container */
.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 60px;
  position: relative;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(124,58,237,.9), rgba(59,130,246,.8));
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.10);
}

.brand-name { font-weight: 900; letter-spacing: .2px; }
.brand-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.top-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.tiny-links { display:flex; gap:10px; align-items:center; }

/* Card */
.card {
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.72));
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.view { margin-top: 12px; }
.hidden { display: none; }

/* Text helpers */
.pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(229,231,235,.70);
  font-size: 12px;
  margin-bottom: 10px;
}

h1 {
  margin: 8px 0 10px;
  font-size: 42px;
  line-height: 1.06;
}
@media (max-width: 520px) { h1 { font-size: 34px; } }

h2 { margin: 22px 0 10px; }
h3 { margin: 0 0 10px; }

.accent { color: #c4b5fd; }

.lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  margin: 10px 0 18px;
}

.fineprint {
  color: rgba(229,231,235,.65);
  font-size: 12px;
  margin-top: 14px;
  line-height: 1.4;
}

.divider {
  height: 1px;
  background: rgba(255,255,255,.10);
  margin: 18px 0;
}

/* Buttons */
.btn {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  transition: transform .18s ease, border-color .18s ease, filter .18s ease;
}

.btn:hover { border-color: rgba(255,255,255,.30); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn.primary {
  border: none;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  box-shadow: 0 16px 40px rgba(124,58,237,.22);
  color: #fff;
}
.btn.primary:hover { filter: brightness(1.08); transform: translateY(-2px); }

.btn.ghost { background: transparent; }

.btn.small { padding: 10px 12px; border-radius: 12px; font-weight: 800; }

.link {
  background: transparent;
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.link:hover { border-color: rgba(255,255,255,.28); }

/* Hero section (NO forced image) */
.hero {
  text-align: left;
}
.hero-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.hero-chip {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  padding: 8px 10px;
  border-radius: 999px;
  color: rgba(229,231,235,.85);
  font-size: 13px;
}

.bullets {
  margin: 0 0 20px;
  padding-left: 18px;
}
.bullets li { margin: 8px 0; color: var(--muted); }

/* CTA rows */
.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.print-row { margin-top: 0; }

/* Quiz */
.quiz-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.progress-wrap { flex: 1; }
.progress-bar {
  height: 10px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--r), var(--y), var(--g), var(--b));
  transition: width .25s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.streak {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text);
  background: rgba(255,255,255,.05);
  min-width: 72px;
  text-align: center;
}

.question { margin: 8px 0 16px; font-size: 24px; }

.answers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 720px) { .answers { grid-template-columns: 1fr 1fr; } }

.answer {
  text-align: left;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.answer:hover {
  border-color: rgba(255,255,255,.28);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}

.answer .tag {
  font-size: 12px;
  color: rgba(229,231,235,.7);
  border: 1px solid rgba(255,255,255,.12);
  padding: 3px 8px;
  border-radius: 999px;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.microcopy {
  margin-top: 12px;
  color: rgba(229,231,235,.70);
  font-size: 13px;
  min-height: 18px;
}

/* Forms */
.form .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 14px 0 6px;
}
@media (min-width: 720px) { .form .grid { grid-template-columns: 1fr 1fr; } }

label span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }

input {
  width: 100%;
  padding: 12px 12px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,.15); }

.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0 14px;
  color: rgba(229,231,235,.7);
  font-size: 13px;
}
.checkbox input { width: auto; margin-top: 2px; }

/* Result header */
.result-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }

.badge {
  font-weight: 900;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  min-width: 106px;
  text-align: center;
}

.result-title { font-size: 22px; font-weight: 900; }
.result-sub { color: var(--muted); margin-top: 4px; }

/* Panels + grids */
.panel {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.panel h3 { margin: 0 0 10px; }

.panel ul, .panel ol { margin: 0; padding-left: 18px; color: rgba(229,231,235,.82); }
.panel li { margin: 8px 0; }

.two-col-fixed {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (min-width: 900px) { .two-col-fixed { grid-template-columns: 1fr 1fr; } }

/* Back-compat if any old HTML uses .two-col */
.two-col { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* Share row */
.share-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  background: rgba(15,23,42,.92);
  border: 1px solid rgba(255,255,255,.14);
  padding: 12px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  max-width: 92vw;
}

/* Color cards on landing page
   IMPORTANT: lock to 2 columns on laptop, never auto-fit */
.color-grid,
.color-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 18px 0;
}
@media (min-width: 900px) {
  .color-grid,
  .color-sections {
    grid-template-columns: 1fr 1fr;
  }
}

/* Color panels */
.color-panel {
  padding: 18px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
  transition: transform .22s ease, box-shadow .22s ease;
  color: #0b1220;
  border: 1px solid rgba(0,0,0,.06);
}

.color-panel:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(0,0,0,.34);
}

.color-panel h3 { margin: 0 0 8px; }
.color-panel h4 { margin: 14px 0 8px; }


/* Testimonials + FAQ */
.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 900px) { .testimonial-grid { grid-template-columns: 1fr 1fr; } }

.testimonials blockquote {
  margin: 0;
  padding: 14px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(229,231,235,.88);
}

.testimonials blockquote span {
  display: block;
  margin-top: 8px;
  color: rgba(229,231,235,.65);
  font-size: 13px;
}

.faq details {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin: 10px 0;
}
.faq summary { cursor: pointer; font-weight: 900; }
.faq p { color: rgba(229,231,235,.80); }

/* Print: results become a clean report */
@media print {
  body { background: white !important; color: #111827 !important; }
  .bg, .topbar, .toast, .share-row, .cta-row, .print-row, #downloadJsonBtn { display: none !important; }
  .app { max-width: 100% !important; padding: 0 !important; }
  .card { box-shadow: none !important; border: none !important; background: white !important; padding: 0 !important; }
  .panel { box-shadow: none !important; border: 1px solid #e5e7eb !important; background: white !important; }
  .badge { border: 1px solid #e5e7eb !important; background: #f9fafb !important; }
  .result-sub, .fineprint { color: #374151 !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .btn, .answer, .color-panel { transition: none; }
}

/* Make the page feel premium and not cramped */
.card.hero {
  padding: 46px 34px;
}
@media (max-width: 640px) {
  .card.hero { padding: 28px 18px; }
}

.hero h1 {
  max-width: 18ch;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.02em;
}

.hero .lead {
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 17px;
  line-height: 1.65;
}

/* Stop everything from being full-width walls of text */
.panel, .faq, .testimonials, .seo-block {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.divider { margin: 28px 0; }

/* Better CTA row spacing */
.cta-row {
  justify-content: center;
  margin-top: 18px;
}
.btn { min-height: 46px; }

/* Replace the giant pastel slabs with clean cards + color accents */
.color-panel {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
  color: var(--text);
}

.color-panel.yellow { border-left: 6px solid var(--y); }
.color-panel.blue   { border-left: 6px solid var(--b); }
.color-panel.red    { border-left: 6px solid var(--r); }
.color-panel.green  { border-left: 6px solid var(--g); }

.color-panel h3 {
  margin-bottom: 6px;
  font-weight: 900;
}

.color-panel p {
  color: rgba(229,231,235,.85);
}

.color-panel li {
  color: rgba(229,231,235,.85);
}

/* 2-column locked grid, with better width control */
.color-grid {
  max-width: 920px;
  margin: 18px auto 0;
}

/* Make headings less shouty and improve rhythm */
h2 { font-size: 22px; margin-top: 28px; }
h3 { font-size: 18px; }