:root{
  --bg:#0b1220;
  --panel:#111a2e;
  --panel2:#0f172a;
  --text:#e6edf3;
  --muted:#a7b1c2;
  --brand:#5dd6ff;
  --good:#3ddc97;
  --warn:#ffcc66;
  --bad:#ff6b6b;
  --border:rgba(255,255,255,.10);
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 20% 0%, rgba(93,214,255,.18), transparent 60%),
              radial-gradient(900px 500px at 80% 10%, rgba(61,220,151,.12), transparent 60%),
              var(--bg);
  color:var(--text);
}

a{color:var(--brand); text-decoration:none}
a:hover{text-decoration:underline}

.wrap{max-width:1100px; margin:0 auto; padding:28px 18px 60px}

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding:14px 16px; border:1px solid var(--border);
  background:
    radial-gradient(900px 240px at 10% 0%, rgba(93,214,255,.22), transparent 55%),
    radial-gradient(800px 240px at 90% 0%, rgba(61,220,151,.16), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border-radius:var(--radius); box-shadow:var(--shadow);
}

.brand{display:flex; flex-direction:column; gap:2px}
.brandmark{display:inline-flex; align-items:center; margin-bottom:4px; width:fit-content}
.brandmark__logo{height:42px; width:auto; border-radius:10px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.38))}
.brand h1{font-size:18px; margin:0; letter-spacing:.2px}
.brand .sub{font-size:12px; color:var(--muted)}

@media (max-width: 575.98px){
  .brandmark__logo{height:36px}
}

.nav{display:flex; gap:10px; flex-wrap:wrap}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px; border-radius:999px;
  border:1px solid var(--border); background:rgba(17,26,46,.6);
  color:var(--text);
}
.pill strong{font-weight:650}

.grid{display:grid; grid-template-columns:repeat(12,1fr); gap:14px; margin-top:16px}
.card{
  grid-column: span 12;
  min-width:0;
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px;
}

.card h2{margin:0 0 10px; font-size:14px; letter-spacing:.2px; color:var(--muted); text-transform:uppercase}

.kpis{display:flex; gap:12px; flex-wrap:wrap}
.kpi{
  min-width:170px;
  padding:12px 12px;
  border-radius:14px;
  background:rgba(15,23,42,.7);
  border:1px solid var(--border);
}
.kpi .label{font-size:12px; color:var(--muted)}
.kpi .value{font-size:20px; margin-top:6px; font-weight:700}
.kpi .hint{font-size:12px; margin-top:4px; color:var(--muted)}

.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}
.pre{
  white-space:pre-wrap;
  font-size:13px;
  line-height:1.4;
  background:rgba(15,23,42,.85);
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  margin:0;
}

.badges{display:flex; gap:10px; flex-wrap:wrap}
.badge{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(15,23,42,.7);
  display:flex; gap:10px; align-items:baseline;
}
.badge .lvl{font-weight:800; font-size:18px}
.badge .desc{font-size:12px; color:var(--muted)}

.lvl-good{color:var(--good)}
.lvl-warn{color:var(--warn)}
.lvl-bad{color:var(--bad)}

.footer{margin-top:18px; color:var(--muted); font-size:12px}

.muted{color:var(--muted)}

.trend{
  display:inline-block;
  padding:1px 6px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(15,23,42,.55);
}

.trend-mini{padding:1px 6px; font-size:11px; letter-spacing:.1px}

.trend[data-dir="up"]{color:var(--good); border-color:rgba(61,220,151,.25)}
.trend[data-dir="down"]{color:var(--bad); border-color:rgba(255,107,107,.25)}
.trend[data-dir="flat"]{color:var(--muted); border-color:rgba(255,255,255,.12)}

.tablewrap{overflow:auto; border-radius:14px; border:1px solid var(--border); background:rgba(15,23,42,.6)}
.table{width:100%; border-collapse:collapse; font-size:13px}
.table th,.table td{padding:10px 12px; text-align:left; border-bottom:1px solid rgba(255,255,255,.08); vertical-align:top}
.table th{color:var(--muted); font-weight:650; letter-spacing:.2px; text-transform:uppercase; font-size:11px}
.table tr:last-child td{border-bottom:none}

.table-scan{font-size:12.5px}
.table-scan th,.table-scan td{padding:8px 10px}
.table-scan tbody tr:nth-child(2n){background:rgba(255,255,255,.02)}
.table-scan td:first-child{white-space:nowrap}
.table-scan td:nth-child(2){white-space:nowrap}

.tag{display:inline-flex; align-items:center; padding:4px 10px; border-radius:999px; border:1px solid var(--border); background:rgba(17,26,46,.7); font-weight:750; text-transform:uppercase; font-size:11px; letter-spacing:.3px}
.tag-good{color:var(--good)}
.tag-warn{color:var(--warn)}
.tag-bad{color:var(--bad)}

.btn{display:inline-flex; align-items:center; gap:8px; padding:8px 10px; border-radius:12px; border:1px solid var(--border); background:rgba(15,23,42,.7); color:var(--text); text-decoration:none}
.btn:hover{text-decoration:none; border-color:rgba(255,255,255,.18)}

.input{
  width:100%;
  max-width:520px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(15,23,42,.75);
  color:var(--text);
  outline:none;
}
.input:focus{border-color:rgba(93,214,255,.45)}

.imgwrap{margin:0}
.imgbox{
  --imgbox-h: 360px;
  height: var(--imgbox-h);
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(15,23,42,.75);
  overflow:hidden;
}
.imgbox .img{
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  border:none;
  border-radius:0;
  background:transparent;
}
.img{
  width:100%;
  height:auto;
  display:block;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(15,23,42,.75);
}
.img[data-swimg],
.imgwrap .img{
  cursor: zoom-in;
}
.imgwrap figcaption{margin-top:8px; font-size:12px; line-height:1.45}

.swlb{position:fixed; inset:0; z-index:9999; display:none}
.swlb--open{display:block}
.swlb__backdrop{position:absolute; inset:0; background:rgba(0,0,0,.72)}
.swlb__panel{
  position:relative;
  max-width:min(1100px, calc(100vw - 28px));
  max-height:calc(100vh - 28px);
  margin:14px auto;
  padding:14px;
  border:1px solid var(--border);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  box-shadow:var(--shadow);
}
.swlb__close{
  position:absolute;
  top:10px;
  right:10px;
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(15,23,42,.75);
  color:var(--text);
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.swlb__close:hover{border-color:rgba(255,255,255,.18)}
.swlb__img{
  width:100%;
  height:auto;
  max-height:calc(100vh - 120px);
  object-fit:contain;
  display:block;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(15,23,42,.75);
}
.swlb__cap{margin-top:10px; color:var(--muted); font-size:12px; line-height:1.45}
.swlb-noscroll{overflow:hidden}

.chart{border:1px solid var(--border); border-radius:14px; background:rgba(15,23,42,.75); padding:12px}
.chart svg{width:100%; height:auto; display:block}

details.callout{border:1px solid var(--border); border-radius:14px; background:rgba(15,23,42,.55); padding:10px 12px}
details.callout summary{cursor:pointer; color:var(--text); font-weight:650}
details.callout summary::marker{color:rgba(255,255,255,.35)}

@media (min-width: 860px){
  .card.span4{grid-column: span 4;}
  .card.span6{grid-column: span 6;}
  .card.span7{grid-column: span 7;}
  .card.span5{grid-column: span 5;}
}
