/*
 * Ask Swamiji — desktop redesign (2026-04-18)
 * Design source: design-drops/ask-swamiji-beta-20260418/design_handoff_ask_swamiji/
 * Fonts follow the README handoff (Work Sans / Cormorant Garamond / EB Garamond /
 * Noto Serif Devanagari), not the prototype's Inter.
 */

:root {
  --teal:         #10445e;
  --teal-deep:    #0a2f42;
  --teal-ink:     #072434;
  --gold:         #d4af37;
  --gold-soft:    #b89326;
  --gold-deep:    #8a6d14;

  --parchment:       #fcf9da;
  --parchment-warm:  #f5efc8;
  --parchment-edge:  #e8dfa8;

  --ink:       #1a2430;
  --ink-soft:  #3a4654;
  --muted:     #6b7687;

  --line:      rgba(16, 68, 94, 0.14);
  --line-soft: rgba(16, 68, 94, 0.08);

  /* Typography — README is source of truth */
  --serif:   'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  --display: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --sans:    'Work Sans', -apple-system, system-ui, sans-serif;
  --deva:    'Noto Serif Devanagari', 'EB Garamond', Georgia, serif;
  --mono:    ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--parchment); color: var(--ink); font-family: var(--sans); }
body { min-height: 100vh; }

body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(212, 175, 55, 0.05), transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(16, 68, 94, 0.04), transparent 50%);
  z-index: 0;
}

#root, .app { position: relative; z-index: 1; }

::selection { background: rgba(212, 175, 55, 0.35); color: var(--teal-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(16, 68, 94, 0.18); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(16, 68, 94, 0.32); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
input, textarea { font-family: inherit; color: inherit; }

/* ───────── Shell ───────── */

.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}
@media (max-width: 860px) { .app { grid-template-columns: 1fr; } }

.sidebar {
  background: var(--teal);
  color: rgba(252, 249, 218, 0.85);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(252, 249, 218, 0.06);
}
.sidebar-mobile-overlay { display: none; }
@media (max-width: 860px) {
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 85%; max-width: 320px;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mobile-overlay {
    display: block;
    position: fixed; inset: 0;
    background: rgba(7, 36, 52, 0.6);
    z-index: 39;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
  }
  .sidebar-mobile-overlay.open { opacity: 1; pointer-events: auto; }
}

.brand { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(252, 249, 218, 0.1); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(212,175,55,0.35), rgba(212,175,55,0.08));
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold);
}
.brand-title { font-family: var(--display); color: var(--gold); font-size: 20px; line-height: 1; }
.brand-sub { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(252,249,218,0.5); margin-top: 4px; }

.new-question-btn {
  width: 100%;
  background: var(--gold);
  color: var(--teal-ink);
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.15s;
}
.new-question-btn:hover { background: #e6c04a; }

.history-section { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.history-label {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(252,249,218,0.45);
  padding: 8px 6px 4px;
}
.history-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; padding: 0 6px; }
.history-item {
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: rgba(252,249,218,0.75);
  line-height: 1.4;
  transition: background 0.12s, color 0.12s;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.history-item:hover { background: rgba(252,249,218,0.06); color: rgba(252,249,218,0.95); }
.history-item.active { background: rgba(212, 175, 55, 0.12); color: var(--gold); }
.history-item-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(212,175,55,0.5);
  margin-top: 7px; flex: 0 0 auto;
}
.history-item.active .history-item-dot { background: var(--gold); }
.history-item-text { flex: 1; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.sidebar-footer {
  font-size: 11px;
  color: rgba(252,249,218,0.4);
  line-height: 1.5;
  padding-top: 14px;
  border-top: 1px solid rgba(252,249,218,0.08);
}
.sidebar-footer strong { color: rgba(252,249,218,0.6); font-weight: 500; }

/* ───────── Main column ───────── */

.main {
  background: var(--parchment);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(252, 249, 218, 0.7);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 10;
}
@media (max-width: 640px) { .topbar { padding: 12px 16px; } }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.menu-btn {
  display: none;
  width: 36px; height: 36px; border-radius: 6px;
  align-items: center; justify-content: center;
  color: var(--teal);
}
.menu-btn:hover { background: var(--line-soft); }
@media (max-width: 860px) { .menu-btn { display: flex; } }
.crumbs { font-size: 12px; color: var(--muted); }
.crumbs strong { color: var(--teal); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.sources-pill {
  font-size: 11px; color: var(--muted);
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px;
  display: flex; align-items: center; gap: 6px;
}
.sources-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

.content {
  flex: 1;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 40px 120px;
}
@media (max-width: 640px) { .content { padding: 28px 18px 100px; } }

/* ───────── Gate (access code) ───────── */

.gate-wrap {
  max-width: 440px;
  margin: 0 auto;
  padding: 80px 20px 40px;
  text-align: center;
}
.gate-om {
  font-family: var(--display);
  font-size: 48px;
  color: var(--gold);
  line-height: 1;
  opacity: 0.85;
  margin-bottom: 14px;
}
.gate-title {
  font-family: var(--display);
  font-size: clamp(32px, 4.5vw, 44px);
  font-weight: 500;
  color: var(--teal);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.gate-sub {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
  max-width: 360px;
  margin: 0 auto 28px;
}
.gate-input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--teal-ink);
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--sans);
  font-weight: 400;
  border-radius: 8px;
  text-align: center;
  letter-spacing: 0.06em;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gate-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14);
}
.gate-btn {
  display: block;
  margin: 14px auto 0;
  background: var(--gold);
  color: var(--teal-ink);
  padding: 10px 34px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.15s, transform 0.1s;
}
.gate-btn:hover { background: #e6c04a; }
.gate-btn:active { transform: translateY(1px); }
.gate-error {
  color: #8a3a3a;
  font-family: var(--sans);
  font-size: 13px;
  margin-top: 14px;
  min-height: 20px;
}
.gate-error[hidden] { display: none; }

/* ───────── Landing ───────── */

.hero { text-align: center; padding: 40px 0 20px; }
.portrait-ring {
  width: 160px; height: 160px; margin: 0 auto 28px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--gold) 0%, rgba(212,175,55,0.2) 50%, var(--gold) 100%);
  position: relative;
}
.portrait-ring::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.25);
}
.portrait-ring::after {
  content: ""; position: absolute; inset: -20px; border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.1);
}
.portrait {
  width: 100%; height: 100%; border-radius: 50%;
  overflow: hidden;
  background: var(--parchment-warm);
  display: grid;
  place-items: center;
}
.portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

h1.hero-title {
  font-family: var(--display);
  font-size: clamp(38px, 6vw, 58px);
  font-weight: 500;
  color: var(--teal);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.hero-sub {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}
.hero-sub strong { color: var(--teal); font-weight: 500; }
.hero-divider {
  width: 60px; height: 1px;
  background: var(--gold);
  margin: 32px auto;
  opacity: 0.6;
}

/* ───────── Ask box ───────── */

.ask-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px 14px;
  box-shadow: 0 1px 0 rgba(16,68,94,0.03), 0 20px 40px -24px rgba(16,68,94,0.15);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ask-box:focus-within {
  border-color: var(--gold);
  box-shadow: 0 1px 0 rgba(16,68,94,0.03), 0 20px 40px -20px rgba(212,175,55,0.3);
}
.ask-textarea {
  width: 100%;
  border: 0; outline: 0;
  background: transparent;
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.5;
  color: var(--teal-ink);
  resize: none;
  min-height: 54px;
}
.ask-textarea::placeholder { color: #8a92a0; font-style: italic; opacity: 1; }
.ask-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}
.ask-hint { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; font-family: var(--sans); }
.ask-btn {
  background: var(--gold);
  color: var(--teal-ink);
  padding: 8px 22px;
  border-radius: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s, transform 0.1s;
}
.ask-btn:hover { background: #e6c04a; }
.ask-btn:active { transform: translateY(1px); }
.ask-btn:disabled { background: var(--parchment-edge); color: var(--muted); cursor: not-allowed; }

.ask-box.compact { padding: 14px 16px 10px; }
.ask-box.compact .ask-textarea { font-size: 17px; min-height: 34px; }

/* ───────── Suggestions ───────── */

.suggestions { margin-top: 34px; }
.suggestions-label {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  font-family: var(--sans);
  font-weight: 600;
}
.suggestion-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 640px) { .suggestion-grid { grid-template-columns: 1fr; } }
.suggestion {
  text-align: left;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.5);
  font-family: var(--display);
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  color: var(--teal-ink);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.suggestion:hover { background: #fff; border-color: var(--gold); }
.suggestion:active { transform: translateY(1px); }

/* ───────── Answer ───────── */

.answer-wrap { display: flex; flex-direction: column; gap: 28px; }

.question-header {
  display: flex; gap: 14px; align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.question-icon {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--teal);
  color: var(--parchment);
  display: grid; place-items: center;
  font-family: var(--display); font-size: 14px;
  flex: 0 0 auto;
  margin-top: 4px;
}
.question-text {
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
  color: var(--teal);
  font-weight: 500;
}

.thinking {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted);
  font-size: 13px;
  padding: 16px 0;
  font-family: var(--sans);
  font-style: italic;
}
.thinking-dots { display: inline-flex; gap: 3px; }
.thinking-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold);
  animation: pulse 1.2s infinite ease-in-out;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulse { 0%, 80%, 100% { opacity: 0.3; transform: scale(0.8);} 40% { opacity: 1; transform: scale(1);} }

.answer-body {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.75;
  color: var(--ink);
  max-width: 68ch;
  font-weight: 400;
}
.answer-body p { margin: 0 0 1.25em; text-wrap: pretty; letter-spacing: 0.002em; }
.answer-body strong { color: var(--teal); font-weight: 600; }
.answer-body em { font-style: italic; }
.answer-body h1, .answer-body h3 {
  font-family: var(--display);
  color: var(--teal);
  font-weight: 600;
  margin: 1.2em 0 0.5em;
  line-height: 1.2;
}
.answer-body h1 { font-size: 28px; }
.answer-body h3 { font-size: 20px; }
.answer-body ul, .answer-body ol { margin: 0 0 1.25em 1.4em; padding: 0; }
.answer-body li { margin-bottom: 0.5em; }

/* Answer toolbar */
.answer-toolbar {
  display: flex; align-items: center; gap: 8px;
  margin-top: -4px; margin-bottom: 4px;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.answer-wrap:hover .answer-toolbar { opacity: 1; }
.answer-tool {
  appearance: none; border: 1px solid var(--line);
  background: transparent; color: var(--ink-soft);
  font-family: var(--sans); font-size: 12px;
  padding: 6px 10px; border-radius: 6px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.answer-tool:hover { background: var(--line-soft); color: var(--teal); border-color: rgba(16,68,94,0.25); }
.answer-tool.copied { color: var(--gold-soft); border-color: var(--gold-soft); }

/* Inline citation pill — end-of-clause variant:   — Book, p. N
   Used after verbatim quotes ("passage" [N]) and after bare `[N]`
   markers that sit at end-of-sentence / end-of-line.             */
.cite-inline {
  display: inline;
  margin-left: 4px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85em;
  color: var(--gold-deep);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.cite-inline::before { content: "— "; }

/* Parenthetical variant — mid-sentence bare `[N]` citations render as
   `(Book, p. N)`. Slightly smaller and no em-dash prefix (parens are
   already in the markup). Reads like a natural prose citation.    */
.cite-inline.cite-parenthetical {
  margin-left: 2px;
  margin-right: 1px;
  font-size: 0.8em;
  font-style: italic;
  color: var(--gold-deep);
  opacity: 0.92;
}
.cite-inline.cite-parenthetical::before { content: ""; }

/* Citation chips */
.cite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin: 0 1px 0 2px;
  vertical-align: 4px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-deep);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  cursor: default;
  transition: background 0.12s, border-color 0.12s;
}
.cite:hover { background: rgba(212, 175, 55, 0.3); border-color: var(--gold); }
.cite.active { background: var(--gold); color: var(--teal-ink); border-color: var(--gold); }

/* Pullquote (reserved for future structured answers) */
.pullquote {
  margin: 28px 0;
  padding: 24px 28px;
  border-left: 3px solid var(--gold);
  background: linear-gradient(to right, rgba(212, 175, 55, 0.06), transparent 70%);
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: var(--teal);
}
.pullquote-attrib {
  display: block;
  margin-top: 12px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* Roman numeral section callouts */
.section-callout {
  display: flex; align-items: center; gap: 12px;
  margin: 30px 0 10px;
}
.section-callout-num {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
}
.section-callout-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* ───────── Sources ───────── */

.sources-section {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.sources-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.sources-title { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-family: var(--sans); font-weight: 600; }
.sources-toggle {
  font-size: 12px; color: var(--teal);
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--sans);
}
.sources-toggle:hover { color: var(--gold-deep); }
.sources-list { display: flex; flex-direction: column; gap: 6px; }

/* Collapsible References block (2026-04-20). <details>/<summary>
   gives a native toggle — default closed. Chevron rotates via the
   [open] attribute. Header style matches the old .sources-header. */
details.sources-block {
  /* remove default inset */
  padding-left: 0;
}
details.sources-block > summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 0;
  padding: 6px 0;
  user-select: none;
  transition: color 0.15s;
}
details.sources-block > summary::-webkit-details-marker { display: none; }
details.sources-block > summary::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.18s ease, border-color 0.15s;
  margin-right: 2px;
}
details.sources-block[open] > summary::before {
  transform: rotate(45deg);
  border-color: var(--gold-deep);
}
details.sources-block > summary:hover { color: var(--gold-deep); }
details.sources-block > summary:hover::before { border-color: var(--gold-deep); }
details.sources-block .sources-count {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-deep);
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 1px 7px;
  border-radius: 10px;
  letter-spacing: 0.02em;
}
details.sources-block > .sources-list {
  margin-top: 12px;
}
.source-item {
  display: flex;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  text-align: left;
  width: 100%;
  align-items: flex-start;
}
.source-item:hover { background: #fff; border-color: var(--line); }
.source-item.highlight { border-color: var(--gold); background: #fff; }
.source-index {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-deep);
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.35);
  width: 22px; height: 22px;
  border-radius: 4px;
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.source-body { flex: 1; min-width: 0; }
.source-book {
  font-family: var(--display);
  font-size: 16px;
  color: var(--teal);
  font-weight: 500;
  line-height: 1.3;
}
.source-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  display: flex; gap: 10px; flex-wrap: wrap;
  font-family: var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.source-quote {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.5;
  padding: 8px 12px;
  background: var(--parchment-warm);
  border-radius: 6px;
  border-left: 2px solid var(--gold-soft);
}

/* ───────── Follow-ups ───────── */

.followups {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.followups-label {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  font-family: var(--sans);
  font-weight: 600;
}
.followup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 640px) { .followup-grid { grid-template-columns: 1fr; } }
.followup {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: transparent;
  font-family: var(--display);
  font-style: italic;
  font-size: 16px;
  line-height: 1.35;
  color: var(--teal);
  display: flex; align-items: flex-start; gap: 10px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.followup:hover { background: rgba(255,255,255,0.7); border-color: var(--gold); }
.followup:active { transform: translateY(1px); }
.followup-arrow { color: var(--gold); margin-top: 4px; flex: 0 0 auto; }

/* ───────── Status banners ───────── */

.status-banner {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--sans);
  margin-bottom: 18px;
}
.status-banner.error {
  background: rgba(138, 58, 58, 0.08);
  border: 1px solid rgba(138, 58, 58, 0.3);
  color: #8a3a3a;
}
.status-banner[hidden] { display: none; }

/* ───────── Animations ───────── */

.fade-in { animation: fadein 0.5s cubic-bezier(.4,0,.2,1) both; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.18s; }
.delay-3 { animation-delay: 0.28s; }
.delay-4 { animation-delay: 0.38s; }
.delay-5 { animation-delay: 0.48s; }

/* ───────── Print ───────── */

@media print {
  body::before { display: none; }
  .sidebar,
  .sidebar-mobile-overlay,
  .topbar,
  .ask-box.compact,
  .followups,
  .sources-toggle,
  .answer-toolbar,
  .menu-btn,
  .new-question-btn {
    display: none !important;
  }
  .app { display: block; }
  .main { background: #fff; }
  .content { max-width: none; padding: 24px 0; }
  .answer-body {
    max-width: none;
    font-size: 12pt;
    color: #000;
  }
  .cite {
    background: transparent;
    border: 0;
    color: #000;
    font-weight: 700;
  }
  .cite-inline { color: #000; }
  /* Force-open the collapsed References block for print. */
  details.sources-block[open],
  details.sources-block {
    display: block;
  }
  details.sources-block > summary::before { display: none; }
  details.sources-block > .sources-list { display: flex !important; }
  .source-item { break-inside: avoid; }
}
