/* =============================================================
   DSPSR Academic Knowledge Hub — knowledge-hub.css
   Covers: archive, all 6 templates, points badge, comments
   ============================================================= */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --hub-navy:   #002D5B;
    --hub-gold:   #FFC107;
    --hub-green:  #16a34a;
    --hub-light:  #f4f6f9;
    --hub-radius: 14px;
    --hub-shadow: 0 4px 20px rgba(0,45,91,.10);
    --hub-accent: #002D5B; /* overridden inline per-article */
}

/* ── Nav points badge ──────────────────────────────────────── */
.dspsr-pts-nav { list-style: none; }
.pts-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

/* ================================================================
   ARCHIVE — Hub homepage (/learn/)
   ================================================================ */

.hub-archive { background: var(--hub-light); min-height: 60vh; }

/* ── Archive Hero ──────────────────────────────────────────── */
.hub-archive__hero {
    background: linear-gradient(135deg, #001F3F 0%, #002D5B 60%, #1A5200 100%);
    padding: 64px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hub-archive__hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 70% 50%, rgba(255,193,7,.08) 0%, transparent 60%);
}
.hub-archive__hero-inner { max-width: 700px; margin: 0 auto; position: relative; }
.hub-archive__hero-icon { font-size: 56px; line-height: 1; margin-bottom: 12px; }
.hub-archive__hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}
.hub-archive__hero p { color: rgba(255,255,255,.8); font-size: 1rem; margin-bottom: 28px; }

/* Search bar */
.hub-search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    padding: 6px 6px 6px 18px;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.hub-search-bar i { color: #8899aa; }
.hub-search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: .97rem;
    background: transparent;
    color: #222;
}
.hub-search-bar button {
    background: var(--hub-navy);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    transition: background .2s;
}
.hub-search-bar button:hover { background: #003a75; }

/* ── Filter bar ────────────────────────────────────────────── */
.hub-archive__filters {
    background: #fff;
    border-bottom: 1px solid #e4e8f0;
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 80;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.hub-filters-wrap { max-width: 1200px; margin: 0 auto; }
.hub-filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.hub-filter-group { display: flex; flex-direction: column; gap: 2px; }
.hub-filter-group label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #667; }
.hub-filter-group select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: .88rem;
    color: #222;
    cursor: pointer;
    outline: none;
    transition: border-color .2s;
}
.hub-filter-group select:focus { border-color: var(--hub-navy); }
.hub-filter-clear {
    margin-left: auto;
    color: #dc2626;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #fca5a5;
    background: #fff5f5;
    transition: background .2s;
}
.hub-filter-clear:hover { background: #fee2e2; }

/* ── Results bar ───────────────────────────────────────────── */
.hub-archive__results-bar { padding: 12px 24px; }
.hub-results-wrap { max-width: 1200px; margin: 0 auto; }
.hub-results-count { font-size: .87rem; color: #667; }

/* ── Archive body ──────────────────────────────────────────── */
.hub-archive__body { max-width: 1200px; margin: 0 auto; padding: 0 24px 60px; }

/* Subject group */
.hub-subject-group { margin-bottom: 48px; }
.hub-subject-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e4e8f0;
}
.hub-subject-header h2 { font-size: 1.25rem; font-weight: 700; color: var(--hub-navy); margin: 0; }
.hub-subject-count {
    background: var(--hub-navy);
    color: #fff;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .78rem;
    font-weight: 700;
}
.hub-subject-header p { font-size: .87rem; color: #667; width: 100%; margin: 0; }

/* ── Article card grid ─────────────────────────────────────── */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.hub-grid--flat { margin-top: 8px; }

.hub-card {
    background: #fff;
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.hub-card:hover { transform: translateY(-4px); box-shadow: 0 10px 36px rgba(0,45,91,.15); }

.hub-card__link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1; }

.hub-card__top {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    position: relative;
}
.hub-card__icon { font-size: 2.2rem; line-height: 1; }
.hub-card__tmpl-badge {
    background: rgba(255,255,255,.2);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .06em;
    backdrop-filter: blur(4px);
}

.hub-card__body { padding: 16px 18px; flex: 1; }
.hub-card__body h3 { font-size: 1rem; font-weight: 700; color: #111; margin: 0 0 6px; line-height: 1.35; }
.hub-card__body p { font-size: .84rem; color: #555; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.hub-card__footer {
    padding: 10px 18px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .78rem;
    color: #667;
}
.hub-diff { font-weight: 600; }
.hub-mins i, .hub-has-dl i, .hub-likes i { margin-right: 3px; }
.hub-has-dl { color: var(--hub-green); }
.hub-likes  { color: #e11d48; }

/* Empty state */
.hub-empty { text-align: center; padding: 80px 24px; }
.hub-empty__icon { font-size: 48px; margin-bottom: 16px; }
.hub-empty h2 { color: var(--hub-navy); margin-bottom: 8px; }
.hub-empty p  { color: #667; }

/* ================================================================
   SHARED ARTICLE STYLES (all templates)
   ================================================================ */

/* Breadcrumb */
.hub-breadcrumb { margin-bottom: 16px; }
.hub-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: .82rem;
}
.hub-breadcrumb li { display: flex; align-items: center; color: rgba(255,255,255,.7); }
.hub-breadcrumb li + li::before { content: '›'; margin-right: 6px; opacity: .6; }
.hub-breadcrumb a { color: rgba(255,255,255,.8); text-decoration: none; }
.hub-breadcrumb a:hover { color: var(--hub-gold); }
.hub-breadcrumb li[aria-current] { color: #fff; font-weight: 600; }

/* ── Article Hero ──────────────────────────────────────────── */
.hub-hero {
    background: var(--hub-accent);
    padding: 52px 24px 60px;
    position: relative;
    overflow: hidden;
}
.hub-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--hub-light);
    clip-path: ellipse(55% 100% at 50% 100%);
}
.hub-hero--compact { padding: 36px 24px 50px; }
.hub-hero__inner { max-width: 820px; margin: 0 auto; position: relative; }
.hub-hero__icon { font-size: 48px; line-height: 1; margin-bottom: 10px; }
.hub-hero__title {
    font-size: clamp(1.5rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.2;
}
.hub-hero__desc { color: rgba(255,255,255,.8); font-size: 1rem; margin: 0 0 16px; }
.hub-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: .85rem;
    color: rgba(255,255,255,.75);
}
.hub-hero__meta span { display: flex; align-items: center; gap: 5px; }
.hub-hero__meta i { font-size: .8rem; }

/* Visual explainer hero */
.hub-hero--visual { padding: 0; min-height: 360px; display: flex; align-items: flex-end; }
.hub-hero-visual__img {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
}
.hub-hero-visual__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,29,63,.4) 0%, rgba(0,29,63,.8) 100%);
}
.hub-hero__inner--visual {
    padding: 40px 24px 60px;
    position: relative;
    width: 100%;
}

/* ── Prose content ─────────────────────────────────────────── */
.hub-prose { color: #222; line-height: 1.75; font-size: .97rem; }
.hub-prose h2 { font-size: 1.3rem; font-weight: 700; color: var(--hub-navy); margin: 1.6em 0 .6em; }
.hub-prose h3 { font-size: 1.1rem; font-weight: 700; color: #333; margin: 1.2em 0 .5em; }
.hub-prose p  { margin: 0 0 .9em; }
.hub-prose ul, .hub-prose ol { margin: 0 0 .9em 1.4em; }
.hub-prose li  { margin-bottom: .35em; }
.hub-prose strong { color: var(--hub-navy); }
.hub-prose a  { color: var(--hub-navy); text-decoration: underline; }
.hub-prose a:hover { color: #003a75; }
.hub-prose code {
    background: #f0f4f8;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: .88em;
    font-family: 'Cascadia Code', 'Fira Code', monospace;
}
.hub-prose blockquote {
    border-left: 4px solid var(--hub-gold);
    padding-left: 16px;
    color: #555;
    font-style: italic;
    margin: 1em 0;
}
.hub-prose img { max-width: 100%; border-radius: 8px; margin: .8em 0; }
.hub-prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .9rem; }
.hub-prose table th { background: var(--hub-navy); color: #fff; padding: 8px 12px; text-align: left; }
.hub-prose table td { border: 1px solid #e4e8f0; padding: 8px 12px; }
.hub-prose table tr:nth-child(even) td { background: #f8fafc; }

/* ── Engage row ────────────────────────────────────────────── */
.hub-engage-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
    border-top: 1px solid #e4e8f0;
    border-bottom: 1px solid #e4e8f0;
    margin: 32px 0;
}
.hub-like-btn, .hub-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 50px;
    border: 2px solid;
    background: transparent;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.hub-like-btn  { border-color: #e11d48; color: #e11d48; }
.hub-like-btn:hover, .hub-like-btn.liked { background: #e11d48; color: #fff; }
.hub-share-btn { border-color: var(--hub-navy); color: var(--hub-navy); }
.hub-share-btn:hover { background: var(--hub-navy); color: #fff; }

.hub-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 50px;
    background: var(--hub-green);
    color: #fff;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}
.hub-dl-btn:hover { background: #15803d; }
.hub-dl-btn--locked { background: #6b7280; }
.hub-dl-btn--locked:hover { background: #4b5563; }

.hub-dl-register-hint { font-size: .82rem; color: #555; margin: 0; }
.hub-dl-register-hint a { color: var(--hub-navy); }

.hub-pts-toast {
    display: inline-block;
    font-size: .82rem;
    color: var(--hub-green);
    font-weight: 700;
    opacity: 0;
    transition: opacity .3s;
}
.hub-pts-toast.show { opacity: 1; }

/* ── Comments wrap ─────────────────────────────────────────── */
.hub-comments-wrap { padding-top: 32px; }

/* ================================================================
   TEMPLATE — Unit Study Guide
   ================================================================ */

.hub-article--unit-guide { background: var(--hub-light); }

.hub-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    max-width: 1200px;
    margin: -20px auto 0;
    padding: 0 24px 60px;
    align-items: start;
}

/* Sidebar */
.hub-sidebar { position: sticky; top: 80px; }
.hub-sidebar__inner {
    background: #fff;
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
    padding: 20px;
    overflow: hidden;
}
.hub-sidebar__heading {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #667;
    margin: 0 0 10px;
}
.hub-unit-nav { display: flex; flex-direction: column; gap: 4px; }
.hub-unit-btn {
    background: transparent;
    border: none;
    text-align: left;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: .88rem;
    color: #444;
    cursor: pointer;
    transition: background .18s, color .18s;
    font-weight: 500;
}
.hub-unit-btn:hover  { background: var(--hub-light); }
.hub-unit-btn.active { background: var(--hub-navy); color: #fff; font-weight: 600; }

.hub-sidebar__download { margin-top: 18px; }
.hub-dl-hint { font-size: .75rem; color: #888; margin-top: 6px; text-align: center; }
.hub-sidebar__engage {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hub-sidebar__engage .hub-like-btn,
.hub-sidebar__engage .hub-share-btn { justify-content: center; border-radius: 8px; }

/* Unit panels */
.hub-content {
    background: #fff;
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
    padding: 32px;
    min-height: 400px;
}
.hub-unit-section { display: none; }
.hub-unit-section.active { display: block; }
.hub-unit-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--hub-navy);
    border-bottom: 2px solid var(--hub-light);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Sub-tabs */
.hub-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.hub-subtab {
    background: var(--hub-light);
    border: 2px solid transparent;
    border-radius: 50px;
    padding: 7px 16px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    transition: all .18s;
}
.hub-subtab:hover  { border-color: var(--hub-navy); color: var(--hub-navy); }
.hub-subtab.active { background: var(--hub-navy); color: #fff; border-color: var(--hub-navy); }

.hub-subtab-panel { display: none; }
.hub-subtab-panel.active { display: block; }

/* ================================================================
   TEMPLATE — Quick Concept
   ================================================================ */
.hub-article--concept { background: var(--hub-light); }
.hub-concept-layout { max-width: 820px; margin: -20px auto 0; padding: 0 24px 60px; }

.hub-concept-def {
    background: #fff;
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
    padding: 28px 32px;
    margin-bottom: 24px;
}
.hub-concept-def h2 { font-size: 1.1rem; color: #667; font-weight: 600; margin: 0 0 10px; }
.hub-concept-def .hub-prose { font-size: 1.05rem; }

.hub-key-points { margin-bottom: 24px; }
.hub-key-points h2 { font-size: 1.15rem; font-weight: 700; color: var(--hub-navy); margin-bottom: 14px; }
.hub-key-points__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.hub-kp-card {
    background: #fff;
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.hub-kp-card__num {
    width: 32px; height: 32px;
    background: var(--hub-navy);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
}
.hub-kp-card p { margin: 0; font-size: .92rem; color: #333; line-height: 1.5; }

.hub-concept-body {
    background: #fff;
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
    padding: 28px 32px;
    margin-bottom: 24px;
}

/* Flashcard */
.hub-flashcard-wrap { margin-bottom: 24px; }
.hub-flashcard-wrap h2 { font-size: 1.15rem; font-weight: 700; color: var(--hub-navy); margin-bottom: 14px; }
.hub-flashcard {
    height: 220px;
    perspective: 1000px;
    cursor: pointer;
    max-width: 500px;
    margin: 0 auto;
}
.hub-flashcard__inner {
    width: 100%; height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform .55s cubic-bezier(.4,0,.2,1);
}
.hub-flashcard.flipped .hub-flashcard__inner { transform: rotateY(180deg); }
.hub-flashcard__front,
.hub-flashcard__back {
    position: absolute; inset: 0;
    backface-visibility: hidden;
    border-radius: var(--hub-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px;
    box-shadow: var(--hub-shadow);
}
.hub-flashcard__front { background: var(--hub-navy); color: #fff; }
.hub-flashcard__back  { background: var(--hub-green); color: #fff; transform: rotateY(180deg); }
.hub-flashcard__label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; opacity: .7; margin-bottom: 10px; }
.hub-flashcard__front p, .hub-flashcard__back .hub-prose { font-size: 1.05rem; font-weight: 600; color: #fff; }
.hub-flashcard__back .hub-prose a { color: #fff; }
.hub-flashcard__hint { font-size: .75rem; opacity: .6; margin-top: 12px; }

/* ================================================================
   TEMPLATE — Comparison Matrix
   ================================================================ */
.hub-article--comparison { background: var(--hub-light); }
.hub-comparison-layout { max-width: 1100px; margin: -20px auto 0; padding: 0 24px 60px; }
.hub-comparison-intro { background: #fff; border-radius: var(--hub-radius); box-shadow: var(--hub-shadow); padding: 28px 32px; margin-bottom: 28px; }

.hub-cmp-section { background: #fff; border-radius: var(--hub-radius); box-shadow: var(--hub-shadow); padding: 28px 32px; margin-bottom: 28px; }
.hub-cmp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hub-cmp-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 500px;
    font-size: .92rem;
}
.hub-cmp-table thead th {
    background: var(--hub-navy);
    color: #fff;
    padding: 12px 16px;
    font-weight: 700;
    text-align: left;
}
.hub-cmp-criterion-head { background: #334155 !important; }
.hub-cmp-criterion { font-weight: 700; color: #222; padding: 10px 16px; background: #f8fafc; }
.hub-cmp-cell { padding: 10px 16px; border: 1px solid #e4e8f0; color: #333; vertical-align: middle; }
.hub-cmp-cell--good { color: #15803d; font-weight: 600; }
.hub-cmp-cell--bad  { color: #dc2626; font-weight: 600; }
.hub-cmp-table tbody tr:hover td { background: #f0f7ff; }

/* ================================================================
   TEMPLATE — Step-by-Step Tutorial
   ================================================================ */
.hub-article--steps { background: var(--hub-light); }
.hub-steps-layout { max-width: 860px; margin: -20px auto 0; padding: 0 24px 60px; }
.hub-steps-intro { background: #fff; border-radius: var(--hub-radius); box-shadow: var(--hub-shadow); padding: 28px 32px; margin-bottom: 28px; }

/* Progress */
.hub-progress-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.hub-progress-bar  { flex: 1; height: 8px; background: #e4e8f0; border-radius: 4px; overflow: hidden; }
.hub-progress-fill { height: 100%; background: linear-gradient(90deg, var(--hub-navy), var(--hub-green)); border-radius: 4px; transition: width .4s ease; }
.hub-progress-label { font-size: .82rem; color: #667; white-space: nowrap; font-weight: 600; }

/* Steps list */
.hub-steps-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 24px; }
.hub-step {
    background: #fff;
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
    padding: 28px 28px 28px 80px;
    position: relative;
    transition: box-shadow .2s;
}
.hub-step:hover { box-shadow: 0 8px 32px rgba(0,45,91,.14); }
.hub-step__number {
    position: absolute;
    left: 20px;
    top: 24px;
    width: 40px; height: 40px;
    background: var(--hub-navy);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}
.hub-step__body h3 { font-size: 1.1rem; font-weight: 700; color: var(--hub-navy); margin: 0 0 12px; }

/* Code block */
.hub-code-block { position: relative; margin: 16px 0; border-radius: 8px; overflow: hidden; }
.hub-code-block pre { margin: 0; border-radius: 8px; }
.hub-copy-btn {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: .78rem;
    cursor: pointer;
    transition: background .2s;
    z-index: 1;
}
.hub-copy-btn:hover { background: rgba(255,255,255,.3); }

/* Why collapsible */
.hub-why {
    margin-top: 14px;
    border: 1px solid #e4e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.hub-why summary {
    padding: 10px 14px;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
    color: #667;
    background: #f8fafc;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hub-why summary::-webkit-details-marker { display: none; }
.hub-why p { padding: 12px 14px; margin: 0; font-size: .9rem; color: #444; background: #fff; }

/* ================================================================
   TEMPLATE — Question Bank
   ================================================================ */
.hub-article--qbank { background: var(--hub-light); }
.hub-qbank-layout { max-width: 900px; margin: -20px auto 0; padding: 0 24px 60px; }
.hub-qbank-intro { background: #fff; border-radius: var(--hub-radius); box-shadow: var(--hub-shadow); padding: 28px 32px; margin-bottom: 24px; }

.hub-qbank-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    background: #fff;
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
    padding: 14px 18px;
}
.hub-qbank-filters { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.hub-qtag {
    background: var(--hub-light);
    border: 2px solid transparent;
    border-radius: 50px;
    padding: 6px 14px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    transition: all .18s;
}
.hub-qtag:hover  { border-color: var(--hub-navy); color: var(--hub-navy); }
.hub-qtag.active { background: var(--hub-navy); color: #fff; }

.hub-qbank-actions { display: flex; gap: 8px; flex-shrink: 0; }
.hub-qbank-reveal-all,
.hub-qbank-print {
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: .82rem;
    cursor: pointer;
    color: #555;
    transition: background .18s;
}
.hub-qbank-reveal-all:hover, .hub-qbank-print:hover { background: var(--hub-light); }

.hub-qa-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }

.hub-qa-item { background: #fff; border-radius: var(--hub-radius); box-shadow: var(--hub-shadow); overflow: hidden; }
.hub-qa-item[data-hidden] { display: none; }

.hub-qa-question {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-size: .95rem;
    color: #222;
    font-weight: 600;
    transition: background .18s;
}
.hub-qa-question:hover { background: #f8fafc; }
.hub-qa-question[aria-expanded="true"] { background: #f0f7ff; }

.hub-qa-num {
    width: 26px; height: 26px;
    background: var(--hub-navy);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    flex-shrink: 0;
}
.hub-qa-q { flex: 1; }
.hub-qa-tag {
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.hub-qa-tag--easy      { background: #dcfce7; color: #166534; }
.hub-qa-tag--medium    { background: #fef9c3; color: #854d0e; }
.hub-qa-tag--hard      { background: #fee2e2; color: #991b1b; }
.hub-qa-tag--exam      { background: #ede9fe; color: #5b21b6; }
.hub-qa-tag--interview { background: #dbeafe; color: #1e40af; }

.hub-qa-chevron { margin-left: auto; font-size: .82rem; transition: transform .25s; flex-shrink: 0; }
.hub-qa-question[aria-expanded="true"] .hub-qa-chevron { transform: rotate(180deg); }

.hub-qa-answer { padding: 0 20px 20px 58px; }
.hub-qa-answer .hub-prose { font-size: .93rem; }

/* ================================================================
   TEMPLATE — Visual Explainer
   ================================================================ */
.hub-article--visual { background: var(--hub-light); }
.hub-visual-layout { max-width: 920px; margin: -20px auto 0; padding: 0 24px 60px; }
.hub-visual-body {
    background: #fff;
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
    padding: 32px;
    margin-bottom: 24px;
    font-size: 1rem;
}

/* ================================================================
   ARCHIVE V2 — Two-column Knowledge Hub (/learn/)
   ================================================================ */

.hub-archive-v2 {
    background: var(--hub-light);
    min-height: 80vh;
}

/* ── Hero V2 ────────────────────────────────────────────────── */
.hub-hero-v2 {
    background: linear-gradient(135deg, #001F3F 0%, #002D5B 55%, #1A5200 100%);
    padding: 40px 24px 48px;
    position: relative;
    overflow: hidden;
}
.hub-hero-v2::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 75% 40%, rgba(255,193,7,.09) 0%, transparent 55%);
    pointer-events: none;
}
.hub-hero-v2::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 36px;
    background: var(--hub-light);
    clip-path: ellipse(55% 100% at 50% 100%);
}
.hub-hero-v2__inner {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}
.hub-hero-v2__head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}
.hub-hero-v2__icon-wrap {
    width: 56px; height: 56px;
    background: rgba(255,255,255,.12);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.hub-hero-v2__h1 {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.15;
}
.hub-hero-v2__meta {
    font-size: .82rem;
    color: rgba(255,255,255,.65);
    margin: 0;
}
.hub-hero-v2__tagline {
    font-size: .95rem;
    color: rgba(255,255,255,.8);
    margin: 0 0 20px;
    max-width: 700px;
}
.hub-hero-v2__search-wrap {
    max-width: 580px;
    margin-bottom: 20px;
}
.hub-hero-v2__search {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    padding: 6px 6px 6px 18px;
    gap: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,.22);
}
.hub-hero-v2__search i { color: #8899aa; font-size: .9rem; flex-shrink: 0; }
.hub-hero-v2__search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: .92rem;
    background: transparent;
    color: #222;
    min-width: 0;
}
.hub-hero-v2__search button {
    background: var(--hub-navy);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 9px 20px;
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}
.hub-hero-v2__search button:hover { background: #003a75; }
.hub-hero-v2__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.hub-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(255,255,255,.12);
    border-radius: 50px;
    color: rgba(255,255,255,.9);
    font-size: .8rem;
    font-weight: 600;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.18);
}
.hub-hero-pill i { font-size: .75rem; }

/* ── Two-column Layout ──────────────────────────────────────── */
.hub-v2-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    max-width: 1200px;
    margin: 24px auto 0;
    padding: 0 24px 60px;
    align-items: start;
}
.hub-v2-sidebar {
    position: sticky;
    top: 24px;
}
.hub-v2-main { min-width: 0; }

/* ── Sidebar card shell ─────────────────────────────────────── */
.hub-sb {
    background: #fff;
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
    padding: 20px;
    margin-bottom: 16px;
    overflow: hidden;
}
.hub-sb__title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #8899aa;
    margin: 0 0 12px;
}
.hub-sb__about {
    font-size: .86rem;
    color: #444;
    line-height: 1.65;
    margin: 0;
}

/* Sidebar stats grid */
.hub-sb-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 4px 0 0;
}
.hub-sb-stat {
    text-align: center;
    background: var(--hub-light);
    border-radius: 10px;
    padding: 12px 6px;
}
.hub-sb-stat__num {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--hub-navy);
    line-height: 1;
    margin-bottom: 3px;
}
.hub-sb-stat__lbl {
    font-size: .72rem;
    color: #667;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* Sidebar nav list (programme / semester) */
.hub-sb-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hub-sb-nav__item { margin: 0; }
.hub-sb-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #334;
    font-size: .87rem;
    font-weight: 500;
    transition: background .15s, color .15s;
    gap: 8px;
}
.hub-sb-nav__link:hover { background: var(--hub-light); color: var(--hub-navy); }
.hub-sb-nav__link.active { background: var(--hub-navy); color: #fff; font-weight: 600; }
.hub-sb-nav__link.active .hub-sb-nav__count { background: rgba(255,255,255,.25); color: #fff; }
.hub-sb-nav__count {
    background: #e4e8f0;
    color: #667;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: .72rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Content-type filter links */
.hub-sb-types {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hub-type-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #334;
    font-size: .87rem;
    font-weight: 500;
    transition: background .15s;
}
.hub-type-link:hover { background: var(--hub-light); }
.hub-type-link.active { background: var(--hub-light); font-weight: 700; }
.hub-type-link__dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Tag cloud */
.hub-sb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.hub-sb-tag {
    display: inline-block;
    padding: 4px 11px;
    background: var(--hub-light);
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 600;
    color: #445;
    text-decoration: none;
    transition: background .15s, color .15s;
    border: 1px solid transparent;
}
.hub-sb-tag:hover { background: var(--hub-navy); color: #fff; border-color: var(--hub-navy); }

/* Muted sidebar text */
.hub-sb--muted {
    font-size: .79rem;
    color: #8899aa;
    line-height: 1.6;
    margin: 0;
}

/* ── Active-filter chip bar ─────────────────────────────────── */
.hub-chips-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}
.hub-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--hub-navy);
    color: #fff;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
}
.hub-chip__x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    font-size: .65rem;
    line-height: 1;
    text-decoration: none;
    color: #fff;
    transition: background .15s;
}
.hub-chip__x:hover { background: rgba(255,255,255,.4); }
.hub-chips-bar__clear {
    font-size: .8rem;
    color: #dc2626;
    font-weight: 600;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 50px;
    border: 1px solid #fca5a5;
    background: #fff5f5;
    transition: background .15s;
    margin-left: auto;
}
.hub-chips-bar__clear:hover { background: #fee2e2; }

/* ── Results meta row ───────────────────────────────────────── */
.hub-results-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    font-size: .85rem;
    color: #667;
}
.hub-results-meta strong { color: #222; }

/* ── Subject section (grouped view) ────────────────────────── */
.hub-subject-section { margin-bottom: 44px; }
.hub-subject-section__hdr {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 2px solid #e4e8f0;
}
.hub-subject-section__left { flex: 1; min-width: 0; }
.hub-subject-section__right { flex-shrink: 0; }
.hub-subject-section__name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--hub-navy);
    margin: 0 0 3px;
    line-height: 1.3;
}
.hub-subject-section__desc {
    font-size: .83rem;
    color: #667;
    margin: 0;
}
.hub-subject-section__all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--hub-navy);
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid #c8d8ed;
    background: #f0f6ff;
    transition: background .15s;
    white-space: nowrap;
}
.hub-subject-section__all:hover { background: #ddeeff; }

.hub-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--hub-navy);
    color: #fff;
    border-radius: 20px;
    padding: 2px 9px;
    font-size: .72rem;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}

/* ── Article card grid (v2) ─────────────────────────────────── */
.hub-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

/* ── Article card v2 ────────────────────────────────────────── */
.hub-card-v2 {
    background: #fff;
    border-radius: var(--hub-radius);
    box-shadow: 0 2px 12px rgba(0,45,91,.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0,45,91,.06);
}
.hub-card-v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,45,91,.14);
    border-color: transparent;
    color: inherit;
    text-decoration: none;
}
.hub-card-v2__inner { display: flex; flex-direction: column; flex: 1; }

.hub-card-v2__top {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: relative;
    flex-shrink: 0;
}
.hub-card-v2__icon { font-size: 2rem; line-height: 1; }
.hub-card-v2__type {
    background: rgba(255,255,255,.22);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .06em;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.hub-card-v2__body {
    padding: 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hub-card-v2__title {
    font-size: .97rem;
    font-weight: 700;
    color: #111;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hub-card-v2__excerpt {
    font-size: .82rem;
    color: #555;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.hub-card-v2__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
}
.hub-card-v2__tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 600;
    background: var(--hub-light);
    color: #556;
}

.hub-card-v2__footer {
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .75rem;
    color: #889;
    flex-shrink: 0;
}
.hub-card-v2__diff { font-weight: 700; }
.hub-card-v2__meta { display: flex; align-items: center; gap: 6px; }
.hub-card-v2__read {
    margin-left: auto;
    color: #fff;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: .72rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .15s;
}
.hub-card-v2__read:hover { opacity: .85; color: #fff; }

/* ── Empty state v2 ─────────────────────────────────────────── */
.hub-empty-v2 {
    text-align: center;
    padding: 60px 24px;
    background: #fff;
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
}
.hub-empty-v2 .hub-empty__icon { font-size: 3.5rem; margin-bottom: 14px; }
.hub-empty-v2 h2 { font-size: 1.2rem; color: var(--hub-navy); margin-bottom: 8px; }
.hub-empty-v2 p  { font-size: .9rem; color: #667; margin: 0 0 16px; }
.hub-empty-v2 a  {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: var(--hub-navy);
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
    transition: background .2s;
}
.hub-empty-v2 a:hover { background: #003a75; color: #fff; }

/* ── Responsive for V2 layout ───────────────────────────────── */
@media (max-width: 1024px) {
    .hub-v2-layout { grid-template-columns: 260px 1fr; gap: 20px; }
}
@media (max-width: 820px) {
    .hub-v2-layout {
        grid-template-columns: 1fr;
        padding: 0 16px 40px;
    }
    .hub-v2-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .hub-v2-sidebar .hub-sb { margin-bottom: 0; }
    .hub-hero-v2 { padding: 28px 16px 44px; }
    .hub-hero-v2__head { gap: 12px; }
    .hub-hero-v2__icon-wrap { width: 44px; height: 44px; font-size: 1.4rem; border-radius: 12px; }
    .hub-card-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
}
@media (max-width: 560px) {
    .hub-v2-sidebar { grid-template-columns: 1fr; }
    .hub-card-grid { grid-template-columns: 1fr; }
    .hub-subject-section__hdr { flex-direction: column; gap: 10px; }
    .hub-subject-section__all { align-self: flex-start; }
    .hub-hero-v2__pills { gap: 6px; }
    .hub-hero-pill { font-size: .75rem; padding: 4px 10px; }
    .hub-chips-bar__clear { margin-left: 0; width: 100%; justify-content: center; }
}

/* ================================================================
   PRINT STYLES (Question Bank)
   ================================================================ */
@media print {
    .hub-archive__hero, .hub-hero, .hub-engage-row,
    .hub-sidebar, .hub-qbank-toolbar, header.site-header,
    footer.site-footer, .hub-breadcrumb, nav { display: none !important; }

    .hub-qa-answer { display: block !important; }
    .hub-qa-question { font-weight: 700; padding: 8px 0; }
    .hub-qa-question[aria-expanded] { background: transparent; }
    .hub-qa-item { border: none; box-shadow: none; border-bottom: 1px solid #ddd; border-radius: 0; }
    .hub-qa-chevron, .hub-qa-num { display: none; }
    .hub-qa-answer { padding: 4px 0 12px; }
}

/* ================================================================
   VERIFIED BADGE — global front-end display
   ================================================================ */

/* Circular verified badge inline with author names */
.dspsr-vbadge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff !important;
    font-weight: 900;
    line-height: 1;
    vertical-align: middle;
    margin-left: 4px;
    flex-shrink: 0;
    cursor: help;
    text-decoration: none !important;
}
.dspsr-vbadge--social { background: #2563eb; }
.dspsr-vbadge--admin  { background: #d97706; }
.dspsr-vbadge--both   {
    background: linear-gradient(135deg, #002D5B, #1A5200);
    box-shadow: 0 0 0 2px rgba(0,45,91,.25);
}

/* Social icons on user-facing profile cards (future use) */
.dspsr-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.dspsr-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #fff !important;
    font-size: .95rem;
    text-decoration: none !important;
    transition: transform .18s, opacity .18s;
    opacity: .92;
}
.dspsr-social-link:hover { transform: translateY(-2px); opacity: 1; }
.dspsr-social-link--instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%,#fd5949 45%,#d6249f 60%,#285aeb 90%); }
.dspsr-social-link--linkedin  { background: #0A66C2; }
.dspsr-social-link--youtube   { background: #FF0000; }
.dspsr-social-link--x         { background: #000; }
.dspsr-social-link--github    { background: #24292e; }
.dspsr-social-link--snapchat  { background: #FFBD00; color: #000 !important; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
    .hub-layout {
        grid-template-columns: 1fr;
    }
    .hub-sidebar { position: static; }
    .hub-unit-nav { flex-direction: row; flex-wrap: wrap; }
    .hub-unit-btn { padding: 6px 12px; }
}

@media (max-width: 640px) {
    .hub-archive__hero { padding: 40px 16px 60px; }
    .hub-archive__body { padding: 0 16px 40px; }
    .hub-grid { grid-template-columns: 1fr; }
    .hub-hero { padding: 36px 16px 50px; }
    .hub-content, .hub-concept-layout, .hub-qbank-layout,
    .hub-steps-layout, .hub-comparison-layout, .hub-visual-layout { padding: 0 16px 40px; }
    .hub-content { padding: 20px; }
    .hub-step { padding: 20px 16px 20px 64px; }
    .hub-step__number { left: 14px; top: 18px; width: 36px; height: 36px; font-size: .88rem; }
    .hub-subtabs { gap: 6px; }
    .hub-subtab { padding: 6px 12px; font-size: .8rem; }
    .hub-flashcard { height: 180px; }
}
