/* =========================================================
   CIF Project Preparation Simulator - UN-Habitat Theme v3
   Styled to match pb.unhabitat.org & citiesinvestmentfacility.org
   ========================================================= */

/* ---- CSS Custom Properties (CIF Brand) ---- */
:root {
    --cif-primary: #203266;
    --cif-blue: #203266;
    --cif-footer: #203266;
    --cif-orange: #F2692C;
    --cif-yellow: #F99E27;
    --cif-grey: #F4F5F8;
    --cif-bright-grey: #E9ECF2;
    --un-blue: #0072BC;
    --un-blue-light: #009EDB;
    --un-blue-dark: #192545;
    --un-blue-darker: #0f1a33;
    --accent: #F2692C;
    --phase-ideation: #2C3E50;
    --phase-feasibility: #FFD966;
    --phase-development: #E69138;
    --phase-financial: #D35400;
    --phase-cif: #192545;
    --bg-body: #F4F5F8;
    --bg-white: #FFFFFF;
    --bg-light: #F4F5F8;
    --text-dark: #192545;
    --text-mid: #495057;
    --text-light: #6c757d;
    --border: #E9ECF2;
    --border-light: #F0F0F0;
    --shadow-sm: 0 1px 3px rgba(25,37,69,0.06);
    --shadow: 0 2px 10px rgba(25,37,69,0.08);
    --shadow-lg: 0 8px 30px rgba(25,37,69,0.12);
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --transition: 0.3s ease;
    --header-h: 68px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-body);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--cif-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #b0bec5; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #90a4ae; }


/* ============================================================
   LANDING PAGE
   ============================================================ */

.lp-body { background: var(--cif-grey); }

/* ---- LP Header ---- */
.lp-header {
    background: #fff;
    color: var(--cif-primary);
    height: var(--header-h);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.lp-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 100%;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.lp-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.lp-logo-img {
    height: 46px;
    width: auto;
    display: block;
}
.lp-brand-title { font-size: 18px; font-weight: 700; line-height: 1.2; letter-spacing: 0.2px; color: var(--cif-primary); }
.lp-brand-sub { font-size: 10px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 400; }
.lp-nav-btn {
    display: inline-block;
    color: #fff;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    background: var(--cif-primary);
    border: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: var(--transition);
    text-decoration: none;
    text-transform: uppercase;
}
.lp-nav-btn:hover { background: #2d3f7a; text-decoration: none; color: #fff; transform: translateY(-1px); }
.lp-nav-btn.lp-nav-btn--secondary { background: var(--cif-orange); }
.lp-nav-btn.lp-nav-btn--secondary:hover { background: #d85a24; }

/* ---- LP Hero ---- */
.lp-hero {
    position: relative;
    background: var(--cif-primary);
    color: #fff;
    padding: 0;
    overflow: hidden;
    text-align: left;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.lp-hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('Expanding-Adequate-and-Affordable-Housing-in-Hawassa-City-Through-Localized-Land-and-Housing-Policy-Implementation-300x200.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.35);
    z-index: 0;
}
.lp-hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0;
    padding: 80px 48px 90px;
}
.lp-hero-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.lp-hero-subtitle {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.75;
    margin-bottom: 32px;
    font-weight: 400;
    text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
.lp-hero-cta {
    display: inline-block;
    background: var(--cif-orange);
    color: #fff;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 16px rgba(242,105,44,0.35);
}
.lp-hero-cta:hover { background: #d85a24; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(242,105,44,0.4); text-decoration: none; color: #fff; }

/* Skyline silhouette (hidden since we use photo bg now) */
.lp-hero-skyline { display: none; }
.lp-sky-b { display: none; }

/* ---- LP Facts Strip ---- */
.lp-facts {
    background: var(--cif-primary);
    color: #fff;
    padding: 0 24px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.lp-facts.visible { opacity: 1; transform: translateY(0); }
.lp-facts-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 20px 0;
}
.lp-fact {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 32px;
}
.lp-fact strong { font-size: 28px; font-weight: 900; line-height: 1; color: var(--cif-yellow); }
.lp-fact span { font-size: 11px; opacity: 0.7; text-transform: uppercase; letter-spacing: 1px; font-weight: 400; margin-top: 3px; }
.lp-fact-sep {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.15);
}

/* ---- LP Role Selection ---- */
.lp-roles {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px 48px;
}
.lp-section-header {
    text-align: center;
    margin-bottom: 40px;
}
.lp-section-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--cif-primary);
    margin-bottom: 8px;
}
.lp-section-header p {
    font-size: 15px;
    color: var(--text-mid);
    max-width: 540px;
    margin: 0 auto;
}
.lp-roles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.lp-roles-grid .lp-role-card:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 540px;
    justify-self: center;
    width: 100%;
}

/* Role Card */
.lp-role-card {
    display: flex;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.5s ease;
    opacity: 0;
    transform: translateY(24px);
}
.lp-role-card.visible { opacity: 1; transform: translateY(0); }
.lp-role-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}
.lp-card-accent {
    width: 5px;
    background: var(--card-color);
    flex-shrink: 0;
}
.lp-card-body {
    padding: 24px 20px;
    flex: 1;
}
.lp-card-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius);
    background: var(--card-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.lp-card-icon .material-icons-outlined { font-size: 26px; }
.lp-card-body h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--cif-primary);
    margin-bottom: 6px;
}
.lp-card-body p {
    font-size: 13.5px;
    color: var(--text-mid);
    line-height: 1.5;
    margin-bottom: 16px;
}
.lp-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--card-color);
    transition: gap 0.2s;
}
.lp-role-card:hover .lp-card-btn { gap: 10px; }
.lp-card-btn .material-icons-outlined { font-size: 16px; }

/* ---- LP Full Pipeline CTA ---- */
.lp-pipeline-cta {
    max-width: 1100px;
    margin: 0 auto 48px;
    padding: 0 24px;
}
.lp-pipeline-inner {
    background: var(--cif-primary);
    color: #fff;
    border-radius: var(--radius);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
}
.lp-pipeline-icon { font-size: 42px; flex-shrink: 0; opacity: 0.8; }
.lp-pipeline-text { flex: 1; }
.lp-pipeline-text h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.lp-pipeline-text p { font-size: 13px; opacity: 0.8; }
.lp-pipeline-btn {
    display: inline-block;
    background: var(--cif-orange);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    transition: var(--transition);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.lp-pipeline-btn:hover { background: #d85a24; transform: translateY(-2px); text-decoration: none; color: #fff; }

/* ---- LP Footer ---- */
.lp-footer {
    background: var(--cif-footer);
    color: rgba(255,255,255,0.6);
    padding: 24px;
    text-align: center;
    font-size: 12px;
}
.lp-footer-inner { max-width: 1200px; margin: 0 auto; }


/* ============================================================
   SIMULATOR (shared across all simulation views)
   ============================================================ */

/* ---- Breadcrumb ---- */
.sim-breadcrumb {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
}
.sim-breadcrumb-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-mid);
}
.sim-bc-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--cif-blue);
    font-weight: 500;
    text-decoration: none;
}
.sim-bc-link:hover { text-decoration: underline; }
.sim-bc-link .material-icons-outlined { font-size: 16px; }
.sim-bc-sep { color: #ccc; font-size: 16px; }
.sim-bc-current { font-weight: 600; color: var(--cif-primary); }
.sim-bc-right {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--cif-blue);
    font-weight: 500;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-light);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.sim-bc-right:hover { background: var(--cif-bright-grey); text-decoration: none; }
.sim-bc-right .material-icons-outlined { font-size: 16px; }

/* ---- Role Description Panel ---- */
.sim-role-panel {
    max-width: 1440px;
    margin: 12px auto 0;
    padding: 0 24px;
}
.sim-role-panel-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 14px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.sim-role-panel-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.sim-role-panel-icon .material-icons-outlined { font-size: 24px; }
.sim-role-panel-content { flex: 1; }
.sim-role-panel-content h3 { font-size: 15px; font-weight: 700; color: var(--cif-primary); margin-bottom: 2px; }
.sim-role-panel-content p { font-size: 12.5px; color: var(--text-mid); line-height: 1.5; }
.sim-role-panel-stats { display: flex; gap: 16px; flex-shrink: 0; }
.sim-role-stat { text-align: center; padding: 0 12px; }
.sim-role-stat strong { display: block; font-size: 22px; font-weight: 800; color: var(--cif-primary); }
.sim-role-stat span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); }

/* ---- Header ---- */
.sim-header {
    background: var(--cif-primary);
    color: #fff;
    height: var(--header-h);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(25,37,69,0.2);
}
.sim-header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sim-header-brand { display: flex; align-items: center; gap: 14px; }
.sim-logo-img {
    height: 46px;
    width: auto;
    display: block;
}
.sim-header-title h1 { font-size: 18px; font-weight: 700; letter-spacing: 0.2px; line-height: 1.2; }
.sim-header-title p { font-size: 11px; opacity: 0.7; font-weight: 400; letter-spacing: 0.5px; text-transform: uppercase; }
.sim-nav-link {
    color: #fff; display: flex; align-items: center; gap: 6px;
    padding: 8px 18px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    font-size: 13px; font-weight: 500; transition: var(--transition); text-decoration: none;
}
.sim-nav-link:hover { background: rgba(255,255,255,0.15); text-decoration: none; }
.sim-nav-link .material-icons-outlined { font-size: 16px; }

/* ---- Controls Bar ---- */
.sim-controls {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: var(--header-h);
    z-index: 90;
}
.sim-controls-inner {
    max-width: 1440px; margin: 0 auto; padding: 10px 24px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.sim-controls-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sim-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; border: none; transition: var(--transition); white-space: nowrap;
}
.sim-btn .material-icons-outlined { font-size: 18px; }
.sim-btn-primary { background: var(--cif-blue); color: #fff; }
.sim-btn-primary:hover { background: #2d55c4; }
.sim-btn-secondary { background: var(--cif-orange); color: #fff; }
.sim-btn-secondary:hover { background: #d85a24; }
.sim-btn-outline { background: transparent; color: var(--text-mid); border: 1px solid var(--border); }
.sim-btn-outline:hover { background: var(--bg-light); border-color: #ccc; }
.sim-speed-control { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-mid); margin-left: 8px; }
.sim-speed-control select { padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-family: inherit; background: #fff; cursor: pointer; }
.sim-month-display {
    display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-mid);
    background: var(--bg-light); padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border);
}
.sim-month-display .material-icons-outlined { font-size: 18px; color: var(--cif-blue); }
.sim-month-display strong { color: var(--cif-blue); font-size: 16px; }

/* ---- City Skyline ---- */
.sim-city-section { max-width: 1440px; margin: 16px auto; padding: 0 24px; }
.sim-city-container { position: relative; height: 320px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.sim-sky { position: absolute; top: 0; left: 0; right: 0; bottom: 65px; background: linear-gradient(180deg, #5B9BD5 0%, #87CEEB 35%, #B0DEF5 65%, #DCF0FF 100%); overflow: hidden; }
.sim-sun { position: absolute; top: 15%; right: 8%; width: 48px; height: 48px; background: radial-gradient(circle, #FFF59D 0%, #FFD54F 50%, #FFB300 100%); border-radius: 50%; box-shadow: 0 0 40px rgba(255,193,7,0.5), 0 0 80px rgba(255,193,7,0.2); }
.sim-cloud { position: absolute; background: rgba(255,255,255,0.85); border-radius: 40px; }
.sim-cloud::before, .sim-cloud::after { content: ''; position: absolute; background: inherit; border-radius: inherit; }
.sim-cloud-1 { width: 90px; height: 28px; top: 18%; left: -100px; animation: simFloat 50s linear infinite; }
.sim-cloud-1::before { width: 50px; height: 34px; top: -14px; left: 15px; }
.sim-cloud-1::after { width: 40px; height: 22px; top: -8px; left: 50px; }
.sim-cloud-2 { width: 70px; height: 22px; top: 8%; left: -80px; animation: simFloat 60s linear infinite; animation-delay: -18s; }
.sim-cloud-2::before { width: 40px; height: 28px; top: -12px; left: 12px; }
.sim-cloud-2::after { width: 32px; height: 18px; top: -6px; left: 38px; }
.sim-cloud-3 { width: 110px; height: 30px; top: 30%; left: -120px; animation: simFloat 70s linear infinite; animation-delay: -35s; }
.sim-cloud-3::before { width: 60px; height: 38px; top: -16px; left: 18px; }
.sim-cloud-3::after { width: 48px; height: 24px; top: -10px; left: 56px; }
@keyframes simFloat { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 250px)); } }
.sim-ground { position: absolute; bottom: 0; left: 0; right: 0; height: 65px; background: linear-gradient(to bottom, #7CB342, #558B2F); }
.sim-road { position: absolute; top: 15px; left: 0; right: 0; height: 22px; background: #546E7A; box-shadow: inset 0 2px 0 rgba(255,255,255,0.08), inset 0 -2px 0 rgba(0,0,0,0.2); }
.sim-road::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: repeating-linear-gradient(to right, #FFE082 0px, #FFE082 20px, transparent 20px, transparent 40px); transform: translateY(-50%); }
.sim-buildings { position: absolute; bottom: 65px; left: 0; right: 0; height: calc(100% - 65px); z-index: 5; }
.sim-phase-markers { position: absolute; bottom: 0; left: 0; right: 0; height: 10px; z-index: 6; display: flex; }
.sim-phase-marker { height: 100%; position: relative; opacity: 0.7; }
.sim-phase-marker-label { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #fff; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.sim-city-overlay { position: absolute; inset: 0; background: rgba(25,37,69,0.35); display: flex; align-items: center; justify-content: center; z-index: 10; transition: opacity 0.5s ease; cursor: pointer; }
.sim-city-overlay.hidden { opacity: 0; pointer-events: none; }
.sim-city-message { text-align: center; color: #fff; padding: 24px 40px; background: rgba(25,37,69,0.8); border-radius: var(--radius); backdrop-filter: blur(4px); }
.sim-city-message .material-icons-outlined { font-size: 48px; margin-bottom: 8px; display: block; }
.sim-city-message p { font-size: 14px; max-width: 320px; }

/* ---- Buildings ---- */
.sim-building {
    position: absolute; bottom: 0; display: flex; flex-direction: column; align-items: center; cursor: pointer;
    transform: translateY(20px) scaleY(0); transform-origin: bottom center; opacity: 0;
    transition: transform 0.7s cubic-bezier(0.34,1.56,0.64,1), opacity 0.5s ease, filter 0.3s ease; z-index: 1;
}
.sim-building.visible { opacity: 1; transform: translateY(0) scaleY(1); }
.sim-building.active { z-index: 3; }
.sim-building.active .sim-building-body { box-shadow: 0 0 16px rgba(249,158,39,0.6); }
.sim-building.completed .sim-building-body { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.sim-building:hover { z-index: 20; filter: brightness(1.12); }
.sim-building:hover .sim-building-tooltip { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.sim-building-body { width: var(--bw); height: var(--bh); background: var(--bc); border-radius: 2px 2px 0 0; position: relative; transition: box-shadow 0.3s ease; }
.sim-building-body::after { content: ''; position: absolute; top: 8px; left: 4px; right: 7px; bottom: 4px; background: repeating-linear-gradient(to bottom, transparent 0px, transparent 7px, rgba(255,255,200,0.3) 7px, rgba(255,255,200,0.3) 10px), repeating-linear-gradient(to right, transparent 0px, transparent 9px, rgba(255,255,200,0.3) 9px, rgba(255,255,200,0.3) 12px); }
.sim-building-body::before { content: ''; position: absolute; right: -5px; top: 2px; width: 5px; height: 100%; background: rgba(0,0,0,0.18); transform: skewY(-45deg); transform-origin: top left; }
.sim-roof { position: relative; }
.sim-roof-pointed { width: 0; height: 0; border-left: calc(var(--bw)/2 + 3px) solid transparent; border-right: calc(var(--bw)/2 + 3px) solid transparent; border-bottom: 14px solid var(--bc); filter: brightness(1.08); }
.sim-roof-dome { width: calc(var(--bw)*0.6); height: calc(var(--bw)*0.25); background: var(--bc); border-radius: 100px 100px 0 0; filter: brightness(1.1); }
.sim-roof-antenna { width: 2px; height: 20px; background: #78909C; }
.sim-roof-antenna::after { content: ''; position: absolute; top: -1px; left: -3px; width: 8px; height: 8px; background: #ef5350; border-radius: 50%; box-shadow: 0 0 6px rgba(239,83,80,0.6); animation: simBlink 2s infinite; }
@keyframes simBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.sim-roof-flag { width: 2px; height: 24px; background: #546E7A; position: relative; }
.sim-roof-flag::after { content: ''; position: absolute; top: 0; left: 2px; width: 16px; height: 10px; background: var(--cif-blue); clip-path: polygon(0 0, 100% 25%, 100% 75%, 0 100%); }
.sim-building-tooltip { position: absolute; bottom: calc(var(--bh) + 30px); left: 50%; transform: translateX(-50%) translateY(0); background: rgba(25,37,69,0.92); color: #fff; padding: 5px 12px; border-radius: 5px; font-size: 11px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 30; }
.sim-building-tooltip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: rgba(25,37,69,0.92); }
.sim-building.park-building .sim-building-body { background: #66BB6A; border-radius: 50% 50% 0 0; }
.sim-building.park-building .sim-building-body::after, .sim-building.park-building .sim-building-body::before { display: none; }

/* ---- Progress Bar ---- */
.sim-progress-section { max-width: 1440px; margin: 0 auto 16px; padding: 0 24px; }
.sim-progress-inner { background: var(--bg-white); border-radius: var(--radius); padding: 14px 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.sim-progress-info { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-mid); margin-bottom: 8px; }
.sim-progress-pct { color: var(--cif-blue); font-weight: 600; }
.sim-progress-bar { height: 8px; background: var(--cif-bright-grey); border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.sim-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--cif-blue), var(--cif-orange)); border-radius: 10px; transition: width 0.5s ease; }
.sim-legend { display: flex; flex-wrap: wrap; gap: 16px; }
.sim-legend-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-light); }
.sim-legend-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---- Main Panel ---- */
.sim-main { max-width: 1440px; margin: 0 auto 20px; padding: 0 24px; display: grid; grid-template-columns: 300px 1fr; gap: 16px; min-height: 400px; }
.sim-sidebar { background: var(--bg-white); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow-y: auto; max-height: 600px; }
.sim-sidebar-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; padding: 16px 16px 12px; border-bottom: 1px solid var(--border); color: var(--cif-primary); position: sticky; top: 0; background: var(--bg-white); z-index: 5; }
.sim-sidebar-title .material-icons-outlined { font-size: 20px; color: var(--cif-blue); }
.sim-phase-group { border-bottom: 1px solid var(--border-light); }
.sim-phase-group:last-child { border-bottom: none; }
.sim-phase-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; transition: background 0.2s; user-select: none; }
.sim-phase-header:hover { background: var(--bg-light); }
.sim-phase-arrow { font-size: 18px; color: var(--text-light); transition: transform 0.3s; }
.sim-phase-group.expanded .sim-phase-arrow { transform: rotate(0deg); }
.sim-phase-group:not(.expanded) .sim-phase-arrow { transform: rotate(-90deg); }
.sim-phase-icon { font-size: 18px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: #fff; flex-shrink: 0; }
.sim-phase-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--cif-primary); }
.sim-phase-count { font-size: 11px; color: var(--text-light); background: var(--bg-light); padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.sim-phase-steps { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.sim-phase-group.expanded .sim-phase-steps { max-height: 1000px; }
.sim-step-item { display: flex; align-items: flex-start; gap: 8px; padding: 7px 14px 7px 52px; cursor: pointer; transition: background 0.2s; font-size: 12.5px; color: var(--text-mid); line-height: 1.4; }
.sim-step-item:hover { background: var(--bg-light); }
.sim-step-item .material-icons-outlined { font-size: 17px; margin-top: 1px; flex-shrink: 0; }
.sim-step-item.pending .material-icons-outlined { color: #CBD5E0; }
.sim-step-item.active .material-icons-outlined { color: var(--cif-yellow); }
.sim-step-item.active { background: #FFF8E1; color: var(--cif-primary); font-weight: 500; }
.sim-step-item.completed .material-icons-outlined { color: #4CAF50; }
.sim-step-item.completed { color: var(--text-light); }
.sim-step-item.completed .sim-step-name { text-decoration: line-through; text-decoration-color: #ccc; }
.sim-cif-section { padding: 12px 14px; border-top: 2px solid var(--cif-primary); margin-top: 4px; }
.sim-cif-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--cif-primary); margin-bottom: 10px; }
.sim-cif-title .material-icons-outlined { font-size: 18px; }
.sim-cif-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 12px; }
.sim-cif-item .material-icons-outlined { font-size: 18px; margin-top: 2px; }
.sim-cif-item strong { display: block; font-size: 12.5px; color: var(--cif-primary); }
.sim-cif-item small { color: var(--text-light); line-height: 1.4; }

/* ---- Gantt Chart ---- */
.sim-gantt-section { background: var(--bg-white); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; }
.sim-gantt-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--cif-primary); flex-shrink: 0; }
.sim-gantt-title .material-icons-outlined { font-size: 20px; color: var(--cif-blue); }
.sim-gantt-container { overflow: auto; flex: 1; max-height: 520px; }
.sim-gantt-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--border-light); min-height: 28px; }
.sim-gantt-row:hover { background: #FAFBFE; }
.sim-gantt-row.gantt-header { position: sticky; top: 0; z-index: 5; background: var(--bg-light); font-weight: 600; font-size: 11px; color: var(--text-mid); border-bottom: 2px solid var(--border); }
.sim-gantt-row.gantt-header:hover { background: var(--bg-light); }
.sim-gantt-row.cif-row { border-top: 2px solid var(--cif-primary); }
.sim-gantt-row.gantt-milestone { background: #FFFDE7; }
.sim-gantt-row.gantt-milestone:hover { background: #FFF9C4; }
.sim-gantt-label { position: sticky; left: 0; width: 200px; min-width: 200px; padding: 4px 10px; font-size: 11.5px; color: var(--text-mid); background: inherit; z-index: 3; border-right: 2px solid var(--border); display: flex; align-items: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.sim-gantt-row.gantt-header .sim-gantt-label { background: var(--bg-light); cursor: default; }
.sim-gantt-label:hover { color: var(--cif-blue); }
.sim-gantt-cells { display: flex; flex: 1; }
.sim-gantt-cell { width: 30px; min-width: 30px; height: 100%; min-height: 28px; border-right: 1px solid var(--border-light); position: relative; transition: background 0.3s; }
.sim-gantt-cell.month-header { display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: var(--text-light); }
.sim-gantt-cell.current-month { background: rgba(56,101,220,0.08) !important; }
.sim-gantt-cell.current-month.month-header { background: rgba(56,101,220,0.15) !important; color: var(--cif-blue); }
.sim-gantt-cell.bar-active { position: relative; }
.sim-gantt-cell.bar-active::after { content: ''; position: absolute; inset: 3px 1px; border-radius: 2px; background: var(--bar-color); transition: opacity 0.3s; }
.sim-gantt-cell.bar-future::after { opacity: 0.35; }
.sim-gantt-cell.bar-past::after { opacity: 1; }

/* Milestone markers */
.sim-gantt-cell.milestone-marker { position: relative; }
.sim-milestone-diamond {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    color: var(--marker-color, var(--cif-blue));
    font-size: 16px;
    line-height: 1;
}

/* ---- Detail Modal ---- */
.sim-modal-overlay { position: fixed; inset: 0; background: rgba(25,37,69,0.5); z-index: 200; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; backdrop-filter: blur(2px); }
.sim-modal-overlay.open { opacity: 1; pointer-events: auto; }
.sim-modal { background: var(--bg-white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 520px; max-width: 95vw; max-height: 80vh; overflow-y: auto; transform: translateY(20px) scale(0.95); transition: transform 0.3s ease; position: relative; }
.sim-modal-overlay.open .sim-modal { transform: translateY(0) scale(1); }
.sim-modal-close { position: absolute; top: 12px; right: 12px; background: none; border: none; color: var(--text-light); padding: 4px; border-radius: 50%; transition: var(--transition); }
.sim-modal-close:hover { background: var(--bg-light); color: var(--cif-primary); }
.sim-modal-header { padding: 24px 24px 16px; border-bottom: 1px solid var(--border); }
.sim-modal-phase { display: inline-block; padding: 3px 10px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #fff; margin-bottom: 8px; }
.sim-modal-header h3 { font-size: 18px; font-weight: 700; color: var(--cif-primary); line-height: 1.3; }
.sim-modal-body { padding: 16px 24px 24px; }
.sim-modal-row { margin-bottom: 16px; }
.sim-modal-row:last-child { margin-bottom: 0; }
.sim-modal-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); margin-bottom: 4px; }
.sim-modal-label .material-icons-outlined { font-size: 15px; }
.sim-modal-row p { font-size: 14px; color: var(--cif-primary); line-height: 1.6; }

/* ---- Completion Banner ---- */
.sim-completion { max-width: 1440px; margin: 0 auto 20px; padding: 0 24px; }
.sim-completion-inner { background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%); color: #fff; border-radius: var(--radius-lg); padding: 24px 30px; display: flex; align-items: center; gap: 20px; box-shadow: var(--shadow); animation: simSlideIn 0.6s ease; }
.sim-completion-inner .material-icons-outlined { font-size: 48px; flex-shrink: 0; }
.sim-completion-inner h3 { font-size: 18px; margin-bottom: 4px; }
.sim-completion-inner p { font-size: 13px; opacity: 0.9; }
.sim-completion-inner .sim-btn { margin-left: auto; flex-shrink: 0; background: #fff; color: #1B5E20; font-weight: 700; }
.sim-completion-inner .sim-btn:hover { background: #E8F5E9; }
@keyframes simSlideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---- Footer ---- */
.sim-footer { background: var(--cif-footer); color: rgba(255,255,255,0.6); padding: 20px 24px; text-align: center; font-size: 12px; }
.sim-footer-inner { max-width: 1440px; margin: 0 auto; }
.sim-footer a { color: var(--cif-yellow); }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .sim-main { grid-template-columns: 1fr; }
    .sim-sidebar { max-height: 300px; }
    .lp-roles-grid { grid-template-columns: 1fr; }
    .lp-roles-grid .lp-role-card:nth-child(5) { max-width: none; }
}
@media (max-width: 768px) {
    .sim-header-title h1 { font-size: 15px; }
    .sim-controls-inner { flex-direction: column; align-items: flex-start; }
    .sim-city-container { height: 250px; }
    .sim-btn span:not(.material-icons-outlined) { display: none; }
    .sim-btn { padding: 8px 10px; }
    .sim-gantt-label { width: 140px; min-width: 140px; font-size: 10px; }
    .sim-gantt-cell { width: 24px; min-width: 24px; }
    .sim-completion-inner { flex-direction: column; text-align: center; }
    .sim-completion-inner .sim-btn { margin-left: 0; }
    .sim-role-panel-inner { flex-direction: column; text-align: center; }
    .sim-role-panel-stats { justify-content: center; }
    .sim-breadcrumb-inner { flex-wrap: wrap; }
    .sim-bc-right { margin-left: 0; margin-top: 4px; }
    .lp-hero-title { font-size: 28px; }
    .lp-hero-subtitle { font-size: 14px; }
    .lp-facts-inner { flex-wrap: wrap; gap: 16px; }
    .lp-fact-sep { display: none; }
    .lp-pipeline-inner { flex-direction: column; text-align: center; }
    .lp-pipeline-btn { margin-top: 8px; }
}
@media (max-width: 480px) {
    .sim-header-inner { padding: 0 12px; }
    .sim-city-section, .sim-progress-section, .sim-main, .sim-completion, .sim-role-panel { padding: 0 12px; }
    .sim-city-container { height: 200px; }
    .lp-hero { min-height: 320px; }
    .lp-hero-title { font-size: 24px; }
    .lp-hero-content { padding: 50px 16px 60px; }
}

/* ---- Header nav gaps ---- */
.sim-header-nav { display: flex; align-items: center; gap: 8px; }
.lp-nav { display: flex; align-items: center; gap: 8px; }

@media (max-width: 600px) {
    /* Hide text labels in header nav — keep icon-only buttons */
    .sim-nav-label { display: none; }
    .lp-nav-label { display: none; }
    /* Tighten header brand on small screens */
    .sim-logo-img, .lp-logo-img { height: 34px; }
    .sim-header-title h1, .lp-brand-title { font-size: 13px; }
    .sim-header-title p, .lp-brand-sub { display: none; }
    .lp-header-inner { padding: 0 12px; }
    .sim-header-inner { padding: 0 12px; }
    /* Tighten nav buttons */
    .sim-nav-link, .lp-nav-btn { padding: 7px 10px; }
    /* Role panel compact */
    .sim-role-panel-stats { display: none; }
    /* Full pipeline CTA stacks nicely */
    .lp-pipeline-inner { padding: 20px 16px; }
}

@media (max-width: 380px) {
    .sim-header-title h1, .lp-brand-title { font-size: 11px; }
    .lp-hero-title { font-size: 20px; }
    .lp-fact strong { font-size: 22px; }
}

/* ---- Print ---- */
@media print {
    .sim-controls, .sim-city-overlay, .sim-modal-overlay, .sim-footer, .sim-breadcrumb, .sim-role-panel { display: none !important; }
    .sim-header { position: static; }
    .sim-city-container { height: 250px; }
    .sim-main { display: block; }
    .sim-sidebar, .sim-gantt-section { max-height: none; overflow: visible; }
}
