
:root{
  --bg:#0b0f14;
  --panel:#101722;
  --text:#e7eef7;
  --muted:#aab7c6;
  --line:#1e2a3a;
  --accent:#4B9CD3;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  background: radial-gradient(1200px 600px at 10% 10%, rgba(75,156,211,0.15), transparent 60%),
              radial-gradient(800px 400px at 80% 20%, rgba(54,201,139,0.08), transparent 65%),
              var(--bg);
  color:var(--text);
}
.header{
  display:flex;
  gap:16px;
  justify-content:space-between;
  align-items:flex-start;
  padding:20px 20px 10px;
  border-bottom:1px solid var(--line);
}
.header h1{margin:0 0 4px;font-size:22px}
.subtitle{margin:0;color:var(--muted);max-width:76ch}
.meta{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.pill{
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
  font-size:12px;
  background: rgba(16,23,34,0.6);
}
.layout{
  display:grid;
  grid-template-columns: 520px 1fr;
  gap:14px;
  padding:14px 14px 24px;
  align-items:start;
}
.panel{
  background: linear-gradient(180deg, rgba(16,23,34,0.92), rgba(14,20,29,0.92));
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px;
}
.panel h2{margin:4px 0 12px; font-size:16px}
.inputs details{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  margin-bottom:10px;
  background: rgba(14,20,29,0.4);
}
.inputs summary{
  cursor:pointer;
  font-weight:600;
  color:var(--text);
  outline:none;
}
.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px 12px;
  padding-top:10px;
}
.control{display:flex;flex-direction:column;gap:6px}
.control label{font-size:12px;color:var(--muted)}
.control .val{font-family:var(--mono);color:var(--text)}
input[type="range"]{width:100%}
.hint{
  padding:8px 10px;
  border:1px dashed rgba(75,156,211,0.35);
  background: rgba(75,156,211,0.08);
  border-radius:12px;
  color:var(--muted);
  font-size:12px;
}
.note{
  border:1px dashed rgba(75,156,211,0.35);
  background: rgba(75,156,211,0.08);
  border-radius:12px;
  padding:10px 12px;
  color:var(--muted);
  font-size:12px;
}
.note.tiny{margin:10px 0 0}
.outputs .cards{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
  margin-bottom:12px;
}
.card{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background: rgba(16,23,34,0.5);
}
.card h3{margin:0 0 10px; font-size:14px}
.caption{color:var(--muted); font-size:12px; margin-top:8px}
.tableWrap{overflow:auto}
table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
th, td{
  padding:10px 8px;
  border-bottom:1px solid var(--line);
  text-align:right;
  white-space:nowrap;
}
th:first-child, td:first-child{text-align:left}
thead th{
  color:var(--muted);
  font-weight:600;
  border-bottom:1px solid rgba(75,156,211,0.35);
}
.foot{
  margin:10px 0 0;
  color:var(--muted);
  font-size:12px;
}
.footer{
  padding:10px 16px 18px;
  color:var(--muted);
  font-size:12px;
}
code{font-family:var(--mono); color:#d7e8f5}
.row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}
.btn{
  border:1px solid rgba(75,156,211,0.55);
  background: rgba(75,156,211,0.12);
  color: rgba(231,238,247,0.95);
  padding:8px 10px;
  border-radius:12px;
  cursor:pointer;
  font-size:12px;
}
.btn:hover{ background: rgba(75,156,211,0.18); }
.span2{grid-column:1 / -1}

.chartWrap{ position: relative; }
.tooltip{
  position: absolute;
  pointer-events: none;
  min-width: 180px;
  max-width: 340px;
  padding: 10px 10px;
  border: 1px solid rgba(75,156,211,0.45);
  border-radius: 12px;
  background: rgba(16,23,34,0.92);
  color: rgba(231,238,247,0.95);
  font-size: 12px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}
.tooltip .tTitle{ font-weight:700; margin-bottom: 6px; }
.tooltip .row{ display:flex; justify-content: space-between; gap:10px; margin: 2px 0; }
.tooltip .name{ color: rgba(170,183,198,1); }
.tooltip .val{ font-family: var(--mono); }

@media (max-width: 1150px){
  .layout{grid-template-columns:1fr}
}
