:root {
  --bg: #f4f8ff;
  --bg-2: #eaf2ff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --text: #1f2a3a;
  --muted: #50627a;
  --line: rgba(31, 42, 58, 0.1);
  --green: #3a7bd5;
  --green-deep: #2c5fa3;
  --gold: #89b4f8;
  --lavender: #6fa4e8;
  --rose: #9bbcf3;
  --blue: #6fa4e8;
  --shadow: 0 18px 40px rgba(31, 42, 58, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max: 1180px;
  --primary: #3a7bd5;
  --primary-soft: #6fa4e8;
  --primary-dark: #2c5fa3;
  --accent: #89b4f8;
  --background: #f4f8ff;
  --text-main: #1f2a3a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(123, 182, 217, 0.18), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(215, 163, 79, 0.14), transparent 18%),
    radial-gradient(circle at 50% 90%, rgba(133, 112, 181, 0.1), transparent 24%),
    linear-gradient(180deg, #f7faff 0%, #eef4ff 42%, #e8f0ff 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; }

.site-shell {
  max-width: 1100px;
  margin: 0 auto;   /* 👈 THIS is what centers everything */
  padding: 0 20px;
}


.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(244, 248, 255, 0.84);
  border-bottom: 1px solid rgba(31, 42, 58, 0.08);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .01em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(58, 123, 213, 0.18), rgba(137, 180, 248, 0.24));
  box-shadow: inset 0 0 0 1px rgba(58, 123, 213, 0.18);
}

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

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.96rem;
  padding: 9px 13px;
  border-radius: 999px;
  transition: .18s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  background: rgba(58, 123, 213, 0.10);
  color: var(--text);
  outline: none;
}

.page {
  padding: 28px 0 70px;
}

.hero-grid,
.two-col,
.cards-grid,
.story-layout,
.footer-grid {
  display: grid;
  gap: 22px;
}

.hero-grid { grid-template-columns: 1.08fr .92fr; align-items: center; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.story-layout { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
.footer-grid { grid-template-columns: 1.1fr .9fr; }

.panel,
.card,
.story-panel,
.feeling-card,
.footer-panel,
.story-card,
.quote-banner {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}
.panel-glow {
  box-shadow: 0 0 40px rgba(58, 123, 213, 0.25);
}
.panel { padding: 30px; position: relative; overflow: hidden; }
.panel-glow::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  bottom: -90px;
  background: radial-gradient(circle, rgba(58, 123, 213, 0.18), transparent 68%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(58, 123, 213, 0.10);
  border: 1px solid rgba(58, 123, 213, 0.14);
  color: var(--primary-dark);
  font-size: .84rem;
  font-weight: 700;
  margin-bottom: 16px;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -.03em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.2;
  font-weight: 600;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.3;
  font-weight: 600;
}
h1, h2, h3 {
  color: #22324a; /* slightly softer than pure text */
}
h1, h2 {
  margin-bottom: 12px;
}

h3 {
  margin-bottom: 8px;
}
h1, h2, h3 {
  font-family: "Georgia", serif;
  font-weight: 500;
}
.lead,
.copy,
.card p,
.story-panel p,
.story-card p,
.footer-panel p { color: var(--muted); line-height: 1.7; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.24rem); max-width: 62ch; }

.hero-actions,
.pills,
.feelings-grid,
.choice-row,
.story-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 14px 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: .18s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  box-shadow: 0 12px 28px rgba(58, 123, 213, 0.28);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(31,42,58,.1);
}

.btn-soft {
  color: var(--primary-dark);
  background: rgba(58,123,213,.09);
  border: 1px solid rgba(58,123,213,.12);
}

.pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(31,42,58,.08);
  color: var(--muted);
  font-size: .93rem;
}

.section { margin-top: 24px; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 18px; }

.cover-card {
  padding: 18px;
}
.cover-card img {
  height: auto;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 16px 32px rgba(0,0,0,.12);
}

.quote-banner {
  padding: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(240,246,255,.92));
}
.quote-banner p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.7;
}
.quote-banner strong { display: block; margin-bottom: 10px; }

.card,
.story-card,
.footer-panel {
  padding: 22px;
}

.card h3,
.story-card h3,
.footer-panel h3 { margin-bottom: 10px; }

.feelings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.feeling-card {
  padding: 22px;
  text-decoration: none;
  transition: .2s ease;
  color: var(--text);
}

.feeling-card:hover,
.feeling-card:focus-visible {
  transform: translateY(-3px);
  outline: none;
}

.feeling-card .emoji {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.feeling-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.feeling-card.sad { background: linear-gradient(135deg, rgba(123,182,217,.18), rgba(255,255,255,.85)); }
.feeling-card.confused { background: linear-gradient(135deg, rgba(133,112,181,.16), rgba(255,255,255,.85)); }
.feeling-card.angry { background: linear-gradient(135deg, rgba(217,122,143,.15), rgba(255,255,255,.85)); }
.feeling-card.curious { background: linear-gradient(135deg, rgba(215,163,79,.18), rgba(255,255,255,.85)); }

.pathway-group {
  margin-bottom: 36px;
}

.pathway-group h2 {
  margin-bottom: 14px;
}

.pathway-group .cards-grid {
  margin-top: 10px;
}

.quote-strip {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(31,42,58,.08);
  color: var(--primary-dark);
  font-weight: 600;
}

.story-sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 90px;
}

.select,
.search {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(31,42,58,.1);
  background: rgba(255,255,255,.82);
  color: var(--text);
}

.story-nav {
  display: grid;
  gap: 10px;
}

.story-nav button {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(31,42,58,.08);
  background: rgba(255,255,255,.82);
  color: var(--text);
  cursor: pointer;
  transition: .18s ease;
}

.story-nav button:hover,
.story-nav button.active {
  background: linear-gradient(135deg, rgba(58,123,213,.12), rgba(137,180,248,.16));
  border-color: rgba(58,123,213,.2);
}

.story-nav strong {
  display: block;
  margin-bottom: 4px;
}

.story-nav span {
  color: var(--muted);
  font-size: .93rem;
}

.story-panel {
  padding: 28px;
  min-height: 480px;
}

.story-kicker {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(133,112,181,.12);
  color: #5c4984;
  font-size: .84rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.story-tags .pill { background: rgba(79,143,107,.08); color: var(--primary-dark); }
.story-links { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; }

.story-grid-page {
  display: block;
}

.story-card { min-height: 100%; }
.story-card .meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }

.cta-band {
  padding: 24px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(58,123,213,.12), rgba(137,180,248,.14), rgba(111,164,232,.12));
  border: 1px solid rgba(255,255,255,.56);
  box-shadow: var(--shadow);
}
.cta-horizontal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;

  padding: 18px 22px;
}

/* keep text from getting too wide */
.cta-horizontal .cta-text {
  max-width: 600px;
}

/* tighten text */
.cta-horizontal h2 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.cta-horizontal .lead {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* keep button clean */
.cta-horizontal .cta-action {
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .cta-horizontal {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-horizontal .cta-action {
    margin-top: 10px;
  }
}

.cta-compact {
  padding: 20px 18px;
  border-radius: 18px;
}

.cta-compact h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.cta-compact .lead {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 10px;
}

.cta-compact .hero-actions {
  margin-top: 10px;
}

.cta-compact .btn {
  padding: 10px 16px;
  font-size: 0.9rem;
}

.footer {
  padding: 0 0 38px;
}

.footer-panel small,
.small { color: var(--muted); line-height: 1.7; }

.sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .72;
}
.sparkle {
  position: absolute;
  border-radius: 50%;
  animation: drift linear infinite;
}

@keyframes drift {
  from { transform: translateY(0) scale(.8); opacity: .12; }
  45% { opacity: .7; }
  to { transform: translateY(-120px) scale(1.2); opacity: 0; }
}

.hidden { display: none !important; }

@media (max-width: 980px) {
  .hero-grid,
  .two-col,
  .cards-grid,
  .story-layout,
  .footer-grid,
  .story-grid-page,
  .feelings-grid {
    grid-template-columns: 1fr;
  }
  .story-sidebar { position: static; }
}

@media (max-width: 680px) {
  .site-shell { width: min(calc(100% - 20px), var(--max)); }
  .nav { padding: 10px 0; align-items: flex-start; }
  .nav-links { justify-content: flex-start; }
  .page { padding-top: 22px; }
  .panel, .story-panel, .card, .footer-panel, .quote-banner, .cta-band { padding: 20px; }
  h1 { line-height: 1; }
}
#storyGrid .pathway-results {
  display: block;
}

#storyGrid {
  max-width: 900px;
  margin: 0 ;
}
#storyGrid .pathway-card {
  width: 100%;
  max-width: 100%;   /* 👈 take full container width */
  margin: 0 0 24px 0; /* 👈 stack with spacing */
}
