/* components.css — Reusable UI components for History Orbit.
   All styles reference variables from main.css — no hardcoded colours. */

/* ── Welcome Page ─────────────────────────────────────────────────────────── */
.welcome-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse at center, rgba(100, 55, 10, 0.06) 0%, transparent 70%);
  position: relative;
}

.welcome-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(225, 192, 130, 0.35) 0%, rgba(235, 205, 148, 0.40) 50%, rgba(225, 192, 130, 0.35) 100%);
  z-index: 0;
}

.welcome-content {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.welcome-logo {
  font-family: var(--font-body);
  font-size: clamp(2.6rem, 6.5vw, 4rem);
  font-weight: 700;
  font-style: normal;
  color: var(--color-accent);
  margin-bottom: 10px;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.welcome-logo .logo-gold { color: var(--color-gold); }

.welcome-tagline {
  font-family: var(--font-body);
  font-size: 1.18rem;
  font-style: normal;
  color: var(--color-text-secondary);
  margin-bottom: 52px;
  letter-spacing: 0.015em;
  line-height: 1.55;
}

.welcome-ornament {
  font-size: 2rem;
  margin-bottom: 36px;
  opacity: 0.5;
  letter-spacing: 8px;
}

.welcome-btns {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.welcome-btns .btn {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.welcome-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-style: normal;
  margin-top: 16px;
}

.welcome-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px;
  text-align: center;
  font-size: 0.8rem;
  font-style: normal;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

/* ── Home Dashboard ───────────────────────────────────────────────────────── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.today-card {
  grid-column: 1 / -1;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-top: 2px solid rgba(107, 56, 18, 0.50);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--lg-surface-shadow);
}
.today-card::before {
  content: '📅';
  position: absolute;
  right: 24px;
  top: 24px;
  font-size: 2.5rem;
  opacity: 0.15;
}
.today-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 10px;
  font-style: normal;
  font-family: var(--font-ui);
  display: flex;
  align-items: center;
  gap: 6px;
}
.today-year-badge {
  display: inline-block;
  background: var(--color-accent);
  color: #FFF8F0;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-style: normal;
  margin-bottom: 8px;
}
.today-text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: normal;
  color: var(--color-text-primary);
  line-height: 1.68;
}

.word-card {
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-top: 2px solid rgba(107, 56, 18, 0.48);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--lg-surface-shadow);
}
.word-era {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  margin-bottom: 6px;
  font-style: normal;
  font-weight: 600;
}
.word-term {
  font-family: var(--font-body);
  font-size: 1.45rem;
  font-weight: 700;
  font-style: normal;
  color: var(--color-accent);
  letter-spacing: -0.018em;
  line-height: 1.25;
  margin-bottom: 9px;
}
.word-def {
  font-size: 0.9rem;
  font-style: normal;
  color: var(--color-text-secondary);
  line-height: 1.68;
}

.home-hero {
  text-align: center;
  margin: 32px 0;
}
.home-hero h2 {
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  font-style: normal;
  color: var(--color-text-primary);
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin-bottom: 10px;
}
.home-hero p {
  font-size: 1rem;
  font-style: normal;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  line-height: 1.65;
}

.era-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.era-card {
  padding: 28px 20px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--lg-surface-border);
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.15s ease, background 0.15s ease, border-color 0.18s ease;
  display: block;
  box-shadow: var(--lg-surface-shadow-sm);
  position: relative;
  overflow: hidden;
}
.era-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 46%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 100%);
  pointer-events: none;
}
.era-card:hover, .era-card:focus {
  background: var(--lg-surface-bg-hover);
  box-shadow: var(--lg-surface-shadow);
  border-color: rgba(107, 56, 18, 0.48);
  transform: translateY(-2px);
}
.era-card:active { transform: scale(0.98); }
.era-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--color-accent);
}
.era-card-icon svg { display: block; }
.era-card-title {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  font-style: normal;
  color: var(--color-text-primary);
  letter-spacing: -0.015em;
  margin-bottom: 7px;
  line-height: 1.25;
}
.era-card-desc {
  font-size: 0.835rem;
  font-style: normal;
  color: var(--color-text-secondary);
  line-height: 1.5;
}
.era-card-range {
  margin-top: 10px;
  font-size: 0.78rem;
  font-style: normal;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
}

.recent-section { margin-top: 32px; }
.section-heading {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 700;
  font-style: normal;
  color: var(--color-text-primary);
  letter-spacing: -0.018em;
  line-height: 1.2;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 0.875rem;
  font-style: normal;
  color: var(--color-text-primary);
  transition: box-shadow 0.18s ease, transform 0.1s ease, background 0.15s ease, border-color 0.18s ease;
  box-shadow: var(--lg-surface-shadow-sm);
}
.recent-item:hover, .recent-item:focus {
  background: var(--lg-surface-bg-hover);
  box-shadow: var(--lg-surface-shadow);
  border-color: rgba(107, 56, 18, 0.42);
  transform: translateY(-1px);
}
.recent-item-icon { color: var(--color-text-muted); flex-shrink: 0; }
.recent-item-topic { font-weight: 500; color: var(--color-accent); }
.recent-item-meta { font-size: 0.78rem; color: var(--color-text-muted); }

/* ── Year Selection ───────────────────────────────────────────────────────── */
.year-select-page { max-width: 700px; margin: 0 auto; }
.year-page-title {
  font-family: var(--font-body);
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  font-weight: 700;
  font-style: normal;
  color: var(--color-text-primary);
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin-bottom: 10px;
}
.year-page-sub {
  font-size: 1rem;
  font-style: normal;
  color: var(--color-text-secondary);
  margin-bottom: 36px;
  line-height: 1.6;
}

.slider-wrap {
  margin: 28px 0;
}
.slider-display {
  font-family: var(--font-body);
  font-size: 2.8rem;
  font-weight: 700;
  font-style: normal;
  color: var(--color-accent);
  text-align: center;
  margin-bottom: 6px;
}
.slider-era-hint {
  text-align: center;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  min-height: 24px;
}
/* ── Slider track wrapper — provides vertical room for the oversized glass thumb ── */
.slider-track-wrap {
  position: relative;
  padding: 18px 0;
  touch-action: none;
}

.year-slider {
  width: 100%;
  height: 5px;
  appearance: none;
  background: linear-gradient(to right, var(--color-accent) 0%, var(--color-accent) 50%, rgba(107,56,18,0.16) 50%);
  border-radius: var(--radius-full);
  outline: none;
  cursor: grab;
  position: relative;
  z-index: 2;
}
.year-slider:active { cursor: grabbing; }

/* Native thumb — invisible but fully interactive (hit-testing, keyboard, a11y) */
.year-slider::-webkit-slider-thumb {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: grab;
  opacity: 0;
}
.year-slider::-webkit-slider-thumb:active { cursor: grabbing; }
.year-slider::-moz-range-thumb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: grab;
  opacity: 0;
}

/* ── iOS-style solid white thumb overlay ── */
.slider-glass-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  pointer-events: none;
  transform: translateY(-50%);
  will-change: left, transform;
  transition:
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.18s ease;
  z-index: 1;

  background: #ffffff;
  box-shadow:
    0 3px 14px rgba(0, 0, 0, 0.18),
    0 1px 4px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 1.00);
}

/* Active / drag state — grow and lift like native iOS */
.slider-glass-thumb.active {
  transform: translateY(-50%) scale(1.22);
  transition:
    transform 0.10s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.10s ease;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.26),
    0 3px 8px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 1.00);
}

.slider-range {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-style: normal;
  color: var(--color-text-muted);
  margin-top: 8px;
}

.year-manual {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin: 24px 0;
}
.year-input {
  width: 160px;
  height: 56px;
  padding: 0 18px;
  border: 0.5px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-style: normal;
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  color: var(--color-text-primary);
  /* Liquid Glass */
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.04),
    0 2px 12px rgba(0,0,0,0.05),
    inset 0 1px 0 rgba(255,255,255,0.90);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.year-input:focus {
  border-color: rgba(139,69,19,0.50);
  outline: none;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 0 3px rgba(139,69,19,0.08), inset 0 1px 0 rgba(255,255,255,0.95);
}
.year-input-label {
  font-style: normal;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.era-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
}

#suggestion-chips-wrap {
  min-height: 106px;
  overflow: hidden;
}

#dynamic-chips {
  transition: opacity 0.14s ease;
}

/* ── Country Page Header ─────────────────────────────────────────────────── */
.country-page-header {
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-top: 2px solid rgba(107, 56, 18, 0.48);
  border-radius: var(--radius-lg);
  padding: 24px 28px 20px;
  margin-bottom: 20px;
  box-shadow: var(--lg-surface-shadow-sm);
}
.country-page-title {
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-style: normal;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin: 0 0 8px 0;
}
.country-page-sub {
  font-size: 0.95rem;
  font-style: normal;
  color: var(--color-text-secondary);
  margin: 0 0 20px 0;
  line-height: 1.6;
}
.country-page-sub strong { color: var(--color-accent); }

/* ── Country Search ───────────────────────────────────────────────────────── */
.country-search-wrap {
  position: relative;
}
.country-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.country-search {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 44px;
  border: 0.5px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 0.95rem;
  color: var(--color-text-primary);
  /* Liquid Glass */
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.70), 0 2px 10px rgba(0,0,0,0.04);
  margin: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.country-search:focus {
  border-color: rgba(139,69,19,0.45);
  outline: none;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 0 0 3px rgba(139,69,19,0.08), inset 0 1px 0 rgba(255,255,255,0.75);
}

/* ── Region section label ─────────────────────────────────────────────────── */
.country-region-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin: 16px 0 10px;
}

/* ── Region 2-column accordion grid ─────────────────────────────────────── */
.country-region-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.world-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  margin-bottom: 14px;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.15s ease, background 0.15s ease, border-color 0.18s ease;
  box-shadow: var(--lg-surface-shadow-sm);
  position: relative; overflow: hidden;
}
.world-option::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 46%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 100%);
  pointer-events: none;
}
.world-option:hover, .world-option:focus {
  background: var(--lg-surface-bg-hover);
  box-shadow: var(--lg-surface-shadow);
  border-color: rgba(107, 56, 18, 0.45);
  transform: translateY(-1px);
}
.world-option:active { transform: scale(0.98); }
.world-option-icon {
  flex-shrink: 0;
  font-size: 2rem;
  line-height: 1;
}
.world-option-text { font-family: var(--font-body); flex: 1; }
.world-option-name {
  font-size: 0.97rem;
  font-weight: 700;
  font-style: normal;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}
.world-option-desc {
  font-size: 0.79rem;
  font-style: normal;
  color: var(--color-text-secondary);
}
.world-option-arrow {
  font-size: 1.1rem;
  color: var(--color-accent);
  flex-shrink: 0;
  font-weight: 600;
}

/* Country note */
.country-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.8rem;
  font-style: normal;
  color: var(--color-text-muted);
  padding: 10px 14px;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-btn-blur);
  -webkit-backdrop-filter: var(--lg-btn-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-md);
  line-height: 1.6;
  box-shadow: var(--lg-surface-shadow-sm);
}

.country-accordion { margin-bottom: 0; }
.accordion-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: var(--lg-btn-bg);
  backdrop-filter: var(--lg-btn-blur);
  -webkit-backdrop-filter: var(--lg-btn-blur);
  border: 1.5px solid var(--lg-btn-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-weight: 600;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--color-text-primary);
  user-select: none;
  min-height: 42px;
  text-align: left;
  transition: box-shadow 0.18s ease, background 0.15s ease, border-color 0.18s ease;
  box-shadow: var(--lg-btn-shadow);
}
.accordion-header:hover {
  background: var(--lg-btn-bg-hover);
  box-shadow: 0 3px 14px rgba(44,22,6,0.07), inset 0 1.5px 0 rgba(255,255,255,0.95);
  border-color: rgba(107, 56, 18, 0.60);
}
.accordion-region-name {
  flex: 1;
  font-size: 0.85rem;
}
.accordion-count {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  padding: 1px 7px;
  flex-shrink: 0;
}
.accordion-header[aria-expanded="true"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
  background: var(--lg-btn-bg-hover);
  border-color: rgba(107, 56, 18, 0.72);
  color: var(--color-accent);
  box-shadow: 0 3px 14px rgba(44,22,6,0.08), inset 0 1.5px 0 rgba(255,255,255,0.98);
}
.accordion-header[aria-expanded="true"] .accordion-count {
  color: var(--color-accent);
  border-color: rgba(107, 56, 18, 0.45);
  background: rgba(255,255,255,0.12);
}
.accordion-icon {
  transition: transform 0.2s ease;
  color: var(--color-text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.accordion-header[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
  color: var(--color-accent);
}
.accordion-body {
  border: 1.5px solid rgba(107, 56, 18, 0.38);
  border-top: none;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  display: none;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-btn-blur);
  -webkit-backdrop-filter: var(--lg-btn-blur);
}
.accordion-body.open { display: flex; }
.country-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--lg-btn-border);
  background: var(--lg-btn-bg);
  backdrop-filter: var(--lg-btn-blur);
  -webkit-backdrop-filter: var(--lg-btn-blur);
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  font-style: normal;
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.1s ease, background 0.15s ease, border-color 0.18s ease;
  min-height: 36px;
  box-shadow: var(--lg-btn-shadow);
  position: relative;
  overflow: hidden;
}
.country-btn:hover, .country-btn:focus {
  background: var(--lg-btn-bg-hover);
  box-shadow: 0 3px 14px rgba(44,22,6,0.07), inset 0 1.5px 0 rgba(255,255,255,0.95);
  border-color: rgba(107, 56, 18, 0.65);
  transform: translateY(-1px);
}
.country-btn:active { transform: scale(0.96); }
.country-btn.selected,
.country-btn[aria-selected="true"] {
  background: var(--lg-btn-bg-hover);
  color: var(--color-accent);
  font-weight: 700;
  border-color: rgba(107, 56, 18, 0.78);
  box-shadow: 0 4px 18px rgba(44,22,6,0.08), inset 0 1.5px 0 rgba(255,255,255,0.95);
}

/* ── Topic Input ──────────────────────────────────────────────────────────── */
.context-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(139,69,19,0.12);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  border: 1px solid rgba(139,69,19,0.35);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  font-style: normal;
  color: var(--color-accent-dark);
  font-size: 0.9rem;
  box-shadow: var(--glass-shadow-sm);
}
.context-banner span {
  background: var(--color-accent);
  color: #FFF8F0;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
}

.topic-search-wrap {
  position: relative;
  margin-bottom: 24px;
}
.topic-input {
  width: 100%;
  height: 64px;
  padding: 0 60px 0 20px;
  border: 0.5px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-style: normal;
  font-size: 1.05rem;
  color: var(--color-text-primary);
  /* Liquid Glass input */
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.04),
    0 2px 14px rgba(0,0,0,0.05),
    inset 0 1px 0 rgba(255,255,255,0.90);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.topic-input:focus {
  border-color: rgba(139,69,19,0.50);
  outline: none;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 0 0 3px rgba(139,69,19,0.08),
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 4px 20px rgba(0,0,0,0.06);
}
.topic-input::placeholder { color: var(--color-text-muted); }

.topic-mic-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1.3rem;
  padding: 8px;
  border-radius: var(--radius-sm);
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.topic-mic-btn:hover, .topic-mic-btn:focus, .topic-mic-btn:active {
  color: var(--color-text-muted);
}

.suggestions-wrap {
  margin-top: 24px;
}
.suggestions-label {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  font-style: normal;
  color: var(--color-text-secondary);
  margin-bottom: 14px;
}
.suggestions-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Suggestion chip — larger, more visible ──────────────────────────────── */
.suggestion-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--lg-btn-border);
  background: var(--lg-btn-bg);
  backdrop-filter: var(--lg-btn-blur);
  -webkit-backdrop-filter: var(--lg-btn-blur);
  font-family: var(--font-body);
  font-size: 0.97rem;
  font-style: normal;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  box-shadow: var(--lg-btn-shadow);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 80ms ease, border-color 0.18s ease;
  line-height: 1.3;
  position: relative;
  overflow: hidden;
}
.suggestion-chip:hover,
.suggestion-chip:focus {
  background: var(--lg-btn-bg-hover);
  border-color: rgba(107, 56, 18, 0.55);
  color: var(--color-accent);
  box-shadow: 0 4px 18px rgba(44,22,6,0.08), inset 0 1px 0 rgba(255,255,255,0.95);
  transform: translateY(-1px);
  outline: none;
}
.suggestion-chip:active {
  transform: translateY(0) scale(0.97);
}

/* ── Results Page ─────────────────────────────────────────────────────────── */
.results-header {
  margin-bottom: 28px;
}

.results-title {
  font-family: var(--font-body);
  font-size: clamp(1.7rem, 4.2vw, 2.5rem);
  font-weight: 700;
  font-style: normal;
  color: var(--color-text-primary);
  letter-spacing: -0.028em;
  margin-bottom: 14px;
  line-height: 1.18;
}

.results-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px 16px;
  position: relative;
  z-index: 20;
  overflow: visible;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--lg-surface-shadow-sm);
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-style: normal;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  border: 1px solid var(--glass-border);
  color: var(--color-text-secondary);
  box-shadow: 0 2px 8px rgba(100,60,10,0.08), inset 0 1px 0 rgba(255,248,225,0.4);
}

.meta-chip-accent {
  background: rgba(255, 255, 255, 0.30);
  border-color: rgba(255, 255, 255, 0.88);
  color: var(--color-accent);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06), inset 0 1.5px 0 rgba(255,255,255,0.96);
}

.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-style: normal;
  background: rgba(201,146,42,0.22);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  border: 1px solid rgba(201,146,42,0.4);
  color: var(--color-accent-dark);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(180,120,20,0.12), inset 0 1px 0 rgba(255,230,150,0.25);
  transition: box-shadow 0.18s ease;
}
.confidence-badge:hover { box-shadow: 0 4px 16px rgba(180,120,20,0.22); }

.importance-bar {
  margin: 12px 0;
}
.importance-label {
  font-size: 0.78rem;
  font-style: normal;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.importance-levels {
  display: flex;
  gap: 2px;
  align-items: center;
}
.importance-level-item {
  flex: 1;
  height: 6px;
  background: var(--color-border);
  border-radius: var(--radius-full);
}
.importance-level-item.filled {
  background: var(--color-accent);
}
.importance-level-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}
.importance-level-labels span {
  font-size: 0.68rem;
  font-style: normal;
  color: var(--color-text-muted);
}
.importance-level-labels span.active-level {
  color: var(--color-accent);
  font-weight: 600;
}

.who-alive-strip {
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 14px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: var(--lg-surface-shadow-sm);
}
.who-alive-label {
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.who-alive-person {
  font-size: 0.85rem;
  font-style: normal;
  color: var(--color-text-secondary);
}
.who-alive-person strong {
  color: var(--color-text-primary);
}

/* ── Action Buttons Row ───────────────────────────────────────────────────── */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding: 14px 16px;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-lg);
  justify-content: center;
  align-items: center;
  box-shadow: var(--lg-surface-shadow-sm);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--lg-btn-border);
  background: var(--lg-btn-bg);
  backdrop-filter: var(--lg-btn-blur);
  -webkit-backdrop-filter: var(--lg-btn-blur);
  color: var(--color-text-secondary);
  transition: box-shadow 0.18s ease, transform 0.1s ease, background 0.15s ease, border-color 0.18s ease;
  min-height: 40px;
  min-width: 110px;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  box-shadow: var(--lg-btn-shadow);
}
.action-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 46%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, transparent 100%);
  pointer-events: none;
}
.action-btn:hover, .action-btn:focus {
  background: var(--lg-btn-bg-hover);
  color: var(--color-accent-dark);
  border-color: rgba(107, 56, 18, 0.55);
  box-shadow: 0 4px 18px rgba(44,22,6,0.08), inset 0 1px 0 rgba(255,255,255,0.95);
  transform: translateY(-1px);
}
.action-btn:active { transform: scale(0.96); }
.action-buttons .dropdown {
  display: contents;
}
.action-buttons .dropdown .action-btn {
  min-width: 110px;
}
.action-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.action-btn-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}
.action-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Results Two-Column ───────────────────────────────────────────────────── */
.results-layout {
  display: grid;
  grid-template-columns: 65fr 35fr;
  gap: 28px;
  align-items: start;
}

/* ── Article Content ──────────────────────────────────────────────────────── */
/* ── Essay Structure Sections ────────────────────────────────────────────── */
.essay-section {
  margin-bottom: 4px;
}
.essay-section-label {
  font-family: var(--font-ui);
  font-size: 0.70rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: rgba(107,56,18,0.06);
  border-left: 3px solid var(--color-accent);
  padding: 5px 12px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 12px;
  display: inline-block;
}
.essay-intro .section-lead { font-size: 1.05rem; }
.essay-conclusion { background: var(--color-surface-2); border-left: 3px solid var(--color-gold); padding: 16px 18px; border-radius: 0 var(--radius-md) var(--radius-md) 0; margin: 24px 0 0; }

.article-content {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.85;
  color: var(--color-text-primary);
}

.article-content h2 {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 700;
  font-style: italic;
  color: var(--color-accent);
  letter-spacing: -0.018em;
  margin: 34px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(107,56,18,0.12);
}

.article-content h3 {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 600;
  font-style: italic;
  color: var(--color-text-primary);
  letter-spacing: -0.014em;
  margin: 26px 0 10px;
}

.article-content h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  color: var(--color-text-secondary);
  margin: 16px 0 6px;
}

.article-content p {
  font-style: italic;
  margin-bottom: 1.1em;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.article-content ul, .article-content ol {
  margin: 10px 0 16px 20px;
}
.article-content li {
  font-style: italic;
  margin-bottom: 9px;
  line-height: 1.75;
}

.article-content strong {
  font-weight: 700;
  color: var(--color-accent-dark);
  text-decoration: underline;
  text-decoration-color: var(--color-gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.article-content em {
  font-style: italic;
  color: var(--color-text-secondary);
}

/* ── Article Images (inline) ──────────────────────────────────────────────── */
.article-image {
  float: right;
  margin: 4px 0 20px 24px;
  max-width: 300px;
  width: 42%;
  clear: right;
}
.article-image img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: block;
}
.article-image figcaption {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  padding: 7px 6px 4px;
  text-align: left;
  line-height: 1.5;
  border-top: 1px solid var(--color-border);
  background: rgba(0,0,0,0.02);
  border-radius: var(--radius-full);
}
.article-image figcaption strong {
  display: block;
  font-style: normal;
  color: var(--color-text);
  font-size: 0.8rem;
  margin-bottom: 2px;
}
.article-image figcaption .img-source {
  display: block;
  font-size: 0.72rem;
  opacity: 0.75;
}

/* ── Section lead paragraph ──────────────────────────────────────────────── */
.article-content p.section-lead {
  font-size: 1.02em;
  font-style: normal;
  line-height: 1.75;
  margin-bottom: 1em;
}

/* ── Inline Expanded Content ──────────────────────────────────────────────── */
.detail-content-panel,
.action-result-panel {
  margin: 20px 0;
  padding: 20px;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--lg-surface-shadow-sm);
  display: none;
}
.detail-content-panel.show,
.action-result-panel.show {
  display: block;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}
.panel-title {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  font-style: normal;
  color: var(--color-text-primary);
}
.panel-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  min-height: 32px;
  min-width: 32px;
  border-radius: var(--radius-sm);
}

/* ── Right Column Media ───────────────────────────────────────────────────── */
.media-column {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: calc(var(--nav-height) + 16px);
  z-index: 1;
  border-left: 1.5px solid var(--lg-surface-border);
  padding-left: 22px;
}

.results-layout > :first-child {
  z-index: 2;
  position: relative;
}

.image-gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.image-gallery-grid .gallery-img:first-child {
  grid-column: 1 / -1;
}
.gallery-img {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}
.gallery-img img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.gallery-img:first-child img { height: 170px; }
.gallery-caption {
  padding: 7px 9px;
  font-size: 0.72rem;
  font-style: normal;
  color: var(--color-text-muted);
  line-height: 1.35;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-light);
}

.also-year-card {
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--lg-surface-shadow-sm);
}
.also-year-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  font-style: normal;
}
.also-year-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 0.85rem;
  font-style: normal;
  color: var(--color-text-secondary);
  line-height: 1.5;
}
.also-year-item:last-child { border-bottom: none; }

/* ── Emoji Reactions ──────────────────────────────────────────────────────── */
.reactions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
  padding: 14px 0;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}
.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--lg-btn-border);
  background: var(--lg-btn-bg);
  backdrop-filter: var(--lg-btn-blur);
  -webkit-backdrop-filter: var(--lg-btn-blur);
  cursor: pointer;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--color-text-secondary);
  min-height: 36px;
  transition: box-shadow 0.18s ease, transform 0.1s ease, background 0.15s ease, border-color 0.18s ease;
  box-shadow: var(--lg-btn-shadow);
}
.reaction-btn:hover, .reaction-btn:focus {
  background: var(--lg-btn-bg-hover);
  box-shadow: 0 3px 14px rgba(44,22,6,0.07), inset 0 1px 0 rgba(255,255,255,0.95);
  border-color: rgba(107, 56, 18, 0.52);
  transform: translateY(-1px);
}
.reaction-btn:active { transform: scale(0.96); }
.reaction-btn.selected {
  background: rgba(139,69,19,0.15);
  border-color: rgba(210,140,70,0.45);
  color: var(--color-accent);
  box-shadow: 0 2px 10px rgba(139,69,19,0.12), inset 0 1px 0 rgba(255,210,140,0.25);
}
.reaction-count {
  font-weight: 600;
  font-style: normal;
}

/* ── Key Terms Glossary ───────────────────────────────────────────────────── */
.glossary-section {
  margin-top: 32px;
  border-top: 2px solid var(--color-border-light);
  padding-top: 20px;
}
.glossary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: 12px;
}
.glossary-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: normal;
  font-weight: 600;
  color: var(--color-text-primary);
}
.glossary-body { display: none; }
.glossary-body.open { display: block; }
.glossary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.glossary-item {
  padding: 10px 12px;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-btn-blur);
  -webkit-backdrop-filter: var(--lg-btn-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-md);
  box-shadow: var(--lg-surface-shadow-sm);
}
.glossary-term {
  font-weight: 600;
  font-style: normal;
  color: var(--color-accent);
  font-size: 0.875rem;
  margin-bottom: 4px;
}
.glossary-def {
  font-size: 0.8rem;
  font-style: normal;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ── Read Aloud Button ────────────────────────────────────────────────────── */
.read-aloud-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 10px 14px;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-md);
  box-shadow: var(--lg-surface-shadow-sm);
}
.read-aloud-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--lg-btn-border);
  background: var(--lg-btn-bg);
  backdrop-filter: var(--lg-btn-blur);
  -webkit-backdrop-filter: var(--lg-btn-blur);
  color: var(--color-accent);
  cursor: pointer;
  font-size: 0.85rem;
  font-style: normal;
  font-weight: 500;
  min-height: 36px;
  box-shadow: var(--lg-btn-shadow);
  transition: background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.read-aloud-btn:hover, .read-aloud-btn:focus {
  background: var(--lg-btn-bg-hover);
  border-color: rgba(107, 56, 18, 0.68);
  box-shadow: 0 4px 16px rgba(44,22,6,0.07), inset 0 1.5px 0 rgba(255,255,255,0.95);
}
.read-aloud-time {
  font-size: 0.82rem;
  font-style: normal;
  color: var(--color-text-muted);
}

/* ── Back in Time Navigation ──────────────────────────────────────────────── */
.time-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0;
  padding: 14px 20px;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--lg-surface-shadow-sm);
}
.time-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--color-accent);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--lg-btn-border);
  background: var(--lg-btn-bg);
  backdrop-filter: var(--lg-btn-blur);
  -webkit-backdrop-filter: var(--lg-btn-blur);
  cursor: pointer;
  min-height: 44px;
  transition: box-shadow 0.18s ease, transform 0.1s ease, background 0.15s ease, border-color 0.18s ease;
  box-shadow: var(--lg-btn-shadow);
}
.time-nav-btn:hover, .time-nav-btn:focus {
  background: var(--lg-btn-bg-hover);
  box-shadow: 0 4px 18px rgba(44,22,6,0.08), inset 0 1px 0 rgba(255,255,255,0.95);
  border-color: rgba(107, 56, 18, 0.58);
  transform: translateY(-1px);
}
.time-nav-btn:active { transform: scale(0.97); }
.time-nav-center {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-style: normal;
  color: var(--color-text-muted);
}

/* ── Related Topics ───────────────────────────────────────────────────────── */
.related-section {
  margin: 24px 0;
}
.related-label {
  font-size: 0.85rem;
  font-style: normal;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.related-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Sources Footer ───────────────────────────────────────────────────────── */
.sources-footer {
  margin-top: 20px;
  padding: 12px 16px;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-btn-blur);
  -webkit-backdrop-filter: var(--lg-btn-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-style: normal;
  color: var(--color-text-muted);
  box-shadow: var(--lg-surface-shadow-sm);
}

/* ── Test Yourself ────────────────────────────────────────────────────────── */
.test-section {
  margin-top: 28px;
  border-top: 2px solid var(--color-border-light);
  padding-top: 20px;
}
.test-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: 14px;
}
.test-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: normal;
  font-weight: 600;
  color: var(--color-text-primary);
}

/* ── Highlight Save Tooltip ───────────────────────────────────────────────── */
.highlight-tooltip {
  position: fixed;
  display: none;
  background: var(--color-surface);
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  font-size: 0.82rem;
  font-style: normal;
  color: var(--color-accent);
  box-shadow: var(--shadow-md);
  z-index: 5000;
  cursor: pointer;
  transition: none;
}
.highlight-tooltip.show { display: block; }

/* ── Action Result Cards ──────────────────────────────────────────────────── */
.place-card, .cause-card, .person-card {
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--lg-surface-shadow-sm);
}
.place-card h4, .cause-card h4, .person-card h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-style: normal;
  color: var(--color-accent);
  margin-bottom: 6px;
}
.cause-card {
  display: flex;
  gap: 14px;
}
.cause-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  color: #FFF8F0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  font-style: normal;
}
.person-role {
  font-size: 0.82rem;
  font-style: normal;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

/* ── Timeline ─────────────────────────────────────────────────────────────── */
.timeline-wrap { position: relative; padding-left: 30px; }
.timeline-wrap::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-accent-light);
}
.timeline-entry {
  position: relative;
  margin-bottom: 20px;
}
.timeline-entry::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid var(--color-surface);
}
.timeline-date {
  font-size: 0.82rem;
  font-style: normal;
  color: var(--color-accent);
  margin-bottom: 4px;
}
.timeline-content {
  font-size: 0.9rem;
  font-style: normal;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ── Saved Page ───────────────────────────────────────────────────────────── */
.saved-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.saved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.saved-card {
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--lg-surface-shadow-sm);
}
.saved-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 2rem;
}
.saved-card-body { padding: 14px; }
.saved-card-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  font-style: normal;
  color: var(--color-accent);
  margin-bottom: 6px;
}
.saved-card-meta {
  font-size: 0.8rem;
  font-style: normal;
  color: var(--color-text-muted);
}

/* ── Quiz Page ────────────────────────────────────────────────────────────── */
.quiz-page { max-width: 700px; margin: 0 auto; }
.quiz-title {
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-style: normal;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.022em;
  line-height: 1.18;
  margin-bottom: 10px;
}
.quiz-subtitle {
  font-style: normal;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  font-size: 1rem;
  line-height: 1.65;
}
.quiz-question {
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--lg-surface-shadow-sm);
}
.quiz-q-num {
  font-family: var(--font-ui);
  font-size: 0.70rem;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 10px;
}
.quiz-q-text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: normal;
  color: var(--color-text-primary);
  line-height: 1.68;
  margin-bottom: 18px;
  letter-spacing: -0.008em;
}
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1.5px solid var(--lg-btn-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--color-text-primary);
  background: var(--lg-btn-bg);
  backdrop-filter: var(--lg-btn-blur);
  -webkit-backdrop-filter: var(--lg-btn-blur);
  box-shadow: var(--lg-btn-shadow);
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.18s ease;
  min-height: 44px;
}
.quiz-option:hover, .quiz-option:focus {
  background: var(--lg-btn-bg-hover);
  border-color: rgba(107, 56, 18, 0.52);
  box-shadow: 0 3px 14px rgba(44,22,6,0.07), inset 0 1px 0 rgba(255,255,255,0.95);
}
.quiz-option.selected {
  background: var(--lg-surface-bg-hover);
  border-color: rgba(107, 56, 18, 0.70);
  color: var(--color-accent);
  font-weight: 600;
  box-shadow: var(--lg-surface-shadow-sm);
}
.quiz-option.correct {
  background: rgba(45,106,63,0.1);
  border-color: var(--color-success);
  color: var(--color-success);
}
.quiz-option.wrong {
  background: rgba(139,26,26,0.1);
  border-color: var(--color-error);
  color: var(--color-error);
}
.quiz-option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-style: normal;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* Fill in the Blanks */
.fitb-sentence {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: normal;
  line-height: 1.8;
  margin-bottom: 10px;
}
.fitb-input {
  display: inline-block;
  min-width: 120px;
  height: 32px;
  border: none;
  border-bottom: 2px solid var(--color-accent);
  background: transparent;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 1rem;
  color: var(--color-accent);
  padding: 0 4px;
  text-align: center;
}
.fitb-hint {
  font-size: 0.78rem;
  font-style: normal;
  color: var(--color-text-muted);
  margin-top: 4px;
}
.quiz-score {
  text-align: center;
  padding: 28px;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-gold);
  box-shadow: var(--lg-surface-shadow-sm);
}
.score-value {
  font-family: var(--font-body);
  font-size: 3rem;
  font-weight: 700;
  font-style: normal;
  color: var(--color-accent);
}
.score-label {
  font-style: normal;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

/* ── Summary Page ─────────────────────────────────────────────────────────── */
.summary-page { max-width: 720px; margin: 0 auto; }
.summary-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 1.5px solid rgba(107,56,18,0.14);
}
.summary-title {
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.18;
  color: var(--color-text-primary);
}
.summary-content {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: normal;
  line-height: 1.88;
  color: var(--color-text-primary);
}
.summary-word-count {
  margin-top: 16px;
  font-size: 0.8rem;
  font-style: normal;
  color: var(--color-text-muted);
  text-align: right;
}

/* ── Map Cards ────────────────────────────────────────────────────────────── */
.map-card {
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-btn-blur);
  -webkit-backdrop-filter: var(--lg-btn-blur);
  box-shadow: var(--lg-surface-shadow-sm);
}
.map-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.map-card-info {
  padding: 8px 12px;
}
.map-card-title {
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}
.map-card-source {
  font-size: 0.72rem;
  font-style: normal;
  color: var(--color-text-muted);
}

/* ── Share Button ─────────────────────────────────────────────────────────── */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--lg-btn-border);
  background: var(--lg-btn-bg);
  backdrop-filter: var(--lg-btn-blur);
  -webkit-backdrop-filter: var(--lg-btn-blur);
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  font-style: normal;
  cursor: pointer;
  min-height: 36px;
  transition: box-shadow 0.18s ease, transform 0.1s ease, background 0.15s ease, border-color 0.18s ease;
  box-shadow: var(--lg-btn-shadow);
  position: relative;
  overflow: hidden;
}
.share-btn:hover, .share-btn:focus {
  background: var(--lg-btn-bg-hover);
  box-shadow: 0 3px 14px rgba(44,22,6,0.07), inset 0 1.5px 0 rgba(255,255,255,0.95);
  border-color: rgba(107, 56, 18, 0.65);
  transform: translateY(-1px);
}
.share-btn:active { transform: scale(0.96); }

/* ── Confidence Popover ───────────────────────────────────────────────────── */
.confidence-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--lg-surface-bg);
  backdrop-filter: var(--lg-surface-blur);
  -webkit-backdrop-filter: var(--lg-surface-blur);
  border: 1.5px solid var(--lg-surface-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  min-width: 220px;
  box-shadow: var(--lg-surface-shadow);
  z-index: 600;
  display: none;
  font-size: 0.82rem;
  font-style: normal;
  pointer-events: auto;
}
.confidence-popover.show { display: block; }
.confidence-popover-source {
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.confidence-popover-source:last-child { border-bottom: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE & RESPONSIVE — COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Global font size bumps — raise tiny labels to readable minimum ──────── */
.meta-chip, .confidence-badge { font-size: 0.88rem; }
.today-label { font-size: 0.88rem; }
.word-era    { font-size: 0.88rem; }
.word-def    { font-size: 1rem; }
.today-text  { font-size: 1rem; }
.word-term   { font-size: 1.35rem; }
.era-card-title { font-size: 1.1rem; }
.era-card-desc  { font-size: 0.9rem; }
.era-card-range { font-size: 0.88rem; }
.recent-item    { font-size: 0.95rem; }
.section-heading { font-size: 1.1rem; }
.article-content { font-size: 1.05rem; line-height: 1.85; }
.article-content h2 { font-size: 1.4rem; }
.article-content h3 { font-size: 1.2rem; }
.action-btn  { font-size: 0.9rem; }
.reaction-btn, .share-btn { font-size: 0.9rem; }
.time-nav-btn { font-size: 0.95rem; }
.read-aloud-btn { font-size: 0.9rem; }
.glossary-term { font-size: 0.95rem; }
.glossary-def  { font-size: 0.9rem; }
.sources-footer { font-size: 0.88rem; }
.quiz-option { font-size: 0.95rem; }
.suggestion-chip { font-size: 1rem; }
.topic-input { font-size: 1.05rem; }
.country-btn { font-size: 0.9rem; }
.accordion-header { font-size: 0.95rem; }
.world-option-name { font-size: 1rem; }
.world-option-desc { font-size: 0.88rem; }
.results-title { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.year-page-title { font-size: clamp(1.5rem, 4vw, 2rem); }
.year-page-sub { font-size: 1rem; }
.slider-display { font-size: clamp(2.2rem, 6vw, 3rem); }

/* ── Tablet (≤ 900px) ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Results: stack into single column */
  .results-layout { grid-template-columns: 1fr; gap: 24px; }
  .media-column {
    position: static;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--color-border);
    padding-top: 24px;
  }
  .image-gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .image-gallery-grid .gallery-img:first-child { grid-column: 1 / -1; }
  .results-header { margin-bottom: 20px; }
  .detail-content-panel, .action-result-panel { padding: 20px; }

  /* Bigger cards on tablet */
  .today-card { padding: 22px; }
  .word-card  { padding: 20px; }
  .era-card   { padding: 26px 18px; }
}

/* ── Mobile (≤ 640px) ──────────────────────────────────────────────────── */
@media (max-width: 640px) {

  /* ─ Welcome page ─ */
  .welcome-page { padding: 28px 16px 80px; }
  .welcome-content { max-width: 100%; }
  .welcome-logo { font-size: 2.2rem; }
  .welcome-tagline { font-size: 1.05rem; margin-bottom: 32px; }
  .welcome-btns .btn { max-width: 100%; }

  /* ─ Home dashboard ─ */
  .home-grid { grid-template-columns: 1fr; gap: 14px; }
  .era-cards { grid-template-columns: 1fr 1fr; gap: 14px; }
  .era-card { padding: 22px 16px; }
  .era-card-title { font-size: 1.05rem; }
  .era-card-desc { font-size: 0.88rem; }
  .today-card { padding: 18px; }
  .today-text { font-size: 1rem; }
  .word-card { padding: 18px; }
  .word-term { font-size: 1.2rem; }
  .home-hero h2 { font-size: 1.35rem; }
  .home-hero p { font-size: 0.95rem; }

  /* ─ Year selection ─ */
  .year-select-page { max-width: 100%; }
  .year-manual { flex-wrap: wrap; gap: 8px; }
  .year-input { width: 140px; height: 54px; font-size: 1.3rem; }

  /* ─ Country selection ─ */
  .country-region-grid { grid-template-columns: 1fr; }
  .country-page-header { padding: 18px 16px 16px; }
  .country-page-title { font-size: 1.35rem; }
  .country-btn { min-height: 44px; padding: 10px 16px; font-size: 0.92rem; }
  .accordion-header { min-height: 50px; font-size: 1rem; }
  .accordion-body { gap: 8px; padding: 12px; }
  .world-option { padding: 16px; }
  .world-option-name { font-size: 1rem; }

  /* ─ Topic input ─ */
  .topic-input { height: 60px; font-size: 1rem; }
  .context-banner { font-size: 0.9rem; padding: 12px 14px; }
  .suggestions-chips { gap: 8px; }
  .suggestion-chip { font-size: 0.95rem; padding: 10px 16px; }

  /* ─ Results header ─ */
  .results-meta { gap: 8px; margin-bottom: 12px; }
  .meta-chip { font-size: 0.85rem; padding: 5px 12px; }
  .confidence-badge { font-size: 0.85rem; padding: 5px 12px; }
  .share-btn { font-size: 0.85rem; padding: 5px 12px; }

  /* Importance bar labels */
  .importance-level-labels span { font-size: 0.72rem; }

  /* Who alive strip — scrollable */
  .who-alive-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding: 12px 14px;
    scrollbar-width: none;
  }
  .who-alive-strip::-webkit-scrollbar { display: none; }
  .who-alive-person { white-space: nowrap; font-size: 0.9rem; flex-shrink: 0; }

  /* ─ Action buttons — 2-col grid on mobile ─ */
  .action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
  }
  .action-btn {
    justify-content: center;
    text-align: center;
    font-size: 0.88rem;
    padding: 10px 8px;
    min-height: 48px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
  }
  .action-buttons .dropdown { display: contents; }
  .action-buttons .dropdown .action-btn { display: flex; width: 100%; }

  /* ─ Article content ─ */
  .article-content { font-size: 1rem; line-height: 1.82; }
  .article-content h2 { font-size: 1.25rem; margin: 20px 0 10px; }
  .article-content h3 { font-size: 1.1rem; }
  .article-content p { text-align: left; }

  /* Article inline images — full width on mobile */
  .article-image {
    float: none; width: 100%; max-width: 100%;
    margin: 0 0 18px 0; clear: both;
  }
  .article-image img { height: auto; max-height: 220px; object-fit: cover; }

  /* ─ Panels ─ */
  .panel-header { flex-wrap: wrap; gap: 8px; }
  .panel-header > div { flex-shrink: 0; }
  .panel-title { font-size: 0.95rem; }

  /* ─ Reactions ─ */
  .reactions-row { gap: 8px; }
  .reaction-btn { padding: 7px 12px; font-size: 0.9rem; min-height: 42px; }

  /* ─ Image gallery ─ */
  .image-gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gallery-img img { height: 120px; }
  .gallery-img:first-child img { height: 150px; }
  .gallery-caption { font-size: 0.8rem; }

  /* ─ Glossary ─ */
  .glossary-grid { grid-template-columns: 1fr; gap: 8px; }
  .glossary-item { padding: 10px 12px; }
  .glossary-term { font-size: 1rem; }
  .glossary-def  { font-size: 0.92rem; }

  /* ─ Time navigation ─ */
  .time-nav { flex-direction: column; gap: 10px; }
  .time-nav-btn { width: 100%; text-align: center; justify-content: center; font-size: 1rem; }

  /* ─ Read aloud bar ─ */
  .read-aloud-bar { padding: 10px 14px; gap: 10px; }
  .read-aloud-btn { font-size: 0.92rem; min-height: 42px; padding: 8px 16px; }

  /* ─ Summary / Quiz ─ */
  .summary-header, .quiz-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .word-count-chips { flex-wrap: wrap; gap: 6px; }
  .quiz-options { gap: 10px; }
  .quiz-option { padding: 12px 16px; font-size: 0.95rem; }

  /* ─ Sources footer ─ */
  .sources-footer { font-size: 0.9rem; }
}

/* ── Small phone (≤ 480px) ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .action-buttons { grid-template-columns: 1fr 1fr; padding: 10px; gap: 6px; }
  .action-buttons .dropdown { display: contents; }

  /* Era cards — single column on very small screens */
  .era-cards { grid-template-columns: 1fr; gap: 12px; }

  /* Welcome */
  .welcome-logo { font-size: 2rem; }
  .welcome-ornament { font-size: 1.5rem; margin-bottom: 24px; }

  /* Results title */
  .results-title { font-size: 1.35rem; }

  /* Map card */
  .map-card img { max-height: 180px; object-fit: cover; }

  /* Also-this-year card */
  .also-year-card { padding: 12px; }
  .also-year-item { font-size: 0.8rem; }

  /* Confidence popover — left-aligned to avoid overflow */
  .confidence-popover {
    right: auto;
    left: 0;
    min-width: 220px;
  }

  /* Dropdown menus — prevent overflow off right edge */
  .dropdown-menu {
    left: auto;
    right: 0;
    min-width: 140px;
  }

  /* Panel header back button + close fit on one line */
  .panel-header > div { gap: 4px !important; }
  .btn-sm { padding: 5px 10px; font-size: 0.75rem; min-height: 32px; }
}

/* ── Very small (≤ 360px) ──────────────────────────────────────────────── */
@media (max-width: 360px) {
  .main-content { padding: 12px 10px 24px; }
  .results-title { font-size: 1.2rem; }
  .action-btn { font-size: 0.72rem; padding: 7px 7px; }
  .article-content { font-size: 0.9rem; }
  .meta-chip, .confidence-badge { font-size: 0.68rem; }
}

/* ── Key Causes entries ────────────────────────────────────────────────────── */
.cause-entry {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.cause-entry:last-child { border-bottom: none; }
.cause-entry h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  font-style: normal;
  color: var(--color-accent);
  margin: 0 0 8px;
  line-height: 1.3;
}
.cause-entry p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-text);
}

/* ── Key People entries ─────────────────────────────────────────────────────── */
.person-entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.person-entry:last-child { border-bottom: none; }
.person-entry-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.person-name {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-style: normal;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.012em;
  line-height: 1.3;
  flex: 1;
}
.person-mini-portrait {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-accent);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}
.person-mini-portrait:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 12px rgba(0,0,0,0.22);
}
.person-contributions {
  margin: 0 0 8px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* ── Key Places entries ─────────────────────────────────────────────────────── */
.place-entry {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.place-entry:last-child { border-bottom: none; }
.place-entry h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  font-style: normal;
  color: var(--color-accent);
  margin: 0 0 8px;
  line-height: 1.3;
}
.place-entry p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-text);
}

/* ── Person / Place card enhancements (flex layout with portrait/image) ───── */
.person-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.person-portrait {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
}
.person-card-body { flex: 1; min-width: 0; }
.person-card-body h4 { margin: 0 0 6px; }
.person-card-body p  { margin: 0 0 6px; font-size: 0.85rem; line-height: 1.5; color: var(--color-text-secondary); }

.place-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.place-image {
  width: 110px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}
.place-card-body { flex: 1; min-width: 0; }
.place-card-body h4 { margin: 0 0 6px; }
.place-card-body p  { margin: 0 0 6px; font-size: 0.85rem; line-height: 1.5; color: var(--color-text-secondary); }

.cause-card-body { flex: 1; min-width: 0; }
.cause-card-body h4 { margin: 0 0 6px; font-family: var(--font-body); font-size: 0.95rem; font-style: normal; color: var(--color-accent); }
.cause-card-body p  { margin: 0; font-size: 0.87rem; line-height: 1.55; }

.wiki-link {
  font-size: 0.78rem;
  color: var(--color-accent);
  text-decoration: none;
}
.wiki-link:hover { text-decoration: underline; }

/* ── Gallery Pages ─────────────────────────────────────────────────────────── */
.gallery-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.gallery-header {
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-border);
}

.gallery-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-accent);
  font-family: var(--font-body);
  font-style: normal;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 10px;
  transition: opacity 0.2s;
}
.gallery-back-btn:hover { opacity: 0.65; }

.gallery-title {
  font-family: var(--font-body);
  font-size: clamp(1.65rem, 4vw, 2.3rem);
  font-style: normal;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 8px;
}
.gallery-subtitle {
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-style: normal;
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.gallery-section { margin-bottom: 48px; }

.gallery-section-title {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-style: normal;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.015em;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(107,56,18,0.12);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.gallery-grid-people {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.gallery-grid-maps {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.gallery-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  outline: none;
}
.gallery-card:hover,
.gallery-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.14);
}
.gallery-card:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.gallery-card-img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
}
.gallery-card-event .gallery-card-img-wrap  { aspect-ratio: 4/3; }
.gallery-card-map   .gallery-card-img-wrap  { aspect-ratio: 3/2; }
.gallery-card-person .gallery-card-img-wrap { aspect-ratio: 3/4; }
.gallery-card-place  .gallery-card-img-wrap { aspect-ratio: 4/3; }

.gallery-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.gallery-card:hover .gallery-card-img-wrap img { transform: scale(1.04); }

.gallery-card-zoom-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 7px;
  background: rgba(0,0,0,0.58);
  color: #fff;
  font-size: 0.75rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.gallery-card:hover .gallery-card-zoom-hint,
.gallery-card:focus-visible .gallery-card-zoom-hint { opacity: 1; }

.gallery-card-caption {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gallery-card-caption strong {
  font-size: 0.84rem;
  color: var(--color-text);
  line-height: 1.3;
}
.gallery-card-caption em {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  font-style: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gallery-wiki-link, .gallery-source {
  font-size: 0.72rem;
  color: var(--color-accent);
  text-decoration: none;
}
.gallery-wiki-link:hover { text-decoration: underline; }
.gallery-source { color: var(--color-text-muted); }

.gallery-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 20px;
  gap: 16px;
  color: var(--color-text-muted);
  font-style: normal;
}
.gallery-empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--color-text-muted);
  font-style: normal;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: ch-spin 0.8s linear infinite;
}
@keyframes ch-spin { to { transform: rotate(360deg); } }

/* ── Lightbox ──────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.lightbox.lb-show { opacity: 1; }

.lb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.lb-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(94vw, 1020px);
  max-height: 96vh;
  background: var(--color-surface);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--color-accent);
  color: #fff;
  flex-shrink: 0;
  gap: 10px;
}
.lb-title {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.95);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s;
}
.lb-close:hover { background: rgba(255,255,255,0.35); }

.lb-stage {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  background: #111;
  overflow: hidden;
}
.lb-image-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px;
  max-height: 62vh;
  min-height: 200px;
}
.lb-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.18s ease;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.lb-nav {
  background: rgba(255,255,255,0.07);
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 2.4rem;
  width: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s;
  line-height: 1;
}
.lb-nav:hover:not(:disabled) { background: rgba(255,255,255,0.22); }
.lb-nav:disabled { opacity: 0.25; cursor: not-allowed; }

.lb-footer {
  padding: 10px 16px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}
.lb-caption {
  font-size: 0.84rem;
  color: var(--color-text-secondary);
  font-style: normal;
  margin: 0 0 8px;
  line-height: 1.4;
}
.lb-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.lb-zoom-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 3px 10px;
}
.lb-zoom-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.15rem;
  color: var(--color-accent);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.14s;
  line-height: 1;
}
.lb-zoom-btn:hover { background: var(--color-border); }
.lb-zoom-level {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  min-width: 38px;
  text-align: center;
  font-family: monospace;
}
/* Download button — sits between zoom controls and wiki link */
.lb-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--color-accent);
  border: 0.5px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.88);
  transition: background 0.15s ease, box-shadow 0.15s ease;
  min-height: 34px;
}
.lb-download-btn:hover {
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.96);
}
.lb-download-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.lb-wiki-link {
  font-size: 0.78rem;
  color: var(--color-accent);
  text-decoration: none;
}
.lb-wiki-link:hover { text-decoration: underline; }
.lb-counter {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-style: normal;
}

/* ── Gallery + Lightbox — Desktop refinements ──────────────────────────────── */
@media (min-width: 1024px) {
  .gallery-grid         { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .gallery-grid-maps    { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .gallery-grid-people  { grid-template-columns: repeat(5, 1fr); gap: 14px; }

  /* Lightbox — bigger on large screens */
  .lb-container { width: min(88vw, 1100px); }
  .lb-image-wrap { max-height: 68vh; }
}

/* ── Gallery + Lightbox — Tablet ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .gallery-grid         { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .gallery-grid-maps    { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gallery-grid-people  { grid-template-columns: repeat(3, 1fr); gap: 10px; }

  .lb-controls { flex-wrap: wrap; gap: 8px; }
  .lb-zoom-group { order: 0; }
  .lb-download-btn { order: 1; }
  .lb-wiki-link    { order: 2; }
  .lb-counter      { order: 3; margin-left: auto; }
}

/* ── Gallery + Lightbox — Mobile ────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Gallery page header */
  .gallery-header { padding: 20px 16px 14px; }
  .gallery-title  { font-size: 1.4rem; }
  .gallery-back-btn { font-size: 0.82rem; padding: 6px 12px; }

  /* Grids */
  .gallery-grid         { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-grid-people  { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gallery-grid-maps    { grid-template-columns: 1fr; gap: 10px; }

  /* Cards */
  .gallery-card-caption strong { font-size: 0.75rem; }
  .gallery-card-caption em     { font-size: 0.7rem; -webkit-line-clamp: 2; }

  /* Lightbox — full screen on mobile */
  .lb-container {
    width: 100vw;
    max-height: 100dvh;
    max-height: 100vh; /* fallback */
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }
  .lb-stage { flex: 1; min-height: 0; }
  .lb-image-wrap { max-height: 50vh; padding: 8px; }
  .lb-nav { width: 36px; font-size: 1.8rem; }

  /* Footer controls — stack on mobile */
  .lb-footer { padding: 8px 12px; }
  .lb-caption { font-size: 0.78rem; margin-bottom: 6px; }
  .lb-controls {
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }
  .lb-download-btn {
    font-size: 0.78rem;
    padding: 5px 10px;
    min-height: 32px;
  }
  .lb-zoom-group {
    padding: 2px 8px;
  }
  .lb-zoom-btn { width: 28px; height: 28px; font-size: 1rem; }
  .lb-zoom-level { font-size: 0.75rem; min-width: 34px; }

  /* Key people cards */
  .person-card { flex-direction: column; align-items: center; text-align: center; }
  .place-card  { flex-direction: column; align-items: flex-start; }
  .person-portrait { width: 70px; height: 70px; }
  .place-image { width: 100%; height: 120px; }
}

/* ── Very small phones ──────────────────────────────────────────────────────── */
@media (max-width: 400px) {
  .gallery-grid,
  .gallery-grid-people  { grid-template-columns: 1fr; }
  .lb-controls          { justify-content: center; }
  .lb-counter           { width: 100%; text-align: center; }
}

/* ── Article Image Strip ─────────────────────────────────────────────────── */
.article-image-strip {
  margin: 0 0 24px;
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  border: 1.5px solid rgba(107, 56, 18, 0.20);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(44,22,6,0.06), inset 0 1px 0 rgba(255,255,255,0.88);
}

.strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.strip-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  font-style: normal;
  color: var(--color-accent-dark);
  letter-spacing: 0.02em;
}

.strip-all-link {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent-light);
  transition: color var(--transition), border-color var(--transition);
}
.strip-all-link:hover {
  color: var(--color-accent-dark);
  border-bottom-color: var(--color-accent);
}

/* Horizontal scroll row — centered */
.strip-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  justify-content: center;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) var(--color-border-light);
  padding-bottom: 6px;
}
.strip-scroll::-webkit-scrollbar {
  height: 5px;
}
.strip-scroll::-webkit-scrollbar-track {
  background: var(--color-border-light);
  border-radius: var(--radius-full);
}
.strip-scroll::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

/* Individual strip card */
.strip-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  outline: none;
}
.strip-card:hover,
.strip-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}
.strip-card:active {
  transform: translateY(0);
}

.strip-card-img-wrap {
  width: 100%;
  height: 108px;
  overflow: hidden;
}
.strip-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.strip-card:hover .strip-card-img-wrap img {
  transform: scale(1.05);
}

.strip-card-caption {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.strip-card-caption strong {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-accent-dark);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.strip-card-caption em {
  font-family: var(--font-body);
  font-size: 0.68rem;
  color: var(--color-text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Wider cards on larger screens */
@media (min-width: 768px) {
  .strip-card { flex: 0 0 180px; }
  .strip-card-img-wrap { height: 120px; }
}
@media (min-width: 1024px) {
  .strip-card { flex: 0 0 200px; }
  .strip-card-img-wrap { height: 132px; }
}

/* Compact on small phones */
@media (max-width: 480px) {
  .strip-card { flex: 0 0 140px; }
  .strip-card-img-wrap { height: 95px; }
  .article-image-strip { padding: 10px 12px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LANDING PAGE — full redesign of welcome/index page
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Landing page container ───────────────────────────────────────────────── */
.landing-page {
  background: var(--color-bg);
  font-family: 'Times New Roman', Times, serif;
  font-style: normal;
  /* Use em so html.font-lg/sm accessibility toggle scales this proportionally */
  font-size: 1.375em;  /* = 22px at default 16px html; 25px at font-lg 20px; 19.25px at font-sm 14px */
}

/* ── Times New Roman + italic on everything in the landing page ──────────── */
.landing-page *:not(svg):not(path):not(circle):not(rect):not(line):not(polyline):not(polygon) {
  font-family: 'Times New Roman', Times, serif;
  font-style: normal;
}

/* ── Landing page text scale — clean, proportionate, easy to read ─────────── */
.landing-hero-logo       { font-size: clamp(1.7rem, 3.8vw, 2.8rem); }
.landing-hero-tagline    { font-size: 1.02rem; letter-spacing: 0.01em; }
.landing-hero-sub        { font-size: 0.96rem; line-height: 1.72; }
.landing-section-title   { font-size: clamp(1.25rem, 2.4vw, 1.85rem); }
.landing-section-intro   { font-size: 0.96rem; line-height: 1.72; }
.landing-about-text p    { font-size: clamp(0.90rem, 2.0vw, 1.02rem); line-height: 1.74; }
.landing-about-text ul li { font-size: clamp(0.86rem, 1.8vw, 0.96rem); }
.landing-audience-card h3 { font-size: clamp(0.88rem, 1.9vw, 1.01rem); }
.landing-audience-card p  { font-size: clamp(0.80rem, 1.6vw, 0.90rem); line-height: 1.64; }
.landing-audience-card ul li { font-size: clamp(0.78rem, 1.5vw, 0.87rem); }
.landing-usp-card h3     { font-size: clamp(0.87rem, 2.0vw, 0.99rem); }
.landing-usp-card p      { font-size: clamp(0.78rem, 1.6vw, 0.88rem); line-height: 1.66; }
.landing-stat-num        { font-size: clamp(1.25rem, 2.4vw, 1.60rem); }
.landing-stat-label      { font-size: 0.72rem; letter-spacing: 0.07em; }
.landing-cta-title       { font-size: clamp(1.2rem, 2.4vw, 1.70rem); }
.landing-cta-sub         { font-size: 0.92rem; line-height: 1.68; }
.landing-preview-article { font-size: 0.92rem; line-height: 1.72; }
.landing-footer-inner > p { font-size: 0.84rem; }
.lpf-try-text            { font-size: 0.96rem; }
.landing-preview-title   { font-size: clamp(1.0rem, 2.0vw, 1.22rem); }
.landing-section-label   { font-size: clamp(0.70rem, 1.3vw, 0.78rem); letter-spacing: 0.12em; }
.landing-hero-note-inline { font-size: 0.84rem; }

/* ── Buttons, badges, pills stay upright (non-italic) ───────────────────── */
.landing-page .btn,
.landing-page .lpa-btn,
.landing-page .landing-nav-cta,
.landing-page .landing-preview-badge,
.landing-page .landing-usp-vs,
.landing-page .landing-section-label,
.landing-page .landing-preview-section-label,
.landing-page .lpf-chip,
.landing-page .lpf-source,
.landing-page .lp-pill {
  font-family: 'Times New Roman', Times, serif;
  font-style: normal;
}

/* ── Landing nav (overrides base.html nav block) ─────────────────────────── */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(44px) saturate(200%);
  -webkit-backdrop-filter: blur(44px) saturate(200%);
  border-bottom: 1.5px solid rgba(107, 56, 18, 0.20);
  box-shadow: 0 2px 20px rgba(44, 22, 6, 0.07), inset 0 -1px 0 rgba(255,255,255,1.0);
}
.landing-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  align-content: center;
  justify-content: space-between;
  padding: 0 28px;
}

.landing-nav-inner--logo-only {
  justify-content: center;
}

.landing-nav-inner--logo-only .landing-nav-logo {
  font-size: 1.38rem;
  letter-spacing: 0.01em;
}
/* Ensure all direct children are vertically centred in the landing nav */
.landing-nav-inner > * {
  align-self: center;
}
.landing-nav-logo {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.25rem;
  font-weight: 700;
  font-style: normal;
  color: var(--color-accent);
  letter-spacing: -0.01em;
}
.landing-nav-logo span { color: var(--color-gold); }
.landing-nav-actions { display: flex; gap: 12px; align-items: center; }
.landing-nav-cta {
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.84rem;
  font-style: normal;
  padding: 9px 28px;
  min-width: 200px;
  text-align: center;
  letter-spacing: 0.01em;
  font-weight: 600;
  white-space: nowrap;
}

/* ── HERO ─────────────────────────────────────────────────────────────────── */
.landing-hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 56px 24px 48px;
}
.landing-hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--color-bg);
  overflow: hidden;
}

.landing-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(100,55,10,0.11) 0%, transparent 65%),
    radial-gradient(ellipse 55% 50% at 20% 80%, rgba(80,40,8,0.08) 0%, transparent 60%);
  animation: hero-bg-drift-a 10s ease-in-out infinite alternate;
}

.landing-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(160,100,20,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 45% at 30% 60%, rgba(60,30,6,0.05) 0%, transparent 55%);
  animation: hero-bg-drift-b 14s ease-in-out infinite alternate;
}

@keyframes hero-bg-drift-a {
  from { transform: translate(0, 0)    scale(1.00); opacity: 0.8; }
  to   { transform: translate(18px,-14px) scale(1.06); opacity: 1.0; }
}

@keyframes hero-bg-drift-b {
  from { transform: translate(0, 0)     scale(1.00); opacity: 0.7; }
  to   { transform: translate(-20px,12px) scale(1.05); opacity: 1.0; }
}

html.reduced-motion .landing-hero-bg::before,
html.reduced-motion .landing-hero-bg::after { animation: none; }
.landing-hero-content {
  position: relative;
  z-index: 1;
  max-width: 660px;
}

/* Compass logo — always centred */
.compass-logo-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}
.landing-hero-ornament {
  font-size: 1rem;
  letter-spacing: 10px;
  color: var(--color-gold);
  opacity: 0.7;
  margin-bottom: 14px;
}
.landing-hero-logo {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(2.0rem, 5vw, 3.6rem);
  font-weight: 700;
  font-style: normal;
  color: var(--color-accent);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.landing-hero-logo span { color: var(--color-gold); }
.landing-hero-tagline {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-style: normal;
  color: var(--color-text-secondary);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.landing-hero-sub {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.1rem, 2.2vw, 1.28rem);
  font-style: normal;
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto 12px;
  line-height: 1.78;
}
.landing-hero-sub strong {
  color: var(--color-accent);
  font-weight: 700;
}
.landing-hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 18px;
}
.landing-btn-primary {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(36px) saturate(180%);
  -webkit-backdrop-filter: blur(36px) saturate(180%);
  color: var(--color-accent);
  font-weight: 700;
  border: 1.5px solid rgba(107, 56, 18, 0.62);
  box-shadow:
    0 6px 28px rgba(44, 22, 6, 0.12),
    0 2px 6px rgba(44, 22, 6, 0.07),
    inset 0 1.5px 0 rgba(255,255,255,0.98),
    inset 0 -0.5px 0 rgba(44, 22, 6, 0.05);
}
.landing-btn-primary:hover, .landing-btn-primary:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(107, 56, 18, 0.92);
  box-shadow:
    0 10px 40px rgba(44, 22, 6, 0.16),
    0 3px 8px rgba(44, 22, 6, 0.09),
    inset 0 1.5px 0 rgba(255,255,255,1.0);
  transform: translateY(-2px);
}
.landing-hero-note {
  font-size: 0.82rem;
  font-style: normal;
  color: var(--color-text-muted);
}
.landing-hero-note-inline {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  font-style: normal;
  color: var(--color-text-muted);
}

/* ── STATS BAR ────────────────────────────────────────────────────────────── */
.landing-stats {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.landing-stats-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.landing-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 32px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.landing-stat.lp-visible { opacity: 1; transform: translateY(0); }
.landing-stat-num {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  font-weight: 700;
  font-style: normal;
  color: var(--color-accent);
  line-height: 1;
}
.landing-stat-plus {
  color: var(--color-gold);
  font-size: 0.75em;
  vertical-align: super;
}
.landing-stat-label {
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.64rem;
  font-style: normal;
  color: var(--color-text-muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.landing-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border);
}

/* ── SHARED SECTION LAYOUT ───────────────────────────────────────────────── */
.landing-section {
  padding: 60px 28px;
}
.landing-section-alt {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}
.landing-section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.landing-section-label {
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 600;
  color: var(--color-gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.landing-section-title {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  font-weight: 700;
  font-style: normal;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: 10px;
}
.landing-section-intro {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.22rem;
  font-style: normal;
  color: var(--color-text-secondary);
  max-width: 580px;
  line-height: 1.82;
  margin-bottom: 32px;
}

/* ── ABOUT SECTION ───────────────────────────────────────────────────────── */
.landing-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
}
.landing-about-text p {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.18rem, 2.8vw, 1.40rem);
  font-style: normal;
  line-height: 1.84;
  color: var(--color-text-primary);
  margin-bottom: 10px;
}
.landing-about-text p strong { color: var(--color-accent); font-style: normal; }
/* About section bullet list */
.landing-about-text ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.landing-about-text ul li {
  font-family: 'Times New Roman', Times, serif;
  font-style: normal;
  color: var(--color-text-secondary);
  line-height: 1.68;
  padding-left: 16px;
  position: relative;
}
.landing-about-text ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.58em;
  width: 5px;
  height: 5px;
  background: var(--color-gold);
  border-radius: 50%;
  opacity: 0.85;
}
.landing-about-text ul li strong { color: var(--color-accent); font-weight: 700; font-style: normal; }
/* Icon card SVG sizing */
.landing-icon-card svg {
  width: 52px;
  height: 52px;
  display: block;
  color: var(--color-accent);
}
.landing-about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.landing-about-icon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  width: 100%;
  max-width: 460px;
}
.landing-icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 12px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
  border: 1.5px solid rgba(107, 56, 18, 0.28);
  border-radius: var(--radius-md);
  box-shadow:
    0 4px 20px rgba(44, 22, 6, 0.08),
    inset 0 1.5px 0 rgba(255,255,255,0.92);
  font-size: 1.5rem;
  text-align: center;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.2s ease, background 0.18s ease;
  position: relative;
  overflow: hidden;
}
.landing-icon-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.00) 100%);
  pointer-events: none;
}
.landing-icon-card.lp-visible { opacity: 1; transform: scale(1); }
.landing-icon-card:hover {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 32px rgba(44, 22, 6, 0.12), inset 0 1.5px 0 rgba(255,255,255,0.98);
  border-color: rgba(107, 56, 18, 0.52);
  transform: scale(1.05);
}
.landing-icon-card span {
  font-size: 0.88rem;
  font-family: 'Times New Roman', Times, serif;
  font-style: normal;
  color: var(--color-text-secondary);
  line-height: 1.3;
  font-weight: 600;
}

/* ── AUDIENCE / PURPOSE GRID ─────────────────────────────────────────────── */
.landing-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.landing-audience-card {
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1.5px solid rgba(107, 56, 18, 0.28);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.2s ease;
  box-shadow:
    0 8px 32px rgba(44, 22, 6, 0.10),
    0 2px 8px rgba(44, 22, 6, 0.05),
    inset 0 1.5px 0 rgba(255,255,255,0.96);
}
.landing-audience-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.60) 0%, rgba(255,255,255,0.00) 100%);
  pointer-events: none;
}
.landing-audience-card.lp-visible { opacity: 1; transform: translateY(0); }
.landing-audience-card:hover {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 40px rgba(44, 22, 6, 0.14), inset 0 1.5px 0 rgba(255,255,255,0.98);
  border-color: rgba(107, 56, 18, 0.52);
  transform: translateY(-2px);
}
.landing-audience-icon {
  margin-bottom: 10px;
  color: var(--color-accent);
}
.landing-audience-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}
.landing-audience-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.landing-audience-card ul li {
  padding-left: 14px;
  position: relative;
  font-style: normal;
  color: var(--color-text-secondary);
  line-height: 1.6;
}
.landing-audience-card ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.56em;
  width: 4px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 50%;
  opacity: 0.65;
}
.landing-audience-card h3 {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 700;
  font-style: normal;
  color: var(--color-accent);
  margin-bottom: 10px;
}
.landing-audience-card p {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(0.95rem, 2.8vw, 1.18rem);
  font-style: normal;
  line-height: 1.75;
  color: var(--color-text-secondary);
}

/* ── USP COMPARISON GRID ─────────────────────────────────────────────────── */
.landing-usp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.landing-usp-card {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1.5px solid rgba(107, 56, 18, 0.26);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.2s ease, background 0.18s ease;
  box-shadow:
    0 8px 32px rgba(44, 22, 6, 0.09),
    0 2px 8px rgba(44, 22, 6, 0.05),
    inset 0 1.5px 0 rgba(255,255,255,0.96);
}
.landing-usp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.58) 0%, rgba(255,255,255,0.00) 100%);
  pointer-events: none;
}
.landing-usp-card.lp-visible { opacity: 1; transform: translateY(0); }
.landing-usp-card:hover {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 40px rgba(44, 22, 6, 0.13), inset 0 1.5px 0 rgba(255,255,255,0.98);
  border-color: rgba(107, 56, 18, 0.48);
  transform: translateY(-2px);
}
.landing-usp-vs {
  display: inline-block;
  font-size: clamp(0.75rem, 1.8vw, 0.88rem);
  font-family: var(--font-ui);
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-accent-dark);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 0.5px solid rgba(255, 255, 255, 0.80);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  margin-bottom: 10px;
}
.landing-usp-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.landing-usp-card h3 {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.05rem, 3.2vw, 1.38rem);
  font-weight: 700;
  font-style: normal;
  color: var(--color-text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}
.landing-usp-card p {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(0.92rem, 2.6vw, 1.15rem);
  font-style: normal;
  line-height: 1.75;
  color: var(--color-text-secondary);
}

/* ── PEARL HARBOR PREVIEW BANNER ─────────────────────────────────────────── */
.landing-preview-banner {
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 0.5px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-xl);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.05),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.96);
  overflow: hidden;
  position: relative;
}
/* No texture on preview banner — clean glass look */

.landing-preview-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 20px;
}
.lpb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-highlight);
  flex-shrink: 0;
  animation: loader-fade 0.8s ease 0s both alternate infinite;
}

.landing-preview-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--color-border-light);
}
.landing-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.lp-pill {
  font-size: 0.76rem;
  font-family: var(--font-ui);
  font-style: normal;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 3px 12px;
}
.lp-pill-accent {
  color: var(--color-accent);
  background: var(--color-accent-light);
  border-color: var(--color-accent);
}
.landing-preview-title {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(0.95rem, 2vw, 1.28rem);
  font-weight: 700;
  font-style: normal;
  color: var(--color-text-primary);
  margin-bottom: 4px;
  line-height: 1.2;
}
.landing-preview-subtitle {
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: normal;
  margin-bottom: 0;
}

.landing-preview-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
}

/* Article text side */
.landing-preview-text {
  padding: 18px 22px;
  border-right: 1px solid var(--color-border-light);
}
.landing-preview-section-label {
  font-size: 0.72rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}
.landing-preview-article {
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.88rem;
  font-style: normal;
  line-height: 1.72;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}
.landing-preview-article p { margin-bottom: 12px; }
.landing-preview-article strong { color: var(--color-accent); font-weight: 600; }
.landing-preview-article em { font-style: normal; color: var(--color-text-secondary); }

.landing-preview-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lpf-chip {
  font-size: 0.78rem;
  font-family: var(--font-ui);
  font-style: normal;
  font-weight: 500;
  color: var(--color-accent);
  background: var(--color-accent-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
}

/* Images side */
.landing-preview-images {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Skeleton loading */
.landing-preview-img-skeleton {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lp-skeleton-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
}
.lp-skeleton-img {
  height: 130px;
  background: linear-gradient(90deg,
    var(--color-border-light) 25%,
    var(--color-bg) 50%,
    var(--color-border-light) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}
.lp-skeleton-cap {
  height: 14px;
  margin: 10px 12px;
  border-radius: var(--radius-xs);
  background: linear-gradient(90deg,
    var(--color-border-light) 25%,
    var(--color-bg) 50%,
    var(--color-border-light) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Real images */
.landing-preview-real-imgs {
  flex-direction: column;
  gap: 14px;
}
.lp-img-card {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  background: var(--color-bg);
}
.lp-img-card img {
  width: 100%;
  height: 135px;
  object-fit: cover;
  display: block;
}
.lp-img-card figcaption {
  font-size: 0.72rem;
  font-style: normal;
  color: var(--color-text-muted);
  padding: 8px 12px;
  line-height: 1.4;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-light);
}

/* Preview footer */
.landing-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 28px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-light);
}
.lpf-source {
  font-size: 0.76rem;
  font-style: normal;
  color: var(--color-text-muted);
}
.lpf-try-btn { font-size: 0.88rem; }
.lpf-try-text {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.05rem;
  font-style: normal;
  color: var(--color-accent);
  margin: 0;
}
.lpf-try-text strong { font-style: normal; }

/* ── FINAL CTA SECTION ───────────────────────────────────────────────────── */
.landing-cta {
  padding: 64px 28px 72px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201,146,42,0.10) 0%, transparent 55%),
    var(--color-bg);
}
.landing-cta-inner {
  max-width: 520px;
  margin: 0 auto;
}
.landing-cta-title {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  font-style: normal;
  color: var(--color-text-primary);
  margin-bottom: 12px;
  line-height: 1.2;
}
.landing-cta-sub {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.1rem;
  font-style: normal;
  color: var(--color-text-secondary);
  line-height: 1.78;
  margin-bottom: 28px;
}
.landing-cta-sub strong {
  color: var(--color-accent);
  font-weight: 700;
  font-style: normal;
}

/* ── LANDING FOOTER ──────────────────────────────────────────────────────── */
.landing-footer {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  padding: 26px 28px;
}
.landing-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}
.landing-footer-logo {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.1rem;
  font-weight: 700;
  font-style: normal;
  color: var(--color-accent);
  display: block;
  margin-bottom: 6px;
}
.landing-footer-logo span { color: var(--color-gold); }
.landing-footer-inner > p {
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.76rem;
  font-style: normal;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}
.landing-footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 14px;
}
.landing-footer-links a {
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.76rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-style: normal;
  transition: color var(--transition);
}
.landing-footer-links a:hover { color: var(--color-accent); }
.landing-footer-copy {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: normal;
}

/* ═══════════════════════════════════════════════════════════
   LANDING PAGE — RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

/* Tablet — ≤ 900px */
@media (max-width: 900px) {
  .landing-about-grid    { grid-template-columns: 1fr; gap: 32px; }
  .landing-about-visual  { justify-content: flex-start; }
  .landing-about-icon-grid { max-width: 100%; }
  .landing-audience-grid { grid-template-columns: 1fr; gap: 16px; }
  .landing-usp-grid      { grid-template-columns: 1fr 1fr; gap: 16px; }
  .landing-preview-body  { grid-template-columns: 1fr; }
  .landing-preview-text  { border-right: none; border-bottom: 1px solid var(--color-border-light); }
  .landing-preview-images { flex-direction: row; flex-wrap: wrap; }
  .lp-img-card           { flex: 1 1 45%; }
  .landing-stat          { padding: 10px 24px; }
  .landing-stat-divider  { display: none; }
}

/* Mobile — ≤ 640px */
@media (max-width: 640px) {
  /* min-height and padding handled by the mobile chip block below (88vh) */
  .landing-hero-logo     { font-size: clamp(1.9rem, 9vw, 2.6rem); }
  .landing-hero-btns     { flex-direction: column; align-items: stretch; }
  .landing-hero-btns .btn { width: 100%; }
  .landing-section       { padding: 56px 16px; }
  .landing-usp-grid      { grid-template-columns: 1fr; }
  .landing-stats-inner   { gap: 0; flex-wrap: wrap; justify-content: space-around; }
  .landing-stat          { flex: 0 0 45%; padding: 14px 8px; }
  .landing-preview-banner { border-radius: var(--radius-lg); }
  .landing-preview-header,
  .landing-preview-text,
  .landing-preview-footer { padding: 16px; }
  .landing-preview-images { padding: 16px; }
  .lp-img-card           { flex: 1 1 100%; }
  .landing-nav-inner     { padding: 0 16px; }

  /* Landing nav CTA — shrink on mobile but keep it readable */
  .landing-nav-cta {
    min-width: unset;
    padding: 9px 16px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .landing-cta           { padding: 60px 16px 72px; }
  /* Final CTA button — full width on mobile */
  .landing-btn-primary   { width: 100%; text-align: center; justify-content: center; }

  .landing-about-icon-grid { grid-template-columns: repeat(2, 1fr); }
  .landing-footer-links  { flex-wrap: wrap; gap: 14px; }

  /* Preview action buttons — scroll horizontally on very small screens */
  .landing-preview-actions { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; padding-bottom: 4px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LANDING PAGE EXTRAS — icon-card SVGs, action preview buttons
   ═══════════════════════════════════════════════════════════════════════════ */

/* Icon card SVG size — large enough to visually match the adjacent text */
.landing-icon-card svg {
  width: 52px;
  height: 52px;
  color: var(--color-accent);
  stroke: var(--color-accent);
}

/* Audience card list */
.landing-audience-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.landing-audience-card ul li {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(0.88rem, 2.5vw, 1.08rem);
  font-style: normal;
  color: var(--color-text-secondary);
  line-height: 1.65;
  padding-left: 18px;
  position: relative;
}
.landing-audience-card ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-size: clamp(0.8rem, 2.2vw, 1rem);
  font-style: normal;
}

/* Audience icon size */
.landing-audience-icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-accent);
  display: block;
}

/* Hero single CTA */
.landing-hero-single-cta {
  font-size: 1.1rem;
  padding: 16px 44px;
  box-shadow:
    0 6px 28px rgba(0, 0, 0, 0.10),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.95);
  margin-bottom: 14px;
}

/* Landing preview action buttons row */
.landing-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.lpa-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(107, 56, 18, 0.38);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 500;
  font-style: normal;
  color: var(--color-text-secondary);
  cursor: default;
  user-select: none;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 2px 10px rgba(44,22,6,0.05),
    inset 0 1.5px 0 rgba(255,255,255,0.95);
}
.lpa-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.70) 0%, rgba(255,255,255,0.00) 100%);
  pointer-events: none;
}
.lpa-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--color-accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.login-page {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(201,146,42,0.13) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(107,56,18,0.08) 0%, transparent 50%),
    var(--color-bg);
}

.login-card {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(48px) saturate(200%);
  -webkit-backdrop-filter: blur(48px) saturate(200%);
  border: 1.5px solid rgba(107,56,18,0.20);
  border-radius: 28px;
  box-shadow:
    0 32px 80px rgba(44,22,6,0.14),
    0 8px 24px rgba(44,22,6,0.06),
    inset 0 2px 0 rgba(255,255,255,0.95),
    inset 0 -1px 0 rgba(107,56,18,0.06);
  padding: 52px 44px 44px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: login-card-rise 0.55s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes login-card-rise {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-ornament {
  font-size: 1.2rem;
  letter-spacing: 8px;
  color: var(--color-gold);
  opacity: 0.7;
  margin-bottom: 16px;
}

.login-title {
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 700;
  font-style: normal;
  color: var(--color-accent);
  margin-bottom: 8px;
  line-height: 1.1;
}
.login-title span { color: var(--color-gold); }

.login-tagline {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}

.login-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 0 0 24px;
}

.login-sub {
  font-size: 0.88rem;
  font-style: normal;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}

.login-btns {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  font-style: normal;
  text-decoration: none;
  transition: box-shadow var(--transition), background var(--transition),
              transform 80ms ease;
  position: relative;
}
.login-btn:hover { transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); }

.login-btn-google {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  color: var(--color-text-primary);
  border: 1.5px solid rgba(107, 56, 18, 0.45);
  box-shadow: 0 2px 12px rgba(44,22,6,0.07), inset 0 1.5px 0 rgba(255,255,255,0.95);
  margin-bottom: 0;
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}
.login-btn-google::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0.00) 100%);
  pointer-events: none;
}
.login-btn-google:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(107, 56, 18, 0.72);
  box-shadow: 0 4px 18px rgba(44,22,6,0.09), inset 0 1.5px 0 rgba(255,255,255,0.98);
}
.login-btn-google svg { width: 20px; height: 20px; flex-shrink: 0; }

.login-btn-separator {
  height: 10px;
}

.login-btn-guest {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  color: var(--color-accent);
  font-weight: 700;
  border: 1.5px solid rgba(107, 56, 18, 0.48);
  box-shadow:
    0 4px 20px rgba(44, 22, 6, 0.08),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.97),
    inset 0 -0.5px 0 rgba(44, 22, 6, 0.04);
  border-radius: var(--radius-full);
  flex-direction: column;
  gap: 3px;
  padding: 14px 20px;
  position: relative;
  overflow: hidden;
}
.login-btn-guest::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.80) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.login-btn-guest:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(107, 56, 18, 0.78);
  box-shadow: 0 8px 32px rgba(44, 22, 6, 0.10), inset 0 1.5px 0 rgba(255, 255, 255, 0.99);
}
.login-btn-guest svg { width: 20px; height: 20px; flex-shrink: 0; position: absolute; left: 18px; z-index: 1; }

.login-guest-note {
  font-size: 0.72rem;
  opacity: 0.7;
  font-weight: 400;
  color: var(--color-text-muted);
}

.login-note {
  font-size: 0.78rem;
  font-style: normal;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Mic recording state */
.topic-mic-btn.mic-recording {
  color: var(--color-error);
  border-color: var(--color-error);
}
.topic-mic-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ── Landing Page: Floating Hero Chips ───────────────────────────────────── */
.landing-hero { overflow: hidden; }

.landing-hero-chips {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.lhc {
  position: absolute;
  padding: 7px 16px;
  border-radius: 100px;
  background: rgba(255,255,255,0.52);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1.5px solid rgba(107,56,18,0.22);
  font-size: 0.75rem;
  font-style: normal;
  white-space: nowrap;
  opacity: 0.82;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.8);
}

@keyframes lhc-a {
  0%,100% { transform: translateY(0) translateX(0); }
  40%     { transform: translateY(-18px) translateX(10px); }
  70%     { transform: translateY(10px) translateX(-8px); }
}
@keyframes lhc-b {
  0%,100% { transform: translateY(0) translateX(0); }
  33%     { transform: translateY(14px) translateX(-12px); }
  66%     { transform: translateY(-10px) translateX(6px); }
}
@keyframes lhc-c {
  0%,100% { transform: translateY(0) translateX(0); }
  50%     { transform: translateY(-22px) translateX(4px); }
}

.lhc-1  { top: 12%; left: 4%;   animation: lhc-a 8s ease-in-out infinite; }
.lhc-2  { top: 22%; right: 5%;  animation: lhc-b 9s ease-in-out infinite;   animation-delay: -2s; }
.lhc-3  { top: 58%; left: 2%;   animation: lhc-c 7s ease-in-out infinite;   animation-delay: -1s; }
.lhc-4  { top: 72%; right: 4%;  animation: lhc-a 10s ease-in-out infinite;  animation-delay: -3s; }
.lhc-5  { top: 8%;  right: 18%; animation: lhc-b 8.5s ease-in-out infinite; animation-delay: -4s; }
.lhc-6  { top: 82%; left: 8%;   animation: lhc-c 9.5s ease-in-out infinite; animation-delay: -1.5s; }
.lhc-7  { top: 42%; left: 1%;   animation: lhc-a 11s ease-in-out infinite;  animation-delay: -2.5s; }
.lhc-8  { top: 90%; right: 10%; animation: lhc-b 7.5s ease-in-out infinite; animation-delay: -0.5s; }
.lhc-9  { top: 34%; right: 2%;  animation: lhc-c 10s ease-in-out infinite;  animation-delay: -3.5s; }
.lhc-10 { top: 66%; left: 22%;  animation: lhc-a 8s ease-in-out infinite;   animation-delay: -5s; }

html.reduced-motion .lhc { animation: none; }

/* ── Curious Boy Illustration ─────────────────────────────────────────────── */
.landing-curious-illus {
  display: flex;
  justify-content: center;
  padding: 0 16px 0;
  /* slight negative margin pulls it snug against the hero */
  margin-top: -12px;
}
@keyframes illus-fade-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes illus-float {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-10px); }
}
.curious-hero-img {
  width: 100%;
  max-width: 500px;
  height: auto;
  display: block;
  /* multiply: white in the PNG becomes fully transparent → image sits on page bg */
  mix-blend-mode: multiply;
  /* radial vignette mask: subjects stay sharp, edges dissolve into page bg */
  -webkit-mask-image: radial-gradient(
    ellipse 88% 84% at 50% 48%,
    black 30%,
    rgba(0,0,0,0.92) 52%,
    rgba(0,0,0,0.45) 70%,
    transparent 88%
  );
  mask-image: radial-gradient(
    ellipse 88% 84% at 50% 48%,
    black 30%,
    rgba(0,0,0,0.92) 52%,
    rgba(0,0,0,0.45) 70%,
    transparent 88%
  );
  /* fade-in + float */
  animation: illus-fade-in 0.9s ease-out both,
             illus-float    5s ease-in-out infinite 0.9s;
}
@media (prefers-reduced-motion: reduce) {
  .curious-hero-img { animation: illus-fade-in 0.9s ease-out both; }
}
@media (max-width: 640px) {
  .curious-hero-img { max-width: 340px; }
  .landing-curious-illus { margin-top: -6px; }
}

/* ── Mobile portrait: show chips repositioned to top + bottom safe zones ── */
@media (max-width: 640px) {
  /* Show chips on mobile — never hide them */
  .landing-hero-chips { display: block; }

  /* Hero taller on mobile to give chips room at top and bottom */
  .landing-hero { min-height: 88vh; padding: 44px 16px 44px; }

  /* Shrink chips for narrow screens */
  .lhc {
    font-size: 0.67rem;
    padding: 5px 11px;
    opacity: 0.78;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.80);
  }

  /* ── TOP ZONE (above hero text, ~0–18% height) ──────────────────────── */
  /* 3 Indian chips across the top */
  .lhc-1 { top: 4%;  left: 4%;   right: auto; animation: lhc-a 8s ease-in-out infinite; }
  .lhc-3 { top: 4%;  right: 4%;  left: auto;  animation: lhc-b 8.5s ease-in-out infinite; animation-delay: -4s; }
  .lhc-5 { top: 13%; left: 50%;  transform: translateX(-50%); animation: lhc-c 9s ease-in-out infinite; animation-delay: -2s; }

  /* ── BOTTOM ZONE (below hero CTA, ~78–95% height) ───────────────────── */
  /* 3 World chips across the bottom */
  .lhc-2 { top: auto; bottom: 14%; left: 4%;   right: auto; animation: lhc-b 9s ease-in-out infinite; animation-delay: -2s; }
  .lhc-4 { top: auto; bottom: 14%; right: 4%;  left: auto;  animation: lhc-a 10s ease-in-out infinite; animation-delay: -3s; }
  .lhc-6 { top: auto; bottom: 5%;  left: 50%;  transform: translateX(-50%); animation: lhc-c 9.5s ease-in-out infinite; animation-delay: -1.5s; }

  /* Hide remaining chips — the 6 above give the 3+3 Indian+World balance */
  .lhc-7, .lhc-8, .lhc-9, .lhc-10 { display: none; }
}

/* ── Landing Page: How It Works Steps ───────────────────────────────────── */
.landing-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 44px;
}

.landing-step-item {
  padding: 40px 28px 32px;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.70);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1.5px solid rgba(107,56,18,0.18);
  border-top: 3px solid rgba(107,56,18,0.28);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), inset 0 1.5px 0 rgba(255,255,255,0.90);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.landing-steps-grid .landing-step-item:nth-child(1) { border-top-color: rgba(107,56,18,0.40); }
.landing-steps-grid .landing-step-item:nth-child(2) { border-top-color: rgba(160,100,10,0.55); }
.landing-steps-grid .landing-step-item:nth-child(3) { border-top-color: rgba(190,130,20,0.70); }

.landing-step-item.lp-visible {
  opacity: 1;
  transform: translateY(0);
}

.landing-step-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.09), inset 0 1.5px 0 rgba(255,255,255,0.95);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
}

.landing-step-num {
  font-size: 2.6rem;
  font-style: normal;
  line-height: 1;
  margin-bottom: 16px;
  color: var(--color-accent);
}

.landing-step-item h3 {
  margin: 12px 0 10px;
  font-size: 1.08rem;
  font-style: normal;
  font-weight: 700;
  color: var(--color-text-primary);
}

.landing-step-item p {
  font-size: 0.91rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin: 0;
}

.landing-step-icon {
  width: 36px;
  height: 36px;
  color: var(--color-accent);
  margin: 0 auto 4px;
  display: block;
}@media (max-width: 900px) {
  .landing-steps-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
}

/* ── Landing Page: Era Showcase Strip ───────────────────────────────────── */
.landing-era-strip {
  overflow: hidden;
  padding: 22px 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.landing-era-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: era-scroll 40s linear infinite;
}

@keyframes era-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.era-tag {
  white-space: nowrap;
  padding: 9px 20px;
  border-radius: 100px;
  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(107,56,18,0.20);
  font-size: 0.83rem;
  font-style: normal;
  color: var(--color-text-secondary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.75);
}html.reduced-motion .landing-era-track {
  animation: none;
  flex-wrap: wrap;
  width: auto;
  padding: 0 20px;
}

/* ════════════════════════════════════════════════════════════════════════════
   MOBILE OPTIMIZATIONS — All new elements (year chips + landing page)
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Year Page: Suggestion Chips — reserve more height on narrow screens ── */
@media (max-width: 640px) {
  /* On narrow screens chips wrap more rows — reserve ample space to avoid
     any layout shift as the year slider moves */
  #suggestion-chips-wrap { min-height: 220px; }
  .era-quick-btns        { margin: 10px 0 0; gap: 7px; }
}

@media (max-width: 400px) {
  #suggestion-chips-wrap { min-height: 200px; }
}

/* ── Landing Page: How It Works Steps ─────────────────────────────────────  */
@media (max-width: 640px) {
  .landing-steps-grid  { gap: 12px; margin-top: 20px; }
  .landing-step-item   { padding: 28px 20px 24px; }
  .landing-step-num    { font-size: 2.1rem; margin-bottom: 10px; }
  .landing-step-icon   { width: 28px; height: 28px; }
  .landing-step-item h3 { font-size: 1rem; }
  .landing-step-item p  { font-size: 0.87rem; }
}

/* Disable hover lift on touch devices — avoids stuck hover state */
@media (hover: none) {
  .landing-step-item:hover {
    transform: translateY(0);
    box-shadow: 0 4px 24px rgba(0,0,0,0.06), inset 0 1.5px 0 rgba(255,255,255,0.90);
    transition: none;
  }
}

/* ── Landing Page: Era Showcase Strip ─────────────────────────────────────  */
@media (max-width: 640px) {
  .landing-era-strip   { padding: 14px 0; }
  .era-tag             { font-size: 0.74rem; padding: 7px 14px; }
  .landing-era-track   { gap: 10px; animation-duration: 30s; }
}

@media (max-width: 400px) {
  .era-tag { font-size: 0.70rem; padding: 6px 12px; }
}

/* ── Landing Page: Hero — tighten CTA spacing on mobile ───────────────────  */
@media (max-width: 640px) {
  .landing-hero-sub { font-size: clamp(0.92rem, 3.8vw, 1.08rem); }
  /* Hero CTA button — full-width and slightly smaller on mobile */
  .landing-hero .landing-btn-primary {
    width: 100%;
    text-align: center;
    justify-content: center;
    margin-top: 20px !important;
    font-size: 0.96rem;
  }
}

/* ══ Feedback Bubble + Modal — iOS 26 Liquid Glass ══════════════════════════ */

.fb-bubble {
  position: fixed;
  bottom: 32px;
  right: 28px;
  z-index: 9500;
  opacity: 0;
  transform: translateY(24px) scale(0.88);
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fb-bubble--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.fb-bubble-inner {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 20px 16px 16px;
  border-radius: 26px;
  max-width: 300px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1.5px solid rgba(107, 56, 18, 0.30);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.10),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(107, 56, 18, 0.10);
  cursor: pointer;
}
.fb-bubble-inner:hover {
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.22),
    0 6px 16px rgba(0, 0, 0, 0.12),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(107, 56, 18, 0.10);
  transform: scale(1.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}.fb-agent-icon { width: 42px; height: 42px; flex-shrink: 0; }
.fb-bubble-text-wrap { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.fb-bubble-name {
  font-size: 0.80rem;
  font-weight: 800;
  font-style: normal;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fb-bubble-label {
  font-size: 0.80rem;
  font-style: normal;
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.4;
}
.fb-bubble-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0 4px 6px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
  line-height: 1;
}
.fb-bubble-close:hover { color: var(--color-text-primary); }

/* Modal overlay — MUST be display:none by default so it doesn't block clicks */
.fb-modal {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: none;        /* hidden by default — does NOT block pointer events */
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
/* Only show when explicitly opened */
.fb-modal.fb-modal--open {
  display: flex;
  opacity: 1;
}
.fb-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.fb-modal-card {
  position: relative;
  z-index: 1;
  width: min(500px, 92vw);
  padding: 36px 32px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(60px) saturate(220%);
  -webkit-backdrop-filter: blur(60px) saturate(220%);
  border: 1.5px solid rgba(107, 56, 18, 0.22);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.22),
    inset 0 2px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(107, 56, 18, 0.08);
  transform: scale(0.88) translateY(28px);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fb-modal--open .fb-modal-card {
  transform: scale(1) translateY(0);
}/* Modal header */
.fb-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}
.fb-modal-agent { width: 52px; height: 52px; flex-shrink: 0; }
.fb-modal-agent-name {
  font-size: 0.78rem;
  font-weight: 800;
  font-style: normal;
  color: var(--color-accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.fb-modal-title {
  font-family: var(--font-body);
  font-size: 0.96rem;
  font-style: normal;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.5;
}
.fb-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  color: var(--color-text-muted);
  padding: 2px;
  flex-shrink: 0;
  line-height: 1;
}
.fb-modal-close:hover { color: var(--color-text-primary); }

/* Textarea */
.fb-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  border: 1.5px solid rgba(107, 56, 18, 0.20);
  font-family: var(--font-body);
  font-size: 0.94rem;
  color: var(--color-text-primary);
  resize: vertical;
  min-height: 120px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04);
  outline: none;
  transition: border-color 0.18s;
}
.fb-textarea:focus { border-color: var(--color-accent); }.fb-char-count {
  font-size: 0.74rem;
  color: var(--color-text-muted);
  text-align: right;
  margin: 4px 2px 14px;
  font-style: normal;
}
.fb-send-btn {
  width: 100%;
  margin-top: 4px;
  font-size: 1rem;
  padding: 14px;
  border-radius: 14px;
  letter-spacing: 0.02em;
}

/* ── Thank-you celebration state ──────────────────────────────────────────── */
.fb-thanks {
  text-align: center;
  padding: 24px 8px 16px;
  position: relative;
  overflow: hidden;
  min-height: 200px;
}

/* Confetti dots */
.fb-confetti-dot {
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  top: 50%; left: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.fb-thanks--active .fb-confetti-dot {
  animation: fb-confetti-fly var(--fly-dur, 1.2s) cubic-bezier(0.22, 0.61, 0.36, 1) var(--fly-delay, 0s) forwards;
}
@keyframes fb-confetti-fly {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--fly-x, 0px)), calc(-50% + var(--fly-y, 0px))) scale(0.2) rotate(180deg); }
}

/* Check circle container */
.fb-thanks-check {
  width: 80px; height: 80px;
  margin: 0 auto 16px;
  transform: scale(0);
  opacity: 0;
}
.fb-thanks--active .fb-thanks-check {
  animation: fb-check-bounce 0.55s cubic-bezier(0.34,1.56,0.64,1) 0.08s both;
}
@keyframes fb-check-bounce {
  0%   { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Animated circle draw */
.fb-check-circle {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}
.fb-thanks--active .fb-check-circle {
  animation: fb-circle-draw 0.48s ease 0.08s forwards;
}
@keyframes fb-circle-draw {
  to { stroke-dashoffset: 0; }
}

/* Animated checkmark draw */
.fb-check-path {
  stroke-dasharray: 38;
  stroke-dashoffset: 38;
}
.fb-thanks--active .fb-check-path {
  animation: fb-check-draw 0.35s ease 0.48s forwards;
}
@keyframes fb-check-draw {
  to { stroke-dashoffset: 0; }
}

/* Title */
.fb-thanks-title {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 800;
  font-style: normal;
  color: var(--color-text-primary);
  margin: 0 0 8px;
  opacity: 0;
  transform: translateY(10px);
}
.fb-thanks--active .fb-thanks-title {
  animation: fb-text-rise 0.45s cubic-bezier(0.34,1.56,0.64,1) 0.58s both;
}

/* Subtitle */
.fb-thanks-sub {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
}
.fb-thanks--active .fb-thanks-sub {
  animation: fb-text-rise 0.45s cubic-bezier(0.34,1.56,0.64,1) 0.76s both;
}

@keyframes fb-text-rise {
  0%   { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

html.reduced-motion .fb-confetti-dot,
html.reduced-motion .fb-thanks-check,
html.reduced-motion .fb-check-circle,
html.reduced-motion .fb-check-path,
html.reduced-motion .fb-thanks-title,
html.reduced-motion .fb-thanks-sub { animation: none !important; opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; }

/* Mobile */
@media (max-width: 600px) {
  .fb-bubble { bottom: 20px; right: 16px; }
  .fb-bubble-inner { max-width: 270px; padding: 12px 14px 12px 12px; gap: 9px; }
  .fb-agent-icon  { width: 36px; height: 36px; }
  .fb-bubble-name { font-size: 0.74rem; }
  .fb-bubble-label { font-size: 0.74rem; }
  .fb-modal-card   { padding: 26px 20px; border-radius: 24px; }
  .fb-modal-agent  { width: 42px; height: 42px; }
}

html.reduced-motion .fb-bubble,
html.reduced-motion .fb-modal,
html.reduced-motion .fb-modal-card { transition: none !important; }

/* ── Free Limit Popup ────────────────────────────────────────────────────── */
.limit-popup {
  position: fixed; inset: 0; z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.limit-popup--open { opacity: 1; pointer-events: auto; }
.limit-popup-backdrop {
  position: absolute; inset: 0;
  background: rgba(44,22,6,0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.limit-popup-card {
  position: relative; z-index: 1;
  width: min(420px, 90vw);
  padding: 40px 32px 32px;
  border-radius: 28px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(60px) saturate(220%);
  -webkit-backdrop-filter: blur(60px) saturate(220%);
  border: 1.5px solid rgba(107,56,18,0.22);
  box-shadow:
    0 40px 100px rgba(44,22,6,0.22),
    0 8px 24px rgba(44,22,6,0.10),
    inset 0 2px 0 rgba(255,255,255,0.98),
    inset 0 -1px 0 rgba(107,56,18,0.06);
  text-align: center;
  transform: scale(0.88) translateY(28px);
  transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1);
}
.limit-popup--open .limit-popup-card {
  transform: scale(1) translateY(0);
}
.limit-popup-icon-wrap {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.limit-popup-icon {
  width: 64px; height: 64px;
  animation: lp-pulse 2.2s ease-in-out infinite;
  filter: drop-shadow(0 6px 18px rgba(192,120,48,0.35));
}
@keyframes lp-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 6px 18px rgba(192,120,48,0.35)); }
  50%       { transform: scale(1.06); filter: drop-shadow(0 8px 24px rgba(192,120,48,0.55)); }
}
.limit-popup-title {
  font-family: var(--font-body);
  font-size: 1.45rem;
  font-weight: 800;
  color: #1A0802;
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.limit-popup-sub {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  margin: 0 0 20px;
  line-height: 1.5;
}
.limit-popup-countdown-wrap {
  display: inline-block;
  padding: 12px 28px;
  margin-bottom: 24px;
  border-radius: 14px;
  background: rgba(107,56,18,0.06);
  border: 1px solid rgba(107,56,18,0.12);
}
.limit-popup-countdown-label {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.limit-popup-countdown {
  font-family: var(--font-ui);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0;
  letter-spacing: 0.04em;
}
.limit-popup-btns {
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.limit-popup-cta { width: 100%; justify-content: center; font-weight: 700; }
.limit-popup-ok  { font-size: 0.88rem; color: var(--color-text-muted); }

/* ── Settings Feedback Section ───────────────────────────────────────────── */
.settings-fb-agent-wrap {
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(107,56,18,0.06);
  border: 1.5px solid rgba(107,56,18,0.14);
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(44,22,6,0.07), inset 0 1.5px 0 rgba(255,255,255,0.85);
}

@media (max-width: 480px) {
  .limit-popup-card { padding: 30px 20px 24px; }
  .limit-popup-title { font-size: 1.2rem; }
  .limit-popup-countdown { font-size: 1.4rem; }
}
html.reduced-motion .limit-popup-card,
html.reduced-motion .limit-popup-icon { transition: none !important; animation: none !important; }
