/* ═══════════════════════════════════════════
   QUANTONESAI — Design System
   Default: Light mode | html.dark: Dark mode
   ═══════════════════════════════════════════ */

/* ── DESIGN TOKENS (Light default) ── */
:root {
    color-scheme: light;
    --brand: #0071E4;
    --brand-hover: #005BBF;
    --brand-light: rgba(0,113,228,0.08);
    --brand-glow: rgba(0,113,228,0.15);

    --bg-body: #F3F4F6;
    --bg-surface: #FFFFFF;
    --bg-surface-2: #F9FAFB;
    --bg-hover: #E5E7EB;
    --bg-input: #F3F4F6;

    --border: rgba(0,0,0,0.08);
    --border-hover: rgba(0,0,0,0.15);

    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-tertiary: #9CA3AF;

    --correct: #10B981;
    --correct-bg: rgba(16,185,129,0.1);
    --wrong: #EF4444;
    --wrong-bg: rgba(239,68,68,0.1);
    --personality-accent: #8B5CF6;
    --personality-bg: rgba(139,92,246,0.1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 100px;

    --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-elevated: 0 8px 32px rgba(0,0,0,0.1);

    --sidebar-w: 240px;
    --sidebar-collapsed: 64px;
    --header-h: 56px;

    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── DARK MODE ── */
html.dark {
    color-scheme: dark;
    --bg-body: #0B1120;
    --bg-surface: #141D2F;
    --bg-surface-2: #1A2540;
    --bg-hover: #1E2D4A;
    --bg-input: #0F1829;

    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);

    --text-primary: #F1F5F9;
    --text-secondary: #8B9CC0;
    --text-tertiary: #56657E;

    --correct-bg: rgba(16,185,129,0.12);
    --wrong-bg: rgba(239,68,68,0.12);
    --personality-bg: rgba(139,92,246,0.12);

    --brand-light: rgba(0,113,228,0.12);
    --brand-glow: rgba(0,113,228,0.25);

    --shadow-card: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-elevated: 0 8px 32px rgba(0,0,0,0.4);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background-color: var(--bg-body); transition: background-color 0.3s; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body); color: var(--text-primary);
    line-height: 1.5; -webkit-font-smoothing: antialiased;
    display: flex; height: 100vh; overflow: hidden;
    transition: background 0.3s, color 0.3s;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

/* ── SIDEBAR ── */
.sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    transition: width 0.25s var(--ease);
    z-index: 200; overflow: hidden;
}
.sidebar-head {
    height: 60px; padding: 0 16px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-logo { height: 22px; transition: opacity 0.2s; }
.sidebar-toggle {
    color: var(--text-tertiary); padding: 6px; border-radius: 6px;
    display: flex; align-items: center; transition: all 0.2s;
}
.sidebar-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-toggle svg { width: 18px; height: 18px; transition: transform 0.25s; }
.sidebar-close {
    display: none; color: var(--text-tertiary); padding: 6px; border-radius: 6px;
    align-items: center; justify-content: center; transition: all 0.2s;
}
.sidebar-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-close svg { width: 20px; height: 20px; }

.sidebar-nav {
    flex: 1; overflow-y: auto; padding: 12px 8px;
    display: flex; flex-direction: column; gap: 2px;
}
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 14px; font-weight: 500;
    transition: all 0.15s; white-space: nowrap; cursor: pointer;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--brand-light); color: var(--brand); }
.nav-icon { width: 20px; text-align: center; font-size: 16px; flex-shrink: 0; }
.nav-text { transition: opacity 0.2s; }

/* Collapsed */
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .nav-text,
.sidebar.collapsed .sidebar-logo { opacity: 0; width: 0; overflow: hidden; }
.sidebar.collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .sidebar-head { justify-content: center; }

/* Sidebar footer (theme toggle) */
.sidebar-foot {
    padding: 8px; border-top: 1px solid var(--border); flex-shrink: 0;
}
.theme-toggle {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 14px; font-weight: 500;
    transition: all 0.15s; white-space: nowrap; cursor: pointer; width: 100%;
}
.theme-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.theme-toggle .nav-icon { width: 20px; text-align: center; flex-shrink: 0; }
.theme-toggle .nav-text { transition: opacity 0.2s; }
.sidebar.collapsed .theme-toggle .nav-text { opacity: 0; width: 0; overflow: hidden; }
.sidebar.collapsed .theme-toggle { justify-content: center; padding: 10px 0; }

/* Theme icons: moon shows in light (default), sun shows in dark */
.theme-icon-sun, .theme-icon-moon { display: none !important; }
html.dark .theme-icon-sun { display: inline-flex !important; }
html:not(.dark) .theme-icon-moon { display: inline-flex !important; }

/* ── MAIN AREA ── */
.main-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.mobile-header {
    display: none; height: var(--header-h);
    background: var(--bg-surface); border-bottom: 1px solid var(--border);
    padding: 0 16px; align-items: center; justify-content: space-between;
    flex-shrink: 0;
}
.hamburger { color: var(--text-primary); padding: 6px; display: flex; }
.hamburger svg { width: 22px; height: 22px; }
.mobile-logo { height: 20px; }
.mobile-theme-toggle {
    color: var(--text-primary); padding: 6px; display: flex;
    align-items: center; justify-content: center; cursor: pointer;
}
.mobile-theme-toggle svg { width: 20px; height: 20px; }

.main-content {
    flex: 1; overflow-y: auto; padding-bottom: 20px;
    scroll-behavior: smooth;
}

.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); z-index: 199;
    opacity: 0; transition: opacity 0.25s;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

/* ── CONTAINERS ── */
.container { max-width: 900px; margin: 0 auto; padding: 24px 20px; }
.container-narrow { max-width: 620px; margin: 0 auto; padding: 24px 20px; }

/* ── HOME HERO ── */
.home-hero {
    background: linear-gradient(135deg, #EEF2FF 0%, #DBEAFE 50%, #EEF2FF 100%);
    border-bottom: 1px solid var(--border);
    padding: 40px 20px 44px; text-align: center;
    position: relative; overflow: hidden;
}
.home-hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(0,113,228,0.08) 0%, transparent 70%);
}
html.dark .home-hero {
    background: linear-gradient(135deg, #0B1120 0%, #0D2847 50%, #0B1120 100%);
}
html.dark .home-hero::before {
    background: radial-gradient(ellipse at 50% 0%, rgba(0,113,228,0.25) 0%, transparent 70%);
}
.home-hero-inner { position: relative; max-width: 560px; margin: 0 auto; }
.home-hero h1 {
    font-size: clamp(1.6em, 4vw, 2.4em); font-weight: 900;
    line-height: 1.2; margin-bottom: 10px; letter-spacing: -0.5px;
}
.home-hero h1 em {
    font-style: normal;
    background: linear-gradient(90deg, var(--brand), #60A5FA);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.home-hero p { color: var(--text-secondary); font-size: 1em; margin-bottom: 20px; }
.hero-stats {
    display: flex; gap: 28px; justify-content: center;
    font-size: 12px; color: var(--text-tertiary); font-weight: 600;
}
.hero-stats strong { color: var(--text-primary); font-size: 17px; display: block; }

/* ── QUIZ CARD GRID ── */
.section-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.section-head h2 { font-size: 1.15em; font-weight: 800; letter-spacing: -0.2px; }
.section-head a { font-size: 12px; font-weight: 600; color: var(--brand); }

.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.qcard {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden; display: flex; flex-direction: column;
    transition: all 0.25s var(--ease); cursor: pointer;
}
.qcard:hover {
    border-color: var(--brand);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,113,228,0.12);
}
.qcard-cover {
    position: relative; height: 160px; overflow: hidden;
}
.qcard-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.35s var(--ease);
}
.qcard:hover .qcard-img { transform: scale(1.04); }
.img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px; color: rgba(255,255,255,0.7);
    letter-spacing: 1px;
    background: linear-gradient(135deg, #1e1b4b, #4c1d95);
}
.qcard-badges {
    position: absolute; top: 10px; left: 10px;
    display: flex; gap: 5px;
}
.badge {
    padding: 3px 9px; border-radius: var(--radius-full);
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-type { background: var(--brand); color: white; }
.badge-cat { background: rgba(255,255,255,0.12); color: white; backdrop-filter: blur(6px); }

/* Card share button */
.qcard-share {
    position: absolute; top: 10px; right: 10px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,0.45); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    color: white; cursor: pointer;
    opacity: 0; transition: opacity 0.2s; z-index: 2;
}
.qcard:hover .qcard-share { opacity: 1; }
.qcard-share:hover { background: rgba(0,0,0,0.65); }

.qcard-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.qcard-body h3 {
    font-size: 0.95em; font-weight: 700; line-height: 1.35; margin-bottom: 5px;
}
.qcard-body p {
    font-size: 0.8em; color: var(--text-secondary); line-height: 1.5;
    flex: 1; margin-bottom: 10px;
}
.qcard-foot {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 10px; border-top: 1px solid var(--border);
    font-size: 11px; color: var(--text-tertiary); font-weight: 500;
}
.foot-item {
    display: inline-flex; align-items: center; gap: 4px;
}
.foot-item svg { opacity: 0.6; }

/* Featured (large card) */
.qcard.featured { grid-column: 1 / -1; }
@media (min-width: 640px) {
    .qcard.featured { flex-direction: row; }
    .qcard.featured .qcard-cover { width: 45%; height: auto; min-height: 220px; }
    .qcard.featured .qcard-body { padding: 20px 24px; justify-content: center; }
    .qcard.featured h3 { font-size: 1.25em; }
}

/* ── QUIZ DETAIL ── */
.breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--text-tertiary); font-weight: 500;
    margin-bottom: 16px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--brand); }
.bc-sep { opacity: 0.3; }

.detail-cover {
    border-radius: var(--radius-xl); overflow: hidden;
    margin-bottom: 20px; box-shadow: var(--shadow-elevated);
}
.detail-cover img {
    width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block;
}

.detail-box {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 28px 24px;
    text-align: center;
}
.detail-meta {
    display: flex; gap: 10px; justify-content: center;
    margin-bottom: 14px; flex-wrap: wrap;
}
.meta-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: var(--radius-full);
    background: var(--bg-body); font-size: 12px; font-weight: 600;
    color: var(--text-secondary); border: 1px solid var(--border);
}
.detail-box h1 {
    font-size: clamp(1.3em, 3.5vw, 1.7em); font-weight: 800;
    line-height: 1.25; margin-bottom: 8px; letter-spacing: -0.3px;
}
.detail-box > p {
    color: var(--text-secondary); font-size: 0.92em;
    margin-bottom: 24px; max-width: 440px; margin-left: auto; margin-right: auto;
}
.btn-start {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 36px; border-radius: var(--radius-full);
    background: var(--brand); color: white;
    font-size: 0.95em; font-weight: 700;
    box-shadow: 0 4px 16px rgba(0,113,228,0.35);
    transition: all 0.2s var(--ease); letter-spacing: 0.2px;
}
.btn-start:hover { background: var(--brand-hover); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,113,228,0.45); }

/* ── QUESTION ── */
.play-box {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 28px 24px;
}
.play-top {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.play-counter { font-size: 13px; font-weight: 700; color: var(--brand); }

.progress-track {
    height: 5px; background: var(--bg-body);
    border-radius: var(--radius-full); margin-bottom: 28px; overflow: hidden;
}
.progress-fill {
    height: 100%; border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--brand), #60A5FA);
    transition: width 0.4s var(--ease);
}
.q-text {
    font-size: 1.15em; font-weight: 700; line-height: 1.4;
    text-align: center; margin-bottom: 24px; letter-spacing: -0.2px;
}
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt-btn {
    width: 100%; padding: 13px 16px;
    background: var(--bg-body); border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.92em; font-weight: 600; color: var(--text-primary);
    text-align: left; transition: all 0.15s var(--ease);
    display: flex; align-items: center; gap: 12px;
}
.opt-btn:hover { border-color: var(--brand); background: var(--bg-hover); }
.opt-btn:active { transform: scale(0.985); }
.opt-letter {
    width: 28px; height: 28px; border-radius: 7px;
    background: var(--bg-surface); border: 1.5px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: var(--brand); flex-shrink: 0;
}
.opt-btn:hover .opt-letter { background: var(--brand); color: white; border-color: var(--brand); }

/* ── FEEDBACK ── */
.fb-box {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 28px 24px;
}
.fb-result {
    text-align: center; padding: 20px;
    border-radius: var(--radius-lg); margin-bottom: 18px;
}
.fb-result.correct { background: var(--correct-bg); border: 1px solid rgba(16,185,129,0.2); }
.fb-result.wrong { background: var(--wrong-bg); border: 1px solid rgba(239,68,68,0.2); }
.fb-result.pers { background: var(--personality-bg); border: 1px solid rgba(139,92,246,0.2); }

.fb-icon {
    width: 48px; height: 48px; border-radius: 50%;
    margin: 0 auto 10px; display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: white; animation: scaleIn 0.35s var(--ease-spring) both;
}
.correct .fb-icon { background: var(--correct); }
.wrong .fb-icon { background: var(--wrong); }
.pers .fb-icon { background: var(--personality-accent); }

.fb-result h3 { font-size: 1.05em; font-weight: 700; margin-bottom: 3px; }
.correct h3 { color: var(--correct); }
.wrong h3 { color: var(--wrong); }
.pers h3 { color: var(--personality-accent); }
.fb-result .fb-answer { font-size: 0.85em; color: var(--text-secondary); }

.explanation {
    background: var(--bg-body); border-radius: var(--radius-md);
    padding: 14px 16px; margin-bottom: 18px;
    border-left: 3px solid var(--brand);
}
.explanation .exp-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--brand); margin-bottom: 5px;
}
.explanation p { font-size: 0.87em; color: var(--text-secondary); line-height: 1.6; }

.btn-next {
    width: 100%; padding: 13px;
    border-radius: var(--radius-full);
    background: var(--brand); color: white;
    font-size: 0.92em; font-weight: 700;
    transition: all 0.2s;
}
.btn-next:hover { background: var(--brand-hover); }

/* ── RESULT ── */
.result-card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); overflow: hidden;
}
.result-hero {
    background: linear-gradient(135deg, #003D7A, var(--brand), #2196F3);
    padding: 36px 24px 44px; text-align: center; color: white;
    position: relative;
}
.result-hero::after {
    content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 24px;
    background: var(--bg-surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.result-hero.pers-hero {
    background: linear-gradient(135deg, #4C1D95, #7C3AED, #A78BFA);
}
.r-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.5px; opacity: 0.7; margin-bottom: 8px;
}
.r-score {
    font-size: 3.2em; font-weight: 900; line-height: 1;
    margin-bottom: 4px; animation: scaleIn 0.4s var(--ease-spring) both;
}
.r-title {
    font-size: 1.4em; font-weight: 800; margin-bottom: 6px;
    animation: scaleIn 0.4s var(--ease-spring) 0.05s both;
}
.r-desc { font-size: 0.9em; opacity: 0.8; max-width: 360px; margin: 0 auto; }
.r-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.25);
    margin: 0 auto 12px; display: flex; align-items: center;
    justify-content: center; font-size: 36px;
    background: rgba(255,255,255,0.1);
}

.result-body { padding: 20px 24px; position: relative; z-index: 1; }

.share-row { text-align: center; margin-bottom: 20px; }
.share-row p {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-tertiary); margin-bottom: 10px;
}
.share-btns { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; }
.s-btn {
    padding: 9px 16px; border-radius: var(--radius-full);
    font-size: 12px; font-weight: 600; color: white;
    display: inline-flex; align-items: center; gap: 5px;
    transition: all 0.15s;
}
.s-btn:hover { transform: translateY(-1px); filter: brightness(1.15); }
.s-btn.wa { background: #25D366; }
.s-btn.fb { background: #1877F2; }
.s-btn.tw { background: #1A1A2E; border: 1px solid rgba(255,255,255,0.15); }
.s-btn.cp { background: var(--bg-hover); color: var(--text-secondary); border: 1px solid var(--border); }

.r-actions { display: flex; gap: 10px; margin-bottom: 24px; }
.btn-replay, .btn-home-r {
    flex: 1; padding: 11px; border-radius: var(--radius-full);
    font-size: 0.85em; font-weight: 700; text-align: center;
    transition: all 0.15s;
}
.btn-replay { background: var(--bg-body); color: var(--text-primary); border: 1px solid var(--border); }
.btn-replay:hover { border-color: var(--brand); color: var(--brand); }
.btn-home-r { background: var(--brand); color: white; }

/* Related */
.related h3 { font-size: 0.95em; font-weight: 700; margin-bottom: 12px; }
.related-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.related-scroll::-webkit-scrollbar { display: none; }
.rel-card {
    min-width: 180px; flex-shrink: 0;
    border-radius: var(--radius-md); overflow: hidden;
    background: var(--bg-body); border: 1px solid var(--border);
    transition: all 0.15s;
}
.rel-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.rel-card .img-placeholder { height: 90px; font-size: 11px; }
.rel-card-body { padding: 10px 12px; }
.rel-card h4 { font-size: 0.8em; font-weight: 700; line-height: 1.35; margin-bottom: 3px; }
.rel-card span { font-size: 10px; color: var(--text-tertiary); font-weight: 500; }

/* ── HUB ── */
.hub-hero {
    background: linear-gradient(135deg, #EEF2FF, #DBEAFE, #EEF2FF);
    padding: 36px 20px 44px; text-align: center; position: relative;
}
.hub-hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(0,113,228,0.08) 0%, transparent 70%);
}
html.dark .hub-hero {
    background: linear-gradient(135deg, #0B1120, #0D2847, #0B1120);
}
html.dark .hub-hero::before {
    background: radial-gradient(ellipse at 50% 0%, rgba(0,113,228,0.25) 0%, transparent 70%);
}
.hub-hero-inner { position: relative; }
.hub-hero h1 { font-size: 1.8em; font-weight: 900; margin-bottom: 6px; }
.hub-hero p { color: var(--text-secondary); font-size: 0.95em; }

.hub-subcats {
    display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
    margin-bottom: 24px;
}
.hub-pill {
    padding: 8px 18px; border-radius: var(--radius-full);
    background: var(--bg-surface); border: 1px solid var(--border);
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    transition: all 0.15s; cursor: pointer;
}
.hub-pill:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

/* ── FOOTER ── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 20px; text-align: center;
    font-size: 12px; color: var(--text-tertiary);
}
.footer-links { display: flex; gap: 16px; justify-content: center; margin-top: 8px; }
.footer-links a { color: var(--text-tertiary); }
.footer-links a:hover { color: var(--text-primary); }

/* ── ARTICLE CONTENT (SEO) ── */
.article-seo {
    margin-top: 36px; border-top: 1px solid var(--border);
    padding-top: 28px; text-align: left;
}
.article-seo h2 {
    font-size: 1.25em; font-weight: 800; margin-bottom: 16px;
    letter-spacing: -0.2px;
}
.article-seo-body {
    color: var(--text-secondary); font-size: 0.9em; line-height: 1.75;
}
.article-seo-body h2,
.article-seo-body h3 {
    color: var(--text-primary); margin: 20px 0 10px;
}
.article-seo-body p { margin-bottom: 14px; }
.article-seo-body ul, .article-seo-body ol {
    margin-bottom: 14px; padding-left: 20px;
}

/* ── LOGO LIGHT / DARK SWAP ── */
.logo-dark { display: none !important; }
html.dark .logo-light { display: none !important; }
html.dark .logo-dark { display: block !important; }

/* ── MOBILE ── */
@media (max-width: 768px) {
    .mobile-header { display: flex; }
    .sidebar-toggle { display: none; }
    .sidebar-close { display: flex; }
    .sidebar {
        position: fixed; top: 0; left: 0; height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 260px; z-index: 300;
    }
    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0,0,0,0.5);
    }
    .sidebar-overlay.show { display: block; opacity: 1; }
    .container, .container-narrow { padding: 16px; }
    .home-hero { padding: 28px 16px 32px; }
    .qcard-share { opacity: 1; }
}
