/* Anthrovia shared theme — keep in sync with index.html page-local map styles */
    :root {
      --bg: #faf8f4;
      --surface: rgba(255, 253, 250, 0.88);
      --surface-strong: #fffcf8;
      --text: #1d1b18;
      --muted: #7a736a;
      --line: rgba(72, 66, 58, 0.09);

      --accent: #1f2348;
      --accent-2: #2f6df6;

      /* Core + Bible query send button (shared .send-button) — navy family only, no bright UI blue. */
      --navy: #1f2348;
      --navy-light: #3a4562;
      --send-btn-bg: linear-gradient(180deg, #343a63 0%, var(--navy) 100%);
      --send-btn-hover-bg: linear-gradient(180deg, #455a6e 0%, #354456 45%, var(--navy-light) 100%);
      --send-btn-hover-shadow: 0 8px 22px rgba(22, 30, 40, 0.26);
      --send-btn-hover-shadow-bible: 0 9px 26px rgba(20, 28, 36, 0.3);

      --shadow: 0 12px 32px rgba(31, 29, 26, 0.08);
      --shadow-inset: 0 4px 16px rgba(31, 29, 26, 0.045);
      --radius: 18px;
      --radius-lg: 22px;
      /* Subtle warm gold for eyebrows and small accents only (not action colors). */
      --gold-soft: rgba(155, 123, 79, 0.88);
      /* Muted sage for study-path lesson navigation hovers (logo-adjacent, not bright UI blue). */
      --study-sage: #5f6d5a;
      --study-sage-deep: #4f5c4b;
      --study-sage-soft: rgba(95, 109, 88, 0.12);
      --study-sage-border: rgba(95, 109, 88, 0.34);
      --study-sage-ring: rgba(95, 109, 88, 0.42);
      /* Shared Bible action hover — reference: study-path “Next Lesson” (.btn-theme in step nav). */
      --anthrovia-green: var(--study-sage);
      --anthrovia-green-deep: var(--study-sage-deep);
      --anthrovia-green-soft: var(--study-sage-soft);
      --anthrovia-green-border: var(--study-sage-border);
      --anthrovia-green-ring: var(--study-sage-ring);
      --anthrovia-action-hover: linear-gradient(180deg, #6d7868 0%, var(--anthrovia-green) 100%);
      --anthrovia-action-hover-shadow: 0 6px 18px rgba(79, 92, 75, 0.22);
    }

    * { box-sizing: border-box; }

    body {
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      background:
        radial-gradient(circle at top left, rgba(155,123,79,0.06), transparent 32%),
        radial-gradient(circle at top right, rgba(47,109,246,0.04), transparent 30%),
        var(--bg);
      color: var(--text);
      margin: 0;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    .container {
      max-width: 980px;
      width: 100%;
      margin: 0 auto;
      padding: 24px 18px 18px;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }

    #header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      margin-bottom: 1rem;
      flex-wrap: wrap;
    }

    .brand-wrap {
      display: flex;
      align-items: center;
      gap: 0.65rem;
    }

    a.brand-wrap {
      text-decoration: none;
      color: inherit;
      cursor: pointer;
    }

    a.brand-wrap:focus-visible {
      outline: 2px solid var(--accent-2);
      outline-offset: 3px;
      border-radius: 10px;
    }

    #header h1 {
      line-height: 1;
      font-size: 1.8rem;
      margin: 0;
      font-weight: 650;
      letter-spacing: -0.03em;
      color: var(--text);
    }

    #logo {
      display: block;
      width: auto;
      height: auto;
      max-height: 42px;
      max-width: min(200px, 42vw);
      object-fit: contain;
      object-position: left center;
      flex-shrink: 0;
      vertical-align: middle;
    }

    /* Bible mark reads larger than Core at equal box; keep header scale ≤ Core (trim asset for a perfect match). */
    #logo.header-logo-bible {
      max-height: 36px;
      max-width: min(168px, 38vw);
    }

    .top-nav {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      background: rgba(255,255,255,0.78);
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 0.32rem;
      backdrop-filter: blur(10px);
      box-shadow: var(--shadow-inset);
    }

    .nav-btn {
      appearance: none;
      border: none;
      background: transparent;
      color: var(--muted);
      padding: 0.7rem 1rem;
      border-radius: 999px;
      font-size: 0.95rem;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    }

    .nav-btn:hover:not(.active) {
      color: var(--text);
      background: rgba(255, 255, 255, 0.55);
    }

    .nav-btn.active {
      background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.97) 100%);
      color: var(--accent);
      font-weight: 650;
      box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 4px 16px rgba(31, 35, 72, 0.09),
        0 0 0 1px rgba(31, 35, 72, 0.07);
    }

    a.nav-btn {
      text-decoration: none;
      display: inline-block;
      text-align: center;
      font: inherit;
      color: inherit;
    }

    .panel {
      display: none;
      flex-direction: column;
      min-height: 0;
      flex: 1;
    }

    .panel.active {
      display: flex;
    }

    .hero-card,
    #chat-shell,
    #bible-chat-shell,
    .about-card,
    #legal-footer,
    .study-surface {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
    }

    .hero-card {
      padding: 1.35rem 1.4rem;
      margin-bottom: 1rem;
      display: grid;
      grid-template-columns: 1.3fr 0.9fr;
      gap: 1rem;
      align-items: start;
    }

    .hero-card h2 {
      margin: 0 0 0.4rem;
      font-size: 1.25rem;
      line-height: 1.2;
      letter-spacing: -0.03em;
    }

    .hero-card p {
      margin: 0;
      color: var(--muted);
      line-height: 1.6;
      font-size: 0.97rem;
    }

    .hero-badges {
      display: flex;
      gap: 0.55rem;
      flex-wrap: wrap;
      justify-content: flex-end;
      align-content: start;
    }

    .hero-badge {
      padding: 0.26rem 0.52rem;
      background: rgba(31, 35, 72, 0.035);
      border: 1px solid rgba(31, 35, 72, 0.08);
      color: rgba(31, 35, 72, 0.78);
      border-radius: 10px;
      font-size: 0.76rem;
      font-weight: 500;
      cursor: default;
      user-select: none;
      pointer-events: none;
    }

    #bible-panel > .hero-card {
      margin-bottom: 0.42rem;
    }

    #bible-panel .bible-access-note {
      margin: 0.08rem 0 0.52rem 0.12rem;
      padding: 0 0.1rem;
      font-size: 0.68rem;
      color: var(--muted);
      opacity: 0.68;
      letter-spacing: 0.02em;
    }

    .bible-guided-path-card {
      margin: 0.3rem 0 0.45rem;
      padding: 0.72rem 0.86rem 0.76rem;
      border-radius: var(--radius);
      border: 1px solid rgba(31, 35, 72, 0.1);
      background: linear-gradient(160deg, rgba(47, 109, 246, 0.06) 0%, rgba(255, 255, 255, 0.68) 58%);
      box-shadow: var(--shadow-inset);
    }

    .bible-guided-path-title {
      margin: 0 0 0.16rem;
      font-size: 0.88rem;
      font-weight: 650;
      color: var(--text);
      letter-spacing: -0.01em;
    }

    .bible-guided-path-copy {
      margin: 0 0 0.48rem;
      font-size: 0.81rem;
      color: var(--muted);
      line-height: 1.45;
      max-width: 38rem;
    }

    .bible-guided-path-link {
      display: inline-block;
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--accent);
      text-decoration: none;
      padding: 0.32rem 0.78rem;
      border-radius: 999px;
      border: 1px solid rgba(47, 109, 246, 0.22);
      background: rgba(255, 255, 255, 0.78);
      transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    }

    .bible-guided-path-link:hover {
      background: rgba(31, 35, 72, 0.05);
      border-color: rgba(47, 109, 246, 0.35);
      transform: translateY(-1px);
    }

    #chat-shell,
    #bible-chat-shell {
      display: flex;
      flex-direction: column;
      padding: 0.9rem 0.95rem 0.85rem;
      flex: 1;
      min-height: 0;
    }

    body.bible-mode {
      --bg: #fcfbf8;
      --surface: #ffffff;
      --surface-strong: #ffffff;
      --text: #26231f;
      --muted: #5c5751;
      --line: rgba(28, 36, 68, 0.08);
      --accent: #1f2957;
      --navy: #1f2957;
      --navy-light: #2d3a6e;
      --gold-soft: rgba(176, 138, 86, 0.65);
      background: #fcfbf8;
      color: #26231f;
    }

    body.bible-mode #bible-chat-shell {
      background: transparent;
      border: none;
      box-shadow: none;
      backdrop-filter: none;
      padding: 0.25rem 0.15rem 0.2rem;
    }

    #chat-container,
    #bible-chat-container {
      flex: 1;
      overflow-y: auto;
      background: transparent;
      margin-bottom: 0.5rem;
      padding: 0.5rem 0.35rem 0.2rem;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }

    #bible-chat-shell #bible-chat-container {
      margin-bottom: 0.35rem;
    }

    body.bible-mode #bible-chat-shell #bible-chat-container {
      margin-bottom: 0.25rem;
      padding: 0.2rem 0.1rem 0.1rem;
    }

    body.bible-mode #bible-chat-messages {
      min-height: 0;
      gap: 1.35rem;
      width: 100%;
      box-sizing: border-box;
    }

    body.bible-mode #bible-chat-messages .message-answer {
      background: #ffffff;
      box-shadow: 0 10px 26px rgba(28, 36, 68, 0.07);
    }

    #chat-messages,
    #bible-chat-messages {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      flex: 1;
      min-height: 120px;
    }

    .search-guidance {
      flex-shrink: 0;
      padding: 0.2rem 0.3rem 0.45rem;
    }

    .search-helper {
      margin: 0;
      font-size: 0.82rem;
      color: rgba(92, 87, 81, 0.92);
      line-height: 1.5;
      max-width: 40rem;
    }

    .search-guidance .suggestion-chips {
      margin-top: 0.5rem;
    }

    .search-guidance .suggestion-chip {
      font-weight: 500;
      font-size: 0.8rem;
      padding: 0.3rem 0.64rem;
      background: rgba(255, 255, 255, 0.72);
      border-color: rgba(58, 52, 46, 0.11);
    }

    .search-guidance .suggestion-chip:hover {
      background: rgba(31, 35, 72, 0.08);
      border-color: rgba(47, 109, 246, 0.26);
    }

    .suggestion-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 0.45rem;
    }

    button.suggestion-chip {
      appearance: none;
      border: 1px solid rgba(58, 52, 46, 0.11);
      background: rgba(255, 255, 255, 0.72);
      color: rgba(29, 27, 24, 0.86);
      font-family: inherit;
      font-size: 0.81rem;
      font-weight: 500;
      padding: 0.32rem 0.7rem;
      border-radius: 999px;
      cursor: pointer;
      box-shadow: none;
      transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
      text-align: left;
    }

    button.suggestion-chip:hover {
      background: rgba(31, 35, 72, 0.06);
      border-color: rgba(47, 109, 246, 0.26);
      color: var(--accent);
      transform: translateY(-1px);
      box-shadow: 0 2px 8px rgba(31, 35, 72, 0.05);
    }

    button.suggestion-chip:focus-visible {
      outline: 2px solid rgba(47, 109, 246, 0.55);
      outline-offset: 2px;
    }

    .message-question {
      background: linear-gradient(135deg, #1a1e3c 0%, #1f2348 50%, #252a52 100%);
      color: #fff;
      border-radius: 20px 20px 6px 20px;
      padding: 0.85rem 1rem;
      margin-left: auto;
      margin-right: 0;
      max-width: 80%;
      font-size: 0.95rem;
      word-wrap: break-word;
      box-shadow: 0 10px 24px rgba(31, 35, 72, 0.22);
    }

    .message-answer {
      background: var(--surface-strong);
      border: 1px solid var(--line);
      border-radius: 20px 20px 20px 6px;
      padding: 1rem 1rem 0.95rem;
      margin-left: 0;
      margin-right: auto;
      max-width: 92%;
      font-size: 0.96rem;
      line-height: 1.6;
      box-shadow: 0 8px 20px rgba(31,29,26,0.05);
      word-wrap: break-word;
      width: 100%;
      box-sizing: border-box;
    }

    .thinking-indicator {
      background: rgba(255,255,255,0.78);
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 0.8rem 1rem;
      margin-left: 0;
      margin-right: auto;
      max-width: 220px;
      font-style: italic;
      color: var(--muted);
      animation: pulse 1.5s infinite;
    }

    .bible-ref-link.loading-reference {
      opacity: 0.65;
      cursor: wait;
    }

    .message-answer .bible-study-placeholder,
    .bible-study-placeholder {
      font-style: italic;
      color: var(--muted);
      animation: pulse 1.5s infinite;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.68; }
    }
.message-answer * {
      font-size: 0.96rem;
      line-height: 1.6;
    }

    .message-answer h1, .message-answer h2, .message-answer h3, .message-answer h4 {
      color: var(--text) !important;
      letter-spacing: -0.02em;
    }
    .message-answer h1 { font-size: 1.18rem !important; font-weight: 700 !important; margin: 0.5rem 0 !important; }
    .message-answer h2 { font-size: 1.08rem !important; font-weight: 700 !important; margin: 0.55rem 0 !important; }
    .message-answer h3 { font-size: 1rem !important; font-weight: 700 !important; margin: 0.5rem 0 !important; }
    .message-answer strong, .message-answer b { font-weight: 700 !important; color: #151311 !important; }
    .message-answer p {
      margin: 0 0 0.85rem 0 !important;
      white-space: normal;
    }

    .message-answer p:last-child {
      margin-bottom: 0 !important;
    }
    .message-answer h3,
    
    .message-answer h4 {
      margin-top: 1rem !important;
      margin-bottom: 0.5rem !important;
    }

    .message-answer blockquote {
      margin: 0.75rem 0;
      padding-left: 1rem;
      border-left: 3px solid rgba(31, 35, 72, 0.16);
      color: var(--muted);
    }

    .message-answer hr {
      border: 0;
      border-top: 1px solid var(--line);
      margin: 1rem 0;
    }

    .message-answer .scripture-line {
      margin: 0.45rem 0;
    }
    .message-answer ul, .message-answer ol { margin: 0.55rem 0 !important; padding-left: 1.4rem !important; }
    .message-answer li { margin: 0.22rem 0 !important; }

    /* Clickable search suggestions: table rows + inline chips (Core + Bible) */
    .message-answer button.group-row-search {
      appearance: none;
      font: inherit;
      font-weight: 600;
      color: var(--accent, #2f6df6);
      background: transparent;
      border: none;
      padding: 0.15rem 0.35rem;
      margin: -0.15rem -0.35rem;
      border-radius: 6px;
      cursor: pointer;
      text-align: left;
      text-decoration: underline;
      text-decoration-color: rgba(47, 109, 246, 0.35);
      text-underline-offset: 0.12em;
      transition:
        background 0.15s ease,
        color 0.15s ease,
        text-decoration-color 0.15s ease;
    }

    .message-answer button.group-row-search:hover {
      background: rgba(47, 109, 246, 0.1);
      color: var(--accent, #2f6df6);
      text-decoration-color: rgba(47, 109, 246, 0.85);
    }

    .message-answer button.group-row-search:focus-visible {
      outline: 2px solid rgba(47, 109, 246, 0.55);
      outline-offset: 2px;
    }

    .message-answer .religion-summary-followups {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem 0.6rem;
      align-items: center;
      margin: 0.25rem 0 0.5rem;
    }

    /* Country list (list_groups): extra rows revealed via "Load more" in Core */
    .message-answer table.constraint-table tr.list-groups-extra-row {
      display: none;
    }

    #queryForm,
    #bibleQueryForm {
      display: flex;
      gap: 0.65rem;
      flex-shrink: 0;
      padding: 0.9rem 0.25rem 0.2rem;
      background: transparent;
      align-items: center;
    }

    #bible-chat-shell #bibleQueryForm {
      border-top: 1px solid rgba(58, 52, 46, 0.07);
      margin-top: 0.2rem;
      padding-top: 0.95rem;
      padding-bottom: 0.35rem;
      padding-left: 0.15rem;
      padding-right: 0.15rem;
    }

    #bible-chat-shell #bible-search-guidance {
      margin-top: 0.1rem;
      padding: 0.45rem 0.2rem 0.2rem 0.2rem;
    }

    #bible-chat-shell #bible-search-guidance .search-helper {
      padding-left: 0.08rem;
      letter-spacing: 0.005em;
      color: rgba(92, 87, 81, 0.9);
      font-size: 0.84rem;
    }

    #bible-chat-shell #bible-search-guidance .suggestion-chips {
      margin-top: 0.42rem;
    }

    #bible-chat-shell #bible-search-guidance .suggestion-chip-rows {
      margin-top: 0.42rem;
    }

    #bible-chat-shell #bible-search-guidance .suggestion-chip-row {
      margin-top: 0;
    }

    #bible-chat-shell #bible-search-guidance .suggestion-chip-row + .suggestion-chip-row {
      margin-top: 0.5rem;
    }

    .input-wrap {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 0.55rem;
      padding: 0.45rem 0.6rem 0.45rem 0.9rem;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255,255,255,0.88);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
    }

    .input-icon {
      color: var(--gold-soft);
      font-size: 1rem;
      line-height: 1;
    }

    #queryInput,
    #bibleQueryInput {
      flex: 1;
      font-size: 0.98rem;
      padding: 0.55rem 0.1rem;
      border: none;
      outline: none;
      background: transparent;
      color: var(--text);
    }

    #queryInput::placeholder,
    #bibleQueryInput::placeholder { color: #8b847a; }

    #bibleQueryInput::placeholder {
      color: rgba(90, 86, 78, 0.78);
      opacity: 1;
    }

    /* Single source of truth for Core (#queryForm) and Bible (#bibleQueryForm) send buttons. */
    button.send-button {
      -webkit-appearance: none;
      appearance: none;
      width: 52px;
      height: 52px;
      font-size: 1.05rem;
      border: none;
      border-radius: 999px;
      background: var(--send-btn-bg);
      color: #fff;
      cursor: pointer;
      box-shadow: 0 5px 14px rgba(31, 35, 72, 0.12);
      transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
    }

    button.send-button:active:not(:disabled) {
      transform: translateY(0);
    }

    /* Bible Study: slightly stronger emphasis while staying one product family. */
    body.bible-mode .nav-btn.active {
      color: #1f2957;
      box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 4px 14px rgba(31, 41, 87, 0.08),
        0 0 0 1px rgba(28, 36, 68, 0.08);
    }

    body.bible-mode #bible-panel .hero-badge {
      background: rgba(31, 35, 72, 0.04);
      border-color: rgba(31, 35, 72, 0.1);
      box-shadow: none;
    }

    body.bible-mode #bibleQueryForm button.send-button {
      background: #1f2957;
      box-shadow: 0 6px 16px rgba(31, 41, 87, 0.16);
    }

    body.bible-mode #bibleQueryForm button.send-button:hover:not(:disabled) {
      background: var(--anthrovia-action-hover);
      box-shadow: var(--anthrovia-action-hover-shadow);
    }

    body.bible-mode #bibleQueryForm button.send-button:focus-visible {
      outline: 2px solid var(--anthrovia-green-ring);
      outline-offset: 2px;
    }

    /* Slightly higher specificity than bare `button.send-button:hover` (helps Bible page / ordering edge cases). */
    #queryForm button.send-button:hover:not(:disabled),
    #bibleQueryForm button.send-button:hover:not(:disabled) {
      transform: translateY(-1px);
      background: var(--send-btn-hover-bg);
      box-shadow: var(--send-btn-hover-shadow);
    }

    body.bible-mode #bible-panel .suggestion-chip,
    body.bible-mode #bible-chat-shell .suggestion-chip {
      font-size: 0.81rem;
    }

    body.bible-mode #bible-panel .suggestion-chip:hover {
      background: rgba(47, 109, 246, 0.09);
      border-color: rgba(47, 109, 246, 0.26);
      box-shadow: 0 2px 8px rgba(31, 35, 72, 0.05);
    }

    body.bible-mode #bible-panel .suggestion-chip:focus-visible {
      outline-color: rgba(47, 109, 246, 0.65);
    }

    body.bible-mode #bible-chat-messages .message-question {
      align-self: flex-end;
      width: max-content;
      max-width: min(80%, 36rem);
      background: linear-gradient(135deg, #151832 0%, #1f2348 42%, #2a3f86 100%);
      box-shadow: 0 12px 30px rgba(31, 35, 72, 0.28);
    }

    /* Post-answer footer: match input width, left-align guidance and chips */
    body.bible-mode #bible-chat-shell:has(#bible-chat-messages .message-question) #bibleQueryForm,
    body.bible-mode #bible-chat-shell:has(#bible-chat-messages .message-question) #bible-search-guidance {
      width: min(820px, 100%);
      max-width: 820px;
      margin-left: auto;
      margin-right: auto;
      box-sizing: border-box;
    }

    body.bible-mode #bible-chat-shell:has(#bible-chat-messages .message-question) #bible-search-guidance {
      padding-left: 0;
      padding-right: 0;
      text-align: left;
    }

    body.bible-mode #bible-chat-shell:has(#bible-chat-messages .message-question) #bible-search-guidance .suggestion-chip-rows,
    body.bible-mode #bible-chat-shell:has(#bible-chat-messages .message-question) #bible-search-guidance .suggestion-chip-row {
      display: flex;
      justify-content: flex-start;
      flex-wrap: wrap;
    }

    body.bible-mode #bible-chat-shell:has(#bible-chat-messages .message-question) #bible-search-guidance .suggestion-chip-row + .suggestion-chip-row {
      display: none;
    }

    body.bible-mode #bible-chat-shell:has(#bible-chat-messages .message-question) #bible-search-guidance .suggestion-chips {
      justify-content: flex-start;
    }

    #chat-container::-webkit-scrollbar,
    #bible-chat-container::-webkit-scrollbar { width: 8px; }
    #chat-container::-webkit-scrollbar-track,
    #bible-chat-container::-webkit-scrollbar-track { background: transparent; border-radius: 4px; }
    #chat-container::-webkit-scrollbar-thumb,
    #bible-chat-container::-webkit-scrollbar-thumb { background: rgba(58, 52, 46, 0.16); border-radius: 4px; }
    #chat-container::-webkit-scrollbar-thumb:hover,
    #bible-chat-container::-webkit-scrollbar-thumb:hover { background: rgba(58, 52, 46, 0.26); }

    .message-answer .photo-placeholder {
      margin: 0.5rem 0;
      padding: 10px 12px;
      border: 1px dashed #d5d0c8;
      background: #f8f7f4;
      color: #8a847b;
      text-align: center;
      border-radius: 10px;
      font-size: 0.9rem;
    }

    .message-answer .map-placeholder {
      margin: 0.75rem 0;
      padding: 1.5rem;
      background: #f8f7f4;
      border: 1px solid #e4dfd6;
      border-radius: 14px;
      text-align: center;
    }

    .message-answer p strong{
      display: inline;
      margin-top: 0;
      font-weight: 700;
    }

    .fact-card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 12px 14px;
      background: #fff;
      margin: 10px 0;
    }

    .about-card {
      padding: 1.45rem 1.5rem 1.5rem;
      display: flex;
      flex-direction: column;
      gap: 1.1rem;
    }

    .feature-strip {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0.85rem;
      margin: 0.15rem 0 0.25rem;
    }

    .feature-card {
      background: var(--surface-strong);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 1rem 1.1rem;
      box-shadow: var(--shadow-inset);
    }

    .feature-kicker {
      display: block;
      margin-bottom: 0.42rem;
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--gold-soft);
    }

    .feature-card h3 {
      margin: 0 0 0.38rem;
      font-size: 1.02rem;
      letter-spacing: -0.02em;
      color: var(--text);
    }

    .feature-card p {
      margin: 0;
      font-size: 0.9rem;
      color: var(--muted);
      line-height: 1.58;
    }

    .about-grid {
      display: grid;
      grid-template-columns: 1.1fr 0.9fr;
      gap: 1rem;
      align-items: start;
    }

    .about-intro {
      padding-bottom: 0.6rem;
      border-bottom: 1px solid var(--line);
      margin-bottom: 0.6rem;
    }

    .eyebrow {
      display: inline-block;
      margin-bottom: 0.55rem;
      color: var(--gold-soft);
      font-size: 0.78rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      font-weight: 700;
    }

    .about-card h2, 
    .about-card h3 {
      margin: 0 0 0.45rem;
      letter-spacing: -0.03em;
      color: var(--text);
      font-weight: 600;
    }

    .about-card p {
      margin: 0 0 0.95rem;
      color: #6f685f;
      line-height: 1.7;
      font-weight: 400;
    }

    .about-list {
      margin: 0;
      padding-left: 1.2rem;
      color: #6f685f;
      font-weight: 400;
      line-height: 1.7;
    }

    .about-list li {
      margin-bottom: 0.65rem;
    }

    .about-list li:last-child {
      margin-bottom: 0;
    }
    .statement-block {
      padding: 1.05rem 1.15rem;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface-strong);
      margin-top: 0.85rem;
      box-shadow: var(--shadow-inset);
    }

    .statement-block p:last-child { margin-bottom: 0; }

    .ack-section {
      border-top: 1px solid var(--line);
      margin-top: 1rem;
      padding-top: 1rem;
    }

    #legal-footer {
      font-size: 0.78rem;
      color: var(--muted);
      margin-top: 0.9rem;
      padding: 1rem 1.15rem;
      text-align: left;
    }

    #legal-footer p {
      margin: 0;
      line-height: 1.5;
    }

    /* ---- Study page (study.html) layout; uses same tokens as index ---- */
    body.bible-mode .study-page {
      gap: 1.15rem;
    }

    .study-page {
      flex: 1;
      min-height: 0;
      display: flex;
      flex-direction: column;
      gap: 1rem;
      padding-bottom: 0.75rem;
    }

    body.bible-mode .study-page .study-surface,
    body.bible-mode .study-page .study-path-card {
      background: #FFFFFF;
      border-color: rgba(28, 36, 68, 0.07);
      box-shadow: 0 1px 3px rgba(31, 29, 26, 0.04);
    }

    .study-page-title {
      margin: 0 0 0.35rem;
      font-size: 1.5rem;
      font-weight: 650;
      letter-spacing: -0.03em;
      color: var(--text);
      line-height: 1.2;
    }

    .study-page-head {
      margin-bottom: 0.1rem;
    }

    .study-page-head .lede {
      margin: 0;
      font-size: 0.95rem;
      color: var(--muted);
      max-width: 40rem;
      line-height: 1.55;
    }

    .study-primary-mount {
      margin-bottom: 0.35rem;
    }

    .study-available-paths {
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
    }

    .study-available-paths-note {
      margin: 0.1rem 0 0;
      padding-left: 1.5rem;
      font-size: 0.8rem;
      line-height: 1.45;
      max-width: 38rem;
    }

    .study-primary-mount .study-path-card--primary {
      margin-bottom: 0;
    }

    .study-entry-band {
      margin-bottom: 0.2rem;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 0.85rem 1rem;
      flex-wrap: wrap;
      padding-top: 1rem;
      padding-bottom: 1rem;
      border-color: rgba(47, 109, 246, 0.14);
      background: linear-gradient(170deg, rgba(47, 109, 246, 0.06) 0%, rgba(255, 255, 255, 0.75) 52%);
    }

    .study-entry-band-main h2 {
      margin: 0 0 0.35rem;
      font-size: 1rem;
      letter-spacing: -0.02em;
    }

    .study-entry-band-main p {
      margin: 0;
      font-size: 0.88rem;
      color: var(--muted);
      line-height: 1.5;
      max-width: 36rem;
    }

    .study-entry-account-line {
      margin: 0;
      align-self: center;
      font-size: 0.78rem;
      color: var(--muted);
      opacity: 0.9;
      white-space: nowrap;
    }

    .study-columns {
      display: grid;
      grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
      gap: 1rem;
      align-items: start;
    }

    .study-surface {
      margin-bottom: 1rem;
      padding: 1.25rem 1.35rem;
    }

    .study-surface:last-child {
      margin-bottom: 0;
    }

    .study-surface h2,
    .study-surface h3 {
      margin: 0 0 0.75rem;
      font-size: 1.08rem;
      font-weight: 650;
      letter-spacing: -0.02em;
      color: var(--text);
    }

    .study-surface h3 {
      font-size: 1rem;
      margin-bottom: 0.55rem;
    }

    .study-surface .muted {
      margin: 0 0 0.85rem;
      font-size: 0.875rem;
      color: var(--muted);
      line-height: 1.5;
    }

    .study-preview-section h2 {
      margin-bottom: 0.35rem;
    }

    .study-preview-intro {
      margin-bottom: 0.9rem !important;
    }

    .study-why-panel .study-why-copy {
      margin: 0;
      font-size: 0.875rem;
      color: var(--muted);
      line-height: 1.55;
    }

    .study-progress-inline-auth {
      margin-top: 0.55rem;
      padding-top: 0.6rem;
      border-top: 1px solid rgba(58, 52, 46, 0.09);
    }

    .study-progress-inline-copy {
      margin: 0 0 0.45rem;
      font-size: 0.82rem;
      color: var(--muted);
    }

    .study-progress-inline-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.45rem;
    }

    .study-path-sections {
      display: flex;
      flex-direction: column;
      gap: 0;
    }

    .study-path-group h2 {
      margin-bottom: 0.65rem;
    }

    .study-paths-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.85rem;
    }

    .study-paths-grid--preview {
      grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
      gap: 0.7rem;
    }

    .study-path-card {
      display: flex;
      flex-direction: column;
      min-height: 100%;
      padding: 1rem 1.05rem;
      border-radius: var(--radius);
      background: #FFFFFF;
      border: 1px solid rgba(28, 36, 68, 0.08);
      box-shadow: 0 1px 3px rgba(31, 29, 26, 0.04);
    }

    .study-path-card--primary {
      padding: 1.45rem 1.5rem 1.35rem;
      border-color: rgba(28, 36, 68, 0.1);
      box-shadow: 0 2px 14px rgba(31, 35, 72, 0.055);
    }

    .study-path-card--primary .study-primary-head {
      margin-bottom: 0;
    }

    .study-primary-head-text {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.45rem;
    }

    .study-primary-title {
      margin: 0;
      font-size: 1.38rem;
      font-weight: 650;
      letter-spacing: -0.035em;
      color: var(--text);
      line-height: 1.18;
    }

    .study-primary-desc {
      margin: 0.85rem 0 0;
      font-size: 0.96rem;
      font-weight: 400;
      color: var(--text);
      line-height: 1.62;
      max-width: 38rem;
      opacity: 0.92;
    }

    .study-primary-meta {
      margin: 0.7rem 0 0;
      font-size: 0.78rem;
      font-weight: 500;
      color: var(--muted);
      letter-spacing: 0.01em;
      line-height: 1.4;
    }

    .study-primary-progress {
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
      margin-top: 0.85rem;
    }

    .study-primary-progress .study-path-card-progress {
      margin-bottom: 0;
    }

    .study-primary-progress-label {
      font-size: 0.76rem;
      font-weight: 600;
      color: var(--muted);
      letter-spacing: 0.01em;
    }

    .study-path-status {
      flex-shrink: 0;
      font-size: 0.65rem;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      padding: 0.22rem 0.5rem;
      border-radius: 999px;
      line-height: 1.2;
    }

    .study-path-card--primary .study-path-status--available,
    .study-path-card--primary .study-path-status--always-free,
    .study-path-card--primary .study-path-status--featured-free {
      color: rgba(95, 109, 88, 0.95);
      background: rgba(95, 109, 88, 0.1);
      border: 1px solid rgba(95, 109, 88, 0.22);
      font-weight: 600;
      font-size: 0.6rem;
      letter-spacing: 0.06em;
      opacity: 0.95;
    }

    .study-path-status--preview {
      color: var(--muted);
      background: rgba(58, 52, 46, 0.06);
      border: 1px solid rgba(58, 52, 46, 0.1);
    }

    .study-path-card-foot--primary {
      margin-top: 1.2rem;
      padding-top: 1.05rem;
      border-top: 1px solid rgba(28, 36, 68, 0.07);
    }

    .study-path-link--primary {
      padding: 0.52rem 1.2rem;
      font-size: 0.88rem;
      font-weight: 600;
    }

    .study-path-card--preview {
      padding: 0.85rem 0.95rem;
      opacity: 0.92;
    }

    .study-path-card--preview h4 {
      font-size: 0.92rem;
    }

    .study-path-card--preview .study-path-desc {
      margin-bottom: 0.55rem;
      font-size: 0.82rem;
      line-height: 1.45;
    }

    .study-path-card--preview .study-path-meta {
      margin-bottom: 0.5rem;
      font-size: 0.75rem;
    }

    .study-path-card-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 0.5rem;
      margin-bottom: 0.45rem;
    }

    .study-path-card h4 {
      margin: 0;
      font-size: 0.98rem;
      font-weight: 650;
      color: var(--text);
      letter-spacing: -0.02em;
    }

    .study-badge {
      flex-shrink: 0;
      font-size: 0.65rem;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 0.22rem 0.48rem;
      border-radius: 999px;
      border: 1px solid rgba(155, 123, 79, 0.35);
      color: var(--gold-soft);
      background: rgba(155, 123, 79, 0.1);
    }

    .study-path-meta {
      margin: 0 0 0.55rem;
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--muted);
      letter-spacing: 0.01em;
    }

    .study-path-card-progress {
      height: 6px;
      border-radius: 999px;
      background: rgba(58, 52, 46, 0.08);
      overflow: hidden;
      margin-bottom: 0.65rem;
    }

    .study-path-card-progress-bar {
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--accent), var(--accent-2));
    }

    .study-path-card-foot {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      margin-top: auto;
    }

    .study-path-tier {
      font-size: 0.72rem;
      color: var(--muted);
      opacity: 0.85;
    }

    .study-path-card.is-preview,
    .study-path-card.is-coming-soon {
      background: #FFFFFF;
      border-style: dashed;
      border-color: rgba(28, 36, 68, 0.1);
    }

    .study-path-card.is-preview .study-path-desc,
    .study-path-card.is-preview .study-path-meta,
    .study-path-card.is-coming-soon .study-path-desc,
    .study-path-card.is-coming-soon .study-path-meta {
      color: var(--muted);
    }

    .study-path-link-muted {
      cursor: not-allowed;
      pointer-events: none;
      opacity: 0.72;
      border-color: var(--line);
      color: var(--muted);
      background: rgba(58, 52, 46, 0.04);
    }

    .study-path-link-muted:disabled {
      opacity: 0.72;
    }

    .study-path-link-muted:hover {
      transform: none;
      background: transparent;
    }

    .study-path-desc {
      margin: 0 0 0.85rem;
      flex: 1;
      font-size: 0.875rem;
      color: var(--muted);
      line-height: 1.52;
    }

    .study-path-link {
      align-self: flex-start;
      appearance: none;
      border-radius: 999px;
      padding: 0.42rem 0.95rem;
      font-size: 0.82rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      border: 1px solid rgba(47, 109, 246, 0.32);
      background: rgba(255, 255, 255, 0.82);
      color: var(--accent);
      text-decoration: none;
      display: inline-block;
      transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    }

    .study-path-link:hover {
      background: rgba(31, 35, 72, 0.06);
      border-color: rgba(47, 109, 246, 0.45);
      transform: translateY(-1px);
    }

    .btn-theme {
      appearance: none;
      border: none;
      border-radius: 999px;
      padding: 0.62rem 1.35rem;
      font-size: 0.95rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      background: linear-gradient(180deg, #343a63 0%, #1f2348 100%);
      color: #fff;
      box-shadow: 0 5px 14px rgba(31, 35, 72, 0.12);
      transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    }

    .btn-theme:hover {
      transform: translateY(-1px);
      background: var(--accent-2);
      box-shadow: 0 8px 20px rgba(47, 109, 246, 0.22);
    }

    .btn-theme.w-100 {
      width: 100%;
      text-align: center;
    }

    .btn-theme-ghost {
      appearance: none;
      border-radius: 999px;
      padding: 0.55rem 1rem;
      font-size: 0.9rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      width: 100%;
      text-align: center;
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.72);
      color: var(--accent);
      transition: background 0.15s ease, border-color 0.15s ease;
    }

    .btn-theme-ghost:hover {
      background: rgba(31, 35, 72, 0.06);
      border-color: rgba(47, 109, 246, 0.22);
    }

    a.btn-theme,
    a.btn-theme-ghost {
      text-decoration: none;
      box-sizing: border-box;
    }

    .study-progress-row {
      margin-bottom: 0.85rem;
    }

    .study-progress-row:last-of-type {
      margin-bottom: 0.65rem;
    }

    .study-progress-labels {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 0.5rem;
      font-size: 0.84rem;
      color: var(--text);
      margin-bottom: 0.28rem;
    }

    .study-progress-labels span:last-child {
      font-weight: 600;
      color: var(--muted);
      font-variant-numeric: tabular-nums;
    }

    .study-progress {
      height: 8px;
      border-radius: 999px;
      background: rgba(58, 52, 46, 0.1);
      overflow: hidden;
    }

    .study-progress-bar {
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--accent), var(--accent-2));
    }

    /* ---- Guided path experience (study-path.html) ---- */
    .study-path-hero {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      justify-content: space-between;
      gap: 1rem 1.5rem;
      margin-bottom: 1rem;
    }

    .study-path-hero-main {
      flex: 1;
      min-width: min(100%, 16rem);
    }

    .study-path-hero-title {
      margin: 0 0 0.45rem;
      font-size: 1.42rem;
      font-weight: 650;
      letter-spacing: -0.03em;
      color: var(--text);
      line-height: 1.2;
    }

    .study-path-hero-meta {
      margin: 0 0 0.35rem;
      font-size: 0.88rem;
      font-weight: 600;
      color: var(--accent);
      letter-spacing: 0.02em;
    }

    .study-path-hero .lede {
      margin: 0 0 0.65rem;
    }

    .study-path-hero-actions {
      flex-shrink: 0;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.55rem;
    }

    .study-path-hero-actions .study-path-link {
      align-self: center;
    }

    .study-path-step-title {
      margin-bottom: 1rem !important;
    }

    .study-step-section {
      margin-bottom: 1.15rem;
      padding-bottom: 1.1rem;
      border-bottom: 1px solid var(--line);
    }

    .study-step-section:last-of-type {
      margin-bottom: 0;
      padding-bottom: 0;
      border-bottom: none;
    }

    .study-step-section .eyebrow {
      margin-bottom: 0.45rem;
    }

    .study-step-section h3 {
      margin: 0 0 0.5rem;
      font-size: 1.02rem;
      font-weight: 650;
      color: var(--text);
      letter-spacing: -0.02em;
    }

    .study-step-kicker {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      margin-bottom: 0.35rem;
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--gold-soft);
    }

    .study-step-num {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 1.65rem;
      height: 1.65rem;
      padding: 0 0.35rem;
      border-radius: 999px;
      background: rgba(31, 35, 72, 0.08);
      border: 1px solid rgba(31, 35, 72, 0.1);
      color: var(--accent);
      font-size: 0.72rem;
      font-weight: 700;
    }

    .study-path-scripture {
      margin: 0.35rem 0 0;
      padding: 0.85rem 1rem;
      border-radius: var(--radius);
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.72);
      box-shadow: var(--shadow-inset);
    }

    .study-path-scripture-ref {
      margin: 0 0 0.45rem;
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--accent);
      letter-spacing: 0.02em;
    }

    .study-path-scripture-text {
      margin: 0;
      font-size: 0.93rem;
      line-height: 1.65;
      color: var(--text);
      font-style: italic;
    }

    .study-path-body {
      margin: 0;
      font-size: 0.92rem;
      line-height: 1.65;
      color: var(--muted);
    }

    .study-path-explanation .study-path-body + .study-path-body {
      margin-top: 0.85rem;
    }

    .study-path-list {
      margin: 0.35rem 0 0;
      padding-left: 1.15rem;
      color: var(--muted);
      font-size: 0.9rem;
      line-height: 1.55;
    }

    .study-path-list li {
      margin: 0.35rem 0;
    }

    .study-deep-dive-card {
      padding: 0.78rem 0.84rem;
      border-radius: var(--radius);
      border: 1px solid rgba(47, 109, 246, 0.14);
      background: rgba(47, 109, 246, 0.04);
      box-shadow: var(--shadow-inset);
    }

    .study-deep-dive-card .study-path-body {
      margin-bottom: 0.55rem;
    }

    .study-lesson-accordion {
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
    }

    .study-lesson-accordion-item {
      border-radius: var(--radius);
      overflow: hidden;
    }

    .study-lesson-accordion--deep-dive .study-lesson-accordion-item {
      border: 1px solid rgba(47, 109, 246, 0.12);
      background: rgba(47, 109, 246, 0.03);
    }

    .study-lesson-accordion--word-study .study-lesson-accordion-item {
      border: 1px solid rgba(158, 118, 62, 0.14);
      background: rgba(158, 118, 62, 0.04);
    }

    .study-lesson-accordion--theological .study-lesson-accordion-item {
      border: 1px solid rgba(98, 88, 128, 0.14);
      background: rgba(98, 88, 128, 0.035);
    }

    .study-lesson-accordion-trigger {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.65rem;
      padding: 0.62rem 0.72rem;
      border: none;
      background: transparent;
      cursor: pointer;
      text-align: left;
      font: inherit;
      color: var(--text);
      transition: background 0.15s ease;
    }

    .study-lesson-accordion--deep-dive .study-lesson-accordion-trigger:hover {
      background: rgba(47, 109, 246, 0.05);
    }

    .study-lesson-accordion--word-study .study-lesson-accordion-trigger:hover {
      background: rgba(158, 118, 62, 0.07);
    }

    .study-lesson-accordion--theological .study-lesson-accordion-trigger:hover {
      background: rgba(98, 88, 128, 0.06);
    }

    .study-lesson-accordion--deep-dive .study-lesson-accordion-trigger:focus-visible {
      outline: 2px solid rgba(47, 109, 246, 0.35);
      outline-offset: 2px;
    }

    .study-lesson-accordion--word-study .study-lesson-accordion-trigger:focus-visible {
      outline: 2px solid rgba(158, 118, 62, 0.35);
      outline-offset: 2px;
    }

    .study-lesson-accordion--theological .study-lesson-accordion-trigger:focus-visible {
      outline: 2px solid rgba(98, 88, 128, 0.35);
      outline-offset: 2px;
    }

    .study-lesson-accordion-title {
      font-size: 0.9rem;
      font-weight: 600;
      line-height: 1.35;
      letter-spacing: -0.01em;
    }

    .study-lesson-accordion-chevron {
      flex-shrink: 0;
      width: 0.55rem;
      height: 0.55rem;
      border-right: 1.5px solid var(--muted);
      border-bottom: 1.5px solid var(--muted);
      transform: rotate(-45deg);
      margin-top: -0.12rem;
      transition: transform 0.2s ease, border-color 0.2s ease;
    }

    .study-lesson-accordion--deep-dive .study-lesson-accordion-item.is-open .study-lesson-accordion-chevron {
      transform: rotate(45deg);
      margin-top: 0.1rem;
      border-color: var(--accent);
    }

    .study-lesson-accordion--word-study .study-lesson-accordion-item.is-open .study-lesson-accordion-chevron {
      transform: rotate(45deg);
      margin-top: 0.1rem;
      border-color: rgba(158, 118, 62, 0.85);
    }

    .study-lesson-accordion--theological .study-lesson-accordion-item.is-open .study-lesson-accordion-chevron {
      transform: rotate(45deg);
      margin-top: 0.1rem;
      border-color: rgba(98, 88, 128, 0.85);
    }

    .study-lesson-accordion-panel {
      display: grid;
      grid-template-rows: 0fr;
      transition: grid-template-rows 0.28s ease;
    }

    .study-lesson-accordion-item.is-open .study-lesson-accordion-panel {
      grid-template-rows: 1fr;
    }

    .study-lesson-accordion-panel-inner {
      overflow: hidden;
      padding: 0 0.72rem;
    }

    .study-lesson-accordion--deep-dive .study-lesson-accordion-panel-inner {
      border-top: 1px solid rgba(47, 109, 246, 0.08);
    }

    .study-lesson-accordion--word-study .study-lesson-accordion-panel-inner {
      border-top: 1px solid rgba(158, 118, 62, 0.1);
    }

    .study-lesson-accordion--theological .study-lesson-accordion-panel-inner {
      border-top: 1px solid rgba(98, 88, 128, 0.1);
    }

    .study-lesson-accordion-item.is-open .study-lesson-accordion-panel-inner {
      padding-top: 0.55rem;
      padding-bottom: 0.72rem;
    }

    .study-lesson-accordion-item:not(.is-open) .study-lesson-accordion-panel-inner {
      padding-top: 0;
      padding-bottom: 0;
      border-top-color: transparent;
    }

    .study-structured-sections {
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
    }

    .study-structured-sections--word-study {
      gap: 0.42rem;
    }

    .study-structured-section-label {
      margin: 0 0 0.2rem;
      font-size: 0.78rem;
      font-weight: 600;
      letter-spacing: 0.02em;
      text-transform: uppercase;
      color: var(--muted);
      line-height: 1.3;
    }

    .study-structured-sections--theological .study-structured-section-label {
      font-size: 0.8rem;
      letter-spacing: 0.01em;
      text-transform: none;
      color: rgba(98, 88, 128, 0.9);
    }

    .study-structured-section-body {
      margin: 0;
      font-size: 0.88rem;
      line-height: 1.55;
      color: var(--text);
    }

    .study-word-study-meta {
      margin: 0 0 0.55rem;
      font-size: 0.82rem;
      line-height: 1.45;
      color: var(--muted);
    }

    .study-structured-sections--word-study .study-structured-section-body {
      font-size: 0.86rem;
      line-height: 1.5;
    }

    .study-structured-sections--theological .study-structured-section-body {
      font-size: 0.9rem;
      line-height: 1.6;
    }

    .study-structured-panel {
      margin: 0;
      padding: 0;
      border: none;
      background: transparent;
    }

    .study-canonical-deep-dive-block {
      margin: 0 0.55rem;
      padding: 0;
      border: none;
      background: transparent;
    }

    .study-canonical-deep-dive-block:last-child {
      margin-bottom: 0;
    }

    .study-canonical-deep-dive-block h4 {
      margin: 0 0 0.42rem;
      font-size: 0.92rem;
      font-weight: 600;
      color: var(--text);
      line-height: 1.35;
    }

    .study-canonical-deep-dive-block p {
      margin: 0;
      font-size: 0.9rem;
      line-height: 1.58;
      color: var(--text);
    }

    .study-canonical-deep-dive-callout {
      margin: 0;
      padding: 0.72rem 0.78rem;
      border-radius: calc(var(--radius) - 2px);
      border: 1px solid rgba(47, 109, 246, 0.16);
      background: rgba(47, 109, 246, 0.05);
    }

    .study-canonical-deep-dive-callout .eyebrow {
      display: block;
      margin-bottom: 0.35rem;
    }

    .study-canonical-deep-dive-callout h4 {
      margin: 0 0 0.4rem;
      font-size: 0.94rem;
      font-weight: 600;
    }

    .study-canonical-deep-dive-callout p {
      margin: 0;
      font-size: 0.9rem;
      line-height: 1.58;
    }

    .saved-reflections-head {
      margin-bottom: 0.35rem;
    }

    .saved-reflections-subtitle {
      max-width: 32rem;
    }

    .saved-reflections-shell {
      margin: 0;
      padding: 0;
      background: transparent;
      border: none;
      box-shadow: none;
    }

    .saved-reflections-groups {
      display: flex;
      flex-direction: column;
      gap: 1.35rem;
    }

    .saved-reflections-path-group {
      margin: 0;
    }

    .saved-reflections-path-group + .saved-reflections-path-group {
      margin-top: 0.15rem;
      padding-top: 0.35rem;
      border-top: 1px solid rgba(155, 123, 79, 0.12);
    }

    .saved-reflections-path-toggle {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      width: 100%;
      margin: 0 0 0.65rem;
      padding: 0.35rem 0;
      border: none;
      background: transparent;
      text-align: left;
      cursor: pointer;
      color: inherit;
      font: inherit;
    }

    .saved-reflections-path-toggle:focus-visible {
      outline: 2px solid rgba(155, 123, 79, 0.45);
      outline-offset: 3px;
      border-radius: 6px;
    }

    .saved-reflections-path-chevron {
      flex-shrink: 0;
      width: 0.55rem;
      height: 0.55rem;
      border-right: 2.5px solid rgba(102, 74, 40, 0.94);
      border-bottom: 2.5px solid rgba(102, 74, 40, 0.94);
      transform: rotate(45deg) translateY(-1px);
    }

    .saved-reflections-path-group.is-collapsed .saved-reflections-path-chevron {
      transform: rotate(-45deg) translateY(1px);
    }

    .saved-reflections-path-group.is-collapsed .saved-reflections-path-toggle {
      margin-bottom: 0;
    }

    .saved-reflections-path-heading {
      margin: 0;
      line-height: 1.3;
    }

    .saved-reflections-path-title {
      font-size: 0.8rem;
      font-weight: 700;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: rgba(102, 74, 40, 0.96);
    }

    .saved-reflections-path-count {
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.04em;
      color: rgba(102, 74, 40, 0.58);
    }

    .saved-reflections-path-panel[hidden] {
      display: none;
    }

    .saved-reflections-list {
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
    }

    .saved-reflection-card {
      padding: 0.85rem 1rem 0.95rem;
      border-radius: 12px;
      border: 1px solid #e7e0d3;
      background: #ffffff;
      box-shadow: none;
    }

    .saved-reflection-card-toggle {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      justify-content: space-between;
      gap: 0.35rem 0.75rem;
      width: 100%;
      margin: 0;
      padding: 0;
      border: none;
      background: transparent;
      text-align: left;
      cursor: pointer;
      color: inherit;
      font: inherit;
    }

    .saved-reflection-card-toggle:focus-visible {
      outline: 2px solid rgba(155, 123, 79, 0.4);
      outline-offset: 3px;
      border-radius: 6px;
    }

    .saved-reflection-card-toggle-main {
      display: flex;
      align-items: flex-start;
      gap: 0.45rem;
      min-width: 0;
      flex: 1 1 12rem;
    }

    .saved-reflection-card-chevron {
      flex-shrink: 0;
      width: 0.48rem;
      height: 0.48rem;
      margin-top: 0.38rem;
      border-right: 2.5px solid rgba(95, 78, 52, 0.88);
      border-bottom: 2.5px solid rgba(95, 78, 52, 0.88);
      transform: rotate(45deg) translateY(-1px);
    }

    .saved-reflection-card.is-collapsed .saved-reflection-card-chevron {
      transform: rotate(-45deg) translateY(1px);
    }

    .saved-reflection-card-body {
      margin-top: 0.7rem;
      padding-top: 0.65rem;
      border-top: 1px solid rgba(28, 36, 68, 0.06);
    }

    .saved-reflection-card-body[hidden] {
      display: none;
    }

    .saved-reflection-card.is-collapsed {
      padding-bottom: 0.85rem;
    }

    .saved-reflection-card-header {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      justify-content: space-between;
      gap: 0.35rem 0.75rem;
      margin-bottom: 0.7rem;
      padding-bottom: 0.65rem;
      border-bottom: 1px solid rgba(28, 36, 68, 0.06);
    }

    .saved-reflection-card-title {
      margin: 0;
      font-size: 1.02rem;
      font-weight: 620;
      letter-spacing: -0.02em;
      line-height: 1.3;
    }

    .saved-reflection-card-meta {
      margin: 0.12rem 0 0;
      font-size: 0.78rem;
      color: var(--muted);
      white-space: nowrap;
      flex-shrink: 0;
    }

    .saved-reflection-card-actions {
      margin: 0.75rem 0 0;
    }

    .saved-reflection-block {
      margin-top: 0.65rem;
    }

    .saved-reflection-block:first-of-type {
      margin-top: 0;
    }

    .saved-reflection-block .eyebrow {
      display: block;
      margin-bottom: 0.35rem;
      color: rgba(111, 106, 99, 0.9);
    }

    .saved-reflection-entry + .saved-reflection-entry {
      margin-top: 0.55rem;
      padding-top: 0.55rem;
      border-top: 1px dashed rgba(28, 36, 68, 0.07);
    }

    .saved-reflection-label {
      margin: 0 0 0.22rem;
      font-size: 0.84rem;
      font-weight: 600;
      line-height: 1.4;
      color: var(--text);
    }

    .saved-reflection-answer {
      margin: 0;
      font-size: 0.9rem;
      line-height: 1.58;
      color: var(--text);
    }

    .saved-reflection-empty {
      margin: 0;
      font-size: 0.9rem;
      color: var(--muted);
      line-height: 1.55;
    }

    .saved-reflections-empty {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.85rem;
      max-width: 34rem;
    }

    .saved-reflections-empty .study-path-body {
      margin: 0;
    }

    .saved-reflections-signin {
      padding: 1.05rem 1.1rem;
      border-radius: 12px;
      border: 1px solid rgba(28, 36, 68, 0.07);
      background: rgba(251, 249, 245, 0.95);
      max-width: 34rem;
    }

    .saved-reflections-signin .study-path-body {
      margin: 0;
    }

    .saved-reflections-auth-actions {
      margin-top: 0.7rem;
    }

    .study-library-head {
      margin-bottom: 0.35rem;
    }

    .study-library-subtitle {
      max-width: 32rem;
    }

    .study-library-surface.study-surface {
      background: rgba(255, 252, 247, 0.92);
      border-color: rgba(28, 36, 68, 0.06);
    }

    .study-library-layout {
      display: grid;
      grid-template-columns: minmax(10.5rem, 13.5rem) minmax(0, 1fr);
      gap: 1.1rem 1.35rem;
      align-items: start;
    }

    @media (max-width: 720px) {
      .study-library-layout {
        grid-template-columns: 1fr;
      }
    }

    .study-library-folders {
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
      padding: 0.15rem 0;
    }

    .study-library-folder-list {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
    }

    .study-library-folder-btn {
      display: block;
      width: 100%;
      text-align: left;
      font: inherit;
      font-size: 0.88rem;
      line-height: 1.35;
      padding: 0.42rem 0.55rem;
      border: none;
      border-radius: 8px;
      background: transparent;
      color: var(--text);
      cursor: pointer;
    }

    .study-library-folder-btn:hover,
    .study-library-folder-btn:focus-visible {
      background: rgba(28, 36, 68, 0.05);
    }

    .study-library-folder-btn.is-active {
      background: rgba(28, 36, 68, 0.08);
      font-weight: 600;
    }

    .study-library-create-folder {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      padding-top: 0.35rem;
      border-top: 1px solid rgba(28, 36, 68, 0.06);
    }

    .study-library-create-folder-label {
      font-size: 0.78rem;
      font-weight: 600;
      color: var(--muted);
      letter-spacing: 0.02em;
      text-transform: uppercase;
    }

    .study-library-create-folder-row {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
    }

    .study-library-create-folder-input {
      width: 100%;
      font: inherit;
      font-size: 0.88rem;
      padding: 0.45rem 0.55rem;
      border-radius: 8px;
      border: 1px solid rgba(28, 36, 68, 0.12);
      background: #fffdf9;
    }

    .study-library-create-folder-btn {
      align-self: flex-start;
      font-size: 0.84rem;
    }

    .study-library-create-folder-error {
      margin: 0;
      font-size: 0.8rem;
      color: #8b3a3a;
      line-height: 1.4;
    }

    .study-library-items-panel {
      min-width: 0;
    }

    .study-library-list {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .study-library-card {
      padding: 1rem 1.1rem 1.05rem;
      border-radius: 12px;
      border: 1px solid rgba(28, 36, 68, 0.07);
      background: #fffdf9;
      box-shadow: 0 1px 0 rgba(28, 36, 68, 0.03);
    }

    .study-library-card-title {
      margin: 0 0 0.28rem;
      font-size: 1.02rem;
      font-weight: 620;
      letter-spacing: -0.02em;
      line-height: 1.3;
    }

    .study-library-card-question {
      margin: 0 0 0.5rem;
      font-size: 0.9rem;
      line-height: 1.55;
      color: var(--text);
    }

    .study-library-card-meta-block {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
      margin-bottom: 0.45rem;
      padding-bottom: 0.45rem;
      border-bottom: 1px solid rgba(28, 36, 68, 0.06);
    }

    .study-library-card-folder,
    .study-library-card-ref,
    .study-library-card-date {
      margin: 0;
      font-size: 0.84rem;
      line-height: 1.45;
      color: var(--muted);
    }

    .study-library-card-folder {
      font-weight: 500;
      color: var(--text);
    }

    .study-library-item-answer {
      margin-top: 0.55rem;
      border-radius: 8px;
      border: 1px solid rgba(28, 36, 68, 0.06);
      background: rgba(251, 249, 245, 0.7);
    }

    .study-library-item-answer-summary {
      cursor: pointer;
      padding: 0.55rem 0.75rem;
      font-size: 0.84rem;
      font-weight: 600;
      color: var(--text);
    }

    .study-library-item-answer-body {
      padding: 0 0.75rem 0.75rem;
      font-size: 0.9rem;
      line-height: 1.58;
    }

    .study-library-card-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.65rem 1rem;
      margin: 0.75rem 0 0;
    }

    .study-library-move {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
    }

    .study-library-move-label {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem 0.5rem;
      margin: 0;
      font-size: 0.84rem;
      color: var(--muted);
    }

    .study-library-move-select {
      font: inherit;
      font-size: 0.84rem;
      padding: 0.2rem 0.35rem;
      border-radius: 6px;
      border: 1px solid rgba(28, 36, 68, 0.12);
      background: #fffdf9;
      color: var(--text);
      max-width: 12rem;
    }

    .study-library-move-success {
      margin: 0.2rem 0 0;
      font-size: 0.78rem;
      color: #3d5c45;
      line-height: 1.35;
    }

    .study-library-move-error {
      margin: 0.2rem 0 0;
      font-size: 0.78rem;
      color: #8b3a3a;
      line-height: 1.35;
    }

    .study-library-delete-btn {
      font: inherit;
      font-size: 0.84rem;
      color: var(--muted);
      background: none;
      border: none;
      padding: 0;
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .study-library-delete-btn:hover,
    .study-library-delete-btn:focus-visible {
      color: var(--text);
    }

    .study-library-empty,
    .study-library-signin {
      max-width: 34rem;
    }

    .study-library-empty {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.85rem;
    }

    .study-library-empty .study-path-body {
      margin: 0;
    }

    .study-library-signin {
      padding: 1.05rem 1.1rem;
      border-radius: 12px;
      border: 1px solid rgba(28, 36, 68, 0.07);
      background: rgba(251, 249, 245, 0.95);
    }

    .study-library-signin .study-path-body {
      margin: 0;
    }

    .study-library-auth-actions {
      margin-top: 0.7rem;
    }

    .study-library-status,
    .study-library-loading {
      margin: 0 0 0.75rem;
      font-size: 0.88rem;
      color: var(--muted);
    }

    .message-answer .study-library-save-actions {
      margin-top: 0.65rem;
      padding-top: 0.55rem;
      border-top: 1px solid rgba(28, 36, 68, 0.06);
    }

    .study-library-save-btn {
      font-size: 0.84rem;
    }

    .study-library-save-btn:disabled {
      opacity: 0.72;
      cursor: default;
    }

    .study-library-save-error {
      margin: 0.35rem 0 0;
      font-size: 0.8rem;
      color: #8b3a3a;
      line-height: 1.4;
    }

    .study-response-list {
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
    }

    .study-response-item {
      display: flex;
      flex-direction: column;
      gap: 0.34rem;
    }

    .study-response-question {
      margin: 0;
      font-size: 0.88rem;
      color: var(--text);
      line-height: 1.45;
    }

    .study-response-input {
      width: 100%;
      border-radius: var(--radius);
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.84);
      color: var(--text);
      font: inherit;
      font-size: 0.88rem;
      line-height: 1.45;
      padding: 0.52rem 0.62rem;
      resize: vertical;
      min-height: 2.8rem;
    }

    .study-response-input:focus-visible {
      outline: 2px solid rgba(47, 109, 246, 0.36);
      outline-offset: 1px;
      border-color: rgba(47, 109, 246, 0.45);
    }

    .study-response-actions {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.52rem;
    }

    .study-response-status {
      font-size: 0.82rem;
      color: var(--muted);
    }

    .study-habits-tracker {
      display: flex;
      flex-direction: column;
      gap: 0.42rem;
      width: 100%;
      max-width: 100%;
    }

    .study-habits-days,
    .study-habits-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) repeat(7, 1.2rem);
      column-gap: 0.28rem;
      align-items: center;
      width: 100%;
    }

    .study-habits-days {
      margin-bottom: 0.08rem;
    }

    .study-habits-days-spacer {
      display: block;
      min-width: 0;
    }

    .study-habits-day {
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.02em;
      color: var(--muted);
      text-align: center;
      line-height: 1;
    }

    .study-habits-row {
      padding: 0.28rem 0;
    }

    .study-habits-habit-label {
      font-size: 0.78rem;
      color: var(--text);
      line-height: 1.25;
      padding-right: 0.2rem;
      min-width: 0;
    }

    .study-habit-toggle {
      position: relative;
      display: inline-flex;
      justify-content: center;
      align-items: center;
      width: 1.2rem;
      height: 1.2rem;
      margin: 0 auto;
      cursor: pointer;
    }

    .study-habit-toggle input {
      position: absolute;
      opacity: 0;
      width: 0;
      height: 0;
      margin: 0;
    }

    .study-habit-toggle-ui {
      display: block;
      width: 0.95rem;
      height: 0.95rem;
      border-radius: 999px;
      border: 1px solid rgba(47, 109, 246, 0.18);
      background: rgba(255, 255, 255, 0.55);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
      transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
    }

    .study-habit-toggle:hover .study-habit-toggle-ui {
      border-color: rgba(47, 109, 246, 0.32);
      background: rgba(47, 109, 246, 0.06);
    }

    .study-habit-toggle input:checked + .study-habit-toggle-ui {
      border-color: rgba(47, 109, 246, 0.55);
      background: rgba(47, 109, 246, 0.72);
      box-shadow: none;
    }

    .study-habit-toggle input:focus-visible + .study-habit-toggle-ui {
      outline: 2px solid rgba(47, 109, 246, 0.35);
      outline-offset: 2px;
    }

    .study-habit-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;
    }

    .study-habits-label {
      display: block;
      margin: 0.4rem 0 0.28rem;
      font-size: 0.8rem;
      color: var(--muted);
      line-height: 1.4;
    }

    .study-path-outline {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
    }

    .study-path-outline-item {
      display: flex;
      align-items: flex-start;
      gap: 0.55rem;
      padding: 0.55rem 0.65rem;
      border-radius: var(--radius);
      border: 1px solid transparent;
      font-size: 0.86rem;
      line-height: 1.35;
      color: var(--muted);
      cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease;
    }

    .study-path-outline-item:focus-visible {
      outline: 2px solid rgba(47, 109, 246, 0.35);
      outline-offset: 2px;
    }

    .study-path-outline-item.is-upcoming {
      background: rgba(255, 255, 255, 0.45);
      border-color: rgba(58, 52, 46, 0.08);
    }

    .study-path-outline-item.is-current {
      background: rgba(47, 109, 246, 0.08);
      border-color: rgba(47, 109, 246, 0.22);
      color: var(--text);
      font-weight: 600;
    }

    .study-path-outline-item.is-complete {
      color: var(--muted);
      opacity: 0.92;
    }

    .study-path-outline-mark {
      flex-shrink: 0;
      width: 1.35rem;
      height: 1.35rem;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 0.65rem;
      font-weight: 700;
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.7);
      color: var(--muted);
    }

    .study-path-outline-item.is-current .study-path-outline-mark {
      border-color: rgba(47, 109, 246, 0.35);
      background: rgba(47, 109, 246, 0.12);
      color: var(--accent);
    }

    .study-path-outline-item.is-complete .study-path-outline-mark {
      background: rgba(31, 35, 72, 0.1);
      border-color: rgba(31, 35, 72, 0.12);
      color: var(--accent);
    }

    .study-path-outline-label {
      flex: 1;
      min-width: 0;
    }

    .study-path-related {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .study-path-related li {
      margin-bottom: 0.5rem;
    }

    .study-path-related a {
      font-size: 0.86rem;
      font-weight: 600;
      color: var(--accent);
      text-decoration: none;
    }

    .study-path-related a:hover {
      text-decoration: underline;
    }

    .study-notes-placeholder {
      min-height: 4.5rem;
      margin-top: 0.65rem;
      padding: 0.75rem 0.85rem;
      border-radius: var(--radius);
      border: 1px dashed rgba(58, 52, 46, 0.18);
      background: rgba(255, 255, 255, 0.5);
      font-size: 0.8rem;
      color: var(--muted);
      line-height: 1.45;
    }

    .study-lesson-stage {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      column-gap: 0.75rem;
      align-items: end;
      margin-bottom: 1rem;
    }

    .study-lesson-stage > .study-surface {
      margin-bottom: 0;
      min-width: 0;
    }

    .study-lesson-back-to-top {
      display: flex;
      flex-shrink: 0;
      align-items: center;
      justify-content: center;
      margin: 0;
      padding: 0 0 0.42rem;
    }

    .study-lesson-back-to-top-btn {
      appearance: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 2.75rem;
      height: 2.75rem;
      padding: 0;
      border: 1px solid rgba(95, 109, 88, 0.22);
      border-radius: 50%;
      font-family: inherit;
      cursor: pointer;
      color: rgba(95, 109, 88, 0.82);
      background: rgba(255, 253, 250, 0.72);
      box-shadow: 0 1px 3px rgba(31, 29, 26, 0.04);
      transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
    }

    .study-lesson-back-to-top-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      line-height: 0;
    }

    .study-lesson-back-to-top-icon svg {
      display: block;
      width: 2.35rem;
      height: 2.35rem;
    }

    .study-lesson-back-to-top-btn:hover {
      color: var(--anthrovia-green-deep);
      background: var(--anthrovia-green-soft);
      border-color: var(--anthrovia-green-border);
      box-shadow: 0 2px 8px rgba(79, 92, 75, 0.1);
      transform: translateY(-1px);
    }

    .study-lesson-back-to-top-btn:focus-visible {
      outline: 2px solid var(--anthrovia-green-ring);
      outline-offset: 3px;
    }

    .study-lesson-back-to-top-btn:active {
      transform: translateY(0);
      box-shadow: 0 1px 2px rgba(31, 29, 26, 0.05);
    }

    .study-path-step-nav {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.65rem;
      margin-top: 1.15rem;
      padding-top: 1rem;
      border-top: 1px solid rgba(58, 52, 46, 0.09);
    }

    .study-path-step-nav-cluster {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      align-items: center;
    }

    /* Sage workspace actions — Bible unified hovers (reference: Next Lesson / #nav-next) */
    .study-path-step-nav .btn-theme-ghost,
    body.bible-mode .account-form-actions .btn-theme-ghost {
      width: auto;
    }

    body.bible-mode .btn-theme:hover,
    body.bible-mode a.btn-theme:hover,
    .study-path-step-nav .btn-theme:hover,
    body.bible-mode .account-form-actions .btn-theme:hover {
      background: var(--anthrovia-action-hover);
      box-shadow: var(--anthrovia-action-hover-shadow);
    }

    body.bible-mode .btn-theme:focus-visible,
    body.bible-mode a.btn-theme:focus-visible,
    .study-path-step-nav .btn-theme:focus-visible,
    body.bible-mode .account-form-actions .btn-theme:focus-visible {
      outline: 2px solid var(--anthrovia-green-ring);
      outline-offset: 2px;
    }

    body.bible-mode .btn-theme-ghost:hover,
    body.bible-mode a.btn-theme-ghost:hover,
    .study-path-step-nav .btn-theme-ghost:hover,
    body.bible-mode .account-form-actions .btn-theme-ghost:hover {
      background: var(--anthrovia-green-soft);
      border-color: var(--anthrovia-green-border);
      color: var(--anthrovia-green-deep);
    }

    body.bible-mode .btn-theme-ghost:focus-visible,
    body.bible-mode a.btn-theme-ghost:focus-visible,
    .study-path-step-nav .btn-theme-ghost:focus-visible,
    body.bible-mode .account-form-actions .btn-theme-ghost:focus-visible {
      outline: 2px solid var(--anthrovia-green-ring);
      outline-offset: 2px;
    }

    body.bible-mode .study-path-link:hover,
    body.bible-mode a.study-path-link:hover {
      background: var(--anthrovia-green-soft);
      border-color: var(--anthrovia-green-border);
      color: var(--anthrovia-green-deep);
      transform: translateY(-1px);
    }

    body.bible-mode .study-path-link:focus-visible,
    body.bible-mode a.study-path-link:focus-visible {
      outline: 2px solid var(--anthrovia-green-ring);
      outline-offset: 2px;
    }

    .study-progress-auth-card {
      margin-top: 0.62rem;
      padding: 0.85rem 0.95rem;
      border-radius: var(--radius);
      border: 1px solid rgba(47, 109, 246, 0.16);
      background: linear-gradient(165deg, rgba(47, 109, 246, 0.05) 0%, rgba(255, 255, 255, 0.76) 60%);
      box-shadow: var(--shadow-inset);
    }

    .study-progress-auth-title {
      margin: 0 0 0.3rem;
      font-size: 0.95rem;
      font-weight: 650;
      letter-spacing: -0.01em;
      color: var(--text);
    }

    .study-progress-auth-body {
      margin: 0 0 0.65rem;
      font-size: 0.85rem;
      color: var(--muted);
      line-height: 1.45;
      max-width: 38rem;
    }

    .study-progress-auth-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.45rem;
    }

    .study-progress-auth-actions .btn-theme,
    .study-progress-auth-actions .btn-theme-ghost {
      width: auto;
      font-size: 0.84rem;
      padding: 0.44rem 0.92rem;
    }

    @media (max-width: 820px) {
      .hero-card, .about-grid { grid-template-columns: 1fr; }
      .hero-badges { justify-content: flex-start; }
      .feature-strip { grid-template-columns: 1fr; }
      .study-columns { grid-template-columns: 1fr; }
      .container { padding: 16px 14px 14px; }
      #header { align-items: flex-start; }
    }

    /* ---- Global site footer (mounted by /js/site-footer.js) ---- */
.site-footer {
  margin-top: auto;
  padding: 1rem 0.2rem 0.78rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(28, 36, 68, 0.06);
  opacity: 0.82;
}

    body.bible-mode .site-footer {
      border-top-color: rgba(28, 36, 68, 0.04);
      color: #a7a196;
      opacity: 0.52;
      padding-top: 0.86rem;
      padding-bottom: 0.64rem;
    }

    body.bible-mode .site-footer-copy,
    body.bible-mode .site-footer-nav a,
    body.bible-mode .site-footer-note {
      color: #a7a196;
    }

    body.bible-mode .site-footer-copy {
      margin-bottom: 0.24rem;
      font-size: 0.7rem;
      opacity: 0.8;
    }

    body.bible-mode .site-footer-nav {
      margin-bottom: 0.3rem;
      gap: 0.18rem 0.32rem;
    }

    body.bible-mode .site-footer-note {
      font-size: 0.64rem;
      opacity: 0.72;
    }

    body.bible-mode .site-footer-nav a:hover {
      color: #6f6a63;
    }

    .site-footer-inner {
      max-width: 36rem;
      margin: 0 auto;
    }

    .site-footer-copy {
  margin: 0 0 0.32rem;
  color: var(--muted);
  font-size: 0.74rem;
  opacity: 0.86;
    }

    .site-footer-nav {
  margin: 0 0 0.42rem;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
  gap: 0.22rem 0.42rem;
    }

    .site-footer-nav a {
      color: var(--muted);
      text-decoration: none;
  font-weight: 460;
  font-size: 0.73rem;
    }

    .site-footer-nav a:hover {
      color: var(--accent);
      text-decoration: underline;
    }

    .site-footer-nav a:focus-visible {
      outline: 2px solid var(--accent-2);
      outline-offset: 3px;
      border-radius: 4px;
    }

    .site-footer-sep {
      color: var(--line);
      user-select: none;
    }

    .site-footer-note {
      margin: 0;
  font-size: 0.67rem;
      line-height: 1.45;
      color: var(--muted);
  opacity: 0.82;
    }

    @media (prefers-color-scheme: dark) {
      .site-footer {
        border-top-color: rgba(255, 255, 255, 0.14);
        background: rgba(29, 27, 24, 0.55);
        border-radius: var(--radius);
        padding-left: 1rem;
        padding-right: 1rem;
        color: rgba(232, 228, 218, 0.82);
      }

      .site-footer-copy {
        color: rgba(245, 242, 235, 0.92);
      }

      .site-footer-nav a {
        color: rgba(232, 228, 218, 0.78);
      }

      .site-footer-nav a:hover {
        color: #fff;
      }

      .site-footer-note {
        color: rgba(232, 228, 218, 0.62);
      }

      .site-footer-sep {
        color: rgba(255, 255, 255, 0.2);
      }
    }

    /* Terms & Privacy static pages */
    .legal-doc-page {
      flex: 1;
      min-height: 0;
    }

    .legal-doc {
      text-align: left;
    }

    .legal-doc .study-page-title {
      margin-bottom: 0.25rem;
    }

    .legal-doc-updated {
      margin: 0 0 1.25rem;
      font-size: 0.9rem;
    }

    .legal-doc-body p {
      margin: 0 0 0.85rem;
      line-height: 1.65;
      color: var(--text);
    }

    .legal-doc-body p:last-child {
      margin-bottom: 0;
    }

    .legal-doc-subhead {
      margin: 1.35rem 0 0.45rem;
      font-size: 1rem;
      font-weight: 650;
      color: var(--accent);
      letter-spacing: -0.02em;
    }

    .legal-doc-subhead:first-of-type {
      margin-top: 0.5rem;
    }

    .legal-doc-body a {
      color: var(--accent-2);
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .legal-doc-body a:hover {
      color: var(--navy-light);
    }

    .legal-doc-foot {
      margin-top: 1.25rem !important;
      font-size: 0.9rem;
      color: var(--muted) !important;
    }

    @media (max-width: 640px) {
      #header h1 { font-size: 1.55rem; }
      .nav-btn { padding: 0.62rem 0.86rem; }
      .hero-card,
      .about-card,
      #chat-shell,
      #bible-chat-shell,
      #legal-footer,
      .study-surface {
        border-radius: var(--radius);
      }
      .study-paths-grid { grid-template-columns: 1fr; }
      .study-lesson-stage {
        grid-template-columns: 1fr;
        row-gap: 0.55rem;
      }
      .study-lesson-back-to-top {
        justify-self: end;
        padding: 0;
      }
      .study-path-step-nav {
        flex-direction: column;
        align-items: stretch;
      }
      .study-path-step-nav-cluster {
        flex-direction: column;
        width: 100%;
      }
      .study-path-step-nav .btn-theme,
      .study-path-step-nav .btn-theme-ghost,
      body.bible-mode .account-form-actions .btn-theme,
      body.bible-mode .account-form-actions .btn-theme-ghost {
        width: 100%;
      }
      .study-progress-auth-actions .btn-theme,
      .study-progress-auth-actions .btn-theme-ghost {
        width: 100%;
      }
      .study-habits-days,
      .study-habits-row {
        grid-template-columns: minmax(0, 1fr) repeat(7, 1.35rem);
        column-gap: 0.35rem;
        row-gap: 0.35rem;
      }

      .study-habits-row {
        padding: 0.38rem 0;
      }

      .study-habits-habit-label {
        font-size: 0.82rem;
      }
      .message-question, .message-answer { max-width: 100%; }
      #queryForm, #bibleQueryForm { padding-bottom: 0; }
    }