/**
 * 433 Quiz – Frontend Styles
 *
 * Redesigned to match the editorial, Medium.com-inspired quiz mockup.
 * Uses Playfair Display for headings, clean card-based design.
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800;900&display=swap');

/* ================================================================
   QUIZ SINGLE PAGE LAYOUT (Theme Template)
   ================================================================ */

.quiz-single-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px 60px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 0 40px;
    align-items: start;
}

/* ---- Breadcrumbs ---- */
.quiz-breadcrumbs {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    color: var(--text-muted, #888);
    padding: 16px 0;
    font-weight: 400;
}

.quiz-breadcrumbs a {
    color: var(--text-muted, #888);
    text-decoration: none;
    transition: color 0.2s;
}

.quiz-breadcrumbs a:hover {
    color: var(--text-main, #111);
}

.quiz-breadcrumbs__sep {
    margin: 0 6px;
    opacity: 0.5;
}

.quiz-breadcrumbs__current {
    color: var(--text-secondary, #555);
}

/* ---- Hero Header ---- */
.quiz-hero {
    display: contents;
}

.quiz-hero__content {
    grid-column: 1;
    grid-row: 2;
    padding-top: 20px;
    padding-bottom: 24px;
    min-width: 0;
}

.quiz-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.quiz-hero__tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main, #111);
    text-decoration: none;
    padding: 4px 14px;
    border: 1.5px solid var(--border-light, #ddd);
    border-radius: 50px;
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.quiz-hero__tag:hover {
    background: var(--text-main, #111);
    color: var(--bg-card, #fff);
    border-color: var(--text-main, #111);
}

.quiz-hero__title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 16px 0;
    color: var(--text-main, #111);
}

.quiz-hero__description {
    font-size: 1.05rem;
    color: var(--text-secondary, #555);
    line-height: 1.55;
    margin: 0 0 20px 0;
    max-width: 520px;
}

.quiz-hero__meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.quiz-hero__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted, #888);
    font-weight: 500;
}

.quiz-hero__meta-item svg {
    opacity: 0.5;
}

/* Hero Image */
.quiz-hero__image {
    grid-column: 2;
    grid-row: 2 / span 2;
    width: 100%;
    height: 320px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
}

.quiz-hero__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 4px 24px rgba(0,0,0,0.08));
}

/* ---- Quiz Main Area ---- */
.quiz-main {
    width: 100%;
    max-width: 720px;
    margin: 0;
    padding: 0;
}

.quiz-content-area {
    /* Holder for the_content() output */
}

/* ================================================================
   QUIZ COMPONENT (Plugin)
   ================================================================ */

/* ---- Container ---- */
.quiz-433 {
    width: 100%;
    max-width: 720px;
    margin: 0;
    padding: 0;
    color: var(--text-main, #0a0a0a);
    line-height: 1.6;
    position: relative;
}

/* ---- Start Button ---- */
.quiz-433__start {
    text-align: left;
    padding: 0 0 20px;
}

.quiz-433__start-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: #1e3a8a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
    letter-spacing: 0.01em;
    width: max-content;
    max-width: 100%;
    margin: 0;
}

.quiz-433__start-btn:hover {
    background: #1e40af;
    transform: translateY(-1px);
}

.quiz-433__start-btn:active {
    transform: translateY(0);
}

.quiz-433__start-btn svg {
    transition: transform 0.2s;
}

.quiz-433__start-btn:hover svg {
    transform: translateX(3px);
}

/* ---- Quiz Card ---- */
.quiz-433__card {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-light, #e5e5e5);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.quiz-433__card[hidden] {
    display: none;
}

/* ---- Progress Row ---- */
.quiz-433__progress {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light, #eee);
}

.quiz-433__progress-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary, #555);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.quiz-433__progress-bar {
    flex: 1;
    height: 4px;
    background: var(--border-light, #e9e9e9);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.quiz-433__progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #2563eb;
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-433__score-indicator {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2e7d32;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.quiz-433__score-indicator--visible {
    opacity: 1;
}

/* ---- Question ---- */
.quiz-433__question {
    animation: quizFadeIn 0.35s ease;
}

@keyframes quizFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-433__question-text {
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 24px 0;
    letter-spacing: -0.01em;
    color: var(--text-main, #111);
}

/* ---- Answer Options (Radio Style) ---- */
.quiz-433__answers {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
}

.quiz-433__answer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 1px solid var(--border-light, #e5e5e5);
    border-bottom: none;
    cursor: pointer;
    transition: background-color 0.15s;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-main, #111);
    background: var(--bg-card, #fff);
    user-select: none;
    position: relative;
}

.quiz-433__answer:first-child {
    border-radius: 8px 8px 0 0;
}

.quiz-433__answer:last-child {
    border-bottom: 1px solid var(--border-light, #e5e5e5);
    border-radius: 0 0 8px 8px;
}

.quiz-433__answer:hover {
    background: #f8f9fa;
}

/* Radio circle */
.quiz-433__answer-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    background: transparent;
}

.quiz-433__answer-radio-inner {
    width: 0;
    height: 0;
    border-radius: 50%;
    background: transparent;
    transition: all 0.2s;
}

.quiz-433__answer-text {
    flex: 1;
    font-weight: 500;
}

/* Check/X icon (hidden until feedback) */
.quiz-433__answer-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: none;
}

/* ---- Answer States ---- */
.quiz-433__answer--disabled {
    pointer-events: none;
}

/* Selected */
.quiz-433__answer--selected {
    background: #f0f4ff;
    border-color: #2563eb;
}

.quiz-433__answer--selected + .quiz-433__answer {
    border-top-color: #2563eb;
}

.quiz-433__answer--selected .quiz-433__answer-radio {
    border-color: #2563eb;
}

.quiz-433__answer--selected .quiz-433__answer-radio-inner {
    width: 10px;
    height: 10px;
    background: #2563eb;
}

/* Correct */
.quiz-433__answer--correct {
    background: rgba(46, 125, 50, 0.06);
    border-color: #2e7d32 !important;
}

.quiz-433__answer--correct + .quiz-433__answer {
    border-top-color: #2e7d32;
}

.quiz-433__answer--correct .quiz-433__answer-radio {
    border-color: #2e7d32;
    background: #2e7d32;
}

.quiz-433__answer--correct .quiz-433__answer-radio-inner {
    width: 10px;
    height: 10px;
    background: #fff;
}

.quiz-433__answer--correct .quiz-433__answer-icon {
    display: block;
    color: #2e7d32;
}

/* Wrong */
.quiz-433__answer--wrong {
    background: rgba(198, 40, 40, 0.04);
    border-color: #c62828 !important;
}

.quiz-433__answer--wrong + .quiz-433__answer {
    border-top-color: #c62828;
}

.quiz-433__answer--wrong .quiz-433__answer-radio {
    border-color: #c62828;
    background: #c62828;
}

.quiz-433__answer--wrong .quiz-433__answer-radio-inner {
    width: 10px;
    height: 10px;
    background: #fff;
}

.quiz-433__answer--wrong .quiz-433__answer-icon {
    display: block;
    color: #c62828;
}

/* Dimmed (other answers after feedback) */
.quiz-433__answer--dimmed {
    opacity: 0.4;
}

/* ---- Feedback ---- */
.quiz-433__feedback {
    margin-top: 20px;
    padding: 0;
    animation: quizFadeIn 0.3s ease;
}

.quiz-433__feedback-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.quiz-433__feedback-status--correct {
    color: #2e7d32;
}

.quiz-433__feedback-status--wrong {
    color: #c62828;
}

.quiz-433__feedback-icon {
    width: 20px;
    height: 20px;
}

.quiz-433__feedback-praise {
    font-size: 0.85rem;
    color: var(--text-secondary, #555);
    margin: 0 0 12px 0;
    padding-left: 28px;
}

/* Explanation Box */
.quiz-433__explanation-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 12px;
}

[data-theme="dark"] .quiz-433__explanation-box {
    background: #1a1a1a;
}

.quiz-433__explanation-box-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-muted, #888);
    margin-top: 2px;
}

.quiz-433__explanation-box-content {
    flex: 1;
}

.quiz-433__explanation-box-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main, #111);
    margin: 0 0 4px 0;
}

.quiz-433__explanation-box-text {
    font-size: 0.9rem;
    color: var(--text-secondary, #444);
    line-height: 1.5;
    margin: 0;
}

.quiz-433__feedback-timer-bar-wrap {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary, #e2e8f0);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 24px;
}

.quiz-433__feedback-timer-bar {
    height: 100%;
    width: 100%;
    background: #1e3a8a;
    animation: quiz433TimerBar 4.5s linear forwards;
}

@keyframes quiz433TimerBar {
    from { width: 100%; }
    to { width: 0%; }
}

/* ---- Result Screen ---- */
.quiz-433__result {
    animation: quizFadeIn 0.5s ease;
    padding: 0;
}

.quiz-433__result[hidden] {
    display: none;
}

.quiz-433__result-card {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-light, #e5e5e5);
    border-radius: 12px;
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.quiz-433__result-left {
    display: flex;
    align-items: center;
    gap: 28px;
    flex: 1;
}

/* Circular progress ring */
.quiz-433__result-ring {
    width: 120px;
    height: 120px;
    position: relative;
    flex-shrink: 0;
}

.quiz-433__result-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.quiz-433__result-ring-bg {
    fill: none;
    stroke: var(--border-light, #e9e9e9);
    stroke-width: 6;
}

.quiz-433__result-ring-fill {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 339; /* 2 * π * 54 ≈ 339 */
    stroke-dashoffset: 339;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-433__result-ring-fill--great { stroke: #2e7d32; }
.quiz-433__result-ring-fill--good  { stroke: #e7b000; }
.quiz-433__result-ring-fill--poor  { stroke: #c62828; }

.quiz-433__result-ring-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.quiz-433__result-ring-pct {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-main, #111);
}

.quiz-433__result-ring-sub {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted, #888);
    margin-top: 2px;
}

/* Result text area */
.quiz-433__result-info {
    flex: 1;
}

.quiz-433__result-fraction {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary, #555);
    margin: 0 0 4px 0;
}

.quiz-433__result-verdict {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: var(--text-main, #111);
    line-height: 1.15;
}

.quiz-433__result-message {
    font-size: 0.9rem;
    color: var(--text-secondary, #555);
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.quiz-433__result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Result stats sidebar */
.quiz-433__result-stats {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-left: 32px;
    border-left: 1px solid var(--border-light, #eee);
}

.quiz-433__result-stat {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.quiz-433__result-stat-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted, #888);
    flex-shrink: 0;
    margin-top: 1px;
}

.quiz-433__result-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted, #888);
    font-weight: 500;
    margin: 0;
}

.quiz-433__result-stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main, #111);
    margin: 0;
}

/* ---- Buttons ---- */
.quiz-433__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    letter-spacing: 0.01em;
}

.quiz-433__btn--primary {
    background: #1e3a8a;
    color: #fff;
}

.quiz-433__btn--primary:hover {
    background: #1e40af;
}

.quiz-433__btn--secondary {
    background: transparent;
    color: var(--text-main, #111);
    border: 1.5px solid var(--border-light, #ddd);
}

.quiz-433__btn--secondary:hover {
    border-color: var(--border-medium, #bbb);
    background: #f9f9f9;
}

/* ---- Login CTA ---- */
.quiz-433__login-cta {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: quizFadeIn 0.3s ease;
}

.quiz-433__login-cta[hidden] {
    display: none;
}

.quiz-433__login-cta-inner {
    background: var(--bg-card, #fff);
    border-radius: 12px;
    padding: 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.quiz-433__login-cta-inner h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.quiz-433__login-cta-inner p {
    font-size: 0.95rem;
    color: var(--text-secondary, #555);
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.quiz-433__login-cta-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ================================================================
   RELATED QUIZZES
   ================================================================ */
.quiz-related-section {
    grid-column: 1 / -1;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border-light, #e5e5e5);
}

.quiz-related-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
}

.quiz-related-title {
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main, #111);
}

.quiz-related-seeall {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted, #888);
    text-decoration: none;
    transition: color 0.2s;
}

.quiz-related-seeall:hover {
    color: var(--text-main, #111);
}

.quiz-related-seeall span {
    display: inline-block;
    transition: transform 0.2s;
}

.quiz-related-seeall:hover span {
    transform: translateX(3px);
}

/* Related Grid */
.quiz-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.quiz-related-card {
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-light, #e5e5e5);
}

.quiz-related-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.quiz-related-card__image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f0f0f0;
}

.quiz-related-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.quiz-related-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.quiz-related-card:hover .quiz-related-card__img {
    transform: scale(1.03);
}

.quiz-related-card__badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(4px);
    color: #111;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
}

.quiz-related-card__body {
    padding: 16px 18px 18px;
}

.quiz-related-card__title {
    font-family: inherit;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 6px 0;
    color: var(--text-main, #111);
}

.quiz-related-card__desc {
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.quiz-related-card__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.78rem;
    color: var(--text-muted, #888);
    font-weight: 500;
}

.quiz-related-card__meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.quiz-related-card__meta svg {
    opacity: 0.5;
}

/* ================================================================
   DARK MODE
   ================================================================ */

[data-theme="dark"] .quiz-433__card {
    background: var(--bg-card, #1a1a1a);
    border-color: #333;
    color: #fff;
}

[data-theme="dark"] .quiz-433__question-text {
    color: #fff;
}

[data-theme="dark"] .quiz-433__answer {
    border-color: #333;
    background: var(--bg-card, #1a1a1a);
    color: #fff;
}

[data-theme="dark"] .quiz-433__answer:hover {
    background: #222;
}

[data-theme="dark"] .quiz-433__answer-radio {
    border-color: #555;
}

[data-theme="dark"] .quiz-433__explanation-box-label {
    color: #fff;
}

[data-theme="dark"] .quiz-433__explanation-box-text {
    color: #ccc;
}

[data-theme="dark"] .quiz-433__result-card {
    background: var(--bg-card, #1a1a1a);
    border-color: #333;
    color: #fff;
}

[data-theme="dark"] .quiz-433__result-title,
[data-theme="dark"] .quiz-433__result-stat-label,
[data-theme="dark"] .quiz-433__result-stat-val {
    color: #fff;
}

[data-theme="dark"] .quiz-related-card {
    background: var(--bg-card, #1a1a1a);
    border-color: #333;
    color: #fff;
}

[data-theme="dark"] .quiz-related-card__title {
    color: #fff;
}

[data-theme="dark"] .quiz-related-card__desc,
[data-theme="dark"] .quiz-related-card__meta {
    color: #aaa;
}

[data-theme="dark"] .quiz-related-card__badge {
    background: rgba(30,30,30,0.92);
    color: #eee;
}

[data-theme="dark"] .quiz-related-card__image--placeholder {
    background: #222;
}

[data-theme="dark"] .quiz-hero__tag {
    border-color: #444;
    color: #ddd;
}

[data-theme="dark"] .quiz-hero__tag:hover {
    background: #fff;
    color: #111;
    border-color: #fff;
}

/* ================================================================
   MOBILE
   ================================================================ */

@media (max-width: 768px) {
    .quiz-single-page {
        padding: 0 16px 40px;
        display: flex;
        flex-direction: column;
    }

    .quiz-breadcrumbs { order: 1; }
    
    .quiz-hero__image {
        order: 2;
        width: 100%;
        height: 240px;
        position: relative;
        top: 0;
        margin-top: 16px;
    }

    .quiz-hero__content {
        order: 3;
        padding-top: 24px;
        padding-bottom: 12px;
    }

    .quiz-main {
        order: 4;
        padding-top: 0;
    }

    .quiz-related-section {
        order: 5;
    }

    .quiz-hero__title {
        font-size: 2rem;
    }

    .quiz-hero__description {
        max-width: 100%;
    }

    .quiz-433__card {
        padding: 20px 16px;
        border-radius: 10px;
    }

    .quiz-433__question-text {
        font-size: 1.15rem;
    }

    .quiz-433__answer {
        padding: 14px 16px;
        gap: 12px;
    }

    .quiz-433__result-card {
        flex-direction: column;
        padding: 28px 20px;
        gap: 24px;
    }

    .quiz-433__result-left {
        flex-direction: column;
        text-align: center;
    }

    .quiz-433__result-stats {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--border-light, #eee);
        padding-top: 20px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
    }

    .quiz-433__result-actions {
        justify-content: center;
    }

    .quiz-related-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .quiz-related-header {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .quiz-hero__title {
        font-size: 1.7rem;
    }

    .quiz-433__progress {
        flex-wrap: wrap;
        gap: 8px;
    }

    .quiz-433__score-indicator {
        display: none;
    }
}

/* ================================================================
   QUIZ MAIN COMPONENT
   ================================================================ */
.quiz-main {
    grid-column: 1;
    grid-row: 3;
    padding-bottom: 40px;
}

/* ================================================================
   QUIZ HUB LAYOUT (Archive)
   ================================================================ */

.quiz-hub {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* Hero */
.quiz-hub__hero {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 20px 0 40px;
}

.quiz-hub__hero-text {
    flex: 1;
}

.quiz-hub__title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 16px 0;
    color: var(--text-main, #111);
}

.quiz-hub__subtitle {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main, #111);
    margin: 0 0 12px 0;
    line-height: 1;
}

.quiz-hub__desc {
    font-size: 1rem;
    color: var(--text-secondary, #555);
    line-height: 1.5;
    max-width: 480px;
}

.quiz-hub__hero-graphic {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
}

/* Stats Panel */
.quiz-hub__stats-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 32px;
    background: #fff;
    border: 1px solid var(--border-light, #e5e5e5);
    border-radius: 12px;
    margin-bottom: 48px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.quiz-hub__stats-panel--guest {
    justify-content: flex-start;
}

.quiz-hub__stats-user {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 32px;
    border-right: 1px solid var(--border-light, #eee);
}

.quiz-hub__user-avatar img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.quiz-hub__user-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-hub__badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    background: #e0e7ff;
    color: #3730a3;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.quiz-hub__user-msg {
    font-size: 0.85rem;
    color: var(--text-secondary, #555);
    margin: 0;
}

.quiz-hub__stats-metrics {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: space-around;
}

.quiz-hub__metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.quiz-hub__metric-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted, #888);
    font-weight: 600;
    margin-bottom: 4px;
}

.quiz-hub__metric-val {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-main, #111);
    line-height: 1;
}

.quiz-hub__btn-outline {
    display: inline-flex;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-light, #ccc);
    border-radius: 6px;
    color: var(--text-main, #111);
    text-decoration: none;
    transition: all 0.2s;
}

.quiz-hub__btn-outline:hover {
    background: #f9f9f9;
    border-color: #999;
}

.quiz-hub__btn-primary {
    display: inline-flex;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    background: #1e3a8a;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.quiz-hub__btn-primary:hover {
    background: #1e40af;
}

/* Sections */
.quiz-hub__section {
    margin-bottom: 56px;
}

.quiz-hub__section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
}

.quiz-hub__section-title {
    font-family: 'Playfair Display';
    font-size: 1.55rem;
    font-weight: 500;
    margin: 0 0 32px 0;
}

/* Featured / Dagens Quiz */
.quiz-hub__featured {
    margin-bottom: 48px;
}

.quiz-hub__featured-card {
    display: flex;
    background: #fff;
    border: 1px solid var(--border-light, #e5e5e5);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.quiz-hub__featured-image {
    width: 50%;
    position: relative;
    background: #f0f4f8;
}

.quiz-hub__featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quiz-hub__featured-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #1e3a8a;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
}

.quiz-hub__featured-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.quiz-hub__featured-title a {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-main, #111);
    text-decoration: none;
    line-height: 1.1;
    margin: 0 0 16px 0;
    display: block;
}

.quiz-hub__featured-btn {
    align-self: flex-start;
    width: max-content;
    max-width: 100%;
}

.quiz-hub__featured-desc {
    font-size: 1.05rem;
    color: var(--text-secondary, #555);
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.quiz-hub__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.quiz-hub__tag {
    font-size: 0.75rem;
    font-weight: 600;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 4px 12px;
    border-radius: 50px;
}

.quiz-hub__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted, #888);
    font-weight: 500;
    margin-bottom: 24px;
}

.quiz-hub__meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Grids */
.quiz-hub__grid-3,
.quiz-hub__carousel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.quiz-hub__grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Popular Card */
.quiz-hub__pop-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.quiz-hub__pop-image {
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    background: #f5f5f5;
}

.quiz-hub__pop-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.quiz-hub__pop-card:hover .quiz-hub__pop-img {
    transform: scale(1.05);
}

.quiz-hub__pop-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 6px 0;
}

/* Theme Grid */
.quiz-hub__theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 16px;
    justify-content: center;
}

.quiz-hub__theme-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-main, #111);
    transition: all 0.2s;
    background: transparent;
    border: none;
    padding: 0;
}

.quiz-hub__theme-chip:hover .quiz-hub__theme-icon {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}

.quiz-hub__theme-icon {
    font-weight: 900;
    color: #2563eb;
    font-size: 1.5rem;
    background: #eff6ff;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.quiz-hub__theme-name {
    font-weight: 400;
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.2;
}

/* Filters */
.quiz-hub__filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-light, #e5e5e5);
    padding-bottom: 16px;
}

.quiz-hub__filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quiz-hub__filter-btn {
    padding: 6px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    background: transparent;
    border: none;
    border-radius: 50px;
    color: var(--text-secondary, #555);
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-hub__filter-btn:hover {
    background: #f5f5f5;
}

.quiz-hub__filter-btn--active {
    background: #1e3a8a;
    color: #fff;
}

.quiz-hub__filter-btn--active:hover {
    background: #1e3a8a;
}

.quiz-hub__sort-select {
    padding: 6px 32px 6px 12px;
    border: 1px solid var(--border-light, #e5e5e5);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    background: transparent;
    cursor: pointer;
}

/* Load More */
.quiz-hub__load-more {
    text-align: center;
    margin-top: 40px;
}

/* Mobile */
@media (max-width: 900px) {
    .quiz-hub__hero {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .quiz-hub__desc {
        margin: 0 auto;
    }
    .quiz-hub__hero-graphic {
        display: none;
    }
    
    .quiz-hub__stats-panel {
        flex-direction: column;
        gap: 24px;
        padding: 24px;
    }
    .quiz-hub__stats-user {
        border-right: none;
        border-bottom: 1px solid var(--border-light, #eee);
        padding-right: 0;
        padding-bottom: 24px;
        width: 100%;
        justify-content: center;
    }
    .quiz-hub__stats-metrics {
        width: 100%;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .quiz-hub__featured-card {
        flex-direction: column;
    }
    .quiz-hub__featured-image {
        width: 100%;
        aspect-ratio: 16/9;
    }
    .quiz-hub__featured-content {
        padding: 24px;
        box-sizing: border-box;
    }
    .quiz-hub__featured-title a {
        font-size: 1.8rem;
    }
    
    .quiz-hub__grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    
    .quiz-hub__grid-3,
    .quiz-hub__carousel {
        display: grid;
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 85%;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        padding-bottom: 12px;
        margin-right: -24px;
        padding-right: 24px;
    }
    .quiz-hub__grid-3::-webkit-scrollbar,
    .quiz-hub__carousel::-webkit-scrollbar {
        display: none;
    }
    .quiz-hub__grid-3 > *,
    .quiz-hub__carousel > * {
        scroll-snap-align: start;
    }
    
    .quiz-hub__filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 500px) {
    .quiz-hub__grid-4 {
        grid-template-columns: 1fr;
    }
    .quiz-hub__grid-3,
    .quiz-hub__carousel {
        margin-right: -16px;
        padding-right: 16px;
    }
    .quiz-hub__stats-metrics {
        grid-template-columns: 1fr 1fr;
        display: grid;
    }
    .quiz-hub__metric-action {
        grid-column: 1 / -1;
        text-align: center;
        margin-top: 12px;
    }
}

/* ================================================================
   HUB DARK MODE OVERRIDES
   ================================================================ */
[data-theme="dark"] .quiz-hub__stats-panel,
[data-theme="dark"] .quiz-hub__featured-card {
    background: var(--bg-card, #1e1e1e);
    border-color: var(--border-light, #333);
}

[data-theme="dark"] .quiz-hub__featured-image,
[data-theme="dark"] .quiz-hub__pop-image {
    background: var(--bg-card-alt, #2a2a2a);
}

[data-theme="dark"] .quiz-hub__stats-user {
    border-color: var(--border-light, #333);
}

[data-theme="dark"] .quiz-hub__title,
[data-theme="dark"] .quiz-hub__subtitle,
[data-theme="dark"] .quiz-hub__user-name,
[data-theme="dark"] .quiz-hub__metric-val,
[data-theme="dark"] .quiz-hub__featured-title a,
[data-theme="dark"] .quiz-hub__theme-name,
[data-theme="dark"] .quiz-hub__pop-title,
[data-theme="dark"] .quiz-hub__btn-outline {
    color: var(--text-main, #fff);
}

[data-theme="dark"] .quiz-hub__desc,
[data-theme="dark"] .quiz-hub__user-msg,
[data-theme="dark"] .quiz-hub__metric-label,
[data-theme="dark"] .quiz-hub__featured-desc,
[data-theme="dark"] .quiz-hub__meta,
[data-theme="dark"] .quiz-hub__filter-btn {
    color: var(--text-secondary, #aaa);
}

[data-theme="dark"] .quiz-hub__btn-outline {
    border-color: var(--border-light, #444);
}

[data-theme="dark"] .quiz-hub__btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #666;
}

[data-theme="dark"] .quiz-hub__theme-chip:hover .quiz-hub__theme-icon {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .quiz-hub__theme-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

[data-theme="dark"] .quiz-hub__tag {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

[data-theme="dark"] .quiz-hub__badge {
    background: rgba(55, 48, 163, 0.3);
    color: #818cf8;
}

[data-theme="dark"] .quiz-hub__filters {
    border-color: var(--border-light, #333);
}

[data-theme="dark"] .quiz-hub__filter-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .quiz-hub__sort-select {
    color: var(--text-main, #fff);
    border-color: var(--border-light, #333);
}

@media (max-width: 900px) {
    [data-theme="dark"] .quiz-hub__stats-user {
        border-color: var(--border-light, #333);
    }
}

/* ================================================================
   TAXONOMY QUIZ SECTION (INTEGRATED)
   ================================================================ */
.taxonomy-quiz-section {
    margin-top: 32px;
    margin-bottom: 24px;
}

.taxonomy-quiz-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main, #111);
    margin: 0 0 5px 0;
}

[data-theme="dark"] .taxonomy-quiz-title {
    color: #fff;
}

.taxonomy-quiz-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.taxonomy-quiz-item {
    border-bottom: 1px solid var(--border-light, #f1f5f9);
}

[data-theme="dark"] .taxonomy-quiz-item {
    border-bottom-color: #333;
}

.taxonomy-quiz-item:last-child {
    border-bottom: none;
}

.taxonomy-quiz-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    text-decoration: none !important;
    transition: opacity 0.2s ease;
    gap: 16px;
}

.taxonomy-quiz-link:hover {
    opacity: 0.7;
}

.taxonomy-quiz-link .quiz-title-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-main, #111);
    line-height: 1.4;
}

[data-theme="dark"] .taxonomy-quiz-link .quiz-title-text {
    color: #fff;
}

.taxonomy-quiz-link .quiz-pill {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

[data-theme="dark"] .taxonomy-quiz-link .quiz-pill {
    background: #333;
    color: #aaa;
}

.taxonomy-quiz-expand-btn {
    display: inline-block;
    background: none;
    border: none;
    color: #1e3a8a;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 12px 0 0 0;
    text-align: left;
    text-decoration: none;
}

.taxonomy-quiz-expand-btn:hover {
    text-decoration: underline;
}

[data-theme="dark"] .taxonomy-quiz-expand-btn {
    color: #60a5fa;
}

/* ================================================================
   INLINE QUIZ EMBED (Article Enhancer)
   Transparent, borderless variant for in-article placement.
   ================================================================ */

.quiz-433--inline .quiz-433__card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
    box-shadow: none;
}

.quiz-433--inline .quiz-433__progress {
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-light, #eee);
}

.quiz-433--inline .quiz-433__result-card {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    flex-direction: column;
    gap: 24px;
}

.quiz-433--inline .quiz-433__result-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.quiz-433--inline .quiz-433__result-stats {
    padding-left: 0;
    border-left: none;
    padding-top: 16px;
    border-top: 1px solid var(--border-light, #eee);
    flex-direction: row;
    gap: 24px;
    flex-wrap: wrap;
}

/* Dark mode overrides for inline */
[data-theme="dark"] .quiz-433--inline .quiz-433__card,
[data-theme="dark"] .quiz-433--inline .quiz-433__result-card {
    background: transparent;
    border: none;
    box-shadow: none;
}

