/* ==========================================================================
   BibleProject-Inspired Contemporary Design System
   Three-Year Bible Reading Plan
   ========================================================================== */

:root {
  /* Contemporary Color Palette */
  --bg: #F8F9FB;
  --card: #FFFFFF;
  --card-subtle: #F1F5F9;
  --ink: #0F172A;
  --ink-secondary: #334155;
  --muted: #64748B;
  --line: #E2E8F0;
  --line-subtle: #F1F5F9;

  /* Signature BibleProject Accent Colors */
  --accent: #1D5BD8;
  --accent-hover: #1548B5;
  --accent-ink: #FFFFFF;
  --accent-soft: #EFF6FF;
  --accent-glow: rgba(29, 91, 216, 0.12);

  --gold: #D97706;
  --gold-soft: #FEF3C7;
  --gold-ink: #92400E;

  --success: #059669;
  --success-soft: #ECFDF5;
  --success-ink: #065F46;

  --danger: #DC2626;
  --danger-soft: #FEF2F2;

  /* Typography */
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  /* Elevation & Shape */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0F17;
    --card: #151A24;
    --card-subtle: #1E2536;
    --ink: #F8FAFC;
    --ink-secondary: #CBD5E1;
    --muted: #94A3B8;
    --line: #263044;
    --line-subtle: #1E2638;

    --accent: #3B82F6;
    --accent-hover: #60A5FA;
    --accent-ink: #FFFFFF;
    --accent-soft: rgba(59, 130, 246, 0.16);
    --accent-glow: rgba(59, 130, 246, 0.22);

    --gold: #F59E0B;
    --gold-soft: rgba(245, 158, 11, 0.16);
    --gold-ink: #FCD34D;

    --success: #10B981;
    --success-soft: rgba(16, 185, 129, 0.16);
    --success-ink: #6EE7B7;

    --danger: #EF4444;
    --danger-soft: rgba(239, 68, 68, 0.16);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px -4px rgba(0, 0, 0, 0.5);
  }
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

h1, h2, h3, h4 {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  font-weight: 800;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

p {
  margin: 0;
}

/* ==========================================================================
   Header & App Bar
   ========================================================================== */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  max-width: 820px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}

.brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .brand-badge {
  transform: scale(1.05);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}

.brand-tagline {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.gear {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  color: var(--ink-secondary);
  background: var(--card);
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
  cursor: pointer;
  min-height: 0;
}

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

.gear.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* ==========================================================================
   Navigation Tabs (Segmented Pill Bar)
   ========================================================================== */

.tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 4px;
  max-width: 720px;
  margin: 4px auto 20px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs .tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  min-height: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.84rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

@media (max-width: 680px) {
  .tabs {
    justify-content: flex-start;
    border-radius: 14px;
    padding: 4px 6px;
  }
  .tabs .tab-btn {
    flex: 0 0 auto;
    padding: 7px 10px;
    font-size: 0.78rem;
    gap: 4px;
  }
}
}

.tabs .tab-btn .tab-icon {
  stroke-width: 2.25;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.tabs .tab-btn:hover {
  color: var(--ink);
  background: var(--card-subtle);
}

.tabs .tab-btn:hover .tab-icon {
  transform: translateY(-1px);
}

.tabs .tab-btn[aria-current="page"] {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 2px 8px rgba(29, 91, 216, 0.35);
}

.tabs .tab-btn[aria-current="page"] .tab-icon {
  stroke: var(--accent-ink);
}

/* Main Layout Container */
main {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 20px;
  outline: none;
  display: grid;
  gap: 18px;
  flex: 1 0 auto;
}

/* Bottom Center Footer */
.app-footer {
  text-align: center;
  padding: 24px 16px 36px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: auto;
  user-select: none;
}

/* ==========================================================================
   Cards & Hero Sections
   ========================================================================== */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(29, 91, 216, 0.2);
}

.hero {
  padding: 26px;
  gap: 16px;
  border-top: 4px solid var(--accent);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--card) 45%);
}

/* ==========================================================================
   Thematic Hero & Reader Banners (BibleProject Style)
   ========================================================================== */

.hero-banner, .reader-banner, .plan-banner {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--card-subtle);
  margin-bottom: 2px;
}

@media (max-width: 600px) {
  .hero-banner, .reader-banner, .plan-banner {
    height: 130px;
  }
}

.hero-banner-img, .reader-banner-img, .plan-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .hero-banner-img,
.card:hover .reader-banner-img,
.card:hover .plan-banner-img {
  transform: scale(1.025);
}

.hero-banner-overlay, .reader-banner-overlay, .plan-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(15, 23, 42, 0.6) 100%);
  display: flex;
  align-items: flex-end;
  padding: 12px 14px;
  pointer-events: none;
}

.hero-banner-badge, .reader-banner-badge, .plan-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.hero-banner-badge .badge-tag {
  background: var(--accent);
  color: #FFFFFF;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Rotating Dissolve Banner Carousel
   ========================================================================== */

.hero-banner-carousel {
  position: relative;
  overflow: hidden;
  user-select: none;
  isolation: isolate;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  outline: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.6s ease;
  will-change: opacity;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.carousel-slide .hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
}

.carousel-hint {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-left: auto;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.2s ease;
}

.carousel-slide:hover .carousel-hint,
.carousel-slide:focus .carousel-hint {
  opacity: 1;
  transform: translateY(0);
}

/* Carousel Arrow Controls */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.55);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.15s ease, transform 0.15s ease;
  padding: 0;
  min-height: 0;
}

.hero-banner-carousel:hover .carousel-arrow,
.hero-banner-carousel:focus-within .carousel-arrow {
  opacity: 0.85;
}

.carousel-arrow:hover {
  opacity: 1 !important;
  background: rgba(29, 91, 216, 0.85);
  transform: translateY(-50%) scale(1.08);
}

.carousel-arrow.prev {
  left: 10px;
}

.carousel-arrow.next {
  right: 10px;
}

/* Dots Indicator */
.carousel-dots {
  position: absolute;
  bottom: 12px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  pointer-events: auto;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  padding: 0;
  min-height: 0;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.35, 1);
}

.carousel-dot.active {
  width: 22px;
  background: #FFFFFF;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.85);
}

.kicker {
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

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

.small {
  font-size: 0.86rem;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.spread {
  justify-content: space-between;
}

.grow {
  flex: 1;
  min-width: 0;
}

/* Links */
.link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.wk {
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.wk:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Buttons & Form Controls
   ========================================================================== */

button, .btn {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

button:hover, .btn:hover {
  background: var(--card-subtle);
  border-color: var(--muted);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

button.primary, .btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 2px 8px rgba(29, 91, 216, 0.28);
}

button.primary:hover, .btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(29, 91, 216, 0.35);
}

button.quiet {
  border-color: transparent;
  background: none;
  color: var(--accent);
  padding: 8px 12px;
  box-shadow: none;
}

button.quiet:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
  transform: none;
}

button.danger {
  color: var(--danger);
  border-color: var(--danger-soft);
  background: var(--danger-soft);
}

button.danger:hover {
  background: var(--danger);
  color: #FFFFFF;
  border-color: var(--danger);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input, select, textarea {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  min-height: 44px;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 4px var(--accent-glow);
  outline: none;
}

label.field {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.form {
  display: grid;
  gap: 16px;
}

.cols {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ==========================================================================
   Modern Checkboxes & Tick Rows
   ========================================================================== */

.tick {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 48px;
  background: var(--card);
  border: 1px solid var(--line-subtle);
  transition: all 0.15s ease;
}

.tick:hover {
  background: var(--card-subtle);
  border-color: var(--line);
}

.tick input {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  min-height: 0;
  flex: none;
  border: 2px solid var(--accent);
  border-radius: 7px;
  background: var(--card);
  padding: 0;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tick input:checked {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.05);
}

.tick input:checked::after {
  content: "";
  width: 6px;
  height: 12px;
  border: solid var(--accent-ink);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.tick .label {
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.15s ease;
}

.tick.done {
  background: var(--accent-soft);
  border-color: rgba(29, 91, 216, 0.18);
}

.tick.done .label {
  color: var(--muted);
  text-decoration: line-through;
}

/* Pill Tags */
.tag {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--card-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 3px 9px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.list {
  display: grid;
  gap: 8px;
}

/* ==========================================================================
   Daily Portions (Modern Checklist)
   ========================================================================== */

.days {
  display: grid;
  gap: 8px;
}

.days .day {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.days .day:hover {
  background: var(--card-subtle);
  border-color: var(--line);
}

.days .day input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  min-height: 0;
  flex: none;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: var(--card);
  padding: 0;
  display: grid;
  place-content: center;
  cursor: pointer;
  margin: 0;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.days .day input[type="checkbox"]:checked {
  background: var(--success);
  border-color: var(--success);
  transform: scale(1.05);
}

.days .day input[type="checkbox"]:checked::after {
  content: "";
  width: 5px;
  height: 10px;
  border: solid #FFFFFF;
  border-width: 0 2.2px 2.2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.days .n {
  width: 52px;
  color: var(--ink-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: none;
}

.days .day.done {
  background: var(--success-soft);
  border-color: rgba(5, 150, 105, 0.2);
}

.days .day.done .n {
  color: var(--success);
}

.days .day.done .link {
  color: var(--muted);
  text-decoration: line-through;
}

.days .day.day-rest {
  background: var(--gold-soft);
  border-color: rgba(217, 119, 6, 0.2);
}

.days .day.day-rest .n {
  color: var(--gold-ink);
}

.days .day.day-rest .muted {
  color: var(--gold-ink);
  font-weight: 500;
}

/* ==========================================================================
   Plan Matrix View
   ========================================================================== */

.seg {
  display: inline-flex;
  background: var(--card-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 3px;
  overflow: hidden;
}

.seg button {
  border: 0;
  border-radius: var(--radius-full);
  min-height: 36px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.seg button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-xs);
}

.plan-row {
  display: grid;
  grid-template-columns: 50px 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--line-subtle);
  transition: background 0.15s ease;
}

.plan-row:hover {
  background: var(--card-subtle);
}

.plan-row .wk {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.plan-row.current {
  background: var(--accent-soft);
  border: 1px solid rgba(29, 91, 216, 0.25);
  font-weight: 600;
}

.plan-row .tick {
  padding: 6px 8px;
  gap: 8px;
  border: none;
  background: transparent;
}

.plan-row .tick .label {
  font-size: 0.92rem;
}

@media (max-width: 520px) {
  .plan-row {
    grid-template-columns: 40px 1fr;
  }
  .plan-row .tick:last-child {
    grid-column: 2;
  }
}

/* ==========================================================================
   Progress Dashboard & Statistics
   ========================================================================== */

.bar {
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--line);
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #3B82F6 100%);
  border-radius: var(--radius-full);
  min-width: 0;
  transition: width 0.4s ease;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat b {
  display: block;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 4px;
}

/* ==========================================================================
   Scripture Reader (Editorial BibleProject Style)
   ========================================================================== */

.scripture {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.85;
  color: var(--ink);
  max-width: 700px;
  margin: 0 auto;
}

.scripture h3 {
  font-family: var(--sans);
  margin: 32px 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.verse {
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 2px;
  transition: background 0.15s ease;
}

.verse:hover {
  background: var(--card-subtle);
}

.verse sup {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.64em;
  color: var(--muted);
  margin-right: 4px;
  user-select: none;
}

.verse.sel {
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-soft);
  border-radius: 4px;
}

.askbar {
  position: sticky;
  bottom: calc(24px + env(safe-area-inset-bottom));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 10px 18px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  z-index: 40;
}

/* ==========================================================================
   AI Study Companion / Chat View
   ========================================================================== */

.chat {
  display: grid;
  gap: 16px;
}

.msg {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  max-width: 88%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.98rem;
  line-height: 1.6;
}

.msg.user {
  background: var(--accent);
  color: var(--accent-ink);
  justify-self: end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(29, 91, 216, 0.25);
}

.msg.assistant {
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

/* Scripture Citations as Pill Chips */
.cite {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.8rem;
  min-height: 0;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  border: 1px solid rgba(29, 91, 216, 0.15);
  color: var(--accent);
  margin: 0 2px;
  vertical-align: baseline;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
  box-shadow: none;
}

.cite:hover {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.cited {
  white-space: normal;
  margin-top: 14px;
  padding: 12px 16px;
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
}

.cited .ref {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-ink);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.composer {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}

.composer:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.composer textarea {
  resize: none;
  border: none;
  background: transparent;
  padding: 6px 8px;
  min-height: 44px;
  max-height: 160px;
  font-size: 0.95rem;
}

.composer textarea:focus {
  box-shadow: none;
  outline: none;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chips button {
  font-weight: 600;
  font-size: 0.84rem;
  border-radius: var(--radius-full);
  min-height: 34px;
  padding: 6px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
}

.chips button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ==========================================================================
   Toast & Modals
   ========================================================================== */

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: #0F172A;
  color: #FFFFFF;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  max-width: calc(100vw - 32px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.notice {
  background: var(--accent-soft);
  border-color: rgba(29, 91, 216, 0.15);
  color: var(--ink);
}

.error {
  color: var(--danger);
  font-weight: 600;
}

code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.keybox {
  background: var(--card-subtle);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}

/* ==========================================================================
   Week Layout & Left Sidebar
   ========================================================================== */

.week-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: stretch;
}

.week-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  height: 100%;
  box-sizing: border-box;
}

.mobile-in-app-translations {
  display: none;
}

.hero-trans-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
  flex-wrap: wrap;
}

.hero-trans-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-secondary);
}

.hero-trans-select {
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  max-width: 340px;
  width: 100%;
}

.hero-trans-select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.reader-trans-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 10px;
  flex-wrap: wrap;
}

.reader-nav-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 10px 0 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

@media (max-width: 860px) {
  .mobile-in-app-translations {
    display: block;
    margin: 8px 0 12px;
  }

  .week-sidebar .in-app-trans-desktop {
    display: none;
  }

  .week-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .week-main {
    order: 1;
    width: 100%;
    display: grid;
    gap: 16px;
  }

  .week-sidebar {
    order: 2;
    position: static !important;
    top: auto !important;
    width: 100%;
    margin-top: 4px;
    padding: 16px;
  }

  .week-sidebar .sidebar-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px;
  }

  .week-sidebar .sidebar-section:last-child {
    margin-top: 0;
  }
}

.sidebar-section {
  display: grid;
  gap: 8px;
}

.sidebar-section:last-child {
  margin-top: auto;
}

.sidebar-title {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-subtle);
  padding-bottom: 4px;
}

.sidebar-list {
  display: grid;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 7px 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: none;
  min-height: 0;
  text-align: left;
  transition: all 0.15s ease;
}

.sidebar-link:hover {
  background: var(--card-subtle);
  color: var(--accent);
  border-color: var(--line);
  transform: none;
}

.sidebar-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(29, 91, 216, 0.2);
  font-weight: 700;
}

.sidebar-ext {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}

.sidebar-ext:hover {
  background: var(--card-subtle);
  color: var(--accent);
}

.week-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

/* ==========================================================================
   Quick Toggle Bar & Reader Tools
   ========================================================================== */

.quick-toggle-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.quick-toggle-pills {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--card-subtle);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.pill-link:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Collapsible Study Notes Card */
.study-notes-card {
  padding: 0;
  overflow: hidden;
  border-left: 4px solid var(--accent);
}

.study-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  background: linear-gradient(90deg, var(--accent-soft) 0%, var(--card) 40%);
  transition: background 0.15s ease;
}

.study-summary:hover {
  background: var(--accent-soft);
}

.study-notes-body {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line-subtle);
}

.chapter-head {
  margin: 32px 0 12px;
  border-bottom: 1.5px solid var(--line);
  padding-bottom: 8px;
}

.study-pill {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--card-subtle);
  text-decoration: none;
}

.study-pill:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================================
   Daily Word Reading Thumbnails
   ========================================================================== */

.days .day-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  flex: none;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.days .day:hover .day-thumb {
  transform: scale(1.06);
}

.days .day.done .day-thumb {
  filter: grayscale(0.6) opacity(0.75);
}

.days .day-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.days .day-meta {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ==========================================================================
   Reader Ambient Themes
   ========================================================================== */

.reader-theme-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--card);
  border: 1px solid var(--line);
  margin-bottom: 4px;
  width: fit-content;
  box-shadow: var(--shadow-xs);
}

.reader-theme-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-right: 4px;
}

.reader-theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  min-height: 0;
  box-shadow: none;
  transition: all 0.15s ease;
}

.reader-theme-btn:hover {
  background: var(--card-subtle);
  color: var(--ink);
  transform: none;
}

.reader-theme-btn.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

/* Warm Parchment Theme */
.reader-card.theme-parchment {
  background: #FDF9EE !important;
  color: #2D2519 !important;
  border-color: #E6DECE !important;
}
.reader-card.theme-parchment p,
.reader-card.theme-parchment h1,
.reader-card.theme-parchment .prose {
  color: #2D2519 !important;
}
.reader-card.theme-parchment .kicker {
  color: #8C531B !important;
}

/* Sandstone Desert Theme */
.reader-card.theme-sandstone {
  background: #F7EFE7 !important;
  color: #33231A !important;
  border-color: #E2D3C4 !important;
}
.reader-card.theme-sandstone p,
.reader-card.theme-sandstone h1,
.reader-card.theme-sandstone .prose {
  color: #33231A !important;
}
.reader-card.theme-sandstone .kicker {
  color: #A34A26 !important;
}

/* Midnight Starlight Theme */
.reader-card.theme-midnight {
  background: #0D121F !important;
  color: #E2E8F0 !important;
  border-color: #1F293D !important;
}
.reader-card.theme-midnight p,
.reader-card.theme-midnight h1,
.reader-card.theme-midnight .prose {
  color: #E2E8F0 !important;
}
.reader-card.theme-midnight .kicker {
  color: #F59E0B !important;
}

/* ==========================================================================
   Literary Structure Flowchart (BibleProject Style)
   ========================================================================== */

.structure-box {
  background: var(--card-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.structure-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.structure-flow {
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
}

.structure-step {
  flex: 1;
  min-width: 140px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  box-shadow: var(--shadow-xs);
}

.structure-step-num {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.structure-step-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.structure-step-chapters {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

/* ==========================================================================
   Year Milestone Cards
   ========================================================================== */

.milestones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.milestone-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.milestone-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(29, 91, 216, 0.25);
}

.milestone-banner {
  height: 110px;
  position: relative;
  overflow: hidden;
  background: var(--card-subtle);
}

.milestone-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transition: transform 0.4s ease;
}

.milestone-card:hover .milestone-banner img {
  transform: scale(1.05);
}

.milestone-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.milestone-body {
  padding: 14px 16px 18px;
  display: grid;
  gap: 8px;
  flex: 1;
}

.milestone-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.milestone-desc {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ==========================================================================
   Chat Avatars & Hero
   ========================================================================== */

.chat-hero {
  padding: 0 !important;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.msg {
  display: flex !important;
  gap: 12px !important;
  align-items: flex-start !important;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  background: var(--card-subtle);
  border: 1px solid var(--line);
  user-select: none;
}

.msg.user .msg-avatar {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(29, 91, 216, 0.2);
}

.msg.assistant .msg-avatar {
  background: var(--gold-soft);
  color: var(--gold-ink);
  border-color: rgba(217, 119, 6, 0.2);
}

.msg-body {
  flex: 1;
  min-width: 0;
}

/* ==========================================================================
   1. Audio Narration Player Bar
   ========================================================================== */

.audio-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--card-subtle);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  min-height: 0;
  transition: all 0.15s ease;
}

.audio-btn:hover {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

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

.audio-speed {
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 4px 8px;
  background: var(--card-subtle);
  color: var(--muted);
  cursor: pointer;
}

.audio-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.verse.speaking {
  background: var(--accent-soft) !important;
  border-radius: 4px;
  box-shadow: 0 0 0 2px var(--accent);
  transition: background 0.2s ease;
}

/* ==========================================================================
   2. Verse Highlighting & Notes
   ========================================================================== */

.verse.hl-gold {
  background: rgba(245, 158, 11, 0.18);
  border-bottom: 2px solid #F59E0B;
}

.verse.hl-olive {
  background: rgba(16, 185, 129, 0.18);
  border-bottom: 2px solid #10B981;
}

.verse.hl-rose {
  background: rgba(244, 63, 94, 0.18);
  border-bottom: 2px solid #F43F5E;
}

.verse.hl-sky {
  background: rgba(14, 165, 233, 0.18);
  border-bottom: 2px solid #0EA5E9;
}

.hl-palette {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.hl-dot {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1px var(--line);
  padding: 0;
  min-height: 0;
  transition: transform 0.15s ease;
}

.hl-dot:hover {
  transform: scale(1.2);
}

.hl-dot.gold { background: #F59E0B; }
.hl-dot.olive { background: #10B981; }
.hl-dot.rose { background: #F43F5E; }
.hl-dot.sky { background: #0EA5E9; }
.hl-dot.clear { background: transparent; border-color: var(--muted); }

.verse-note-indicator {
  display: inline-block;
  margin-left: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--gold-ink);
}

/* ==========================================================================
   3. Parallel / Split-Screen Comparison
   ========================================================================== */

.split-toggle-btn {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
}

.split-toggle-btn.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.reader-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .reader-split-grid {
    grid-template-columns: 1fr;
  }
}

.split-col {
  display: grid;
  gap: 12px;
}

.split-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--line);
}

/* ==========================================================================
   4. Daily Devotional & Guided Prayer Card
   ========================================================================== */

.devotional-card {
  background: linear-gradient(135deg, rgba(29, 91, 216, 0.05) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: var(--radius-md);
  padding: 22px;
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.devotional-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.devotional-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.devotional-prayer {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-secondary);
  line-height: 1.6;
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}

/* ==========================================================================
   5. Search Page
   ========================================================================== */

.search-composer {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.search-composer input {
  flex: 1;
  padding: 12px 16px;
  font-size: 1rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--line);
  background: var(--card);
}

.search-composer input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.search-result {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-subtle);
  transition: background 0.15s ease;
  cursor: pointer;
}

.search-result:hover {
  background: var(--card-subtle);
}

.search-highlight {
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 3px;
}

/* ==========================================================================
   6. Day 7 Weekly Quiz & Reflection
   ========================================================================== */

.quiz-card {
  background: var(--card);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 22px;
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  margin-top: 12px;
}

.quiz-badge {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-ink);
  background: var(--gold-soft);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.quiz-progress-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.quiz-nav-pill {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink-secondary);
  cursor: pointer;
  padding: 0;
  min-height: 0;
  transition: all 0.15s ease;
}

.quiz-nav-pill:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.quiz-nav-pill.active {
  border-color: var(--gold-ink);
  background: var(--gold-soft);
  color: var(--gold-ink);
  box-shadow: 0 0 0 2px var(--gold);
}

.quiz-nav-pill.done-correct {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success-ink);
}

.quiz-nav-pill.done-wrong {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.quiz-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.quiz-q {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.45;
  text-align: left;
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-opt {
  display: flex;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--card);
  cursor: pointer;
  font-size: 0.92rem;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  gap: 12px;
}

.quiz-opt:hover {
  border-color: var(--accent);
  background: var(--card-subtle);
}

.quiz-opt-letter {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  background: var(--card-subtle);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
  flex-shrink: 0;
  margin-top: 1px;
}

.quiz-opt-text {
  flex: 1;
  text-align: left;
  line-height: 1.5;
  color: var(--ink);
  word-break: break-word;
}

.quiz-opt.correct {
  border-color: var(--success) !important;
  background: var(--success-soft) !important;
}

.quiz-opt.correct .quiz-opt-letter {
  background: var(--success);
  color: #FFFFFF;
  border-color: var(--success);
}

.quiz-opt.correct .quiz-opt-text {
  color: var(--success-ink) !important;
  font-weight: 600;
}

.quiz-opt.wrong {
  border-color: var(--danger) !important;
  background: var(--danger-soft) !important;
}

.quiz-opt.wrong .quiz-opt-letter {
  background: var(--danger);
  color: #FFFFFF;
  border-color: var(--danger);
}

.quiz-opt.wrong .quiz-opt-text {
  color: var(--danger) !important;
}

.quiz-feedback {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: left;
}

.quiz-nav-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  gap: 8px;
}

/* ==========================================================================
   Concordance & Lexicon Styles
   ========================================================================== */

.concordance-alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 12px 0 16px;
  align-items: center;
}

.concordance-letter-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.concordance-letter-btn.all-btn {
  width: auto;
  padding: 0 10px;
}

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

.concordance-letter-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(29, 91, 216, 0.3);
}

.concordance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.concordance-card-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.concordance-card-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.concordance-card-item.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.concordance-card-term {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.concordance-card-strongs {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.concordance-card-original {
  font-family: var(--serif);
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-secondary);
}

.concordance-card-def {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.concordance-card-meta {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-secondary);
  border-top: 1px dashed var(--line);
  padding-top: 6px;
  margin-top: auto;
}

/* Detailed Entry Card */
.concordance-entry-hero {
  border-left: 4px solid var(--accent);
  padding: 20px 22px;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.concordance-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.concordance-entry-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--ink);
}

.concordance-original-box {
  background: var(--card-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--serif);
  font-size: 0.96rem;
  color: var(--ink);
  line-height: 1.4;
}

.concordance-def-prose {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
}

.concordance-landmark-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.concordance-stat-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.concordance-verse-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s ease;
}

.concordance-verse-item:hover {
  background: var(--card-subtle);
}

.concordance-verse-item:last-child {
  border-bottom: none;
}

/* ==========================================================================
   7. Printable Study Sheet (@media print)
   ========================================================================== */

@media print {
  header.top,
  nav.tabs,
  .week-sidebar,
  .quick-toggle-bar,
  .hero-banner-carousel .carousel-arrow,
  .hero-banner-carousel .carousel-dots,
  .reader-theme-bar,
  .audio-bar,
  .composer,
  #toast,
  .btn,
  button {
    display: none !important;
  }

  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 11pt !important;
    line-height: 1.5 !important;
    padding: 0 !important;
  }

  main {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #CCC !important;
    page-break-inside: avoid;
    margin-bottom: 16px;
  }

  .app-footer {
    display: block !important;
    text-align: center;
    font-size: 9pt;
    margin-top: 24px;
  }

  .print-only {
    display: block !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
