    :root {
      color-scheme: dark;
      --bg: #0a0f18; --panel: #111a27; --panel2: #172234; --line: #29384c;
      --text: #e7edf5; --muted: #91a0b5; --accent: #d2943d; --danger: #ff7185;
    }
    * { box-sizing: border-box; }
    html, body { width: 100%; height: 100%; overflow: hidden; }
    body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 Inter, ui-sans-serif, system-ui, sans-serif; }
    html.workspace-scroll { overflow-y: auto; }
    html.workspace-scroll body { height: auto; min-height: 100%; overflow: visible; }
    html.workspace-scroll .app { height: auto; min-height: 100vh; }
    html.workspace-scroll .app > aside { position: sticky; top: 0; height: 100vh; }
    html.workspace-scroll .app > main { overflow: visible; }
    html.workspace-scroll .app > main > .stats { overflow: visible; }
    button, input, select { font: inherit; }
    button { border: 1px solid var(--line); background: var(--panel2); color: var(--text); border-radius: 7px; padding: 7px 11px; cursor: pointer; }
    button:hover { border-color: var(--accent); }
    button.primary { background: var(--accent); color: #07140f; border-color: var(--accent); font-weight: 700; }
    button:disabled { opacity: .45; cursor: default; }
    .app { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: 100vh; }
    .app.sidebar-collapsed { grid-template-columns: 0 minmax(0,1fr); }
    aside { border-right: 1px solid var(--line); background: var(--panel); padding: 14px; display: flex; flex-direction: column; min-height: 0; gap: 10px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
    aside::-webkit-scrollbar { width: 9px; }
    aside::-webkit-scrollbar-track { background: #0c1420; }
    aside::-webkit-scrollbar-thumb { border: 2px solid #0c1420; border-radius: 8px; background: #46566a; }
    aside::-webkit-scrollbar-thumb:hover { background: #66778d; }
    .app.sidebar-collapsed aside { visibility:hidden; overflow:hidden; padding:0; border:0; }
    #sidebarToggle { position:fixed; z-index:40; left:308px; top:50%; transform:translateY(-50%); width:25px; height:58px; padding:0; border-radius:0 8px 8px 0; background:#172b42; color:var(--accent); box-shadow:3px 0 12px #0007; transition:left .18s ease; }
    .app.sidebar-collapsed #sidebarToggle { left:0; }
    h1 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
    .app-version { margin-left: 5px; color: var(--accent); font-size: 10px; font-weight: 800; vertical-align: middle; }
    .sub { color: var(--muted); margin: 4px 0 10px; font-size: 12px; }
    .sidebar-brand { padding: 0 2px 2px; }
    .collapsed-brand { display: none; align-items: center; gap: 6px; width: 235px; margin-right: 12px; white-space: nowrap; }
    .brand-logo { display: block; width: 100%; height: auto; object-fit: contain; object-position: left center; }
    .sidebar-brand .brand-logo { max-height: 65px; }
    .collapsed-brand .brand-logo { width: 190px; max-height: 38px; }
    .app.sidebar-collapsed .collapsed-brand { display: flex; }
    .workflow-step { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #0d1521; }
    .step-label { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; color: #c7d3e2; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
    .step-number { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--accent); color: #07140f; font-size: 10px; }
    .file-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-bottom: 8px; }
    .file-row button { padding: 7px 6px; }
    .templates-grid { display: grid; gap: 8px; }
    .template-card { padding: 9px; border: 1px solid #24344a; border-radius: 8px; background: var(--panel); }
    .template-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
    .template-card-head strong { margin-right: auto; font-size: 12px; }
    .plot-pill { padding: 2px 6px; border-radius: 999px; background: #253650; color: var(--accent); font-size: 9px; font-weight: 800; }
    .template-card.p1-card { border-color: #365d73; box-shadow: inset 3px 0 #4f88a8; }
    .template-card.p1-card .template-card-head strong { color: #a9d0e5; }
    .template-card.p1-card .plot-pill { background: #244052; color: #a9d0e5; }
    .template-card.p2-card { border-color: #704238; box-shadow: inset 3px 0 #a95843; }
    .template-card.p2-card .template-card-head strong { color: #d99a88; }
    .template-card.p2-card .plot-pill { background: #48271f; color: #d99a88; }
    .template-card.p3-card { border-color: #66612d; box-shadow: inset 3px 0 #8b8437; }
    .template-card.p3-card .template-card-head strong { color: #c4bd72; }
    .template-card.p3-card .plot-pill { background: #3b391d; color: #c4bd72; }
    .workflow-step.settings-step { border-color: #89532f; box-shadow: inset 3px 0 #ff8c5a; }
    .workflow-step.settings-step .step-label { color: #ffb38f; }
    .workflow-step.settings-step .step-number { background: #ff8c5a; }
    .workflow-step.channels-step { border-color: #495c6d; box-shadow: inset 3px 0 #70889a; }
    .workflow-step.channels-step .step-label { color: #a8bac8; }
    .workflow-step.channels-step .step-number { background: #70889a; }
    .preset-button { position: relative; width: 100%; min-height: 43px; border: 0; text-align: left; font-size: 13px; font-weight: 800; transition: transform .14s ease, filter .14s ease, box-shadow .14s ease; }
    .preset-button::before { content: '▶'; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: #ffffff2b; font-size: 10px; vertical-align: middle; }
    .preset-button.loaded::before { content: '✓'; }
    .p1-card .preset-button { color: #fff; background: linear-gradient(90deg,#315f73,#4f88a8); box-shadow: 0 5px 18px #4f88a82b; }
    .p2-card .preset-button { color: #fff; background: linear-gradient(90deg,#733b2b,#a95843); box-shadow: 0 5px 18px #a958432b; }
    .p3-card .preset-button { color: #f4f1d8; background: linear-gradient(90deg,#5e5a28,#8b8437); box-shadow: 0 5px 18px #8b843729; }
    .preset-button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.1); }
    .preset-button:active:not(:disabled) { transform: translateY(0); }
    .preset-button:disabled { color: #77859a; background: #172235; box-shadow: none; filter: saturate(.25); }
    .template-status { min-height: 16px; margin: 5px 1px 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
    .template-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin-top: 7px; }
    .template-row select { grid-column: 1 / -1; }
    #savedTreatmentTemplates, #savedChemicalTemplates { min-width: 0; color: var(--text); background: #0d1521; border: 1px solid var(--line); border-radius: 7px; padding: 7px; }
    .template-row button { padding: 5px 4px; font-size: 11px; }
    #fileInput { display: none; }
    #search, #channelFilter { width: 100%; color: var(--text); background: #08101b; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; outline: none; }
    #search:focus, #channelFilter:focus { border-color: var(--accent); }
    .filter-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; align-items: center; }
    .active-toggle { display: flex; gap: 5px; align-items: center; color: var(--muted); font-size: 11px; white-space: nowrap; }
    .active-toggle input { accent-color: var(--accent); }
    .selector-tools { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 6px; color: var(--muted); font-size: 12px; }
    .link { border: 0; padding: 0; background: none; color: var(--accent); }
    .channel-browser { min-height: 650px; flex: 0 0 650px; display: flex; flex-direction: column; padding-bottom: 0; }
    .settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
    .settings-row button { padding: 6px 5px; font-size: 10px; }
    .settings-row .danger-action { grid-column: 1 / -1; color: #ff9daa; border-color: #683443; }
    .settings-row .cleanup-toggle { grid-column: 1 / -1; min-width: 0; padding: 7px 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 7px; background: #0d1725; color: var(--text); line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
    .settings-row .cleanup-toggle input { flex: 0 0 auto; margin-top: 2px; }
    #settingsImportInput { display: none; }
    #channels { overflow: auto; min-height: 500px; flex: 1; border-top: 1px solid var(--line); }
    .group-title { position: sticky; top: 0; z-index: 2; background: var(--panel); padding: 10px 4px 5px; font-weight: 700; color: #b9c7d8; }
    .channel { display: grid; grid-template-columns: 18px minmax(0,1fr) auto 58px 34px 28px; gap: 6px; padding: 5px 4px; align-items: start; border-radius: 5px; }
    .channel:hover { background: var(--panel2); }
    .channel input { margin-top: 3px; accent-color: var(--accent); }
    .channel .name { overflow-wrap: anywhere; }
    .channel-name { border: 0; background: none; color: var(--text); padding: 0; text-align: left; line-height: 1.25; overflow-wrap: anywhere; cursor: text; min-width: 0; }
    .channel-name:hover { color: var(--accent); text-decoration: underline dotted; }
    .alias-main { display: block; }
    .alias-meta { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 400; }
    .alias-badge { display: inline-block; padding: 1px 4px; border: 1px solid #398a73; border-radius: 3px; color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .06em; }
    .unit { color: var(--muted); font-size: 11px; white-space: nowrap; }
    .plot-choice { width: 58px; min-width: 58px; height: 28px; padding: 2px 6px; color: var(--text); background: #0d1521; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; font-weight: 700; }
    .axis-direction { width: 34px; min-width: 34px; height: 28px; padding: 2px; font-weight: 900; }
    .axis-direction.separate { color: #61a7ff; border-color: #61a7ff; background: #122641; }
    .axis-direction.inverted { color: #ffbd5b; border-color: #ffbd5b; background: #302416; }
    .channel-exclude { width:28px; min-width:28px; height:28px; padding:2px; color:#ff9daa; border-color:#633746; background:#281822; font-size:13px; }
    .excluded-channel { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:7px; align-items:center; padding:7px 4px; border-bottom:1px solid #1c2a3b; }
    .excluded-channel-name { min-width:0; color:#c5cfdb; font-size:11px; overflow-wrap:anywhere; }
    .channel-restore { padding:5px 7px; color:#7de5bd; border-color:#326650; background:#102a21; font-size:10px; }
    main { position:relative; min-width: 0; min-height:0; overflow:hidden; display: grid; grid-template-rows: auto minmax(480px, 1fr) 9px minmax(160px, 28vh); }
    .topbar { padding: 10px 16px 9px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; background: linear-gradient(180deg,#0d1521 0%,#0a111b 100%); box-shadow: 0 1px 0 #ffffff05; }
    main > .topbar { grid-row: 1; }
    main > .plots { grid-row: 2; }
    main > .plot-resizer { grid-row: 3; }
    main > .stats { grid-row: 4; }
    .topbar-status-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: start; }
    .status-cluster { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-width: 0; }
    .status-cluster #status { flex: 1 1 auto; min-width: 0; overflow: hidden; overflow-wrap: anywhere; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .status-cluster #dataFormat { flex: 0 0 auto; }
    .topbar-actions { display: grid; grid-template-columns: minmax(600px,.9fr) minmax(680px,1.1fr); gap: 8px; align-items: stretch; }
    .control-group { display: flex; gap: 5px; align-items: center; min-width: 0; padding: 5px; border: 1px solid #26384f; border-radius: 9px; background: #101a29; }
    .control-group.view-group { grid-column:1; grid-row:3; justify-content: flex-start; align-self: stretch; flex-wrap: wrap; }
    .control-group.view-group button { padding-right: 9px; padding-left: 9px; font-size: 12px; }
    .control-group.results-group { grid-column:1 / -1; grid-row:1; display:grid; grid-template-columns:auto minmax(250px,1fr) minmax(285px,1fr) 14px auto auto auto auto; gap:7px; align-items:center; padding:6px 8px; border-color:#30445d; background:#101a29; box-shadow:inset 0 1px #ffffff08; }
    .results-heading { display:flex; align-items:center; padding:0 10px 0 4px; border-right:1px solid #2f435b; }
    .results-heading .control-group-label { padding:0; border:0; }
    .results-caption { display:none; }
    .results-group > .interval-workflows { display:contents; }
    .results-group > .results-primary-arrow { align-self:center; }
    .report-build { display:contents; }
    .report-build #generateFracReport { min-height:36px; }
    .results-group > .results-secondary { display:contents; }
    .results-group > .results-secondary button { min-height:34px; }
    .results-guide { grid-column:1 / -1; grid-row:2; min-height:13px; padding:0 4px; color:#8395aa; font-size:10px; font-weight:650; }
    .results-guide::before { content:'REPORT GUIDE'; margin-right:7px; color:#d6a85f; font-size:8px; font-weight:900; letter-spacing:.08em; }
    .report-stage-control { display:flex; align-items:center; gap:5px; margin-left:2px; color:#9aaabd; font-size:9px; font-weight:850; text-transform:uppercase; letter-spacing:.06em; white-space:nowrap; }
    .report-stage-control input { width:62px; min-width:62px; height:34px; padding:5px 8px; border:1px solid #39506d; border-radius:7px; background:#0b1421; color:var(--text); font-size:13px; font-weight:750; text-align:center; }
    .report-stage-control input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 2px #55aef026; }
    .report-stage-coverage { width:100%; max-width:230px; padding:7px 8px; border:1px solid #30465f; border-radius:7px; background:#101d2d; color:#a9bacd; font-size:10px; font-weight:750; line-height:1.2; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
    .report-stage-coverage.has-reports { border-color:#2f6c58; background:#10251f; color:#76ddb9; }
    .report-stage-coverage:hover { border-color:#579276; color:#d8f7eb; }
    .saved-reports-dialog { width:min(720px,calc(100vw - 28px)); max-height:min(760px,calc(100vh - 28px)); padding:0; border:1px solid #43675e; border-radius:11px; background:#111b29; color:var(--text); box-shadow:0 24px 80px #000c; }
    .saved-reports-dialog::backdrop { background:#05080db5; backdrop-filter:blur(2px); }
    .saved-reports-shell { padding:17px; }
    .saved-reports-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
    .saved-reports-head h2 { margin:0; font-size:18px; }
    .saved-reports-well { margin-top:3px; color:#76ddb9; font-size:11px; font-weight:750; }
    .saved-reports-filter { display:flex; align-items:center; gap:7px; margin-left:auto; color:#91a3b7; font-size:9px; font-weight:800; text-transform:uppercase; }
    .saved-reports-filter select { min-width:180px; padding:6px 8px; border:1px solid #39506d; border-radius:6px; background:#0a1421; color:var(--text); }
    .saved-reports-close { width:30px; height:30px; padding:0; font-size:20px; }
    .saved-reports-list { display:grid; gap:8px; max-height:570px; overflow:auto; }
    .saved-report-row { display:grid; grid-template-columns:minmax(110px,170px) 90px minmax(0,1fr) auto auto; gap:9px; align-items:center; padding:9px 10px; border:1px solid #293d53; border-radius:8px; background:#0c1725; }
    .saved-report-stage { color:#fff; font-weight:850; }
    .saved-report-revision { color:#9eb0c4; font-size:11px; font-weight:750; }
    .saved-report-date { min-width:0; color:#8698ad; font-size:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .saved-report-current { margin-left:4px; color:#6ee0b7; font-size:8px; text-transform:uppercase; }
    .saved-reports-empty { padding:24px; border:1px dashed #34495f; border-radius:8px; color:#8fa0b5; text-align:center; }
    .chemical-pairing-dialog { width:min(860px,calc(100vw - 28px)); }
    .chemical-pairing-note { margin:0 0 12px; color:#91a3b7; font-size:11px; line-height:1.45; }
    .chemical-pairing-list { display:grid; gap:7px; max-height:min(570px,calc(100vh - 220px)); overflow:auto; }
    .chemical-pairing-row { display:grid; grid-template-columns:minmax(170px,1fr) minmax(220px,1.25fr) minmax(115px,.65fr); gap:10px; align-items:center; padding:9px 10px; border:1px solid #293d53; border-radius:8px; background:#0c1725; }
    .chemical-pairing-channel { min-width:0; color:#e5edf6; font-size:11px; font-weight:800; overflow-wrap:anywhere; }
    .chemical-pairing-channel small { display:block; margin-top:3px; color:#71849a; font-size:9px; font-weight:650; }
    .chemical-pairing-row select { width:100%; padding:7px 8px; border:1px solid #39506d; border-radius:6px; background:#08131f; color:var(--text); font-size:11px; }
    .chemical-pairing-status { color:#8fa2b7; font-size:9px; font-weight:750; line-height:1.35; }
    .chemical-pairing-status.explicit { color:#72dfb9; }
    .chemical-pairing-empty { padding:20px; border:1px dashed #34495f; border-radius:8px; color:#8fa0b5; text-align:center; }
    .chemical-pairing-actions { display:flex; justify-content:flex-end; gap:7px; margin-top:13px; }
    @media (max-width:700px) { .chemical-pairing-row { grid-template-columns:1fr; } }
    .inventory-dialog { width:min(1180px,calc(100vw - 28px)); }
    .inventory-dialog .saved-reports-shell { max-height:calc(100vh - 28px); overflow:auto; }
    .inventory-status { margin-bottom:10px; padding:8px 10px; border:1px solid #2d4b5d; border-radius:7px; background:#0a1b28; color:#8fcbb9; font-size:10px; }
    .inventory-status.error { border-color:#8f4935; background:#2b1714; color:#ffb19a; }
    .inventory-layout { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.25fr); gap:12px; }
    .inventory-panel { min-width:0; padding:12px; border:1px solid #2b4057; border-radius:9px; background:#0a1421; }
    .inventory-panel-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
    .inventory-panel-head h3 { margin:0; color:#e7eef7; font-size:13px; }
    .inventory-panel-head span { color:#7f92a8; font-size:9px; font-weight:800; text-transform:uppercase; }
    .inventory-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
    .inventory-form-grid label { display:grid; gap:4px; color:#93a5b9; font-size:8px; font-weight:850; letter-spacing:.04em; text-transform:uppercase; }
    .inventory-form-grid label.inventory-wide { grid-column:1 / -1; }
    .inventory-form-grid input,.inventory-form-grid select { width:100%; min-width:0; padding:7px 8px; border:1px solid #364d68; border-radius:6px; background:#08131f; color:var(--text); font:inherit; text-transform:none; }
    .inventory-form-grid input:disabled { color:#687b91; background:#101925; }
    .inventory-form-actions { display:flex; justify-content:flex-end; gap:7px; margin:9px 0 11px; }
    .inventory-list { display:grid; gap:6px; max-height:310px; overflow:auto; }
    .inventory-list-row { display:grid; grid-template-columns:minmax(130px,1fr) auto auto; gap:9px; align-items:center; padding:8px; border:1px solid #263a50; border-radius:7px; background:#0d1927; color:#afbed0; font-size:9px; }
    .inventory-list-row.inventory-container-row { grid-template-columns:minmax(130px,1fr) auto minmax(105px,.75fr) auto auto; }
    .inventory-list-row strong { display:block; color:#e4edf6; font-size:10px; overflow-wrap:anywhere; }
    .inventory-list-row small { display:block; margin-top:2px; color:#74879d; overflow-wrap:anywhere; }
    .inventory-location-status { padding:3px 6px; border-radius:999px; color:#81d9b9; background:#123a31; font-size:8px; font-weight:850; white-space:nowrap; }
    .inventory-location-status.off_location { color:#c3ceda; background:#293442; }
    .inventory-empty { padding:16px; border:1px dashed #34495f; border-radius:7px; color:#8294a9; text-align:center; }
    @media (max-width:900px) { .inventory-layout { grid-template-columns:1fr; } .inventory-list-row.inventory-container-row { grid-template-columns:minmax(130px,1fr) auto auto; } .inventory-list-row.inventory-container-row > :nth-child(3) { grid-column:1 / -1; } }
    .folder-data-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:14px 0; }
    .folder-data-fields[hidden],#folderTimeControls[hidden] { display:none !important; }
    .folder-data-fields label { display:grid; gap:5px; color:#91a3b7; font-size:9px; font-weight:800; text-transform:uppercase; }
    .folder-data-fields select { width:100%; padding:8px; border:1px solid #39506d; border-radius:6px; background:#0a1421; color:var(--text); }
    .folder-data-summary { padding:9px; border:1px solid #2b435b; border-radius:7px; background:#0b1725; color:#9fb1c5; font-size:11px; }
    .folder-data-summary.over-limit { border-color:#8e4b37; background:#2a1715; color:#ffae91; }
    .folder-data-modes { display:flex; gap:6px; margin:12px 0; }
    .folder-data-modes button.active { border-color:#61a7ff; background:#17314d; color:#91cdff; }
    .folder-stage-picker { margin:12px 0; padding:10px; border:1px solid #2b435b; border-radius:8px; background:#0b1725; }
    .folder-stage-picker-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; color:#9fb1c5; font-size:10px; }
    .folder-stage-picker-head button { padding:5px 9px; font-size:9px; }
    .folder-stage-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(66px,1fr)); gap:6px; max-height:230px; overflow:auto; }
    .folder-stage-grid button { padding:7px 5px; border-color:#344a63; background:#101d2c; color:#b9c7d7; }
    .folder-stage-grid button.selected { border-color:#61a7ff; background:#17314d; color:#d9eeff; }
    .folder-stage-grid button.endpoint { box-shadow:inset 0 0 0 1px #9bd5ff; color:#fff; }
    .folder-stage-grid button:disabled { opacity:.3; border-color:#263548; background:#0b1420; color:#718096; cursor:not-allowed; }
    .folder-time-slider { position:relative; height:32px; margin:8px 2px 13px; }
    .folder-time-slider::before { content:''; position:absolute; left:0; right:0; top:13px; height:6px; border-radius:999px; background:linear-gradient(90deg,#26384f var(--range-start,0%),#61a7ff var(--range-start,0%) var(--range-end,100%),#26384f var(--range-end,100%)); }
    .folder-time-slider input { position:absolute; inset:0; width:100%; margin:0; background:transparent; pointer-events:none; appearance:none; }
    .folder-time-slider input::-webkit-slider-runnable-track { height:6px; background:transparent; }
    .folder-time-slider input::-webkit-slider-thumb { width:18px; height:18px; margin-top:-6px; border:2px solid #cbe7ff; border-radius:50%; background:#4ca6f4; box-shadow:0 2px 7px #0009; pointer-events:auto; appearance:none; cursor:ew-resize; }
    .folder-time-slider input::-moz-range-track { height:6px; background:transparent; }
    .folder-time-slider input::-moz-range-thumb { width:16px; height:16px; border:2px solid #cbe7ff; border-radius:50%; background:#4ca6f4; pointer-events:auto; cursor:ew-resize; }
    .folder-data-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:13px; }
    .topbar-actions .window-panel { grid-column:2; grid-row:3; width:100%; min-width:0; }
    .control-group-label { align-self: stretch; display: flex; align-items: center; gap: 5px; padding: 0 7px 0 4px; border-right: 1px solid #26384f; color: #8fa0b5; font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
    .topbar-actions button { white-space: nowrap; }
    .beta-pill { margin-left: 4px; padding: 2px 5px; border: 1px solid #9a682d; border-radius: 999px; background: #47351c; color: #ffc66d; font-size: 8px; letter-spacing: .08em; }
    .plot-toggle { display: inline-flex; align-items: center; gap: 6px; min-width: 86px; justify-content: center; }
    .plot-toggle .eye-icon { width: 16px; color: var(--muted); font-size: 15px; line-height: 1; }
    .plot-toggle.visible { border-color: #4a7ba7; background: #15243a; }
    .plot-toggle.visible .eye-icon { color: var(--accent); }
    .plot-toggle.hidden-state { opacity: .72; }
    #status { color: var(--muted); }
    #dataFormat { margin: 0; padding: 4px 8px; border: 1px solid #2d7968; border-radius: 999px; background: #113329; color: #72e2bd; font-size: 9px; letter-spacing: .04em; white-space: nowrap; }
    #dataFormat::before { content: 'DATA · '; color: #9eb5ae; }
    .window-panel { display: grid; grid-template-columns: minmax(250px,1fr) auto; gap: 7px 10px; width: min(875px,100%); min-width: 510px; padding: 7px 8px; border: 1px solid #30435b; border-radius: 10px; background: linear-gradient(180deg,#111c2c,#0c1522); box-shadow: inset 0 1px #ffffff08; }
    .window-panel-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
    .future-space-control { display:flex; align-items:center; gap:5px; margin-left:auto; color:var(--muted); font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
    .future-space-control input { width:52px; padding:3px 5px; border:1px solid #43546a; border-radius:5px; background:#09111c; color:var(--text); text-align:center; }
    .window-panel-title { color: #cbd7e6; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .09em; }
    .window-mode-badge { padding: 2px 7px; border-radius: 999px; background: #213148; color: #aebed2; font-size: 9px; font-weight: 800; text-transform: uppercase; }
    .window-mode-badge.live { background: #493419; color: #edbd75; }
    .window-mode-badge.custom { background: #18395d; color: #7fc1ff; }
    .range-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 0; }
    .range-control { display: grid; grid-template-columns: auto minmax(90px,1fr); align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
    .range-control input { width: 100%; min-width: 90px; }
    .range-control.start input { accent-color: #61a7ff; }
    .range-control.end input { accent-color: var(--accent); }
    .window-mode-actions { display: flex; gap: 5px; align-items: stretch; }
    .window-mode-button { min-width: 92px; font-weight: 750; }
    .window-mode-button.active { border-color: var(--accent); background: #3c2b17; color: #edbd75; box-shadow: 0 0 0 1px #d2943d2b; }
    .app:not(.treatment-view) #live30 { display: none; }
    .app:not(.treatment-view) .future-space-control { display: none; }
    #resetRange.active { border-color: #61a7ff; background: #172f4b; color: #8bc8ff; box-shadow: 0 0 0 1px #61a7ff25; }
    #windowStatus { color: var(--muted); font-size: 11px; }
    .interval-workflows { display: grid; gap: 4px; min-width: 0; }
    .interval-flow { display: flex; align-items: center; gap: 4px; padding: 3px 5px; border: 1px solid; border-radius: 7px; }
    .interval-flow-label { width: 55px; flex: 0 0 55px; font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
    .interval-step-arrow, .report-flow-arrow { color: #63758b; font-size: 13px; font-weight: 900; }
    .frac-flow { border-color: #775a24; background: #2a2115; }
    .frac-flow .interval-flow-label { color: #e3b863; }
    .frac-flow button { min-width: 105px; border-color: #6f5630; background: #211b14; }
    .frac-flow button:hover, .frac-flow button.active { border-color: var(--accent); background: #4a3419; color: #ffe2a6; }
    .frac-flow button.boundary-set { border-color: #4d9b75; background: #153326; color: #8ee4ba; }
    .frac-flow button.active { border-color: #f2ad45; background: #5a3b16; color: #fff1cc; box-shadow: 0 0 0 2px #d2943d45; }
    .pd-flow { border-color: #315d89; background: #13253a; }
    .pd-flow .interval-flow-label { color: #83c4ff; }
    .pd-flow button { min-width: 105px; border-color: #315d89; background: #101e30; }
    .pd-flow button:hover, .pd-flow button.active { border-color: #61a7ff; background: #1b4167; color: #cce8ff; }
    .pd-flow button.boundary-set { border-color: #5793cb; background: #173958; color: #9fd4ff; }
    .pd-flow button.active { border-color: #80bdff; background: #20517e; color: #edf8ff; box-shadow: 0 0 0 2px #61a7ff40; }
    .results-primary-arrow { align-self: center; padding: 0 2px; }
    .results-secondary { display: flex; align-items: center; gap: 5px; }
    #clearFracSelection { color: #ffb08d; border-color: #774832; background: #2a1915; }
    .plots { min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) 7px minmax(0,1fr) 7px minmax(0,1fr); }
    .window-feedback { position:absolute; z-index:40; left:50%; top:50%; transform:translate(-50%,-50%); padding:7px 12px; border:1px solid #4b6985; border-radius:999px; background:#07111ded; color:#dbe8f4; box-shadow:0 8px 28px #000b; font-size:11px; font-weight:800; pointer-events:none; opacity:0; transition:opacity .15s; }
    .window-feedback.visible { opacity:1; }
    #plotWrap1 { grid-row:1; } #plotDivider12 { grid-row:2; } #plotWrap2 { grid-row:3; } #plotDivider23 { grid-row:4; } #plotWrap3 { grid-row:5; }
    .plots.none-visible { display: none; }
    .plot-wrap.hidden { display: none; }
    .plot-wrap { position: relative; min-height: 0; overflow: hidden; border-bottom: 1px solid #26364a; background: linear-gradient(180deg,#0d1520 0,#0a1018 62px,#0a0f18 100%); }
    .plot-wrap::before { content:''; position:absolute; z-index:1; top:0; left:0; right:0; height:var(--plot-head-height,57px); border-bottom:1px solid #1f2d3e; background:linear-gradient(180deg,#121c2aee,#0d151fee); pointer-events:none; }
    .plot-title { position: absolute; z-index: 3; top: 7px; left: 12px; color: #bcc7d5; font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; pointer-events: none; }
    .live-well-matches { position:absolute; z-index:6; top:4px; left:150px; right:170px; display:none; justify-content:center; gap:11px; pointer-events:none; }
    .app.treatment-view .live-well-matches { display:flex; }
    .live-well-match { --match-color:#51d3a5; position:static; min-width:0; max-width:50%; height:35px; padding:3px 17px; overflow:hidden; border:2px solid var(--match-color); border-radius:999px; background:color-mix(in srgb,var(--match-color) 15%,#0c1520); color:var(--match-color); box-shadow:0 0 0 1px color-mix(in srgb,var(--match-color) 24%,transparent),0 4px 14px #0007; font-size:15px; font-weight:850; white-space:nowrap; text-overflow:ellipsis; pointer-events:auto; }
    .live-well-match:hover { background:color-mix(in srgb,var(--match-color) 23%,#0c1520); filter:brightness(1.12); }
    .live-well-match .match-confidence { margin-left:9px; color:color-mix(in srgb,var(--match-color) 62%,#d8e1ec); font-size:14px; font-weight:700; }
    .live-well-match.pumpdown-match { --match-color:#61a7ff; }
    .well-match-dialog { width:min(470px,calc(100vw - 28px)); padding:0; border:1px solid #43675e; border-radius:11px; background:#111b29; color:var(--text); box-shadow:0 24px 80px #000c; }
    .well-match-dialog::backdrop { background:#05080db5; backdrop-filter:blur(2px); }
    .well-match-shell { padding:17px; }
    .well-match-head { display:flex; align-items:flex-start; gap:10px; margin-bottom:14px; }
    .well-match-head h2 { margin:0; font-size:17px; }
    .well-match-channel { margin-top:4px; color:#8ff0ce; font-size:11px; overflow-wrap:anywhere; }
    .well-match-close { margin-left:auto; width:31px; height:31px; padding:0; font-size:18px; }
    .well-match-field { display:block; color:var(--muted); font-size:10px; font-weight:750; text-transform:uppercase; letter-spacing:.04em; }
    .well-match-field input { width:100%; margin-top:5px; padding:8px 9px; border:1px solid #40536b; border-radius:7px; background:#08111d; color:var(--text); outline:none; text-transform:none; }
    .well-match-field input:focus { border-color:#51d3a5; }
    .well-match-note { margin:10px 0 14px; color:var(--muted); font-size:10px; }
    .well-match-actions { display:flex; justify-content:flex-end; gap:7px; }
    .plot-channel-bar { position:absolute; z-index:4; top:27px; left:8px; right:8px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:6px; overflow:visible; pointer-events:none; }
    .plot-channel-list { display:flex; flex-wrap:wrap; align-content:flex-start; gap:5px; min-width:0; overflow:visible; pointer-events:auto; }
    .plot-channel-list::-webkit-scrollbar { display:none; }
    .plot-channel-chip { display:inline-flex; flex:0 0 auto; align-items:center; gap:6px; max-width:220px; height:24px; padding:2px 8px; border:1px solid #2a394c; border-radius:5px; background:#111b29; color:#cbd4df; font-size:10px; font-weight:650; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .plot-channel-chip:hover { border-color:#52647b; background:#192638; color:#fff; }
    .plot-channel-chip i { width:12px; height:3px; flex:none; border-radius:2px; background:var(--chip-color); box-shadow:0 0 0 1px #0005; }
    .plot-add-wrap { position:relative; flex:0 0 auto; margin-left:auto; pointer-events:auto; }
    .plot-add-button { height:24px; padding:2px 9px; border-color:#4f6075; background:#172233; color:#c6d0dc; font-size:10px; font-weight:750; }
    .plot-add-button:hover,.plot-add-button[aria-expanded="true"] { border-color:var(--accent); background:#342716; color:#f0c887; }
    .plot-add-popover { position:absolute; z-index:20; right:0; top:30px; width:310px; overflow:hidden; border:1px solid #43546a; border-radius:9px; background:#111a27; box-shadow:0 18px 45px #000d; }
    #plotWrap3 .plot-add-popover { top:auto; bottom:30px; }
    .plot-add-head { display:flex; align-items:center; padding:9px 10px 7px; color:#d8e0e9; font-size:11px; font-weight:800; }
    .plot-add-close { margin-left:auto; width:25px; height:25px; padding:0; border:0; background:transparent; color:var(--muted); font-size:17px; }
    .plot-add-search { width:calc(100% - 16px); height:32px; margin:0 8px 8px; padding:5px 9px; border:1px solid #43546a; border-radius:6px; background:#09111c; color:var(--text); font-size:11px; outline:none; }
    .plot-add-search:focus { border-color:var(--accent); box-shadow:0 0 0 2px #d2943d22; }
    .plot-search-results { max-height:220px; overflow:auto; padding:4px 5px 6px; border-top:1px solid #253449; }
    .plot-search-results button { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; width:100%; padding:7px 8px; border:0; text-align:left; background:transparent; }
    .plot-search-results button:hover { background:#1a2738; }
    .plot-search-results .result-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .plot-search-results .result-unit { color:var(--muted); font-size:10px; }
    .plot-channel-editor { position:fixed; z-index:50; width:300px; padding:10px; border:1px solid var(--line); border-radius:8px; background:#111c2b; box-shadow:0 16px 45px #000c; }
    .plot-channel-editor input { width:100%; margin:6px 0 9px; }
    .color-swatches { display:grid; grid-template-columns:repeat(5,1fr); gap:6px; }
    .color-swatch { height:27px; padding:0; border:2px solid transparent; background:var(--swatch); }
    .color-swatch.selected { border-color:white; }
    .custom-color-row { display:grid; grid-template-columns:1fr 52px; align-items:center; gap:8px; margin-top:8px; color:var(--muted); font-size:11px; }
    .custom-color-picker { width:52px !important; height:30px; margin:0 !important; padding:2px; border:1px solid var(--line); border-radius:5px; background:#0d1521; cursor:pointer; }
    .axis-mode-row { display:grid; grid-template-columns:1fr 150px; align-items:center; gap:8px; margin-top:8px; color:var(--muted); font-size:11px; }
    .axis-mode-select { width:150px; padding:6px; color:var(--text); background:#0d1521; border:1px solid var(--line); border-radius:6px; }
    .channel-editor-actions { display:flex; gap:6px; margin-top:9px; }
    .channel-editor-actions .remove { margin-left:auto; color:#ff8796; }
    .plot-wrap canvas { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
    .plot-wrap canvas.trace-grab { cursor: grab; }
    .plot-wrap canvas.trace-dragging { cursor: grabbing; }
    .plot-divider { position:relative; z-index:7; cursor:ns-resize; background:#101b29; border-top:1px solid #25364b; border-bottom:1px solid #080d15; }
    .plot-divider::after { content:''; position:absolute; left:50%; top:2px; width:54px; height:2px; transform:translateX(-50%); border-radius:2px; background:#65758b; }
    .plot-divider:hover,.plot-divider.dragging { background:#244052; }
    .plot-divider:hover::after,.plot-divider.dragging::after { background:var(--accent); }
    .plot-resizer { position: relative; z-index: 6; cursor: ns-resize; background: #172234; border-top: 1px solid #31435b; border-bottom: 1px solid #0a0f18; }
    .plot-resizer::after { content: ''; position: absolute; left: 50%; top: 3px; width: 64px; height: 2px; transform: translateX(-50%); border-radius: 2px; background: #65758b; }
    .plot-resizer:hover, .plot-resizer.dragging { background: #244052; }
    .plot-resizer:hover::after, .plot-resizer.dragging::after { background: var(--accent); }
    #treatmentView.active,#liveValuesToggle.active,#toggleTreatmentControls.active { border-color:var(--accent); background:#3c2b17; color:#edbd75; }
    #liveValuesToggle,#toggleTreatmentControls { display:none; }
    #topbarReveal { display:none; position:absolute; z-index:35; top:0; left:50%; transform:translateX(-50%); height:27px; padding:2px 13px; border:1px solid #76572d; border-top:0; border-radius:0 0 7px 7px; background:#2d2216; color:#e7bd7c; font-size:10px; font-weight:800; box-shadow:0 5px 18px #0009; }
    .treatment-collapsed-brand { display:none; position:absolute; z-index:34; top:2px; left:10px; width:320px; height:50px; pointer-events:none; }
    .treatment-collapsed-brand .brand-logo { width:320px; height:50px; object-fit:contain; object-position:left center; }
    .live-values-panel { display:none; min-width:0; overflow:auto; border-left:1px solid #34465b; background:#0d1520; }
    .live-values-head { position:sticky; top:0; z-index:2; display:flex; align-items:flex-start; gap:8px; padding:13px 14px; border-bottom:1px solid #2a394c; background:#111b29; }
    .live-values-head h2 { margin:0; font-size:13px; text-transform:uppercase; letter-spacing:.07em; }
    .live-values-time { margin-top:3px; color:var(--muted); font-size:10px; }
    .live-values-head-actions { display:flex; gap:6px; margin-left:auto; }
    .live-values-add { height:28px; padding:3px 8px; color:#e7bd7c; border-color:#76572d; background:#2d2216; font-size:10px; font-weight:800; }
    .live-values-close { width:28px; height:28px; padding:0; }
    .live-value-picker { margin:10px 10px 0; padding:9px; border:1px solid #43546a; border-radius:8px; background:#111b29; }
    .live-value-picker input { width:100%; padding:7px 9px; border:1px solid #43546a; border-radius:6px; background:#09111c; color:var(--text); outline:none; }
    .live-value-picker input:focus { border-color:var(--accent); }
    .live-value-picker-results { max-height:220px; margin-top:6px; overflow:auto; }
    .live-value-picker-results button { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; width:100%; padding:7px 8px; border:0; background:transparent; text-align:left; }
    .live-value-picker-results button:hover { background:#1a2738; }
    .live-values-content { display:flex; flex-direction:column; padding:10px; --live-card-height:82px; }
    .live-values-grid { order:3; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:10px; }
    .live-values-content > .sub { order:3; margin-top:10px; }
    .live-value-card { position:relative; height:var(--live-card-height); min-height:68px; padding:10px; overflow:hidden; border:1px solid #34455a; border-top:3px solid var(--value-color); border-radius:7px; background:#121d2b; cursor:grab; user-select:none; transition:height .16s,opacity .12s,border-color .12s,transform .12s; }
    .live-value-card:active { cursor:grabbing; }
    .live-value-card.dragging { opacity:.38; }
    .live-value-card.drag-target { border-color:var(--accent); transform:translateY(2px); }
    .live-value-card.alarm-triggered { border-color:#ff5f57; background:linear-gradient(180deg,#321b21,#18202c); box-shadow:0 0 0 2px #ff5f5738,0 0 20px #ff3b3030; }
    .live-value-card.alarm-triggered .live-value-number { color:#ffd6d2; }
    .live-value-collapse { position:absolute; top:4px; right:4px; z-index:1; width:25px; height:25px; padding:0; border:0; background:transparent; color:#718197; font-size:12px; line-height:1; }
    .live-value-collapse:hover { color:#dce7f4; }
    .live-value-alarm { position:absolute; right:6px; bottom:6px; width:25px; height:25px; padding:0; border:0; background:transparent; color:#718197; font-size:14px; line-height:1; }
    .live-value-alarm:hover,.live-value-alarm.configured { color:#e7bd7c; }
    .live-value-card.alarm-triggered .live-value-alarm { color:#ff6b62; animation:alarmPulse .8s ease-in-out infinite alternate; }
    .live-value-remove { position:absolute; left:5px; bottom:5px; width:22px; height:22px; padding:0; border:0; background:transparent; color:#8796aa; font-size:15px; }
    .live-value-remove:hover { color:#ff9daa; }
    .live-value-name { min-height:30px; color:#aeb9c7; font-size:10px; line-height:1.25; }
    .live-value-alarm-status { display:flex; flex-wrap:wrap; gap:3px 11px; margin:1px 28px 0 0; color:#ff6961; font-size:10px; font-weight:800; font-variant-numeric:tabular-nums; line-height:1.2; }
    .live-value-card.alarm-triggered .live-value-alarm-status { color:#ff8b84; }
    .live-value-number { margin-top:5px; color:#fff; font-size:19px; font-weight:850; font-variant-numeric:tabular-nums; }
    .live-value-number small { margin-left:3px; color:var(--muted); font-size:9px; font-weight:700; }
    .live-values-content.compact .live-value-card { padding:7px 8px; }
    .live-values-content.compact .live-value-name { min-height:23px; font-size:9px; line-height:1.15; }
    .live-values-content.compact .live-value-number { margin-top:2px; font-size:16px; }
    .live-values-content.compact .live-value-number small,.live-values-content.compact .live-value-alarm-status { font-size:8px; }
    .live-values-content.compact .live-value-collapse { top:2px; right:2px; }
    .live-values-content.compact .live-value-alarm { right:3px; bottom:2px; }
    .live-values-content.compact .live-value-remove { left:2px; bottom:1px; }
    .live-value-card.collapsed { height:44px; min-height:44px; padding:9px 34px 7px 10px; cursor:grab; }
    .live-value-card.collapsed .live-value-name { min-height:0; overflow:hidden; font-size:10px; line-height:20px; text-overflow:ellipsis; white-space:nowrap; }
    .live-value-card.collapsed .live-value-number,.live-value-card.collapsed .live-value-alarm-status,.live-value-card.collapsed .live-value-alarm,.live-value-card.collapsed .live-value-remove { display:none; }
    .wellbore-model { order:1; margin-top:0; padding:8px; border:1px solid #344b62; border-radius:8px; background:#09131f; color:#dce7f4; }
    .wellbore-model-head { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 8px; align-items:start; }
    .wellbore-model-title { font-size:14px; font-weight:850; }
    .wellbore-model-well { overflow:hidden; color:#57ddb0; font-size:11px; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
    .wellbore-model-time { color:#dce7f4; font-size:12px; font-weight:850; font-variant-numeric:tabular-nums; text-align:right; }
    .wellbore-model-status { color:#56d8a8; font-size:10px; font-weight:800; text-align:right; }
    .wellbore-model-status.error { color:#ff746d; }
    .wellbore-model-controls { display:grid; grid-template-columns:89px minmax(0,1fr); gap:6px; margin-top:5px; }
    .wellbore-model-controls label { position:relative; color:#8fa0b5; font-size:9px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
    .wellbore-model-controls input { width:100%; height:28px; margin-top:2px; padding:4px 38px 4px 7px; border:1px solid #405a73; border-radius:5px; background:#07101a; color:#fff; font-size:12px; font-weight:800; outline:none; }
    .wellbore-model-controls input:focus { border-color:var(--accent); }
    .wellbore-model-controls input:not(:focus):not(:placeholder-shown) { padding-right:46px; text-align:right; }
    .wellbore-stage-total { position:absolute; right:7px; bottom:7px; color:#8fa0b5; font-size:9px; font-weight:800; letter-spacing:0; text-transform:none; pointer-events:none; }
    .wellbore-model-plug { align-self:end; min-height:28px; padding:5px 7px; border:1px solid #283d52; border-radius:5px; color:#aebed0; font-size:10px; }
    .wellbore-model-metrics { display:grid; grid-template-columns:1fr 1fr; gap:5px; margin-top:5px; }
    .wellbore-model-metric { padding:5px 7px; border:1px solid #263b4f; border-radius:5px; background:#0d1926; font-size:9px; color:#91a3b7; }
    .wellbore-model-metric strong { display:block; margin-top:1px; color:#fff; font-size:12px; font-variant-numeric:tabular-nums; }
    .wellbore-model-legend { margin-top:5px; color:#98a9bd; font-size:9px; }
    .wellbore-model-gradient { height:6px; margin:3px 0 2px; border-radius:2px; background:linear-gradient(90deg,#2736d9 0 7.69%,#214fe2 7.69% 15.38%,#176fe9 15.38% 23.07%,#0a9dec 23.07% 30.76%,#00c9ff 30.76% 38.45%,#12d9be 38.45% 46.14%,#25df74 46.14% 53.83%,#75e958 53.83% 61.52%,#c7eb45 61.52% 69.21%,#ffe13b 69.21% 76.9%,#ffad34 76.9% 84.59%,#f56a2d 84.59% 92.28%,#ef2828 92.28% 100%); }
    .wellbore-model-legend-labels { display:flex; justify-content:space-between; color:#7f91a5; font-size:8px; }
    .wellbore-model-svg { display:block; width:100%; height:auto; margin-top:2px; overflow:visible; }
    .wellbore-depth-guide { stroke:#52677c; stroke-width:.55; opacity:.3; stroke-dasharray:1.5 2; }
    .wellbore-flow-chevron { fill:none; stroke:#fff; stroke-width:1.35; stroke-linecap:round; stroke-linejoin:round; opacity:.72; animation:wellboreFlow var(--wellbore-flow-duration,1.6s) ease-in-out infinite; }
    .wellbore-flow-chevron:nth-of-type(2) { animation-delay:-.5s; }
    .wellbore-flow-chevron:nth-of-type(3) { animation-delay:-1s; }
    .wellbore-model-svg.flow-paused .wellbore-flow-chevron { animation-play-state:paused; opacity:.25; }
    .wellbore-symbol-legend { fill:#9eb0c4; font-size:7.5px; }
    .wellbore-proppant-progress { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:7px; margin-top:5px; padding:5px 7px; border:1px solid #334b62; border-radius:5px; background:#0d1926; color:#98a9bd; font-size:9px; font-weight:800; letter-spacing:.03em; text-transform:uppercase; }
    .wellbore-proppant-progress strong { color:#f6cf4b; font-size:14px; font-variant-numeric:tabular-nums; letter-spacing:0; }
    .wellbore-proppant-alarm { width:24px; height:24px; padding:0; border:0; background:transparent; color:#718197; font-size:13px; line-height:1; }
    .wellbore-proppant-alarm:hover,.wellbore-proppant-alarm.configured { color:#e7bd7c; }
    .wellbore-proppant-alarm.triggered { color:#ff6b62; animation:alarmPulse .8s ease-in-out infinite alternate; }
    .proppant-alarm-list { display:grid; gap:7px; margin:12px 0; }
    .proppant-alarm-row { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px; align-items:center; padding:8px; border:1px solid #2b4055; border-radius:6px; background:#0c1724; }
    .proppant-alarm-row label { display:grid; gap:4px; color:#aebed0; font-size:11px; font-weight:750; }
    .proppant-alarm-row input[type="number"] { width:100%; }
    .wellbore-model-note { margin-top:4px; padding:4px 6px; border-radius:5px; background:#102334; color:#9eb0c4; font-size:8px; line-height:1.3; }
    .wellbore-model-note.error { border:1px solid #693a42; background:#2a171d; color:#ff9a9a; }
    .pumpdown-mini-plot { order:2; margin-top:10px; padding:8px 9px; border:1px solid #344b62; border-radius:8px; background:#09131f; color:#dce7f4; }
    .pumpdown-mini-head { display:flex; align-items:flex-start; gap:8px; }
    .pumpdown-mini-title { overflow:hidden; color:#f6cf4b; font-size:13px; font-weight:850; text-overflow:ellipsis; white-space:nowrap; }
    .pumpdown-mini-channel { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 8px; overflow:hidden; color:#95a7bb; font-size:10px; }
    .pumpdown-mini-channel-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .pumpdown-mini-channel-value { color:#dce7f4; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; }
    .pumpdown-mini-handshake-time { grid-column:1 / -1; color:#6f8499; }
    .pumpdown-mini-value { margin-left:auto; color:#fff3ad; font-size:14px; font-weight:850; font-variant-numeric:tabular-nums; white-space:nowrap; }
    .pumpdown-mini-actions { display:grid; justify-items:end; gap:4px; margin-left:auto; }
    .pumpdown-mini-close { padding:3px 7px; border-color:#52677c; color:#aebed0; background:#122030; font-size:9px; }
    .pumpdown-mini-svg { display:block; width:100%; height:88px; margin-top:5px; }
    .pumpdown-mini-watermark { opacity:.70; filter:brightness(1.32) saturate(1.28) contrast(1.08); pointer-events:none; }
    @keyframes alarmPulse { from { transform:scale(1); filter:drop-shadow(0 0 0 transparent); } to { transform:scale(1.2); filter:drop-shadow(0 0 5px #ff4b42); } }
    @keyframes wellboreFlow { 0%,100% { opacity:.24; } 50% { opacity:.95; } }
    @media (prefers-reduced-motion:reduce) { .wellbore-flow-chevron { animation:none; opacity:.65; } }
    .alarm-dialog { width:min(430px,calc(100vw - 28px)); padding:0; border:1px solid #4b5e76; border-radius:11px; background:#111b29; color:var(--text); box-shadow:0 24px 80px #000c; }
    .alarm-dialog::backdrop { background:#05080db5; backdrop-filter:blur(2px); }
    .alarm-shell { padding:17px; }
    .alarm-head { display:flex; align-items:flex-start; gap:10px; margin-bottom:14px; }
    .alarm-head h2 { margin:0; font-size:17px; }
    .alarm-channel { margin-top:3px; color:var(--muted); font-size:11px; }
    .alarm-close { margin-left:auto; width:31px; height:31px; padding:0; font-size:18px; }
    .alarm-enable { display:flex; align-items:center; gap:8px; margin-bottom:13px; padding:10px; border:1px solid #34465c; border-radius:7px; background:#0c1521; font-weight:750; }
    .alarm-limits { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
    .alarm-limits label { color:var(--muted); font-size:10px; font-weight:750; text-transform:uppercase; letter-spacing:.04em; }
    .alarm-limits input { width:100%; margin-top:5px; padding:8px 9px; border:1px solid #40536b; border-radius:7px; background:#08111d; color:var(--text); outline:none; }
    .alarm-limits input:focus { border-color:var(--accent); }
    .alarm-audible { display:flex; align-items:center; gap:8px; margin:13px 0; color:#c2ccda; font-size:12px; }
    .alarm-audible select { margin-left:auto; min-width:120px; padding:7px 9px; border:1px solid #40536b; border-radius:7px; background:#08111d; color:var(--text); outline:none; }
    .alarm-audible select:focus { border-color:var(--accent); }
    .alarm-note { margin:0 0 14px; color:var(--muted); font-size:10px; }
    .alarm-actions { display:flex; justify-content:flex-end; gap:7px; }
    .treatment-stream-controls { display:none; position:fixed; z-index:18; top:8px; right:12px; align-items:flex-start; gap:8px; }
    .treatment-stream-controls[hidden] { display:none !important; }
    .app.treatment-view .treatment-stream-controls { display:flex; }
    .app.treatment-view.live-values-open .treatment-stream-controls { right:342px; }
    .treatment-stream-quick-qr { position:fixed; z-index:32; bottom:16px; left:16px; width:96px; height:96px; padding:6px; border:1px solid #4ee1aa; border-radius:8px; background:#fff; box-shadow:0 5px 22px #000a; cursor:pointer; }
    .treatment-stream-quick-qr[hidden] { display:none; }
    .treatment-stream-quick-qr .branded-qr { width:82px; height:82px; }
    .treatment-stream-quick-qr svg { display:block; width:82px; height:82px; }
    .treatment-stream-button { display:inline-flex; align-items:center; gap:7px; min-height:34px; border-color:#3c5d72; background:#102334; color:#a9c9df; font-weight:850; box-shadow:0 4px 18px #0008; }
    .treatment-stream-button::before { content:''; width:8px; height:8px; border-radius:50%; background:#71859a; }
    .treatment-stream-button.active { border-color:#4ee1aa; background:#123a30; color:#d9fff1; }
    .treatment-stream-button.active::before { background:#5bffc2; box-shadow:0 0 0 4px #5bffc229; animation:streamPulse 1s ease-in-out infinite alternate; }
    @keyframes streamPulse { to { box-shadow:0 0 0 7px #5bffc20d; } }
    .share-dialog { width:min(680px,calc(100vw - 28px)); padding:0; border:1px solid #4b5e76; border-radius:12px; background:#111b29; color:var(--text); box-shadow:0 24px 80px #000c; }
    .share-dialog::backdrop { background:#05080dc7; backdrop-filter:blur(3px); }
    .share-shell { padding:18px; }
    .share-head { display:flex; align-items:flex-start; gap:12px; margin-bottom:15px; }
    .share-head h2 { margin:0; font-size:19px; }
    .share-head p { margin:4px 0 0; color:var(--muted); font-size:11px; }
    .share-close { margin-left:auto; width:32px; height:32px; padding:0; font-size:19px; }
    .share-config { display:grid; grid-template-columns:1fr 150px; gap:10px; }
    .share-config label { color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
    .share-config input,.share-config select { width:100%; margin-top:5px; padding:9px 10px; border:1px solid #40536b; border-radius:7px; background:#08111d; color:var(--text); outline:none; }
    .share-config input:focus,.share-config select:focus { border-color:var(--accent); }
    .share-note { margin:11px 0; padding:9px 10px; border:1px solid #2f455c; border-radius:7px; background:#0b1623; color:#aab8ca; font-size:11px; line-height:1.45; }
    .share-status { min-height:34px; margin:10px 0; color:#b6c4d5; font-size:11px; }
    .share-result { display:grid; grid-template-columns:210px minmax(0,1fr); gap:16px; align-items:center; margin-top:13px; padding:14px; border:1px solid #35516c; border-radius:9px; background:#0a1420; }
    .share-result[hidden] { display:none; }
    .share-qr { display:grid; place-items:center; min-height:190px; padding:10px; border-radius:7px; background:#fff; }
    .branded-qr { position:relative; display:block; }
    .share-qr .branded-qr { width:185px; height:185px; }
    .share-qr svg { display:block; width:185px; height:185px; }
    .share-url { width:100%; min-height:74px; resize:none; padding:9px; border:1px solid #40536b; border-radius:7px; background:#07111c; color:#d9e8fa; font:11px ui-monospace,SFMono-Regular,monospace; }
    .share-result-meta { margin:8px 0; color:var(--muted); font-size:10px; }
    .share-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin-top:14px; }
    .share-actions .danger-action { color:#ffabb5; border-color:#713846; background:#281923; }
    @media (max-width:650px) { .share-config,.share-result { grid-template-columns:1fr; } .share-qr { width:210px; margin:auto; } }
    .app.treatment-view { height:100dvh; overflow:hidden; }
    .app.treatment-view:not(.sidebar-collapsed) > aside { height:100dvh; min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
    .app.treatment-view:not(.sidebar-collapsed) > aside::-webkit-scrollbar { width:9px; }
    .app.treatment-view:not(.sidebar-collapsed) > aside::-webkit-scrollbar-track { background:#0c1420; }
    .app.treatment-view:not(.sidebar-collapsed) > aside::-webkit-scrollbar-thumb { border:2px solid #0c1420; border-radius:8px; background:#46566a; }
    .app.treatment-view:not(.sidebar-collapsed) > aside::-webkit-scrollbar-thumb:hover { background:#66778d; }
    .app.treatment-view:not(.sidebar-collapsed) .channel-browser { flex:0 0 650px; height:650px; min-height:650px; }
    .app.treatment-view main { height:100%; min-height:0; overflow:hidden; grid-template-columns:minmax(0,1fr); grid-template-rows:auto minmax(0,1fr) !important; }
    .app.treatment-view.live-values-open main { grid-template-columns:minmax(0,1fr) 330px; }
    .app.treatment-view main > .topbar { grid-column:1 / -1; grid-row:1; }
    .app.treatment-view main > .plots { grid-column:1; grid-row:2; width:100%; height:100%; min-height:0; overflow:hidden; }
    .app.treatment-view main > .plot-resizer,.app.treatment-view main > .stats { display:none !important; }
    .app.treatment-view #togglePlot3 { display:none; }
    .app.treatment-view #liveValuesToggle,.app.treatment-view #toggleTreatmentControls { display:inline-flex; }
    .app.treatment-view.live-values-open .live-values-panel { display:block; grid-column:2; grid-row:2; height:100%; min-height:0; overflow:auto; }
    .app.treatment-view.controls-collapsed main { grid-template-rows:minmax(0,1fr) !important; }
    .app.treatment-view.controls-collapsed main > .topbar { display:none; }
    .app.treatment-view.controls-collapsed main > .plots { grid-row:1; }
    .app.treatment-view.controls-collapsed.live-values-open .live-values-panel { grid-row:1; }
    .app.treatment-view.controls-collapsed #topbarReveal { display:block; }
    .app.treatment-view.controls-collapsed .treatment-collapsed-brand { display:block; }
    .app.treatment-view #plotWrap1 .plot-title { top:48px; left:12px; }
    .app.treatment-view #plotWrap1 .plot-channel-bar { top:65px; }
    .app.treatment-view.controls-collapsed #plotWrap1 .live-well-matches { top:31px; left:420px; }
    .app.treatment-view.controls-collapsed #plotWrap1 .plot-title { top:54px; left:12px; }
    .app.treatment-view.controls-collapsed #plotWrap1 .plot-channel-bar { top:72px; }
    .empty { position: absolute; inset: 57px 0 0; display: grid; place-content: center; text-align: center; color: var(--muted); pointer-events: none; }
    .tooltip { position: absolute; z-index: 5; display: none; pointer-events: none; min-width: 210px; max-width: 360px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: rgba(10,15,24,.94); box-shadow: 0 8px 30px #0008; font-size: 12px; }
    .tip-row { display: grid; grid-template-columns: 8px 1fr auto; gap: 6px; margin-top: 3px; }
    .tip-row:not(.nearest-trace) { opacity: .62; }
    .tip-row.nearest-trace { margin: 5px -5px 2px; padding: 5px; border: 1px solid var(--accent); border-radius: 5px; background: #1a3a3f; opacity: 1; }
    .tip-row.nearest-trace span:nth-child(2) { color: #fff; font-weight: 800; }
    .tip-row.nearest-trace b { color: #fff; font-size: 14px; font-weight: 900; }
    .dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; }
    .stats { min-width: 0; max-width: 100%; border-top: 1px solid var(--line); min-height: 0; overflow: auto; padding: 0 16px 16px; }
    .stats-head { position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 12px 0 8px; display: flex; justify-content: space-between; align-items: center; }
    .stats-head-actions { display:flex; gap:7px; }
    .stats-head .close-report { color:#ff9aa8; border-color:#713846; background:#281923; }
    .stats-head .close-report:hover { color:#fff; border-color:#ff7185; background:#46202b; }
    .stats h2 { margin: 0; font-size: 14px; }
    .point-analysis { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
    .point-analysis-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
    .point-analysis-head strong { margin-right: auto; }
    .decimal-control { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
    #pointDecimals, #isipRateThreshold, #isipAverageSeconds { width: 52px; color: var(--text); background: #0d1521; border: 1px solid var(--line); border-radius: 5px; padding: 5px; text-align: center; }
    .point-values { display: grid; grid-template-columns: repeat(6,minmax(90px,1fr)); gap: 8px; }
    .point-value label { display: block; color: var(--muted); font-size: 10px; margin-bottom: 3px; text-transform: uppercase; }
    .point-value input { width: 100%; color: var(--text); background: #0d1521; border: 1px solid var(--line); border-radius: 5px; padding: 6px; font-variant-numeric: tabular-nums; }
    .point-note { color: var(--muted); font-size: 11px; margin-top: 7px; }
    .arranger { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
    .frac-report { min-width: 0; max-width: 100%; overflow: hidden; margin: 0 0 18px; padding: 18px; border: 1px solid #30445d; border-radius: 12px; background: linear-gradient(180deg,#111c2b 0,#0e1724 100%); box-shadow: 0 16px 44px #0003; }
    .frac-report h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
    .report-summary { display: grid; grid-template-columns: repeat(4,minmax(150px,1fr)); gap: 10px; margin: 14px 0 12px; }
    .report-heading { display: flex; align-items: center; gap: 14px; margin: -18px -18px 12px; padding: 16px 18px; border-bottom: 1px solid #31455f; border-radius: 11px 11px 0 0; background: linear-gradient(100deg,#16263a,#111c2b 62%,#13263a); }
    .report-title { margin-right: auto; }
    .report-kicker { display: block; margin-bottom: 3px; color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
    .report-heading button { border-color: #46617f; background: #192b42; font-weight: 750; }
    .report-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
    .report-heading .close-report { color:#ff9aa8; border-color:#713846; background:#281923; }
    .report-heading .close-report:hover { color:#fff; border-color:#ff7185; background:#46202b; }
    .report-banner { margin: 10px 0; padding: 9px 11px; border: 1px solid #775a24; border-radius: 7px; background: #3b2a102e; color: #e3bd6b; font-size: 11px; }
    .report-template-note { margin: 8px 0 4px; color: #9dabc0; font-size: 11px; }
    .saved-report-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 8px 0 12px; padding: 9px 11px; border: 1px solid #31536b; border-left: 3px solid #51d3a5; border-radius: 7px; background: #102536; color: #a9bdd1; font-size: 11px; }
    .saved-report-status strong { color: #e9f4ff; }
    .saved-report-status button { margin-left: auto; padding: 4px 8px; font-size: 10px; }
    .report-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 7px; padding: 9px 10px 9px 12px; border-left: 3px solid var(--accent); border-bottom: 1px solid #2b3c52; border-radius: 5px 5px 0 0; background: linear-gradient(90deg,#17283a 0,#121d2b 55%,transparent 100%); }
    .report-section-heading h3 { margin: 0; color: #f0f5fb; font-size: 15px; letter-spacing: -.01em; }
    .report-decimal-control { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 650; }
    .report-decimal-control input { width: 48px; padding: 4px 5px; border: 1px solid #405672; border-radius: 6px; background: #09131f; color: #f0f5fb; text-align: center; font-weight: 750; font-variant-numeric: tabular-nums; }
    .report-identity { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin: 0 0 14px; }
    .report-field { padding: 9px 10px; border: 1px solid #30455f; border-radius: 8px; background: #0b1522; }
    .report-field label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
    .report-field input { width: 100%; padding: 7px 9px; border: 1px solid #3b516c; border-radius: 6px; background: #07111c; color: #f3f7fb; font-weight: 750; }
    .report-field input:focus { outline: 2px solid #d2943d66; border-color: var(--accent); }
    .report-card { min-height: 72px; padding: 10px 11px; border: 1px solid #30455f; border-top: 2px solid #4b6b8d; border-radius: 8px; background: linear-gradient(180deg,#101d2d,#0b1522); }
    .report-card small { display: block; color: #8393aa; text-transform: uppercase; font-size: 9px; font-weight: 800; letter-spacing: .06em; }
    .report-card strong { display: block; margin-top: 6px; color: #f1f6fb; font-size: 14px; line-height: 1.3; }
    .report-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .report-design-wrap { width: 100%; max-width: 100%; margin-bottom: 12px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-gutter: stable; border: 1px solid #26384e; border-radius: 7px; }
    .report-design-table { width: max-content; min-width: 100%; margin: 0 !important; border: 0 !important; border-radius: 0 !important; }
    .report-design-table th, .report-design-table td { padding: 6px 5px; }
    .report-design-table th { width: 82px; min-width: 82px; white-space: normal; overflow-wrap: anywhere; vertical-align: bottom; font-size: 9px; line-height: 1.2; }
    .report-design-table th[title], .report-section-heading h3[title] { cursor: help; text-decoration: underline dotted rgba(206,220,236,.55); text-underline-offset: 3px; }
    .report-design-table th:first-child { width: 90px; min-width: 90px; }
    .report-design-table th:nth-child(2), .report-design-table th:nth-child(3) { width: 94px; min-width: 94px; }
    .report-design-table th:nth-child(4) { width: 88px; min-width: 88px; }
    .report-design-table th:nth-child(5) { width: 66px; min-width: 66px; }
    .report-design-table th:nth-child(6) { width: 112px; min-width: 112px; }
    .report-design-table th:nth-child(7) { width: 96px; min-width: 96px; }
    .report-design-table th:nth-child(8), .report-design-table th:nth-child(9), .report-design-table th:nth-child(10) { width: 84px; min-width: 84px; }
    .report-design-table th:nth-child(11) { width: 72px; min-width: 72px; }
    .report-design-table th.report-design-actions { width: 86px; min-width: 86px; }
    .report-source { display: block; margin-top: 5px; color: #71839a; font-size: 8px; font-weight: 650; line-height: 1.25; letter-spacing: 0; text-transform: none; overflow-wrap: anywhere; }
    .report-source-original { color: #566a83; }
    .report-source-select { width:100%; margin-top:3px; padding:3px 4px; border:1px solid #38506a; border-radius:4px; background:#0b1725; color:#aebed0; font-size:8px; font-weight:650; }
    .report-design-table td { font-size: 11px; }
    .report-design-table td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .report-design-table th.report-design-chemical-heading { width: 112px; min-width: 112px; }
    .report-design-table td.report-design-chemical-cell { width: 112px; min-width: 112px; text-align: left; white-space: pre-line; font-size: 10px; line-height: 1.4; }
    .report-chemical-manager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 9px; border: 1px solid #26384e; border-bottom: 0; border-radius: 7px 7px 0 0; background: #0c1724; color: #8192a8; font-size: 9px; }
    .report-chemical-manager strong { display: block; color: #cbd7e5; font-size: 10px; }
    .report-chemical-manager > div:last-child { display: flex; align-items: center; gap: 5px; }
    .report-chemical-manager button { padding: 4px 8px; font-size: 9px; white-space: nowrap; }
    .report-chemical-name { display: inline-block; min-width: 24px; cursor: text; outline: none; }
    .report-chemical-name:hover, .report-chemical-name:focus { color: #fff; background: #20354b; box-shadow: 0 0 0 2px #46617f; }
    .report-remove-manual-chemical { float: right; margin: -2px -2px 0 3px; padding: 0 4px !important; border: 0; color: #ff9aa8; background: transparent; font-size: 11px !important; }
    .report-design-table th:first-child, .report-design-table td:first-child { position: sticky; left: 0; z-index: 2; background: #0f1926; box-shadow: 2px 0 0 #26384e; }
    .report-design-table thead th:first-child { z-index: 4; background: #0b1522; }
    .report-design-table td.report-design-chemical-offload { background: rgba(255,145,77,.16); box-shadow: inset 3px 0 #ff914d; }
    .report-design-total td { border-top: 2px solid #4b6b8d; background: #101d2d; font-weight: 800; }
    .report-design-short td { background:#3a2119 !important; color:#ffc2a8; }
    .report-design-short td:first-child { box-shadow:inset 4px 0 0 #ff7a45; font-weight:850; }
    .report-design-cell[contenteditable] { position: relative; cursor: text; outline: none; }
    .report-design-cell[contenteditable]:hover { background: #172a3d; box-shadow: inset 0 0 0 1px #46617f; }
    .report-design-cell[contenteditable]:focus { background: #0a1928; box-shadow: inset 0 0 0 2px var(--accent); }
    .report-design-cell.report-cell-edited { padding-right: 18px; background: #3b2a10; color: #ffd98c; }
    .report-design-cell.report-cell-edited::after { content: '*'; position: absolute; top: 4px; right: 6px; color: #ffbd5b; font-size: 12px; font-weight: 900; }
    .report-design-total .report-design-cell.report-cell-edited { background: #403018; }
    .report-design-actions { min-width: 92px !important; text-align: left !important; }
    .report-design-actions button { display:block; width:100%; margin:0 0 4px; padding:4px 6px; font-size:9px; }
    .report-substage-manager { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 10px; border:1px solid #26384e; border-bottom:0; background:#0d1826; color:#9fb1c5; font-size:10px; }
    .report-substage-removed { display:flex; flex-wrap:wrap; gap:5px; }
    .report-substage-removed button { padding:4px 7px; font-size:9px; }
    .report-chem-action { padding: 3px 7px; font-size: 10px; }
    .hidden-chemicals { margin: 8px 0 12px; padding: 7px 9px; border: 1px dashed #33445a; border-radius: 6px; color: var(--muted); }
    .hidden-chemicals summary { cursor: pointer; font-size: 11px; font-weight: 700; }
    .hidden-chemical-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
    .frac-report > h3 { margin: 24px 0 7px; padding: 9px 10px 9px 12px; border-left: 3px solid #73a7df; border-bottom: 1px solid #2b3c52; border-radius: 5px 5px 0 0; background: linear-gradient(90deg,#17283a 0,#121d2b 55%,transparent 100%); color: #f0f5fb; font-size: 15px; }
    .frac-report table { margin-bottom: 12px; border: 1px solid #26384e; border-radius: 7px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
    .frac-report thead { background: #0b1522; }
    .frac-report th { padding-top: 8px; padding-bottom: 8px; color: #8fa0b7; font-size: 10px; }
    .frac-report td { padding-top: 9px; padding-bottom: 9px; }
    .frac-report tbody tr:nth-child(even) { background: #0c1724b8; }
    .frac-report tbody tr:hover { background: #15283a; }
    .frac-report td strong { color: #f3f7fb; }
    .frac-report .point-note { margin: 7px 2px 10px; line-height: 1.45; }
    .arranger-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; flex-wrap: wrap; }
    .arranger-head h2 { margin: 0 auto 0 0; font-size: 14px; }
    #numericLayouts { min-width: 170px; color: var(--text); background: #0d1521; border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
    .arranger-help { color: var(--muted); font-size: 11px; margin-bottom: 8px; }
    .numeric-grid { display: grid; grid-template-columns: repeat(9,minmax(72px,1fr)); border-top: 1px solid #33445a; border-left: 1px solid #33445a; user-select: none; }
    .numeric-grid-cell { min-height: 52px; padding: 5px 6px; border: 0; border-right: 1px solid #33445a; border-bottom: 1px solid #33445a; border-radius: 0; background: #0b1420; color: var(--text); text-align: right; overflow: hidden; }
    .numeric-grid-cell:hover { background: #142238; }
    .numeric-grid-cell.target { outline: 2px solid var(--accent); outline-offset: -2px; }
    .numeric-grid-cell.selected { background: #1d3b49; }
    .grid-value { display: block; font-weight: 750; font-variant-numeric: tabular-nums; }
    .grid-label { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .stat-pick { border: 0; background: none; color: inherit; padding: 2px 4px; font-variant-numeric: tabular-nums; }
    .stat-pick:hover { color: var(--accent); text-decoration: underline; }
    table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
    th, td { text-align: right; padding: 7px 9px; border-bottom: 1px solid #1c293a; white-space: nowrap; }
    th:first-child, td:first-child { text-align: left; white-space: normal; }
    th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
    #statsBody tr { transition: background .12s ease, box-shadow .12s ease; }
    #statsBody tr.trace-hover { background: #1b3442; box-shadow: inset 3px 0 0 var(--accent); }
    #statsBody tr.trace-hover td { color: #fff; font-weight: 750; }
    #statsBody tr.trace-hover .stat-pick { color: #fff; font-weight: 800; }
    .help-button { min-width: 76px; height: 38px; border-color: #76572d; background: linear-gradient(180deg,#3b2d1b,#2b2116); color: #e7bd7c; font-weight: 800; box-shadow: inset 0 1px #ffffff0a, 0 0 0 1px #d2943d12; }
    .help-button:hover { border-color: var(--accent); background: linear-gradient(180deg,#50391d,#3c2b17); color: #fff0d7; box-shadow: 0 0 0 2px #d2943d24; }
    .help-dialog { width: min(940px, calc(100vw - 32px)); height: min(760px, calc(100vh - 32px)); padding: 0; border: 1px solid #3a4d66; border-radius: 14px; background: var(--panel); color: var(--text); box-shadow: 0 28px 90px #000d; }
    .help-dialog::backdrop { background: #05080dc7; backdrop-filter: blur(3px); }
    .help-shell { display: grid; grid-template-rows: auto auto auto minmax(0,1fr); height: 100%; }
    .help-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
    .help-head h2 { margin: 0; font-size: 21px; }
    .help-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
    .help-close { margin-left: auto; width: 36px; height: 36px; padding: 0; font-size: 21px; }
    .help-search-wrap { padding: 12px 20px; border-bottom: 1px solid var(--line); background: #0d1521; }
    .help-search { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: #08101b; color: var(--text); }
    .help-search:focus { border-color: var(--accent); box-shadow: 0 0 0 2px #d2943d24; }
    .help-nav { display:flex; gap:7px; padding:9px 20px; overflow-x:auto; border-bottom:1px solid var(--line); background:#101a28; scrollbar-width:thin; }
    .help-nav button { flex:0 0 auto; padding:6px 10px; border-color:#34475f; background:#121f30; color:#b8c6d7; font-size:10px; }
    .help-nav button:hover { border-color:#5a83ad; color:#fff; }
    .help-content { overflow: auto; padding: 20px; scroll-behavior: smooth; }
    .help-section { max-width: 760px; margin: 0 auto 26px; scroll-margin-top: 18px; }
    .help-section + .help-section { padding-top:4px; border-top:1px solid #1f3044; }
    .help-section h3 { margin: 0 0 10px; font-size: 16px; }
    .help-section p { margin: 7px 0; color: #c5d0de; }
    .help-section ol, .help-section ul { margin: 8px 0; padding-left: 22px; color: #c5d0de; }
    .help-section li { margin: 7px 0; }
    .help-section strong { color: #fff; }
    .help-quick { display: grid; grid-template-columns: repeat(auto-fit,minmax(165px,1fr)); gap: 9px; padding: 0; list-style: none; counter-reset: quick; }
    .help-quick li { counter-increment: quick; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #0d1521; }
    .help-quick li::before { content: counter(quick); display: grid; place-items: center; width: 22px; height: 22px; margin-bottom: 8px; border-radius: 50%; background: var(--accent); color: #07140f; font-size: 11px; font-weight: 900; }
    .help-tip { padding: 10px 12px; border-left: 3px solid var(--accent); border-radius: 0 7px 7px 0; background: #10251f; color: #ccece1 !important; }
    .help-empty { display: none; max-width: 760px; margin: 30px auto; color: var(--muted); text-align: center; }
    .warn { color: var(--danger); }
    @media (max-width: 1550px) { .topbar-actions { grid-template-columns:minmax(0,1fr); } .control-group.view-group { grid-column:1; grid-row:3; justify-self:stretch; } .topbar-actions .window-panel { grid-column:1; grid-row:4; min-width:0; } .control-group.results-group { grid-template-columns:auto minmax(230px,1fr) minmax(265px,1fr) 14px auto auto auto auto; } }
    @media (max-width: 1200px) { .control-group.results-group { grid-template-columns:auto minmax(230px,1fr) minmax(245px,1fr) auto auto; } .results-primary-arrow { display:none; } .report-stage-coverage { grid-column:2 / 4; grid-row:2; max-width:none; } .results-group > .results-secondary { display:flex; } .results-guide { grid-row:3; } .control-group.view-group { grid-row:4; } .topbar-actions .window-panel { grid-row:5; } }
    @media (max-width: 1100px) { .topbar-status-row { grid-template-columns:1fr auto; } .window-panel { min-width:0; } .help-button { grid-column:2; grid-row:1; } .report-summary { grid-template-columns: repeat(2,minmax(150px,1fr)); } }
    @media (max-width: 850px) { .app { grid-template-columns: 260px minmax(0,1fr); } .window-panel { min-width: 100%; grid-template-columns: 1fr; } .window-mode-actions { grid-column: 1; } .help-quick { grid-template-columns: 1fr; } .report-identity { grid-template-columns: 1fr; } .report-section-heading { align-items: flex-start; } }
