:root{
  --bg:#0D1021;             /* deep navy */
  --panel:#151935;          /* card */
  --muted:#9aa3b2;
  --text:#E8EAF7;
  --primary:#7C3AED;        /* purple */
  --accent:#C084FC;         /* light purple */
  --pink:#F472B6;           /* pink accent */
  --success:#22c55e;
  --radius:16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*{ box-sizing:border-box; }
body{
  margin:0; background: radial-gradient(800px 400px at 50% 0%, rgba(124,58,237,.25), transparent 60%), var(--bg);
  color:var(--text); font: 16px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

.hero{
  padding:48px 24px 8px; text-align:center;
}
.brand{ display:flex; align-items:center; justify-content:center; gap:12px; }
.brand h1{ margin:0; font-weight:800; font-size:32px; background: linear-gradient(90deg, var(--accent), var(--pink)); -webkit-background-clip:text; background-clip:text; color:transparent; }
.cube{ width:20px; height:20px; background: linear-gradient(135deg, var(--accent), var(--pink)); border-radius:6px; box-shadow: var(--shadow); }
.subtitle{ color:var(--muted); margin:8px 0 0; }

.container{ max-width:1100px; margin: 16px auto 60px; padding: 0 16px; display:grid; gap:18px; }
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00));
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
h2{ margin:0 0 12px; font-size:18px; font-weight:700; }
h3{ margin:0 0 10px; font-size:16px; font-weight:700; color:#d9dff5; }

.grid{
  display:grid; gap:12px; grid-template-columns: repeat(2, minmax(0,1fr));
}
.grid .full{ grid-column: 1 / -1; }

label span{
  display:block; font-size:12px; color:var(--muted); margin-bottom:6px;
}
input, textarea{
  width:100%; background:#0f132b; border:1px solid rgba(255,255,255,.08);
  color:var(--text); padding:12px 12px; border-radius:12px; outline:none;
}
input:focus, textarea:focus{ border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,.15); }

.actions{ display:flex; align-items:center; gap:12px; margin-top:12px; }
button{
  background: linear-gradient(90deg, var(--primary), var(--pink));
  color:white; border:none; border-radius:12px; padding:10px 16px; font-weight:700; cursor:pointer;
  box-shadow: var(--shadow);
}
.status{ color:var(--muted); }

.results{ display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:16px; margin-top:14px; }
.results .col{ background:#0f132b; border:1px solid rgba(255,255,255,.06); border-radius:12px; padding:12px; }
ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
li{ display:flex; justify-content:space-between; gap:16px; background:#0e1230; padding:10px 12px; border-radius:10px; border:1px solid rgba(255,255,255,.05); }
li em{ color:var(--muted); font-style:normal; }

.tableWrap{ overflow:auto; margin-top:12px; border:1px solid rgba(255,255,255,.06); border-radius:12px; }
table{ width:100%; border-collapse:separate; border-spacing:0; }
th, td{ padding:10px 12px; border-bottom:1px solid rgba(255,255,255,.06); }
thead th{ text-align:left; background:#0f132b; position:sticky; top:0; }
tbody tr:hover{ background:#0f132b; }

.footer{ text-align:center; color:var(--muted); padding:24px; }
@media (max-width: 820px){
  .grid{ grid-template-columns: 1fr; }
  .results{ grid-template-columns: 1fr; }
}
/* metrics row */
.riskRow{
  display:grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap:12px; margin-top:12px;
}
.metric{
  background:#0f132b; border:1px solid rgba(255,255,255,.06);
  border-radius:12px; padding:12px; text-align:center;
}
.metricLabel{ color:var(--muted); font-size:12px; }
.metricValue{ font-size:22px; font-weight:800; margin-top:4px; }
.metric { transition: transform .06s ease, background .15s ease; }
.metric:hover { transform: translateY(-1px); background: rgba(255,255,255,.04); }

.chips-row { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.chip {
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
}
.chip:hover { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.2); }
.chip:active { transform: scale(0.98); }
.results .col canvas { margin-top: 12px; }

.results .col h3 { margin-bottom: 8px; }
.results .col canvas { margin-top: 8px; border-radius: 12px; }