:root {
  --bg: #07111f;
  --panel: rgba(255,255,255,0.92);
  --panel-strong: #ffffff;
  --text: #0f172a;
  --muted: #5b6474;
  --border: rgba(15, 23, 42, 0.08);
  --good: #047857;
  --warn: #b45309;
  --alert: #b91c1c;
  --muted-tone: #475569;
  --hero: linear-gradient(135deg, #082032 0%, #0b5d68 45%, #8ad6c9 100%);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(54, 200, 176, 0.22), transparent 28%), linear-gradient(180deg, #08111f 0%, #0f172a 100%);
}
.shell { max-width: 1400px; margin: 0 auto; padding: 28px; }
.card {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 18px 60px rgba(2, 8, 23, 0.18);
  padding: 24px;
}
.hero {
  background: var(--hero);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
}
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; opacity: 0.8; margin: 0 0 6px; }
.hero h1 { margin: 0; font-size: 42px; line-height: 1.05; }
.hero-copy { max-width: 820px; line-height: 1.55; margin-top: 12px; font-size: 16px; }
.hero-stat { display: flex; gap: 14px; align-items: center; min-width: 260px; background: rgba(255,255,255,0.14); padding: 18px; border-radius: 20px; }
.hero-stat-label, .hero-stat-meta { font-size: 13px; opacity: 0.86; }
.hero-stat-value { font-size: 26px; font-weight: 700; }
.status-dot { width: 14px; height: 14px; border-radius: 999px; display: inline-block; }
.tone-good { color: var(--good); }
.tone-good.status-dot, .tone-good .status-dot { background: var(--good); }
.tone-warn { color: var(--warn); }
.tone-warn.status-dot, .tone-warn .status-dot { background: var(--warn); }
.tone-alert { color: var(--alert); }
.tone-alert.status-dot, .tone-alert .status-dot { background: var(--alert); }
.tone-muted { color: var(--muted-tone); }
.kpi-grid, .sensor-grid, .split-grid { display: grid; gap: 18px; margin-bottom: 22px; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { padding: 20px 22px; }
.kpi-label, .metric-label, .sensor-name, .comparison-footnote, .meta-note, .alert-copy, .empty-state, .compare-grid span, .sensor-foot span { color: var(--muted); }
.kpi-value { font-size: 34px; font-weight: 700; margin-top: 8px; }
.kpi-meta { margin-top: 8px; font-size: 13px; color: var(--muted); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 10px 2px 18px; }
.section-head h2 { margin: 4px 0 0; color: white; font-size: 32px; }
.chat-link {
  color: white; text-decoration: none; border: 1px solid rgba(255,255,255,0.24); padding: 10px 16px; border-radius: 999px;
  background: rgba(255,255,255,0.08);
}
.sensor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sensor-card { background: var(--panel-strong); }
.sensor-top, .metric-row, .sensor-foot { display: flex; justify-content: space-between; gap: 14px; }
.sensor-status { font-weight: 700; margin-top: 6px; }
.reading-pill {
  min-width: 82px; text-align: center; align-self: start; font-size: 24px; font-weight: 700;
  background: #ecfeff; color: #0f766e; padding: 14px 16px; border-radius: 18px;
}
.reading-pill.overflow { background: #fee2e2; color: #b91c1c; }
.metric-row { margin: 18px 0 14px; }
.metric-value { font-size: 28px; font-weight: 700; }
.metric-value.subtle { color: #1d4ed8; }
.metric-value.negative { color: var(--alert); }
.metric-value.positive { color: var(--good); }
.compare-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  background: #f8fafc; border-radius: 18px; padding: 14px;
}
.compare-grid div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.sensor-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e2e8f0; font-size: 14px; }
.alert-copy { margin: 16px 0 6px; line-height: 1.45; }
.split-grid { grid-template-columns: 1.3fr 1fr; }
.chart { min-height: 360px; }
.alert-list { display: grid; gap: 14px; }
.alert-item { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 14px; border-radius: 18px; background: #fff7ed; }
.alert-item p { margin: 6px 0; color: #7c2d12; }
.alert-item span { font-size: 13px; color: var(--muted); }
.alert-badge { background: #991b1b; color: white; border-radius: 999px; padding: 8px 12px; font-weight: 700; height: fit-content; }
.insight-list { margin: 0; padding-left: 20px; line-height: 1.6; }
.comparison-footnote { margin-top: 18px; font-size: 13px; }
@media (max-width: 1100px) {
  .kpi-grid, .sensor-grid, .split-grid { grid-template-columns: 1fr 1fr; }
  .hero { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 760px) {
  .shell { padding: 16px; }
  .kpi-grid, .sensor-grid, .split-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .section-head { flex-direction: column; align-items: flex-start; }
}


.banner { display:grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-bottom:22px; }
.banner-main { display:flex; gap:18px; align-items:center; }
.banner h2, .overflow-card h2 { margin: 2px 0 8px; font-size: 30px; }
.banner-copy { margin: 0; color: var(--muted); line-height: 1.5; }
.banner-points { display:grid; gap: 10px; align-content:center; }
.banner-point { background: rgba(255,255,255,0.6); border:1px solid rgba(15,23,42,0.08); border-radius:16px; padding:12px 14px; font-size:14px; }
.banner-good { background: linear-gradient(135deg, rgba(16,185,129,0.18), rgba(255,255,255,0.95)); }
.banner-warn { background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(255,255,255,0.95)); }
.banner-alert { background: linear-gradient(135deg, rgba(239,68,68,0.18), rgba(255,255,255,0.95)); }
.traffic { display:grid; gap:8px; background:#111827; padding:14px 12px; border-radius:22px; width:58px; }
.traffic span { width:34px; height:34px; border-radius:999px; background:#334155; display:block; opacity:0.28; }
.traffic-good span:nth-child(3) { background:#22c55e; opacity:1; box-shadow:0 0 20px rgba(34,197,94,0.45); }
.traffic-warn span:nth-child(2) { background:#f59e0b; opacity:1; box-shadow:0 0 20px rgba(245,158,11,0.45); }
.traffic-alert span:nth-child(1) { background:#ef4444; opacity:1; box-shadow:0 0 20px rgba(239,68,68,0.45); }
.dark { color: #334155; }
.sparkline-wrap { margin: 12px 0 16px; padding: 12px 14px; border-radius: 16px; background:#f8fafc; }
.sparkline-head { display:flex; justify-content:space-between; align-items:center; font-size:13px; color:var(--muted); margin-bottom:8px; }
.sparkline-svg { width:100%; height:44px; display:block; }
.overflow-grid { grid-template-columns: 1fr 1fr; }
.overflow-card { border-width: 1px; }
.overflow-good { background: linear-gradient(135deg, rgba(16,185,129,0.10), #ffffff); }
.overflow-warn { background: linear-gradient(135deg, rgba(245,158,11,0.12), #ffffff); }
.overflow-alert { background: linear-gradient(135deg, rgba(239,68,68,0.12), #ffffff); }
.overflow-top { display:flex; justify-content:space-between; gap:18px; align-items:center; }
.risk-gauge { min-width:100px; height:100px; border-radius:999px; border:10px solid currentColor; display:flex; flex-direction:column; align-items:center; justify-content:center; font-weight:800; background:rgba(255,255,255,0.8); }
.risk-gauge span { font-size:32px; line-height:1; }
.risk-gauge small { font-size:14px; opacity:0.75; }
.overflow-metrics, .comparison-date-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:12px; margin:18px 0; }
.comparison-date-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.overflow-metrics div, .comparison-date-grid div { background:#f8fafc; border-radius:16px; padding:12px 14px; display:flex; justify-content:space-between; gap:10px; }
.overflow-metrics span, .comparison-date-grid span { color: var(--muted); }
.insight-list.tight { margin-top: 8px; }
@media (max-width: 1100px) {
  .banner, .overflow-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .overflow-metrics, .comparison-date-grid { grid-template-columns: 1fr; }
}

.exec-grid { display:grid; grid-template-columns: 1.15fr 1fr; gap:18px; margin-bottom:22px; }
.exec-hero { position:relative; overflow:hidden; }
.exec-good { background: linear-gradient(135deg, rgba(16,185,129,0.12), #ffffff); }
.exec-warn { background: linear-gradient(135deg, rgba(245,158,11,0.14), #ffffff); }
.exec-alert { background: linear-gradient(135deg, rgba(239,68,68,0.14), #ffffff); }
.exec-top { display:flex; justify-content:space-between; gap:18px; align-items:center; }
.score-ring { min-width:124px; height:124px; border-radius:999px; border:12px solid currentColor; display:flex; flex-direction:column; align-items:center; justify-content:center; font-weight:800; background:rgba(255,255,255,0.88); box-shadow: inset 0 0 0 8px rgba(255,255,255,0.55); }
.score-ring span { font-size:40px; line-height:1; }
.score-ring small { font-size:14px; opacity:0.75; }
.exec-metrics { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:12px; margin:18px 0; }
.exec-metrics div { background:#f8fafc; border-radius:16px; padding:12px 14px; display:flex; justify-content:space-between; gap:10px; }
.exec-metrics span { color:var(--muted); }
.exec-stack { display:grid; gap:18px; }
.narrative-card { min-height: 210px; }
.narrative-copy { margin: 6px 0 0; line-height:1.65; color:#1f2937; font-size:15px; }
.action-list { margin-top: 14px; }
@media (max-width: 1100px) {
  .exec-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .exec-top { flex-direction:column; align-items:flex-start; }
  .exec-metrics { grid-template-columns: 1fr 1fr; }
}
