:root {
    --primary-blue: #1a2b3c;
    --accent-green: #27ae60;
    --white: #ffffff;
    --bg-color: #f4f7f6;
}

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

body {
    font-family: sans-serif;
    background-color: var(--bg-color);
}

/* --- THE CONTAINER FIX --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex; /* Switched to Flex for more reliable sidebar positioning */
    gap: 30px;
}

main {
    flex: 1; /* Takes up all available space */
    min-width: 0; /* Important for grid stability */
}

aside {
    width: 300px;
    flex-shrink: 0; /* Prevents sidebar from squishing */
}

/* --- LOGO (Original 3-line) --- */
header {
    background: var(--primary-blue);
    padding: 25px 0;
}

.logo-link {
    text-decoration: none;
    display: block;
    width: fit-content;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--accent-green);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    color: white;
    font-size: 1.8rem;
    line-height: 1;
}

.logo-text span {
    color: var(--accent-green);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* --- TRACKS & TILES --- */
.hero {
    background: linear-gradient(135.5deg, var(--primary-blue) 0%, #2c3e50 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 16px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.1rem;
    max-width: 700px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero .badge {
    background: var(--accent-green);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 20px;
}

/* Add a subtle background pattern to the hero for a techy look */
.hero::after {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(39, 174, 96, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.roadmap-track {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 8px solid var(--accent-green);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.track-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.track-info h3 {
    color: var(--primary-blue);
    font-size: 1.4rem;
}

.track-info p {
    color: #666;
    font-size: 1rem;
    margin-top: 4px;
    font-weight: 400;
}

/* --- THE TILE LOOK --- */
.grid-container {
    display: grid;
    /* Forces at least 2 columns on most screens, 3 on larger ones */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.tile {
    background: #ffffff; /* Pure white tile */
    padding: 25px;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers icon and text */
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    position: relative;
        overflow: hidden; /* Clips the badge if it overlaps the border-radius */
}

.tile:hover {
    border-color: var(--accent-green);
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    background: #fff;
}

.step-num {
    background: var(--accent-green);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 50px; /* Pill shape */
    margin-bottom: 15px;
}

.tile i {
    font-size: 2rem;
    color: var(--accent-green);
    margin-bottom: 15px;
}

.tile h3 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--primary-blue);
    line-height: 1.3;
}

.locked {
    opacity: 0.5;
    filter: grayscale(1);
    pointer-events: none; /* Can't click future tracks */
}


/* --- AD SECTIONS --- */

/* Wrapper handles the spacing and background behind the ad */
.ad-top-wrapper {
    width: 100%;
    padding: 20px 0 10px 0;
    display: flex;
    justify-content: center;
}

/* The actual Ad Box */
.ad-top {
    width: 728px;
    height: 90px;
    background-color: #e0e0e0;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* Sidebar Ad Styling */
.ad-sidebar {
    width: 300px;
    height: 250px;
    background-color: #e0e0e0;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.8rem;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Ensure the Ad is responsive: shrinks if the screen is too narrow */
@media (max-width: 768px) {
    .ad-top {
        width: 95%;
        height: auto;
        min-height: 60px;
        padding: 10px;
        text-align: center;
    }
}


/* --- FOOTER STYLING --- */
footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
    margin-top: 50px; /* Space between content and footer */
    border-top: 4px solid var(--accent-green);
}

footer p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

/* Optional: Footer Links (if you add privacy policy etc. later) */
.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    padding: 0;
}

.footer-links li {
    display: flex;
    align-items: center;
}

.footer-links a {
    color: var(--accent-green);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: white;
}

/* --- STICKY FOOTER FIX --- */
/* This ensures the footer stays at the bottom on short pages */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    flex: 1; /* This pushes the footer down */
}

/* Progress Bar */
.progress-container { margin-bottom: 20px; }
.progress-bg {
    background: #e0e0e0;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #27ae60; /* Make sure this is a bright color! */
    width: 0%; /* Start at 0 */
    transition: width 0.5s ease-in-out; /* This makes it slide */
}

/* The Corner Tag */
.completed-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    background: var(--accent-green);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 4px 12px;
    transform: rotate(0deg); /* Or 45deg if you want a ribbon look */
    border-radius: 8px;
    display: none; /* Hidden by default */
}

/* Show badge and highlight border when completed */
.completed-tile {
    border-color: var(--accent-green) !important;
}

.completed-tile .completed-badge {
    display: block;
}

#expense-table input {
    border: 1px solid #ddd;
    border-radius: 4px;
}

#expense-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #666;
}

.expense-row td {
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
}

.item-annual {
    font-weight: bold;
    color: #555;
}

/* --- BREADCRUMBS --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.breadcrumb .separator {
    color: #bdc3c7;
    font-size: 0.7rem;
}

.breadcrumb .current-page {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Disabled Tile Styling */
.tile.disabled {
    pointer-events: none; /* Prevents clicking */
    opacity: 0.6;
    filter: grayscale(1);
    border-style: dashed; /* Visual cue it's not ready */
    cursor: not-allowed;
    background-color: #f9f9f9;
}

.coming-soon-tag {
    font-size: 0.6rem;
    background: #95a5a6;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    position: absolute;
    bottom: 10px;
    right: 10px;
}