/**
 * Global Site Chrome Styles
 *
 * CSS custom properties, minimal reset, and site-header / site-footer styles
 * shared across every page on the site. Loaded unconditionally on all pages.
 *
 * Calculator-specific styles live in ss-calculator.css (front page) and
 * rmd-calculator.css (RMD page). Neither of those files needs to be loaded
 * solely for the sake of the site chrome.
 *
 * @package Intentionally_Blank_Child
 */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --primary:       #1A2332;
    --primary-light: #4A6690;
    --accent:        #C9A961;
    --accent-hover:  #b8963e;
    --bg:            #F1EEE6;
    --text:          #1A2332;
    --text-light:    #595E65;
    --border:        #CBCAC6;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 60px;
}

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.site-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.site-header__logo {
    width: 140px;
    height: auto;
    display: block;
}

.site-header__nav {
    display: none;
}

.site-header__nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.site-header__nav a:hover {
    background: var(--bg);
    color: var(--primary);
}

.site-header__cta {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: var(--primary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.site-header__cta:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.site-header__cta:active {
    transform: scale(0.98);
}

.site-header__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.site-header__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

/* ============================================================
   CALCULATORS DROPDOWN
   ============================================================ */
.site-header__dropdown {
    position: relative;
    display: flex;
}

.site-header__dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.site-header__dropdown-trigger:hover {
    background: var(--bg);
    color: var(--primary);
}

.site-header__dropdown-trigger svg {
    transition: transform 0.2s;
    flex-shrink: 0;
}

.site-header__dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    padding: 6px;
    z-index: 100;
}

/* Transparent bridge that fills the 6px gap so hover isn't lost
   when the mouse moves from the trigger down into the menu. */
.site-header__dropdown-menu::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 6px;
}

.site-header__dropdown:hover .site-header__dropdown-menu,
.site-header__dropdown:focus-within .site-header__dropdown-menu {
    display: block;
}

.site-header__dropdown:hover .site-header__dropdown-trigger svg,
.site-header__dropdown:focus-within .site-header__dropdown-trigger svg {
    transform: rotate(180deg);
}

.site-header__dropdown-menu a {
    display: block;
    padding: 10px 14px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.site-header__dropdown-menu a:hover {
    background: var(--bg);
    color: var(--primary);
}

/* ============================================================
   MOBILE NAV (is-open)
   ============================================================ */
.site-header__nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 8px 16px;
}

.site-header__nav.is-open a {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.site-header__nav.is-open a:last-child {
    border-bottom: none;
}

/* Mobile dropdown: always expanded, label acts as section header */
.site-header__nav.is-open .site-header__dropdown {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.site-header__nav.is-open .site-header__dropdown-trigger {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    min-height: 44px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: default;
    pointer-events: none;
}

.site-header__nav.is-open .site-header__dropdown-trigger svg {
    display: none;
}

.site-header__nav.is-open .site-header__dropdown-menu {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    min-width: auto;
}

.site-header__nav.is-open .site-header__dropdown-menu a {
    padding-left: 28px;
    font-size: 1rem;
    border-radius: 0;
}

/* The last dropdown-menu link keeps its border since page links follow */
.site-header__nav.is-open .site-header__dropdown-menu a:last-child {
    border-bottom: 1px solid var(--border);
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.85);
    padding: 32px 16px;
    text-align: center;
}

.site-footer__inner {
    max-width: 800px;
    margin: 0 auto;
}

.site-footer__disclaimer {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    line-height: 1.7;
    text-align: left;
}

.site-footer__disclaimer strong {
    color: white;
}

.site-footer__disclaimer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.site-footer__links {
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.site-footer__links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 4px 0;
}

.site-footer__links a:hover {
    color: white;
    text-decoration: underline;
}

.site-footer__sep {
    margin: 0 10px;
    opacity: 0.5;
}

.site-footer__copy {
    font-size: 0.8rem;
    opacity: 0.7;
    margin: 0;
}
.site-footer__copy a {
    color: inherit;
    text-decoration: none;
}

/* ============================================================
   FAQ CITATION LINK — shared across both calculators
   ============================================================ */
.faq-cite {
    margin-top: 12px;
    font-size: 0.76rem;
    color: var(--text-light);
    opacity: 0.85;
}

.faq-cite a {
    color: var(--text-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.faq-cite a:hover {
    color: var(--primary);
    opacity: 1;
}

/* ============================================================
   RESPONSIVE — 768px+
   ============================================================ */
@media (min-width: 768px) {
    html {
        scroll-padding-top: 80px;
    }

    .site-header__logo {
        width: 200px;
    }

    .site-header__nav {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .site-header__toggle {
        display: none;
    }

    .site-header__nav.is-open {
        position: static;
        flex-direction: row;
        box-shadow: none;
        border-bottom: none;
        padding: 0;
    }

    .site-header__nav.is-open a {
        padding: 8px 16px;
        border-bottom: none;
        border-radius: 6px;
        min-height: auto;
    }

    /* Reset mobile dropdown overrides for desktop */
    .site-header__nav.is-open .site-header__dropdown {
        flex-direction: row;
        width: auto;
    }

    .site-header__nav.is-open .site-header__dropdown-trigger {
        padding: 8px 16px;
        border-bottom: none;
        min-height: auto;
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--text);
        text-transform: none;
        letter-spacing: normal;
        cursor: pointer;
        pointer-events: auto;
    }

    .site-header__nav.is-open .site-header__dropdown-trigger svg {
        display: inline-block;
    }

    .site-header__nav.is-open .site-header__dropdown-menu {
        display: none;
        position: absolute;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 6px;
        min-width: 220px;
    }

    .site-header__nav.is-open .site-header__dropdown:hover .site-header__dropdown-menu,
    .site-header__nav.is-open .site-header__dropdown:focus-within .site-header__dropdown-menu {
        display: block;
    }

    .site-header__nav.is-open .site-header__dropdown-menu a {
        padding: 10px 14px;
        padding-left: 14px;
        border-bottom: none;
        font-size: 0.88rem;
        min-height: auto;
    }

    .site-header__nav.is-open .site-header__dropdown-menu a:last-child {
        border-bottom: none;
    }

    .site-header__cta {
        font-size: 0.85rem;
        padding: 9px 20px;
    }

    .site-footer {
        padding: 40px 24px;
    }
}

/* ============================================================
   LEGAL PAGES (Privacy Policy, Terms of Use)
   ============================================================ */
.legal-page {
    background: var(--bg);
    min-height: 60vh;
    padding: 40px 16px 64px;
}

.legal-page__inner {
    max-width: 760px;
    margin: 0 auto;
}

.legal-page__header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.legal-page__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.legal-page__meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.legal-page__content h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin: 36px 0 10px;
}

.legal-page__content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 24px 0 8px;
}

.legal-page__content p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 14px;
}

.legal-page__content ul,
.legal-page__content ol {
    margin: 0 0 14px 20px;
    padding: 0;
}

.legal-page__content li {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 6px;
}

.legal-page__content a {
    color: var(--primary-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

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

.legal-page__content strong {
    font-weight: 600;
    color: var(--primary);
}

.legal-page__contact {
    margin-top: 40px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.legal-page__contact p {
    margin: 0;
}

@media (min-width: 768px) {
    .legal-page {
        padding: 56px 24px 80px;
    }

    .legal-page__title {
        font-size: 2.5rem;
    }
}

/* ============================================================
   404 ERROR PAGE
   ============================================================ */
.error-page {
    background: var(--bg);
    min-height: 60vh;
    padding: 60px 16px 80px;
    text-align: center;
}

.error-page__inner {
    max-width: 600px;
    margin: 0 auto;
}

.error-page__code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--border);
    line-height: 1;
    margin-bottom: 0;
    letter-spacing: -2px;
}

.error-page__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin: 8px 0 16px;
}

.error-page__desc {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 40px;
}

.error-page__links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.error-page__link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 24px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    text-align: left;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.error-page__link:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.error-page__link-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.error-page__link-desc {
    font-size: 0.88rem;
    color: var(--text-light);
}

@media (min-width: 640px) {
    .error-page__code {
        font-size: 8rem;
    }

    .error-page__title {
        font-size: 2rem;
    }

    .error-page__links {
        flex-direction: row;
    }

    .error-page__link {
        flex: 1;
    }
}
