/* christian.css - 4christian.com's own pages and blocks (prefix cx-). Reads the engine's tokens with fallbacks.
   Sections may add their own stylesheet (page 'css' => ['bible.css']); shared parts live here. */

/* --cx-accent fills buttons and chips under white text: a deeper shade of the engine's teal (#1abc9c gives
   white text only 2.4:1; #117a65 gives 5.3:1). --cx-accent-ink is the accent used AS text (links, labels),
   readable on the page background in each mode. --cx-gold is for labels and verse numbers: 4.6:1 on cream. */
:root {
  --cx-accent: #117a65;
  --cx-accent-ink: #117a65;
  --cx-ink: var(--text, #1d1d1f);
  --cx-muted: var(--muted, #6b6b70);
  --cx-line: var(--border, #e2ded6);
  --cx-card: var(--card, #fff);
  --cx-soft: #f7f4ee;
  --cx-gold: #876628;
  --cx-radius: var(--radius, 10px);
  --cx-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}
html[data-fs-theme="dark"] {
  --cx-accent-ink: #4fd1b5;
  --cx-gold: #c9a45a;
  --cx-soft: #24221f;
  --cx-line: #3a3733;
  --cx-card: #1c1b19;
  --cx-ink: #ece8e1;
  --cx-muted: #a29d94;
}
/* Links inside the site's pages: the engine's a { color: #0d6efd } is 4.1-4.2:1 on the page grounds; one step
   deeper in light, a light blue in dark. :where() keeps this at the engine rule's weight, so any classed link
   (.cx-card, .cx-btn, a section's own) still sets its own colour. */
:root { --cx-link: #0a58ca; }
html[data-fs-theme="dark"] { --cx-link: #6ea8fe; }
:where(.cx-main, .cx-home) a { color: var(--cx-link); }

.cx-main { min-width: 0; width: 100%; max-width: 1080px; margin: 0 auto; padding: 12px 16px 48px; color: var(--cx-ink); }
.cx-main.cx-wide { max-width: 1320px; }
.cx-muted { color: var(--cx-muted); }

/* section bar */
.cx-sectionbar { border-bottom: 1px solid var(--cx-line); background: var(--cx-soft); }
.cx-sectionbar .container-lg { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 6px 12px; }
.cx-sectionbar .container-lg::-webkit-scrollbar { display: none; }
.cx-sectionbar a { white-space: nowrap; padding: 6px 10px; border-radius: 999px; text-decoration: none; color: var(--cx-ink); font-size: .92rem; }
.cx-sectionbar a:hover { background: var(--cx-card); }
.cx-sectionbar a.on { background: var(--cx-accent); color: #fff; }

/* breadcrumbs */
.cx-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 8px 0 12px; font-size: .85rem; color: var(--cx-muted); }
.cx-crumbs li + li::before { content: "›"; margin: 0 6px 0 2px; }
.cx-crumbs a { color: var(--cx-muted); }

/* headings and blocks */
.cx-head { margin: 4px 0 18px; }
.cx-head h1 { font-family: var(--cx-serif); font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin: 0 0 6px; line-height: 1.2; }
.cx-lede { font-size: 1.05rem; color: var(--cx-muted); max-width: 70ch; margin: 0; }
.cx-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cx-block { margin: 26px 0; }
.cx-block > h2 { font-family: var(--cx-serif); font-size: 1.35rem; margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--cx-line); }
.cx-block h3 { font-size: 1.05rem; margin: 14px 0 6px; }
.cx-more { margin: 10px 0 0; }
.cx-note { font-size: .88rem; color: var(--cx-muted); border-left: 3px solid var(--cx-line); padding: 4px 10px; margin: 14px 0; }
.cx-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--cx-line); background: var(--cx-card); color: var(--cx-ink); text-decoration: none; font-size: .92rem; cursor: pointer; }
.cx-btn:hover { border-color: var(--cx-accent); }
.cx-btn.primary { background: var(--cx-accent); border-color: var(--cx-accent); color: #fff; }

/* cards, chips, tables */
.cx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cx-card { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); background: var(--cx-card); color: var(--cx-ink); text-decoration: none; }
.cx-card:hover { border-color: var(--cx-accent); }
.cx-card b { font-size: 1rem; }
.cx-card small { color: var(--cx-muted); font-size: .8rem; }
.cx-card span { color: var(--cx-muted); font-size: .9rem; }
.cx-card-icon svg { width: 20px; height: 20px; fill: var(--cx-accent-ink); }
.cx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-chips a, .cx-chip { padding: 5px 11px; border: 1px solid var(--cx-line); border-radius: 999px; text-decoration: none; color: var(--cx-ink); font-size: .9rem; background: var(--cx-card); }
.cx-chips a:hover { border-color: var(--cx-accent); }
.cx-chips a.on { background: var(--cx-accent); color: #fff; border-color: var(--cx-accent); }
.cx-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.cx-table th, .cx-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--cx-line); vertical-align: top; }
.cx-table th { font-weight: 600; color: var(--cx-muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .02em; }
.cx-tablewrap { overflow-x: auto; }
.cx-cols { columns: 3 220px; column-gap: 24px; }
.cx-cols a { display: block; padding: 2px 0; break-inside: avoid; }
.cx-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.cx-dl dt { color: var(--cx-muted); font-weight: 500; }
.cx-dl dd { margin: 0; }

/* search box */
.cx-search { display: flex; flex-wrap: wrap; gap: 6px; max-width: 640px; margin: 8px 0 16px; }
.cx-search input[type=search] { flex: 1 1 190px; min-width: 0; width: 0; padding: 9px 14px; border: 1px solid var(--cx-line); border-radius: 999px; background: var(--cx-card); color: var(--cx-ink); font-size: 1rem; }
.cx-search button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; border: 0; background: var(--cx-accent); color: #fff; }
.cx-search button svg { width: 16px; height: 16px; fill: currentColor; }

/* pager */
.cx-pager { display: flex; justify-content: space-between; gap: 12px; margin: 24px 0; }
.cx-pager a { text-decoration: none; padding: 8px 14px; border: 1px solid var(--cx-line); border-radius: 999px; }

/* news list */
.cx-news { list-style: none; padding: 0; margin: 0; }
.cx-news li { padding: 8px 0; border-bottom: 1px solid var(--cx-line); }
.cx-news li a { font-weight: 500; }
.cx-news small { display: block; color: var(--cx-muted); font-size: .8rem; }

/* home page */
.cx-home { max-width: 1080px; margin: 6px auto 14px; padding: 0 12px; }
.cx-today { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-bottom: 12px; }
/* Wide screens: the five Today cells fit one row instead of leaving the last one alone on a second row. */
@media (min-width: 900px) { .cx-today { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }
.cx-today-cell { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--cx-radius); background: var(--cx-soft); border: 1px solid var(--cx-line); color: var(--cx-ink); text-decoration: none; }
.cx-today-cell small { text-transform: uppercase; letter-spacing: .04em; font-size: .7rem; color: var(--cx-gold); font-weight: 600; }
.cx-today-cell b { font-family: var(--cx-serif); font-size: 1rem; }
.cx-today-cell span { font-size: .86rem; color: var(--cx-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.cx-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); text-decoration: none; color: var(--cx-ink); background: var(--cx-card); }
.cx-tile:hover { border-color: var(--cx-accent); }
.cx-tile svg { width: 18px; height: 18px; fill: var(--cx-accent-ink); }
.cx-tile b { font-size: .95rem; }
.cx-tile span { font-size: .8rem; color: var(--cx-muted); }
.cx-mytrad-ask { font-size: .9rem; margin: 0 0 10px; }
.cx-topic-tool { margin: 10px 0 18px; padding: 14px 16px; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); background: var(--cx-soft); }

/* sources */
.cx-sources { padding-left: 18px; }
.cx-sources li { margin: 0 0 10px; }

/* forms */
.cx-form label { display: block; font-weight: 500; margin: 10px 0 4px; }
.cx-form input[type=text], .cx-form input[type=email], .cx-form input[type=url], .cx-form input[type=number], .cx-form select, .cx-form textarea { width: 100%; max-width: 560px; padding: 8px 10px; border: 1px solid var(--cx-line); border-radius: 8px; background: var(--cx-card); color: var(--cx-ink); }

@media print {
  #search-header, .cx-sectionbar, footer, .cx-actions, .cx-pager, .cx-search { display: none !important; }
  .cx-main { max-width: none; padding: 0; }
}

/* blog: the closing "Key verses" section (articles module, heading id key-verses) */
#key-verses { margin-top: 28px; padding: 14px 16px 2px; border-top: 3px solid var(--cx-gold); background: var(--cx-soft); border-radius: 0 0 var(--cx-radius) var(--cx-radius); font-family: var(--cx-serif); }
#key-verses + ul { background: var(--cx-soft); margin: 0; padding: 4px 16px 14px 34px; border-radius: 0 0 var(--cx-radius) var(--cx-radius); }

/* Shared site-kit and topic-page labels, darkened on this site only (visual QA 2026-11-26: teal and grey labels
   measured 2.4-3.9:1 against white). christian.css loads on every 4christian.com page through the head slot. */
.sk-eyebrow { color: var(--cx-accent-ink, #117a65); }
.ss-card-meta, .sk-updated, .ss-brief-n { color: #5b6270; }
html[data-fs-theme="dark"] .ss-card-meta, html[data-fs-theme="dark"] .sk-updated, html[data-fs-theme="dark"] .ss-brief-n { color: #aab1bd; }
html[data-fs-theme="dark"] .sk-more a, html[data-fs-theme="dark"] a.sk-more { color: var(--cx-link, #6ea8fe); }
