* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: #ffffff;
    --background-secondary: #f7f7f8;
    --background-card: #ffffff;
    --text-primary: #1a1f36;
    --text-secondary: #5e6578;
    --accent: #5eb4f3;
    --accent-hover: #3a9fe8;
    --accent-light: #e8f4fd;
    --accent-glow: rgba(0, 53, 148, 0.1);
    --gold: #8b6914;
    --border: #e0e4ea;
}

body {
    font-family: 'Capsule Sans Text', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-snap-type: y mandatory;
}

main {
    scroll-snap-type: y mandatory;
}

/* Menu Button */
.menu-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
}

.menu-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--background);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.menu-button:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-button.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-button.active span:nth-child(2) {
    opacity: 0;
}

.menu-button.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.dropdown-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.dropdown-menu a:active {
    color: var(--accent);
}

/* Hero Section */
.hero {
    background: var(--background);
    color: var(--text-primary);
    padding: 8rem 2rem;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.hero::before {
    display: none;
}

.hero h1 {
    font-size: clamp(1.75rem, 6.5vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    white-space: nowrap;
    position: relative;
}

.hero h1 span {
    color: var(--accent);
}

.flip-word {
    display: inline-block;
    position: relative;
}

.flip-word.flipping {
    animation: flipOut 0.3s ease-in forwards;
}

.flip-word.flipping-in {
    animation: flipIn 0.3s ease-out forwards;
}

@keyframes flipOut {
    0% {
        transform: rotateX(0deg);
        opacity: 1;
    }
    100% {
        transform: rotateX(90deg);
        opacity: 0;
    }
}

@keyframes flipIn {
    0% {
        transform: rotateX(-90deg);
        opacity: 0;
    }
    100% {
        transform: rotateX(0deg);
        opacity: 1;
    }
}

.hero p {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 500px;
    font-weight: 400;
    line-height: 1.5;
    position: relative;
}

.hero-description {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    color: var(--text-primary);
    max-width: 900px;
    white-space: nowrap;
    line-height: 1.6;
}

.cta-button {
    background: var(--accent);
    color: #1a1f36;
    padding: 1rem 2.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
    position: relative;
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    position: relative;
}

.hero-subtitle a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.hero-subtitle a:hover {
    text-decoration: underline;
}

/* Step 1 - Account Type Selection */
.step1-section {
    padding: 6rem 2rem;
    max-width: 880px;
    margin: 0 auto;
    min-height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step1-section h2 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.account-type-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.account-type-btn {
    padding: 2rem 3rem;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.account-type-btn:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

.account-type-btn.selected {
    border-color: var(--accent);
    background: var(--accent);
    color: #1a1f36;
}

/* Calculator Section */
.calculator-section {
    padding: 6rem 2rem;
    max-width: 880px;
    margin: 0 auto;
    min-height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Step Navigation */
.step-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
}

.step-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.step-nav-link:hover {
    color: var(--accent);
}

.step-nav-divider {
    color: var(--border);
}

.calculator-section h2 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.section-subtitle.single-line {
    max-width: none;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

.calculator-container {
    background: var(--background);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

#projection-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group select {
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1.125rem;
    font-family: inherit;
    background: var(--background-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235e6578' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    background-color: var(--background-secondary);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder {
    color: var(--text-secondary);
}

.calculate-btn {
    grid-column: 1 / -1;
    background: var(--accent);
    color: #1a1f36;
    padding: 1.125rem;
    border: none;
    border-radius: 4px;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.calculate-btn:hover {
    background: var(--accent-hover);
}

/* Results */
.results {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results.hidden {
    display: none;
}

.results h3 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.result-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.result-card {
    background: var(--background-secondary);
    padding: 1.5rem 1rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}


.result-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-value {
    display: block;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.result-card:first-child .result-value {
    color: var(--accent);
}

.result-card.full-width {
    grid-column: 1 / -1;
}

.result-card.full-width .result-value {
    font-size: 1.125rem;
    color: var(--accent);
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.projection-chart {
    padding: 1.5rem;
    background: var(--background-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
}

.projection-chart h4 {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.chart-subtitle {
    text-align: center;
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.allocation-chart-container,
.balance-chart-container {
    position: relative;
    cursor: pointer;
}

#growth-chart,
#allocation-chart {
    max-height: 300px;
}

/* Pie Chart Container */
.pie-chart-container {
    padding: 1.5rem;
    background: var(--background-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.pie-chart-container h4 {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#pie-chart {
    max-height: 280px;
    margin: 0 auto;
}

/* Collapsible Section */
.collapsible-section {
    margin-bottom: 1.5rem;
}

.collapsible-header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.2s ease;
}

.collapsible-header:hover {
    background: var(--accent-light);
    color: var(--text-primary);
}

.collapsible-header svg {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.collapsible-section.collapsed .collapsible-header svg {
    transform: rotate(0deg);
}

.collapsible-section:not(.collapsed) .collapsible-header svg {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 2000px;
    overflow: visible;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    opacity: 1;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.collapsible-content .result-cards {
    margin-top: 0;
}

.collapsible-content .charts-container {
    margin-top: 0;
}

.collapsible-section.collapsed .collapsible-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    overflow: hidden;
}

.explain-content {
    padding: 1.5rem;
    background: var(--background-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.explain-content p {
    margin-bottom: 1.5rem;
}

.explain-content ul {
    margin: 0.5rem 0 1.5rem 1.5rem;
    padding: 0;
}

.explain-content li {
    margin-bottom: 0.5rem;
}

.calculator-section.hidden {
    display: none;
}

/* Step 3 Section */
.step3-section {
    padding: 6rem 2rem;
    max-width: 880px;
    margin: 0 auto;
    min-height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.step3-section.hidden {
    display: none;
}

.step3-section h2 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.upload-container {
    background: var(--background);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-zone:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.upload-icon {
    color: var(--accent);
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-subtext {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.uploaded-files {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.uploaded-file {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.uploaded-file img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.uploaded-file .remove-file {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.uploaded-file .remove-file:hover {
    background: rgba(0, 0, 0, 0.8);
}

.analyze-btn-container {
    position: relative;
    margin-top: 1.5rem;
    border-radius: 4px;
    overflow: hidden;
}

.analyze-btn-container.analyzing {
    background: #1e3a5f;
}

.analyze-btn {
    width: 100%;
    background: var(--accent);
    color: #1a1f36;
    padding: 1.125rem;
    border: none;
    border-radius: 4px;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
}

.analyze-btn:hover:not(:disabled) {
    background: var(--accent-hover);
}

.analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.analyze-btn.analyzing {
    pointer-events: none;
    background: transparent;
    color: white;
}

.analyze-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background: #93c5fd;
    transition: width 0.3s ease;
    z-index: 1;
}

.analysis-results {
    margin-top: 2rem;
    background: var(--background);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.analysis-results.hidden {
    display: none;
}

.analysis-results h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.match-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.category-group {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.category-group-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    flex-wrap: wrap;
}

.stocks-group .category-group-header {
    background: var(--accent);
}

.bonds-group .category-group-header {
    background: var(--text-primary);
}

.group-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1f36;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bonds-group .group-title {
    color: #ffffff;
}

.expand-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #1a1f36;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease;
}

.bonds-group .expand-btn {
    color: #ffffff;
}

.expand-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.expand-btn.expanded svg {
    transform: rotate(180deg);
}

.category-details {
    display: flex;
    flex-direction: column;
    background: var(--background-secondary);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
}

.category-details.collapsed {
    display: none;
}

.category-details .match-category {
    background: var(--background);
}

.match-category {
    background: var(--background-secondary);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
}

.category-header {
    margin-bottom: 0.75rem;
}

.category-name {
    font-weight: 600;
    color: var(--text-primary);
}

.category-matches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.match-tag {
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--accent);
}

.no-match {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

/* Step 4 Section */
.step4-section {
    padding: 6rem 2rem;
    max-width: 880px;
    margin: 0 auto;
    min-height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    text-align: center;
}

.step4-section.hidden {
    display: none;
}

.step4-section h2 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.step4-section .section-subtitle {
    margin-bottom: 2rem;
}

.step4-section .recommendation-container {
    text-align: left;
}

.recommendation-container {
    background: var(--background);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    width: 100%;
    margin-top: 2rem;
}

.recommendation-container.hidden {
    display: none;
}

.recommendation-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.step4-section .step-nav {
    margin-top: 2rem;
}

.recommendation-summary {
    margin-bottom: 2rem;
}

.allocation-target {
    max-width: 500px;
    margin: 0 auto;
}

.target-bar {
    display: flex;
    height: 3rem;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.target-stocks {
    background: var(--accent);
    transition: width 0.3s ease;
}

.target-bonds {
    background: var(--text-primary);
    transition: width 0.3s ease;
}

.target-labels {
    display: flex;
    justify-content: space-between;
}

.target-label {
    font-size: 1rem;
    font-weight: 600;
}

.stocks-label {
    color: var(--accent);
}

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

.recommended-funds {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fund-group h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid;
}

.stocks-funds h4 {
    color: var(--accent);
    border-color: var(--accent);
}

.bonds-funds h4 {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.fund-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fund-recommendation {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--background-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.fund-allocation {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-light);
    border-right: 1px solid var(--border);
}

.fund-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    flex: 1;
}

.fund-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fund-name {
    font-weight: 500;
    color: var(--text-primary);
}

.fund-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.fund-screenshot {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-left: 1px solid var(--border);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.fund-screenshot:hover {
    opacity: 0.8;
}

.no-funds {
    color: var(--text-secondary);
    font-style: italic;
    padding: 1rem;
}

/* Step 5 Section */
.step5-section {
    padding: 6rem 2rem;
    max-width: 880px;
    margin: 0 auto;
    min-height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.step5-section.hidden {
    display: none;
}

.step5-section h2 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

/* Step 6 Section */
.step6-section {
    padding: 6rem 2rem;
    max-width: 880px;
    margin: 0 auto;
    min-height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.step6-section.hidden {
    display: none;
}

.step6-section h2 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.whatnow-container {
    background: var(--background);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.whatnow-disclaimer {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: left;
}

.whatnow-services {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: left;
}

.services-table {
    width: 100%;
    border-collapse: collapse;
}

.services-table th {
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.th-subheader {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: normal;
    margin-top: 0.25rem;
}

.services-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.95rem;
    text-align: center;
    vertical-align: top;
}


.services-table tr:last-child td {
    border-bottom: none;
}

.services-table th:nth-child(2),
.services-table th:nth-child(3),
.services-table td:nth-child(2),
.services-table td:nth-child(3) {
    width: 25%;
}

.expandable-row {
    cursor: pointer;
}

.expandable-row:hover {
    background: var(--background-secondary);
}

.expandable-row.expanded {
    background: var(--background-secondary);
}

.expandable-row.expanded td {
    border-bottom: none;
}

.service-name {
    font-weight: 500;
}

.service-details-row {
    background: var(--background-secondary);
}

.service-details-row.hidden {
    display: none;
}

.service-details-row td {
    padding: 0 1.5rem 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.service-details {
    margin: 0;
    padding: 0 0 0 1.25rem;
    font-weight: normal;
    text-align: left;
}

.service-details li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.service-details li:last-child {
    margin-bottom: 0;
}
}

.service-details li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.modal-content img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.modal-close:hover {
    opacity: 1;
}

.uploaded-file img {
    cursor: pointer;
}

/* About Section */
.about-section {
    background: var(--background-secondary);
    padding: 6rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.about-section h2 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.about-section p {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.6;
}

.disclaimer {
    background: var(--background-card);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border: 1px solid var(--border);
}

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

/* Footer */
footer {
    background: var(--background);
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 2rem;
}

footer p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 0 1.5rem;
    }

    nav ul {
        gap: 1.5rem;
    }

    .hero {
        padding: 6rem 1.5rem;
    }

    .hero::before {
        width: 400px;
        height: 400px;
    }

    .calculator-section {
        padding: 4rem 1.5rem;
    }

    .calculator-container {
        padding: 2rem 1.5rem;
    }

    #projection-form {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .result-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-section {
        padding: 4rem 1.5rem;
    }
}

@media (max-width: 480px) {
    nav ul {
        gap: 1rem;
        font-size: 0.875rem;
    }

    .account-type-container {
        flex-direction: column;
        align-items: center;
    }

    .account-type-btn {
        width: 100%;
        max-width: 200px;
    }

    .result-cards {
        grid-template-columns: 1fr;
    }

    .result-value {
        font-size: 1.5rem;
    }
}

/* Email Form Styles */
.email-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.email-capture-box {
    background: var(--background);
    border-radius: 16px;
    padding: 1.25rem 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.email-capture-text {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
}

.email-capture-box .email-form {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.email-capture-box .email-input-group {
    justify-content: center;
    width: 100%;
    margin: 0;
}

.email-capture-box .email-status {
    margin-top: 0.5rem;
}

.email-capture-box .email-status.hidden {
    display: none;
    margin: 0;
}

.email-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-input-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.email-input-group input[type="email"] {
    flex: 1;
    min-width: 200px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--background);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.email-input-group input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.email-submit-btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.email-submit-btn:hover {
    background: var(--accent-hover);
}

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

.email-submit-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
}

.email-submit-btn.sending {
    background: var(--text-secondary);
}

.email-status {
    text-align: center;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.email-status.success {
    background: #d4edda;
    color: #155724;
}

.email-status.error {
    background: #f8d7da;
    color: #721c24;
}


@media (max-width: 480px) {
    .email-input-group {
        flex-direction: column;
    }

    .email-submit-btn {
        width: 100%;
    }
}
