/* web/css/main.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Core Brand */
    --color-brand-red: #E63946;
    /* The Swicko Red */
    --color-brand-red-hover: #D62828;

    /* Bento Box Palette */
    --color-kitchen: #6B8E6F;
    --color-pantry: #5B7C99;
    --color-dining: #C17C5B;
    --color-hydration: #4A9B9B;

    /* Light Mode Neutrals */
    --color-bg: #F8FAFC;
    --color-paper: #FFFFFF;
    --color-text: #0F172A;
    --color-text-light: #334155;
    /* Darkened for WCAG AAA */
    --color-text-faint: #64748B;
    /* Darkened from 94A3B8 to meet AA at least */
    --color-border: #E2E8F0;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-bento: 24px;
    --radius-sm: 12px;
}

:root[data-theme='dark'] {
    /* Dark Mode Neutrals */
    --color-bg: #121A2F;
    /* Deep app dark */
    --color-paper: #111827;
    --color-text: #F8FAFC;
    --color-text-light: #CBD5E1;
    /* Lightened from 94A3B8 for better contrast */
    --color-text-faint: #94A3B8;
    /* Lightened from 475569 for better contrast */
    --color-border: #1E293B;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.1s ease;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1.125rem;
    /* 18px base for seniors */
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

/* ─── SCROLL BEHAVIOR ─── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Offset for sticky header */
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--color-text);
}

a {
    color: var(--color-pantry);
    text-decoration: underline;
    text-decoration-color: rgba(91, 124, 153, 0.4);
    text-underline-offset: 3px;
}

/* ─── SITE HEADER ─── */
.site-header {
    background: var(--color-paper);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 16px;
    min-height: 60px;
}

/* Logo: never shrinks, always left */
.site-logo {
    flex-shrink: 0;
}

/* Nav wrapper: fills remaining space, aligns items to the right */
.header-container nav {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 1;
    min-width: 0;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Senior-friendly nav link sizing */
.desktop-nav a {
    font-size: 1.05rem;
    font-weight: 700;
    padding: 8px 12px;
}

/* ── Hamburger Menu ── */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    padding: 8px;
    margin-left: 12px;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger-btn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hamburger-btn.open span {
    background: var(--color-brand-red);
}

.mobile-nav-drawer {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-paper);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    z-index: 999;
    padding: 0.5rem 0 1rem;
    animation: navSlideDown 0.22s ease;
}

.mobile-nav-drawer.open {
    display: flex;
}

.mobile-nav-drawer a {
    display: block;
    padding: 0.9rem 1.75rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
}

.mobile-nav-drawer a:last-child {
    border-bottom: none;
}

.mobile-nav-drawer a:hover {
    background: var(--color-bg);
}

/* ── Dark Mode: Hamburger & Mobile Nav ── */
:root[data-theme='dark'] .hamburger-btn {
    border-color: var(--color-text-faint);
    background: rgba(248, 250, 252, 0.05);
}

:root[data-theme='dark'] .hamburger-btn span {
    background: var(--color-text);
}

:root[data-theme='dark'] .hamburger-btn.open span {
    background: var(--color-brand-red);
}

:root[data-theme='dark'] .mobile-nav-drawer {
    background: var(--color-paper);
    border-color: var(--color-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

:root[data-theme='dark'] .mobile-nav-drawer a {
    color: var(--color-text);
    border-color: var(--color-border);
}

:root[data-theme='dark'] .mobile-nav-drawer a:hover {
    background: rgba(248, 250, 252, 0.05);
}

@keyframes navSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .hamburger-btn {
        display: flex;
    }

    .desktop-nav {
        display: none;
    }
}

/* Force hide mobile drawer and hamburger button on desktop even if they have .open classes */
@media (min-width: 901px) {
    .mobile-nav-drawer {
        display: none !important;
    }

    .hamburger-btn {
        display: none !important;
    }

    .desktop-nav {
        display: flex !important;
    }
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-brand-red);
    text-decoration: none;
    letter-spacing: -0.03em;
    flex-shrink: 0;
    white-space: nowrap;
}

.site-logo img {
    height: 40px;
    border-radius: 8px;
}

.theme-toggle {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--color-text);
    transition: transform 0.2s, background-color 0.3s, color 0.1s;
    margin-right: 1rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--color-paper);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* header-container nav rules are defined above in the header section */

/* ─── MAIN CONTENT ─── */
.content-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
    padding: 24px 0 0;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-text-faint);
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a {
    color: var(--color-pantry);
    text-decoration: none;
}

/* ─── ARTICLE HEADER ─── */
.article-header {
    padding: 32px 0 32px;
    border-bottom: 1px solid var(--color-border);
}

.article-kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-brand-red);
    margin-bottom: 16px;
    font-weight: 600;
}

h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.article-deck {
    font-size: 1.25rem;
    color: var(--color-text-light);
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 32px;
}

.byline-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-brand-red);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 18px;
}

.byline-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.byline-name {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
}

.byline-creds {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-text-light);
}

.byline-dates {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-text-faint);
    margin-left: auto;
    text-align: right;
    line-height: 1.8;
}

.fresh-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(230, 57, 70, 0.1);
    color: var(--color-brand-red);
    border: 1px solid rgba(230, 57, 70, 0.2);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* ─── ARTICLE BODY ─── */
.article-body {
    padding-top: 36px;
}

.article-body p {
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.8rem;
    margin: 3rem 0 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

h3 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
}

/* ─── ANSWER HIGHLIGHT (AEO) ─── */
.answer-highlight {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-brand-red);
    padding: 24px;
    margin-bottom: 2rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.answer-highlight p {
    margin: 0;
    font-size: 1.15rem;
    color: var(--color-text);
    font-weight: 500;
}

.answer-highlight-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-brand-red);
    margin-bottom: 12px;
    display: block;
    font-weight: 600;
}

/* ─── DEFINITION BOX ─── */
.definition-box {
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-pantry);
    padding: 24px;
    margin: 2rem 0;
    background: var(--color-paper);
    border-radius: var(--radius-sm);
}

.definition-term {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.definition-text {
    font-size: 1rem;
    color: var(--color-text-light);
    margin: 0 !important;
}

/* ─── THE SCANNER TOOL EMBED (The Hook) ─── */
.tool-embed {
    background: var(--color-paper);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-bento);
    padding: 32px;
    margin: 3rem 0;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.tool-embed:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border-color: rgba(230, 57, 70, 0.3);
}

.tool-embed img.mascot {
    height: 120px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.tool-embed h3 {
    font-size: 1.8rem;
    color: var(--color-brand-red);
    margin-top: 0;
    margin-bottom: 12px;
    border: none;
    padding: 0;
}

.tool-embed p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    font-family: var(--font-heading);
    border-radius: var(--radius-sm);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    min-height: 56px;
    /* Senior friendly */
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--color-brand-red);
    color: white !important;
}

.btn-primary:hover {
    background-color: var(--color-brand-red-hover);
}

.btn-secondary {
    background-color: var(--color-pantry);
    color: white;
    /* Removed !important to allow context-aware overrides */
}



/* ─── FAQ SECTION ─── */
.faq-section {
    margin: 2.5rem 0;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.faq-header {
    background: var(--color-bg);
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
}

.faq-title {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-light);
    font-weight: 500;
}

details {
    border-bottom: 1px solid var(--color-border);
}

details:last-child {
    border-bottom: none;
}

summary {
    padding: 18px 24px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    min-height: 60px;
    /* Senior-friendly tap target */
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-light);
    /* Dark grey, not red — avoids danger signal */
    flex-shrink: 0;
    margin-left: 12px;
}

details[open] summary::after {
    content: '−';
}

.faq-answer {
    padding: 0 24px 20px 24px;
    font-size: 1rem;
    color: var(--color-text-light);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge.warning {
    background-color: rgba(230, 57, 70, 0.1);
    color: var(--color-brand-red);
    border: 1px solid rgba(230, 57, 70, 0.2);
}

:root[data-theme='dark'] .badge.warning {
    background-color: rgba(230, 57, 70, 0.2);
    border-color: rgba(230, 57, 70, 0.4);
}

.banner-warning {
    background: #FFFBEB;
    border: 2px solid #FCD34D;
    color: #B45309;
}

:root[data-theme='dark'] .banner-warning {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #FBBF24;
}

footer {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--color-text-faint);
    font-size: 0.85rem;
    border-top: 1px solid var(--color-border);
    margin-top: 4rem;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 15px;
    line-height: 1.4;
    white-space: normal;
}

.footer-content .separator {
    color: var(--color-border);
    user-select: none;
}

.footer-content a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-content a:hover {
    color: var(--color-brand-red);
    text-decoration: underline;
}

/* ─── GATE OVERLAY ─── */
/* Fixed full-screen backdrop that SCROLLS so modal content is never cut off */
.gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    /* Center vertically — modal is now compact enough */
    justify-content: center;
    overflow-y: auto;
    padding: 16px;
}

.gate-modal {
    background: var(--color-paper);
    border-radius: var(--radius-bento);
    padding: 20px 20px 24px;
    /* Reduced from 32px */
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.gate-mascot {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    /* Rounded square for the app icon */
    object-fit: cover;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.25);
    animation: mascotHeartbeat 3s infinite ease-in-out;
}

@keyframes mascotHeartbeat {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.gate-modal h2 {
    font-size: 1.4rem;
    /* Reduced from 1.8rem */
    margin-bottom: 0.5rem;
    border: none;
    padding: 0;
}

.gate-modal>p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    /* Smaller body text */
    margin-bottom: 1rem;
    line-height: 1.5;
}

.bundle-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1rem;
}

.bundle-options .btn {
    width: 100%;
    min-height: 48px;
    /* Still senior-friendly */
    font-size: 1rem;
    padding: 0.7rem 1rem;
}



/* ─── SCANNER PAGE ─── */
.scanner-container {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-bento);
    overflow: hidden;
    margin: 0 auto;
    max-width: 600px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.scanner-container:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    border-color: rgba(230, 57, 70, 0.4);
}

#camera-preview {
    width: 100%;
    display: none;
    background: #000;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.scan-counter {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 99px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-light);
    margin-top: 1.5rem;
}

.scan-counter .count-val {
    color: var(--color-brand-red);
    font-family: var(--font-mono);
}

/* --- ACCESSIBILITY: HIGHER CONTRAST FOR PRINT/PDF --- */
@media print {

    :root,
    :root[data-theme='dark'] {
        --color-bg: #FFFFFF !important;
        --color-paper: #FFFFFF !important;
        --color-text: #0F172A !important;
        --color-text-light: #334155 !important;
        --color-text-faint: #64748B !important;
        --color-border: #CBD5E1 !important;
    }

    * {
        color: #0F172A !important;
        text-shadow: none !important;
        box-shadow: none !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .btn,
    .site-header,
    footer,
    .theme-toggle,
    .print-hide {
        display: none !important;
    }

    .nutrient-card {
        border: 2px solid #CBD5E1 !important;
        background: #FFFFFF !important;
    }

    .visual-unit-display,
    .mascot-row,
    .active-goals-wrap {
        background: #F8FAFC !important;
        border: 1px solid #E2E8F0 !important;
    }

    .visual-unit-emojis,
    .tab-emoji,
    .legend-emoji {
        filter: none !important;
    }
}

/* ─── PREMIUM ANIMATIONS ─── */
@keyframes shimmer {
    0% {
        left: -100%;
    }

    30% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

.premium-shimmer {
    position: relative;
    overflow: hidden;
}

.premium-shimmer::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.15),
            transparent);
    transform: skewX(-25deg);
    animation: shimmer 5s infinite cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* ─── GLOBAL BENTO SYSTEM ─── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.bento-card {
    background: var(--color-paper);
    border: 2.5px solid var(--color-border) !important;
    /* Deniable boxiness */
    border-radius: var(--radius-bento);
    padding: 3rem 2rem;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.bento-featured {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .bento-featured {
        grid-column: auto;
    }
}

.bento-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    border-color: var(--color-brand-red) !important;
}

/* Bento Card Variants */
.bento-card.primary {
    background: rgba(107, 142, 111, 0.08);
    border-top: 8px solid var(--color-kitchen) !important;
}

.bento-card.secondary {
    background: rgba(91, 124, 153, 0.08);
    border-top: 8px solid var(--color-pantry) !important;
}

/* ─── CHOICE & IMPACT SECTION ─── */
.impact-section {
    margin-top: 5rem;
    padding: 4rem 2rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: var(--radius-bento);
    border: 1px solid var(--color-border);
    text-align: center;
}

.impact-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.impact-choice {
    flex: 1;
    min-width: 260px;
    max-width: 320px;
    padding: 2rem;
    background: var(--color-paper);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-bento);
    cursor: pointer;
    transition: all 0.3s ease;
}

.impact-choice:hover {
    transform: translateY(-5px);
    border-color: var(--color-brand-red);
    box-shadow: var(--shadow-md);
}

.impact-choice.active {
    border-color: var(--color-brand-red);
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.15);
}

.impact-choice h4 {
    margin-top: 1rem;
    font-size: 1.2rem;
}



.mascot-bubble {
    margin-top: 2rem;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    border-radius: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    box-shadow: var(--shadow-sm);
}

:root[data-theme='dark'] .visual-units-strip {
    background: rgba(0, 0, 0, 0.2);
}

.visual-units-strip .label-block {
    background: #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--color-text-light);
    line-height: 1.4;
    text-align: left;
}

:root[data-theme='dark'] .visual-units-strip .label-block {
    background: rgba(255, 255, 255, 0.08);
}

.visual-units-strip .arrow {
    font-size: 1.1rem;
    color: var(--color-text-faint);
}

.visual-units-strip .units {
    font-size: 1.1rem;
    line-height: 1.5;
    text-align: left;
}


/* ─── CHOICE & IMPACT SECTION ─── */
.impact-section {
    margin-top: 5rem;
    padding: 4rem 2rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: var(--radius-bento);
    border: 1px solid var(--color-border);
    text-align: center;
}

.impact-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.impact-choice {
    flex: 1;
    min-width: 260px;
    max-width: 320px;
    padding: 2rem;
    background: var(--color-paper);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-bento);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.impact-choice:hover {
    transform: translateY(-5px);
    border-color: var(--color-brand-red);
    box-shadow: var(--shadow-md);
}

.impact-choice.active {
    border-color: var(--color-brand-red);
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.15);
}

.impact-choice img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    /* Ensures different aspect ratios don't break symmetry */
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.impact-choice h4 {
    margin-top: 1rem;
    font-size: 1.2rem;
}

/* The Animated Shield (Premium App Version) */
.shield-container {
    position: relative;
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.1));
}

.liquid-shield {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 10px solid rgba(255, 255, 255, 0.95);
    /* Clean frosted border */
    background: #fff;
    overflow: hidden;
    box-shadow:
        inset 0 4px 20px rgba(0, 0, 0, 0.06),
        0 10px 30px rgba(0, 0, 0, 0.05);
}

.liquid-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80%;
    /* Default level */
    background: linear-gradient(180deg, #4ECDC4, #3CB3AB);
    transition: height 1s cubic-bezier(0.4, 0, 0.2, 1), background 1s ease;
    box-shadow: inset 0 10px 20px rgba(255, 255, 255, 0.2);
    /* Internal liquid glow */
}

.shield-score {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 900;
    color: #0F172A;
    z-index: 20;
}

.mascot-bubble {
    margin-top: 2rem;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    border-radius: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
}

.mascot-bubble img {
    width: 60px;
    height: 60px;
}