:root {
    --bg: #F8F9FC;
    --bg-card: #FFFFFF;
    --text: #0F172A;
    --text-muted: #64748B;
    --accent: #6366F1;
    --accent-hover: #4F46E5;
    --accent-light: #EEF2FF;
    --accent-glow: rgba(99,102,241,0.25);
    --border: #E2E8F0;
    --success: #059669;
    --danger: #DC2626;
    --warning: #D97706;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.1);
    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Sora', 'DM Sans', sans-serif;
    --transition: all 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }

/* ===== HEADER ===== */
.site-header {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.site-logo {
    display: flex;
    align-items: center;
}
.site-logo img {
    display: block;
    height: 28px;
    width: auto;
}
.site-nav-desktop {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.site-nav-desktop a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    line-height: 1;
}
.site-nav-desktop a:hover { color: var(--accent); background: var(--accent-light); }

/* Mobile slide-out drawer */
.site-nav-mobile {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 80vw;
    background: var(--bg-card);
    flex-direction: column;
    padding: 1.25rem 1.5rem;
    box-shadow: -8px 0 30px rgba(0,0,0,0.15);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.site-nav-mobile.open { transform: translateX(0); }
.site-nav-mobile a {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 600;
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    text-decoration: none;
    transition: var(--transition);
}
.site-nav-mobile a:last-child { border-bottom: none; }
.site-nav-mobile a:hover { background: var(--accent-light); color: var(--accent); }

.nav-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.5rem;
    align-self: flex-end;
    margin-bottom: 0.5rem;
}
.nav-close:hover { color: var(--text); }
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.nav-overlay.open { display: block; opacity: 1; }
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 0.5rem;
}

/* ===== MAIN ===== */
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    min-height: calc(100vh - 68px - 200px);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--text);
    color: rgba(255,255,255,0.6);
    padding: 0;
    margin-top: 5rem;
    font-size: 0.85rem;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.5rem 2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    gap: 3rem;
}
.footer-brand {
    max-width: 320px;
}
.footer-brand .site-logo {
    display: inline-block;
    margin-bottom: 0.75rem;
}
.footer-logo-img {
    height: 24px !important;
    filter: brightness(0) invert(1);
}
.footer-brand p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.45);
}
.footer-links {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}
.footer-col {
    min-width: 0;
    max-width: 200px;
}
.footer-col h4 {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
    margin-bottom: 1rem;
}
.footer-col a {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
    padding: 0.25rem 0;
    transition: var(--transition);
}
.footer-col a:hover { color: #fff; }
.footer-company-name {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 0.88rem;
    padding: 0.25rem 0;
    font-weight: 500;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
}

/* ===== HOMEPAGE HERO ===== */
.hp-hero {
    position: relative;
    padding: 5rem 0 4rem;
    text-align: center;
    overflow: hidden;
}
.hp-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99,102,241,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 50%, rgba(168,85,247,0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 20% 60%, rgba(59,130,246,0.06) 0%, transparent 50%);
    pointer-events: none;
}
.hp-hero-content {
    position: relative;
    z-index: 1;
}
.hp-hero-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.4rem 1.1rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}
.hp-hero h1 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--text) 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hp-hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 2rem;
}
.hp-hero-actions {
    margin-bottom: 3rem;
}
.hp-hero-stats {
    display: inline-flex;
    gap: 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 2.5rem;
    box-shadow: var(--shadow-md);
}
.hp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}
.hp-stat-val {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.hp-stat-lbl {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ===== SECTION HEADS ===== */
.hp-section-head {
    text-align: center;
    margin-bottom: 2.5rem;
}
.hp-section-head h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.4rem;
}
.hp-section-head p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ===== CATEGORIES GRID ===== */
.hp-categories {
    padding: 3rem 0;
}
.hp-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}
.hp-cat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-decoration: none;
    color: var(--text);
}
.hp-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
    color: var(--text);
}
.hp-cat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.hp-cat-icon svg { width: 26px; height: 26px; stroke: var(--accent); }
.hp-cat-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.hp-cat-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== HOW IT WORKS ===== */
.hp-how {
    padding: 3rem 0;
}
.hp-how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.hp-how-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 1.75rem;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}
.hp-how-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.hp-how-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--accent-light);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.hp-how-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-heading);
}
.hp-how-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
    margin: 0;
}

/* ===== TOPICS SECTION ===== */
.hp-topics {
    padding: 2.5rem 0 3rem;
}
.hp-topics-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    line-height: 1.85;
    color: var(--text-body);
    font-size: 1rem;
}
.hp-topics-body p {
    margin-bottom: 0.85rem;
}
.hp-topics-body a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.hp-topics-body a:hover {
    border-bottom-color: var(--accent);
}

/* ===== FEATURES STRIP ===== */
.hp-features {
    padding: 2.5rem 0 3.5rem;
    border-top: 1px solid var(--border);
}
.hp-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.hp-feat {
    text-align: center;
}
.hp-feat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-light);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
}
.hp-feat h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-heading);
}
.hp-feat p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
}

/* ===== QUIZ SECTION ===== */
.hp-quizzes {
    padding: 3rem 0 2rem;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}
.filter-btn {
    padding: 0.5rem 1.15rem;
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-card);
    color: var(--text-muted);
    font-family: var(--font);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ===== QUIZ CARDS ===== */
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.75rem;
}
.qc {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.qc:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.qc-img {
    position: relative;
    height: 190px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}
.qc-img-personality {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.qc-type-pill {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
}
.qc-body {
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.qc-breadcrumb {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.qc-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.qc-breadcrumb a:hover { color: var(--accent); }
.qc-breadcrumb span { margin: 0 0.25rem; opacity: 0.5; }
.qc-cat {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.qc-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 650;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}
.qc-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}
.qc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.qc-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}
.qc-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.qc-meta svg { opacity: 0.5; }
.qc-arrow {
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-light);
    transition: var(--transition);
}
.qc:hover .qc-arrow {
    background: var(--accent);
    color: #fff;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    border-color: var(--accent-hover);
    box-shadow: 0 4px 16px var(--accent-glow);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #B91C1C; border-color: #B91C1C; color: #fff; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
    color: var(--text);
}
.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font);
    background: var(--bg-card);
    color: var(--text);
    transition: var(--transition);
    outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }

/* ===== PAGE HEADERS ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-header h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.page-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ===== QUIZ DETAIL PAGE ===== */
.qd {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 2rem;
}
.qd-breadcrumb {
    margin-bottom: 0.75rem;
}
.qd-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}
.qd-back:hover { color: var(--accent); }

.qd-hero {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.75rem;
    background: linear-gradient(135deg, #1e1e3a 0%, #2a1a4e 100%);
}
.qd-hero-personality {
    background: linear-gradient(135deg, #2d1b3d 0%, #4a1942 100%);
}
.qd-hero-img {
    width: 100%;
    height: 280px;
    position: relative;
}
.qd-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.qd-hero-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(0deg, #1e1e3a 0%, transparent 100%);
}
.qd-hero-personality .qd-hero-img::after {
    background: linear-gradient(0deg, #2d1b3d 0%, transparent 100%);
}
.qd-hero-body {
    padding: 1.75rem 2.5rem 2.25rem;
}
.qd-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}
.qd-badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
}
.qd-badge-cat {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
.qd-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}
.qd-desc {
    color: rgba(255,255,255,0.7);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 650px;
}

.qd-stats {
    display: flex;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}
.qd-stat {
    flex: 1;
    background: var(--bg-card);
    padding: 1.25rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}
.qd-stat-icon {
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-light);
    margin-bottom: 0.25rem;
}
.qd-stat-val {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.qd-stat-lbl {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.qd-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
}
.qd-content h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 650;
    margin: 1.5rem 0 0.75rem;
    letter-spacing: -0.01em;
}
.qd-content h2:first-child { margin-top: 0; }
.qd-content p { margin-bottom: 1rem; }
.qd-content ul, .qd-content ol { margin: 0.5rem 0 1rem 1.5rem; }
.qd-content li { margin-bottom: 0.35rem; }

.qd-cta {
    text-align: center;
    padding: 2.5rem 2rem 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.qd-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font);
    border-radius: 60px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 4px 14px var(--accent-glow);
}
.qd-start-btn:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}
.qd-start-btn svg { transition: transform 0.2s ease; }
.qd-start-btn:hover svg { transform: translateX(3px); }
.qd-cta-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.qd-cta-top {
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
}

.qd-section { margin-bottom: 2rem; }
.qd-section h2 { margin-top: 0; }
.qd-qtypes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}
.qd-qtype-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.4;
}
.qd-qtype-count {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.qd-qtype-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ===== QUIZ TAKING ===== */
.qc-breadcrumb { margin-bottom: 0.35rem; }
.take-breadcrumb {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.take-breadcrumb::-webkit-scrollbar { display: none; }
.take-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.take-breadcrumb a:hover { color: var(--accent); }
.take-breadcrumb span { margin: 0 0.3rem; opacity: 0.5; }
.quiz-container {
    max-width: 720px;
    margin: 0 auto;
    padding-top: 2rem;
}
.quiz-progress {
    background: var(--border);
    border-radius: 20px;
    height: 6px;
    margin-bottom: 2rem;
    overflow: hidden;
}
.quiz-progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 20px;
    transition: width 0.4s ease;
}
.quiz-timer {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-variant-numeric: tabular-nums;
}
.quiz-timer.warning { color: var(--danger); }
.question-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}
.question-number {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}
.question-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.question-image {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.option-list { list-style: none; }
.option-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.15rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}
.option-item:hover { border-color: var(--accent); background: var(--accent-light); }
.option-item.selected { border-color: var(--accent); background: var(--accent-light); }
.option-item.correct { border-color: var(--success); background: #ECFDF5; }
.option-item.incorrect { border-color: var(--danger); background: #FEF2F2; }
.option-item input[type="radio"],
.option-item input[type="checkbox"] { accent-color: var(--accent); }

.matching-container { display: flex; flex-direction: column; gap: 0.75rem; }
.matching-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.matching-item {
    flex: 1;
    padding: 0.7rem 1rem;
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}
.matching-row select { flex: 1; }

.ordering-list { list-style: none; }
.ordering-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    cursor: grab;
    transition: var(--transition);
}
.ordering-item:active { cursor: grabbing; }
.ordering-item .drag-handle { color: var(--text-muted); font-size: 1.1rem; }
.ordering-item.sortable-ghost { opacity: 0.4; border-color: var(--accent); }

/* ===== RESULTS ===== */
.results-container {
    max-width: 720px;
    margin: 0 auto;
    padding-top: 2rem;
}
.results-header {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}
.results-score {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}
.results-score.score-numeric { font-size: 3.5rem; }
.results-score.score-short  { font-size: 2.25rem; }
.results-score.score-long   { font-size: 1.5rem; }
.results-score.passed { color: var(--success); }
.results-score.failed { color: var(--danger); }
.results-label {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    overflow-x: hidden;
}
.results-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}
.results-badge.passed { background: #ECFDF5; color: var(--success); }
.results-badge.failed { background: #FEF2F2; color: var(--danger); }

/* Breakdown bars */
.bd-row { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.5rem; }
.bd-label { width: 140px; font-size: 0.82rem; font-weight: 500; text-align: right; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-track { flex: 1; background: var(--bg); border-radius: 6px; height: 24px; overflow: hidden; min-width: 0; }
.bd-fill { height: 100%; border-radius: 6px; transition: width 0.6s ease; }
.bd-pct { width: 40px; font-size: 0.85rem; font-weight: 600; flex-shrink: 0; }

.question-review { margin-bottom: 1rem; }
.question-review .status-icon { font-size: 1.2rem; margin-right: 0.5rem; }

/* ===== SHARE BANNER ===== */
.share-banner {
    max-width: 720px;
    margin: 2rem auto 0;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
    border-radius: var(--radius);
    padding: 3px;
    animation: shareGlow 3s ease-in-out infinite alternate;
}
@keyframes shareGlow {
    0% { box-shadow: 0 4px 20px rgba(99,102,241,0.3); }
    100% { box-shadow: 0 8px 40px rgba(236,72,153,0.35); }
}
.share-banner-inner {
    background: var(--bg-card);
    border-radius: calc(var(--radius) - 2px);
    padding: 2rem 2rem 1.75rem;
    text-align: center;
}
.share-banner-icon {
    font-size: 1.75rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}
.share-banner-text {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.35rem;
}
.share-banner-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}
.share-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    border: none;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.share-btn:hover { transform: translateY(-1px); }
.share-btn:active { transform: translateY(0); }
.share-btn-x {
    background: #0F1419;
    color: #fff;
}
.share-btn-x:hover { background: #1D1F23; }
.share-btn-fb {
    background: #1877F2;
    color: #fff;
}
.share-btn-fb:hover { background: #0C63D4; }
.share-btn-wa {
    background: #25D366;
    color: #fff;
}
.share-btn-wa:hover { background: #1DA851; }
.share-btn-copy {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}
.share-btn-copy:hover { border-color: var(--accent); color: var(--accent); }

.share-cta-bottom {
    text-align: center;
    padding: 2.5rem 1.5rem;
    margin-top: 2rem;
    background: linear-gradient(135deg, var(--accent-light) 0%, #FDF2F8 100%);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.share-cta-emoji { font-size: 2.5rem; margin-bottom: 0.75rem; }
.share-cta-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.35rem;
}
.share-cta-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .share-banner-inner { padding: 1.5rem 1rem 1.25rem; }
    .share-banner-text { font-size: 1.15rem; }
    .share-btn span { display: none; }
    .share-btn { padding: 0.6rem; border-radius: 50%; }
    .share-cta-title { font-size: 1.15rem; }
    .share-cta-bottom .share-btn span { display: none; }
    .share-cta-bottom .share-btn { padding: 0.6rem; border-radius: 50%; }
}

/* ===== TABLES ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.data-table th {
    text-align: left;
    padding: 0.85rem 1rem;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--accent-light); }

/* ===== STATUS BADGES ===== */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-published { background: #ECFDF5; color: var(--success); }
.status-draft { background: #F3F4F6; color: var(--text-muted); }

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.stat-card .stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}
.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.empty-state p { font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ===== ALERTS ===== */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}
.alert-success { background: #ECFDF5; color: var(--success); border: 1px solid #A7F3D0; }
.alert-danger { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }
.alert-info { background: var(--accent-light); color: var(--accent); border: 1px solid #C7D2FE; }

/* ===== ABOUT PAGE ===== */
.about-hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
}
.about-hero h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
    line-height: 1.15;
}
.about-hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.7;
}

.about-mission,
.about-company {
    padding: 2rem 0 2.5rem;
}
.about-mission-body {
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--text-muted);
    font-size: 1rem;
}
.about-mission-body p { margin-bottom: 1.25rem; }
.about-mission-body a { color: var(--accent); text-decoration: underline; }

.about-features {
    padding: 2rem 0 3rem;
}
.about-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.about-feature {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.about-feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.about-feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.about-feature h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 650;
    margin-bottom: 0.65rem;
    letter-spacing: -0.01em;
}
.about-feature p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.about-how {
    padding: 3rem 0;
}
.about-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    max-width: 900px;
    margin: 0 auto;
}
.about-step {
    flex: 1;
    text-align: center;
    padding: 0 1.5rem;
}
.about-step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 4px 14px var(--accent-glow);
}
.about-step h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 650;
    margin-bottom: 0.5rem;
}
.about-step p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}
.about-step-line {
    width: 60px;
    height: 2px;
    background: var(--border);
    margin-top: 24px;
    flex-shrink: 0;
}

.about-cta {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3.5rem 2rem;
    box-shadow: var(--shadow);
}
.about-cta h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}
.about-cta p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.75rem;
}

/* ===== LEGAL PAGES (Terms, Privacy) ===== */
.legal-page {
    padding-top: 1rem;
    padding-bottom: 3rem;
}
.legal-hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
}
.legal-hero h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
}
.legal-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.legal-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1rem;
    line-height: 1.8;
    color: var(--text-muted);
}
.legal-body h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 2.5rem 0 0.75rem;
    letter-spacing: -0.01em;
}
.legal-body h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.5rem 0 0.5rem;
}
.legal-body p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.legal-body ul {
    margin: 0 0 1.25rem 1.25rem;
    padding: 0;
}
.legal-body li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.legal-body a {
    color: var(--accent);
    text-decoration: underline;
}

/* ===== CONTACT PAGE ===== */
.contact-page {
    padding-top: 1rem;
}
.contact-hero {
    text-align: center;
    padding: 3rem 1rem;
}
.contact-hero h1 {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.75rem;
}
.contact-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 3rem;
}
.contact-form-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}
.contact-info-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.contact-info-card h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.contact-info-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
}
.contact-success {
    text-align: center;
    padding: 3rem 2rem;
}
.contact-success-icon {
    color: var(--success);
    margin-bottom: 1.25rem;
}
.contact-success h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.contact-success p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* ===== CATEGORY PAGE ===== */
.cat-hero {
    padding: 2rem 0 2.5rem;
}
.cat-hero-content {
    text-align: center;
}
.cat-hero-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}
.cat-hero-icon-wrap svg { width: 30px; height: 30px; stroke: var(--accent); }
.cat-hero h1 {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.75rem;
    line-height: 1.15;
}
.cat-hero-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 520px;
    margin: 0 auto 1.25rem;
    line-height: 1.7;
}
.cat-hero-stat {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.45rem 1.25rem;
    border-radius: 24px;
}
.cat-quizzes {
    padding-bottom: 2rem;
}

.cat-content-section {
    max-width: 820px;
    margin: 0 auto 2.5rem;
    padding: 0 1.5rem;
}
.cat-content-inner {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2.5rem 3rem;
    border: 1px solid var(--border);
    line-height: 1.8;
    color: var(--text-body);
    font-size: 1.02rem;
}
.cat-content-inner h2 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 2rem 0 0.75rem;
    color: var(--text-heading);
}
.cat-content-inner h2:first-child { margin-top: 0; }
.cat-content-inner h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: var(--text-heading);
}
.cat-content-inner p { margin-bottom: 1rem; }
.cat-content-inner ul, .cat-content-inner ol { margin: 0.5rem 0 1.25rem 1.5rem; }
.cat-content-inner li { margin-bottom: 0.4rem; }
.cat-content-inner a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.cat-content-inner a:hover { border-bottom-color: var(--accent); }
.cat-content-inner strong { font-weight: 600; color: var(--text-heading); }
.cat-content-inner blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.25rem 0;
    padding: 0.75rem 1.25rem;
    background: var(--accent-light);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */

/* --- Tablet & below (<=768px) --- */
@media (max-width: 768px) {
    /* Header */
    .site-header { padding: 0 1rem; }
    .site-header .container { padding: 0; height: 60px; }
    .site-nav-desktop { display: none !important; }
    .nav-toggle { display: flex !important; align-items: center; justify-content: center; }
    .site-nav-mobile { display: flex; }
    .nav-close { display: flex !important; }

    /* Main content */
    .site-main { padding: 0 1rem; }

    /* Homepage hero */
    .hp-hero { padding: 2.5rem 0 2rem; }
    .hp-hero h1 { font-size: 2rem; }
    .hp-hero p { font-size: 0.95rem; max-width: 100%; }
    .hp-hero-badge { font-size: 0.65rem; padding: 0.35rem 0.9rem; margin-bottom: 1rem; }
    .hp-hero-actions { margin-bottom: 2rem; }
    .hp-hero-stats { padding: 1rem 1.25rem; gap: 1.5rem; }
    .hp-stat-val { font-size: 1.3rem; }

    /* Category grid */
    .hp-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
    .hp-cat-card { padding: 1.25rem 1rem; }
    .hp-cat-icon { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 0.75rem; }
    .hp-cat-card h3 { font-size: 0.9rem; }

    /* Section heads */
    .hp-section-head h2 { font-size: 1.5rem; }

    /* How it works / Features */
    .hp-how-grid { grid-template-columns: 1fr; gap: 1rem; }
    .hp-how-card { padding: 1.5rem; }
    .hp-features-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .hp-topics-body { font-size: 0.95rem; }

    /* Quiz cards */
    .quiz-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .qc-img { height: 160px; }
    .qc-body { padding: 1rem 1.15rem 1.15rem; }
    .qc-title { font-size: 1.05rem; }
    .qc-desc { font-size: 0.82rem; margin-bottom: 0.75rem; }

    /* Filter bar */
    .filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0.4rem;
        padding-bottom: 0.5rem;
        margin-bottom: 1.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .filter-bar::-webkit-scrollbar { display: none; }
    .filter-btn { flex-shrink: 0; padding: 0.45rem 1rem; font-size: 0.78rem; }

    /* Quiz detail page */
    .qd { padding-top: 1rem; }
    .qd-back { font-size: 0.8rem; margin-bottom: 1rem; }
    .qd-hero-img { height: 180px; }
    .qd-hero-body { padding: 1.25rem 1rem 1.5rem; }
    .qd-title { font-size: 1.5rem; margin-bottom: 0.5rem; }
    .qd-desc { font-size: 0.9rem; }
    .qd-badges { margin-bottom: 0.65rem; }
    .qd-stats { flex-wrap: wrap; margin-bottom: 1.25rem; }
    .qd-stat { min-width: calc(50% - 1px); padding: 1rem 0.75rem; }
    .qd-stat-icon { width: 36px; height: 36px; }
    .qd-stat-val { font-size: 1.15rem; }
    .qd-content { padding: 1.25rem; margin-bottom: 1.25rem; font-size: 0.92rem; }
    .qd-content h2 { font-size: 1.1rem; }
    .qd-cta { padding: 1.5rem 1.25rem 2rem; }
    .qd-cta-top { padding: 1.25rem 1rem; margin-bottom: 1.25rem; }
    .qd-start-btn { padding: 0.85rem 2rem; font-size: 1rem; }
    .qd-qtypes { grid-template-columns: 1fr; }

    /* Quiz taking */
    .quiz-container { padding-top: 1rem; }
    .question-card { padding: 1.15rem; margin-bottom: 1rem; }
    .question-text { font-size: 1rem; margin-bottom: 1rem; }
    .option-item { padding: 0.8rem 1rem; font-size: 0.9rem; }
    .matching-row { flex-direction: column; gap: 0.5rem; }
    .matching-item { font-size: 0.85rem; }

    /* Results */
    .results-container { padding-top: 1rem; overflow-x: hidden; }
    .results-header { padding: 2rem 1.25rem; margin-bottom: 1.25rem; }
    .results-score.score-numeric { font-size: 2.75rem; }
    .results-score.score-short { font-size: 1.85rem; }
    .results-score.score-long { font-size: 1.3rem; }
    .bd-label { width: 100px; font-size: 0.78rem; }
    .bd-pct { width: 36px; font-size: 0.8rem; }

    /* Share */
    .share-banner { margin-top: 1rem; }
    .share-banner-inner { padding: 1.5rem 1rem 1.25rem; }
    .share-banner-text { font-size: 1.1rem; }
    .share-btn span { display: none; }
    .share-btn { padding: 0.65rem; border-radius: 50%; width: 42px; height: 42px; align-items: center; justify-content: center; }
    .share-cta-bottom { padding: 2rem 1.25rem; }
    .share-cta-title { font-size: 1.1rem; }
    .share-cta-bottom .share-btn span { display: none; }
    .share-cta-bottom .share-btn { padding: 0.65rem; border-radius: 50%; width: 42px; height: 42px; }

    /* About */
    .about-hero { padding: 2.5rem 0.5rem 2rem; }
    .about-hero h1 { font-size: 2rem; }
    .about-hero p { font-size: 1rem; }
    .about-feature-grid { grid-template-columns: 1fr; gap: 1rem; }
    .about-feature { padding: 1.5rem; }
    .about-steps { flex-direction: column; gap: 1.5rem; }
    .about-step-line { width: 2px; height: 32px; margin: 0 auto; }
    .about-step { padding: 0 1rem; }
    .about-cta { padding: 2.5rem 1.5rem; }
    .about-cta h2 { font-size: 1.4rem; }

    /* Contact */
    .contact-hero { padding: 2rem 0.5rem; }
    .contact-hero h1 { font-size: 1.85rem; }
    .contact-hero p { font-size: 0.95rem; }
    .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .contact-form-wrap { padding: 1.5rem; }
    .contact-info { flex-direction: row; flex-wrap: wrap; gap: 0.75rem; }
    .contact-info-card { flex: 1; min-width: calc(50% - 0.5rem); padding: 1.25rem; }

    /* Category page */
    .cat-hero { padding: 1.5rem 0 2rem; }
    .cat-hero h1 { font-size: 1.85rem; }
    .cat-hero-icon-wrap { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 1rem; }
    .cat-hero-icon-wrap svg { width: 26px; height: 26px; }
    .cat-content-section { padding: 0 1rem; margin-bottom: 2rem; }
    .cat-content-inner { padding: 2rem 1.75rem; font-size: 0.97rem; }
    .cat-content-inner h2 { font-size: 1.3rem; }

    /* Tables */
    .page-header { flex-direction: column; align-items: flex-start; }
    .data-table { font-size: 0.78rem; }
    .data-table th, .data-table td { padding: 0.6rem 0.5rem; }

    /* Footer */
    .site-footer { margin-top: 3rem; }
    .footer-inner { flex-direction: column; gap: 2rem; padding: 2.5rem 1.5rem 2rem; }
    .footer-brand { max-width: 100%; }
    .footer-links { gap: 2rem; flex-wrap: wrap; }
    .footer-col { max-width: 100%; }
    .footer-col a { max-width: 100%; }
    .footer-bottom { padding: 1.25rem 1.5rem; }

    /* Buttons */
    .btn-lg { padding: 0.8rem 1.75rem; font-size: 0.95rem; }
    .btn { padding: 0.6rem 1.15rem; font-size: 0.85rem; }
}

/* --- Small phones (<=480px) --- */
@media (max-width: 480px) {
    .site-header .container { height: 56px; }
    .site-logo img { height: 22px; }

    .hp-hero h1 { font-size: 1.65rem; }
    .hp-hero p { font-size: 0.88rem; }
    .hp-hero-stats { flex-direction: column; gap: 0.85rem; padding: 1rem; display: flex; width: 100%; }
    .hp-stat { flex-direction: row; gap: 0.5rem; }
    .hp-stat-val { font-size: 1.15rem; }
    .hp-stat-lbl { font-size: 0.7rem; }

    .hp-features-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
    .hp-feat h4 { font-size: 0.88rem; }
    .hp-feat p { font-size: 0.82rem; }
    .hp-cat-grid { grid-template-columns: 1fr; }

    .qd-title { font-size: 1.3rem; }
    .qd-hero-img { height: 150px; }
    .qd-stat { min-width: 100%; }
    .qd-start-btn { width: 100%; justify-content: center; }

    .results-score.score-numeric { font-size: 2.25rem; }
    .results-score.score-short { font-size: 1.6rem; }
    .results-score.score-long { font-size: 1.15rem; }
    .results-header { padding: 1.5rem 1rem; }
    .bd-label { width: 80px; font-size: 0.75rem; }
    .bd-row { gap: 0.4rem; }
    .bd-pct { width: 34px; font-size: 0.78rem; }
    .bd-track { height: 20px; }

    .about-hero h1 { font-size: 1.65rem; }
    .about-cta h2 { font-size: 1.25rem; }

    .contact-hero h1 { font-size: 1.6rem; }
    .contact-info-card { min-width: 100%; }

    .cat-hero h1 { font-size: 1.6rem; }
    .cat-content-inner { padding: 1.5rem 1.25rem; }
    .cat-content-inner h2 { font-size: 1.2rem; }
    .cat-content-inner h3 { font-size: 1.05rem; }

    .question-card { padding: 1rem; }
    .question-text { font-size: 0.92rem; }
    .option-item { padding: 0.7rem 0.85rem; font-size: 0.85rem; gap: 0.5rem; }

    .share-banner-text { font-size: 1rem; }
    .share-banner-subtitle { font-size: 0.85rem; }
    .share-cta-emoji { font-size: 2rem; }
    .share-cta-title { font-size: 1rem; }
    .share-cta-subtitle { font-size: 0.85rem; }
}

/* --- Touch-friendly tap targets --- */
@media (pointer: coarse) {
    .option-item { min-height: 48px; }
    .filter-btn { min-height: 40px; }
    .btn { min-height: 44px; }
    .qd-start-btn { min-height: 52px; }
    .share-btn { min-height: 44px; min-width: 44px; }
    .site-nav-mobile a { min-height: 48px; display: flex; align-items: center; }
}

/* --- Safe area for notch phones --- */
@supports (padding: env(safe-area-inset-bottom)) {
    .site-footer { padding-bottom: env(safe-area-inset-bottom); }
    .site-header { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
    .site-nav-mobile {
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
        padding-right: calc(1.5rem + env(safe-area-inset-right));
    }
}
