/* Grace Series - Modern Distraction-Free Bible Study Stylesheet */

:root {
  --font-sans: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Lora', Georgia, Cambria, serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  
  --bg-primary: #f8f5ed;
  --bg-card: #fffdf8;
  --bg-dark: #123331;
  --bg-dark-surface: #1b4943;
  
  --text-main: #233a32;
  --text-muted: #4a5b52;
  --text-light: #f6f3eb;
  
  --teal: #153b39;
  --teal-dark: #123331;
  --teal-light: #286557;
  --teal-subtle: #eaf0e8;
  --forest: #254535;
  
  --primary: var(--teal);
  --primary-light: var(--teal-light);
  --primary-subtle: var(--teal-subtle);
  
  --gold: #c9a45c;
  --gold-dark: #86632a;
  --gold-bg: #fdfaf3;
  --gold-border: #e8d8b5;
  
  --cream: #f5f2e9;
  --ink: var(--text-main);
  --muted: var(--text-muted);
  --line: #dcd8ca;
  
  --success: #16a34a;
  --success-bg: #f0fdf4;
  
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  
  --border: var(--line);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px #24382a0d;
  --shadow-md: 0 6px 20px #24382a13;
  --shadow-lg: 0 10px 30px #24382a1f;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  overflow-x: clip; /* clip, unlike hidden, does not break position: sticky (header, sidebar, page nav) */
  max-width: 100vw;
  width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
}

/* Header & Navigation */
/* Header & Navigation System (Ultra-crisp & responsive) */
.site-header {
  background: #123331;
  color: var(--text-light);
  border-bottom: 1px solid rgba(201, 164, 92, 0.25);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 2vw, 1.5rem);
  height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  font-size: 1.35rem;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(201, 164, 92, 0.35));
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  line-height: 1.15;
}

.brand-motto {
  font-size: 0.62rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 1px;
}

/* Desktop Nav Links & Dropdowns */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: nowrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #c5d6d0;
  font-weight: 550;
  font-size: 0.9rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  font-family: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-link i {
  font-size: 0.85rem;
  opacity: 0.85;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  background: rgba(20, 127, 131, 0.35);
  color: #fff;
  border-bottom: 2px solid var(--gold);
}

.nav-link.highlight-teal {
  color: #a7f3d0;
  background: rgba(20, 127, 131, 0.2);
  border: 1px solid rgba(20, 127, 131, 0.4);
}
.nav-link.highlight-teal:hover, .nav-link.highlight-teal.active {
  color: #fff;
  background: rgba(20, 127, 131, 0.4);
  border-color: rgba(20, 127, 131, 0.7);
}

/* Nav Dropdown Container */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown-arrow {
  font-size: 0.68rem !important;
  margin-left: 0.2rem;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  opacity: 0.8;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
  color: var(--gold);
  opacity: 1;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 330px;
  background: rgba(10, 32, 36, 0.98);
  border: 1px solid rgba(201, 164, 92, 0.35);
  border-radius: 14px;
  padding: 0.65rem;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
  z-index: 1050;
}

/* Invisible hover bridge so menu doesn't close on mouse travel */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-header {
  padding: 0.45rem 0.75rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.35rem;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}

.dropdown-item:hover, .dropdown-item.active {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

.dropdown-item.active {
  border-left: 2px solid var(--gold);
  background: rgba(20, 127, 131, 0.25);
}

.dropdown-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.dropdown-icon.gold { background: rgba(201, 164, 92, 0.18); color: var(--gold); }
.dropdown-icon.teal { background: rgba(20, 127, 131, 0.25); color: #5eead4; }
.dropdown-icon.amber { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
.dropdown-icon.cyan { background: rgba(14, 165, 233, 0.18); color: #38bdf8; }
.dropdown-icon.purple { background: rgba(168, 85, 247, 0.18); color: #c084fc; }

.dropdown-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dropdown-title {
  font-size: 0.88rem;
  font-weight: 650;
  color: #f8fafc;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dropdown-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.35;
}

.badge-admin {
  font-size: 0.62rem;
  font-weight: 700;
  background: #ea580c;
  color: #fff;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Nav Actions (User Avatar, Logout, Hamburger) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.nav-signin-link {
  padding: 0.45rem 0.85rem;
  color: #e2e8f0;
}
.nav-signin-link:hover {
  color: #fff;
}

.nav-start-btn {
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.site-header .nav-start-btn { border-radius: .25rem; }

.nav-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.75rem;
  background: rgba(20, 127, 131, 0.25);
  border: 1px solid rgba(20, 127, 131, 0.5);
  border-radius: 999px;
  color: #e2e8f0;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.nav-user-badge:hover, .nav-user-badge.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal-light);
}

.nav-user-badge i {
  color: var(--gold);
  font-size: 0.95rem;
}

.nav-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-action-icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Off-Canvas Sidebar Panel & Backdrop (Opens without covering entire screen) */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 28, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 80vw);
  background: var(--bg-dark);
  border-right: 1px solid rgba(201, 164, 92, 0.3);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.32s;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-drawer.open {
  transform: translateX(0);
  visibility: visible;
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.5);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
}

.drawer-header {
  padding: 1.15rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #cbd5e1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
}

.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.drawer-user-card {
  padding: 1rem 1.25rem;
  background: rgba(20, 127, 131, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.drawer-user-card .user-avatar {
  font-size: 2rem;
  color: var(--gold);
}

.drawer-user-card .user-name {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
}

.drawer-user-card .user-role {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 2px;
}

.drawer-guest-card {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-links {
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.drawer-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  font-weight: 700;
  padding: 0.6rem 0.75rem 0.25rem;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  color: #cbd5e1;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
}

.drawer-link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  color: #94a3b8;
}

.drawer-link:hover, .drawer-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.drawer-link.active {
  background: rgba(20, 127, 131, 0.35);
  color: #fff;
  font-weight: 600;
}

.drawer-link.active i {
  color: var(--gold);
}

.drawer-footer {
  padding: 1.15rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}

.drawer-footer p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0 0 0.2rem 0;
}

.drawer-footer small {
  font-size: 0.75rem;
  color: var(--gold);
}

/* Mobile Bottom Navigation Bar (Fixed bottom for screens <= 768px) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(13, 40, 44, 0.98);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(201, 164, 92, 0.35);
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.4);
  z-index: 9000;
  align-items: center;
  justify-content: space-around;
  padding: 0.2rem 0.25rem env(safe-area-inset-bottom);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.3rem 0.4rem;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex: 1;
  max-width: 68px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.bottom-nav-item i {
  font-size: 1.15rem;
  line-height: 1;
}

.bottom-nav-item:hover, .bottom-nav-item.active {
  color: var(--gold);
}

.bottom-nav-item.active i {
  transform: translateY(-2px);
  filter: drop-shadow(0 2px 6px rgba(201, 164, 92, 0.45));
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--forest);
  color: #fff !important;
}

.btn-primary:hover {
  background: #193528;
}

.btn-gold {
  background: #e0c488;
  color: #193528 !important;
  font-weight: 700;
}

.btn-gold:hover {
  background: #d5b773;
}

.btn-outline {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--cream);
  border-color: #b8b39f;
}

:is(.site-header, .site-footer, .mobile-drawer, .mobile-bottom-nav, .app-sidebar.is-admin)
  :where(a, button):focus-visible { outline-color: #e0c488; }

.btn-hero-outline {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
}

.btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: #ffffff !important;
}

/* Layout & Uniform Containers */
.site-main {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.main-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex: 1;
  width: 100%;
}

/* Flash Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.925rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.alert-error {
  background: var(--danger-bg);
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* Hero Section */
.hero-box {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-surface));
  color: #fff;
  padding: 3.5rem 2.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-box::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(180,83,9,0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.6rem;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #cbd5e1;
  max-width: 700px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* Course Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.course-badge {
  display: inline-block;
  background: var(--primary-subtle);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.course-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.course-card p {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

/* Progress Bar */
.progress-container {
  margin: 1rem 0;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.progress-track {
  height: 8px;
  background: #e3e8da;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--teal-light);
  transition: width 0.4s ease;
}

/* Scripture Reading & Lesson View */
.lesson-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.lesson-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
}

.lesson-list-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.lesson-list-item:hover {
  background: #f8fafc;
}

.lesson-list-item.active {
  background: var(--primary-subtle);
  color: var(--primary);
  font-weight: 600;
}

.lesson-list-item .check {
  font-size: 0.9rem;
  color: var(--success);
}

.lesson-content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.lesson-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.scripture-box {
  background: var(--gold-bg);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: #78350f;
  line-height: 1.7;
}

.lesson-body {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.lesson-body p {
  margin-bottom: 1.5rem;
}

.lesson-body strong {
  color: var(--teal);
}

.reader-reflection {
  margin-bottom: 1.5rem;
  padding: clamp(1rem, 4vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}
.reader-reflection h2 { margin: 0 0 .55rem; color: var(--teal); font-size: 1.25rem; }
.reader-reflection textarea { width: 100%; min-height: 8rem; resize: vertical; }
.reader-reflection-note { margin: .5rem 0; color: var(--text-muted); font-size: .92rem; }
.reader-sample-label { margin: 0 0 .45rem; color: var(--text-muted); font-size: .85rem; font-weight: 700; }
.reader-options, .reader-lesson {
  margin-block: 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}
.reader-options { padding: .75rem 1rem; }
.reader-options summary { color: var(--teal); cursor: pointer; font-weight: 700; }
.reader-options[open] summary { margin-bottom: .75rem; }
.reader-options > p:last-child { margin-bottom: 0; }
.reader-unit-picker { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; margin-bottom: .75rem; }
.reader-unit-picker label { min-width: 0; max-width: 100%; }
.reader-unit-picker select { width: 100%; }
.reader-program-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.reader-lesson { padding: clamp(1rem, 4vw, 1.75rem); }
.reader-lesson-prompts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.reader-reflection-actions, .reader-finish { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .85rem; }
.reader-reflection-actions { margin-top: .85rem; }
.reader-finish { margin-bottom: 1rem; }

@media (max-width: 520px) {
  .reader-reflection-actions .btn, .reader-finish form, .reader-finish form .btn { width: 100%; min-height: 2.75rem; }
}

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: #c6d4cd;
  padding: clamp(2.25rem, 5vw, 4rem) 0 2rem;
  margin-top: auto;
  border-top: 1px solid #c9a45c66;
  font-size: 0.875rem;
  text-align: start;
}

/* ========================================================
   GRACE KINGDOM COMPONENTS (V11 DESIGN SYSTEM)
   ======================================================== */

.wrap, .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Hero Section (Edge-to-edge, full-bleed with ambient lighting) */
.prayer-hero, .hero-section {
  width: 100%;
  background: linear-gradient(145deg, #07191c 0%, #0d2c32 50%, #16464c 100%);
  color: #fff;
  padding: 4.5rem 0 5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(201, 164, 92, 0.22);
}

/* Home hero photo. Dark overlay on the left keeps the headline readable. */
.hero-section.hero-photo {
  background:
    linear-gradient(90deg, rgba(7,25,28,0.94) 0%, rgba(7,25,28,0.78) 45%, rgba(7,25,28,0.45) 100%),
    url('../images/Knowing-God_Banner1200.webp') center / cover no-repeat;
}

/* Photo at the top of an onboarding card, bleeding to the card edges */
.onboarding-card-img {
  display: block;
  width: calc(100% + 3.7rem);
  height: 150px;
  object-fit: cover;
  margin: -2.25rem -1.85rem 1.25rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* Home "Abundant Life" block: two columns on desktop, stacked on mobile */
.home-insight-grid {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.home-insight-col-divided {
  border-left: 1px solid var(--line);
  padding-left: 2rem;
}
@media (max-width: 720px) {
  .home-insight-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 1.75rem;
  }
  .home-insight-col-divided {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 1.75rem;
  }
}

/* Photo at the top of a journey stage card */
.journey-stage-img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
}

/* Full-width photo strip inside a home page block */
.home-photo-strip {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 35%;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

/* Home page: tighter section rhythm */
.hero-section.hero-photo { padding: 3.5rem 0 4rem; }
.home-section { padding: 3.25rem 0; }
.home-section-tight { padding: 2.75rem 0; }

/* Home page: gold accent on the four program cards */
.home-program { border-top: 3px solid var(--gold); }

.prayer-hero::after, .hero-section::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(201,164,92,0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: #f6d89b;
  margin: 0.25rem 0 1rem;
  font-weight: 500;
}

/* Modern Hero Grid Architecture */
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  flex-direction: column;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  background: rgba(201, 164, 92, 0.15);
  border: 1px solid rgba(201, 164, 92, 0.35);
  border-radius: 9999px;
  color: #fce7b2;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
  width: fit-content;
  backdrop-filter: blur(8px);
}

.hero-eyebrow i {
  color: var(--gold);
  font-size: 0.85rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.hero-highlight {
  background: linear-gradient(135deg, #fce7b2 0%, var(--gold) 50%, #d8b467 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.12rem;
  line-height: 1.7;
  color: #d1e7e4;
  margin-bottom: 2rem;
  max-width: 620px;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.75rem;
}

.btn-hero-cta {
  padding: 0.8rem 1.6rem;
  font-size: 0.98rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.hero-quick-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  font-size: 0.84rem;
}

.quick-links-label {
  color: #94a3b8;
  font-weight: 600;
}

.quick-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  transition: var(--transition);
}

.quick-link-pill:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.quick-link-pill.highlight {
  border-color: rgba(20, 127, 131, 0.6);
  color: #6ee7b7;
  background: rgba(20, 127, 131, 0.2);
}

.hero-scripture {
  font-size: 0.92rem;
  color: #b7d1cc;
  margin-top: 1.75rem;
  font-style: italic;
  font-family: var(--font-serif);
}

.hero-scripture small {
  font-style: normal;
  color: var(--gold);
}

/* Hero Preview Architecture Card */
.hero-card {
  background: rgba(10, 35, 39, 0.85);
  border: 1px solid rgba(201, 164, 92, 0.32);
  border-radius: var(--radius-lg);
  padding: 1.85rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.hero-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: 0.04em;
  margin: 0 0 0.25rem;
}

.hero-card-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

.hero-card-items {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.hero-card-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.95rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-card-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(201, 164, 92, 0.4);
  transform: translateX(4px);
}

.hero-card-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.hero-card-item-icon.gold { background: rgba(201, 164, 92, 0.2); color: var(--gold); }
.hero-card-item-icon.amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.hero-card-item-icon.cyan { background: rgba(14, 165, 233, 0.2); color: #38bdf8; }
.hero-card-item-icon.emerald { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.hero-card-item-text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.hero-card-item-title {
  font-size: 0.92rem;
  font-weight: 650;
  color: #fff;
  line-height: 1.25;
}

.hero-card-item-sub {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-card-item-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: #94a3b8;
}

.hero-card-status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}

.btn-outline-gold {
  border: 1px solid rgba(201, 164, 92, 0.6);
  background: rgba(201, 164, 92, 0.12);
  color: #fce7b2 !important;
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-outline-gold:hover {
  background: var(--gold);
  color: #0d282c !important;
  border-color: var(--gold);
}

/* Onboarding Section: How It Works */
.section-onboarding {
  padding: 3.25rem 0;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  width: 100%;
}

.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.onboarding-card {
  background: #fbfbfa;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.onboarding-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-light);
  background: #fff;
}

.onboarding-step-num {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
  margin-bottom: 1rem;
}

.onboarding-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}

.onboarding-icon-box.teal-bg { background: var(--teal-subtle); color: var(--teal); }
.onboarding-icon-box.gold-bg { background: var(--gold-bg); color: var(--gold-dark); }
.onboarding-icon-box.cyan-bg { background: #e0f2fe; color: #0284c7; }

.onboarding-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--teal);
  margin: 0 0 0.65rem;
  line-height: 1.3;
}

.onboarding-card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 1.5rem;
  flex-grow: 1;
}

.onboarding-card-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.onboarding-card-link:hover {
  color: var(--teal-light);
  transform: translateX(4px);
}

.gold-badge {
  background: linear-gradient(135deg, #dfbc73, var(--gold)) !important;
  color: #1b3236 !important;
}

/* Grids */
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* Feature Cards & Badges */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.tag {
  display: inline-block;
  background: var(--teal-subtle);
  color: var(--teal);
  border-radius: 30px;
  padding: 0.25rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scripture-badge {
  font-weight: 700;
  color: var(--teal-light);
  font-size: 0.95rem;
  margin: 0.25rem 0 0.5rem;
}

.prompt-box {
  border-left: 4px solid var(--gold);
  background: var(--cream);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 1rem;
}

/* Days & Movements Nav */
.days-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
}

.day-btn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.95rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--teal);
  cursor: pointer;
  transition: var(--transition);
}

.day-btn:hover {
  border-color: var(--teal-light);
  background: var(--teal-subtle);
}

.day-btn.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.movement-box {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-top: 1rem;
}

/* Lens Bar (Annual Calendar Filter) */
.lensbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 1.25rem;
}

.lensbar button {
  padding: 0.5rem 1.15rem;
  border: 1px solid #b5ccc8;
  border-radius: 20px;
  background: #fff;
  color: var(--teal);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}

.lensbar button:hover {
  border-color: var(--teal-light);
  background: var(--teal-subtle);
}

.lensbar button.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

/* 52-Week Curriculum Grid */
.curriculum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.weekcard {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.weekcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-light);
}

.weekcard .meta {
  font-size: 0.725rem;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.weekcard h3 {
  font-size: 1.15rem;
  color: var(--teal);
  margin-bottom: 0.35rem;
}

.weekcard .scripture-link {
  color: var(--teal-light);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.weekcard .reveal {
  font-size: 0.875rem;
  color: #334155;
  margin-bottom: 0.35rem;
}

.weekcard p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.btn-q1-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--teal-light);
}

.btn-q1-link:hover {
  color: var(--teal);
  text-decoration: underline;
}

/* Pathway Shell (Prayer DNA Sessions) */
.pathway-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.pathway-head {
  padding: 2rem 2.25rem;
  background: #eaf3f0;
  border-bottom: 1px solid var(--line);
}

.pathway-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.pathway-tabs button {
  border: 1px solid #9fbdb7;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.25rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--teal);
  cursor: pointer;
  transition: var(--transition);
}

.pathway-tabs button:hover {
  background: var(--teal-subtle);
}

.pathway-tabs button.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.pathway-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 520px;
}

.pathway-list {
  background: #f2f6f4;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-right: 1px solid var(--line);
}

.pathway-list button {
  text-align: left;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  padding: 0.75rem 0.9rem;
  color: var(--ink);
  cursor: pointer;
  transition: var(--transition);
}

.pathway-list button:hover {
  background: rgba(255,255,255,0.7);
}

.pathway-list button strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--teal-light);
}

.pathway-list button span {
  font-size: 0.9rem;
  font-weight: 500;
}

.pathway-list button.active {
  background: #fff;
  border-color: var(--teal-light);
  box-shadow: var(--shadow-sm);
}

.pathway-list button.active span {
  font-weight: 700;
  color: var(--teal);
}

.pathway-list button.completed strong {
  color: var(--success);
}

.pathway-content {
  padding: 2.25rem;
  min-width: 0;
}

.pathway-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pathway-status {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.pathway-note {
  margin: 1.5rem 0 1.25rem;
}

.pathway-note textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
}

.pathway-note textarea:focus {
  outline: 2px solid var(--gold);
  border-color: var(--gold);
}

.pathway-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Form Controls */
.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
}

.form-control:focus {
  outline: 2px solid var(--gold);
  border-color: var(--gold);
}

/* Discipleship Flow Steps */
.flow-steps {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.75rem 0;
}

.flow-step {
  flex: 1;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1rem;
  box-shadow: var(--shadow-sm);
}

.flow-step strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--teal);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.flow-step .step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.flow-step p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.flow-arrow {
  align-self: center;
  color: var(--gold);
  font-size: 1.5rem;
  font-weight: 700;
}

/* Library Books Grid */
.grace-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 1.5rem;
}

.library-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--gold);
}

.library-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--teal);
  margin: 0.6rem 0 0.4rem;
}

.library-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Responsive */
@media (max-width: 960px) {
  .nav-links {
    display: none !important;
  }
  .mobile-menu-btn {
    display: inline-flex !important;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .onboarding-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 900px) {
  .lesson-container {
    grid-template-columns: 1fr;
  }
  .lesson-sidebar {
    position: static;
    max-height: 300px;
  }
  .grid3, .grid4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .pathway-layout {
    grid-template-columns: 1fr;
  }
  .pathway-list {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .pathway-list button {
    min-width: 190px;
  }
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }
  body {
    padding-bottom: 68px;
  }
  .gk-sync-badge {
    bottom: 4.8rem !important;
  }
  .nav-container {
    padding: 0 1rem;
    height: 62px;
  }
  .brand-name {
    font-size: 1.05rem;
  }
  .brand-motto {
    font-size: 0.58rem;
  }
  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-hero-cta {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .grid2, .grid3, .grid4 {
    grid-template-columns: 1fr;
  }
  .flow-arrow {
    display: none;
  }
  .pathway-content {
    padding: 1.25rem;
  }
}

/* ========================================================
   MY GRACE LEARNING HOME APPLICATION (V11 INTERACTIVE APP)
   ======================================================== */

.app {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 45px rgba(22, 70, 76, 0.1);
  margin-top: 1.5rem;
}

.apphead {
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  color: #fff;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.apphead h3 {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: #fff;
}

.appbody {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 600px;
}

.side {
  background: #edf4f2;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-right: 1px solid var(--line);
}

.side button {
  background: transparent;
  text-align: left;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--ink);
  font-weight: 650;
  font-size: 0.925rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: var(--transition);
}

.side button:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--teal);
}

.side button.active {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 2px 8px rgba(22, 70, 76, 0.2);
}

.mainpanel {
  padding: 2rem 2.25rem;
  min-width: 0;
  background: #fff;
}

.view[hidden] {
  display: none !important;
}

.choice-group {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
}

.choice-group button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.15rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--teal);
  cursor: pointer;
  transition: var(--transition);
}

.choice-group button:hover {
  background: var(--teal-subtle);
  border-color: var(--teal-light);
}

.choice-group button.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.tools-grid button {
  padding: 1rem 0.75rem;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--teal);
  cursor: pointer;
  transition: var(--transition);
}

.tools-grid button:hover {
  background: var(--teal-subtle);
}

.tools-grid button.active {
  background: #dbece7;
  border-color: var(--teal-light);
  color: var(--teal-dark);
  box-shadow: 0 2px 6px rgba(20, 127, 131, 0.15);
}

.thin-progress {
  height: 9px;
  background: #e5ecea;
  border-radius: 10px;
  overflow: hidden;
  margin: 0.75rem 0 1.25rem;
}

.thin-progress span {
  display: block;
  background: linear-gradient(90deg, var(--teal-light), var(--gold));
  height: 100%;
  width: 0;
  transition: width 0.3s ease;
}

.result-item {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  transition: var(--transition);
}

.result-item:hover {
  background: #fbfdfc;
}

.result-item strong {
  display: block;
  font-size: 1.05rem;
  color: var(--teal);
  margin-bottom: 0.25rem;
}

.result-item p {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.5;
  margin: 0;
}

/* Responsive Layout & Mobile Breakpoints */
@media (max-width: 1040px) {
  .nav-links {
    display: none !important;
  }
  .mobile-menu-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 900px) {
  .appbody {
    grid-template-columns: 1fr;
  }
  .side {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    scrollbar-width: thin;
  }
  .side button {
    white-space: nowrap;
    padding: 0.5rem 0.95rem;
    font-size: 0.85rem;
    flex-shrink: 0;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #c9dcd7;
  }
  .side button.active {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
    box-shadow: 0 2px 6px rgba(22, 70, 76, 0.25);
  }
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pathway-shell {
    grid-template-columns: 1fr !important;
  }
  .pathway-sidebar {
    border-right: none !important;
    border-bottom: 1px solid var(--line) !important;
    max-height: 280px;
    overflow-y: auto;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 60px; /* Space for fixed bottom navigation */
  }
  .mobile-bottom-nav {
    display: flex !important;
  }
  .main-wrapper {
    padding: 1.25rem 1rem 5.5rem;
  }
  .hero-box {
    padding: 2rem 1.25rem;
  }
  .hero-title {
    font-size: 1.9rem;
  }
  .nav-container {
    padding: 0 1rem;
    height: 62px;
  }
  .brand-name {
    font-size: 1.05rem;
  }
  .brand-motto {
    font-size: 0.58rem;
  }
  .courses-grid {
    grid-template-columns: 1fr !important;
  }
  .curriculum-grid {
    grid-template-columns: 1fr !important;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .mainpanel {
    padding: 1.25rem 1rem;
  }
  .apphead {
    padding: 1rem 1.25rem;
  }
  .gk-sync-badge {
    bottom: 4.75rem !important;
    right: 1rem !important;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.65rem;
  }
  .choice-group button {
    flex: 1 1 calc(50% - 0.5rem);
    text-align: center;
    padding: 0.55rem 0.75rem;
    font-size: 0.825rem;
  }
  .days-nav {
    gap: 0.35rem;
  }
  .day-btn {
    padding: 0.4rem 0.65rem;
    font-size: 0.78rem;
  }
}

/* Cloud Sync Badge Indicator */
.gk-sync-badge {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  background: rgba(13, 40, 44, 0.94);
  color: #f8fafc;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid rgba(201, 164, 92, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gk-sync-badge.gk-sync-idle {
  opacity: 0.45;
  transform: translateY(2px);
}

.gk-sync-badge:hover {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.gk-sync-badge .gk-sync-icon {
  font-size: 0.95rem;
}

.gk-sync-badge.synced .gk-sync-icon {
  color: var(--gold);
}

.gk-sync-badge.saving .gk-sync-icon {
  color: #38bdf8;
  display: inline-block;
  animation: pulseSync 1s infinite alternate;
}

.gk-sync-badge.guest .gk-sync-icon {
  color: #94a3b8;
}

@keyframes pulseSync {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.2); opacity: 1; }
}

/* ==========================================================================
   The Discipleship Companion Flow & The Three Tools (Grace Kingdom V11)
   ========================================================================== */

.flow-strip {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 2rem 0 2.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.flow-box {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.15rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
}

.flow-box:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 76, 92, 0.06);
  transform: translateY(-2px);
}

.flow-box-header {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: #0f172a;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.flow-box-sub {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.45;
}

.flow-arrow-sep {
  color: #94a3b8;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 0.25rem;
}

@media (max-width: 860px) {
  .flow-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin: 1.5rem 0 2rem;
  }
  .flow-box {
    width: 100%;
    min-width: unset;
    padding: 1.1rem 1.25rem;
  }
  .flow-arrow-sep {
    transform: rotate(90deg);
    padding: 0.15rem 0;
    color: var(--gold);
    align-self: center;
  }
}

/* Three Companion Tools Grid */
.three-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-bottom: 3rem;
}

.tool-companion-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(15, 76, 92, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.tool-companion-card:hover {
  transform: translateY(-4px);
  border-color: #94a3b8;
  box-shadow: 0 12px 28px rgba(15, 76, 92, 0.08);
}

.tool-companion-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: #e6f4f1;
  color: #0f766e;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.35rem;
}

.tool-companion-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: #0b3b43;
  line-height: 1.25;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.tool-companion-desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.65;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.tool-companion-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
}

.tool-learn-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--teal);
  background: var(--teal-subtle);
  border: 1px solid #cce3de;
  transition: var(--transition);
  width: 100%;
  cursor: pointer;
}

.tool-learn-more-btn:hover {
  background: #d8ece7;
  color: var(--teal-dark);
  border-color: var(--teal-light);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(22, 70, 76, 0.12);
  text-decoration: none;
}

.tool-learn-more-btn.disabled,
span.tool-learn-more-btn {
  color: #94a3b8;
  background: #f8fafc;
  border-color: #e2e8f0;
  cursor: default;
  font-weight: 500;
  box-shadow: none;
}

.tool-learn-more-btn.disabled:hover,
span.tool-learn-more-btn:hover {
  transform: none;
  box-shadow: none;
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
}

/* Backward compatibility for tool-external-link */
.tool-external-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--teal);
  background: var(--teal-subtle);
  border: 1px solid #cce3de;
  transition: var(--transition);
  width: 100%;
}
.tool-external-link:hover {
  background: #d8ece7;
  color: var(--teal-dark);
  border-color: var(--teal-light);
  transform: translateY(-1px);
  text-decoration: none;
}

@media (max-width: 960px) {
  .three-tools-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .tool-companion-card {
    padding: 1.75rem 1.5rem;
  }
}

/* ==========================================================================
   FOOTER GRID — Responsive Layout
   ========================================================================== */

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.4rem, 4vw, 3rem);
  margin-bottom: 2rem;
}

.site-footer a { color: #e0e8e1; }
.site-footer a:hover { color: #f4dba5; text-decoration: underline; text-underline-offset: .2em; }
.site-footer .footer-home {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #fff;
  font: 700 1.45rem/1.3 var(--font-display);
}
.footer-home i { color: #e0c488; font-size: 1.15rem; }
.footer-brand > p { max-width: 22rem; margin: .65rem 0 1rem; }
.footer-brand blockquote { margin: 0; border-inline-start: 1px solid var(--gold); padding-inline-start: .8rem; }
.footer-brand blockquote p { margin: 0; font: italic .94rem/1.55 var(--font-serif); color: #f3e8cb; }
.footer-brand cite { display: block; margin-top: .2rem; font-style: normal; }
.footer-links h2 { margin: 0 0 .55rem; color: #fff; font-size: 1.06rem; }
.footer-links ul { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-block; padding-block: .14rem; }
.footer-social { display: flex; gap: .55rem; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border: 1px solid #e0c4887a; border-radius: 50%; color: #f3e8cb; text-decoration: none; }
.footer-social a:hover, .footer-social a:focus-visible { background: #e0c488; color: #123331; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.1rem; padding-top: 1.1rem; border-top: 1px solid #e0c4883f; }

/* ==========================================================================
   GLOBAL MOBILE RESPONSIVE OVERRIDES
   Full coverage: 1024px → 768px → 600px → 480px → 360px
   ========================================================================== */

/* ── Large Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand { grid-column: 1 / -1; }
  .onboarding-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* ── Tablet / Large Mobile (≤ 768px) ── */
@media (max-width: 768px) {
  /* Show mobile bottom nav, hide desktop nav links */
  .mobile-bottom-nav {
    display: flex;
  }
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }

  /* Hide desktop CTA buttons in header — already in drawer */
  .nav-signin-link,
  .nav-start-btn {
    display: none !important;
  }

  /* Shrink brand name slightly to fit mobile header */
  .brand-name {
    font-size: 1rem;
  }
  .brand-motto {
    font-size: 0.55rem;
  }

  /* Hero: single column on tablet */
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-preview-col {
    display: none; /* Hide the card column on mobile to keep hero clean */
  }
  .hero-section {
    padding: 3rem 0 3.5rem;
  }
  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.4rem);
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .hero-quick-links {
    gap: 0.45rem;
  }

  /* Footer 2-column */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  /* Section padding */
  .section-onboarding {
    padding: 3rem 0;
  }
  .onboarding-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Grid helpers */
  .grid2, .grid3, .grid4 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Main wrapper padding */
  .main-wrapper {
    padding: 1.75rem 1.25rem;
  }
  .wrap, .container {
    padding: 0 1.15rem;
  }

  /* Add bottom padding for mobile nav bar */
  body {
    padding-bottom: 64px;
  }
}

/* ── Mobile (≤ 600px) ── */
@media (max-width: 600px) {
  /* Footer single column */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  /* Nav container height */
  .nav-container {
    padding: 0 1rem;
    height: 60px;
  }

  /* Hero */
  .hero-section {
    padding: 2.5rem 0 3rem;
  }
  .hero-title {
    font-size: clamp(1.55rem, 8vw, 2.1rem);
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.65;
  }
  .hero-eyebrow {
    font-size: 0.76rem;
    padding: 0.35rem 0.8rem;
  }
  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .btn-hero-cta {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.2rem;
  }
  .hero-quick-links {
    gap: 0.35rem;
    row-gap: 0.5rem;
  }
  .quick-link-pill {
    font-size: 0.73rem;
    padding: 0.25rem 0.55rem;
  }
  .hero-scripture {
    font-size: 0.85rem;
    margin-top: 1.25rem;
  }

  /* Onboarding cards */
  .onboarding-card {
    padding: 1.75rem 1.35rem;
  }

  /* Lesson container stacks */
  .lesson-container {
    grid-template-columns: 1fr;
  }
  .lesson-sidebar {
    position: static;
    max-height: 280px;
  }
  .lesson-content-card {
    padding: 1.5rem;
  }

  /* Hero box */
  .hero-box {
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-md);
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }

  /* Curriculum grid */
  .curriculum-grid {
    grid-template-columns: 1fr;
  }

  /* Wrap padding tighter */
  .wrap, .container {
    padding: 0 1rem;
  }
  .main-wrapper {
    padding: 1.5rem 1rem;
  }

  /* Three tools */
  .three-tools-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .tool-companion-card {
    padding: 1.5rem 1.25rem;
  }
}

/* ── Small Mobile (≤ 420px) ── */
@media (max-width: 420px) {
  .brand-name {
    font-size: 0.9rem;
  }
  .nav-container {
    height: 56px;
    padding: 0 0.85rem;
  }
  .hero-title {
    font-size: clamp(1.4rem, 9vw, 1.85rem);
  }
  .hero-subtitle {
    font-size: 0.9rem;
  }
  .wrap, .container {
    padding: 0 0.85rem;
  }
  .main-wrapper {
    padding: 1.25rem 0.85rem;
  }
  /* Prevent any element overflowing body */
  * {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  img, video, iframe {
    max-width: 100%;
    height: auto;
  }
}

/* Signed-in header on small phones: keep the menu button on screen (logout and admin live in the drawer) */
@media (max-width: 480px) {
  .nav-user-badge .user-text { display: none; }
  .nav-actions .nav-action-icon { display: none; }
}

/* Home: five programs share the row without an orphan card */
.grid4.programs-five { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }


/* ==========================================================================
   Refinement layer: friendly, natural typography and calmer detail
   ========================================================================== */
body { font-size: 1.0625rem; line-height: 1.68; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.012em; text-transform: none; line-height: 1.22; font-optical-sizing: auto; }
h1 { font-weight: 700; }
.brand-name { letter-spacing: 0.03em; font-weight: 700; }
.hero-title, .hero-tagline { letter-spacing: -0.015em; text-transform: none; }
.hero-tagline { font-style: italic; font-weight: 500; }
:focus-visible { outline: 2px solid var(--teal-light); outline-offset: 3px; }
.btn, button.btn, a.btn { border-radius: 999px; font-weight: 700; letter-spacing: 0; }
.btn i { font-size: 0.9em; }
.btn .fa-arrow-right { transition: transform .2s ease; }
.btn:hover .fa-arrow-right { transform: translateX(3px); }
.card, .course-card, .feature-card { border-radius: var(--radius-md); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
html { scroll-behavior: smooth; }

/* Navigation additions */
.skip-link { position: absolute; left: -999px; top: 0; z-index: 3000; background: var(--gold); color: #1b3236; padding: 0.6rem 1rem; border-radius: 0 0 10px 0; font-weight: 700; }
.skip-link:focus { left: 0; }
.dropdown-footer-link { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0.35rem 0.5rem 0.25rem; padding: 0.65rem 0.9rem; border-top: 1px solid rgba(255,255,255,0.1); color: var(--gold) !important; font-weight: 700; font-size: 0.88rem; text-decoration: none; }
.dropdown-footer-link:hover { color: #fff !important; }
.drawer-link i { color: var(--gold); width: 1.4rem; text-align: center; }
.bottom-nav-primary { position: relative; }
.bottom-nav-primary i { background: var(--gold); color: #1b3236; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-top: -1.1rem; box-shadow: 0 4px 12px rgba(0,0,0,0.25); }
.bottom-nav-primary.active i { background: #fff; }
/* Arrows inside running text read as small connectors, not button icons */
p .fa-arrow-right, strong .fa-arrow-right, .hero-card-item-sub .fa-arrow-right, .tag .fa-arrow-right { font-size: 0.72em; margin: 0 0.3em; opacity: 0.75; }

/* Section labels used over dark heroes */
.prayer-hero .brand-badge, .prog-hero .brand-badge, .com-hero .brand-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.95rem; border-radius: 999px; background: rgba(201, 164, 92, 0.18); border: 1px solid rgba(201, 164, 92, 0.45); color: #f2dba4; font-weight: 800; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* Phones: keep the sync badge small and clear of the bottom bar and page text */
@media (max-width: 768px) {
  .gk-sync-badge { bottom: 5.4rem !important; right: 0.75rem !important; padding: 0.55rem 0.7rem !important; border-radius: 999px; }
  .gk-sync-badge .gk-sync-text { display: none; }
  .bottom-nav-item span { white-space: nowrap; }
}

/* Card photos bleed to the card edge at every width (padding changes on phones) */
.onboarding-card-img { flex-shrink: 0; max-width: none; }
@media (max-width: 768px) {
  .onboarding-card-img { width: calc(100% + 2.7rem); margin: -1.75rem -1.35rem 1.25rem; }
}
.onboarding-card { overflow: hidden; }

/* Members-only teaser shown on public pages in place of a study reader */
.members-teaser { display: flex; gap: 1.5rem; align-items: flex-start; padding: 2rem; border-top: 4px solid var(--gold); }
.members-teaser-icon { flex: 0 0 auto; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--teal-subtle); color: var(--teal); display: flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.members-teaser-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; color: var(--ink); }
.members-teaser-points i { color: var(--teal-light); margin-right: 0.4rem; }
@media (max-width: 600px) { .members-teaser { flex-direction: column; padding: 1.4rem; } }

/* Admin area: same page frame as the rest of the site */
.admin-shell { max-width: 1120px; margin: 0 auto; }
.admin-shell .brand-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.9rem; border-radius: 999px; color: #fff; font-weight: 800; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; }
.admin-shell table { width: 100%; }
@media (max-width: 720px) { .admin-shell table { display: block; overflow-x: auto; } }

/* Daily rhythm: Today's Word, week strip and celebrations */
.word-card { display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center; background: linear-gradient(135deg, #fffdf7, #f7efd9); border: 1px solid var(--gold-border); border-left: 5px solid var(--gold); border-radius: var(--radius-md); padding: 1.35rem 1.6rem; }
.word-icon { width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--teal); color: #f2dba4; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.word-eyebrow { font-size: 0.72rem; letter-spacing: 0.1em; font-weight: 800; text-transform: uppercase; color: var(--gold-dark); }
.word-ref { font-family: var(--font-display); font-size: 1.35rem; color: var(--teal); margin: 0.1rem 0; }
.word-title { font-weight: 700; color: var(--ink); }
.word-prompt { margin: 0.25rem 0 0; font-family: var(--font-serif); font-style: italic; color: var(--text-muted); max-width: 640px; }
@media (max-width: 720px) { .word-card { grid-template-columns: 1fr; text-align: left; } .word-card .btn { width: 100%; } }
.week-strip { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.1rem 1.25rem; }
.week-strip h3 { margin: 0 0 0.6rem; font-size: 1rem; color: var(--teal); display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.week-strip h3 small { font-family: var(--font-sans); font-weight: 600; color: var(--text-muted); font-size: 0.8rem; }
.week-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.4rem; text-align: center; }
.week-dot { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; font-size: 0.72rem; color: var(--text-muted); font-weight: 700; }
.week-dot i { width: 2rem; height: 2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--cream); color: transparent; border: 2px solid var(--line); font-size: 0.8rem; }
.week-dot.done i { background: var(--teal); border-color: var(--teal); color: #fff; animation: dotPop .4s ease; }
.week-dot.today i { border-color: var(--gold); }
.week-dot.future { opacity: 0.45; }
.week-note { margin: 0.8rem 0 0; font-size: 0.9rem; color: var(--text-muted); }
@keyframes dotPop { 0% { transform: scale(0.6); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.celebrate { display: flex; gap: 1rem; align-items: center; background: #f1f9f6; border: 1px solid #bfe0d6; border-radius: var(--radius-md); padding: 1rem 1.25rem; margin-bottom: 1.25rem; animation: celebrateIn .5s ease; }
.celebrate-week, .celebrate-program { background: linear-gradient(135deg, #fffdf7, #f7efd9); border-color: var(--gold-border); }
.celebrate-icon { flex: 0 0 auto; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: var(--teal); color: #f2dba4; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.celebrate strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--teal); }
.celebrate p { margin: 0.15rem 0; color: var(--ink); }
.celebrate em { font-family: var(--font-serif); color: var(--text-muted); }
@keyframes celebrateIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.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; }

.prof .brand-badge { display: inline-flex; padding: 0.25rem 0.9rem; border-radius: 999px; background: var(--cream); border: 1px solid var(--gold-border); color: var(--gold-dark); font-weight: 800; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* Photo heroes: add .hero-img plus a photo modifier to any hero. The overlay is
   darkest on the left so headings stay readable on every photo. */
.hero-img {
  background:
    linear-gradient(95deg, #102b28ed 0%, #102b28c4 50%, #102b285e 100%),
    var(--bg-dark) var(--hero-photo) center / cover no-repeat !important;
  border-bottom: 1px solid var(--gold);
}
.hero-prayer     { --hero-photo: url('../images/web/prayer.jpg'); }
.hero-atlas      { --hero-photo: url('../images/web/atlas.jpg'); }
.hero-situations { --hero-photo: url('../images/web/situations.jpg'); }
.hero-defence    { --hero-photo: url('../images/web/defence.jpg'); }
.hero-crucible   { --hero-photo: url('../images/web/crucible.jpg'); }
.hero-community  { --hero-photo: url('../images/web/community.jpg'); }
.hero-knowing    { --hero-photo: url('../images/web/knowing.jpg'); }
.hero-journeys   { --hero-photo: url('../images/web/journeys.jpg'); }
.hero-learning   { --hero-photo: url('../images/web/learning.jpg'); }
.hero-programs   { --hero-photo: url('../images/web/programs.jpg'); }
.hero-outreach   { --hero-photo: url('../images/web/outreach.jpg'); }
@media (max-width: 700px) {
  .hero-img { background:
    linear-gradient(180deg, #102b28df, #102b28cc),
    var(--bg-dark) var(--hero-photo) center / cover no-repeat !important; }
}

/* Photo strip above a sign-in or registration card */
.auth-photo { display: block; width: calc(100% + 5rem); height: 150px; object-fit: cover; margin: -2.5rem -2.5rem 1.75rem; border-radius: var(--radius-md) var(--radius-md) 0 0; }

/* ==========================================================================
   App shell: sidebar + content for signed-in people (learner and admin)
   ========================================================================== */
.app-frame { display: grid; grid-template-columns: 252px minmax(0, 1fr); align-items: start; flex: 1; width: 100%; }
.app-content { min-width: 0; display: flex; flex-direction: column; min-height: calc(100vh - var(--gk-hdr)); }
.app-sidebar {
  position: sticky; top: var(--gk-hdr); align-self: start;
  height: calc(100vh - var(--gk-hdr)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg-card); border-right: 1px solid var(--line);
  padding: 1.1rem 0.85rem 1.5rem;
}
.app-sidebar.is-admin { background: var(--bg-dark); border-right-color: #c9a45c40; }
.app-side-user { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.55rem 1rem; margin-bottom: 0.4rem; border-bottom: 1px solid var(--line); }
.app-side-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--teal); color: #f2dba4; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-family: var(--font-display); flex: none; }
.app-side-user strong { display: block; color: var(--ink); font-size: 0.95rem; line-height: 1.2; overflow-wrap: anywhere; }
.app-side-user small { color: var(--text-muted); font-size: 0.75rem; }
.app-side-group { margin-top: 1.1rem; }
.app-side-title { font-size: .8rem; font-weight: 800; color: var(--gold-dark); padding: 0 .7rem .3rem; }
.app-side-disclosure > summary {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .45rem .7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  list-style: none;
  color: var(--teal);
  font-size: .9rem;
  font-weight: 750;
}
.app-side-disclosure > summary::-webkit-details-marker { display: none; }
.app-side-disclosure > summary:hover { background: var(--cream); }
.app-side-disclosure > summary i:first-child { width: 1.15rem; flex: none; text-align: center; color: var(--gold-dark); }
.app-side-disclosure .app-side-chevron { margin-inline-start: auto; font-size: .7rem; }
.app-side-disclosure[open] .app-side-chevron { transform: rotate(180deg); }
.app-side-disclosure .app-side-link { margin-inline-start: .4rem; }
.drawer-disclosure { margin-top: .35rem; }
.drawer-disclosure > summary { padding: .55rem .8rem; color: #ecd5a5; font-size: .88rem; font-weight: 750; cursor: pointer; }
.drawer-disclosure > summary:focus-visible { outline-color: #ecd5a5; }
.drawer-disclosure .drawer-link { padding-inline-start: 1.35rem; }
.app-side-link { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.7rem; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 0.92rem; text-decoration: none; transition: background .15s, color .15s; }
.app-side-link i { flex: none; width: 1.15rem; text-align: center; color: var(--gold-dark); font-size: 0.95rem; }
.app-side-link:hover { background: var(--cream); }
.app-side-link.active { background: var(--teal); color: #fff; }
.app-side-link.active i { color: #f2dba4; }
.app-sidebar.is-admin .app-side-user { border-color: rgba(255,255,255,0.12); }
.app-sidebar.is-admin .app-side-user strong { color: #fff; }
.app-sidebar.is-admin .app-side-title { color: #e0c488; }
.app-sidebar.is-admin .app-side-user small { color: #94a3b8; }
.app-sidebar.is-admin .app-side-avatar { background: var(--gold); color: #0f2e33; }
.app-sidebar.is-admin .app-side-link { color: #d9e6e4; }
.app-sidebar.is-admin .app-side-link i { color: var(--gold); }
.app-sidebar.is-admin .app-side-link:hover { background: rgba(255,255,255,0.08); }
.app-sidebar.is-admin .app-side-link.active { background: rgba(201,164,92,0.2); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }

@media (max-width: 960px) {
  .app-frame { display: block; }
  .app-content { min-height: 0; }
  /* Learners already have the bottom bar and menu on phones; admins get a scrollable tab row */
  .app-sidebar { display: none; }
  .app-frame.is-admin .app-sidebar { display: block; position: sticky; top: var(--gk-hdr); z-index: 40; height: auto; padding: 0.5rem 0.75rem; border-right: 0; border-bottom: 1px solid rgba(201,164,92,0.25); overflow-x: auto; }
  .app-frame.is-admin .app-side-user, .app-frame.is-admin .app-side-title { display: none; }
  .app-frame.is-admin nav { display: flex; gap: 0.3rem; width: max-content; }
  .app-frame.is-admin .app-side-group { display: contents; }
  .app-frame.is-admin .app-side-link { white-space: nowrap; padding: 0.5rem 0.8rem; }
}

/* ==========================================================================
   Admin pages: page header, stat tiles, tables, forms
   ========================================================================== */
.adm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.adm-head h1 { font-family: var(--font-display); font-size: 1.9rem; color: var(--ink); margin: 0; }
.adm-head p { margin: 0.25rem 0 0; color: var(--text-muted); }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.9rem; margin-bottom: 1.5rem; }
.adm-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1rem 1.15rem; display: flex; gap: 0.85rem; align-items: center; }
.adm-stat .ico { width: 2.6rem; height: 2.6rem; border-radius: 12px; background: #e6f0ef; color: var(--teal); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.adm-stat strong { display: block; font-size: 1.6rem; line-height: 1.1; color: var(--teal); }
.adm-stat span { font-size: 0.8rem; color: var(--text-muted); }
.adm-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; }
@media (max-width: 1100px) { .adm-grid { grid-template-columns: 1fr; } }
.adm-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.25rem 1.35rem; margin-bottom: 1.1rem; }
.adm-card > h2 { font-size: 1.1rem; color: var(--teal); margin: 0 0 0.85rem; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.adm-card > h2 a { font-size: 0.85rem; font-weight: 600; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.adm-table th { text-align: left; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); padding: 0.6rem 0.7rem; border-bottom: 2px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 0.65rem 0.7rem; border-bottom: 1px solid #eef2f1; vertical-align: middle; }
.adm-table tr:hover td { background: #fbfaf6; }
.adm-table .muted { color: var(--text-muted); font-size: 0.82rem; }
.adm-scroll { overflow-x: auto; }
.adm-tag { display: inline-block; white-space: nowrap; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; background: #e6f0ef; color: var(--teal); }
.adm-tag.admin { background: #fde8d3; color: #9a4a0a; }
.adm-tag.off { background: #eee; color: #666; }
.adm-tag.test { background: #fff3cd; color: #7a5b00; }
.adm-toolbar { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.adm-toolbar input[type=search], .adm-toolbar select { padding: 0.55rem 0.8rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.adm-toolbar input[type=search] { flex: 1 1 220px; min-width: 0; }
.adm-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.8rem; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--teal); font: inherit; font-weight: 700; font-size: 0.85rem; cursor: pointer; text-decoration: none; }
.adm-btn:hover { border-color: var(--gold); }
.adm-btn.primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.adm-btn.danger { color: #b91c1c; border-color: #f3c4c4; }
.adm-btn.danger:hover { background: #fdecec; border-color: #e99; }
.adm-btn.solid-danger { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.adm-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.adm-modal { position: fixed; inset: 0; z-index: 10000; background: rgba(10,25,28,0.6); display: none; align-items: center; justify-content: center; padding: 1rem; }
.adm-modal.open { display: flex; }
.adm-modal > div { background: #fff; border-radius: var(--radius-md); padding: 1.5rem; width: min(440px, 100%); max-height: 90vh; overflow-y: auto; }
.adm-modal h3 { margin: 0 0 0.75rem; color: var(--teal); }
.adm-modal label { display: block; font-weight: 700; font-size: 0.85rem; margin: 0.75rem 0 0.25rem; }
.adm-modal input, .adm-modal select { width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.adm-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; }
.adm-quick a { display: flex; gap: 0.6rem; align-items: center; padding: 0.7rem 0.85rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--teal); font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.adm-quick a:hover { border-color: var(--gold); background: var(--cream); }
.adm-quick i { color: var(--gold-dark); }
.admin-shell { max-width: none; }
.app-frame.is-admin .main-wrapper { max-width: 1180px; padding: 1.75rem 1.5rem 3rem; margin: 0; }
@media (max-width: 960px) { .app-frame.is-admin .main-wrapper { padding: 1.25rem 1rem 2.5rem; } }

/* ==========================================================================
   Sign in / Create account: photo panel + form
   ========================================================================== */
.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  width: min(100% - clamp(2rem, 9%, 7rem), 69rem);
  margin: clamp(1.4rem, 5vw, 4rem) auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}
.auth-aside {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: .65rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    linear-gradient(180deg, #12333122 0%, #102a23ab 56%, #102a23f5 100%),
    var(--bg-dark) var(--auth-photo) center / cover no-repeat;
  color: #fff;
}
.auth-aside h2 { color: inherit; font-size: clamp(1.65rem, 3vw, 2.4rem); margin: 0; }
.auth-aside > p { max-width: 25rem; margin: 0; color: #edf1e9; }
.auth-aside blockquote {
  margin: .65rem 0 0;
  padding-inline-start: .8rem;
  border-inline-start: 2px solid #e0c488;
  color: #f3e8cb;
  font: italic .95rem/1.55 var(--font-serif);
}
.auth-aside blockquote p { margin: 0; }
.auth-aside cite { display: block; margin-top: .3rem; font: 700 .84rem/1.4 var(--font-sans); }
.auth-main { display: grid; align-items: center; justify-items: center; padding: clamp(1.25rem, 4.75vw, 3.8rem); }
.auth-card { width: 100%; max-width: 28rem; }
.auth-card h1 { font-size: clamp(1.85rem, 3.3vw, 2.8rem); color: var(--teal); margin: 0 0 .4rem; }
.auth-card .lead { color: var(--text-muted); margin: 0 0 1.4rem; }
.auth-field { margin-bottom: .95rem; }
.auth-field label { display: block; font-size: .95rem; font-weight: 750; color: var(--teal); margin-bottom: .3rem; }
.auth-field input {
  width: 100%;
  min-height: 2.9rem;
  padding: .65rem .85rem;
  border: 1px solid #b6b7a8;
  border-radius: var(--radius-sm);
  outline-offset: 2px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.auth-field input:focus { outline: 2px solid var(--teal-light); }
.auth-pass { position: relative; }
.auth-pass input { padding-right: 3.25rem; }
.auth-pass button {
  position: absolute;
  right: .3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.auth-pass button:hover { color: var(--teal); background: var(--cream); }
.auth-hint { font-size: .85rem; color: var(--text-muted); margin-top: .35rem; }
.auth-options { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; margin-bottom: 1rem; font-size: .92rem; }
.auth-options label { display: inline-flex; align-items: center; gap: .5rem; min-height: 2rem; cursor: pointer; }
.auth-options input { accent-color: var(--forest); width: 1.05rem; height: 1.05rem; }
.auth-card a { font-weight: 750; text-decoration: underline; text-underline-offset: .18em; }
.auth-submit { width: 100%; min-height: 2.9rem; font-size: 1rem; }
.auth-alt { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: .95rem; color: var(--text-muted); font-size: .92rem; }
.auth-img-login { --auth-photo: url('../images/web/login.jpg'); }
.auth-img-register { --auth-photo: url('../images/web/register.jpg'); }

@media (max-width: 790px) {
  .auth-split { grid-template-columns: minmax(0, 1fr); max-width: 34rem; }
  .auth-aside { min-height: 11rem; }
}

/* Header height, kept in step with the header's own breakpoints */
:root { --gk-hdr: 68px; }
@media (max-width: 768px) { :root { --gk-hdr: 62px; } }
@media (max-width: 600px) { :root { --gk-hdr: 60px; } }
@media (max-width: 420px) { :root { --gk-hdr: 56px; } }

/* Admin tables on phones: keep names readable, drop the secondary columns */
.admin-shell .adm-table { display: table; min-width: 460px; }
.adm-table td:nth-child(2) { min-width: 150px; }
@media (max-width: 720px) {
  .adm-table .hide-sm { display: none; }
  .adm-table { min-width: 0; }
  .adm-actions { flex-wrap: nowrap; }
  .adm-actions .adm-btn { padding: 0.4rem 0.55rem; }
}
.adm-pass { white-space: nowrap; }

/* ==========================================================================
   App shell v2: one frame for every signed-in page
   - full-width app header (the sidebar replaces the top menu)
   - collapsible sidebar, remembered per browser
   - one centered content column and one page-title style
   - a slim footer line instead of the large site footer
   ========================================================================== */
.has-sidebar .nav-links { display: none; }
.has-sidebar .nav-container { max-width: none; padding: 0 1.25rem; gap: 0.9rem; justify-content: flex-start; }
.has-sidebar .nav-actions { margin-left: auto; }
.sb-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; flex: none; border-radius: 10px; border: 1px solid rgba(255,255,255,0.18); background: transparent; color: #e5eeee; cursor: pointer; transition: background .15s; }
.sb-toggle:hover { background: rgba(255,255,255,0.1); }
@media (max-width: 960px) { .sb-toggle { display: none; } .has-sidebar .nav-container { padding: 0 1rem; } }

.app-frame { grid-template-columns: var(--sb-w, 252px) minmax(0, 1fr); transition: grid-template-columns .22s ease; }
.app-sidebar { transition: padding .22s ease; }

/* Collapsed: icon rail with native tooltips */
@media (min-width: 961px) {
  .sb-collapsed .app-frame { --sb-w: 74px; }
  .sb-collapsed .app-sidebar { padding-left: 0.55rem; padding-right: 0.55rem; }
  .sb-collapsed .app-side-user { justify-content: center; padding: 0.35rem 0 0.9rem; }
  .sb-collapsed .app-side-user > div, .sb-collapsed .app-side-title, .sb-collapsed .app-side-link span { display: none; }
  .sb-collapsed .app-side-group { margin-top: 0.55rem; padding-top: 0.55rem; border-top: 1px solid var(--line); }
  .sb-collapsed .app-sidebar.is-admin .app-side-group { border-color: rgba(255,255,255,0.12); }
  .sb-collapsed .app-side-link { justify-content: center; padding: 0.7rem 0; }
  .sb-collapsed .app-side-link i { width: auto; font-size: 1.1rem; }
  .sb-collapsed .app-side-disclosure > summary { justify-content: center; padding: .65rem 0; }
  .sb-collapsed .app-side-disclosure > summary span, .sb-collapsed .app-side-chevron { display: none; }
  .sb-collapsed .app-side-disclosure .app-side-link { margin-inline-start: 0; }
}

/* One content column, centred, the same width everywhere */
.has-sidebar .main-wrapper, .app-frame.is-admin .main-wrapper { max-width: 1180px; margin: 0 auto; padding: 1.75rem 1.5rem 3rem; }
.has-sidebar .wrap { max-width: 1180px; }
.has-sidebar .dash, .has-sidebar .admin-shell { max-width: none; }
@media (max-width: 960px) { .has-sidebar .main-wrapper, .app-frame.is-admin .main-wrapper { padding: 1.25rem 1rem 2.5rem; } .has-sidebar .wrap { padding: 0 1rem; } }

/* Heroes are compact and share one rhythm inside the shell */
.has-sidebar .prayer-hero, .has-sidebar .com-hero, .has-sidebar .prog-hero { padding: 2.3rem 0 2.5rem; }
.has-sidebar .hero-title, .has-sidebar .com-hero h1, .has-sidebar .prog-hero h1 { font-size: clamp(1.9rem, 3vw, 2.4rem); margin-bottom: 0.5rem; }
.has-sidebar .hero-tagline { font-size: 1.15rem; margin-bottom: 0.6rem; }
.has-sidebar .hero-subtitle { font-size: 1.02rem; margin-bottom: 1.25rem; }

/* One page-title style */
.dash-top h1, .adm-head h1, .prof h1 { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.2; color: var(--ink); }
.adm-overview {
  padding: clamp(1rem, 3vw, 1.8rem);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--gold);
  border-radius: var(--radius-md);
  background: var(--cream);
}

/* Admin stat tiles: a clean grid instead of an uneven wrap */
.adm-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .adm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Slim footer line */
.app-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem 1rem; padding: 0.9rem 1.5rem; background: #fff; border-top: 1px solid var(--line); color: var(--text-muted); font-size: 0.82rem; }
.app-foot nav { display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; }
.app-foot a { color: var(--text-muted); text-decoration: underline; text-underline-offset: .2em; }
.app-foot a:hover { color: var(--teal); }
@media (max-width: 768px) { .app-foot { padding-bottom: 5.2rem; } }

/* Narrow reading pages align to the same left edge as every other page */
.has-sidebar .prof, .has-sidebar .cru-wrap { margin-left: 0; margin-right: auto; }

/* Programs: the cards overlap the hero by 2rem, so leave room for them */
.has-sidebar .prog-hero { padding-bottom: 3.6rem; }

/* Admin: module rows and quiz headers stay readable on phones */
.adm-row3 { display: grid; grid-template-columns: 80px 1fr 140px; gap: 1rem; margin-bottom: 1rem; align-items: center; }
.adm-row3 > :last-child { text-align: right; }
.adm-qhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem 1rem; margin-bottom: 1.25rem; }
.adm-qhead > div:first-child { min-width: 0; flex: 1 1 260px; }
.adm-qpass { text-align: right; }
@media (max-width: 720px) {
  .adm-row3 { grid-template-columns: 80px 1fr; }
  .adm-row3 > :last-child { grid-column: 1 / -1; text-align: left; }
  .adm-qhead { flex-direction: column; }
  .adm-qhead > div:first-child { flex: 0 0 auto; }
  .adm-qpass { text-align: left; }
  .app-frame.is-admin .main-wrapper div[style*="padding: 2rem"], .app-frame.is-admin .main-wrapper div[style*="padding: 1.75rem"] { padding: 1.1rem !important; }
}

/* ==========================================================================
   Sidebar without an inner scrollbar: it takes its natural height and runs the full height
   of the page. It is pinned in view only when it fits the window (see app.js).
   ========================================================================== */
.app-frame { align-items: stretch; }
.app-sidebar { position: static; align-self: stretch; height: auto; overflow: visible; padding: 0; }
.app-side-inner { padding: 1rem 0.8rem 1.5rem; }
.app-sidebar.is-sticky .app-side-inner { position: sticky; top: var(--gk-hdr); }
.app-side-group { margin-top: 0.85rem; }
.app-side-link { padding: 0.5rem 0.7rem; }
.app-side-user { padding: 0.4rem 0.55rem 0.85rem; }
@media (min-width: 961px) {
  .sb-collapsed .app-sidebar { padding: 0; }
  .sb-collapsed .app-side-inner { padding-left: 0.55rem; padding-right: 0.55rem; }
}
@media (max-width: 960px) {
  .app-frame.is-admin .app-sidebar { position: sticky; top: var(--gk-hdr); align-self: auto; }
  .app-frame.is-admin .app-side-inner { padding: 0; }
}

/* Short windows: tighten the sidebar so the whole menu fits and can stay pinned */
@media (min-width: 961px) and (max-height: 760px) {
  .app-side-user { display: none; }
  .app-side-inner { padding-top: 0.6rem; }
  .app-side-group { margin-top: 0.5rem; }
  .app-side-link { padding: 0.38rem 0.65rem; }
}

/* Slightly tighter default spacing so the longer learner menu fits a normal window */
.app-side-link { padding: 0.43rem 0.7rem; }
.app-side-group { margin-top: 0.7rem; }
@media (min-width: 961px) and (max-height: 760px) { .app-side-link { padding: 0.38rem 0.65rem; } .app-side-group { margin-top: 0.5rem; } }

.btn-sm { padding: .35rem .75rem; font-size: .82rem; }
