:root {
  /* Claymorphic theme: warm surfaces, soft elevation, minimal translucency */
  --bg: #f7f2ea;
  --bg2: #f1e9de;
  --panel: #f5eee5;
  --panel2: #efe6da;
  --border: rgba(43, 32, 23, 0.10);
  --text: rgba(26, 20, 16, 0.92);
  --muted: rgba(26, 20, 16, 0.66);
  --faint: rgba(26, 20, 16, 0.48);
  --accent: #2f7d6b;
  --accent2: #3b6fd6;
  --danger: #c64b3f;

  /*
    Clay shadows:
    - Avoid outer "white" top-left shadows (they can spill onto neighboring cards).
    - Use inset highlights for the rounded clay feel + a single soft drop shadow for elevation.
  */
  --shadow: 18px 18px 42px rgba(43, 32, 23, 0.16);
  --shadow-sm: 10px 10px 22px rgba(43, 32, 23, 0.14);
  --inset: inset 1px 1px 0 rgba(255, 255, 255, 0.75), inset -2px -2px 6px rgba(43, 32, 23, 0.06);
  --clay-border: rgba(43, 32, 23, 0.06);
  --clay-surface: linear-gradient(145deg, #fbf7f1, #eadfd2);
  --clay-surface-2: linear-gradient(145deg, #f7efe5, #e6d8c7);

  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 10px;
  --container: 1120px;

  --font-sans: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-serif: Fraunces, ui-serif, Georgia, "Times New Roman", serif;

  --step-0: 14px;
  --step-1: 16px;
  --step-2: 18px;
  --step-3: 20px;
  --step-4: 28px;
  --step-5: 40px;
  --step-6: 56px;
}

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

html,
body {
  min-height: 100%;
}

html {
  /* Page background should live on the root so it always covers the full canvas */
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  /* Simple page background that spans full scroll height */
  background: transparent;
  line-height: 1.55;
}

/* Theme: Dark (used by the app toggle) */
html.theme-dark {
  --bg: #0c111b;
  --bg2: #0a0f18;
  --panel: rgba(18, 25, 38, 0.86);
  --panel2: rgba(16, 22, 34, 0.92);
  --border: rgba(255, 255, 255, 0.10);
  --clay-border: rgba(255, 255, 255, 0.08);
  --text: rgba(245, 247, 255, 0.92);
  --muted: rgba(245, 247, 255, 0.66);
  --faint: rgba(245, 247, 255, 0.48);
  --shadow: 18px 18px 42px rgba(0, 0, 0, 0.55);
  --shadow-sm: 10px 10px 22px rgba(0, 0, 0, 0.50);
  --inset: inset 1px 1px 0 rgba(255, 255, 255, 0.05), inset -2px -2px 6px rgba(0, 0, 0, 0.35);
  --clay-surface: linear-gradient(145deg, rgba(19, 27, 41, 0.95), rgba(13, 19, 30, 0.95));
  --clay-surface-2: linear-gradient(145deg, rgba(17, 24, 36, 0.96), rgba(12, 18, 28, 0.96));
}

html.theme-dark .site-header,
html.theme-dark .app-header {
  background: rgba(10, 14, 22, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

html.theme-dark .panel-title,
html.theme-dark .reader-section h3,
html.theme-dark .prose,
html.theme-dark .scripture,
html.theme-dark .reader-ref,
html.theme-dark .reader-date {
  color: var(--text);
}

html.theme-dark .prose {
  color: rgba(245, 247, 255, 0.78);
}

html.theme-dark .scripture {
  background: rgba(10, 14, 22, 0.35);
  border-color: rgba(255, 255, 255, 0.10);
  color: rgba(245, 247, 255, 0.90);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.tilt-card {
  --rx: 0deg;
  --ry: 0deg;
  transform-style: preserve-3d;
  will-change: transform;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0);
  transition: transform 160ms ease;
}

.tilt-card.is-tilting {
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0) translateY(1px) scale(0.99);
}

@media (prefers-reduced-motion: reduce) {
  .tilt-card,
  .tilt-card.is-tilting {
    transition: none !important;
    transform: none !important;
  }
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

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

.small {
  font-size: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  z-index: 9999;
}
.skip-link:focus {
  left: 12px;
}

/* Header / Nav */
.site-header,
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 234, 0.96);
  border-bottom: 1px solid rgba(43, 32, 23, 0.08);
  box-shadow: 0 10px 26px rgba(43, 32, 23, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 5px rgba(47, 125, 107, 0.10), inset 1px 1px 0 rgba(255, 255, 255, 0.65);
}
.brand-name {
  font-size: 16px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 10px;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(43, 32, 23, 0.04);
}
.nav-link:focus-visible {
  outline: 2px solid rgba(47, 125, 107, 0.45);
  outline-offset: 2px;
}
.nav-link.is-active {
  color: var(--text);
  background: rgba(47, 125, 107, 0.10);
  border: 1px solid rgba(47, 125, 107, 0.20);
}
.nav-link.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.nav-toggle:focus-visible {
  outline: 2px solid rgba(59, 111, 214, 0.45);
  outline-offset: 2px;
}

.mobile-nav {
  padding: 10px 0 18px;
  display: grid;
  gap: 6px;
}
.mobile-nav .theme-toggle {
  width: 100%;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
}
.btn:focus-visible {
  outline: 2px solid rgba(47, 125, 107, 0.45);
  outline-offset: 2px;
}
.btn-primary {
  background: linear-gradient(180deg, rgba(47, 125, 107, 0.98), rgba(35, 102, 86, 0.98));
  color: rgba(255, 255, 255, 0.96);
  border-color: rgba(43, 32, 23, 0.10);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary:hover {
  filter: brightness(1.02);
}
.btn-secondary {
  background: var(--panel);
  border-color: rgba(43, 32, 23, 0.10);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--panel2);
}
.btn-small {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.theme-toggle {
  width: 34px;
  height: 34px;
  padding: 0;
}

/* Landing */
.hero {
  padding: 56px 0 22px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 34px;
  align-items: start;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(43, 32, 23, 0.10);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.hero-title {
  margin: 14px 0 10px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(34px, 4.8vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.06;
}
.accent {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  max-width: 62ch;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}
.mini-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.mini-feature {
  display: flex;
  gap: 10px;
  border: 1px solid var(--clay-border);
  background: var(--clay-surface-2);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow-sm), var(--inset);
}
.mini-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(47, 125, 107, 0.10);
  border: 1px solid rgba(43, 32, 23, 0.10);
  box-shadow: var(--inset);
  font-size: 16px;
}
.mini-title {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.01em;
}
.mini-text {
  color: var(--muted);
  font-size: 12px;
}

.hero-card {
  border: 1px solid var(--clay-border);
  border-radius: 26px;
  padding: 18px;
  background: var(--clay-surface);
  box-shadow: var(--shadow), var(--inset);
  align-self: center;
}
.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.preview-chip {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--clay-border);
  background: var(--clay-surface-2);
  box-shadow: var(--shadow-sm), var(--inset);
}
.preview-date {
  font-size: 12px;
  color: var(--faint);
}
.preview-title {
  font-family: var(--font-serif);
  font-size: 26px;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 4px;
}
.preview-ref {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 10px;
}
.preview-body {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}
.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--clay-border);
  background: var(--clay-surface-2);
  color: var(--muted);
  font-weight: 700;
  box-shadow: var(--shadow-sm), var(--inset);
}

.section {
  padding: 46px 0;
}
.section.alt {
  background: transparent;
  border-top: 0;
  border-bottom: 0;
}
.section-head {
  margin-bottom: 18px;
}
.section-head h2 {
  font-size: 28px;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.card {
  border: 1px solid var(--clay-border);
  border-radius: 22px;
  padding: 16px;
  background: var(--clay-surface-2);
  box-shadow: var(--shadow-sm), var(--inset);
}
.card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.title-icon {
  color: var(--accent2);
  opacity: 0.9;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.stack {
  display: grid;
  gap: 12px;
}
.soon {
  border: 1px solid var(--clay-border);
  border-radius: 22px;
  padding: 14px 16px;
  background: var(--clay-surface-2);
  box-shadow: var(--shadow-sm), var(--inset);
}
.soon-title {
  font-weight: 800;
  letter-spacing: -0.01em;
}
.soon-text {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.cta-panel {
  margin-top: 18px;
  border: 1px solid var(--clay-border);
  border-radius: 26px;
  padding: 16px;
  background: var(--clay-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow), var(--inset);
}
.cta-panel h3 {
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.cta-panel p {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}
.cta-form {
  display: flex;
  gap: 10px;
  width: min(440px, 100%);
}
.cta-form input {
  flex: 1;
  min-width: 180px;
  border-radius: 12px;
  border: 1px solid rgba(43, 32, 23, 0.10);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  padding: 10px 12px;
  font-weight: 600;
  box-shadow: var(--inset);
}
.cta-form input::placeholder {
  color: rgba(26, 20, 16, 0.45);
}
.cta-form input:focus-visible {
  outline: 2px solid rgba(59, 111, 214, 0.45);
  outline-offset: 2px;
}

/* Theology */
.theology-shell {
  display: grid;
  gap: 14px;
}
.theology-categories {
  display: grid;
  gap: 18px;
}
.theology-category-head {
  margin-bottom: 10px;
}
.theology-category-title {
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.theology-category-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.theology-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.theology-card {
  display: block;
}
.theology-card-title {
  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: 14px;
  margin-bottom: 6px;
}
.theology-card-subtitle {
  color: var(--muted);
  font-size: 13px;
}

/* Confessions / long-form reader helpers */
.prose .confession-chapter {
  margin: 18px 0 6px;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--faint);
}
.prose .confession-title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: -0.01em;
}
.prose .confession-subtitle {
  margin: 12px 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}
.prose .confession-pre {
  margin: 10px 0 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--clay-border);
  background: rgba(255, 255, 255, 0.35);
  overflow: auto;
  font-size: 12px;
  line-height: 1.45;
}
.prose .confession-proofs {
  margin-top: -2px;
}

/* Catechisms */
.prose .catechism-qa {
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--clay-border);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: var(--inset);
  margin: 0 0 10px;
}
.prose .catechism-q {
  margin: 0 0 6px;
  font-weight: 800;
}
.prose .catechism-q em {
  font-weight: 700;
  font-style: italic;
}
.prose .catechism-a {
  margin: 0;
  color: rgba(26, 20, 16, 0.78);
}
html.theme-dark .prose .catechism-qa {
  background: rgba(10, 14, 22, 0.22);
}
html.theme-dark .prose .catechism-a {
  color: rgba(245, 247, 255, 0.78);
}
.fineprint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.faq details {
  border: 1px solid var(--clay-border);
  border-radius: 22px;
  background: var(--clay-surface-2);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm), var(--inset);
  cursor: pointer;
  transition: filter 160ms ease;
}
.faq details:hover {
  filter: brightness(1.03);
}
.faq {
  display: grid;
  gap: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.faq p {
  color: var(--muted);
  margin: 8px 0 0;
}

.site-footer {
  padding: 24px 0;
  border-top: 0;
  background: transparent;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* App */
.app-main {
  padding: 22px 0 46px;
}
.app-shell {
  display: grid;
  gap: 14px;
}
.app-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.app-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 30px;
  letter-spacing: -0.03em;
}
.app-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.date-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.app-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.app-grid > aside.panel {
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
}

.sidebar-toggle {
  display: none;
}

.sidebar-scrim {
  display: none;
}

.panel {
  border: 1px solid var(--clay-border);
  border-radius: 22px;
  background: var(--clay-surface);
  overflow: visible;
  box-shadow: var(--shadow), var(--inset);
}
.panel-head {
  padding: 14px 14px 0;
}
.panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sidebar-close {
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  line-height: 1;
  font-size: 22px;
}
.panel-title {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.01em;
  font-weight: 800;
  color: rgba(26, 20, 16, 0.90);
}
.panel-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 6px;
  padding: 12px 14px 0;
}
.field-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.date-picker {
  position: relative;
}

.date-control {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 16px;
  border: 1px solid var(--clay-border);
  background: var(--clay-surface-2);
  color: var(--text);
  padding: 11px 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: var(--inset);
  transition: filter 160ms ease, transform 160ms ease;
  cursor: pointer;
}
.date-control:hover {
  filter: brightness(1.02);
}
.date-control:active {
  transform: translateY(1px);
}
.date-control:focus-visible {
  outline: 2px solid rgba(47, 125, 107, 0.45);
  outline-offset: 2px;
}
.date-control-icon {
  color: var(--faint);
  font-weight: 900;
}

.date-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  z-index: 20;
  border-radius: 20px;
  border: 1px solid var(--clay-border);
  background: var(--clay-surface);
  box-shadow: var(--shadow), var(--inset);
  padding: 12px;
}

.date-popover-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.date-popover-title {
  text-align: center;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.date-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 8px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.date-day {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--clay-border);
  background: var(--clay-surface-2);
  box-shadow: var(--shadow-sm), var(--inset);
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: filter 140ms ease, transform 140ms ease;
}
.date-day:hover {
  filter: brightness(1.02);
}
.date-day:active {
  transform: translateY(1px);
}
.date-day:focus-visible {
  outline: 2px solid rgba(59, 111, 214, 0.45);
  outline-offset: 2px;
}
.date-day.is-empty {
  visibility: hidden;
}
.date-day:disabled,
.date-day.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  transform: none;
}
.date-day.is-selected {
  border-color: rgba(47, 125, 107, 0.35);
  background: linear-gradient(145deg, rgba(47, 125, 107, 0.16), rgba(59, 111, 214, 0.10));
}

.date-popover-foot {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

/* Desktop: use custom clay calendar popover (native popup isn't styleable) */
@media (hover: hover) and (pointer: fine) {
  .date-control {
    display: flex;
  }
  .date-native {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }
}
input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 16px;
  border: 1px solid var(--clay-border);
  background: var(--clay-surface-2);
  color: var(--text);
  padding: 11px 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--inset);
  transition: filter 160ms ease, transform 160ms ease;
  width: 100%;
}
input[type="date"]:hover {
  filter: brightness(1.02);
}
input[type="date"]:active {
  transform: translateY(1px);
}
input[type="date"]:focus-visible {
  outline: 2px solid rgba(47, 125, 107, 0.45);
  outline-offset: 2px;
}

/* WebKit-only: improve the calendar affordance without breaking behavior */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.85;
  border-radius: 10px;
  padding: 6px;
  background-color: rgba(43, 32, 23, 0.05);
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  background-color: rgba(43, 32, 23, 0.08);
}
input[type="date"]::-webkit-datetime-edit {
  color: var(--text);
}
input[type="date"]::-webkit-datetime-edit-text {
  color: var(--faint);
  padding: 0 2px;
}

.divider {
  height: 1px;
  background: rgba(43, 32, 23, 0.08);
  margin: 12px 0;
}

.toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 14px 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  user-select: none;
}
.toggle input {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--clay-border);
  background: var(--clay-surface-2);
  box-shadow: var(--inset);
  position: relative;
  cursor: pointer;
  transition: filter 160ms ease, transform 160ms ease, background 160ms ease;
}
.toggle input:hover {
  filter: brightness(1.02);
}
.toggle input:active {
  transform: translateY(1px);
}
.toggle input:focus-visible {
  outline: 2px solid rgba(59, 111, 214, 0.45);
  outline-offset: 2px;
}
.toggle input::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: linear-gradient(145deg, #ffffff, #efe6da);
  border: 1px solid rgba(43, 32, 23, 0.10);
  box-shadow: 6px 6px 14px rgba(43, 32, 23, 0.12), inset 1px 1px 0 rgba(255, 255, 255, 0.75);
  transition: transform 160ms ease, left 160ms ease;
}
.toggle input:checked {
  background: linear-gradient(145deg, rgba(47, 125, 107, 0.28), rgba(59, 111, 214, 0.18));
  border-color: rgba(47, 125, 107, 0.22);
}
.toggle input:checked::after {
  left: 21px;
}

.list {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
}

.list-footer {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}
.list-more {
  width: 100%;
}
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-radius: 18px;
  border: 1px solid var(--clay-border);
  background: var(--clay-surface-2);
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow-sm), var(--inset);
}
.list-item:hover {
  background: var(--panel);
}
.list-item:focus-visible {
  outline: 2px solid rgba(59, 111, 214, 0.45);
  outline-offset: 2px;
}
.list-item.is-active {
  border-color: rgba(47, 125, 107, 0.22);
  background: rgba(47, 125, 107, 0.10);
}
.list-title {
  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: 13px;
}
.list-subtitle {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(43, 32, 23, 0.10);
  border: 1px solid rgba(43, 32, 23, 0.10);
  box-shadow: var(--inset);
}
.badge-dot.is-unseen:not(.is-bookmarked) {
  /* Subtle blue (less intense than bookmark treatment) */
  background: rgba(59, 111, 214, 0.726);
  border-color: rgba(59, 111, 214, 0.26);
}
.badge-dot.is-bookmarked {
  background: linear-gradient(135deg, green, rgb(1, 83, 1));
  border-color: rgba(43, 32, 23, 0.10);
}

.reader {
  padding: 24px 24px 24px;
}
.reader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(43, 32, 23, 0.08);
  padding-bottom: 12px;
}
.reader-date {
  font-size: 12px;
  color: var(--faint);
  font-weight: 700;
}
.reader-title {
  margin: 6px 0 4px;
  font-family: var(--font-serif);
  font-size: 34px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.reader-ref {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}
.reader-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.reader-actions-row {
  display: flex;
  gap: 8px;
}
.reader-status {
  text-align: right;
}
.reader-body {
  padding-top: 12px;
  display: grid;
  gap: 16px;
}
.reader-section h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(26, 20, 16, 0.72);
}
.scripture {
  margin: 0;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(43, 32, 23, 0.10);
  background: rgba(255, 255, 255, 0.55);
  color: rgba(26, 20, 16, 0.88);
  font-weight: 600;
  font-size: calc(15px * var(--text-scale, 1));
  box-shadow: var(--inset);
}
.prose {
  color: rgba(26, 20, 16, 0.78);
  font-size: calc(15px * var(--text-scale, 1));
}
.prose p {
  margin: 0 0 10px;
}
.prose p:last-child {
  margin-bottom: 0;
}
.reader-foot {
  display: none;
}

/* Preferences */
:root {
  --text-scale: 1;
}

input[type="range"] {
  /* default fallback */
  width: 100%;
}

/* Clay slider (scoped to the app text-size control) */
#font-scale {
  --range-pct: 50%;
  --thumb-size: 24px;
  width: 100%;
  height: 34px;
  margin: 2px 0 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  overflow: visible;
  box-sizing: border-box;
  /* Inset the track by half the thumb so the thumb can visually cover the ends */
  padding-inline: calc(var(--thumb-size) / 2);
}
#font-scale::-webkit-slider-container {
  overflow: visible;
}
#font-scale:focus-visible {
  outline: 2px solid rgba(59, 111, 214, 0.45);
  outline-offset: 2px;
  border-radius: 14px;
}

/* WebKit (Chrome/Edge/Safari) */
#font-scale::-webkit-slider-runnable-track {
  height: 14px;
  border-radius: 999px;
  border: 1px solid var(--clay-border);
  background:
    linear-gradient(
      90deg,
      rgba(47, 125, 107, 0.28) 0%,
      rgba(47, 125, 107, 0.28) var(--range-pct),
      rgba(0, 0, 0, 0) var(--range-pct),
      rgba(0, 0, 0, 0) 100%
    ),
    var(--clay-surface-2);
  box-shadow:
    inset 3px 3px 8px rgba(43, 32, 23, 0.10),
    inset -3px -3px 10px rgba(255, 255, 255, 0.75);
}
#font-scale::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--thumb-size);
  height: var(--thumb-size);
  border-radius: 999px;
  margin-top: -6px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 55%),
    linear-gradient(145deg, #ffffff, #efe6da);
  border: 1px solid rgba(43, 32, 23, 0.12);
  box-shadow:
    10px 10px 18px rgba(43, 32, 23, 0.16),
    inset 1px 1px 0 rgba(255, 255, 255, 0.80),
    inset -2px -2px 6px rgba(43, 32, 23, 0.08);
  cursor: pointer;
}
#font-scale:active::-webkit-slider-thumb {
  box-shadow:
    6px 6px 12px rgba(43, 32, 23, 0.14),
    inset 1px 1px 0 rgba(255, 255, 255, 0.80),
    inset -2px -2px 6px rgba(43, 32, 23, 0.10);
}

/* Firefox */
#font-scale::-moz-range-track {
  height: 14px;
  border-radius: 999px;
  border: 1px solid var(--clay-border);
  background: var(--clay-surface-2);
  box-shadow:
    inset 3px 3px 8px rgba(43, 32, 23, 0.10),
    inset -3px -3px 10px rgba(255, 255, 255, 0.75);
}
#font-scale::-moz-range-progress {
  height: 14px;
  border-radius: 999px;
  background: rgba(47, 125, 107, 0.28);
}
#font-scale::-moz-range-thumb {
  width: var(--thumb-size);
  height: var(--thumb-size);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 55%),
    linear-gradient(145deg, #ffffff, #efe6da);
  border: 1px solid rgba(43, 32, 23, 0.12);
  box-shadow:
    10px 10px 18px rgba(43, 32, 23, 0.16),
    inset 1px 1px 0 rgba(255, 255, 255, 0.80),
    inset -2px -2px 6px rgba(43, 32, 23, 0.08);
  cursor: pointer;
}
.range-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}
.range-value {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}

body.pref-reduce-motion * {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .mini-features {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .cta-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .cta-form {
    width: 100%;
  }
  .app-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile off-canvas sidebar */
  body.sidebar-open {
    overflow: hidden;
  }

  .app-top-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  .sidebar-toggle {
    display: inline-flex;
    width: 34px;
    height: 34px;
    padding: 0;
    line-height: 1;
    font-size: 20px;
    font-weight: 900;
  }

  .sidebar-close {
    display: inline-flex;
  }

  .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(26, 20, 16, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    z-index: 55;
    border: 0;
    padding: 0;
    margin: 0;
  }

  @supports (backdrop-filter: blur(2px)) {
    .sidebar-scrim {
      backdrop-filter: blur(2px);
    }
  }

  body.sidebar-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .app-grid > aside.panel.sidebar {
    position: fixed;
    top: 14px;
    right: 14px;
    bottom: 14px;
    width: min(360px, calc(100vw - 28px));
    z-index: 60;
    overflow: auto;
    overscroll-behavior: contain;
    transform: translateX(calc(100% + 20px));
    transition: transform 220ms ease;
  }

  body.sidebar-open .app-grid > aside.panel.sidebar {
    transform: translateX(0);
  }
}

@media (max-width: 760px) {
  .nav {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
}


