/* ── Suggestions Page ─────────────────────────────────────────────────── */

.sgp-hero-sub { color: rgba(255,255,255,.8); }

/* Toolbar */
.sgp-toolbar {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--border-color);
}
.sgp-toolbar-btn {
    font-size: .82rem;
    font-weight: 600;
    padding: .35rem .85rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .15s;
}
.sgp-toolbar-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* Share toast */
.sgp-toast {
    display: inline-block;
    margin-top: .5rem;
    padding: .35rem .85rem;
    background: #d1fadf;
    color: #1a7f38;
    border-radius: 6px;
    font-size: .82rem;
    font-weight: 600;
}
[data-theme="dark"] .sgp-toast { background: #1a3b2a; color: #6ee7a0; }

/* Suggestion block */
.sgp-block { padding: 1.25rem; }
.sgp-block:last-child { margin-bottom: 0 !important; }

.sgp-header {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.sgp-name {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 0;
}
.sgp-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.sgp-updated {
    font-size: .75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Bookmark button */
.sgp-bookmark-btn {
    background: transparent;
    border: none;
    padding: .25rem .4rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    border-radius: 4px;
    transition: color .15s;
}
.sgp-bookmark-btn:hover, .sgp-bookmark-btn.active { color: var(--primary-color); }

/* PDF button */
.sgp-pdf-btn {
    font-size: .78rem;
    font-weight: 600;
    padding: .25rem .65rem;
    border-radius: 5px;
    border: 1px solid #e53e3e;
    background: transparent;
    color: #e53e3e;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.sgp-pdf-btn:hover { background: #e53e3e; color: #fff; }

/* Subject card */
.sgp-subject {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: .85rem 1rem;
    margin-bottom: .85rem;
    background: var(--card-bg);
}
.sgp-subject-title {
    font-weight: 600;
    font-size: .9rem;
    color: var(--text-primary);
    margin-bottom: .6rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.sgp-code {
    font-size: .75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Subject importance badges */
.sgp-subj-badge {
    font-size: .7rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 99px;
}
.sgp-must-read { background: #fef3c7; color: #92400e; }
.sgp-optional  { background: #e0e7ff; color: #3730a3; }
[data-theme="dark"] .sgp-must-read { background: #3b2a0a; color: #fbbf24; }
[data-theme="dark"] .sgp-optional  { background: #1e1b4b; color: #a5b4fc; }

.sgp-custom-label {
    font-weight: 600;
    font-size: .8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: .85rem 0 .4rem;
}

/* Part tabs */
.sgp-tabs { border-bottom: 1px solid var(--border-color); margin-bottom: .5rem; gap: .2rem; }
.sgp-tabs .nav-link {
    font-size: .8rem; font-weight: 600; padding: .3rem .85rem;
    color: var(--text-muted); border-radius: 6px 6px 0 0;
    border: 1px solid transparent; background: transparent; white-space: nowrap;
}
.sgp-tabs .nav-link.active {
    color: var(--primary-color);
    border-color: var(--border-color) var(--border-color) var(--card-bg);
    background: var(--card-bg);
}

/* Question list */
.sgp-list { padding-left: 1.4rem; margin: .4rem 0 0; }
.sgp-item {
    padding: .35rem 0; font-size: .9rem;
    display: flex; align-items: baseline; gap: .5rem;
    border-bottom: 1px solid var(--border-color);
}
.sgp-item:last-child { border-bottom: none; }
.sgp-link { flex: 1; color: var(--text-primary); text-decoration: none; line-height: 1.4; }
.sgp-link:hover { color: var(--primary-color); text-decoration: underline; }
.sgp-no-items { color: var(--text-muted); font-size: .85rem; font-style: italic; margin: .5rem 0 0; }

/* Importance badges */
.sgp-imp { font-size: .7rem; font-weight: 700; border-radius: 4px; padding: .1rem .4rem; white-space: nowrap; flex-shrink: 0; }
.sgp-imp-high { background: #d1fadf; color: #1a7f38; }
.sgp-imp-mid  { background: #fff3cd; color: #856404; }
.sgp-imp-low  { background: #fde8e8; color: #9b1c1c; }
[data-theme="dark"] .sgp-imp-high { background: #1a3b2a; color: #6ee7a0; }
[data-theme="dark"] .sgp-imp-mid  { background: #3b2e0a; color: #fbbf24; }
[data-theme="dark"] .sgp-imp-low  { background: #3b1a1a; color: #f87171; }

/* Bookmarks panel */
.sgp-bookmark-item {
    padding: .6rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.sgp-bookmark-item:last-child { border-bottom: none; }
.sgp-bookmark-link { font-weight: 600; font-size: .9rem; color: var(--primary-color); text-decoration: none; }
.sgp-bookmark-link:hover { text-decoration: underline; }
.sgp-bookmark-meta { font-size: .78rem; color: var(--text-muted); }

/* ── Print / PDF ─────────────────────────────────────────────────────────── */
@media print {
    body > *:not(#sgPrintArea) { display: none !important; }
    #sgPrintArea { display: block !important; padding: 1.5rem; color: #000 !important; background: #fff !important; }
}
.sgp-print-header { margin-bottom: 1.5rem; border-bottom: 2px solid #000; padding-bottom: .75rem; }
.sgp-print-title  { font-size: 1.3rem; font-weight: 800; }
.sgp-print-meta   { font-size: .8rem; color: #555; margin-top: .25rem; }
.sgp-print-subject { margin-bottom: 1.25rem; }
.sgp-print-subject-title { font-weight: 700; font-size: 1rem; border-bottom: 1px solid #ccc; padding-bottom: .3rem; margin-bottom: .5rem; }
.sgp-print-part   { font-weight: 600; font-size: .85rem; color: #444; margin: .5rem 0 .25rem; text-transform: uppercase; letter-spacing: .05em; }
.sgp-print-list   { padding-left: 1.3rem; margin: 0; }
.sgp-print-list li { padding: .2rem 0; font-size: .9rem; }
