*{box-sizing:border-box}body{margin:0;font-family:Segoe UI,Arial,sans-serif;color:#1f2937;background:#f3f4f6}h1{font-size:18px;margin:0}h2{font-size:14px;margin:0 0 8px}html,body,#root{height:100%}.app{height:100vh;display:flex;flex-direction:column;overflow:hidden}.topbar{display:flex;align-items:baseline;gap:12px;padding:6px 16px;background:#0f172a;color:#fff;flex:none}.topbar .sub{color:#94a3b8;font-size:12px}.layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:10px;padding:8px 10px;align-items:stretch;flex:1;min-height:0}.layout.collapsed{grid-template-columns:30px minmax(0,1fr)}.rail{display:flex;flex-direction:column;align-items:center;gap:10px;padding:8px 0;border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#334155;font-size:16px;cursor:pointer}.rail:hover{background:#eef2ff}.rail-text{writing-mode:vertical-rl;font-size:12px;letter-spacing:.5px}.panel[hidden]{display:none}.panel-hide{position:absolute;top:6px;right:6px;width:24px;height:24px;padding:0;border:1px solid #cbd5e1;border-radius:6px;background:#f8fafc;color:#334155}.panel{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:14px;position:relative;overflow:auto}.content{min-width:0;min-height:0;display:flex;flex-direction:column;gap:8px;overflow:auto}.content.graphmode{overflow:hidden}.card.fill{flex:1 1 0;min-height:0;display:flex;flex-direction:column}.card.fill>.graph{height:auto!important;flex:1 1 0;min-height:0}.answercard{max-height:110px;overflow:auto;padding:8px 12px;flex:none}.toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;flex:none}.chips{display:flex;flex-wrap:wrap;gap:6px}.notes{flex:none;margin:0;font-size:12px}.notes summary{cursor:pointer;color:#92400e}.notes .note{margin-top:4px}label{display:block;font-size:12px;color:#64748b;margin:10px 0 4px}input,select,textarea{width:100%;padding:7px 8px;border:1px solid #cbd5e1;border-radius:6px;font:inherit;font-size:13px}textarea{resize:vertical}.row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.hint{font-size:11px;color:#64748b;margin:8px 0 0}button{font:inherit;font-size:13px;cursor:pointer}button.primary{width:100%;margin-top:12px;padding:8px;border:0;border-radius:6px;background:#2563eb;color:#fff;font-weight:600}button.primary:disabled{background:#93c5fd;cursor:not-allowed}.seg,.tabs{display:flex;gap:4px}.seg{margin-bottom:4px}.seg button,.tabs button{flex:1;padding:6px 10px;border:1px solid #cbd5e1;background:#f8fafc;border-radius:6px}.tabs button{flex:0 0 auto;padding:4px 10px;font-size:12px}.seg button.on,.tabs button.on{background:#0f172a;border-color:#0f172a;color:#fff}.error{margin-top:10px;padding:8px 10px;border-radius:6px;background:#fef2f2;color:#b91c1c;font-size:12px;white-space:pre-wrap}.note{padding:6px 10px;border-radius:6px;background:#fffbeb;color:#92400e;font-size:12px}.note.busy{margin-top:10px;background:#eff6ff;color:#1e40af;line-height:1.45}.card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:14px}.card.flush{padding:0;overflow:hidden}.card.muted,.muted{color:#6b7280}.pad{padding:14px}.answer{margin:0;line-height:1.5;white-space:pre-wrap}details{margin-top:8px;font-size:12px}pre{background:#f8fafc;padding:8px;border-radius:6px;overflow:auto}.metric{display:inline-flex;align-items:baseline;gap:5px;background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:2px 10px}.metric.warn{border-color:#fca5a5;background:#fef2f2}.metric-value{font-size:13px;font-weight:700}.metric-label{font-size:11px;color:#64748b}.table-wrap{max-height:calc(100vh - 150px);overflow:auto}table{border-collapse:collapse;width:100%;font-size:12px}th,td{padding:5px 10px;text-align:left;border-bottom:1px solid #f1f5f9;white-space:nowrap}th{position:sticky;top:0;background:#f8fafc;font-weight:600}td.over{color:#b91c1c;font-weight:600}.graph{position:relative;display:flex;flex-direction:column}.graph-stage{position:relative;flex:1 1 0;min-height:0}.graph-canvas{position:absolute;top:0;right:0;bottom:0;left:0}.gbar{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;padding:4px 10px;font-size:12px;background:#f8fafc;border-bottom:1px solid #e5e7eb;flex:none}.gbar button{padding:1px 9px;font-size:12px;border:1px solid #cbd5e1;border-radius:6px;background:#fff}.gb-title{font-size:10px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.4px}.gb-scale{font-size:10px;color:#64748b;margin:0 -6px}.gb-item{white-space:nowrap}.gb-ring{display:inline-block;width:9px;height:9px;border:3px solid #4a2c17;border-radius:3px;vertical-align:-2px;background:tan}.gb-ring.scn{border-color:#7c3aed;background:#ede9fe}.scn-banner{flex:none;padding:8px 12px;display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;border-color:#c4b5fd;background:#faf5ff;font-size:12px}.scn-banner .scn-text{flex:1 1 320px;line-height:1.45}.scn-banner button{padding:4px 10px;border:1px solid #7c3aed;background:#fff;color:#5b21b6;border-radius:6px;font-size:12px}.row.two{grid-template-columns:1fr 1fr}.scn-rows{display:flex;flex-direction:column;gap:6px;margin-top:4px}.scn-row{display:grid;grid-template-columns:1fr 76px 24px;gap:6px;align-items:center}.scn-row select,.scn-row input{min-width:0}.scn-row .scn-x{padding:2px 0;border:1px solid #e2e8f0;background:#f8fafc;border-radius:6px;color:#64748b}.scn-cur{grid-column:1 / -1;font-size:11px;color:#64748b;margin-top:-3px}.scn-add{margin-top:6px;padding:4px 10px;border:1px dashed #94a3b8;background:#fff;border-radius:6px;font-size:12px}.gb-info{color:#475569}.gb-spacer{flex:1}.gb-help{color:#2563eb;cursor:help;white-space:nowrap}.gdetails{position:absolute;top:8px;right:8px;z-index:6;width:300px;max-height:calc(100% - 16px);overflow:auto;background:#fffffff7;border:1px solid #cbd5e1;border-radius:8px;padding:8px 10px;font-size:12px;box-shadow:0 4px 14px #0f172a2e}.gclose{position:absolute;top:4px;right:6px;border:0;background:transparent;color:#64748b;font-size:13px;padding:2px 5px}.gclose:hover{color:#0f172a}.chk{display:flex;align-items:center;gap:6px;margin-top:3px;cursor:pointer}.panel .chk{margin-top:12px}.panel .chk input{width:auto}.gexpand{margin:6px 0;padding:6px 8px;background:#f1f5f9;border-radius:6px}.gexpand button{margin:2px 6px 2px 8px;padding:1px 8px}.garrow{position:absolute;z-index:4;width:16px;height:16px;padding:0;margin:0;font-size:14px;font-weight:700;line-height:13px;text-align:center;cursor:pointer;background:#fff;color:#1e3a5f;border:1px solid #94a3b8;border-radius:50%}.garrow:hover{background:#1e3a5f;color:#fff}.garrow.left{transform:translateY(-100%)}.garrow.right{transform:translate(-100%,-100%)}.gradient{display:inline-block;width:90px;height:10px;margin:0;border:1px solid #94a3b8;border-radius:4px;background:linear-gradient(90deg,#2a9d8f,#ffd60a 33%,#ff8c00 67%,#e63946)}.gdetails td.k{color:#6b7280;padding-right:8px;vertical-align:top}.gdetails td{white-space:pre-wrap;border:0;padding:1px 4px 1px 0}@media (max-width: 960px){.layout,.layout.collapsed{grid-template-columns:1fr}.app{height:auto;overflow:visible}}.sp-tags{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}.sp-tag{display:inline-flex;align-items:center;gap:4px;max-width:100%;padding:2px 4px 2px 8px;border:1px solid #bfdbfe;border-radius:999px;background:#eff6ff;color:#1e3a8a;font-size:12px}.sp-tag-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:210px}.sp-tag button{width:16px;height:16px;padding:0;border:0;border-radius:50%;background:transparent;color:#1e3a8a;font-size:14px;line-height:14px;cursor:pointer}.sp-tag button:hover{background:#dbeafe}.sp-list{list-style:none;margin:4px 0 0;padding:2px;max-height:240px;overflow:auto;border:1px solid #cbd5e1;border-radius:6px;background:#fff}.sp-opt{display:flex;flex-direction:column;padding:5px 8px;border-radius:4px;cursor:pointer}.sp-opt.on{background:#eff6ff}.sp-opt.taken{opacity:.5;cursor:default}.sp-name{font-size:13px;color:#0f172a}.sp-meta{font-size:11px;color:#64748b}.sp-hint{padding:6px 8px;font-size:12px;color:#64748b}.sp-hint.err{color:#b91c1c}.sp-badge{display:inline-block;margin-right:6px;padding:0 5px;border-radius:4px;background:#0284c7;color:#fff;font-size:10px;font-weight:600;line-height:15px;vertical-align:1px}.sp-tag.plant{border-color:#7dd3fc;background:#f0f9ff}.sp-tag .sp-badge{margin-right:0}
