/* ---------------------------------------------------------------
   Design tokens. Change a colour here and it changes everywhere.
   Dark mode follows the reader's system setting.
   --------------------------------------------------------------- */
:root {
  --bg: #fdfcfa;
  --surface: #ffffff;
  --ink: #1a1a18;
  --ink-soft: #55534d;
  --ink-muted: #86837a;
  --accent: #1f6f5c;         /* deep green */
  --accent-soft: #e6f1ee;
  --line: #e4e1d9;
  --code-bg: #f4f2ed;
  --max: 44rem;              /* comfortable reading measure */
  --wide: 64rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14150f;
    --surface: #1c1d17;
    --ink: #f2f0e9;
    --ink-soft: #c5c2b6;
    --ink-muted: #8f8c81;
    --accent: #6bbfa4;
    --accent-soft: #1e2b26;
    --line: #2e2f27;
    --code-bg: #22231c;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* --------------------------- header / footer --------------------------- */

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; padding-top: 1rem; padding-bottom: 1rem;
}
.brand { font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem; padding: 2rem 0;
  color: var(--ink-muted); font-size: .9rem;
}

/* ------------------------------ layout ------------------------------- */

.page-section { padding: 3rem 0; }
.measure { max-width: var(--max); }

h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 .5rem; }
h2 { font-size: 1.6rem; margin: 2.5rem 0 .75rem; }
h3 { font-size: 1.25rem; margin: 2rem 0 .5rem; }

.lede { font-size: 1.2rem; color: var(--ink-soft); margin-top: 0; }
.meta { color: var(--ink-muted); font-size: .9rem; }

/* hero */
.hero { padding: 4rem 0 2.5rem; border-bottom: 1px solid var(--line); }
.hero h1 { margin-bottom: .75rem; }
.hero-image { margin-top: 2rem; border-radius: 12px; }

/* ------------------------------- cards -------------------------------- */

.card-grid {
  display: grid; gap: 1.25rem; margin: 1.5rem 0 0;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 1.25rem; display: block;
  text-decoration: none; color: inherit;
}
.card:hover { border-color: var(--accent); }
.card h3 { margin: 0 0 .35rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* post list */
.post-list { list-style: none; padding: 0; margin: 2rem 0 0; }
.post-list li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.post-list h2 { margin: 0 0 .25rem; font-size: 1.3rem; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); }

/* tags & badges */
.tags { display: flex; gap: .5rem; flex-wrap: wrap; margin: .75rem 0 0; padding: 0; list-style: none; }
.tag {
  font-size: .8rem; padding: .15rem .6rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); text-decoration: none;
}
.badge {
  display: inline-block; font-size: .75rem; text-transform: uppercase;
  letter-spacing: .05em; padding: .15rem .55rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-muted);
}
.badge-live { border-color: var(--accent); color: var(--accent); }

/* pagination */
.pagination { display: flex; gap: 1rem; align-items: center; margin: 2rem 0 0; }

/* ---------------------------- content blocks --------------------------- */

.block { margin: 1.75rem 0; }
.block-heading { margin: 2.5rem 0 .5rem; }

figure { margin: 2rem 0; }
figcaption { color: var(--ink-muted); font-size: .9rem; margin-top: .5rem; }

blockquote.quote {
  margin: 2rem 0; padding: .25rem 0 .25rem 1.25rem;
  border-left: 3px solid var(--accent); font-size: 1.15rem; color: var(--ink-soft);
}
blockquote.quote cite { display: block; margin-top: .5rem; font-size: .9rem; color: var(--ink-muted); }

.scripture {
  margin: 2rem 0; padding: 1.25rem 1.5rem;
  background: var(--accent-soft); border-radius: 10px;
}
.scripture .passage { margin: 0; font-size: 1.1rem; }
.scripture .ref { display: block; margin-top: .75rem; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .05em; color: var(--accent); font-weight: 600; }

.callout {
  margin: 2rem 0; padding: 1rem 1.25rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
}
.callout-label { font-weight: 700; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .05em; display: block; margin-bottom: .25rem; }
.callout-note { border-left: 3px solid var(--accent); }
.callout-tip { border-left: 3px solid #0ca30c; }
.callout-warning { border-left: 3px solid #d9822b; }

/* Tables scroll inside their own box so the page body never scrolls sideways */
.table-wrap { overflow-x: auto; margin: 2rem 0; }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.table-wrap caption { text-align: left; color: var(--ink-muted); font-size: .9rem; padding-bottom: .5rem; }
.table-wrap th, .table-wrap td {
  text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table-wrap thead th {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-muted); border-bottom: 2px solid var(--line); white-space: nowrap;
}
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap code { white-space: nowrap; }

pre.code {
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem; overflow-x: auto; font-size: .875rem; line-height: 1.5;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; }

.responsive-embed { position: relative; padding-bottom: 56.25%; height: 0; margin: 2rem 0; }
.responsive-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }

/* rich text */
.rich-text ul, .rich-text ol { padding-left: 1.25rem; }
.rich-text hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* search */
.search-form { display: flex; gap: .5rem; margin: 1.5rem 0; }
.search-form input[type="text"] {
  flex: 1; padding: .7rem .9rem; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.btn {
  padding: .7rem 1.1rem; font: inherit; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
}
