/* ==========================================================================
   MyBible.quest — Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&display=swap');

:root {
  /* Light theme (default) */
  --bg: #faf8f4;
  --bg-elevated: #ffffff;
  --bg-subtle: #f2efe8;
  --text: #1c1b19;
  --text-secondary: #55524c;
  --text-tertiary: #8a867c;
  --border: #e6e1d6;
  --border-strong: #d6cfbf;

  --accent: #1e3a5f;       /* deep blue */
  --accent-hover: #16304f;
  --accent-soft: #e8eef5;
  --gold: #b8892f;         /* subtle gold */
  --gold-soft: #f7eedc;

  --shadow-sm: 0 1px 2px rgba(28, 27, 25, 0.05);
  --shadow-md: 0 4px 16px rgba(28, 27, 25, 0.06);
  --shadow-lg: 0 12px 40px rgba(28, 27, 25, 0.10);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;

  --container: 1180px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #14151a;
  --bg-elevated: #1c1d24;
  --bg-subtle: #21222a;
  --text: #f1efe9;
  --text-secondary: #b8b5ac;
  --text-tertiary: #837f75;
  --border: #2c2d36;
  --border-strong: #3a3b46;

  --accent: #7ea3d4;
  --accent-hover: #98b6de;
  --accent-soft: #202a3a;
  --gold: #d8ac5c;
  --gold-soft: #2c2415;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14151a;
    --bg-elevated: #1c1d24;
    --bg-subtle: #21222a;
    --text: #f1efe9;
    --text-secondary: #b8b5ac;
    --text-tertiary: #837f75;
    --border: #2c2d36;
    --border-strong: #3a3b46;

    --accent: #7ea3d4;
    --accent-hover: #98b6de;
    --accent-soft: #202a3a;
    --gold: #d8ac5c;
    --gold-soft: #2c2415;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

input, textarea { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.4rem; }
p { color: var(--text-secondary); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.serif { font-family: var(--font-serif); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.95rem;
}

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

.nav-links a {
  padding: 9px 13px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover { background: var(--bg-subtle); color: var(--text); }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

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

.icon-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }

.hamburger { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.96rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fdfcfa;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { color: var(--accent); font-weight: 600; }
.btn-ghost:hover { text-decoration: underline; }
.btn-sm { padding: 9px 18px; font-size: 0.86rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 110px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, var(--gold-soft) 0%, transparent 70%);
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero-inner { max-width: 720px; }
.hero-visual { position: relative; display: flex; justify-content: center; padding: 10px 24px 40px; }
.hero-photo-card {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  position: relative;
}
.hero-photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-app-card {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-6%);
  width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 16px 18px;
}
.hero-app-card-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--gold-soft); position: relative; margin-bottom: 12px; }
.hero-app-card-dot::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--gold); }
.hero-app-card-lines { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.hero-app-card-lines span { display: block; height: 6px; border-radius: 3px; background: var(--border-strong); }
.hero-app-card-lines span:nth-child(1) { width: 92%; }
.hero-app-card-lines span:nth-child(2) { width: 100%; }
.hero-app-card-lines span:nth-child(3) { width: 65%; }
.hero-app-card-label { font-size: 0.72rem; font-weight: 600; color: var(--text-secondary); }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
.hero h1 { margin-bottom: 22px; }
.hero .subtitle {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  max-width: 560px;
  margin-bottom: 38px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats { display: flex; gap: 44px; flex-wrap: wrap; }
.hero-stat strong { display: block; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.hero-stat span { font-size: 0.86rem; color: var(--text-tertiary); }

/* ---------- Sections ---------- */
section { padding: 76px 0; }
.section-head { max-width: 620px; margin-bottom: 44px; }
.section-head h2 { margin: 12px 0 14px; }
.section-head p { font-size: 1.05rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.3,1), transform 0.7s cubic-bezier(.2,.7,.3,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Verse of the Day card ---------- */
.verse-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.verse-card::before {
  content: "\201C";
  position: absolute;
  top: 6px;
  left: 26px;
  font-family: var(--font-serif);
  font-size: 7rem;
  color: var(--gold);
  opacity: 0.16;
  line-height: 1;
}
.verse-card .verse-text {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  color: var(--text);
  line-height: 1.5;
  position: relative;
  margin-bottom: 20px;
}
.verse-card .verse-ref {
  display: inline-block;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 28px;
  font-size: 0.98rem;
}
.verse-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.verse-meta h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  font-weight: 600;
}
.verse-meta p { font-size: 0.95rem; }
.verse-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
  flex-wrap: wrap;
}
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  text-transform: capitalize;
}

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.card-icon.blue { background: var(--accent-soft); color: var(--accent); }
.card-icon.gold { background: var(--gold-soft); color: var(--gold); }
.card-icon svg { width: 22px; height: 22px; }

.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.95rem; flex-grow: 1; }
.card-foot { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; }

/* ---------- Quest cards ---------- */
.quest-card { position: relative; }
.quest-progress-bar {
  height: 5px;
  background: var(--bg-subtle);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 16px;
}
.quest-progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 100px;
  transition: width 0.4s ease;
}
.quest-progress-label { font-size: 0.78rem; color: var(--text-tertiary); margin-top: 8px; }

/* ---------- Steps (quest detail) ---------- */
.step-tracker {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.step-dot {
  flex: 1;
  min-width: 32px;
  height: 8px;
  border-radius: 100px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: background 0.3s ease;
}
.step-dot.done { background: var(--accent); border-color: var(--accent); }
.step-dot.current { background: var(--gold); border-color: var(--gold); }

.step-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-md);
}
.step-count { font-size: 0.85rem; color: var(--text-tertiary); font-weight: 600; margin-bottom: 14px; }
.step-panel .verse-text { font-family: var(--font-serif); font-size: clamp(1.2rem,2vw,1.5rem); margin-bottom: 14px; }
.step-panel .verse-ref { color: var(--accent); font-weight: 700; display: block; margin-bottom: 26px; }
.reflection-box {
  background: var(--bg-subtle);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 22px;
  margin-top: 26px;
}
.reflection-box h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold); margin-bottom: 8px; }
.step-nav { display: flex; justify-content: space-between; margin-top: 36px; gap: 12px; }

/* ---------- Emotion pills (home) ---------- */
.emotion-row { display: flex; flex-wrap: wrap; gap: 12px; }
.emotion-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}
.emotion-pill:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 32px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 42px; }
.footer-brand p { margin-top: 14px; font-size: 0.9rem; max-width: 280px; }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 0.92rem; color: var(--text-secondary); padding: 5px 0; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-tertiary);
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Search ---------- */
.search-hero { padding-bottom: 30px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-strong);
  border-radius: 100px;
  padding: 8px 8px 8px 24px;
  box-shadow: var(--shadow-md);
  max-width: 680px;
}
.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1.02rem;
  color: var(--text);
  padding: 10px 0;
}
.search-box input::placeholder { color: var(--text-tertiary); }
.search-filters { display: flex; gap: 10px; margin: 22px 0 8px; flex-wrap: wrap; }
.filter-chip {
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
}
.filter-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.result-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  margin-bottom: 16px;
}
.result-item .result-kind {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  margin-bottom: 8px;
  display: block;
}
.result-item h3 { margin-bottom: 6px; font-size: 1.15rem; }
.result-item p { font-size: 0.93rem; }
.no-results { text-align: center; padding: 60px 20px; color: var(--text-tertiary); }
.result-item mark { background: var(--gold-soft); color: var(--text); border-radius: 3px; padding: 0 2px; }

/* ---------- Explorer ---------- */
.explorer-tabs { display: flex; gap: 8px; margin-bottom: 36px; border-bottom: 1px solid var(--border); }
.explorer-tab {
  padding: 12px 4px;
  margin-right: 28px;
  font-weight: 600;
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  transform: translateY(1px);
}
.explorer-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.map-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/8.6;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(184,137,47,0.12), transparent 55%),
    radial-gradient(ellipse at 70% 30%, rgba(30,58,95,0.14), transparent 55%),
    var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
:root[data-theme="dark"] .map-wrap { background:
    radial-gradient(ellipse at 30% 70%, rgba(216,172,92,0.10), transparent 55%),
    radial-gradient(ellipse at 70% 30%, rgba(126,163,212,0.12), transparent 55%),
    var(--bg-subtle);
}
.map-grid-line { position: absolute; background: var(--border); opacity: 0.6; }
.map-geo-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.map-sea {
  fill: color-mix(in srgb, var(--accent) 20%, var(--accent-soft));
  stroke: var(--accent);
  stroke-width: 0.6;
  opacity: 0.8;
}
.map-red-sea { opacity: 0.8; }
.map-river { fill: none; stroke: var(--accent); stroke-width: 1.4; opacity: 0.5; stroke-linecap: round; }
.map-pin {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-elevated);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* Invisible hit area larger than the visible dot, so the tap target meets
   the ~24px minimum on touch without enlarging the dot itself visually. */
.map-pin::before {
  content: "";
  position: absolute;
  inset: -9px;
}
.map-pin:hover, .map-pin.active {
  transform: translate(-50%, -50%) scale(1.5);
  background: var(--gold);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent);
}
.map-pin-label {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.15s ease;
}
.map-pin:hover .map-pin-label,
.map-pin.active .map-pin-label,
.map-pin:focus-visible .map-pin-label {
  opacity: 1;
  z-index: 5;
}
.map-pin.label-suppressed .map-pin-label { opacity: 0 !important; z-index: 1; }
.place-detail {
  margin-top: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.place-detail .modern-loc { font-size: 0.85rem; color: var(--text-tertiary); margin-bottom: 12px; }

.timeline-scale { margin-bottom: 32px; }
.scale-creation-marker { font-size: 0.78rem; color: var(--text-tertiary); font-style: italic; margin-bottom: 20px; }
.scale-track { position: relative; height: 80px; margin: 0 6px; border-top: 2px solid var(--border-strong); }
.scale-gridline { position: absolute; top: -2px; width: 2px; height: 8px; background: var(--border-strong); }
.scale-gridline span {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  font-size: 0.68rem; color: var(--text-tertiary); white-space: nowrap;
}
.scale-dot {
  position: absolute; top: -8px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-elevated); box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer; transform: translateX(-50%); transition: transform 0.15s ease; padding: 0;
}
/* Invisible hit area larger than the visible dot, matching the map pins'
   expanded tap target for touch and precision-limited pointers. */
.scale-dot::before {
  content: "";
  position: absolute;
  inset: -8px;
}
.scale-dot:hover { transform: translateX(-50%) scale(1.5); background: var(--gold); box-shadow: 0 0 0 1px var(--gold); z-index: 2; }
.scale-dot.highlight { background: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.timeline-item.pulse { animation: timeline-pulse 1.2s ease; border-radius: var(--radius-sm); }
@keyframes timeline-pulse {
  0% { background: var(--accent-soft); }
  100% { background: transparent; }
}
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content:""; position:absolute; left:6px; top:6px; bottom:6px; width:2px; background: var(--border-strong); }
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 3px solid var(--accent);
}
.timeline-item.highlight::before { border-color: var(--gold); background: var(--gold); }
.timeline-item .era { font-size: 0.8rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.timeline-item h3 { margin-bottom: 8px; }
.timeline-item p { font-size: 0.94rem; }

.people-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.person-card { display: flex; gap: 18px; }
.person-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-soft), var(--gold-soft));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; color: var(--accent);
}
.person-info .role { font-size: 0.78rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.person-info p { font-size: 0.9rem; margin-top: 6px; }
.person-books { font-size: 0.78rem; color: var(--text-tertiary); margin-top: 8px; }

/* ---------- Understand page ---------- */
.pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pillar { text-align: left; }
.pillar-num { font-family: var(--font-serif); font-size: 2.4rem; color: var(--border-strong); font-weight: 700; margin-bottom: 10px; }

.value-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.value-item { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius-md); background: var(--bg-elevated); border: 1px solid var(--border); }
.value-item .check { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display:flex; align-items:center; justify-content:center; flex-shrink:0; font-weight:700; font-size:0.85rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--accent);
  color: #fdfcfa;
  border-radius: var(--radius-lg);
  padding: 60px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2, .cta-band p { color: #fdfcfa; }
.cta-band p { opacity: 0.85; margin-bottom: 30px; }
.cta-band .btn-primary { background: #fff; color: var(--accent); }
.cta-band .btn-primary:hover { background: var(--gold-soft); }

/* ---------- Utility ---------- */
.mt-0{margin-top:0}.mb-0{margin-bottom:0}
.text-center{text-align:center}
.flex{display:flex}
.flex-between{display:flex;align-items:center;justify-content:space-between}
.gap-2{gap:8px}.gap-3{gap:14px}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .people-grid { grid-template-columns: 1fr; }
  .pillar-grid { grid-template-columns: 1fr; }
}

/* Nav collapses to a hamburger earlier (tablet width) than the rest of the
   layout — eight top-level items stopped fitting the bar around 721-1080px. */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .hamburger {
    display: flex; align-items:center; justify-content:center;
    width: 34px; height: 34px; border-radius: 100px; background: var(--bg-subtle); border: 1px solid var(--border);
  }
  .mobile-menu {
    position: fixed; inset: 0; z-index: 200;
    background: var(--bg);
    display: flex; flex-direction: column;
    padding: 20px 24px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .mobile-menu.open { transform: translateX(0); }
  .mobile-menu a { padding: 16px 4px; font-size: 1.2rem; font-weight: 600; border-bottom: 1px solid var(--border); }
  .mobile-menu-close { align-self: flex-end; margin-bottom: 20px; }
}

@media (min-width: 1081px) {
  .mobile-menu { display: none; }
}

@media (max-width: 720px) {
  .container { padding: 0 18px; }
  .nav { padding: 12px 0; }
  .brand { font-size: 1.02rem; gap: 8px; }
  .brand-mark { width: 27px; height: 27px; font-size: 0.85rem; }
  .nav-actions { gap: 6px; }
  .icon-btn { width: 34px; height: 34px; }
  .icon-btn svg { width: 16px; height: 16px; }
  .streak-chip { padding: 0 9px; font-size: 0.78rem; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .verse-meta { grid-template-columns: 1fr; }
  .hero { padding: 70px 0 60px; }
  .step-panel, .verse-card { padding: 28px; }
  .value-list { grid-template-columns: 1fr; }
  .cta-band { padding: 44px 24px; }
}

@media (max-width: 400px) {
  .container { padding: 0 14px; }
  .nav-actions { gap: 4px; }
  .streak-chip span { display: none; }
  .streak-chip { padding: 0 8px; }
  .brand span:last-child { font-size: 0.96rem; }
}

/* ==========================================================================
   Premium upgrade additions
   ========================================================================== */

/* ---------- Accessibility ---------- */
.skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 300;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Streak chip (nav) ---------- */
.streak-chip {
  width: auto;
  padding: 0 12px;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
}
.streak-chip svg { width: 16px; height: 16px; }

/* ---------- Toasts ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  border-radius: 100px;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: min(340px, 80vw);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-icon { font-size: 1.1rem; }

@media (max-width: 720px) {
  .toast-container { left: 16px; right: 16px; bottom: 16px; align-items: stretch; }
  .toast { max-width: none; }
}

/* ---------- Skeleton loading ---------- */
.skeleton-line, .skeleton-block {
  background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--border) 37%, var(--bg-subtle) 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: 6px;
}
.skeleton-line { height: 14px; margin-bottom: 10px; }
.skeleton-block { height: 100%; width: 100%; }
@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.skeleton-card { padding: 30px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-elevated); }

/* ---------- AI Assistant chat ---------- */
.ai-disclaimer {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.ai-disclaimer a { color: var(--accent); font-weight: 600; }
.chat-window {
  min-height: 320px;
  max-height: 520px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.chat-message { display: flex; }
.chat-message.user { justify-content: flex-end; }
.chat-bubble {
  max-width: 88%;
  background: var(--bg-subtle);
  border-radius: 16px 16px 16px 4px;
  padding: 14px 18px;
  font-size: 0.95rem;
}
.chat-message.user .chat-bubble {
  background: var(--accent);
  color: #fdfcfa;
  border-radius: 16px 16px 4px 16px;
}
.chat-message.user .chat-bubble p { color: #fdfcfa; }
.chat-bubble p { margin-bottom: 8px; font-size: 0.95rem; color: var(--text); }
.chat-bubble p:last-child { margin-bottom: 0; }
.ai-quote { font-family: var(--font-serif); font-size: 1.05rem; padding: 10px 0; color: var(--text); }
.ai-quote cite { display: block; font-style: normal; font-weight: 700; color: var(--accent); font-size: 0.85rem; margin-top: 6px; }
.ai-fact-grid { display: flex; flex-direction: column; gap: 6px; background: var(--bg); border-radius: 10px; padding: 12px 14px; font-size: 0.85rem; margin: 10px 0; border: 1px solid var(--border); }
.ai-note { font-size: 0.78rem; color: var(--text-tertiary); font-style: italic; }
.ai-sources { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.chat-input-row { display: flex; gap: 10px; }
.chat-input-row input {
  flex: 1;
  border: 1.5px solid var(--border-strong);
  border-radius: 100px;
  padding: 13px 22px;
  font-size: 0.96rem;
  background: var(--bg-elevated);
  color: var(--text);
  outline: none;
}
.chat-input-row input:focus { border-color: var(--accent); }

/* ---------- Accordion (FAQ) ---------- */
.accordion { border-top: 1px solid var(--border); }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  font-weight: 600;
  font-size: 1.02rem;
  text-align: left;
}
.accordion-question svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-tertiary); transition: transform 0.25s ease; }
.accordion-item.open .accordion-question svg { transform: rotate(180deg); color: var(--accent); }
.accordion-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.accordion-item.open .accordion-answer { max-height: 400px; }
.accordion-answer p { padding: 0 4px 20px; font-size: 0.95rem; }

/* ---------- Testimonials ---------- */
.testimonial-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}
.testimonial-quote { font-family: var(--font-serif); font-size: 1.08rem; line-height: 1.5; flex-grow: 1; }
.testimonial-person { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--gold-soft));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: 700; color: var(--accent);
}
.testimonial-person .name { font-weight: 700; font-size: 0.92rem; }
.testimonial-person .role { font-size: 0.8rem; color: var(--text-tertiary); }

/* ---------- Newsletter ---------- */
.newsletter-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
}
.newsletter-form { display: flex; gap: 10px; max-width: 440px; margin: 24px auto 0; }
.newsletter-form input {
  flex: 1;
  border: 1.5px solid var(--border-strong);
  border-radius: 100px;
  padding: 13px 20px;
  background: var(--bg-elevated);
  color: var(--text);
  outline: none;
  font-size: 0.95rem;
}
.newsletter-form input:focus { border-color: var(--accent); }
@media (max-width: 600px) { .newsletter-form { flex-direction: column; } .newsletter-box { padding: 32px 22px; } }

/* ---------- Badges & gamification ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.badge-card {
  text-align: center;
  padding: 20px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.badge-card.locked { opacity: 0.4; filter: grayscale(1); }
.badge-card .badge-icon {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 12px;
  background: var(--gold-soft); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
}
.badge-card .badge-icon svg { width: 22px; height: 22px; }
.badge-card h4 { font-size: 0.88rem; margin-bottom: 4px; }
.badge-card p { font-size: 0.76rem; }

.badge-card.mystery {
  opacity: 1;
  filter: none;
  border-style: dashed;
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}
.badge-card.mystery .badge-icon {
  background: var(--bg-elevated);
  color: var(--text-tertiary);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  border: 1px dashed var(--border-strong);
}
.badge-card.mystery h4 { color: var(--text-tertiary); }
.badge-card.mystery p { color: var(--text-tertiary); }

.level-card { display: flex; align-items: center; gap: 20px; }
.level-ring-value { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.xp-bar { flex: 1; height: 10px; border-radius: 100px; background: var(--bg-subtle); overflow: hidden; }
.xp-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 100px; transition: width 0.5s ease; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px; text-align: center; }
.stat-card strong { display: block; font-size: 1.7rem; font-weight: 800; }
.stat-card span { font-size: 0.8rem; color: var(--text-tertiary); }
@media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Verse study page ---------- */
.study-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }
.study-main, .study-side { display: flex; flex-direction: column; gap: 20px; }
.study-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
}
.study-card h3 { font-size: 1rem; margin-bottom: 10px; }
.study-card p, .study-card li { font-size: 0.93rem; }
.study-meta-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; font-size: 0.88rem; }
.study-meta-row .label { color: var(--text-tertiary); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.fact-tier { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; }
.fact-tier .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.fact-tier.established .dot { background: #2e7d4f; }
.fact-tier.debate .dot { background: var(--gold); }
.fact-tier.interpretation .dot { background: var(--accent); }
.keyword-chip { display: inline-block; background: var(--bg-subtle); border-radius: 8px; padding: 8px 12px; margin: 0 8px 8px 0; font-size: 0.85rem; }
.keyword-chip strong { color: var(--accent); }
.verse-action-row { display: flex; gap: 10px; }
.verse-action-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 100px;
  border: 1px solid var(--border-strong);
  font-size: 0.85rem; font-weight: 600;
  background: var(--bg-elevated);
}
.verse-action-btn svg { width: 15px; height: 15px; }
.verse-action-btn.active { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.note-textarea {
  width: 100%; min-height: 80px; resize: vertical;
  border: 1.5px solid var(--border-strong); border-radius: 12px;
  padding: 12px 14px; font-family: inherit; font-size: 0.9rem;
  background: var(--bg); color: var(--text); outline: none;
}
.note-textarea:focus { border-color: var(--accent); }
.note-item { background: var(--bg-subtle); border-radius: 10px; padding: 12px 14px; font-size: 0.88rem; margin-top: 10px; }
.note-item .note-date { font-size: 0.72rem; color: var(--text-tertiary); margin-top: 4px; }
.prayer-box { background: var(--gold-soft); border-radius: var(--radius-md); padding: 22px; font-family: var(--font-serif); font-size: 1.02rem; }

@media (max-width: 900px) {
  .study-layout { grid-template-columns: 1fr; }
  .study-meta-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- Relations / family ---------- */
.relations-list { display: flex; flex-wrap: wrap; gap: 8px; }
.relation-chip { background: var(--bg-subtle); border-radius: 100px; padding: 6px 14px; font-size: 0.82rem; }
.relation-chip strong { color: var(--accent); }

/* ---------- Map layers ---------- */
.map-layer-toggles { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.layer-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 100px;
  border: 1px solid var(--border); font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary);
}
.layer-btn .swatch { width: 10px; height: 10px; border-radius: 50%; }
.layer-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.map-routes-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.map-route-path { fill: none; stroke-width: 2; stroke-dasharray: 6 5; opacity: 0.85; }

/* ---------- Book / study list cards ---------- */
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.reading-time { font-size: 0.78rem; color: var(--text-tertiary); display: flex; align-items: center; gap: 5px; }
.reading-time svg { width: 13px; height: 13px; }

/* ---------- Archaeology artifact cards ---------- */
.artifact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 26px; }
.artifact-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.artifact-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.artifact-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-subtle); }
.artifact-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.artifact-card:hover .artifact-photo img { transform: scale(1.07); }
.artifact-consensus {
  position: absolute; top: 12px; right: 12px;
  background: rgba(20, 21, 26, 0.72); color: #fdfcfa;
  font-size: 0.72rem; font-weight: 600; text-transform: capitalize;
  padding: 5px 13px; border-radius: 100px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.artifact-body { padding: 22px 24px 24px; }
.artifact-meta { font-size: 0.78rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.artifact-body h3 { margin-bottom: 10px; }
.artifact-body p { font-size: 0.93rem; }
.artifact-significance {
  margin-top: 14px; padding: 14px 16px;
  background: var(--bg-subtle); border-radius: 10px;
  font-size: 0.85rem; border-left: 3px solid var(--gold);
}
.artifact-credit { margin-top: 14px; font-size: 0.7rem; color: var(--text-tertiary); }

/* ---------- Mountain trail (Quests / Reading Plans progress) ---------- */
.trail-card {
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg-elevated) 55%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 16px 4px;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  overflow: hidden;
}
.trail-svg { width: 100%; height: auto; display: block; }
.trail-mountain-back { fill: var(--bg-subtle); }
.trail-mountain-front { fill: var(--gold-soft); }
.trail-path-line {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 3;
  stroke-dasharray: 9 8;
  stroke-linecap: round;
}
.trail-waypoint .waypoint-circle {
  fill: var(--bg-elevated);
  stroke: var(--border-strong);
  stroke-width: 2;
  transition: transform 0.2s ease;
}
.trail-waypoint .waypoint-num {
  fill: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-sans);
  text-anchor: middle;
}
.trail-waypoint:hover .waypoint-circle,
.trail-waypoint:focus-visible .waypoint-circle { transform: scale(1.12); }
.trail-waypoint.done .waypoint-circle { fill: var(--accent); stroke: var(--accent); }
.trail-waypoint.done .waypoint-check {
  stroke: #fdfcfa; stroke-width: 2.4; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.trail-waypoint.current .waypoint-circle { fill: var(--gold); stroke: var(--gold); }
.trail-waypoint.current .waypoint-num { fill: #2a1f04; }
.trail-waypoint.locked .waypoint-circle { fill: var(--bg-subtle); stroke: var(--border); }
.trail-waypoint.locked .waypoint-num { fill: var(--text-tertiary); }
.pulse-ring {
  fill: none; stroke: var(--gold); stroke-width: 2; opacity: 0.7;
  transform-origin: center;
  animation: trail-pulse 1.8s ease-out infinite;
}
@keyframes trail-pulse {
  0% { r: 15; opacity: 0.7; }
  100% { r: 27; opacity: 0; }
}
.trail-summit .summit-circle { fill: var(--bg-subtle); stroke: var(--border-strong); stroke-width: 2; }
.trail-summit .summit-flag { stroke: var(--text-tertiary); stroke-width: 2; fill: var(--text-tertiary); stroke-linejoin: round; }
.trail-summit.done .summit-circle { fill: var(--gold); stroke: var(--gold); }
.trail-summit.done .summit-flag { stroke: #fdfcfa; fill: #fdfcfa; }

/* ---------- Section wrapper for homepage feature blocks ---------- */
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature-split.reverse .feature-visual { order: -1; }
.feature-visual {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
/* ---------- Account: auth button, modal, dropdown ---------- */
.auth-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 0.72rem; font-weight: 700;
  overflow: hidden;
}
.auth-avatar img { width: 100%; height: 100%; object-fit: cover; }
.auth-modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 500;
  background: rgba(20, 18, 14, 0.5);
  align-items: center; justify-content: center;
  padding: 20px;
}
.auth-modal-overlay.open { display: flex; }
.auth-modal {
  position: relative;
  width: 100%; max-width: 380px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px 28px;
}
.auth-modal-close { position: absolute; top: 14px; right: 14px; }
.auth-modal-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.auth-tab {
  flex: 1; padding: 8px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-subtle);
  color: var(--text-secondary); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
}
.auth-tab.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.auth-modal h3 { margin: 0 0 8px; }
.auth-modal-sub { font-size: 0.85rem; margin-bottom: 20px; }
.auth-google-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: var(--text-tertiary); font-size: 0.78rem;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-field { display: block; margin-bottom: 14px; }
.auth-field[hidden] { display: none; }
.auth-field span { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.auth-field input, .auth-field-input {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: 0.95rem;
}
.auth-field input:focus, .auth-field-input:focus { outline: none; border-color: var(--accent); }
.account-row { display: flex; align-items: center; gap: 14px; }
.account-avatar-lg {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 1.2rem; font-weight: 700; overflow: hidden;
}
.account-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.account-name-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.auth-forgot-link {
  display: block; background: none; border: none; padding: 0;
  margin: -6px 0 14px; font-size: 0.8rem; color: var(--accent);
  text-decoration: underline; cursor: pointer;
}
.auth-forgot-link[hidden] { display: none; }
.auth-error { color: #c0392b; font-size: 0.82rem; margin: -4px 0 14px; }
.auth-error.auth-error-success { color: #2e7d32; }
.auth-submit { width: 100%; }
.auth-dropdown {
  position: fixed; z-index: 500;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 16px; min-width: 220px;
}
.auth-dropdown-email {
  font-size: 0.85rem; color: var(--text-secondary);
  margin-bottom: 12px; word-break: break-all;
}
body.no-scroll { overflow: hidden; }

@media (max-width: 900px) {
  .feature-split, .feature-split.reverse .feature-visual { grid-template-columns: 1fr; order: 0; }
}
