html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--theme-bg-primary, #121212);
    color: var(--theme-text-primary, #ffffff);
}

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* Match calculator/retirement header layout exactly */
.header {
    background: var(--theme-bg-secondary, #1a1a1a);
    border-bottom: 1px solid var(--theme-border, #333);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 30px;
    backdrop-filter: blur(20px);
    position: relative;
    box-sizing: border-box;
}

.logo-title-container {
    display: flex;
    align-items: center;
}

.logo-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    white-space: nowrap;
}

.header-nav-link {
    color: var(--theme-text-secondary, #999);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 6px;
    position: relative;
}

.header-nav-link:hover {
    color: var(--theme-text-primary, #fff);
    background: rgba(255, 255, 255, 0.08);
}

.header-nav-link.active {
    color: var(--theme-text-primary, #fff);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
    font-weight: 600;
}

html[data-theme="light"] .header-nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .header-nav-link.active {
    background: rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

@media (max-width: 920px) {
    .header-nav {
        gap: 14px;
    }

    .header-nav-link .header-nav-link-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .header-nav-link::before {
        content: attr(data-short);
        font-size: 14px;
        font-weight: inherit;
    }

    .header-nav-link.active::before {
        font-weight: 600;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

.epf-logo-text {
    color: var(--theme-primary);
    font-size: 18px;
    font-weight: 600;
}

.card {
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border);
    border-radius: 14px;
    padding: 18px;
}

.card h1,
.card h2,
.card h3 {
    color: var(--theme-text-primary);
}

.hero {
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0 0 8px;
}

.muted {
    color: var(--theme-text-secondary);
    font-size: 14px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin: 10px 0;
    color: var(--theme-text-secondary);
}

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

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.field {
    margin-bottom: 12px;
}

.field label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--theme-text-secondary);
}

.field input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--theme-border);
    background: var(--theme-bg-primary);
    color: var(--theme-text-primary);
    border-radius: 10px;
    padding: 10px 12px;
}

.btn {
    display: inline-block;
    background: var(--theme-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    padding: 11px 14px;
    font-weight: 600;
    border: 0;
    cursor: pointer;
}

.metric {
    padding: 10px 0;
    border-bottom: 1px dashed var(--theme-border);
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.metric:last-child {
    border-bottom: 0;
}

.section-gap {
    margin-top: 16px;
}

.assumptions-notice {
    border-left: 4px solid var(--theme-primary);
    margin-bottom: 16px;
}

.notice-title {
    margin: 0 0 8px;
}

.notice-copy {
    margin: 0;
}

.related {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.related a {
    color: var(--theme-primary);
    text-decoration: none;
    border: 1px solid var(--theme-border);
    background: var(--theme-bg-primary);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
}

details {
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 10px;
    background: var(--theme-bg-secondary);
}

details summary {
    color: var(--theme-text-primary);
}

details p {
    color: var(--theme-text-secondary);
}

.assumption-list {
    margin: 0;
    padding-left: 18px;
    color: var(--theme-text-primary);
}

.assumption-list li {
    margin: 0 0 8px;
    color: var(--theme-text-primary);
}

.advanced-details {
    margin: 10px 0 14px;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--theme-bg-primary);
}

.advanced-details > summary {
    cursor: pointer;
    color: var(--theme-primary);
    font-weight: 600;
    margin-bottom: 10px;
}

html[data-theme="light"] .card {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.scenario-card {
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    padding: 12px;
    background: var(--theme-bg-primary);
}

.scenario-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.scenario-metric {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--theme-border);
    color: var(--theme-text-primary);
}

.scenario-metric:last-of-type {
    border-bottom: 0;
}

.scenario-btn {
    margin-top: 10px;
}

.scenario-peer-link {
    margin-top: 12px;
}

.scenario-peer-link a {
    color: var(--theme-primary);
    text-decoration: none;
    font-weight: 600;
}
