/* ============================================================
   QUIZZY — NOTES CAFE STYLESHEET
   Responsive 2-column reader with left interactive sidebar.
   ============================================================ */

.notes-container {
    max-width: 1400px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ===== HERO & CONTROLS ===== */
.notes-hero {
    text-align: center;
    padding: 2rem 0 1.5rem;
}
.notes-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}
.notes-hero p {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}
.notes-search-wrap {
    max-width: 480px;
    margin: 0 auto 1.5rem;
    position: relative;
}
.notes-search-input {
    width: 100%;
    padding: 0.85rem 1.25rem 0.85rem 2.8rem;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}
.notes-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
}
.notes-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

/* ===== SUBJECT TABS / PILLS ===== */
.notes-subject-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.notes-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 30px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}
.notes-tab-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-2px);
}
.notes-tab-btn.active {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow-strong);
}

/* ===== CHAPTER CARDS GRID ===== */
.notes-chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}
.notes-chapter-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.notes-chapter-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 16px var(--accent-glow);
}
.notes-chap-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.notes-chap-subj {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--accent);
}
.notes-chap-dur {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}
.notes-chap-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.85rem;
}
.notes-chap-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.84rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    margin-top: auto;
}

/* ============================================================
   READER SCREEN (2-COLUMN LAYOUT)
   ============================================================ */
.notes-reader-screen {
    display: none;
}
.notes-reader-screen.active {
    display: block;
}

/* Sticky Reader Top Bar */
.notes-reader-bar {
    position: sticky;
    top: var(--nav-h);
    z-index: 40;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(12px);
}
.notes-reader-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.notes-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.notes-back-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}
.notes-reader-bar-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    text-align: center;
}
.notes-toc-btn {
    display: none;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.12), rgba(0, 212, 170, 0.05));
    border: 1.5px solid var(--accent);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.notes-toc-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Mobile TOC Drawer & Overlay */
.notes-toc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.notes-toc-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.notes-toc-drawer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    width: min(600px, 100vw);
    max-height: 82vh;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5), 0 0 25px var(--accent-glow);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
}
.notes-toc-drawer.open {
    transform: translate(-50%, 0);
}

.notes-toc-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem 1.4rem 1rem;
    border-bottom: 1px solid var(--border);
}
.notes-toc-drawer-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 0.25rem;
}

.notes-toc-drawer-body {
    padding: 1rem 1.4rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* 2-Column Grid Container */
.notes-reader-layout {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 3rem;
}

/* ===== LEFT SIDEBAR: INTERACTIVE TABLE OF CONTENTS ===== */
.notes-sidebar-toc {
    position: sticky;
    top: calc(var(--nav-h) + 60px);
    max-height: calc(100vh - var(--nav-h) - 80px);
    overflow-y: auto;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}
.notes-sidebar-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.notes-sidebar-subj {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent);
    margin-bottom: 0.25rem;
}
.notes-sidebar-chap {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 0.35rem;
}
.notes-sidebar-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}
.notes-sidebar-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.notes-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    overflow-y: auto;
    padding-right: 0.2rem;
}
.notes-sidebar-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}
.notes-sidebar-item:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateX(3px);
}
.notes-sidebar-item.active {
    background: rgba(168, 85, 247, 0.12);
    border-color: var(--st-purple, #a855f7);
    color: var(--text-primary);
    box-shadow: 0 2px 10px rgba(168, 85, 247, 0.2);
}
.notes-sidebar-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--bg-primary);
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--st-purple, #a855f7);
    flex-shrink: 0;
    margin-top: 1px;
}
.notes-sidebar-item.active .notes-sidebar-num {
    background: var(--st-purple, #a855f7);
    color: #fff;
}
.notes-sidebar-text {
    flex: 1;
}
.notes-sidebar-dur {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.15rem;
}

/* ===== RIGHT MAIN CANVAS ===== */
.notes-main-canvas {
    min-width: 0; /* Prevents flex/grid overflow */
}
.notes-doc-header {
    margin-bottom: 2rem;
}
.notes-doc-breadcrumb {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent);
    margin-bottom: 0.45rem;
}
.notes-doc-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 0.6rem;
    letter-spacing: -0.4px;
}
.notes-doc-meta {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================================
   BLOCK CARDS (Matching Reference Screenshots)
   ============================================================ */
.notes-blocks-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.note-block-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.6rem 1.75rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: var(--shadow-sm);
}
.note-block-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

/* Block Header */
.note-block-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.note-block-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.25);
    color: var(--st-purple, #a855f7);
    font-size: 0.95rem;
    font-weight: 800;
    flex-shrink: 0;
}
.note-block-title-wrap {
    flex: 1;
}
.note-block-subtype {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--st-purple, #a855f7);
    margin-bottom: 0.2rem;
}
.note-block-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.35;
}
.note-block-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}
.note-tag-badge {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.2px;
    padding: 0.22rem 0.65rem;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border);
    line-height: 1.3;
}
.note-tag-badge.pyq {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
    font-weight: 600;
}

/* Block Body: Text / Bullets */
.note-block-body {
    font-size: 0.98rem;
    line-height: 1.8;
    color: var(--text-secondary);
}
.note-block-body p {
    margin: 0 0 0.85rem 0;
}
.note-block-body ul {
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0 1rem 0;
}
.note-block-body li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
    line-height: 1.75;
}
.note-block-body li::before {
    content: "•";
    position: absolute;
    left: 0.3rem;
    color: var(--st-purple, #a855f7);
    font-size: 1.3rem;
    line-height: 1.4;
}
.note-block-body li ul {
    margin: 0.4rem 0 0.4rem 0;
}
.note-block-body li ul li::before {
    content: "◦";
    color: var(--accent);
}

/* Block Body: Image & 3D Model */
.note-image-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
}
.note-image-frame {
    max-width: 100%;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    display: inline-flex;
    justify-content: center;
}
.note-image {
    max-width: 100%;
    max-height: 380px;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
}
.note-caption {
    margin-top: 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

/* Block Body: Checkpoint PYQ Questions */
.note-q-prompt {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.15rem;
    line-height: 1.5;
}
.note-q-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.note-q-opt {
    padding: 0.85rem 1rem;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.note-q-opt::before {
    content: "•";
    color: var(--st-purple, #a855f7);
    font-size: 1.2rem;
}
.note-q-opt:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.note-q-reveal-btn {
    padding: 0.6rem 1.15rem;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.note-q-reveal-btn:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

/* Fixed Answer & Explanation Box */
.note-q-answer-box {
    display: none;
    margin-top: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-left: 4px solid var(--st-purple, #a855f7);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-secondary);
    overflow: hidden;
}
.note-q-answer-box.show {
    display: block;
    animation: slideUp 0.3s ease;
}

/* Block Body: Tables */
.note-table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
}
.note-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
}
.note-table th, .note-table td {
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border);
    text-align: left;
}
.note-table th {
    background: var(--bg-elevated);
    font-weight: 800;
    color: var(--text-primary);
}

/* Module Bottom Nav */
.notes-nav-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.notes-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.notes-nav-btn:hover:not(:disabled) {
    border-color: var(--accent);
    box-shadow: 0 4px 14px var(--accent-glow);
    transform: translateY(-2px);
}
.notes-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .notes-reader-layout {
        grid-template-columns: 1fr;
    }
    .notes-sidebar-toc {
        display: none !important;
    }
    .notes-toc-btn {
        display: inline-flex;
    }
    .notes-reader-bar-inner {
        gap: 0.5rem;
    }
    .notes-back-btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.82rem;
    }
    .notes-toc-btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.82rem;
    }
    .notes-doc-title { font-size: 1.55rem; }
    .note-block-card { padding: 1.25rem 1.1rem; }
    .note-q-options { grid-template-columns: 1fr; }
    .notes-chapter-grid { grid-template-columns: 1fr; }
}

/* ===== PHONE (≤ 600px) ===== */
@media (max-width: 600px) {
    /* Hero */
    .notes-hero h1 { font-size: 1.5rem; }
    .notes-hero p { font-size: 0.88rem; }

    /* Reader top bar — keep back + TOC btn side-by-side, truncate title */
    .notes-reader-bar-inner {
        gap: 0.4rem;
        flex-wrap: nowrap;
    }
    .notes-back-btn {
        flex-shrink: 0;
        padding: 0.45rem 0.65rem;
        font-size: 0.8rem;
        white-space: nowrap;
        max-width: 90px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .notes-reader-bar-title {
        font-size: 0.78rem;
        /* Truncate long chapter-path strings */
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .notes-toc-btn {
        flex-shrink: 0;
        padding: 0.45rem 0.6rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    /* Block cards */
    .note-block-card {
        padding: 1rem 0.9rem;
    }

    /* Block header: number badge + title side-by-side, title wraps naturally */
    .note-block-header {
        gap: 0.65rem;
        align-items: flex-start;
    }
    .note-block-num {
        width: 30px;
        height: 30px;
        font-size: 0.82rem;
        flex-shrink: 0;
    }
    /* THIS is the fix for the long vertical block title (SS1) */
    .note-block-title {
        font-size: 0.95rem;
        line-height: 1.4;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .note-block-subtype { font-size: 0.68rem; }

    /* Block body text */
    .note-block-body {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    /* Tags */
    .note-block-tags { gap: 0.3rem; }
    .note-tag-badge { font-size: 0.68rem; padding: 0.18rem 0.5rem; }

    /* Document title on reading screen */
    .notes-doc-title { font-size: 1.25rem; letter-spacing: -0.2px; }
    .notes-doc-breadcrumb { font-size: 0.75rem; }
    .notes-doc-meta { font-size: 0.85rem; }

    /* PYQ options */
    .note-q-options { grid-template-columns: 1fr; gap: 0.55rem; }
    .note-q-opt { font-size: 0.88rem; padding: 0.7rem 0.85rem; }
    .note-q-prompt { font-size: 0.95rem; }

    /* Tables */
    .note-table-wrap { margin: 0.75rem -0.1rem; }
    .note-table th, .note-table td { padding: 0.5rem 0.65rem; font-size: 0.85rem; }

    /* Chapter cards */
    .notes-chap-title { font-size: 1rem; }
    .notes-chap-meta { font-size: 0.78rem; }

    /* Bottom navigation */
    .notes-nav-footer { flex-wrap: wrap; gap: 0.6rem; }
    .notes-nav-btn {
        flex: 1;
        min-width: 120px;
        padding: 0.65rem 0.9rem;
        font-size: 0.85rem;
        justify-content: center;
    }

    /* TOC drawer on mobile */
    .notes-toc-drawer { width: 100vw; max-height: 78vh; }
    .notes-toc-drawer-title { font-size: 1rem; }
    .notes-sidebar-item { font-size: 0.84rem; padding: 0.6rem 0.7rem; }
}

/* ===== VERY SMALL PHONES (≤ 390px) ===== */
@media (max-width: 390px) {
    .notes-back-btn { max-width: 70px; font-size: 0.75rem; }
    .notes-reader-bar-title { font-size: 0.72rem; }
    .note-block-title { font-size: 0.88rem; }
    .notes-doc-title { font-size: 1.1rem; }
}

/* ============================================================
   PROVIDER HUB & PW DIGITAL BOOKS STYLES
   ============================================================ */

/* Breadcrumb Bar */
.notes-view-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.notes-crumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}
.notes-crumb-link:hover {
    color: var(--accent);
}
.notes-crumb-current {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Provider Hub Cards */
.notes-provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 960px;
    margin: 1.5rem auto 3.5rem;
}

.notes-provider-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.2, 0, 0, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.notes-provider-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28), 0 0 20px var(--accent-glow);
}

.notes-provider-card.allen:hover {
    border-color: #10b981;
}

.notes-provider-card.pw:hover {
    border-color: #00bfa5;
}

.notes-provider-badge {
    align-self: flex-start;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 0.28rem 0.85rem;
    border-radius: 20px;
    margin-bottom: 1.25rem;
}

.notes-provider-card.allen .notes-provider-badge {
    background: rgba(16, 185, 129, 0.14);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.notes-provider-card.pw .notes-provider-badge {
    background: rgba(0, 191, 165, 0.14);
    color: #00bfa5;
    border: 1px solid rgba(0, 191, 165, 0.3);
}

.notes-provider-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.notes-provider-icon {
    font-size: 2.3rem;
    line-height: 1;
}

.notes-provider-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
}

.notes-provider-desc {
    font-size: 0.94rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.notes-provider-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 1.1rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
}

.notes-provider-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    font-weight: 800;
}

/* PW Books Grid */
.pw-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.pw-book-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.pw-book-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 16px var(--accent-glow);
}

.pw-book-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.pw-badge-type {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.65rem;
    border-radius: 6px;
    background: rgba(0, 191, 165, 0.12);
    color: #00bfa5;
    border: 1px solid rgba(0, 191, 165, 0.25);
}

.pw-badge-class {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.pw-book-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.pw-book-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 0.85rem;
    margin-top: auto;
    font-size: 0.86rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* PW Book Chapters Screen */
.pw-chapters-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.pw-chapters-hero-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pw-chapters-hero-icon {
    font-size: 2.2rem;
}

.pw-chapters-hero-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.pw-chapters-hero-meta {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* PW Chapter Card in List */
.pw-chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 3.5rem;
}

.pw-chapter-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.35rem;
    cursor: pointer;
    transition: all 0.22s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.pw-chapter-card:hover {
    border-color: var(--accent);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 0 12px var(--accent-glow);
}

.pw-chap-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.pw-chap-num {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0, 191, 165, 0.12);
    color: #00bfa5;
    font-weight: 800;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pw-chap-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pw-chap-arrow {
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* ===== PW HTML READER SCREEN (Full Window) ===== */
.pw-reader-screen {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: var(--bg-primary);
    flex-direction: column;
}

.pw-reader-screen.active {
    display: flex;
}

.pw-reader-bar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
}

.pw-reader-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pw-reader-book-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pw-reader-chap-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pw-reader-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pw-reader-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pw-reader-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.pw-reader-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pw-reader-frame {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    background: var(--bg-primary);
}
