/* --- SIMULATOR WORKSPACE WRAPPER --- */
.main-workspace {
    max-width: 56rem;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* --- STRUCTURAL PAGE SPACING --- */
.workspace-header-container {
    max-width: 56rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem; 
}

.step-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.step-label {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    Xletter-spacing: 0.1em;
    color: var(--color-slate-400);
    margin: 0 0 0.5em 0;
}

.step-description {
    color: var(--color-slate-500);
    font-size: 0.95rem; /* text-sm */
    line-height: 1.625;
    font-weight: 500;
    margin: 0;
    max-width: 42rem;
}

/* --- STEP SECTION HEADER ROW --- */
.step-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* --- MINIMALIST HELP BUTTON --- */
.btn-help-trigger {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 1px solid var(--color-slate-200);
    color: var(--color-slate-500);
    font-size: 0.6875rem; /* 11px */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
}
.btn-help-trigger svg {
    width: 1.5em;
    height: 1.5em;fill: var(--color-slate-500);
}

.btn-help-trigger:hover {
    background-color: var(--color-slate-100);
    color: var(--color-slate-900);
    border-color: var(--color-slate-400);
}

/* --- RESOLUTION BANNER SUB-ELEMENTS (Manages children automatically) --- */
.resolution-banner h3 {
    font-size: 1.125rem;
    font-weight: 900;
    color: var(--color-slate-900);
    line-height: 1.25;
    margin: 0 0 0.5rem 0;
}

.resolution-banner p {
    color: var(--color-slate-500);
    font-size: 0.875rem;
    line-height: 1.625;
    font-weight: 500;
    margin: 0;
}

/* --- PAGE HEADER & BREADCRUMBS --- */
.workspace-header {
    background-color: #ffffff;
    padding: 2.5rem 1.5rem 3rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}
.breadcrumbs a {
    color: inherit;
    text-decoration: none;
}
.breadcrumbs a:hover {
    color: #0f172a;
}
.workspace-title {
    font-size: 3rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.025em;
    line-height: 1;
}

/* --- WORKSPACE CANVAS CARDS --- */
.workspace-card {
    width: 100%;
    background-color: #ffffff;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    Xbox-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.canvas-container {
    width: 100%;
    height: 14rem;
    background-color: #f0f7ff;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e2e8f0;
}
.canvas-container-tall {
    height: 16rem;
}

/* --- WORKSPACE LAYOUT GRIDS (Desktop First) --- */
.workspace-grid {
    padding: 2rem; 
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
.grid-left { grid-column: span 1 / span 1; }
.grid-right { grid-column: span 2 / span 2; }

/* --- CONTROL SLIDERS (LEFT PANEL) --- */
.control-stack {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
}
.slider-group {
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.slider-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.25rem;
}
.slider-group input[type="range"] {
    width: 100%;
}
.built-area-row {
    font-size: 0.6875rem;
    color: #94a3b8;
    font-weight: 700;
    border: 1px solid #e8e8e8;
    border-radius: 1rem;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
}

/* --- METRICS PANELS --- */
.metrics-stack {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
}
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}
.metric-box {
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.metric-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.125rem;
}
.metric-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
}
.metric-value.emerald {
    color: #059669;
}
.status-pill {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.025em;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

/* --- JURISDICTION CITY PRESETS --- */
.preset-card {
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.preset-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #94a3b8;
}
.preset-btn-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.375rem;
    background-color: #f1f5f9;
    padding: 0.25rem;
    border-radius: 0.75rem;
}
.preset-card button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.625rem 0;
    border-radius: 0.5rem;
    text-align: center;
    width: 100%;
    background: transparent;
}
.preset-card .text-slate-600 {
    color: #475569 !important;
}
.preset-card button:not(.bg-blue-600):hover {
    background-color: rgba(226, 232, 240, 0.6) !important;
}
.preset-card .bg-blue-600 {
    background-color: #2563eb !important;
}
.preset-card .text-white {
    color: #ffffff !important;
}
.preset-card .shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

/* --- ANALYTICAL DETAILS PANEL (RISK & WATER BOTTOM) --- */
.analytical-panel {
    padding: 2rem;
}
.metrics-readout-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
}
.readout-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.readout-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}
.readout-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #334155;
}
.readout-value-rose {
    color: #e11d48;
}
.readout-value-emerald {
    color: #059669;
}

/* --- HORIZONTAL CONFIGURATION SLIDERS GRID (Desktop First) --- */
.configurator-sliders-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.slider-control-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.slider-control-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
}
.slider-control-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.slider-control-wrapper input[type="range"] {
    width: 100%;
}
.slider-control-value {
    font-size: 0.75rem;
    font-weight: 700;
    font-family: monospace;
    color: #334155;
    min-width: 3.4375rem;
    text-align: right;
}

/* --- DOUBLE COLUMN CONTROL SLIDERS (ROI SPECIFIC) --- */
.configurator-double-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* --- TYPOLOGY SELECTORS GRID --- */
.typology-preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    background-color: #f1f5f9;
    padding: 0.375rem;
    border-radius: 0.75rem;
}
.typology-preset-grid button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.625rem 0;
    border-radius: 0.5rem;
    text-align: center;
    width: 100%;
    background: transparent;
    color: #475569;
    transition: all 0.2s ease;
}
.typology-preset-grid button:not(.bg-blue-600):not(.active):hover {
    background-color: rgba(226, 232, 240, 0.6);
}
.typology-preset-grid button.active,
.typology-preset-grid button.bg-blue-600 {
    background-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* --- RESOLUTION CALL TO ACTIONS --- */
.resolution-banner {
    background-color: rgba(239, 246, 255, 0.5);
    border: 1px solid #dbeafe;
    border-radius: 1.5rem;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: center;
}
.resolution-left {
    grid-column: span 8 / span 8;
}
.resolution-right {
    grid-column: span 4 / span 4;
    text-align: right;
}
.btn-primary {
    display: inline-block;
    background-color: #2563eb;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    text-decoration: none;
    border: none;
    width: 100%;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1);
    transition: background-color 0.2s ease;
}
.btn-primary:hover {
    background-color: #1d4ed8;
}

/* --- PHYSICS COMPONENT OVERLAYS --- */

/* Pause Button Overlay */
.pause-btn-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 34px;
    height: 34px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    color: #475569;
    font-size: 13px; /* Clear sizing for glyph alignments */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    Xtransition: all 0.2s ease;
    z-index: 50;
    line-height: 0;
    padding-top: 0;
    padding-bottom: 2px;
    box-sizing: border-box;
}

.pause-btn-overlay:hover {
    background-color: #ffffff;
    transform: scale(1.05);
}

.pause-btn-overlay.paused {
    color: #2563eb;
    border-color: #2563eb;
    background-color: #eff6ff;
    padding-left: 2px;
    box-sizing: border-box;
}

/* --- UNIFIED SLIDER LABEL COLORS (Overrides all multi-colored utility classes) --- */
.slider-label-row span,
.built-area-row span,
.preset-label,
.slider-control-label {
    color: #64748b !important;
}

/* --- RESOLVED SMOOTH PRESET BUTTONS (Restores Active Blue State) --- */
.preset-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.625rem 0;
    border-radius: 0.5rem;
    text-align: center;
    width: 100%;
    background: transparent;
    color: #475569;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background-color: rgba(226, 232, 240, 0.6) !important;
}

.preset-btn.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

/* --- UNIFIED SLATE COLOR STYLING --- */
.control-stack label,
.slider-label-row,
.built-area-row,
.preset-label,
.slider-control-label,
.slider-label-row span,
.built-area-row span {
    color: #64748b !important;
    font-weight: 700;
}

/* --- DECOUPLED SEMANTIC STATUS BOXES --- */
.status-pill.compliant {
    color: #059669 !important;
    background-color: #ecfdf5 !important;
    border: 1px solid #d1fae5;
}

.status-pill.non-compliant {
    color: #e11d48 !important; 
    background-color: #fff1f2 !important;
    border: 1px solid #ffe4e6;
}

.metric-value.compliant {
    color: #059669 !important;
}

.metric-value.non-compliant {
    color: #e11d48 !important;
}

/* ==========================================================================
   TABLET & MOBILE RESPONSIVE OVERRIDES (Desktop-First max-width in ems)
   ========================================================================== */
@media (max-width: 48em) {
    .workspace-header {
        padding: 3rem 1.5rem 2rem 1.5rem;
    }
    .workspace-title {
        font-size: 1.875rem;
    }
    
    /* Workspace Card layouts stack */
    .workspace-grid {
        padding: 1.5rem;
        grid-template-columns: 1fr;
    }
    .grid-left, 
    .grid-right {
        grid-column: span 1 / span 1;
    }
    
    /* Analytical bottom readout stacks */
    .analytical-panel {
        padding: 1.5rem;
    }
    .configurator-sliders-grid,
    .configurator-double-grid {
        grid-template-columns: 1fr;
    }
    
    /* Resolution layout stacks */
    .resolution-banner {
        padding: 1.5rem;
        grid-template-columns: 1fr;
    }
    .resolution-left,
    .resolution-right {
        grid-column: span 1 / span 1;
        text-align: left;
    }
}