:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #07111f;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.26);
  --text: #f8fafc;
  --muted: #b6c2d4;
  --blue: #38bdf8;
  --green: #86efac;
  --amber: #fbbf24;
  --red: #f87171;
  --violet: #c4b5fd;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(56, 189, 248, 0.26), transparent 28%),
    radial-gradient(circle at 80% 5%, rgba(196, 181, 253, 0.18), transparent 24%),
    linear-gradient(145deg, #020617, var(--bg) 45%, #0f172a);
  color: var(--text);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.panel, .hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: center;
  padding: 44px;
  margin: 18px 0;
  overflow: hidden;
  position: relative;
}

.panel-glow::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% 40%;
  height: 220px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.24), transparent 60%);
  pointer-events: none;
}

.eyebrow {
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 10px;
}

h1 {
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.92;
  letter-spacing: -0.055em;
  margin: 0 0 18px;
}

h2 { margin: 0 0 14px; font-size: clamp(22px, 3vw, 32px); letter-spacing: -0.02em; }
h3 { margin: 24px 0 12px; color: #e2e8f0; }

.hero-copy {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  margin: 0;
}

.hero-card {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(56, 189, 248, 0.32);
  background: rgba(8, 47, 73, 0.48);
  border-radius: 22px;
  padding: 22px;
  display: grid;
  gap: 8px;
}

.hero-card strong { font-size: 20px; }
.hero-card small { color: var(--muted); line-height: 1.5; }
.status-dot {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 22px var(--green);
}

.panel {
  padding: 24px;
  margin-top: 18px;
}

.section-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.grid {
  display: grid;
  gap: 16px;
}

.controls-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

select, input, textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #0b1220;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

select:focus, input:focus, textarea:focus {
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

.description-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  background: rgba(2, 6, 23, 0.35);
  color: var(--muted);
  line-height: 1.6;
}

.sliders {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.slider-row {
  display: grid;
  grid-template-columns: 250px 1fr 52px;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.18);
}

.slider-row span:first-child {
  color: #dbeafe;
  font-weight: 700;
}

.slider-value {
  text-align: center;
  font-weight: 900;
  color: var(--blue);
}

input[type="range"] {
  accent-color: var(--blue);
  padding: 0;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--blue);
  color: #052333;
  font-weight: 900;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 12px 26px rgba(56, 189, 248, 0.18);
}

button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }
button.secondary {
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: none;
}

.hidden { display: none; }

.summary-card {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.16), rgba(196, 181, 253, 0.10));
  border: 1px solid rgba(56, 189, 248, 0.24);
}

.summary-card h3 { margin-top: 0; }
.summary-card p { margin-bottom: 0; color: #dbeafe; line-height: 1.7; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 18px 0 8px;
}

.kpi {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.kpi span { color: var(--muted); font-size: 13px; }
.kpi strong { font-size: 21px; }

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  background: rgba(2, 6, 23, 0.22);
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  vertical-align: top;
}

th {
  color: #bfdbfe;
  background: rgba(15, 23, 42, 0.68);
  font-size: 13px;
}

td { color: #e5e7eb; }

.score-bar {
  height: 9px;
  width: 100%;
  min-width: 80px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
  margin-top: 6px;
}

.score-bar > i {
  display: block;
  height: 100%;
  width: var(--w);
  background: currentColor;
  border-radius: inherit;
}

.risk { color: var(--red); }
.opp { color: var(--green); }
.res { color: var(--blue); }
.net-pos { color: var(--green); font-weight: 900; }
.net-neg { color: var(--red); font-weight: 900; }

.two-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

ul { padding-left: 20px; }
li { margin: 9px 0; color: #dbeafe; line-height: 1.55; }

textarea {
  min-height: 340px;
  font-family: "Cascadia Code", Consolas, monospace;
  line-height: 1.5;
  color: #dbeafe;
}

.note { color: var(--muted); line-height: 1.7; }
.note p { margin: 0; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 28px; }
  .section-title { flex-direction: column; }
  .slider-row { grid-template-columns: 1fr; gap: 10px; }
  .two-cols { grid-template-columns: 1fr; }
}
