/* ==========================================================================
   MODULES (Components)
   ========================================================================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn--primary {
    background-color: var(--color-primary);
    color: white;
}

.btn--primary:hover {
    background-color: var(--color-primary-dark);
    color: white;
    transform: translateY(-1px);
}

.btn--outline {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn--outline:hover {
    background-color: var(--color-bg-surface);
}

.btn--accent {
    background-color: var(--color-text-main);
    color: white;
}

.btn--accent:hover {
    background-color: var(--color-text-secondary);
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}


.margin-top-sm {
    margin-top: 1rem;
}

.text-primary {
    color: var(--world-primary);
}

.text-accent {
    color: var(--color-accent);
}

/* Header */
.header {
    height: var(--header-height);
    background-color: rgb(253, 247, 247);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-text-main);
    text-decoration: none;
    line-height: 1;
}

.header__logo:hover {
    color: var(--color-text-main);
}

.header__logo-icon {
    background: var(--color-primary);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 700;
}

/* Custom Logo Style for Non-World Pages (Home, Blog, About, etc.) */
html:not([data-world]) .header__logo-icon {
    background-color: var(--color-text-main);
    /* Deep Navy Blue */
    position: relative;
    /* Adjust for underline spacing */
    padding-bottom: 2px;
}

html:not([data-world]) .header__logo-icon::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 2px;
    background-color: var(--color-primary);
    /* Emerald Green */
    border-radius: 2px;
}

.header__logo-text span {
    color: var(--color-primary);
}

/* Navigation - Desktop */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 100%;
}

.nav__list {
    display: flex;
    gap: 2rem;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav__link {
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    display: inline-flex;
    align-items: center;
    height: var(--header-height);
    border-bottom: none;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.nav__link:hover,
.nav__link:focus {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: none;
}

.nav__link--active {
    color: var(--color-primary);
    font-weight: 600;
}

.nav__link--active::after {
    content: none !important;
}

.header__actions {
    display: flex;
    align-items: center;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    z-index: 2000;
    position: relative;
}

.nav-toggle__bar {
    width: 22px;
    height: 2px;
    background-color: var(--color-text-main);
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease,
        background-color 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Creative Mobile Navigation Overlay */
@media (max-width: 900px) {
    .nav {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 1500;
        padding: 4rem 2rem 2rem;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav__list {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        width: 100%;
        margin-bottom: 1rem;
    }

    .nav__link {
        font-size: 1.75rem;
        font-weight: 700;
        padding: 0.5rem 0;
        height: auto;
        border-bottom: none;
        color: var(--color-text-main);
        transform: translateY(20px);
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav.is-open .nav__link {
        transform: translateY(0);
        opacity: 1;
    }

    /* Staggered animation for menu items */
    .nav.is-open .nav__list li:nth-child(1) .nav__link {
        transition-delay: 0.1s;
    }

    .nav.is-open .nav__list li:nth-child(2) .nav__link {
        transition-delay: 0.15s;
    }

    .nav.is-open .nav__list li:nth-child(3) .nav__link {
        transition-delay: 0.2s;
    }

    .nav.is-open .nav__list li:nth-child(4) .nav__link {
        transition-delay: 0.25s;
    }

    .nav.is-open .nav__list li:nth-child(5) .nav__link {
        transition-delay: 0.3s;
    }

    .nav__link--active::after {
        bottom: 0;
        left: 50%;
        width: 40px;
        transform: translateX(-50%);
    }

    .header__actions {
        width: 100%;
        max-width: 300px;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        transition-delay: 0.4s;
    }

    .nav.is-open .header__actions {
        opacity: 1;
        transform: translateY(0);
    }

    .header__actions .btn {
        width: 100%;
        padding: 1.25rem;
        font-size: 1.125rem;
        border-radius: var(--radius-full);
        box-shadow: 0 10px 25px -10px var(--color-primary);
    }

    .nav-toggle {
        display: flex;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Card Component */
.card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

.card__image {
    height: 200px;
    background-color: var(--color-bg-surface);
    position: relative;
}

.card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card__category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.card__title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.card__title a {
    color: var(--color-text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.card__title a:hover {
    color: var(--color-primary);
}

.card__excerpt {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
    /* Push meta to bottom */
}

.card__meta {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

/* 
   Easter Egg Flip Component 
   (Founder Profile)
*/
/* 
   Easter Egg Flip Component 
   (Founder Profile - Circular)
*/
.founder-flip {
    width: 200px;
    height: 200px;
    perspective: 1000px;
    cursor: pointer;
    margin: 0 auto;
}

.founder-flip__inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    /* Circle */
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.founder-flip:hover .founder-flip__inner {
    transform: translateY(-5px);
    /* Subtle lift */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.founder-flip.is-flipped .founder-flip__inner {
    transform: rotateY(180deg);
}

.founder-flip__face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 50%;
    /* Circle */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Front Face: Minimal Blue Circle */
.founder-flip__front {
    background-color: var(--color-text-main);
    /* Dark Blue/Gray */
    color: white;
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Back Face: Image */
.founder-flip__back {
    background-color: white;
    transform: rotateY(180deg);
    border: 4px solid white;
}

.founder-flip__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}



/* ==========================================================================
   SEARCH COMPONENT (Premium)
   ========================================================================== */
.search-container {
    max-width: 600px;
    margin: 2rem auto 0;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3.5rem;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 99px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--world-soft-bg);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    transition: color 0.3s ease;
}

.search-input:focus+.search-icon {
    color: var(--color-primary);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-fade-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* ==========================================================================
   TOOL UI KIT (Layer-2)
   Standardized components for Intelligent Financial Explainers.
   ========================================================================== */

/* 1. Tool Hero */
.tool-hero {
    width: 100%;
    min-height: 40vh;
    padding: 6rem 1rem;
    background: linear-gradient(135deg, var(--world-primary-dark) 0%, var(--world-primary) 100%);
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tool-hero--index {
    min-height: 50vh;
    background: var(--color-text-main);
}

.tool-hero__title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    max-width: 800px;
}

.tool-hero__title--display {
    font-family: var(--font-display);
}

.tool-hero__subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    max-width: 600px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.tool-hero__subtitle--muted {
    color: #94a3b8;
    max-width: 700px;
}

.tool-badge--flagship {
    background: #ccfbf1;
    color: #0d9488;
}

.tool-badge--strategic {
    background: #fef3c7;
    color: #92400e;
}

.tool-badge--reality {
    background: #ede9fe;
    color: #5b21b6;
}

.tool-badge--fortune {
    background: #fef2f2;
    color: #b91c1c;
}

.tool-badge--essential {
    background: #e0f2fe;
    color: #0369a1;
}

.tool-badge--foundation {
    background: #fdf2f8;
    color: #9d174d;
}

.tool-badge--truth {
    background: #f0fdf4;
    color: #166534;
}

.tool-badge--behavioral {
    background: #f1f5f9;
    color: #475569;
}

/* 2. Tool Body & Layout */
.section {
    padding-bottom: 8rem;
}

.tool-body {
    max-width: var(--container-width);
    margin: -4rem auto 4rem;
    padding: 0 var(--space-4);
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    position: relative;
    z-index: 10;
}

@media (min-width: 992px) {
    .tool-body {
        grid-template-columns: 4fr 6fr;
        /* Inputs 40%, Results 60% */
        align-items: start;
    }
}

.tool-panel {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

/* 3. Input Components */
.tool-input-group {
    margin-bottom: 2.5rem;
}

.tool-input-group label {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text-main);
    margin-bottom: 1rem;
}

.tool-subtitle {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.display-block {
    display: block;
}

.tool-input-controls {
    display: flex;
    align-items: center;
    background: var(--color-bg-surface);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.tool-input-controls:focus-within {
    border-color: var(--world-primary);
    background: white;
    box-shadow: 0 0 0 4px var(--world-soft-bg);
}

.tool-input-field {
    border: none;
    background: transparent;
    width: 100%;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--world-primary);
    text-align: right;
    outline: none;
}

.tool-input-range {
    width: 100%;
    height: 8px;
    background: var(--color-border);
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
}

.tool-input-range::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: white;
    border: 3px solid var(--world-primary);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform 0.1s, box-shadow 0.1s;
}

.tool-input-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px var(--world-soft-bg);
}

.tool-hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* 4. Results Panel */
.tool-results {
    background: var(--world-soft-bg);
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    border: 1px solid var(--color-border);
}

.tool-result-main {
    margin-bottom: 3rem;
}

.tool-result-main .label {
    display: block;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.tool-result-main .value {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--color-text-main);
    line-height: 1;
}

.tool-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.tool-stat-item {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tool-stat-item .label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.tool-stat-item .value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-text-main);
}

/* 5. Insight Engine */
.tool-insights-section {
    max-width: var(--container-width);
    margin: 4rem auto;
    padding: 0 var(--space-4);
}

.tool-insight {
    background: white;
    border: 2px solid var(--world-primary);
    border-radius: 20px;
    padding: 2.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    line-height: 1.6;
}

.tool-insight::before {
    content: "💡";
    font-size: 2.5rem;
}

/* 6. Visual Explanation Zone */
.tool-explanation-visual {
    max-width: var(--container-width);
    margin: 4rem auto;
    padding: 0 var(--space-4);
    text-align: center;
}

.tool-explanation-visual h2 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
}

.tool-visual-container {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 7. Education Block */
.tool-education {
    max-width: 800px;
    margin: 6rem auto;
    padding: 0 var(--space-4);
}

.tool-education h2 {
    font-size: 2rem;
    font-family: var(--font-serif);
    margin-bottom: 2rem;
}

.tool-education h3 {
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--world-primary);
}

.tool-education p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

/* 8. Related Content CTA */
.tool-cta {
    max-width: var(--container-width);
    margin: 4rem auto 6rem;
    padding: 2rem var(--space-4);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.tool-cta a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--world-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    background: var(--world-soft-bg);
    transition: all 0.2s;
}

.tool-cta a:hover {
    background: var(--world-primary);
    color: white;
    transform: translateY(-2px);
}

/* 10. Tools Hub Premium Grid */
.tools-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: -3rem;
    position: relative;
    z-index: 100;
}

.tool-card-premium {
    background: white;
    border-radius: 24px;
    padding: 3rem 2.5rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.tool-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tool-card--world-1::before {
    background: #0D9488;
}

.tool-card--world-2::before {
    background: #F59E0B;
}

.tool-card--world-3::before {
    background: #8B5CF6;
}

.tool-card--world-4::before {
    background: #EF4444;
}

.tool-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -12px rgba(50, 50, 93, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.3);
    border-color: transparent;
}

.tool-card-premium:hover::before {
    opacity: 1;
}

.tool-card__icon-box {
    width: 64px;
    height: 64px;
    background: var(--color-bg-surface);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: var(--color-text-main);
    transition: all 0.3s;
}

.tool-card-premium:hover .tool-card__icon-box {
    background: var(--color-text-main);
    color: white;
}

.tool-card__title-premium {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--color-text-main);
    letter-spacing: -0.02em;
}

.tool-card__desc-premium {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    flex: 1;
}

.tool-card__badge-premium {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tool-card__cta-premium {
    font-weight: 800;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.tool-card-premium:hover .tool-card__cta-premium {
    gap: 1rem;
}

/* 11. Tool Toggle Container */
.tool-toggle-container {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.tool-toggle-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--world-primary);
}

/* 12. Net Worth Helper */
.net-worth-section {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1.5rem;
}

.net-worth-section h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
}

.net-worth-section.border-none {
    border-bottom: none;
    margin-bottom: 0;
}


/* 13. Scam Risk Checker */
.risk-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--color-bg-surface);
}

.risk-option:hover {
    border-color: var(--world-primary);
    background: white;
}

.risk-option.selected {
    border-color: var(--world-primary);
    background: var(--world-soft-bg);
    box-shadow: 0 0 0 2px var(--world-primary);
}

.risk-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.risk-option.selected .risk-checkbox {
    background: var(--world-primary);
    border-color: var(--world-primary);
}

.risk-option.selected .risk-checkbox::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.risk-text {
    font-weight: 600;
    color: var(--color-text-main);
}

#risk-meter {
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 2rem 0;
    position: relative;
}

#risk-fill {
    height: 100%;
    width: 0%;
    background: #10b981;
    transition: width 0.5s ease, background 0.5s ease;
}

#risk-fill {
    height: 100%;
    width: 0%;
    background: #10b981;
    transition: width 0.5s ease, background 0.5s ease;
}

/* 14. Separator Utility */
.separator-dashed {
    margin: 2rem 0;
    border: none;
    border-top: 1px dashed var(--color-border);
}

/* 15. Goal Planner Selector */
.goal-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.goal-btn {
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
    background: var(--color-bg-surface);
}

.goal-btn:hover {
    border-color: var(--world-primary);
}

.goal-btn.active {
    background: var(--world-primary);
    color: white;
    border-color: var(--world-primary);
}

/* 16. Footer Dark */
.footer-separator.footer-dark {
    background: #111827;
}

/* 9. Mobile Responsive Rules */
@media (max-width: 768px) {
    .tool-hero {
        padding: 4rem 1.5rem;
        min-height: auto;
    }

    .tool-body {
        margin-top: -2rem;
    }

    .tool-results {
        padding: 2rem 1.5rem;
    }

    .tool-result-main .value {
        font-size: 2.5rem;
    }

    .tool-insight {
        font-size: 1rem;
        padding: 1.5rem;
        gap: 1rem;
    }

    .tool-insight::before {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   MOBILE HEADER FIXES (Layer-1)
   ========================================================================== */

@media (max-width: 768px) {

    /* 1. Lock header height */
    .header {
        height: 64px;
    }

    /* 2. Fix inner layout */
    .header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 100%;
        padding: 0 1rem;
    }

    /* 3. Hard fix hamburger position */
    .nav-toggle {
        position: relative;
        top: 0;
        right: 0;
        margin: 0;
        padding: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        /* Tap-safe target */
        height: 44px;
    }
}