/* ── Variables ── */
:root {
  --navy:   #003366;
  --gold:   #C8A951;
  --gold-lt:#E8CB72;
  --bg:     #F9F6EF;
  --bg-card:#FFFFFF;
  --text:   #1A1A1A;
  --muted:  #555;
  --border: #D4C99A;
  --radius: 6px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 20px; scroll-behavior: smooth; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  background: var(--navy);
  color: #fff;
  padding: 1.5rem 1rem;
  text-align: center;
  border-bottom: 4px solid var(--gold);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}
.aa-symbol svg { display: block; flex-shrink: 0; }
.header-text h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--gold);
  line-height: 1.2;
}
.subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  margin-top: 0.3rem;
  font-style: italic;
  font-family: system-ui, sans-serif;
}

/* ── Date Navigation ── */
.date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--navy);
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--gold);
}
.nav-btn {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.03em;
}
.nav-btn:hover:not(:disabled) {
  background: var(--gold);
  color: var(--navy);
}
.nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.date-display {
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  min-width: 220px;
  text-align: center;
}

/* ── Meeting Info Strip ── */
.meeting-info {
  background: #EEE8D5;
  border-bottom: 2px solid var(--border);
  padding: 0.75rem 1rem;
}
.meeting-info-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.meeting-detail {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
}
.meeting-detail div {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}
.meeting-detail strong {
  color: var(--navy);
  font-weight: 700;
}
.meeting-detail span,
.meeting-detail a {
  color: var(--muted);
}
.meeting-detail a {
  text-decoration: none;
}
.meeting-detail a:hover { text-decoration: underline; color: var(--navy); }
.detail-icon { font-size: 1.1rem; flex-shrink: 0; }
.meeting-divider {
  width: 1px;
  height: 2rem;
  background: var(--border);
}
@media (max-width: 480px) {
  .meeting-divider { display: none; }
  .meeting-info-inner { gap: 0.75rem; }
}

/* ── Main / Grid ── */
main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1rem;
}
.readings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* ── Reading Cards ── */
.reading-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy);
  background: #F0EAD6;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: system-ui, sans-serif;
}
.card-body {
  padding: 1rem;
  font-size: 0.92rem;
  line-height: 1.75;
  flex: 1;
  overflow-wrap: break-word;
}
.card-body p { margin-bottom: 0.75rem; }
.card-body p:last-child { margin-bottom: 0; }
.card-body blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 0.75rem;
  margin: 0.75rem 0;
  color: var(--muted);
  font-style: italic;
}
.card-body strong, .card-body b { color: var(--navy); }
.card-body em { color: var(--muted); }

/* ── Loading Spinner ── */
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error ── */
.error-msg {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 1rem;
}

/* ── Footer ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 1.25rem 1rem;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  border-top: 3px solid var(--gold);
  line-height: 1.8;
}
footer a { color: var(--gold-lt); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-note { font-size: 0.78rem; opacity: 0.7; }

/* ── Responsive ── */
@media (max-width: 720px) {
  html { font-size: 22px; }
  .readings-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; gap: 0.75rem; }
  .date-display { min-width: 160px; }
  .nav-btn { padding: 0.35rem 0.75rem; }
}
@media (max-width: 480px) {
  html { font-size: 24px; }
  .date-nav { gap: 0.5rem; padding: 0.6rem 0.5rem; }
}
