/* ============================================================
   Word of Comfort — layout & components
   ============================================================ */

#app { min-height: 100%; }

/* ---------- top nav (sits on both night and paper) ---------- */
.topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; max-width: 960px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  color: var(--night-text); text-decoration: none; letter-spacing: 0.01em;
}
.brand .flame { color: var(--lamp); font-size: 1.1em; }
.navlinks { display: flex; gap: 4px; }
.navlinks button {
  background: none; border: none; cursor: pointer;
  color: var(--night-text-muted); font-size: 0.92rem; padding: 8px 12px;
  border-radius: var(--radius-sm); transition: color .15s var(--ease), background .15s var(--ease);
}
.navlinks button:hover { color: var(--night-text); background: rgba(255,255,255,.06); }
.navlinks button[aria-current="true"] { color: var(--lamp); }

/* ================= HERO ================= */
.hero {
  background:
    radial-gradient(ellipse 900px 480px at 50% -10%, rgba(231,184,77,0.10), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, #171E2E 100%);
  color: var(--night-text);
  padding-bottom: 56px;
}
.hero-inner {
  max-width: 640px; margin: 0 auto; padding: 48px 24px 8px;
  text-align: center;
}
.hero-kicker {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  color: var(--night-text-muted); font-size: 1rem; margin: 0 0 14px;
}
.hero-title {
  font-family: var(--font-display); font-weight: 600; line-height: 1.15;
  font-size: clamp(1.9rem, 5vw, 2.7rem); margin: 0 0 30px; color: var(--night-text);
}

.search-form { margin: 0 auto; max-width: 560px; }
.search-lamp {
  position: relative; display: flex; align-items: stretch; gap: 8px;
  background: var(--night-2); border: 1px solid var(--night-3);
  border-radius: var(--radius-lg); padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow-night);
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.search-lamp:focus-within {
  border-color: var(--lamp);
  box-shadow: 0 0 0 5px var(--lamp-glow), var(--shadow-night);
}
.search-lamp input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--night-text); font-family: var(--font-body); font-size: 1.02rem;
  padding: 14px 4px;
}
.search-lamp input::placeholder { color: var(--night-text-muted); }
.search-lamp button {
  background: var(--lamp); color: #29200A; border: none; cursor: pointer;
  font-weight: 600; font-size: 0.95rem; padding: 0 22px; border-radius: 14px;
  transition: background .15s var(--ease), transform .1s var(--ease);
}
.search-lamp button:hover { background: #F2C868; }
.search-lamp button:active { transform: scale(0.97); }

.hero-hint {
  margin: 14px 0 0; font-size: 0.85rem; color: var(--night-text-muted);
}

.quick-chips {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-top: 26px; max-width: 560px; margin-left: auto; margin-right: auto;
}
.chip {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
  color: var(--night-text); padding: 8px 15px; border-radius: 999px;
  font-size: 0.88rem; cursor: pointer; transition: background .15s var(--ease), border-color .15s var(--ease);
}
.chip:hover { background: rgba(231,184,77,0.14); border-color: rgba(231,184,77,0.4); }

.verse-of-day {
  max-width: 560px; margin: 40px auto 0; padding: 0 24px; text-align: center;
}
.verse-of-day .vod-label {
  font-size: 0.8rem; color: var(--night-text-muted); margin: 0 0 8px;
}
.verse-of-day blockquote {
  margin: 0; font-family: var(--font-display); font-style: italic; font-size: 1.08rem;
  line-height: 1.55; color: var(--night-text);
}
.verse-of-day cite {
  display: block; margin-top: 8px; font-style: normal; font-size: 0.85rem; color: var(--lamp);
}

/* ================= RESULTS (paper) ================= */
.results { background: var(--paper); }
.results-inner { max-width: 680px; margin: 0 auto; padding: 44px 24px 20px; }

.results-query {
  font-size: 0.92rem; color: var(--ink-muted); margin: 0 0 22px;
}
.results-query strong { color: var(--ink); font-weight: 600; }
.results-query button {
  background: none; border: none; color: var(--sage); cursor: pointer;
  font-size: 0.88rem; text-decoration: underline; padding: 0; margin-left: 10px;
}

/* -- crisis banner -- */
.crisis-banner {
  background: var(--ember-bg); border: 1px solid rgba(178,92,79,0.30);
  border-radius: var(--radius-md); padding: 22px 24px; margin-bottom: 28px;
}
.crisis-banner h2 {
  font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 8px; color: #7A392F;
}
.crisis-banner p { margin: 0 0 14px; color: #5A3129; line-height: 1.6; font-size: 0.96rem; }
.crisis-resources { display: flex; flex-direction: column; gap: 8px; }
.crisis-resource {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  background: #fff; border-radius: var(--radius-sm); padding: 10px 14px;
  text-decoration: none; color: #5A3129; border: 1px solid rgba(178,92,79,0.18);
}
.crisis-resource strong { color: #7A392F; font-size: 0.94rem; }
.crisis-resource span { font-size: 0.86rem; color: #6b453d; }

/* -- primary counsel card -- */
.counsel-card {
  position: relative; padding: 30px 30px 26px 30px; margin-bottom: 30px;
  background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-paper);
  border-left: 4px solid var(--lamp);
}
.counsel-card .cc-icon { font-size: 1.6rem; margin-bottom: 6px; display: block; }
.counsel-card h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.5rem;
  margin: 0 0 16px; color: var(--ink);
}
.verse-block { margin: 0 0 18px; }
.verse-block p {
  font-family: var(--font-display); font-size: 1.12rem; line-height: 1.65;
  margin: 0 0 6px; color: var(--ink);
}
.verse-block cite {
  font-style: normal; font-size: 0.85rem; color: var(--lamp-deep); font-weight: 600;
}
.counsel-reflection {
  font-size: 0.98rem; line-height: 1.7; color: #443C52; margin: 22px 0 18px;
  padding-top: 18px; border-top: 1px solid var(--paper-3);
}
.counsel-prayer {
  font-family: var(--font-display); font-style: italic; font-size: 1rem;
  line-height: 1.7; color: var(--sage); margin: 0; padding: 16px 18px;
  background: #F7F3E9; border-radius: var(--radius-sm);
}
.counsel-actions { display: flex; gap: 14px; margin-top: 18px; }
.counsel-actions button {
  background: none; border: none; cursor: pointer; font-size: 0.86rem;
  color: var(--ink-muted); display: flex; align-items: center; gap: 6px; padding: 4px 0;
}
.counsel-actions button:hover { color: var(--lamp-deep); }
.counsel-actions button[data-active="true"] { color: var(--lamp-deep); }

/* -- more verses (lighter, list-like, deliberately NOT another card grid) -- */
.more-verses { margin-top: 8px; }
.more-verses h3 {
  font-family: var(--font-body); font-weight: 600; font-size: 0.82rem;
  color: var(--ink-muted); text-transform: none; letter-spacing: 0.01em;
  margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--paper-3);
}
.more-verse {
  display: grid; grid-template-columns: 108px 1fr; gap: 18px;
  padding: 14px 0; border-bottom: 1px solid var(--paper-2);
}
.more-verse cite {
  font-style: normal; font-size: 0.84rem; color: var(--ink-muted); font-weight: 600; line-height: 1.5;
}
.more-verse p {
  margin: 0; font-family: var(--font-display); font-size: 0.98rem; line-height: 1.6; color: var(--ink);
}

.empty-state {
  text-align: center; padding: 40px 20px; color: var(--ink-muted);
}
.empty-state p { font-size: 0.98rem; line-height: 1.6; max-width: 420px; margin: 0 auto 18px; }
.empty-state button {
  background: var(--night); color: var(--night-text); border: none; cursor: pointer;
  padding: 11px 22px; border-radius: 999px; font-size: 0.9rem;
}

/* ================= BROWSE (categories) ================= */
.browse-inner { max-width: 780px; margin: 0 auto; padding: 44px 24px 60px; }
.browse-inner > h1 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; margin: 0 0 6px;
}
.browse-inner > p.sub { color: var(--ink-muted); margin: 0 0 32px; font-size: 0.96rem; }
.browse-category { margin-bottom: 30px; }
.browse-category h2 {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 1.08rem; color: var(--sage); margin: 0 0 12px;
}
.topic-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px;
}
.topic-card {
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: #fff; border: 1px solid var(--paper-3); border-radius: var(--radius-sm);
  padding: 13px 15px; cursor: pointer; font-size: 0.92rem; color: var(--ink);
  transition: border-color .15s var(--ease), transform .1s var(--ease);
}
.topic-card:hover { border-color: var(--lamp); transform: translateY(-1px); }
.topic-card .tc-icon { font-size: 1.2rem; }
.topic-card.crisis { border-color: rgba(178,92,79,0.35); background: var(--ember-bg); }

/* ================= FOOTER ================= */
.site-footer {
  background: var(--night); color: var(--night-text-muted);
  padding: 34px 24px 90px; text-align: center; font-size: 0.82rem; line-height: 1.7;
}
.site-footer .footer-inner { max-width: 560px; margin: 0 auto; }
.site-footer p { margin: 0 0 10px; }
.site-footer a { color: var(--night-text); text-decoration: underline; }

/* ================= INSTALL BANNER ================= */
.install-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40;
  background: var(--night-2); border: 1px solid var(--night-3); color: var(--night-text);
  border-radius: var(--radius-md); padding: 14px 16px; box-shadow: var(--shadow-night);
  display: flex; align-items: center; gap: 14px; max-width: 480px; margin: 0 auto;
  animation: rise .35s var(--ease);
}
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.install-banner p { margin: 0; font-size: 0.86rem; flex: 1; }
.install-banner .ib-actions { display: flex; gap: 8px; }
.install-banner button {
  border: none; cursor: pointer; border-radius: 999px; font-size: 0.82rem; padding: 8px 14px;
}
.install-banner .ib-install { background: var(--lamp); color: #29200A; font-weight: 600; }
.install-banner .ib-dismiss { background: transparent; color: var(--night-text-muted); }

/* ================= FAVORITES ================= */
.favorites-inner { max-width: 680px; margin: 0 auto; padding: 44px 24px 60px; }
.favorites-inner > h1 { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; margin: 0 0 24px; }

/* ================= LOADING ================= */
.boot-loader {
  position: fixed; inset: 0; background: var(--night); color: var(--night-text);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; z-index: 100; transition: opacity .4s var(--ease);
}
.boot-loader .lamp-spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(231,184,77,0.25); border-top-color: var(--lamp);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.boot-loader p { font-family: var(--font-display); font-style: italic; font-size: 0.98rem; color: var(--night-text-muted); }

/* ================= RESPONSIVE ================= */
@media (max-width: 560px) {
  .hero-title { font-size: 1.65rem; }
  .search-lamp { flex-direction: column; padding: 14px; border-radius: var(--radius-md); }
  .search-lamp input { padding: 8px 4px; }
  .search-lamp button { padding: 12px; border-radius: 10px; }
  .counsel-card { padding: 22px 18px; }
  .more-verse { grid-template-columns: 1fr; gap: 4px; }
}
