/* ==========================================================================
   Fizz Quiz — single combined stylesheet (lightweight front-end)
   One request, system-font stack, above-the-fold-tuned for desktop.
   Structural class names match the shared quiz engine (do not rename).
   ========================================================================== */

/* === Tokens === */
:root {
    --brand: #0ea5e9;
    --brand-dark: #0284c7;
    --brand-light: #a9d9f2;
    --brand-bg: #e2f2fb;
    --accent: #0b2942;
    --accent-2: #38bdf8;
    --fizz-grad: linear-gradient(135deg, #0ea5e9 0%, #0b2942 100%);
    --fizz-grad-soft: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);

    /* Aliases used by shared engine / dynamic-css overrides */
    --color-primary: var(--brand);
    --color-primary-dark: var(--brand-dark);
    --color-primary-light: var(--brand-light);
    --color-primary-bg: var(--brand-bg);
    --color-success: #16c784;
    --color-success-bg: #e8faf3;
    --color-error: #ff4d6d;
    --color-error-bg: #ffedf0;
    --color-warning: #ffa62b;

    --color-bg: #eef6fb;
    --color-surface: #ffffff;
    --color-text: #0b2942;
    --color-text-muted: #6b6f80;
    --color-text-light: #9aa0b4;
    --color-border: #e9eaf2;
    --color-border-light: #f2f3f8;
    --color-header-bg: #ffffff;
    --color-footer-bg: #0b2942;

    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(22,22,46,.06), 0 1px 3px rgba(22,22,46,.05);
    --shadow-md: 0 4px 16px rgba(22,22,46,.08);
    --shadow-lg: 0 12px 34px rgba(22,22,46,.12);
    --shadow-brand: 0 8px 22px rgba(14,165,233,.32);

    --max-width: 1200px;
    --content-width: 760px;

    --transition-fast: .15s ease;
    --transition-normal: .28s cubic-bezier(.4,0,.2,1);

    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

    --space-xs: 4px;  --space-sm: 8px;  --space-md: 16px;
    --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px;

    --z-sticky: 200; --z-overlay: 300; --z-modal: 400;

    --header-h: 60px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font-family);
    font-size: 16px; line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--brand-dark); }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
h1,h2,h3,h4,h5,h6 { line-height: 1.25; font-weight: 800; color: var(--color-text); letter-spacing: -.01em; }
h1 { font-size: 2rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.2rem; } h4 { font-size: 1.05rem; }
p { margin-bottom: 1rem; }

/* === Utility === */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-center { text-align: center; } .text-muted { color: var(--color-text-muted); } .text-small { font-size: .875rem; }
.mt-sm{margin-top:var(--space-sm)} .mt-md{margin-top:var(--space-md)} .mt-lg{margin-top:var(--space-lg)} .mt-xl{margin-top:var(--space-xl)}
.mb-sm{margin-bottom:var(--space-sm)} .mb-md{margin-bottom:var(--space-md)} .mb-lg{margin-bottom:var(--space-lg)} .mb-xl{margin-bottom:var(--space-xl)}

/* === Header === */
.site-header {
    background: var(--color-header-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky; top: 0; z-index: var(--z-sticky);
    transition: box-shadow var(--transition-normal);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-md);
    height: var(--header-h); max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md);
}
.site-logo a { display: flex; align-items: center; gap: 6px; font-size: 1.35rem; font-weight: 900; letter-spacing: -.02em; }
.site-logo img { height: 34px; width: auto; }
.site-logo .fizz-mark {
    background: var(--fizz-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.site-logo .fizz-bubble { font-size: 1.15rem; }
.header-right { display: flex; align-items: center; gap: var(--space-sm); }

.header-search { position: relative; }
.header-search input {
    width: 210px; padding: 8px 38px 8px 14px; border: 1px solid var(--color-border);
    border-radius: var(--radius-full); background: var(--color-bg); font-size: .9rem; transition: all var(--transition-fast);
}
.header-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-bg); width: 250px; }
.header-search button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); display: flex; }

.menu-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-sm); transition: background var(--transition-fast); }
.menu-toggle:hover { background: var(--color-bg); }
.menu-toggle svg { width: 24px; height: 24px; stroke: var(--color-text); fill: none; stroke-width: 2; stroke-linecap: round; }

/* Leaderboard bar (header ad) — prominent, above the fold on desktop */
.leaderboard-bar { display: flex; justify-content: center; padding: var(--space-sm) var(--space-md) 0; background: var(--color-bg); }

/* === Sidebar / off-canvas nav === */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(22,22,46,.45); z-index: var(--z-overlay); opacity: 0; transition: opacity var(--transition-normal); }
.sidebar-overlay.active { display: block; opacity: 1; }
.sidebar-nav { position: fixed; top: 0; right: -340px; width: 320px; max-width: 86vw; height: 100%; background: var(--color-surface); z-index: var(--z-modal); overflow-y: auto; transition: right var(--transition-normal); box-shadow: var(--shadow-lg); }
.sidebar-nav.active { right: 0; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--color-border); }
.sidebar-header strong { font-size: 1.1rem; font-weight: 900; }
.sidebar-close { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); transition: background var(--transition-fast); }
.sidebar-close:hover { background: var(--color-bg); }
.sidebar-body { padding: var(--space-md) 0; }
.sidebar-section-title { padding: var(--space-sm) var(--space-lg); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-light); }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 11px var(--space-lg); color: var(--color-text); font-size: .95rem; font-weight: 500; transition: all var(--transition-fast); }
.sidebar-link:hover { background: var(--brand-bg); color: var(--brand-dark); }
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }

/* === Main / page grid === */
main { padding-top: var(--space-lg); min-height: 60vh; }
.page-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); max-width: var(--max-width); margin: var(--space-md) auto var(--space-2xl); padding: 0 var(--space-md); }
.page-grid.with-sidebar { grid-template-columns: minmax(0,1fr) 320px; align-items: start; }
.main-content { min-width: 0; }
.sidebar-content { display: flex; flex-direction: column; gap: var(--space-lg); position: sticky; top: calc(var(--header-h) + var(--space-md)); }

/* === Footer === */
.site-footer { background: var(--color-footer-bg); color: #c9cbd6; padding: var(--space-3xl) 0 var(--space-xl); margin-top: var(--space-3xl); }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); text-align: center; }
.footer-logo { margin-bottom: var(--space-lg); font-size: 1.5rem; font-weight: 900; }
.footer-logo img { height: 34px; margin: 0 auto; filter: brightness(0) invert(1); }
.footer-logo .fizz-mark { background: var(--fizz-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-search { max-width: 400px; margin: 0 auto var(--space-xl); position: relative; }
.footer-search input { width: 100%; padding: 12px 48px 12px 20px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius-full); background: rgba(255,255,255,.08); color: #fff; font-size: .95rem; }
.footer-search input::placeholder { color: #9aa0b4; }
.footer-search input:focus { outline: none; border-color: var(--brand-light); background: rgba(255,255,255,.14); }
.footer-search button { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #9aa0b4; display: flex; }
.footer-social { display: flex; justify-content: center; gap: var(--space-md); margin-bottom: var(--space-xl); }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-full); background: rgba(255,255,255,.1); color: #c9cbd6; transition: all var(--transition-fast); }
.footer-social a:hover { background: var(--fizz-grad); color: #fff; transform: translateY(-2px); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-sm) var(--space-lg); margin-bottom: var(--space-xl); }
.footer-links a { color: #c9cbd6; font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.footer-copyright { font-size: .85rem; color: #7c8095; }

/* === Section headings === */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-lg); }
.section-title { font-size: 1.4rem; font-weight: 800; }
.section-link { font-size: .9rem; font-weight: 600; color: var(--brand); }

/* === Buttons === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: var(--radius-full); font-weight: 700; font-size: .95rem; line-height: 1; transition: all var(--transition-fast); white-space: nowrap; }
.btn-primary { background: var(--fizz-grad); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(123,92,255,.4); }
.btn-outline { background: var(--color-surface); color: var(--brand-dark); border: 2px solid var(--brand-light); }
.btn-outline:hover { border-color: var(--brand); background: var(--brand-bg); color: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--color-text-muted); }
.btn-ghost:hover { background: var(--color-bg); color: var(--color-text); }
.btn-sm { padding: 9px 16px; font-size: .875rem; }
.btn-lg { padding: 15px 32px; font-size: 1.05rem; }

/* === Cards === */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--space-lg); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; transition: transform var(--transition-normal), box-shadow var(--transition-normal); display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-image { position: relative; display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--color-border-light); }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-normal); }
.card:hover .card-image img { transform: scale(1.06); }
.card-badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: var(--radius-full); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #fff; backdrop-filter: blur(4px); }
.card-badge.personality { background: var(--accent); }
.card-badge.trivia { background: var(--brand); }
.card-badge.article { background: var(--accent-2); color: #06333b; }
.card-badge.game { background: var(--color-warning); }
.card-body { padding: 14px 16px 18px; flex: 1; }
.card-title { font-size: 1rem; font-weight: 700; line-height: 1.35; }
.card-title a { color: var(--color-text); }
.card-title a:hover { color: var(--brand); }
.card-description { margin-top: 6px; font-size: .85rem; color: var(--color-text-muted); margin-bottom: 0; }

/* Category pills */
.category-scroll { display: flex; gap: var(--space-md); overflow-x: auto; padding: 4px 2px 12px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.category-pill { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 auto; width: 92px; text-align: center; }
.category-pill img, .category-pill > div { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-sm); border: 3px solid #fff; outline: 2px solid var(--brand-bg); transition: transform var(--transition-fast); }
.category-pill:hover img, .category-pill:hover > div { transform: scale(1.08); outline-color: var(--brand-light); }
.category-pill span { font-size: .8rem; font-weight: 600; color: var(--color-text); }

/* Load more */
.load-more-wrap { display: flex; justify-content: center; margin-top: var(--space-xl); }
.load-more-btn { position: relative; }
.load-more-btn .spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.load-more-btn.loading span { visibility: hidden; }
.load-more-btn.loading .spinner { display: block; position: absolute; left: 50%; top: 50%; margin: -9px 0 0 -9px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* === Ad slots (placeholders until live codes go in) === */
.ad-slot { display: flex; align-items: center; justify-content: center; }
.ad-slot-header { flex: 1; max-width: 728px; margin: 0 auto; }
.ad-slot-video { margin: var(--space-md) 0; overflow: hidden; max-width: 100%; }
.ad-slot-below-feature { margin: var(--space-md) 0; }
.carousel-ad-slot { margin: var(--space-lg) 0; display: flex; justify-content: center; }
.sidebar-content .ad-slot { margin: 0; }

/* Placeholder boxes — visible, correctly sized, so layout & above-fold are real */
.ad-ph { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border: 1.5px dashed var(--brand-light); border-radius: var(--radius-md);
    background: repeating-linear-gradient(45deg, #faf9ff, #faf9ff 12px, #f3f0ff 12px, #f3f0ff 24px);
    color: var(--brand); font-weight: 700; font-size: .8rem; letter-spacing: .02em; text-align: center; }
.ad-ph small { color: var(--color-text-light); font-weight: 600; font-size: .68rem; }
.ad-ph-leaderboard { height: 90px; max-width: 728px; }
.ad-ph-video { aspect-ratio: 16/9; max-width: 640px; margin: 0 auto; }
.ad-ph-box { aspect-ratio: 300/250; width: 300px; max-width: 100%; }
.ad-ph-halfpage { aspect-ratio: 300/600; width: 300px; max-width: 100%; }
.ad-ph-inline { height: 100px; max-width: 468px; }

/* === Quiz: progress bar === */
.quiz-progress { position: sticky; top: var(--header-h); z-index: calc(var(--z-sticky) - 1); background: var(--color-bg); padding: 10px 0; }
.progress-bar-wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); display: flex; align-items: center; gap: 12px; }
.progress-bar-track { flex: 1; height: 8px; background: var(--color-border); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar-fill { height: 100%; width: 0; background: var(--fizz-grad); border-radius: var(--radius-full); transition: width .4s ease; }
.progress-text { font-size: .82rem; font-weight: 700; color: var(--color-text-muted); white-space: nowrap; }

/* Quiz header + feature */
.quiz-header { margin-bottom: var(--space-md); }
.quiz-title { font-size: 1.7rem; line-height: 1.2; margin-bottom: 8px; }
.quiz-meta { display: flex; flex-wrap: wrap; gap: var(--space-md); color: var(--color-text-muted); font-size: .85rem; }
.quiz-meta-item { display: inline-flex; align-items: center; gap: 6px; }
.quiz-meta-item svg { color: var(--brand); }
.quiz-feature-image { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); margin-bottom: var(--space-md); }
.quiz-feature-image img { width: 100%; }
.quiz-about { color: var(--color-text-muted); font-size: .98rem; margin-bottom: var(--space-lg); }

/* Resume banner */
.resume-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-md); background: var(--brand-bg); border: 1px solid var(--brand-light); border-radius: var(--radius-md); padding: 14px 18px; margin-bottom: var(--space-lg); }
.resume-text { font-weight: 600; color: var(--brand-dark); }
.resume-actions { display: flex; gap: var(--space-sm); }

/* === Questions === */
.questions-container { display: flex; flex-direction: column; gap: var(--space-lg); }
.question-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-sm); position: relative; transition: opacity .35s ease, box-shadow .3s ease, border-color .3s ease; }
/* Dim upcoming questions with opacity only — no filter (filter re-rasterizes the
   image on removal, which looked like the image reloading). */
.question-card.upcoming { opacity: .5; }
.question-card.active { border-color: var(--brand-light); box-shadow: var(--shadow-md); }
.question-number { position: absolute; top: -14px; left: 20px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: var(--fizz-grad); color: #fff; font-weight: 800; font-size: .9rem; border-radius: 50%; box-shadow: var(--shadow-brand); }
.question-text { font-size: 1.15rem; font-weight: 700; margin: 8px 0 var(--space-md); line-height: 1.35; }
.question-image { border-radius: var(--radius-md); overflow: hidden; margin-bottom: var(--space-md); }
.question-image img { width: 100%; max-height: 340px; object-fit: cover; }

.options-list { display: grid; gap: 10px; }
.option-btn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; background: var(--color-surface); border: 2px solid var(--color-border); border-radius: var(--radius-md); font-size: .98rem; font-weight: 600; transition: all var(--transition-fast); }
.option-btn:not(:disabled):hover { border-color: var(--brand); background: var(--brand-bg); transform: translateY(-1px); }
.option-letter { flex-shrink: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: var(--color-bg); border-radius: 50%; font-weight: 800; font-size: .85rem; color: var(--color-text-muted); transition: all var(--transition-fast); }
.option-btn:not(:disabled):hover .option-letter { background: var(--brand); color: #fff; }
.option-text { flex: 1; }
.option-icon { flex-shrink: 0; display: flex; align-items: center; }
.option-btn.answered { cursor: default; }
.option-btn.dimmed { opacity: .5; }
.option-btn.selected { border-color: var(--brand); background: var(--brand-bg); }
.option-btn.selected .option-letter { background: var(--brand); color: #fff; }
.option-btn.correct { border-color: var(--color-success); background: var(--color-success-bg); color: #0b7a55; }
.option-btn.correct .option-letter { background: var(--color-success); color: #fff; }
.option-btn.correct .option-icon { color: var(--color-success); }
.option-btn.wrong { border-color: var(--color-error); background: var(--color-error-bg); color: #b3183a; }
.option-btn.wrong .option-letter { background: var(--color-error); color: #fff; }
.option-btn.wrong .option-icon { color: var(--color-error); }

.answer-feedback { display: none; margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600; }
.answer-feedback.show { display: block; animation: fadeSlideUp .3s ease; }
.answer-feedback.correct { background: var(--color-success-bg); color: #0b7a55; }
.answer-feedback.wrong { background: var(--color-error-bg); color: #b3183a; }

/* Carousel */
.question-card.upcoming, .question-card.answered { }
.carousel-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-top: var(--space-lg); }
.carousel-counter { font-weight: 700; color: var(--color-text-muted); }
.carousel-next-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--space-lg); padding: 13px 26px; background: var(--fizz-grad); color: #fff; font-weight: 700; border-radius: var(--radius-full); box-shadow: var(--shadow-brand); transition: all var(--transition-fast); }
.carousel-next-btn:hover { transform: translateY(-2px); }
/* When display mode is carousel, only the active card shows */
body[data-display-mode^="carousel"] .questions-container .question-card { display: none; }
body[data-display-mode^="carousel"] .questions-container .question-card.carousel-active { display: block; }

/* End quiz */
.end-quiz-wrap { display: none; justify-content: center; margin-top: var(--space-xl); }
.end-quiz-wrap.show { display: flex; animation: fadeSlideUp .4s ease; }

/* === Results (trivia) === */
.quiz-result { display: none; text-align: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-2xl) var(--space-lg); margin-top: var(--space-xl); box-shadow: var(--shadow-md); }
.quiz-result.show { display: block; animation: popIn .4s ease; }
.result-score-circle { width: 150px; height: 150px; border-radius: 50%; margin: 0 auto var(--space-lg); display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--brand) 0deg, var(--color-border-light) 0deg); transition: background 1s ease; }
.result-score-inner { width: 118px; height: 118px; border-radius: 50%; background: var(--color-surface); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.result-score-number { font-size: 2.4rem; font-weight: 900; line-height: 1; color: var(--brand-dark); }
.result-score-label { font-size: .78rem; color: var(--color-text-muted); }
.result-title { font-size: 1.6rem; margin-bottom: 6px; }
.result-description { color: var(--color-text-muted); margin-bottom: var(--space-lg); }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-sm); }

/* Results (personality) */
.personality-result { display: none; text-align: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-2xl) var(--space-lg); margin-top: var(--space-xl); box-shadow: var(--shadow-md); }
.personality-result.show { display: block; animation: popIn .4s ease; }
.personality-result-label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: var(--space-sm); }
.personality-result-image { max-width: 280px; width: 100%; margin: 0 auto var(--space-lg); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.personality-result-title { font-size: 1.8rem; margin-bottom: 8px; background: var(--fizz-grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.personality-result-desc { color: var(--color-text-muted); max-width: 560px; margin: 0 auto var(--space-lg); }

/* Share */
.result-share { display: flex; gap: 10px; margin: 0 8px 0 0; }
.share-btn { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; transition: transform var(--transition-fast), filter var(--transition-fast); }
.share-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.share-btn.facebook { background: #1877f2; } .share-btn.twitter { background: #14171a; }
.share-btn.reddit { background: #ff4500; } .share-btn.email { background: var(--color-text-muted); } .share-btn.copy { background: var(--brand); }

/* Answer review */
.answer-review { display: none; margin-top: var(--space-lg); text-align: left; }
.answer-review.show { display: block; }

/* Quiz article */
.quiz-article { border-top: 1px solid var(--color-border); padding-top: var(--space-lg); }
.quiz-article h2 { margin-bottom: var(--space-md); }
.quiz-article-image { border-radius: var(--radius-md); overflow: hidden; margin-bottom: var(--space-md); }

/* === Sidebar widgets === */
.quotes-section { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-lg); }
.quotes-section h3 { margin-bottom: var(--space-md); font-size: 1.05rem; }
.quote-item { padding: 10px 0; border-bottom: 1px dashed var(--color-border); font-size: .9rem; color: var(--color-text-muted); font-style: italic; }
.quote-item:last-child { border-bottom: none; }
.sidebar-quiz-list { display: flex; flex-direction: column; gap: 12px; }
.sidebar-quiz-item { display: flex; gap: 12px; align-items: center; }
.sidebar-quiz-thumb { flex: 0 0 72px; width: 72px; height: 56px; border-radius: var(--radius-sm); overflow: hidden; }
.sidebar-quiz-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-quiz-title { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.sidebar-quiz-title a { color: var(--color-text); }
.sidebar-quiz-title a:hover { color: var(--brand); }

/* === Home hero === */
.home-hero { text-align: center; padding: var(--space-xl) var(--space-md) var(--space-lg); }
.home-hero h1 { font-size: 2.4rem; margin-bottom: 10px; }
.home-hero h1 .fizz-mark { background: var(--fizz-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-hero p { color: var(--color-text-muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

/* === Author card === */
.author-card { display: flex; align-items: center; gap: var(--space-md); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-sm); }
.author-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; outline: 2px solid var(--brand-bg); }
.author-avatar-fallback { display: flex; align-items: center; justify-content: center; font-size: 1.8rem; background: var(--brand-bg); }
.author-name { font-size: 1.25rem; font-weight: 800; }
.author-label { color: var(--color-text-muted); font-size: .9rem; }

/* === Search page form === */
.search-page-form { display: flex; gap: var(--space-sm); max-width: 520px; margin-top: var(--space-md); }
.search-page-form input { flex: 1; padding: 12px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-full); font-size: 1rem; background: var(--color-surface); }
.search-page-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-bg); }

/* === Category grid (all-categories page) === */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--space-lg); }
.category-grid .category-pill { width: 100%; }

/* === Static / legal pages === */
.static-page { max-width: 800px; margin: 0 auto; padding: var(--space-lg) var(--space-md) var(--space-2xl); }

/* Prose card — polished, readable document styling. The page body supplies its
   own leading heading, so no separate page title is rendered. */
.prose {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(var(--space-lg), 3vw, var(--space-xl));
    color: #33384a;
    line-height: 1.7;
    font-size: 1rem;
}
.prose > :last-child { margin-bottom: 0; }
/* Collapse Apple-Pages empty spacer paragraphs — real element margins handle rhythm */
.prose p:empty, .prose p:has(> br:only-child) { display: none; }
.prose h2 {
    font-size: 1.25rem; font-weight: 800; color: var(--color-text);
    margin: 1.7em 0 .5em; padding-left: 13px; border-left: 4px solid var(--brand-light); line-height: 1.3;
}
.prose h2:first-of-type { margin-top: 0; font-size: 1.5rem; }
.prose h2 b, .prose h3 b, .prose h4 b { font-weight: inherit; }
.prose h3 { font-size: 1.05rem; font-weight: 700; color: var(--color-text); margin: 1.4em 0 .4em; }
.prose h4 { font-size: 1rem; font-weight: 700; margin: 1.2em 0 .35em; }
.prose p { margin: 0 0 .9em; }
.prose a { color: var(--brand-dark); font-weight: 600; text-decoration: underline; text-decoration-color: var(--brand-light); text-underline-offset: 2px; word-break: break-word; }
.prose a:hover { text-decoration-color: var(--brand-dark); }
.prose b, .prose strong { font-weight: 700; color: var(--color-text); }
.prose ul, .prose ol { margin: 0 0 .9em; padding-left: 1.5em; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--brand); }
.prose hr { border: 0; height: 1px; background: var(--color-border); margin: 1.3em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 .9em; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--color-border); padding: 8px 12px; text-align: left; }
@media (max-width: 560px) { .prose { line-height: 1.65; } .prose h2:first-of-type { font-size: 1.35rem; } }

/* Empty / 404 */
.empty-state { text-align: center; padding: var(--space-3xl) var(--space-md); }
.empty-state h1 { font-size: 3rem; margin-bottom: var(--space-sm); }
.empty-state p { color: var(--color-text-muted); margin-bottom: var(--space-lg); }

/* === Animations === */
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes carouselFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes carouselFadeOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }
.slide-in-right { animation: slideInRight .3s ease; } .slide-in-left { animation: slideInLeft .3s ease; }
.slide-out-left { animation: slideOutLeft .25s ease forwards; } .slide-out-right { animation: slideOutRight .25s ease forwards; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes slideOutLeft { to { opacity: 0; transform: translateX(-40px); } }
@keyframes slideOutRight { to { opacity: 0; transform: translateX(40px); } }
.card-stagger { animation: fadeSlideUp .4s ease backwards; }

/* === Responsive === */
@media (max-width: 980px) {
    .page-grid.with-sidebar { grid-template-columns: 1fr; }
    .sidebar-content { position: static; flex-direction: row; flex-wrap: wrap; }
    .sidebar-content > * { flex: 1 1 300px; }
    .card-grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
    h1 { font-size: 1.7rem; } .quiz-title { font-size: 1.4rem; }
    .home-hero h1 { font-size: 1.9rem; }
    .header-search { display: none; }
    .card-grid, .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
    .sidebar-content { flex-direction: column; }
    .result-actions { flex-direction: column; }
    .result-share { margin: 0 0 var(--space-sm); }
    .ad-ph-halfpage { aspect-ratio: 300/250; }
}
@media (max-width: 440px) {
    .card-grid, .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
/* ===== Yeti home — icy glass (.yeti-* scoped) ===== */
.yeti-hero { position:relative; overflow:hidden; padding:56px 0 66px; text-align:center; background:linear-gradient(160deg,#7dd3fc 0%,#38bdf8 42%,#0284c7 100%); color:#fff; margin-top: calc(var(--space-lg) * -1); }
.yeti-hero:before { content:""; position:absolute; inset:0; background:radial-gradient(1200px 380px at 50% -120px, rgba(255,255,255,.55), transparent 70%); }
.yeti-in { position:relative; z-index:2; }
.yeti-mascot { font-size:3.1rem; display:inline-block; margin-bottom:6px; filter:drop-shadow(0 8px 14px rgba(6,40,66,.35)); }
.yeti-hero h1 { font-size:clamp(2.3rem,5.4vw,3.7rem); color:#fff; text-shadow:0 3px 20px rgba(6,40,66,.28); }
.yeti-hero-sub { color:#eaf7ff; font-size:1.12rem; margin:15px auto 24px; max-width:520px; }
.yeti-search { background:rgba(255,255,255,.62); backdrop-filter:blur(14px); border:1px solid rgba(255,255,255,.75); border-radius:var(--radius-full); padding:6px 6px 6px 18px; display:flex; max-width:480px; margin:0 auto; box-shadow:0 18px 40px rgba(6,40,66,.28); }
.yeti-search input[type=text]{ flex:1; border:0; outline:0; background:none; font-size:1rem; color:var(--color-text); min-width:0; }
.yeti-search button{ background:var(--color-text); color:#fff; border:0; border-radius:var(--radius-full); padding:12px 24px; font-weight:800; font-size:.92rem; white-space:nowrap; cursor:pointer; }
.yeti-flake{ position:absolute; color:#fff; opacity:.85; z-index:1; text-shadow:0 2px 6px rgba(6,40,66,.2); pointer-events:none; }
.yeti-flake.f1{ top:18%; left:10%; font-size:1.1rem; } .yeti-flake.f2{ top:60%; left:20%; font-size:.8rem; } .yeti-flake.f3{ top:26%; right:12%; font-size:1.4rem; } .yeti-flake.f4{ top:66%; right:22%; font-size:.9rem; } .yeti-flake.f5{ top:12%; left:46%; font-size:.7rem; }
.yeti-sec{ margin-top:40px; }
.yeti-sh{ display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.yeti-sh h2{ font-size:1.5rem; font-weight:900; letter-spacing:-.02em; }
.yeti-sh .ic{ font-size:1.35rem; }
.yeti-chips{ display:flex; gap:10px; flex-wrap:wrap; }
.yeti-chip{ background:#fff; border:1px solid var(--color-border); border-radius:var(--radius-full); padding:9px 17px; font-weight:800; font-size:.9rem; color:var(--brand-dark); box-shadow:0 2px 8px rgba(6,40,66,.06); }
@media(max-width:560px){ .yeti-chips{ flex-wrap:nowrap; overflow-x:auto; padding-bottom:6px; } .yeti-chip{ flex:0 0 auto; } }
