/* The Fictitious I — site styles
   Classical / sober register. Cream paper, deep maroon, warm gold accent.
*/

:root {
  --cream:        #FAF6EE;
  --cream-dark:   #F3EEDF;
  --ink:          #1A1A1A;
  --ink-soft:     #444;
  --ink-mute:     #6B6B6B;
  --maroon:       #8B1E1E;
  --maroon-dark:  #6E1717;
  --gold:         #B8862B;
  --gold-soft:    #D9B872;
  --rule:         rgba(0,0,0,0.12);
  --serif:        'Cormorant Garamond', 'Cambria', 'Charter', 'Bitstream Charter', Georgia, serif;
  --serif-body:   'Cambria', 'Crimson Pro', 'Charter', 'Bitstream Charter', Georgia, serif;
  --max-col:      720px;
  --max-wide:     1080px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--maroon); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

img { max-width: 100%; display: block; }

::selection { background: var(--gold-soft); color: var(--ink); }

/* ------------------------------------------------------------ Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 238, 0.94);
  backdrop-filter: saturate(160%) blur(6px);
  -webkit-backdrop-filter: saturate(160%) blur(6px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 4px;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--ink);
  flex: 0 0 auto;
}
.nav-brand a { color: inherit; text-decoration: none; }
.nav-links {
  display: flex;
  gap: 22px;
  font-size: 14px;
  letter-spacing: 0.5px;
}
.nav-links a {
  color: var(--ink-soft);
  font-family: var(--serif-body);
}
.nav-links a:hover { color: var(--maroon); text-decoration: none; }
.nav-cta {
  font-family: var(--serif-body);
  font-size: 13px;
  letter-spacing: 1px;
  padding: 9px 18px;
  background: var(--maroon);
  color: var(--cream);
  border-radius: 3px;
  text-transform: uppercase;
}
.nav-cta:hover { background: var(--maroon-dark); text-decoration: none; }
@media (max-width: 760px) {
  /* Stack nav: brand+CTA on top row, links wrap to a second row */
  .nav-inner {
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 10px 14px;
    row-gap: 6px;
  }
  .nav-brand { font-size: 11px; letter-spacing: 3px; }
  .nav-links {
    order: 3;
    width: 100%;
    gap: 16px;
    font-size: 12px;
    letter-spacing: 0.3px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    justify-content: flex-start;
  }
  .nav-links a { white-space: nowrap; }
  .nav-cta { padding: 7px 12px; font-size: 11px; letter-spacing: 0.8px; }
  /* The auth widget (auth.js) sits in the same row as brand+CTA */
  .auth-slot { margin-right: 8px !important; }
  .auth-slot .auth-name { display: none; }
}
@media (max-width: 380px) {
  .nav-brand { letter-spacing: 2px; font-size: 10px; }
  .nav-links { font-size: 11px; gap: 12px; }
}

/* ------------------------------------------------------------ Section primitives */
.section {
  padding: 96px 28px;
  max-width: var(--max-wide);
  margin: 0 auto;
}
.section-narrow {
  max-width: var(--max-col);
}
.section-tight { padding-top: 56px; padding-bottom: 56px; }
@media (max-width: 760px) {
  .section { padding: 56px 20px; }
  .section-tight { padding-top: 36px; padding-bottom: 36px; }
}
@media (max-width: 380px) {
  .section { padding: 44px 16px; }
}

.eyebrow {
  font-family: var(--serif-body);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: 16px;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--ink); }
h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.05; letter-spacing: -0.5px; }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; }
h3 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.25; }
h4 { font-size: 16px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; color: var(--ink-soft); }

p { margin: 0 0 1em; }
p.lead { font-size: clamp(16px, 2.4vw, 22px); color: var(--ink-soft); line-height: 1.55; }

.rule-gold {
  border: 0; height: 1px;
  background: var(--gold);
  width: 60px;
  margin: 24px 0;
}
.rule-gold.center { margin-left: auto; margin-right: auto; }

/* ------------------------------------------------------------ Hero */
.hero {
  position: relative;
  padding-top: 72px;
  padding-bottom: 96px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 28px;
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; padding: 0 20px; }
  .hero { padding-top: 40px; padding-bottom: 56px; }
  .hero h1 small { font-size: 0.46em; }
}
.hero h1 small {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.42em;
  color: var(--ink-mute);
  margin-top: 12px;
  letter-spacing: 0.5px;
}
.hero p.lead { margin-top: 28px; }
.hero-author {
  margin-top: 32px;
  font-family: var(--serif-body);
  letter-spacing: 3px;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif-body);
  font-size: 14px;
  letter-spacing: 1px;
  padding: 14px 22px;
  border-radius: 3px;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--maroon); color: var(--cream); }
.btn-primary:hover { background: var(--maroon-dark); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--cream); text-decoration: none; }
.btn-text { background: transparent; color: var(--maroon); padding-left: 0; padding-right: 0; border: 0; text-transform: none; letter-spacing: 0.5px; font-size: 15px; }
.btn-text:hover { text-decoration: underline; }

.hero-channels {
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--ink-mute);
  text-transform: uppercase;
}

/* Book cover render */
.cover {
  position: relative;
  perspective: 1200px;
  width: 100%;
  max-width: 360px;
  margin-left: auto;
}
.cover-inner {
  position: relative;
  transform: rotateY(-14deg);
  box-shadow:
    -4px 4px 0 rgba(0,0,0,0.04),
    -8px 12px 30px rgba(0,0,0,0.18);
  border-radius: 2px;
  overflow: hidden;
}
.cover-inner svg, .cover-inner img { display: block; width: 100%; height: auto; }
@media (max-width: 880px) {
  .cover { margin: 0 auto; max-width: 280px; }
  .cover-inner { transform: rotateY(-8deg); }
}

/* Sanskrit watermark behind hero */
.watermark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-6deg);
  font-family: 'Noto Serif Devanagari', serif;
  font-size: clamp(72px, 12vw, 180px);
  color: var(--ink);
  opacity: 0.04;
  pointer-events: none;
  letter-spacing: 4px;
  white-space: nowrap;
  z-index: 0;
}
.hero-grid { position: relative; z-index: 1; }

/* ------------------------------------------------------------ Video / Shorts */
/* ── Shorts carousel ─────────────────────────────── */
.shorts-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shorts-scroll::-webkit-scrollbar { display: none; }

.short-card {
  flex-shrink: 0;
  width: 270px;
  scroll-snap-align: start;
}
.short-embed {
  position: relative;
  width: 270px;
  height: 480px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 2px 16px rgba(0,0,0,0.15), 0 0 0 1px var(--gold);
}
.short-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.short-label {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-align: center;
}

@media (max-width: 760px) {
  .short-card { width: 220px; }
  .short-embed { width: 220px; height: 391px; }
}
/* ───────────────────────────────────────────────── */

.video-wrap {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  background: var(--ink);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--gold);
}
.video-wrap iframe, .video-wrap img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}
.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, #2a2a28 0%, #0e0e0d 70%);
  color: var(--cream);
  cursor: pointer;
}
.video-play {
  width: 78px; height: 78px;
  background: rgba(255,255,255,0.92);
  color: var(--maroon);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-play svg { width: 28px; height: 28px; fill: currentColor; }

.shorts-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.short-tile {
  position: relative;
  aspect-ratio: 9 / 16;
  background: var(--ink);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.short-tile-body {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  color: var(--cream);
  font-family: var(--serif-body);
  font-size: 14px;
  line-height: 1.3;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0) 100%);
}
.short-tile-num {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--gold-soft);
  font-style: italic;
}

/* ------------------------------------------------------------ What's inside grid */
.inside-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 56px;
}
@media (max-width: 880px) { .inside-grid { grid-template-columns: 1fr; gap: 36px; } }
.inside-col h4 {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gold);
}
.inside-col ul { list-style: none; }
.inside-col li {
  font-family: var(--serif-body);
  font-size: 15px;
  line-height: 1.6;
  padding: 6px 0;
  border-bottom: 1px dotted var(--rule);
  color: var(--ink-soft);
}
.inside-col li.appendix { font-style: italic; color: var(--ink-mute); }

/* ------------------------------------------------------------ Sample chapter */
.sample-wrap {
  background: var(--cream-dark);
  padding: 56px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.sample-pdf {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 36px 48px;
  max-width: var(--max-col);
  margin: 32px auto 0;
  font-family: var(--serif-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.sample-pdf h3 {
  font-family: var(--serif);
  font-size: 22px;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.sample-pdf h4 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  text-align: center;
  color: var(--ink-mute);
  letter-spacing: 1px;
  margin: 0 0 32px;
  text-transform: none;
}
.sample-pdf p { margin-bottom: 1em; text-indent: 1.6em; }
.sample-pdf p:first-of-type { text-indent: 0; }
.sample-pdf p:first-of-type::first-line {
  font-variant: small-caps;
  letter-spacing: 1px;
}
.sample-fade {
  position: relative;
}
.sample-fade::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent 0%, var(--cream) 100%);
  pointer-events: none;
}

/* ------------------------------------------------------------ Poetry teaser */
.poem-block {
  text-align: center;
  margin: 32px 0 16px;
  font-family: var(--serif-body);
  font-style: italic;
  color: var(--ink);
  line-height: 1.9;
  font-size: 17px;
}
.poem-block p { margin-bottom: 1.4em; }

/* ------------------------------------------------------------ Audiobook */
.audio-row {
  display: flex;
  gap: 28px;
  align-items: center;
  background: var(--cream-dark);
  padding: 32px 36px;
  border-radius: 6px;
  border: 1px solid var(--rule);
}
@media (max-width: 760px) { .audio-row { flex-direction: column; align-items: flex-start; } }
.audio-cover {
  width: 100px; height: 100px;
  background: var(--ink);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 38px;
  letter-spacing: 4px;
  border-radius: 2px;
  flex-shrink: 0;
}
.audio-body { flex: 1; }
.audio-body h3 { margin-bottom: 8px; }
.audio-body .audio-actions { margin-top: 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.audio-pill {
  padding: 8px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
}
.audio-pill:hover { background: var(--ink); color: var(--cream); text-decoration: none; }

/* ------------------------------------------------------------ Workbook teaser */
.workbook-card {
  background: var(--cream);
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 48px;
  text-align: center;
  max-width: var(--max-col);
  margin: 32px auto 0;
  position: relative;
}
@media (max-width: 600px) {
  .workbook-card { padding: 28px 20px; }
}
.workbook-q {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.4;
  color: var(--ink);
  margin: 16px 0 24px;
}
.workbook-meta {
  font-family: var(--serif-body);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--maroon);
}

/* ------------------------------------------------------------ About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; } }
.about-photo {
  border-radius: 4px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--cream-dark);
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ------------------------------------------------------------ Testimonials */
.endorsements {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 40px;
}
@media (max-width: 760px) { .endorsements { grid-template-columns: 1fr; } }
.endorse {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 28px 32px;
}
.endorse blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 18px;
  border: 0;
  padding: 0;
}
.endorse blockquote::before { content: '\201C'; color: var(--gold); margin-right: 2px; }
.endorse blockquote::after  { content: '\201D'; color: var(--gold); margin-left: 2px; }
.endorse-name {
  font-family: var(--serif-body);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink);
}
.endorse-role {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 2px;
}

/* ------------------------------------------------------------ Email capture */
.email-band {
  background: var(--ink);
  color: var(--cream);
  padding: 64px 28px;
  text-align: center;
}
.email-band h2 { color: var(--cream); margin-bottom: 14px; }
.email-band p { color: rgba(250,246,238,0.74); max-width: 540px; margin: 0 auto 28px; }
.email-form {
  display: flex;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--cream);
  border-radius: 3px;
  overflow: hidden;
}
.email-form input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--serif-body);
  font-size: 16px;
  padding: 14px 18px;
  color: var(--ink);
  outline: none;
}
.email-form button {
  border: 0;
  background: var(--maroon);
  color: var(--cream);
  font-family: var(--serif-body);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0 24px;
  cursor: pointer;
}
.email-form button:hover { background: var(--maroon-dark); }

/* ------------------------------------------------------------ FAQ */
.faq-list { margin-top: 32px; }
.faq-item {
  border-bottom: 1px solid var(--rule);
  padding: 22px 0;
}
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.4;
  cursor: pointer;
  color: var(--ink);
}
.faq-q .chev {
  color: var(--gold);
  font-size: 22px;
  transition: transform 0.2s ease;
}
.faq-item.open .faq-q .chev { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 16px;
  color: var(--ink-soft);
}
.faq-item.open .faq-a {
  max-height: 600px;
  padding-top: 14px;
}

/* ------------------------------------------------------------ Final CTA */
.final-cta {
  text-align: center;
  padding: 80px 28px;
  background: var(--cream-dark);
  border-top: 1px solid var(--rule);
}
.shloka {
  font-family: 'Noto Serif Devanagari', serif;
  font-size: 22px;
  margin: 36px 0 18px;
  color: var(--ink-soft);
}
.shloka-en {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-mute);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ------------------------------------------------------------ Footer */
.foot {
  background: var(--ink);
  color: rgba(250,246,238,0.7);
  padding: 56px 28px 24px;
  font-size: 14px;
}
.foot-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
}
@media (max-width: 880px) { .foot-inner { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .foot-inner { grid-template-columns: 1fr; gap: 24px; } }
.foot h5 {
  font-family: var(--serif-body);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 14px;
}
.foot a { color: rgba(250,246,238,0.7); display: block; margin-bottom: 8px; }
.foot a:hover { color: var(--gold-soft); text-decoration: none; }
.foot-mark {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 10px;
}
.foot-bottom {
  max-width: var(--max-wide);
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------ Ask pill + chat panel */
.ask-pill {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 60;
  background: var(--maroon);
  color: var(--cream);
  padding: 14px 22px;
  border-radius: 999px;
  box-shadow: 0 6px 22px rgba(139,30,30,0.32);
  font-family: var(--serif-body);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.ask-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(139,30,30,0.4);
}
.ask-pill .dot {
  width: 8px; height: 8px;
  background: var(--gold-soft);
  border-radius: 50%;
  display: inline-block;
}

.chat-shroud {
  position: fixed;
  inset: 0;
  background: rgba(26,26,26,0.4);
  z-index: 70;
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 24px;
}
.chat-shroud.open { display: flex; }
.chat {
  width: 480px;
  max-width: 100%;
  height: min(720px, 92vh);
  background: var(--cream);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.chat-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--cream);
}
.chat-head h4 {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}
.chat-head small {
  display: block;
  font-family: var(--serif-body);
  font-size: 11px;
  color: var(--maroon);
  letter-spacing: 0.5px;
  margin-top: 2px;
  text-transform: none;
}
.chat-close {
  background: transparent;
  border: 0;
  font-size: 22px;
  color: var(--ink-mute);
  cursor: pointer;
  padding: 4px;
}
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--cream);
}
.bubble {
  max-width: 92%;
  font-size: 14.5px;
  line-height: 1.65;
  border-radius: 14px;
  padding: 12px 16px;
  font-family: var(--serif-body);
}
.bubble.agent {
  align-self: flex-start;
  background: rgba(139,30,30,0.06);
  color: var(--ink);
  border-top-left-radius: 4px;
}
.bubble.user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--cream);
  border-top-right-radius: 4px;
}
.bubble .cite-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.bubble .cites {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.bubble .cite {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(139,30,30,0.08);
  color: var(--maroon);
  border: 1px solid rgba(139,30,30,0.25);
}
.bubble .followups {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 12px;
  color: var(--ink-mute);
}
.bubble .followup-q {
  color: var(--maroon);
  cursor: pointer;
  display: block;
  margin-top: 6px;
}
.bubble .followup-q:hover { text-decoration: underline; }

/* Mode-aware bubbles */
.bubble.mode-crisis {
  background: linear-gradient(180deg, #fff3f3 0%, #ffe9e9 100%);
  border: 1px solid #d39a9a;
}
.bubble.mode-crisis .crisis-badge {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8b1e1e;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(139,30,30,0.08);
  display: inline-block;
  margin-bottom: 10px;
  font-weight: 600;
}
.bubble.mode-extended {
  background: rgba(184,134,43,0.06);
  border-left: 3px solid var(--gold);
}
.bubble.mode-extended .ext-badge {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 8px;
}

.suggested {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: flex-start;
}
.suggested button {
  font-family: var(--serif-body);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: #5F4400;
  background: rgba(184,134,43,0.08);
  cursor: pointer;
}
.suggested button:hover { background: rgba(184,134,43,0.18); }

.chat-input-wrap {
  padding: 14px 16px;
  background: var(--cream-dark);
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-input {
  flex: 1;
  border: 1px solid rgba(0,0,0,0.15);
  background: var(--cream);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--serif-body);
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.chat-input:focus { border-color: var(--gold); }
.chat-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--maroon);
  color: var(--cream);
  cursor: pointer;
  font-size: 18px;
}
.chat-privacy {
  padding: 8px 16px;
  background: var(--cream-dark);
  font-size: 10.5px;
  color: var(--ink-mute);
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.typing-dots {
  display: inline-flex;
  gap: 4px;
}
.typing-dots span {
  width: 6px; height: 6px;
  background: var(--ink-mute);
  border-radius: 50%;
  animation: dot 1s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* ------------------------------------------------------------ Misc utility */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.tag {
  display: inline-block;
  font-family: var(--serif-body);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(184,134,43,0.12);
  color: #5F4400;
}

/* ---- Pre-launch "Notify me on release" capture ---- */
/* Pre-launch is the DEFAULT state until launch (notify.js sets body.released
   at launch). Hiding .cta-released by default prevents the buy buttons from
   flashing before JS runs. */
.cta-released { display: none; }
body.released .cta-released { display: revert; }
body.released .cta-prelaunch { display: none; }

.notify-form { max-width: 460px; }
.notify-row {
  display: flex;
  background: var(--cream);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
}
.notify-row input {
  flex: 1; border: 0; background: transparent;
  font-family: var(--serif-body); font-size: 16px;
  padding: 14px 18px; color: var(--ink); outline: none;
}
.notify-row button {
  border: 0; background: var(--maroon); color: var(--cream);
  font-family: var(--serif-body); font-size: 13px; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 0 22px; cursor: pointer; white-space: nowrap;
}
.notify-row button:hover { background: var(--maroon-dark); }
.notify-row button:disabled { opacity: 0.85; cursor: default; }
.notify-sub { color: var(--ink-soft); font-size: 14px; margin-top: 10px; }
.notify-msg { color: var(--maroon); font-size: 14px; margin-top: 8px; min-height: 1em; }
