/* KAI Reservoir Lab workbench: energy theme (charcoal and gold, amber honeycomb) */
.rl-app { --rl-bg: #141925; --rl-panel: #1d2434; --rl-line: rgba(147, 167, 179, .22); --rl-ink: #e6eef2; --rl-muted: #9fb0bc; --rl-gold: #f2b544; --rl-blue: #3b82f6;
  position: relative; isolation: isolate; color: var(--rl-ink); background: radial-gradient(110% 90% at 85% 0%, #2a3348 0%, #1d2434 45%, #141925 100%);
  border-radius: 20px; padding: clamp(14px, 3vw, 26px); font-family: "IBM Plex Sans", system-ui, sans-serif; overflow: hidden; }
.rl-app::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .18; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 56 16v32L28 64 0 48V16Z M28 64v33' fill='none' stroke='%23f2b544' stroke-width='.8'/%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(120% 80% at 100% 0%, #000 0%, transparent 70%); mask-image: radial-gradient(120% 80% at 100% 0%, #000 0%, transparent 70%); }
.rl-app h3 { margin: 0 0 6px; font: 700 1.08rem "Bricolage Grotesque", system-ui, sans-serif; color: #fff; }
.rl-app h4 { margin: 16px 0 6px; font: 600 .86rem "IBM Plex Sans", system-ui, sans-serif; color: var(--rl-gold); text-transform: uppercase; letter-spacing: .05em; }
.rl-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 14px; }
.rl-head .rl-fine { flex-basis: 100%; margin: 0; }
.rl-field { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--rl-muted); }
.rl-in { font: inherit; color: var(--rl-ink); background: #0f1420; border: 1px solid var(--rl-line); border-radius: 10px; padding: 8px 10px; min-height: 40px; max-width: 100%; }
.rl-badge2 { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(242, 181, 68, .14); color: var(--rl-gold); border: 1px solid rgba(242, 181, 68, .45);
  font: 600 .74rem "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .04em; text-transform: uppercase; }
.rl-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
.rl-panel { background: rgba(20, 25, 37, .72); border: 1px solid var(--rl-line); border-radius: 16px; padding: 14px; min-width: 0; }
.rl-wide { grid-column: 1 / -1; }
.rl-sub { margin: 0 0 10px; color: var(--rl-muted); font-size: .9rem; line-height: 1.45; }
.rl-fine { margin: 8px 0 0; color: var(--rl-muted); font-size: .8rem; line-height: 1.45; }
.rl-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 12px; background: #0f1420; border: 1px solid var(--rl-line); margin-bottom: 10px; }
.rl-seg button { font: 600 .84rem "IBM Plex Sans", system-ui, sans-serif; color: var(--rl-muted); background: transparent; border: 0; border-radius: 9px; padding: 8px 12px; min-height: 36px; cursor: pointer; }
.rl-seg button[aria-pressed="true"] { background: var(--rl-gold); color: #1d2434; }
.rl-plan { display: block; width: 100%; border-radius: 10px; cursor: crosshair; touch-action: manipulation; background: #334155; }
.rl-sl { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l o" "r r"; gap: 2px 8px; margin: 8px 0; font-size: .86rem; color: var(--rl-muted); }
.rl-sl > span { grid-area: l; }
.rl-sl > output { grid-area: o; color: #fff; font: 600 .86rem "IBM Plex Mono", ui-monospace, monospace; }
.rl-sl > input[type="range"] { grid-area: r; width: 100%; accent-color: var(--rl-gold); min-height: 28px; }
.rl-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rl-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 6px 0 12px; }
.rl-kpis div { background: #0f1420; border: 1px solid var(--rl-line); border-radius: 12px; padding: 10px 12px; }
.rl-kpis dt { font: 700 1.1rem "Bricolage Grotesque", system-ui, sans-serif; color: var(--rl-gold); }
.rl-kpis dd { margin: 4px 0 0; color: var(--rl-muted); font-size: .78rem; line-height: 1.35; }
.rl-chart { min-height: 300px; }
.rl-3d { min-height: 260px; border-radius: 12px; background: #0f1420; border: 1px solid var(--rl-line); display: grid; place-items: center; overflow: hidden; }
.rl-3d canvas { display: block; width: 100%; cursor: grab; }
.rl-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rl-cta .rl-sl { min-width: 200px; margin: 0; }
.rl-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer;
  font: 700 .92rem "IBM Plex Sans", system-ui, sans-serif; background: var(--rl-gold); color: #1d2434; text-decoration: none; }
.rl-btn:hover { background: #f6c96a; }
.rl-btn[disabled] { opacity: .6; cursor: progress; }
.rl-btn.ghost { background: transparent; color: var(--rl-ink); border: 1px solid var(--rl-line); }
.rl-btn.sm { min-height: 32px; padding: 0 12px; font-size: .8rem; }
.rl-runs { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rl-runs li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #0f1420; border: 1px solid var(--rl-line); }
.rl-st { font: 600 .74rem "IBM Plex Mono", ui-monospace, monospace; padding: 2px 8px; border-radius: 999px; background: #334155; }
.rl-st.succeeded { background: #14532d; color: #bbf7d0; } .rl-st.failed { background: #7f1d1d; color: #fecaca; } .rl-st.queued, .rl-st.running { background: #713f12; color: #fde68a; }
@media (max-width: 860px) {
  .rl-grid { grid-template-columns: minmax(0, 1fr); }
  .rl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) { .rl-row3 { grid-template-columns: minmax(0, 1fr); } .rl-app { border-radius: 14px; } }

/* Plotly views */
.rl-3d { display: block; place-items: initial; min-height: 300px; }
.rl-3d > p { padding: 24px; text-align: center; }
.rl-planplot { width: 100%; border-radius: 10px; background: #0f1420; border: 1px solid var(--rl-line); overflow: hidden; }
.rl-chart { min-height: 320px; }
.rl-kpis div[role="button"] { cursor: pointer; transition: border-color .15s; }
.rl-kpis div[role="button"]:hover, .rl-kpis div[role="button"]:focus-visible { border-color: var(--rl-gold); outline: none; }
.rl-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 6px 0 10px; }
.rl-bar .rl-seg { flex-wrap: wrap; margin: 0; }
.rl-btn.ghost[aria-pressed="true"] { border-color: var(--rl-gold); color: var(--rl-gold); }
.js-plotly-plot .plotly .modebar { background: rgba(15, 20, 32, .6) !important; }
.rl-plan[hidden], .rl-planplot[hidden] { display: none; }
.rl-sl[hidden] { display: none; }
