:root {
  --ink: #1a1a1a;
  --muted: #555;
  --soft: #7a7a7a;
  --line: #e5e2dc;
  --bg: #fdfbf6;
  --accent: #5c3b1e;
  --accent-hover: #3d2510;
  --quote-bg: #f5f1e8;
  --max-width: 720px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand:hover { color: var(--accent-hover); }
.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}
.nav { display: flex; gap: 18px; font-size: 0.95rem; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--accent); text-decoration: underline; }

/* Breadcrumbs */
.crumbs {
  font-size: 0.85rem;
  color: var(--soft);
  padding: 14px 0 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs span[aria-current] { color: var(--ink); }

/* Article */
article { padding: 10px 0 40px; }
article h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin: 18px 0 8px;
}
article .dek {
  color: var(--muted);
  font-style: italic;
  margin: 0 0 28px;
  font-size: 1.05rem;
}
article h2 {
  font-size: 1.35rem;
  margin: 36px 0 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
article h3 {
  font-size: 1.1rem;
  margin: 22px 0 6px;
}
article p { margin: 0 0 16px; }
article a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
article a:hover { color: var(--accent-hover); }
article ul, article ol { padding-left: 22px; margin: 0 0 16px; }
article li { margin-bottom: 6px; }

/* Scripture blockquote */
blockquote.verse {
  margin: 22px 0;
  padding: 16px 20px;
  background: var(--quote-bg);
  border-left: 3px solid var(--accent);
  font-style: italic;
  font-size: 1.05rem;
}
blockquote.verse cite {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: normal;
}

/* FAQ */
.faq details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  padding-right: 24px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-weight: 400;
  color: var(--soft);
}
.faq details[open] summary::after { content: "–"; }
.faq details > p { margin-top: 10px; }

/* Related + prev/next */
.related {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px 22px;
  margin-top: 40px;
}
.related h2 { border: 0; margin-top: 0; font-size: 1.1rem; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { margin: 8px 0; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
}
.pager a {
  color: var(--accent);
  text-decoration: none;
  max-width: 48%;
}
.pager a:hover { text-decoration: underline; }
.pager .label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--soft);
  margin-bottom: 2px;
}
.pager .next { text-align: right; margin-left: auto; }

/* Byline */
.byline {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.88rem;
  color: var(--soft);
  margin: 0 0 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.byline .sep { color: var(--line); }
.byline a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.byline a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.byline time { color: var(--soft); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.88rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer .wrap { flex-direction: column; align-items: stretch; gap: 14px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.footer-meta { margin: 0; color: var(--soft); font-size: 0.82rem; }
.footer-meta a { color: var(--muted); }

/* ===== Pillar + homepage components ===== */

/* Hero */
.hero {
  padding: 48px 0 36px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.hero--with-image { padding-top: 0; }
.hero-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2816 / 1536;
  max-height: 440px;
  object-fit: cover;
  object-position: center 60%;
  margin: 0 0 36px;
  background: var(--quote-bg);
}
@media (max-width: 540px) {
  .hero-image { max-height: 240px; margin-bottom: 24px; }
}
.hero h1 {
  font-size: 2.3rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.hero .lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.55;
  font-style: italic;
}
.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 13px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  min-height: 44px;
  line-height: 1.4;
  transition: background 0.15s;
}
.cta:hover, .cta:focus-visible { background: var(--accent-hover); color: #fff; }
.cta-secondary {
  display: inline-block;
  margin-top: 12px;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Section */
.section { padding: 40px 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section h2 {
  font-size: 1.45rem;
  margin: 0 0 6px;
  font-family: Georgia, serif;
}
.section .section-lead {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 0.98rem;
}

/* Tile grid (featured / topic entry) */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.tile {
  display: block;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  color: var(--ink);
  min-height: 80px;
  transition: border-color 0.15s, transform 0.15s;
}
.tile:hover, .tile:focus-visible {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.tile .day-label {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--soft);
  margin-bottom: 4px;
}
.tile .tile-title {
  display: block;
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--ink);
  font-weight: 600;
}

/* Theme cards */
.theme-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.theme {
  padding: 18px 20px;
  background: var(--quote-bg);
  border-radius: 4px;
}
.theme h3 {
  margin: 0 0 2px;
  font-size: 1.08rem;
  font-family: Georgia, serif;
}
.theme .count {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  color: var(--soft);
  margin-bottom: 10px;
}
.theme ul { list-style: none; padding: 0; margin: 0; }
.theme li { margin: 5px 0; }
.theme a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.5;
}
.theme a:hover { text-decoration: underline; }

/* Full day index (multi-column) */
.day-index {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 1;
  column-gap: 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.day-index li {
  break-inside: avoid;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.day-index a {
  display: flex;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  min-height: 32px;
  align-items: center;
}
.day-index a:hover { color: var(--accent); }
.day-index .num {
  flex-shrink: 0;
  width: 48px;
  color: var(--soft);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Language cards (root homepage) */
.lang-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 30px;
}
.lang-card {
  display: block;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s, transform 0.15s;
}
.lang-card:hover, .lang-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.lang-card .lang-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin-bottom: 6px;
  font-weight: 600;
}
.lang-card .lang-title { display: block; font-size: 1.3rem; margin-bottom: 6px; }
.lang-card .lang-desc {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Skip link (accessibility) */
.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  display: inline-block;
}

/* Responsive grid tiers */
@media (min-width: 640px) {
  .tile-grid   { grid-template-columns: repeat(2, 1fr); }
  .theme-grid  { grid-template-columns: repeat(2, 1fr); }
  .day-index   { columns: 2; }
  .lang-grid   { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .tile-grid   { grid-template-columns: repeat(3, 1fr); }
  .theme-grid  { grid-template-columns: repeat(3, 1fr); }
  .day-index   { columns: 3; }
  .hero h1     { font-size: 2.6rem; }
}

/* Small screens */
@media (max-width: 540px) {
  body { font-size: 17px; }
  article h1 { font-size: 1.6rem; }
  article h2 { font-size: 1.2rem; }
  .nav { gap: 14px; font-size: 0.9rem; }
  .hero { padding: 36px 0 28px; }
  .hero h1 { font-size: 1.85rem; }
  .cta { display: block; text-align: center; margin: 0 auto; }
  .cta-secondary { display: block; text-align: center; margin-top: 14px; }
  .site-header .wrap { padding: 12px 0; }
}

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  .tile, .lang-card, .cta { transition: none; }
  .tile:hover, .lang-card:hover { transform: none; }
}
