/* Cheap-First Cascade with Escalation
   Layout: top toolbar + 60/40 diagram/info-panel
*/
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    width: 100%; height: 100%; overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    background: #fff;
}

.toolbar {
    height: 42px;
    padding: 8px 14px;
    background: #37474f;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
}
.toolbar-title { font-weight: 600; font-size: 15px; flex: 1; }
.toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }

.container {
    display: flex;
    width: 100%;
    height: calc(100% - 42px);
}

.diagram-panel {
    width: 60%;
    height: 100%;
    background-color: aliceblue;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px;
    overflow: auto;
}
.mermaid { width: 100%; }
.mermaid svg { max-width: 100%; height: auto; }

.info-panel {
    width: 40%;
    height: 100%;
    background-color: #f8f9fa;
    border-left: 1px solid #dee2e6;
    padding: 12px 14px;
    overflow: auto;
}
.info-panel h3 {
    font-size: 14px;
    color: #333;
    margin: 8px 0 6px 0;
    padding-bottom: 4px;
    border-bottom: 2px solid #c1440e;
}

.control-row {
    margin-bottom: 10px;
    font-size: 12px;
    color: #475569;
}
.control-row label { display: block; margin-bottom: 2px; }
.control-row input[type=range] { width: 100%; }

.readouts {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 6px 10px;
    margin-top: 8px;
}
.readout-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 3px 0;
    color: #1f2937;
    font-family: ui-monospace, Menlo, monospace;
}

.cost-block {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 8px 12px;
}
.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 3px 0;
    color: #1f2937;
    font-family: ui-monospace, Menlo, monospace;
}
.cost-row .big { font-size: 18px; font-weight: 700; color: #c1440e; }
.cost-row.good { color: #14532d; font-weight: 600; }

.formula {
    margin-top: 10px;
    padding: 8px 10px;
    font-size: 11px;
    color: #334155;
    font-family: ui-monospace, Menlo, monospace;
    background: #f1f5f9;
    border-radius: 4px;
    line-height: 1.5;
}
