/*
  Daily Biblical History — site styles
  ==================================================================
  APP NAME (provisional; trademark not cleared): Daily Biblical History
  To rename the app, change the visible text in every HTML file
  (search for "Daily Biblical History") and update this comment.
  This is the single documented place for the working name.
  ==================================================================
  No external fonts, CDNs, images, or trackers. System fonts only.
  Light: Slate Blue on #F7F8FA. Dark: Midnight & Gold via prefers-color-scheme.
*/

:root {
  color-scheme: light;
  --bg: #F7F8FA;
  --bg-card: #FFFFFF;
  --text: #1A2330;
  --muted: #636A78;
  --accent: #2F5D8A;
  --accent-hover: #244A6E;
  --rule: #D5DAE2;
  --placeholder-bg: #F3E2A8;
  --placeholder-text: #1A2330;
  --draft-bg: #F4EFE4;
  --draft-text: #1A2330;
  --draft-rule: #C4B89A;
  --focus: #2F5D8A;
  --header-bg: #FFFFFF;
  --max: 42rem;
  --max-wide: 54rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0F1B2D;
    --bg-card: #152238;
    --text: #F4F1E8;
    --muted: #9AA6B8;
    --accent: #D4AF63;
    --accent-hover: #E4C57A;
    --rule: #2A3B55;
    --placeholder-bg: #3A2E12;
    --placeholder-text: #F4F1E8;
    --draft-bg: #1A2A40;
    --draft-text: #F4F1E8;
    --draft-rule: #D4AF63;
    --focus: #D4AF63;
    --header-bg: #0F1B2D;
  }
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem; /* 17px at typical 16px root */
  line-height: 1.65;
}

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

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

a:hover,
a:focus-visible {
  color: var(--accent-hover);
}

a:focus-visible,
.skip-link:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 0.85rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  color: var(--bg);
}

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--header-bg);
}

.header-inner,
.footer-inner {
  width: min(var(--max-wide), calc(100% - 2rem));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.1rem 0;
}

.site-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
}

.site-title a:hover,
.site-title a:focus-visible {
  color: var(--accent);
}

.site-header nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
}

.site-header nav a,
.site-footer nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

.site-header nav a:hover,
.site-footer nav a:hover,
.site-header nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.site-header nav a[aria-current="page"] {
  color: var(--accent);
}

main {
  flex: 1;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.25rem 0 3.5rem;
}

body.wide main {
  width: min(var(--max-wide), calc(100% - 2rem));
}

h1,
h2,
h3,
h4 {
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.4rem;
  margin: 2.25rem 0 0.7rem;
}

h3 {
  font-size: 1.15rem;
  margin: 1.6rem 0 0.5rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.35rem;
}

.lede {
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.muted,
.meta {
  color: var(--muted);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  body.wide .feature-list {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-list li {
  margin: 0;
  padding: 1rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
}

.feature-list strong {
  display: block;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.feature-list p {
  margin: 0;
  color: var(--muted);
}

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  padding: 0;
  margin: 1.25rem 0 0;
  list-style: none;
}

.page-links a {
  font-weight: 600;
}

.draft-banner,
.draft-note {
  background: var(--draft-bg);
  color: var(--draft-text);
  border: 1px solid var(--draft-rule);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin: 0 0 1.5rem;
}

.draft-note {
  margin: 0.85rem 0 1.15rem;
  font-size: 1rem;
}

.placeholder {
  display: inline;
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  padding: 0.05em 0.35em;
  border-radius: 3px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}

.legal-caps {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.credits-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.credit-item {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
}

.credit-item h3 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
}

.credit-slot {
  margin: 0 0 0.85rem;
}

.credit-slot:last-child {
  margin-bottom: 0;
}

.credit-slot .slot-label {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.credit-slot p {
  margin: 0 0 0.35rem;
}

.ai-label {
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 1rem;
}

.site-footer p {
  margin: 0 0 0.65rem;
}

.site-footer .footer-contact {
  margin-top: 0.85rem;
}

@media (max-width: 520px) {
  h1 {
    font-size: 1.7rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.last-updated {
  margin-top: 0.85rem;
  color: var(--muted);
}

pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.85rem; line-height: 1.4; padding: 0.75rem; border: 1px solid currentColor; border-radius: 6px; }
