@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Merriweather:wght@400;700&display=swap');

:root {
    /* Color Palette - Calm & Professional */
    --bg-main: #fdfdfc;
    /* Warm off-white */
    --bg-sidebar: #f8f9f8;
    /* Subtle green-tinted gray */
    --bg-content: #ffffff;
    --text-primary: #1F2937;
    /* Unified dark gray */
    --text-secondary: #6B7280;
    /* Muted gray */
    --accent-muted: #4a69bd;
    /* Slate blue */
    --accent-light: #f1f2f6;
    --border-subtle: #e1e4e8;
    --divider: #f1f2f6;

    /* Spacing & Layout */
    --sidebar-width: 260px;
    --max-content-width: 1000px;
    --vertical-rhythm: 1.5rem;

    /* Typography */
    --font-ui: 'Inter', -apple-system, sans-serif;
    --font-heading: 'Merriweather', serif;
    --font-content: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: #1F2937;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg-main);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

.explore-container {
    display: flex;
    height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 32px 24px 16px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-subtle);
}

.header-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.sidebar-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border-subtle);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-link i {
    font-size: 20px;
}

.back-link:hover {
    background: var(--accent-light);
    color: var(--accent-muted);
    border-color: var(--accent-muted);
    transform: scale(1.05);
}

.sidebar-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0;
}

.search-box {
    position: relative;
    margin-bottom: 8px;
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    font-size: 0.95rem;
    background: #f5f5f5;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-box input:focus {
    background: white;
    border-color: var(--accent-muted);
    box-shadow: 0 0 0 4px rgba(74, 105, 189, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.search-box input::placeholder {
    color: #a4b0be;
}

.tree-controls {
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding: 12px 0 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 12px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.02);
}

.tree-controls button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #E6E8EC;
    border-radius: 100px;
    /* Pill shape */
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.tree-controls button:hover {
    background: #F1F2F6;
    color: var(--accent-muted);
    border-color: var(--accent-muted);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tree-controls button i {
    font-size: 18px;
}

/* Unified Tree Navigation */
.pane {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px;
    background: var(--bg-sidebar);
}

.tree-node {
    margin-bottom: 1px;
}

.node-content {
    display: flex;
    align-items: center;
    padding: 2px 8px; /* Compact padding */
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem; /* Smaller font */
    color: #444;
    gap: 4px;
    white-space: nowrap;
}

.node-content:hover {
    background: rgba(74, 105, 189, 0.04);
    color: var(--accent-muted);
}

/* Subtle icon state change on hover (Item 2) */
.node-content:hover .node-icon {
    color: var(--accent-muted);
    transform: scale(1.1);
}

.node-content:hover .toggle-icon {
    color: var(--accent-muted);
    background: rgba(0, 0, 0, 0.04);
}

.tree-node.top-level {
    margin-top: 12px; /* Reduced vertical margin */
}

.tree-node.top-level>.node-content {
    font-weight: 700;
    color: var(--text-primary);
    text-transform: none;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

/* Subfolder differentiation (Item 9) */
.directory:not(.top-level)>.node-content span {
    color: #888;
    font-size: 0.95rem;
}

.directory:not(.top-level)>.node-content:hover span {
    color: var(--accent-muted);
}

.toggle-icon {
    width: 18px;
    height: 18px;
    font-size: 16px;
    color: #999;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.node-content:hover .toggle-icon {
    color: var(--accent-muted);
    background: rgba(74, 105, 189, 0.08);
}

.toggle-spacer {
    width: 18px;
}

.expanded>.node-content>.toggle-icon {
    transform: rotate(0deg);
    /* We'll use expand_more/less so no rotation needed */
}

.node-children {
    display: none;
    margin-left: 8px;
    padding-left: 0;
    border-left: 1px solid #f2f2f2;
}

.expanded>.node-children {
    display: block;
}

.node-icon {
    width: 18px;
    text-align: center;
    font-size: 16px;
    color: #777;
    transition: color 0.2s ease;
}

.folder .node-icon {
    color: #555;
}

.file .node-icon {
    color: #888;
}

.file .node-content {
    padding: 2px 8px 2px 32px; /* Compact indent */
    font-size: 0.85rem;
    color: #777;
}

.file .node-content:hover {
    text-decoration: underline;
}

.directory>.node-content:hover .node-icon {
    transform: scale(1.1);
}

.file .node-content.active {
    color: var(--accent-muted);
    background: var(--accent-light);
}

/* Loading & Utils */
.loading-mini {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.spinner-tiny {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(74, 105, 189, 0.1);
    border-top-color: var(--accent-muted);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* --- MAIN CONTENT --- */
.content-wrapper {
    flex: 1;
    background: var(--bg-main);
    overflow-y: auto;
    display: flex;
    justify-content: center;
    /* Center the reading list */
    scroll-behavior: smooth;
}

.welcome-screen {
    max-width: var(--max-content-width);
    margin: auto;
    text-align: center;
    padding: 60px 40px;
}

.welcome-icon {
    font-size: 3.5rem;
    margin-bottom: 24px;
    opacity: 0.8;
}

.welcome-content h1 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-family: var(--font-content);
}

.welcome-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.content-view {
    width: 100%;
    max-width: var(--max-content-width);
    background: var(--bg-content);
    margin: 24px auto;
    padding: 48px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    min-height: calc(100% - 48px);
}

.content-header {
    margin-bottom: 24px;
    border-bottom: 2px solid var(--text-primary);
    padding-bottom: 12px;
    text-align: right;
}

.breadcrumb {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.breadcrumb span::after {
    margin-left: 8px;
    opacity: 0.3;
}

.breadcrumb span:last-child::after {
    display: none;
}

#contentTitle {
    font-family: var(--font-content);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    text-align: right;
}

/* --- MARKDOWN BODY --- */
.markdown-body {
    font-family: var(--font-content);
    font-size: 1.15rem;
    color: var(--text-primary);
    line-height: 1.75;
}

.markdown-body a {
    color: var(--accent-muted);
    text-decoration: underline dotted;
    text-underline-offset: 4px;
    transition: opacity 0.2s ease;
}

.markdown-body a:hover {
    opacity: 0.7;
    text-decoration: underline dotted;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    font-family: var(--font-content);
    color: #1F2933;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.markdown-body h2 {
    font-size: 1.75rem;
    border-bottom: 1px solid var(--divider);
    padding-bottom: 8px;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.markdown-body p {
    margin-bottom: 1rem;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.markdown-body li {
    margin-bottom: 0.75rem;
}

/* YAML/Frontmatter and Tags */
.markdown-body hr {
    border: none;
    border-top: 1px solid var(--text-primary);
    /* Prominent, scholarly line */
    opacity: 0.3;
    margin: 2rem 0;
}

/* Footer Styling */
.content-footer {
    margin-top: 32px;
    padding: 24px 0 80px 0;
    /* More space below created date */
    border-top: 1px solid var(--text-primary);
    opacity: 0.3;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: left;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: var(--font-ui);
}

.footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.created-date {
    font-weight: 500;
}

/* Reference Tables */
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 1rem;
    font-family: var(--font-ui);
    /* Tables feel more structured with sans */
}

.markdown-body th {
    text-align: left;
    padding: 12px;
    background: var(--bg-sidebar);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.markdown-body td {
    padding: 8px;
    border-bottom: 1px solid var(--divider);
}

/* Action Controls & Tags Styling */
.content-header {
    margin-bottom: 24px;
    border-bottom: 2px solid var(--text-primary);
    padding-bottom: 12px;
}

.header-controls-left {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    justify-content: flex-start;
}

.header-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    margin-bottom: 32px;
    gap: 20px;
}

.header-controls-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-meta-container {
    display: flex;
    justify-content: flex-start;
    /* Bottom Left Tags */
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--divider);
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 16px;
    background: white;
    border: 1px solid var(--divider);
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    font-family: var(--font-ui);
    min-width: 90px;
}

.font-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-right: 20px;
    border-right: 1px solid var(--divider);
}

.font-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: white;
    color: var(--accent-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.font-btn:hover {
    background: var(--bg-main);
    border-color: var(--accent-muted);
}

.font-btn.small {
    font-size: 0.85rem;
}

.font-btn.large {
    font-size: 1.1rem;
}

.underline-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: white;
    color: var(--accent-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-ui);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-size: 1.1rem;
    text-decoration: underline;
}

.underline-btn:hover {
    background: var(--bg-main);
    border-color: var(--accent-muted);
}

/* Color Palette Controls */
.color-palette {
    display: flex;
    gap: 14px;
    align-items: center;
}

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid white;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.color-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.color-dot.active {
    border-color: var(--accent-muted);
    transform: scale(1.15);
}

.color-dot.yellow {
    background-color: #fef9c3;
}

.color-dot.pink {
    background-color: #fce7f3;
}

.color-dot.blue {
    background-color: #e0f2fe;
}

.color-dot.clear {
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #999;
}

.color-dot.clear::after {
    content: '✕';
    font-size: 11px;
    font-weight: 800;
}

/* Selection Highlighter Classes */
.highlight-yellow {
    background-color: #fef9c3;
    padding: 0 2px;
    border-radius: 2px;
}

.highlight-pink {
    background-color: #fce7f3;
    padding: 0 2px;
    border-radius: 2px;
}

.highlight-blue {
    background-color: #e0f2fe;
    padding: 0 2px;
    border-radius: 2px;
}

.text-underline {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.control-btn:hover {
    background: var(--bg-main);
    border-color: var(--accent-muted);
    color: var(--accent-muted);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.control-icon {
    font-size: 1.1rem;
}

span.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-light);
    color: var(--accent-muted);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-ui);
}

/* Utils */
.hidden {
    display: none !important;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--accent-light);
    border-top-color: var(--accent-muted);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(253, 253, 252, 0.8);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-text {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- MODE TOGGLE --- */
.mode-toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    padding: 0 20px;
    height: 46px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.mode-toggle-btn:hover {
    border-color: var(--accent-muted);
    background: white;
    box-shadow: 0 4px 12px rgba(74, 105, 189, 0.1), inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.mode-content-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.mode-content-wrapper h2 {
    font-size: 0.95rem !important;
    white-space: nowrap;
    margin: 0 !important;
    font-weight: 500;
}

.mode-toggle-btn .dropdown-icon {
    margin-left: auto;
    font-size: 18px;
    color: var(--text-secondary);
    opacity: 0.5;
}

.personal-icon {
    font-size: 20px;
    color: var(--accent-muted);
}

/* --- CONFIG BUTTON --- */
.config-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    height: 46px;
    background: #f5f5f5;
    color: var(--accent-muted);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 20px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.config-btn:hover {
    background: white;
    border-color: var(--accent-muted);
    box-shadow: 0 4px 12px rgba(74, 105, 189, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* --- PERSONAL PLACEHOLDER --- */
.personal-placeholder {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

/* Responsive constraints */
@media (max-width: 1000px) {
    .content-view {
        padding: 40px;
        margin: 20px;
        overflow-x: hidden;
    }
}

/* Adjusting welcome content for better rhythm */
.welcome-content {
    max-width: 1150px !important;
    width: 95%;
}

.welcome-content h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.welcome-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* --- TRACK LAYOUT (Discipleship Tracks) --- */
.track-layout {
    --track-accent: #1F2933;
    --track-bg: #fdfdfd;
    --week-accent: #1F2933;
    max-width: 1150px;
    margin: 0 auto;
    font-family: var(--font-ui);
}

.track-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 80px 0 100px 0;
    gap: 60px;
    position: relative;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 60px;
}

.track-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2000px;
    right: -2000px;
    bottom: 0;
    background: #F8F9FB;
    z-index: -1;
}

.track-hero>* {
    max-width: 1150px;
}

.track-hero-left {
    flex: 2;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.hero-header-group {
    margin-bottom: 20px;
}

.track-hero-audience {
    margin-top: 40px;
}

.track-hero-audience .meta-label {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: #9CA3AF;
    margin-bottom: 12px;
    display: block;
}

.track-hero-audience .meta-value {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #374151;
    font-size: 1.15rem;
    font-family: var(--font-ui);
}

.track-hero-audience .audience-text {
    white-space: nowrap;
    font-weight: 500;
}

.track-hero-audience .meta-value i {
    font-size: 1.4rem;
    color: #9CA3AF;
}

.track-hero-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-left: 60px;
    border-left: 1px solid #E5E7EB;
    padding-top: 28px;
    margin-bottom: 40px;
    /* Space from bottom */
}

.track-hero h1 {
    font-family: 'Merriweather', serif !important;
    font-size: 52px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em !important;
    color: #1F2933 !important;
    margin: 0 0 12px 0 !important;
    text-align: left !important;
    border: none !important;
}

.track-hero h2 {
    font-family: 'Inter', sans-serif !important;
    font-size: 16px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    color: #6B7280 !important;
    font-weight: 500 !important;
    margin: 0 !important;
    border: none !important;
    text-align: left !important;
    opacity: 1 !important;
}

.track-meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9CA3AF;
    margin-bottom: 4px;
}

.meta-value {
    font-size: 18px;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-value i {
    font-size: 20px;
    color: #4B5563;
}

.track-overview {
    background: white;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    margin-bottom: 48px;
    line-height: 1.8;
    max-width: 1150px;
    margin-left: auto;
    margin-right: auto;
}

.track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

/* Specific Override for Theology Track: Single Column & Centered Village Village 2.0. */
.theology-track {
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
}

.theology-track .track-grid,
.theology-track .track-overview,
.theology-track .bonus-section,
.theology-track .week-section {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.theology-track .track-overview,
.theology-track .card-content {
    padding-left: 32px !important;
    padding-right: 32px !important;
}

.theology-track .track-grid {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 48px;
}

.week-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.week-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.week-header {
    background: var(--week-accent);
    color: white;
    padding: 24px;
}

.week-header .week-title {
    margin: 0 !important;
    border: none !important;
    color: white !important;
    text-align: left !important;
    font-family: 'Merriweather', serif !important;
    font-weight: 700 !important;
    font-size: 24px !important;
    line-height: 1.3 !important;
    letter-spacing: 0.3px !important;
}

.week-header .week-subtitle {
    margin-top: 8px;
    font-family: 'Merriweather', serif !important;
    font-weight: 400 !important;
    font-size: 15px !important;
    color: #D8E0E8 !important;
    opacity: 1 !important;
    font-style: italic;
}

.week-content {
    padding: 24px;
    flex: 1;
}

.week-section {
    margin-bottom: 24px;
}

.week-section:last-child {
    margin-bottom: 0;
}

.section-label {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #6B7280 !important;
    margin: 0 0 12px 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 14px;
    background: var(--track-accent);
    border-radius: 2px;
}

.scripture-list,
.file-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.scripture-list li,
.file-list li {
    padding: 12px 16px;
    background: #f8f9fb;
    border-radius: 10px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.scripture-list li:hover,
.file-list li:hover {
    background: white;
    border-color: var(--border-subtle);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.scripture-list li::before {
    content: '📖';
    font-size: 1rem;
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: 4px;
    /* Better vertical alignment for grid */
}

.scripture-list li {
    display: grid !important;
    grid-template-columns: auto 1fr;
    align-items: start;
    padding: 12px 16px;
    gap: 0 12px;
}

.scripture-ref-container {
    grid-column: 2;
    font-weight: 500;
}

.scripture-ref-container a,
.scripture-ref-container .verse-ref-link {
    display: inline;
}

.scripture-description {
    grid-column: 2;
    display: block;
    margin-top: 2px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.file-list li::before {
    content: '📄';
    font-size: 1rem;
}

.practice-days {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.practice-day {
    padding: 14px;
    background: #fffcf0;
    border-left: 4px solid #ffcc00;
    border-radius: 6px;
    font-size: 0.95rem;
}

.bonus-section {
    margin-top: 48px;
    background: #f4f8ff;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #d0e3ff;
}

.bonus-section h2 {
    color: #1F2933 !important;
    border: none !important;
    margin-top: 0 !important;
    font-family: var(--font-heading) !important;
}

.progress-checklist {
    margin-top: 48px;
    padding: 32px;
    background: #f9f9f9;
    border-radius: 16px;
}

.checklist-week {
    margin-bottom: 32px;
}

.checklist-week h3 {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 8px;
    margin-bottom: 16px !important;
}


@media (max-width: 1000px) {
    .track-hero {
        flex-direction: column;
        padding: 40px 20px;
        gap: 30px;
    }

    .track-hero-right {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #E5E7EB;
        padding-top: 30px;
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 20px;
    }

    .track-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .track-hero h1 {
        font-size: 36px !important;
    }

    .track-hero-right {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- TYPOGRAPHY: BODY CONTENT --- */
.card-content,
.card-content li {
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
}

/* --- TYPOGRAPHY: LINKS --- */
.card-content a {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    color: #3B5B7A !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
}

.card-content a:hover {
    text-decoration: underline !important;
}

/* --- TYPOGRAPHY: DURATION --- */
.duration-text {
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    color: #6B7280 !important;
    margin-left: 4px;
}

/* --- TYPOGRAPHY: REFLECTION QUESTIONS --- */
.reflection-question ol {
    padding-left: 20px !important;
}

.reflection-question li {
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
    margin-bottom: 12px !important;
}

.reflection-question li::marker {
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
}

/* --- Q&A REDESIGN: MODERN & CLEAN --- */
.qa-redesign-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 32px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    font-family: 'Inter', sans-serif, system-ui;
}

/* Page context background */
.markdown-body {
    background-color: transparent !important;
}

/* --- TRACK SELECTION CARDS --- */
.track-selection-container {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 2px solid #F1F5F9;
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.selection-card {
    background: white;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.selection-card:hover {
    transform: translateY(-8px);
    border-color: var(--track-accent);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.selection-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--track-accent);
}

.selection-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--track-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.selection-card-title {
    font-family: 'Merriweather', serif;
    font-size: 20px;
    font-weight: 700;
    color: #1F2933;
    margin: 0;
}

.selection-card-desc {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #64748B;
    line-height: 1.6;
    margin: 0;
}

.selection-card-footer {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--track-accent);
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Track Specific Colors */
.selection-card.track-1 {
    --track-accent: #3B82F6;
}

/* Blue */
.selection-card.track-2 {
    --track-accent: #10B981;
}

/* Emerald */
.selection-card.track-3 {
    --track-accent: #8B5CF6;
}

/* Violet */

@media (max-width: 768px) {
    .selection-grid {
        grid-template-columns: 1fr;
    }
}

.content-view[style*="display: block"] {
    background: #F8FAFC !important;
}

/* Q&A Hero Styles (Matching Track View) */
.qa-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 80px 0 100px 0;
    position: relative;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 60px;
}

.qa-hero-titles {
    flex: 2;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.qa-hero-sub {
    font-family: 'Inter', sans-serif !important;
    font-size: 16px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    color: #6B7280 !important;
    font-weight: 500 !important;
    margin: 0 !important;
    border: none !important;
    text-align: left !important;
}

.qa-hero-title {
    font-family: 'Merriweather', serif !important;
    font-size: 52px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em !important;
    color: #1F2933 !important;
    margin: 12px 0 0 0 !important;
    text-align: left !important;
    border: none !important;
}

.qa-intro-text {
    background: #F8FAFC;
    border-radius: 10px;
    padding: 24px;
    color: #475569;
    font-size: 16px;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 32px;
}

.qa-intro-text h2 {
    color: var(--text-primary);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-style: normal;
}

.qa-outro-text {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-secondary);
    line-height: 1.7;
}

.qa-outro-text h1,
.qa-outro-text h2 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1.2rem;
}

.qa-section-block {
    margin-bottom: 4rem;
}

.qa-section-heading {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
    margin: 32px 0 16px 0;
    letter-spacing: -0.01em;
}

.qa-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qa-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: none;
}

.qa-card:hover {
    border-color: #3B82F6;
    background: #F8FAFC;
}

.qa-card.is-expanded {
    border-color: #3B82F6;
    background: #FFFFFF;
}

.qa-card-header {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: white;
    outline: none;
}

.qa-card-header:focus-visible {
    background: rgba(74, 105, 189, 0.04);
}

.qa-card-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.qa-card-icon {
    font-size: 24px;
    color: var(--accent-muted);
    opacity: 0.6;
}

.qa-card-question {
    font-size: 18px;
    font-weight: 500;
    color: #1E293B;
    margin: 0 !important;
    line-height: 1.4;
    border: none !important;
    padding: 0 !important;
}

.qa-chevron {
    font-size: 24px;
    color: var(--text-secondary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qa-card.is-expanded .qa-chevron {
    transform: rotate(180deg);
    color: var(--accent-muted);
}

.qa-card-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qa-card.is-expanded .qa-card-body {
    grid-template-rows: 1fr;
}

.qa-card-inner {
    overflow: hidden;
    padding: 0 24px 24px;
    opacity: 0;
    transition: opacity 0.3s ease, padding 0.3s ease;
}

.qa-card.is-expanded .qa-card-inner {
    opacity: 1;
    padding: 12px 24px 32px;
}

.qa-card-meta {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: #F8FAFC;
    border-radius: 8px;
}

.qa-card-segment {
    margin-bottom: 24px;
}

.qa-card-segment:last-child {
    margin-bottom: 0;
}

.qa-badge {
    display: inline-block;
    background: #DBEAFE;
    color: #1D4ED8;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.qa-quick-answer-block {
    background: #F1F5F9;
    border-left: 4px solid #3B82F6;
    padding: 24px;
    border-radius: 10px;
    color: #1E293B;
    font-size: 16px;
    line-height: 1.6;
}

.qa-segment-content a {
    color: #2563EB;
    text-decoration: none;
    font-weight: 500;
}

.qa-segment-content a:hover {
    text-decoration: underline;
}

.qa-divider {
    border-top: 1px solid #E5E7EB;
    padding-top: 24px;
    margin-top: 8px;
    margin-bottom: 24px;
}

.qa-segment-content ul li {
    margin-bottom: 12px;
    line-height: 1.6;
    padding: 4px 8px;
    transition: background 0.2s ease;
}

.qa-segment-content ul li:hover {
    background: #F8FAFC;
    border-radius: 8px;
}

.qa-highlight-box {
    background: #F1F5F9;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-muted);
}

.qa-card.is-expanded .qa-card-header {
    background: #FBFBFC;
}

@media (max-width: 768px) {
    .qa-redesign-container {
        margin: 0;
        border-radius: 0;
        border: none;
        padding: 20px;
    }

    .qa-section-heading {
        font-size: 1.75rem;
    }

    .qa-card-header {
        padding: 16px;
    }

    .qa-card-question {
        font-size: 1.1rem;
    }

    .qa-card.is-expanded .qa-card-inner {
        padding: 8px 16px 24px;
    }
}