/* study-notes.css -- Notes editor, rich notes (concept cards, formulas, summary, tables, callouts) */

        /* Notes / Lesson view */
        .notes-view { padding: 26px 34px; max-width: 980px; margin: 0 auto; font-size: 16px; line-height: 1.78; color: var(--study-text); }
        .notes-view h1 { font-size: clamp(2rem, 1.35rem + 1.3vw, 2.65rem); font-weight: 800; margin: 14px 0 22px; letter-spacing: -0.02em; text-align: center; line-height: 1.16; }
        .notes-view h2 { font-size: 2rem; font-weight: 800; margin: 34px 0 16px; letter-spacing: -0.02em; line-height: 1.2; }
        .notes-view h3 { font-size: 1.45rem; font-weight: 700; margin: 24px 0 12px; letter-spacing: -0.01em; }
        .notes-view p { margin: 10px 0 14px; }
        .notes-view ul,.notes-view ol { margin: 10px 0 16px; padding-left: 26px; }
        .notes-view li { margin-bottom: 8px; line-height: 1.66; }
        .notes-view li > ul, .notes-view li > ol { margin-top: 6px; margin-bottom: 4px; }
        .notes-view strong { color: var(--study-accent); }
        .notes-view a { color: #6366f1; text-decoration: underline; text-underline-offset: 2px; }
        .notes-view hr { border: none; border-top: 1.5px solid var(--study-border); margin: 34px 0; }
        .notes-view blockquote { border-left: 4px solid #6366f1; padding: 10px 18px; margin: 18px 0; background: color-mix(in srgb, #6366f1 8%, transparent); border-radius: 0 8px 8px 0; font-style: italic; }
        .notes-view code { background: var(--study-bg-tertiary); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
        .notes-view pre { background: var(--study-bg-secondary); border: 1px solid var(--study-border); border-radius: 8px; padding: 14px; margin: 16px 0; overflow-x: auto; }
        .notes-view pre code { background: transparent; padding: 0; }

        /* ── Rich Notes, Numbered Sections ── */
        .notes-view h2 .section-num {
            display: inline-flex; align-items: center; justify-content: center;
            width: 32px; height: 32px; border-radius: 50%; background: var(--study-accent);
            color: #fff; font-size: 14px; font-weight: 800; margin-right: 10px; vertical-align: middle;
            flex-shrink: 0;
        }

        /* ── Rich Notes, Concept Cards Grid ── */
        .notes-concept-grid {
            display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 14px; margin: 20px 0 28px;
        }
        .notes-concept-card {
            padding: 20px; border-radius: 12px; border: 1.5px solid var(--study-border);
            background: var(--study-bg-secondary); transition: all 0.15s;
            box-shadow: 3px 3px 0 var(--study-accent-dim, rgba(0,0,0,0.15));
        }
        .notes-concept-card:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 rgba(232,133,58,0.2); border-color: var(--study-accent); }
        .notes-concept-card-icon { font-size: 28px; margin-bottom: 10px; }
        .notes-concept-card-title { font-size: 15px; font-weight: 700; color: var(--study-text); margin-bottom: 6px; }
        .notes-concept-card-desc { font-size: 13px; color: var(--study-text-tertiary); line-height: 1.5; }

        /* ── Rich Notes, Formula Block ── */
        .notes-formula-block {
            padding: 24px; border-radius: 14px; border: 1.5px solid var(--study-border);
            background: var(--study-bg-secondary); margin: 20px 0 28px; text-align: center;
        }
        .notes-formula-header {
            display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
            font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--study-text-tertiary);
        }
        .notes-formula-tag { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--study-accent); color: var(--study-accent); }
        .notes-formula-expr { font-size: 28px; font-weight: 800; font-family: 'Courier New', monospace; color: var(--study-text); margin: 16px 0; letter-spacing: 0.02em; }
        .notes-formula-desc { font-size: 13px; color: var(--study-text-tertiary); max-width: 500px; margin: 0 auto 16px; line-height: 1.5; }
        .notes-formula-vars { text-align: left; margin: 0 auto; max-width: 360px; }
        .notes-formula-vars-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--study-text-tertiary); margin-bottom: 8px; }
        .notes-formula-var { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
        .notes-formula-var-name { font-weight: 800; color: var(--study-accent); min-width: 30px; }
        .notes-formula-var-desc { color: var(--study-text-secondary); }

        /* ── Rich Notes, Summary / Key Takeaways ── */
        .notes-summary {
            padding: 24px; border-radius: 14px; border: 1.5px solid var(--study-border);
            background: var(--study-bg-secondary); margin: 28px 0;
        }
        .notes-summary-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
        .notes-summary-icon { font-size: 24px; }
        .notes-summary-title { font-size: 22px; font-weight: 800; color: var(--study-text); }
        .notes-summary-sub { font-size: 13px; color: var(--study-text-tertiary); margin-bottom: 16px; }
        .notes-summary-item {
            display: flex; align-items: flex-start; gap: 14px; padding: 14px 0;
            border-bottom: 1px solid rgba(255,255,255,0.04);
        }
        .notes-summary-item:last-child { border-bottom: none; }
        .notes-summary-num { font-size: 13px; font-weight: 700; color: var(--study-text-tertiary); min-width: 24px; padding-top: 2px; }
        .notes-summary-text { font-size: 15px; color: var(--study-text); line-height: 1.5; }

        /* ── Rich Notes, Tables ── */
        .notes-view table {
            width: 100%; border-collapse: collapse; margin: 20px 0 28px;
            border-radius: 10px; overflow: hidden; border: 1.5px solid var(--study-border);
        }
        .notes-view thead { background: var(--study-bg-secondary); }
        .notes-view th {
            font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
            color: var(--study-text-tertiary); padding: 12px 16px; text-align: left;
        }
        .notes-view td { padding: 12px 16px; border-top: 1px solid var(--study-border); font-size: 14px; color: var(--study-text-secondary); }
        .notes-view tbody tr:hover { background: rgba(255,255,255,0.02); }

        /* ── Rich Notes, Important callout ── */
        .notes-callout {
            padding: 16px 18px; border-radius: 10px; border-left: 4px solid var(--study-accent);
            background: rgba(232,133,58,0.06); margin: 18px 0;
        }
        .notes-callout-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--study-accent); margin-bottom: 4px; }
        .notes-callout-text { font-size: 14px; color: var(--study-text-secondary); line-height: 1.5; }

        .notes-empty { text-align: center; padding: 60px 20px; color: var(--study-text-tertiary); }
        .notes-empty i { width: 48px; height: 48px; margin-bottom: 12px; }
        .notes-empty h3 { font-size: 22px; font-weight: 800; margin: 0 0 10px; color: var(--study-text); letter-spacing: -0.03em; }
        .notes-empty p { color: var(--study-text-secondary); font-size: 14px; line-height: 1.65; max-width: 36rem; margin: 0 auto 18px; }
        .study-illustration { display: block; width: 100%; height: auto; user-select: none; pointer-events: none; }
        .notes-empty-visual { display: flex; justify-content: center; margin-bottom: 18px; }
        .notes-empty-illustration { width: min(280px, 72vw); filter: drop-shadow(0 18px 30px rgba(15, 23, 42, 0.08)); }


/* --- Notes Page Tabs --- */
        /* Notes Page Tabs */
        .notes-page-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 10px; flex-wrap: wrap; flex-shrink: 0; }
        .notes-page-tabs { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
        .notes-page-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
        .notes-page-tab { display: flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--study-border); background: transparent; color: var(--study-text-secondary); font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .15s; }
        .notes-page-tab:hover { color: var(--study-text); background: var(--study-bg-tertiary); }
        .notes-page-tab.active { background: var(--study-accent-dim); color: var(--study-accent); border-color: var(--study-accent); cursor: default; }
        .notes-page-tab-ghost { background: var(--study-bg-secondary); }
        .notes-page-tab-add { background: var(--study-bg-secondary); border-color: var(--study-border-light); }
        .test-settings-help { margin-top: 8px; font-size: 12px; line-height: 1.45; color: var(--study-text-tertiary); }

/* --- Quill editor overrides, notes images --- */
        /* Right Notes (Quill) */
        .right-notes { flex: 1; overflow-y: auto; }
        .right-notes .ql-toolbar { border-color: var(--study-border) !important; background: var(--study-bg) !important; }
        .right-notes .ql-container { border-color: var(--study-border) !important; font-family: 'Inter', sans-serif !important; font-size: 14px !important; }
        .right-notes .ql-editor { color: var(--study-text) !important; min-height: 200px; }
        .right-notes .ql-editor.ql-blank::before { color: var(--study-text-tertiary) !important; }
        .right-notes .ql-snow .ql-stroke { stroke: var(--study-text-secondary) !important; }
        .right-notes .ql-snow .ql-fill { fill: var(--study-text-secondary) !important; }
        .right-notes .ql-snow .ql-picker-label { color: var(--study-text-secondary) !important; }

        /* Quill editor content, match notes-view spacing */
        .ql-editor { padding: 26px 34px !important; line-height: 1.78 !important; font-size: 16px !important; }
        .ql-editor h1 { font-size: clamp(2rem, 1.35rem + 1.3vw, 2.65rem) !important; font-weight: 800 !important; margin: 14px 0 22px !important; letter-spacing: -0.02em !important; text-align: center !important; line-height: 1.16 !important; }
        .ql-editor h2 { font-size: 2rem !important; font-weight: 800 !important; margin: 34px 0 16px !important; letter-spacing: -0.02em !important; line-height: 1.2 !important; }
        .ql-editor h3 { font-size: 1.45rem !important; font-weight: 700 !important; margin: 24px 0 12px !important; letter-spacing: -0.01em !important; }
        .ql-editor p { margin: 10px 0 14px !important; }
        .ql-editor ul,.ql-editor ol { margin: 10px 0 16px !important; padding-left: 26px !important; }
        .ql-editor li { margin-bottom: 8px !important; line-height: 1.66 !important; }
        .ql-editor strong { color: var(--study-accent) !important; }
        .ql-editor a { color: #6366f1 !important; text-decoration: underline !important; text-underline-offset: 2px !important; }
        .ql-editor hr { border: none !important; border-top: 1.5px solid var(--study-border) !important; margin: 34px 0 !important; }
        .ql-editor blockquote { border-left: 4px solid #6366f1 !important; padding: 10px 18px !important; margin: 18px 0 !important; background: color-mix(in srgb, #6366f1 8%, transparent) !important; border-radius: 0 8px 8px 0 !important; }

        /* Notes images */
        .notes-view img, .ql-editor img { max-width: 80%; height: auto; border-radius: 10px; margin: 16px auto; display: block; border: 1px solid var(--study-border); }
        .notes-view p > img:only-child, .ql-editor p > img:only-child { margin: 20px auto; }
