/* Morning Devotion — calm cream / soft ink */
:root {
  --cream: #f7f1e8;
  --cream-deep: #efe6d8;
  --paper: #fffdf8;
  --ink: #2c2825;
  --ink-soft: #5c534c;
  --ink-muted: #8a7f74;
  --line: #e2d6c4;
  --accent: #8b5e3c;
  --accent-soft: #c4a484;
  --card: #fbf7f0;
  --shadow: 0 1px 2px rgba(44, 40, 37, 0.04), 0 8px 24px rgba(44, 40, 37, 0.06);
  --radius: 14px;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --max: 42rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top, #fbf6ee 0%, var(--cream) 55%, var(--cream-deep) 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--ink);
}

.app {
  max-width: calc(var(--max) + 3rem);
  margin: 0 auto;
  padding: 1.25rem 1.15rem 4rem;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.75rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 0.35rem;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.nav a:hover,
.nav a.active {
  background: rgba(139, 94, 60, 0.1);
  color: var(--accent);
}

/* Views */
.view {
  display: none;
  animation: fadeIn 0.28s ease;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.page-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.page-meta {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.page-meta .sep {
  margin: 0 0.45rem;
  color: var(--ink-muted);
}

/* Cards & panels */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.2rem;
  margin-bottom: 1.15rem;
}

.panel h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-serif);
  font-size: 1.28rem;
  font-weight: 600;
}

.panel-intro {
  margin: -0.35rem 0 1rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

/* Today hero */
.today-card {
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.today-card:hover {
  border-color: var(--accent-soft);
  transform: translateY(-1px);
}

.today-card .cta {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ink-soft);
}

/* Archive list */
.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.archive-item a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  text-decoration: none;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease;
}

.archive-item a:hover {
  border-color: var(--accent-soft);
}

.day-badge {
  min-width: 3.1rem;
  height: 3.1rem;
  border-radius: 12px;
  background: var(--cream-deep);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.95rem;
}

.archive-item h3 {
  margin: 0 0 0.2rem;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
}

.archive-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* Scripture */
.scripture {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  line-height: 1.8;
}

.chapter-heading {
  margin: 1.35rem 0 0.7rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: center;
}

.chapter-heading:first-child {
  margin-top: 0;
}

.verse {
  margin: 0 0 0.55rem;
  text-indent: 0;
}

.verse-num {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-soft);
  vertical-align: super;
  margin-right: 0.25rem;
  user-select: none;
}

.attribution {
  margin: 1.15rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.nasb-link {
  margin: 1rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.92rem;
}

.nasb-link .source-link {
  font-weight: 600;
}

/* NASB Bible Gateway audio */
.nasb-audio {
  margin: 1rem 0 0;
  padding: 0.85rem 0.95rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.nasb-audio-label {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}

.nasb-audio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  margin-bottom: 0.75rem;
}

.nasb-audio-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
}

.nasb-audio-btn:hover {
  border-color: var(--accent-soft);
  color: var(--ink);
}

.nasb-audio-frame-wrap {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}

.nasb-audio-frame {
  display: block;
  width: 100%;
  height: 250px;
  border: 0;
  background: var(--paper);
}

.nasb-audio-note {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.45;
}


/* Audio */
.audio-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.audio-block label {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}

audio {
  width: 100%;
  height: 2.6rem;
  border-radius: 999px;
}

.audio-missing {
  margin: 0;
  padding: 0.85rem 1rem;
  background: var(--cream-deep);
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* Commentary cards */
.commentary-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.commentary-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.05rem;
}

.commentary-card h3 {
  margin: 0 0 0.15rem;
  font-family: var(--font-serif);
  font-size: 1.08rem;
}

.ministry {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.commentary-card p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.source-link {
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

/* Day nav */
.day-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.btn:hover {
  border-color: var(--accent-soft);
  color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fffaf3;
}

.btn-primary:hover {
  background: #754c30;
  color: #fffaf3;
}

.loading,
.error {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--ink-soft);
}

.error {
  color: #8a3b2c;
}

.site-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

@media (min-width: 640px) {
  .app {
    padding: 1.75rem 1.5rem 4.5rem;
  }

  .panel {
    padding: 1.5rem 1.55rem;
  }

  .scripture {
    font-size: 1.18rem;
  }
}

.commentary-card p + p {
  margin-top: 0.65rem;
}

.source-links {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
}

/* Journal — inherits .panel; calm cream / soft ink */
.journal-fields {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.journal-field label {
  display: block;
  margin: 0 0 0.2rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.journal-hint {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.journal-field textarea {
  display: block;
  width: 100%;
  min-height: 7.5rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.98rem;
  line-height: 1.55;
  resize: vertical;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.journal-field textarea:focus {
  outline: none;
  border-color: var(--accent-soft);
  background: var(--paper);
}

.journal-field textarea::placeholder {
  color: var(--ink-muted);
}

.journal-status {
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}
