/* Brand font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&display=swap');

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #64748b;
    /* Page default: light theme (body, features, most surfaces) */
    --text-color: #0f172a;
    --text-muted: #64748b;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    /* Dark chrome for roadmap popups / headers (explicit; do not use --bg-color for these) */
    --surface-dark: #0f172a;
    --surface-dark-mid: #1e293b;
    --success-color: #10b981;
    --error-color: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    min-height: 100vh;
    padding-top: 70px; /* Space for fixed navbar */
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation — light default (matches most app pages) */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    backdrop-filter: none;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Group nav links + sign-in at far right, sign-in last */
.navbar .nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

/* Dashboard link: hidden until auth.js adds body.nav-show-dashboard (logged-in users only) */
body:not(.nav-show-dashboard) #dashboard-link {
    display: none !important;
}

body.nav-show-dashboard #dashboard-link {
    display: inline-flex !important;
}

.nav-brand a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    letter-spacing: 0.03em;
    color: #2563eb;
    text-decoration: none;
}

.nav-logo {
    height: 2rem;
    width: auto;
    vertical-align: middle;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Sidebar-only auth buttons (shown at top of mobile sidebar; hidden on desktop) */
.sidebar-auth-buttons {
    display: none;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Profile avatar icon in navbar */
.nav-profile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    padding: 0;
    cursor: pointer;
}

.nav-profile-icon:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.nav-profile-initials {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:not(:hover):not(.btn) {
    color: var(--text-muted);
}

.nav-links a:hover:not(.btn) {
    color: var(--primary-color);
}

.nav-links .btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive navbar styles */
@media (max-width: 1024px) {
    /* Tablet styles */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-brand a {
        font-size: 1.25rem;
    }
    
    .nav-links {
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .nav-links a {
        font-size: 0.85rem;
        padding: 0.25rem 0.5rem;
    }
    
    .nav-links .btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    /* Mobile styles */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar .container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-brand {
        flex: 1 1 100%;
        margin-bottom: 0.25rem;
    }
    
    .nav-brand a {
        font-size: 1.1rem;
    }
    
    .nav-links {
        gap: 0.5rem;
        flex-wrap: nowrap;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }
    
    .nav-links a {
        font-size: 0.8rem;
        padding: 0.25rem 0.4rem;
    }
    
    .nav-links .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
    
    /* Smaller buttons site-wide on mobile */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    #signin-link {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.82rem !important;
    }
}

@media (max-width: 480px) {
    /* Small mobile styles */
    .nav-brand a {
        font-size: 1rem;
    }
    
    .nav-links {
        gap: 0.35rem;
    }
    
    .nav-links a {
        font-size: 0.7rem;
        padding: 0.2rem 0.25rem;
    }
    
    .nav-links .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }
    
    .btn {
        padding: 0.4rem 0.85rem;
        font-size: 0.8rem;
    }
    
    #signin-link {
        padding: 0.35rem 0.65rem !important;
        font-size: 0.78rem !important;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Default: for light pages (nav, forms). Dark heroes override below. */
.btn-secondary {
    background: #ffffff;
    color: #0f172a;
    border: 2px solid #0f172a;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #0f172a;
    color: #0f172a;
}

/* Outline button - for nav Log in (Sign up stands out as primary) */
.btn-outline {
    background: transparent;
    color: #0f172a;
    border: 2px solid #0f172a;
}
.btn-outline:hover {
    background: #f1f5f9;
    border-color: #0f172a;
    color: #0f172a;
}

/* Dark hero / CTA bands: light buttons on dark background */
.hero .btn-secondary,
.hero .cta-buttons .btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.9);
}
.hero .btn-secondary:hover,
.hero .cta-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: #ffffff;
}
.hero .btn-outline,
.hero .cta-buttons .btn-outline {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.65);
}
.hero .btn-outline:hover,
.hero .cta-buttons .btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: #ffffff;
}

/* Active nav link - highlighted in blue */
.nav-links a.active {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.nav-links a.active:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: var(--bg-color);
}

.features h2 {
    color: var(--text-color);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.feature-card p {
    color: var(--text-muted);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Footer — brand blue (matches --primary-color / light-theme buttons) */
.footer {
    background: linear-gradient(165deg, #3b82f6 0%, #2563eb 52%, #1d4ed8 100%);
    color: #ffffff;
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    width: 100%;
    position: relative;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    letter-spacing: 0.03em;
    text-decoration: none;
    margin-bottom: 1rem;
    transition: opacity 0.2s;
}

.footer-brand:hover {
    opacity: 0.92;
    color: #ffffff;
}

.footer-logo {
    height: 1.75rem;
    width: auto;
    object-fit: contain;
}

.footer-section h4 {
    color: #dbeafe;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-social a:hover {
    color: #ffffff;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Dashboard Styles */
.dashboard {
    padding: 2rem 0;
    min-height: 60vh;
}

.dashboard-layout {
    display: flex;
    gap: 2rem;
}

.dashboard-sidebar {
    width: 260px;
    max-width: 100%;
}

.dashboard-main {
    flex: 1;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.dashboard-nav-button {
    width: 100%;
    text-align: left;
    padding: 0.95rem 1.15rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
    font-weight: 500;
    cursor: pointer;
    font-size: 1.08rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 3.1rem;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.dashboard-nav-button span.icon {
    font-size: 1.35rem;
}

.dashboard-nav-button.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: rgba(22, 163, 74, 0.9);
    color: #020617;
    transform: translateY(-1px);
}

.dashboard-nav-button:hover:not(.active) {
    background: rgba(15, 23, 42, 1);
    border-color: rgba(148, 163, 184, 0.9);
}

.dashboard-tools {
    margin-top: 1.5rem;
}

.dashboard-tools h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: white;
}

.dashboard-tools p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.dashboard-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.dashboard-tool-card {
    padding: 1rem 1.25rem;
}

.dashboard-tool-card h3 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.dashboard-tool-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .dashboard-layout {
        display: grid;
        grid-template-areas: "title" "nav" "content";
        grid-template-rows: auto auto 1fr;
        gap: 1rem;
    }

    .dashboard-main {
        display: contents;
    }

    .dashboard-header {
        grid-area: title;
        margin-bottom: 0;
    }

    .dashboard-sidebar {
        grid-area: nav;
        width: 100%;
    }

    #dashboard-roadmaps-section,
    #dashboard-tools-section,
    #dashboard-favourites-section {
        grid-area: content;
    }
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 768px) {
    .dashboard-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dashboard-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .dashboard-actions .btn {
        width: 100%;
    }
}

.dashboard-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.dashboard-header p {
    color: var(--text-muted);
}

.roadmap-card.owned {
    border-color: var(--primary-color);
    opacity: 0.8;
}

.owned-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.loading-state {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
}

.loading-state .loading {
    margin: 0 auto 1rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
}

.empty-state h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.roadmap-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.roadmap-type {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.roadmap-progress {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .roadmap-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .roadmap-grid {
        grid-template-columns: 1fr;
    }
}

.roadmap-card {
    position: relative;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.24), transparent 55%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.18), transparent 55%),
        #020617;
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 0.9rem;
    padding: 1.5rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
    transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
    overflow: hidden;
}

.roadmap-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    border: 1px solid transparent;
    background:
        linear-gradient(120deg, rgba(59, 130, 246, 0.8), rgba(16, 185, 129, 0.7), rgba(56, 189, 248, 0.8))
        border-box;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.roadmap-card:hover {
    box-shadow: 0 26px 60px rgba(15, 23, 42, 1);
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(59, 130, 246, 0.9);
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.3), transparent 55%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.22), transparent 55%),
        #020617;
}

.roadmap-card:hover::before {
    opacity: 0.55;
}

.roadmap-card h3 {
    color: #e5e7eb;
    margin-bottom: 0.5rem;
}

.roadmap-card .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin: 1rem 0;
}

.roadmap-card .description {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.roadmap-card .roadmap-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.roadmap-card .roadmap-header h3 {
    margin: 0;
    flex: 1;
}

.roadmap-card .roadmap-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.roadmap-card .roadmap-footer .price {
    font-weight: 600;
    color: white;
    font-size: 1.1rem;
}

.roadmap-expand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 1rem;
    padding: 0.5rem 0;
    user-select: none;
    transition: color 0.2s;
}

.roadmap-expand:hover {
    color: var(--primary-dark);
}

.roadmap-expand .expand-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.roadmap-expand .expand-text {
    font-size: 0.9rem;
}

.roadmap-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    margin-top: 0;
}

.roadmap-details ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.roadmap-details ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-muted);
    line-height: 1.6;
}

.roadmap-details ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.roadmap-details .roadmap-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Roadmap Flowchart Styles - Tree Structure */

/* Star Rating Legend */
.star-legend {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.star-legend h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.legend-items {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    min-width: 100px;
    transition: transform 0.2s ease;
}

.legend-item[data-category="planning"] {
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid #10b981;
}

.legend-item[data-category="research"] {
    background: rgba(59, 130, 246, 0.2);
    border: 2px solid #3b82f6;
}

.legend-item[data-category="legal"] {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
}

.legend-item[data-category="setup"] {
    background: rgba(249, 115, 22, 0.2);
    border: 2px solid #f97316;
}

.legend-item[data-category="operations"] {
    background: rgba(234, 179, 8, 0.2);
    border: 2px solid #eab308;
}

.legend-stars {
    font-size: 1.5rem;
    color: white;
    line-height: 1;
}

.legend-item span {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Star Rating in Roadmap Nodes */
.star-rating {
    font-size: 1rem;
    color: white;
    margin-top: 0.5rem;
    text-align: center;
    font-weight: 600;
    line-height: 1;
}

.roadmap-preview {
    padding: 4rem 0;
    background: var(--bg-light);
}

.roadmap-container {
    overflow-x: visible;
    overflow-y: visible;
    padding: 2rem 0;
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.roadmap-flowchart {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 1400px;
    width: 100%;
    max-width: 100%;
    position: relative;
    padding: 2rem 4rem;
    margin: 0 auto;
    overflow: visible;
}

.roadmap-start-label {
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
    width: 100%;
}

.roadmap-tree {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 2000px;
    overflow: visible;
}

.roadmap-row {
    position: relative;
    width: 100%;
    min-height: 250px;
    margin-bottom: 5rem;
    overflow: visible;
}

.roadmap-step {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.roadmap-node {
    background: var(--bg-card);
    color: white;
    border: 2px solid white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 1.2rem;
    text-align: center;
    min-width: 200px;
    max-width: 220px;
    position: relative;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: border-color 0.2s, box-shadow 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.roadmap-node:hover {
    transform: none;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 2px var(--primary-color), 0 0 12px 2px rgba(59, 130, 246, 0.5);
}

.roadmap-node.main-node {
    background: var(--bg-light);
    color: white;
    border: 2px solid white;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
}

.roadmap-node.end-node {
    background: var(--bg-light);
    color: white;
    border: none;
    font-weight: 600;
    position: relative;
    background-clip: padding-box;
}

/* Multi-color border combining all category colors */
.roadmap-node.end-node::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 0.375rem;
    padding: 3px;
    background: conic-gradient(from 0deg, #10b981 0deg, #3b82f6 72deg, #eab308 144deg, #f97316 216deg, #ef4444 288deg, #10b981 360deg);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
}

/* Session Nodes - Grouped Topics */
.roadmap-node.session-node {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 110px;
    padding: 1rem 1.25rem;
    min-width: 250px;
    max-width: 300px;
    gap: 0.5rem;
}

/* Color coding based on categories - colored triangle corner indicator */
.roadmap-node[data-category] {
    position: relative;
    overflow: hidden;
}

.roadmap-node[data-category]::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 25px 25px 0;
}

.roadmap-node[data-category="planning"]::after {
    border-color: transparent #10b981 transparent transparent;
}

.roadmap-node[data-category="research"]::after {
    border-color: transparent #3b82f6 transparent transparent;
}

.roadmap-node[data-category="legal"]::after {
    border-color: transparent #ef4444 transparent transparent; /* Switched with operations - now red */
}

.roadmap-node[data-category="setup"]::after {
    border-color: transparent #f97316 transparent transparent;
}

.roadmap-node[data-category="operations"]::after {
    border-color: transparent #eab308 transparent transparent; /* Switched with legal - now yellow */
}

/* Clickable Nodes */
.roadmap-node.clickable-node {
    cursor: pointer;
    position: relative;
}

.roadmap-node.clickable-node:hover {
    transform: none;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 2px var(--primary-color), 0 0 12px 2px rgba(59, 130, 246, 0.5);
}

/* Step Popup Modal (Main popup for step information) */
.step-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.step-popup.active {
    opacity: 1;
    visibility: visible;
}

.step-popup-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0;
    max-width: 650px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.step-popup.active .step-popup-content {
    transform: scale(1);
}

.step-popup-header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: start;
    padding: 1.5rem;
    border-bottom: 1px solid var(--surface-dark);
    background: var(--surface-dark);
    gap: 0.75rem 1rem;
}

/* Title spans first column */
.step-popup-header > h3 {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    color: white; /* White text on navy background */
    font-size: 1.75rem;
}

/* Title + status badge (injected by step-popup-progress.js) */
.step-popup-header .step-title-with-status {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.step-popup-header .step-title-with-status h3 {
    margin: 0;
    color: white;
    font-size: 1.75rem;
}

.step-popup-header .step-progress-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    line-height: 1.2;
}

/* Dropdown + close (injected by step-popup-progress.js) — top-right cluster */
.step-popup-header.has-step-progress > .step-popup-header-actions {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 0;
    max-width: min(100%, 20rem);
}

.step-popup-header.has-step-progress .step-progress-select {
    min-height: 2.75rem; /* touch-friendly */
    min-width: 0;
    flex: 1 1 auto;
    max-width: min(12.5rem, calc(100vw - 6rem));
    padding: 0.35rem 2rem 0.35rem 0.65rem;
    font-size: 0.9375rem;
    line-height: 1.25;
    border-radius: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.12)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E")
        no-repeat right 0.5rem center;
}

.step-popup-header.has-step-progress .step-progress-select:focus {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.step-popup-header.has-step-progress .step-progress-select option {
    color: #111;
    background: #fff;
}

.step-popup-header-actions.step-progress-saving {
    position: relative;
}

.step-popup-header.has-step-progress .step-progress-select--loading {
    cursor: wait;
    opacity: 0.72;
}

/* Spinner beside dropdown (before close) while debouncing / saving */
.step-popup-header-actions.step-progress-saving::after {
    content: '';
    position: absolute;
    right: 2.6rem;
    top: 50%;
    width: 1rem;
    height: 1rem;
    margin-top: -0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    animation: step-progress-spin 0.65s linear infinite;
    pointer-events: none;
}

@keyframes step-progress-spin {
    to {
        transform: rotate(360deg);
    }
}

.step-popup-header.has-step-progress .category-badge {
    grid-row: 2;
}

/* Title column can shrink so dropdown + close fit on narrow screens */
.step-popup-header.has-step-progress > h3,
.step-popup-header.has-step-progress > .step-title-with-status {
    min-width: 0;
}

/* Close button in second column when it is a direct child of the header */
.step-popup-header > .step-popup-close {
    grid-column: 2;
    grid-row: 1;
    color: white; /* White text on navy background */
}

/* Close inside header-actions is positioned by flex, not grid */
.step-popup-header .step-popup-header-actions .step-popup-close {
    grid-column: unset;
    grid-row: unset;
    flex-shrink: 0;
    color: white;
}

.step-popup-header .step-popup-close:hover {
    background: var(--surface-dark-mid);
    color: white;
}

/* Category badge spans both columns, second row */
.step-popup-header .category-badge {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    width: 100%;
}

.step-popup-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: background 0.2s ease;
}

.step-popup-close:hover {
    background: var(--bg-light);
}

.step-popup-body {
    padding: 1.5rem;
}

.step-description {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.step-description p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.step-description p:last-child {
    margin-bottom: 0;
}

.step-description-list {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin: 1rem 0;
    color: var(--text-color);
}

.step-description-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.step-links-section {
    margin-bottom: 2rem;
}

.step-links-title {
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.step-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.step-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.step-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.step-breakdowns-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.step-breakdowns-title {
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.step-breakdowns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.breakdown-box {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.breakdown-box:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.breakdown-box-title {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Breakdown Detail Popup Content */
.breakdown-popup-body {
    padding: 1.5rem;
}

.breakdown-detail-description {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.breakdown-links-section {
    margin-top: 2rem;
}

.breakdown-links-title {
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.breakdown-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.breakdown-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateX(5px);
}

/* Breakdown Popup Modal - Appears on top of step modal */
.breakdown-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000; /* Higher than step modal (1000) so it appears on top */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.breakdown-popup.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0;
    max-width: 650px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.breakdown-popup.active .popup-content {
    transform: scale(1);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--surface-dark);
    background: var(--surface-dark);
}

.popup-header h3 {
    margin: 0;
    color: white; /* White text on navy background */
    font-size: 1.75rem;
}

.popup-header .popup-close {
    color: white; /* White text on navy background */
}

.popup-header .popup-close:hover {
    background: var(--surface-dark-mid);
    color: white;
}

.popup-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: background 0.2s ease;
}

.popup-close:hover {
    background: var(--bg-light);
}

/* Disable dark overlay tint on tablet & mobile so only the popup card shows */
@media (max-width: 1024px) {
    .step-popup,
    .breakdown-popup {
        background: transparent;
    }
    
    /* Ensure popup is visible when active on mobile/tablet */
    .step-popup.active,
    .breakdown-popup.active {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Make popup cards full-screen on mobile/tablet */
    .step-popup-content,
    .popup-content {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: white !important;
        background-color: white !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Make headers fixed on mobile/tablet so they stay visible when scrolling */
    .step-popup-header,
    .popup-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: var(--surface-dark) !important;
        z-index: 10 !important;
        border-bottom: 1px solid var(--surface-dark) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Header text should be white on dark background */
    .step-popup-header h3,
    .popup-header h3 {
        color: white !important;
    }
    
    .step-popup-header .step-popup-close,
    .popup-header .popup-close {
        color: white !important;
    }
    
    .step-popup-header .step-popup-close:hover,
    .popup-header .popup-close:hover {
        background: var(--surface-dark-mid) !important;
        color: white !important;
    }

    /* Step status dropdown + X: full-width row, aligned end (mobile / tablet) */
    .step-popup-header.has-step-progress > .step-popup-header-actions {
        width: 100% !important;
        max-width: none !important;
        justify-content: flex-end !important;
        flex-wrap: nowrap !important;
        margin-top: 0.35rem !important;
    }

    .step-popup-header.has-step-progress .step-progress-select {
        font-size: 16px !important; /* prevents iOS zoom on focus */
        max-width: min(13rem, calc(100% - 3.25rem)) !important;
    }
    
    /* Adjust header layout to accommodate category badge below title */
    .step-popup-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 1rem 1.5rem !important;
    }
    
    .step-popup-header > div:first-child {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    /* Category badge in header */
    .step-popup-header .category-badge,
    .popup-header .category-badge {
        margin-top: 0.5rem !important;
        margin-bottom: 0 !important;
    }
    
    /* Prevent body scroll when popup is open on mobile/tablet */
    body.popup-active {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Prevent background content from scrolling */
    body.popup-active main,
    body.popup-active .roadmap-preview,
    body.popup-active .roadmap-container {
        pointer-events: none !important;
        overflow: hidden !important;
    }
    
    /* Add padding to body to account for fixed header - increased to prevent text blocking */
    .step-popup-body,
    .breakdown-popup-body {
        padding-top: 180px !important; /* Increased to ensure header doesn't block text (accounts for title + category badge + padding) */
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        padding-bottom: 1.5rem !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        flex: 1 !important;
        -webkit-overflow-scrolling: touch !important; /* Smooth scrolling on iOS */
        overscroll-behavior: contain !important; /* Prevent scroll chaining */
        touch-action: pan-y !important; /* Only allow vertical scrolling */
        margin-top: 0 !important;
        background: white !important; /* White background for content area */
        position: relative !important;
    }
    
    /* Create navy blue padding area that matches header - using pseudo-element */
    .step-popup-body::before,
    .breakdown-popup-body::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 180px !important; /* Match padding-top */
        background: var(--surface-dark) !important;
        z-index: 0 !important;
        pointer-events: none !important;
    }
    
    /* Ensure content sits above the navy padding area */
    .step-popup-body > *,
    .breakdown-popup-body > * {
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* Ensure popup container captures touch events */
    .step-popup.active,
    .breakdown-popup.active {
        touch-action: none !important; /* Prevent default touch behaviors */
    }
    
    .step-popup-content,
    .popup-content {
        touch-action: pan-y !important; /* Allow vertical scrolling in content */
    }
    
    /* Remove any pseudo-elements that might create overlays inside the card */
    .step-popup-content::before,
    .step-popup-content::after,
    .popup-content::before,
    .popup-content::after {
        display: none !important;
    }
}

.popup-body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-height: 70vh;
    overflow-y: auto;
}

.breakdown-node {
    background: var(--bg-light);
    color: var(--text-color);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    border: 1px solid var(--border-color);
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.breakdown-node:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}

.breakdown-title {
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--text-color);
    margin: 0;
}

.breakdown-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.session-title {
    font-weight: 700;
    font-size: 1.4rem;
    color: white;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    gap: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Step boxes: no summary line, no extra space below title */
.roadmap-node.session-node .session-title {
    margin-bottom: 0;
}
.roadmap-node.session-node .session-title.title-single-line {
    padding-top: 1.2em;
}
.roadmap-node.session-node .session-topics {
    display: none !important;
}

.session-topics {
    font-size: 1rem;
    color: white;
    line-height: 1.6;
    font-weight: 400;
    opacity: 0.9;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.session-topics li {
    position: relative;
    padding-left: 1rem;
}

.session-topics li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: white;
    font-weight: 600;
}

.expand-text {
    font-size: 1rem;
    color: white;
    font-weight: 500;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: opacity 0.2s ease, color 0.2s ease;
    display: inline-block;
    opacity: 0.8;
}

.expand-text:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Expand text matches category color */
.roadmap-node[data-category="planning"] .expand-text {
    color: #10b981;
}

.roadmap-node[data-category="research"] .expand-text {
    color: #3b82f6;
}

.roadmap-node[data-category="legal"] .expand-text {
    color: #ef4444;
}

.roadmap-node[data-category="setup"] .expand-text {
    color: #f97316;
}

.roadmap-node[data-category="operations"] .expand-text {
    color: #eab308;
}

/* Colored Dots */
.node-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.purple-dot {
    background: var(--primary-color);
}

.green-dot {
    background: var(--success-color);
}

.blue-dot {
    background: var(--primary-color);
}

/* Connection Lines - White SVG paths */
.roadmap-tree::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.roadmap-tree svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    /* Scale with container - coordinates will be recalculated on resize */
}

.roadmap-tree svg path {
    stroke: white;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}


/* Responsive */
@media (max-width: 1024px) {
    .roadmap-flowchart {
        min-width: 100%;
    }
    
    .roadmap-row {
        min-height: 100px;
    }
    
    .roadmap-step {
        position: relative;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-bottom: 1rem;
    }
    
    .roadmap-node {
        min-width: 200px;
        max-width: 100%;
    }
    
    .roadmap-node.session-node {
        min-width: 200px;
        max-width: 100%;
    }
    
    .session-topics {
        font-size: 0.9rem;
    }
    
    .roadmap-tree svg {
        display: none;
    }
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid var(--success-color);
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid var(--error-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
}

.auth-card h1 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pricing Page Styles */
.pricing-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.pricing-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.pricing-hero p {
    font-size: 1.25rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.pricing-section {
    padding: 5rem 0;
}

.pricing-section-alt {
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Roadmap Pricing Grid */
.roadmap-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2.5rem;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.pricing-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #60a5fa);
    border-radius: 0.75rem 0.75rem 0 0;
}

.badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: linear-gradient(135deg, var(--primary-color), #60a5fa);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.pricing-card-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.pricing-card-header h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.price .currency {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 500;
}

.price .amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.price .period {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.pricing-features li {
    padding: 0.875rem 0;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    line-height: 1.5;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.feature-icon {
    color: var(--primary-color);
    font-weight: 700;
    margin-right: 0.75rem;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.btn-block {
    width: 100%;
    text-align: center;
    display: block;
    margin-top: auto;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
}

/* Single Subscription Wrapper */
.single-subscription-wrapper {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Subscription Grid */
.subscription-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.subscription-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 3rem;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.subscription-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.subscription-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.subscription-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #60a5fa);
    border-radius: 0.75rem 0.75rem 0 0;
}

.subscription-header {
    margin-bottom: 2rem;
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.subscription-header h3 {
    color: var(--text-color);
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.price-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.subscription-features {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.subscription-features li {
    padding: 0.875rem 0;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    line-height: 1.5;
}

.subscription-features li:last-child {
    border-bottom: none;
}

.subscription-features .feature-icon {
    color: var(--primary-color);
    font-weight: 700;
    margin-right: 0.75rem;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Roadmap Selection */
.roadmap-selection {
    margin-bottom: 2rem;
}

.selection-label {
    display: block;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.roadmap-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-bottom: 1rem;
}

.roadmap-buttons::-webkit-scrollbar {
    width: 6px;
}

.roadmap-buttons::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 3px;
}

.roadmap-buttons::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.roadmap-buttons::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.roadmap-button {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
}

.roadmap-button:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.roadmap-button.selected {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.roadmap-button.selected .roadmap-check {
    opacity: 1;
    transform: scale(1);
}

.roadmap-button-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-right: 0.5rem;
}

.roadmap-name {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.roadmap-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.roadmap-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.roadmap-button.selected .roadmap-check {
    opacity: 1;
    transform: scale(1);
}

.selected-count {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.selected-count span {
    color: var(--primary-color);
    font-weight: 600;
}

/* FAQ Section */
.pricing-faq {
    padding: 5rem 0;
    background: var(--bg-light);
}

.pricing-faq .section-title {
    margin-bottom: 3rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.faq-item h4 {
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.faq-item p {
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .pricing-hero h1 {
        font-size: 2rem;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .roadmap-pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .subscription-grid {
        grid-template-columns: 1fr;
    }
    
    .single-subscription-wrapper {
        max-width: 100%;
    }
    
    .subscription-grid {
        grid-template-columns: 1fr;
    }
    
    .roadmap-buttons {
        grid-template-columns: 1fr;
        max-height: 250px;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-6px);
    }
    
    .pricing-hero h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

/* Pathway Selector Styles - white background, black text; same column as .roadmap-header-content + SVG */
.pathway-selector-container {
    max-width: 1400px;
    margin: 0 auto 1.5rem;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.pathway-selector {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.25rem 1.25rem;
}

.pathway-selector h3 {
    color: #000000;
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.pathway-selector > p {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.pathway-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.pathway-card {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.1rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.pathway-card:hover {
    border-color: var(--primary-color);
    background: #f1f5f9;
}

.pathway-card.active {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.pathway-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.pathway-card h4 {
    color: #000000;
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
}

.pathway-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid #3b82f6;
    border-radius: 1rem;
    font-size: 0.75rem;
    color: #1d4ed8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* Responsive pathway selector - mobile: 3 per row, smaller */
@media (max-width: 768px) {
    .pathway-selector {
        padding: 0.75rem 0.5rem;
    }
    
    .pathway-selector h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .pathway-selector > p {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
    
    .pathway-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.4rem;
    }
    
    .pathway-card {
        padding: 0.5rem 0.35rem;
        gap: 0.35rem;
    }
    
    .pathway-icon {
        font-size: 1.25rem;
        margin-bottom: 0;
    }
    
    .pathway-card h4 {
        font-size: 0.7rem;
        line-height: 1.2;
    }
    
    .pathway-type-badge {
        padding: 0.15rem 0.4rem;
        font-size: 0.6rem;
        margin-top: 0.1rem;
    }
}

/* Dashboard & Roadmap Pathway Badges */
.pathway-badges-container {
    margin: 1rem 0;
    padding: 0.85rem 1rem;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 55%),
                radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.14), transparent 55%),
                rgba(15, 23, 42, 0.95);
    border-radius: 0.85rem;
    border: 1px solid rgba(51, 65, 85, 0.9);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.8);
}

.pathway-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.pathway-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: center;
}

.pathway-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.35), transparent 65%),
                radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.28), transparent 65%),
                rgba(15, 23, 42, 1);
    border: 1px solid rgba(59, 130, 246, 0.8);
    border-radius: 999px;
    font-size: 0.8rem;
    color: #e5e7eb;
    font-weight: 500;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(4px);
}

.pathway-icon-small {
    font-size: 1rem;
    line-height: 1;
}

/* Responsive pathway badges */
@media (max-width: 768px) {
    .pathway-badges {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pathway-badge {
        justify-content: center;
    }
}

/* Roadmap view pages: light page chrome (no navy body strip behind content) */
body.roadmap-view-page {
    background-color: #ffffff;
    color: #0f172a;
}

/* Roadmap view pages: navbar shows only logo + profile button */
body.roadmap-view-page .nav-toggle,
body.roadmap-view-page .nav-overlay,
body.roadmap-view-page .nav-links {
    display: none !important;
}
body.roadmap-view-page .nav-right > #signin-link,
body.roadmap-view-page .nav-right > #signup-link {
    display: none !important;
}

/* Mobile sidebar navigation (index + all pages with .sidebar-nav) */
.index-page .nav-toggle,
.sidebar-nav .nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.9rem;
}

.index-page .nav-toggle:hover,
.sidebar-nav .nav-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.index-page .nav-close,
.sidebar-nav .nav-close {
    display: none;
    background: #ffffff;
    border: none;
    color: #000000;
    font-size: 1.4rem;
    cursor: pointer;
}

.index-page .nav-overlay,
.sidebar-nav .nav-overlay {
    display: none;
}

/* No navy sliver: index body is white; hide navbar border so no dark line shows */
body.index-page .navbar {
    border-bottom-color: transparent;
}

@media (max-width: 768px) {
    .index-page .navbar .container,
    .sidebar-nav .navbar .container {
        justify-content: space-between;
        gap: 0.75rem;
        flex-wrap: nowrap;
    }

    /* Order: hamburger | logo + Solo Plot | sign-in */
    .index-page .nav-toggle,
    .sidebar-nav .nav-toggle {
        order: 1;
    }
    .index-page .nav-brand,
    .sidebar-nav .nav-brand {
        order: 2;
        flex: 0 1 auto;
        margin-bottom: 0;
    }
    .index-page .nav-right,
    .sidebar-nav .nav-right {
        order: 3;
        margin-left: 0;
        flex-shrink: 0; /* Prevent profile/sign-in/signup from being squeezed off on mobile */
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
    }

    /* Push sign-in/profile/signup to far right of navbar row */
    .index-page #signin-link,
    .sidebar-nav #signin-link,
    .index-page #signup-link,
    .sidebar-nav #signup-link,
    .index-page #profile-icon,
    .sidebar-nav #profile-icon {
        margin-left: auto;
    }
    
    .index-page .nav-right #signin-link,
    .sidebar-nav .nav-right #signin-link { margin-left: 0; }
    .index-page .nav-right #signup-link,
    .sidebar-nav .nav-right #signup-link { margin-left: 0; }
    .index-page .nav-right #profile-icon,
    .sidebar-nav .nav-right #profile-icon { margin-left: 0; }
    
    /* Login and signup button size on mobile */
    .index-page #signin-link,
    .sidebar-nav #signin-link,
    .index-page #signup-link,
    .sidebar-nav #signup-link {
        padding: 0.38rem 0.7rem !important;
        font-size: 0.8rem !important;
    }
    
    .index-page .nav-profile-icon,
    .sidebar-nav .nav-profile-icon {
        width: 1.85rem !important;
        height: 1.85rem !important;
        min-width: 1.85rem;
        min-height: 1.85rem;
    }

    /* Turn main nav links into an off-canvas sidebar (fixed sliding panel from the left) */
    .index-page .nav-links,
    .sidebar-nav .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 50vw;
        max-width: 420px;
        padding: 3.25rem 1.25rem;
        height: 100vh;
        overflow-y: auto;
        background: #f9fafb;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 120;
        box-shadow: 8px 0 24px rgba(15, 23, 42, 0.3);
    }

    /* Log in / Sign up at top of sidebar on mobile */
    .index-page .nav-links .sidebar-auth-buttons,
    .sidebar-nav .nav-links .sidebar-auth-buttons {
        display: flex !important;
        width: 100%;
        margin-bottom: 0.25rem;
    }
    .index-page .nav-links .sidebar-auth-buttons .btn,
    .sidebar-nav .nav-links .sidebar-auth-buttons .btn {
        background: #f3f4f6 !important;
        color: #0f172a !important;
        border: 1px solid #0f172a !important;
    }
    .index-page .nav-links .sidebar-auth-buttons .btn.btn-primary,
    .sidebar-nav .nav-links .sidebar-auth-buttons .btn.btn-primary {
        background: var(--primary-color) !important;
        color: #ffffff !important;
        border: none !important;
    }

    .index-page .nav-links .sidebar-auth-buttons .btn.btn-primary:hover,
    .sidebar-nav .nav-links .sidebar-auth-buttons .btn.btn-primary:hover {
        background: var(--primary-dark) !important;
        color: #ffffff !important;
        transform: translateY(-2px);
    }
    /* Hide bar sign-in/signup on mobile so only sidebar ones show */
    .index-page .nav-right > #signin-link,
    .sidebar-nav .nav-right > #signin-link,
    .index-page .nav-right > #signup-link,
    .sidebar-nav .nav-right > #signup-link {
        display: none !important;
    }

    /* Floating round close button in top-right transparent area (only when menu is open) */
    .index-page.nav-open .nav-close,
    .sidebar-nav.nav-open .nav-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 0.9rem;
        right: 0.9rem; /* top-right corner over transparent side */
        width: 36px;
        height: 36px;
        border-radius: 999px;
        background: #ffffff;
        border: 2px solid #0f172a;
        color: #0f172a;
        font-size: 1.2rem;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.45);
        z-index: 130; /* above overlay and sidebar */
    }

    .index-page .nav-links a,
    .sidebar-nav .nav-links a {
        width: 100%;
        color: #000000 !important;
    }

    .index-page .nav-links .btn,
    .sidebar-nav .nav-links .btn {
        background: #f3f4f6 !important;
        color: #000000 !important;
        border: 1px solid #000000 !important;
        padding: 0.4rem 0.75rem !important;
        font-size: 0.8rem !important;
    }

    .index-page .nav-toggle,
    .sidebar-nav .nav-toggle {
        display: inline-flex;
    }

    .index-page .nav-overlay,
    .sidebar-nav .nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 50vw; /* right-hand half of the screen */
        background: rgba(2, 6, 23, 0.45); /* semi-transparent so index page shows through */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
        z-index: 110;
    }

    .index-page.nav-open .nav-links,
    .sidebar-nav.nav-open .nav-links {
        transform: translateX(0);
    }

    .index-page.nav-open .nav-overlay,
    .sidebar-nav.nav-open .nav-overlay {
        opacity: 1;
        visibility: visible;
    }

    /* Prevent background page from scrolling when sidebar is open */
    body.index-page.nav-open,
    body.sidebar-nav.nav-open {
        overflow: hidden;
        height: 100vh;
    }
}

@media (min-width: 769px) {
    /* Desktop: keep standard horizontal nav and hide overlay/toggle */
    .index-page .nav-links,
    .sidebar-nav .nav-links {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        transform: none;
        background: transparent;
        padding: 0;
        box-shadow: none;
        flex-direction: row;
        align-items: center;
        width: auto;
        max-width: none;
        max-height: none;
        overflow: visible;
        border-radius: 0;
    }

    .index-page .nav-overlay,
    .sidebar-nav .nav-overlay {
        display: none !important;
    }

    .index-page .nav-toggle,
    .sidebar-nav .nav-toggle {
        display: none !important;
    }
}

/* Landing spotlight inside bordered boxes (roadmaps, tools, simulations) */
.page-spotlight {
    display: grid;
    grid-template-columns: 1fr min(44%, 420px);
    gap: 2rem;
    align-items: center;
}

.page-spotlight-copy h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.75rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.page-spotlight-copy > p.lead {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 1rem;
}

.page-spotlight-list {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}

.page-spotlight-list li {
    position: relative;
    padding-left: 1.65rem;
    margin-bottom: 0.55rem;
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.5;
}

.page-spotlight-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.page-spotlight-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.page-spotlight-visual {
    margin: 0;
}

.page-spotlight-visual img {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 0.65rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

@media (max-width: 768px) {
    .page-spotlight {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .page-spotlight-visual {
        order: -1;
    }

    .page-spotlight-visual img {
        max-width: min(100%, 360px);
    }
}

