:root {
  --bg: #080b14;
  --bg2: #0e1322;
  --card: rgba(18, 25, 41, 0.85);
  --line: rgba(135, 166, 255, 0.22);
  --text: #e8eeff;
  --muted: #9aa8cf;
  --accent: #6ad8ff;
  --accent2: #8d7bff;
  --ok: #35d39a;
  --warn: #f4bb63;
  --bad: #ff6f7d;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 18% 12%, #1a2350 0%, var(--bg) 42%),
              linear-gradient(160deg, #090d18, var(--bg2));
}
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.nav-rail {
  border-right: 1px solid var(--line);
  background: rgba(8, 12, 22, 0.8);
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; }
.brand span { display: block; color: var(--muted); font-size: .8rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.nav-btn {
  width: 100%; margin-bottom: 8px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--muted); text-align: left; cursor: pointer;
}
.nav-btn.active, .nav-btn:hover { color: var(--text); border-color: var(--line); background: rgba(106,216,255,.08); }
.mode-toggle { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mode-toggle button {
  border: 1px solid var(--line); background: rgba(12,18,30,.8); color: var(--muted); padding: 8px; border-radius: 8px; cursor: pointer;
}
.mode-toggle button.active { color: var(--text); background: linear-gradient(120deg, rgba(106,216,255,.22), rgba(141,123,255,.16)); }
.main { padding: 18px; }
.top-strip {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: linear-gradient(120deg, rgba(20,28,46,.9), rgba(14,19,34,.86));
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
}
.health-chip { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10,15,26,.75); }
.top-actions button, #refreshBtn {
  border: 1px solid var(--line); background: rgba(12,18,30,.85); color: var(--text);
  padding: 8px 12px; border-radius: 10px; cursor: pointer;
}
.answers-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hero-grid { margin-top: 12px; display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 12px; }
.panel-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.answer-card h3 { font-size: .8rem; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .08em; }
.answer-text { margin: 0; font-size: 1.08rem; line-height: 1.35; font-weight: 600; }
.answer-now {
  border-color: rgba(106,216,255,.55);
  background: linear-gradient(120deg, rgba(106,216,255,.15), rgba(44,62,120,.2));
  box-shadow: 0 0 22px rgba(106,216,255,.2), inset 0 0 24px rgba(106,216,255,.06);
}
.answer-now .answer-text { font-size: 1.24rem; font-weight: 760; color: #f4f8ff; }
.answer-risk {
  border-color: rgba(255,111,125,.58);
  background: linear-gradient(120deg, rgba(255,111,125,.12), rgba(66,18,28,.2));
  box-shadow: 0 0 20px rgba(255,111,125,.18), inset 0 0 18px rgba(255,111,125,.06);
}
.answer-risk .answer-text { font-size: 1.16rem; font-weight: 720; }
.risk-card { border-color: rgba(255,111,125,.4); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 14px 34px rgba(0,0,0,.28);
}
.card h3 { margin: 0 0 10px; font-size: 1rem; }
.metric { font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; }
ul { margin: 0; padding-left: 16px; color: var(--muted); }
li { margin-bottom: 6px; }
.clickable { cursor: pointer; transition: transform .18s ease, border-color .18s ease; }
.clickable:hover { transform: translateY(-1px); border-color: rgba(106,216,255,.45); }
.lane-slot { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; background: rgba(10,14,24,.62); }
.lane-slot label { font-size: .72rem; color: var(--muted); letter-spacing: .08em; }
.lane-slot p { margin: 6px 0 0; }
.lane-slot.now { border-color: rgba(106,216,255,.72); box-shadow: 0 0 16px rgba(106,216,255,.2); }
.now-dominant {
  background: linear-gradient(120deg, rgba(106,216,255,.15), rgba(141,123,255,.13));
  border-width: 2px;
  box-shadow: 0 0 22px rgba(106,216,255,.3), inset 0 0 28px rgba(106,216,255,.07);
}
.now-dominant p { font-size: 1.16rem; font-weight: 700; color: #f2f6ff; }
.readiness div { margin-bottom: 7px; }
.drawer {
  position: fixed; right: -420px; top: 0; width: 400px; height: 100vh;
  background: rgba(10,14,24,.98); border-left: 1px solid var(--line);
  transition: right .22s ease; z-index: 20; padding: 14px;
}
.drawer.open { right: 0; }
.drawer header { display: flex; justify-content: space-between; align-items: center; }
.drawer header button { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.owner-only { display: none; }
.owner-mode .operator-only { display: none; }
.owner-mode .owner-only { display: block; }
@media (max-width: 1100px) {
  .answers-grid, .hero-grid, .panel-grid { grid-template-columns: 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .nav-rail { height: auto; position: static; border-right: none; border-bottom: 1px solid var(--line); }
}
