/* WSO SCHOLAR LAYOUT SYSTEM (v3.0 - Card UI) */
:root {
    --sc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --sc-bg: #fff;
    --sc-text: #111;
    --sc-link: #3b82f6; /* Blue for links */
    --sc-border: #e5e7eb;
    --sc-muted: #6b7280;
    --sc-gold: #f59e0b;
    --sc-context-bg: #f9fafb;
}

[data-scheme="dark"] {
    --sc-bg: #111;
    --sc-text: #f3f4f6;
    --sc-border: #374151;
    --sc-muted: #9ca3af;
    --sc-context-bg: #1f2937;
}

/* CONTAINER */
.wso-scholar-wrapper {
    max-width: 850px;
    margin: 0 auto;
    font-family: var(--sc-font);
    color: var(--sc-text);
    padding-bottom: 50px;
}

/* 1. HEADLINES */
.scholar-subhead {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 30px;
    color: var(--sc-text);
    letter-spacing: -0.01em;
}

/* 2. CONTEXT BLOCK (The "Quote" style) */
.scholar-context-block {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    padding-left: 5px;
}
.context-icon {
    width: 40px;
    height: 40px;
    background: var(--sc-context-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    color: var(--sc-muted);
}
.context-content {
    border-left: 2px solid var(--sc-border);
    padding-left: 20px;
    flex: 1;
}
.context-text {
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 15px 0;
    color: var(--sc-text);
}
.context-ideal {
    font-size: 14px;
    color: var(--sc-muted);
    font-style: italic;
}

/* 3. TOOLBAR (Meta Bar) */
.scholar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--sc-border);
    border-radius: 6px;
    padding: 12px 20px;
    margin-top: 40px;
    font-size: 13px;
    background: var(--sc-bg);
}
.toolbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.toolbar-link {
    text-decoration: none;
    color: var(--sc-text);
    font-weight: 500;
}
.toolbar-link:hover { color: var(--sc-link); }
.toolbar-sep { color: var(--sc-border); }
.toolbar-bookmark {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--sc-text);
    padding: 0;
}
.toolbar-bookmark:hover { color: var(--sc-gold); }
.toolbar-bookmark.is-active { color: var(--sc-gold); font-weight: 700; }
.toolbar-right { color: var(--sc-muted); }

/* DIVIDER */
.scholar-divider {
    border: 0;
    height: 1px;
    background: var(--sc-border);
    margin: 30px 0;
}

/* 4. DOWNLOADS TABLE */
.scholar-downloads-area {
    margin-bottom: 40px;
}
.download-row {
    display: flex;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px dotted var(--sc-border);
}
.download-row:last-child { border-bottom: none; }
.download-label {
    width: 100px;
    font-size: 11px;
    font-weight: 700;
    color: var(--sc-muted);
    text-transform: uppercase;
    flex-shrink: 0;
}
.download-links {
    flex: 1;
    font-size: 14px;
}
.dl-link {
    color: var(--sc-link);
    text-decoration: none;
    font-weight: 500;
}
.dl-link:hover { text-decoration: underline; }
.dl-sep {
    color: var(--sc-border);
    margin: 0 8px;
}

/* 5. FILE EXPLORER */
.scholar-explorer {
    background: var(--sc-context-bg);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 40px;
    border: 1px solid var(--sc-border);
}
.explorer-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--sc-muted);
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}
.file-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.file-item {
    font-family: monospace; /* Tech feel */
    font-size: 13px;
    color: var(--sc-muted);
    display: flex;
    align-items: center;
}
.file-icon {
    margin-right: 10px;
    opacity: 0.5;
}

/* 6. FOOTER */
.scholar-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid var(--sc-border);
    font-size: 12px;
    color: #10b981; /* Green status */
    font-weight: 600;
    text-transform: uppercase;
}
.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}
.status-text { letter-spacing: 0.5px; }

/* 7. PRIVATE NOTES */
.scholar-notes-widget {
    margin-top: 40px;
    border-top: 1px dashed var(--sc-border);
    padding-top: 20px;
}
.notes-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--sc-muted);
    margin-bottom: 10px;
}
#wso-private-note {
    width: 100%;
    border: 1px solid var(--sc-border);
    background: var(--sc-context-bg);
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
    font-family: monospace;
    color: var(--sc-text);
    outline: none;
    transition: border 0.2s;
}
#wso-private-note:focus { border-color: var(--sc-muted); }
#note-status { opacity: 0; color: #10b981; transition: opacity 0.5s; }
#note-status.visible { opacity: 1; }

/* LOCKED STATE */
.scholar-locked-state {
    padding: 30px;
    background: #fff8e1; /* Pale yellow */
    border: 1px solid #ffe58f;
    border-radius: 6px;
    text-align: center;
    color: #b7791f;
}