:root {
  --bg-0: #0b1424;
  --bg-1: #101f35;
  --bg-2: #182b46;
  --panel: #12213a;
  --panel-soft: #172845;
  --panel-elev: #1d3253;
  --text: #e8f0ff;
  --muted: #a9bcde;
  --line: #2a416a;
  --line-soft: #395984;
  --accent: #78a8ff;
  --cyan: #35c8d7;
  --violet: #8e85f3;
  --amber: #f0b24a;
  --rose: #de6c88;
  --good: #39cfa9;
  --warn: #f0b15b;
  --bad: #e07c95;
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(780px 360px at 105% -10%, rgba(100, 148, 226, 0.2), transparent 64%),
    radial-gradient(620px 320px at -8% 6%, rgba(66, 119, 199, 0.17), transparent 62%),
    linear-gradient(165deg, var(--bg-0), var(--bg-1) 55%, var(--bg-2));
}

a {
  color: #a9c8ff;
}

.wrap {
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.pill {
  display: inline-block;
  border: 1px solid var(--line-soft);
  padding: 6px 12px;
  border-radius: 999px;
  color: #bed0ef;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(26, 44, 71, 0.68);
}

.h1 {
  margin: 10px 0 8px;
  font-size: 40px;
  line-height: 1.04;
  font-weight: 800;
}

.h2 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.2;
  font-weight: 750;
}

.h3 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #9eb3db;
}

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

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

.split-2 {
  grid-template-columns: 1fr 1fr;
}

.split-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.split-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: linear-gradient(180deg, var(--panel), var(--panel-soft));
  box-shadow: 0 12px 28px rgba(3, 10, 23, 0.23);
}

.card-link {
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.card-link:hover {
  transform: translateY(-2px);
  border-color: #4a6fa8;
  box-shadow: 0 17px 30px rgba(4, 11, 24, 0.31);
}

.concept-chip {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.theme-command .concept-chip { color: #8ce0ea; }
.theme-evidence .concept-chip { color: #b1a9ff; }
.theme-ladder .concept-chip { color: #f6ca85; }
.theme-queue .concept-chip { color: #f3a4b9; }

.hero {
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 22px;
  background: linear-gradient(140deg, rgba(21, 39, 66, 0.95), rgba(14, 27, 46, 0.95));
  box-shadow: 0 20px 34px rgba(4, 11, 24, 0.3);
}

.btn {
  background: linear-gradient(180deg, #78a8ff, #527fd8);
  border: 0;
  color: white;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 650;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}

.btn.alt {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-soft);
}

.btn:hover {
  filter: brightness(1.06);
}

.nav-row {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-row .btn {
  min-width: 180px;
  text-align: center;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi {
  display: grid;
  gap: 4px;
}

.kpi .label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a9bcde;
}

.kpi .n {
  font-size: 31px;
  line-height: 1;
  font-weight: 800;
}

.delta {
  font-size: 12px;
}

.delta.good { color: #87e7ca; }
.delta.warn { color: #ffd69a; }
.delta.bad { color: #ffadc1; }

.list {
  display: grid;
  gap: 10px;
}

.item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #12223a;
}

.small {
  font-size: 12px;
  color: var(--muted);
}

.trace {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 11px;
  color: #b6c8e8;
  margin-top: 6px;
}

.table-wrap {
  border: 1px solid #2f476f;
  border-radius: 12px;
  overflow: hidden;
  background: #101d31;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a8bde2;
  padding: 10px;
  background: #182a45;
}

tbody td {
  font-size: 13px;
  padding: 9px 10px;
  border-top: 1px solid #243a5a;
}

tbody tr:nth-child(even) {
  background: #14253e;
}

.status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 8px;
}

.status.good {
  background: #d9f8ed;
  color: #115741;
}

.status.warn {
  background: #ffefcf;
  color: #7d4e00;
}

.status.bad {
  background: #ffe0e7;
  color: #8a2c43;
}

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #17325d;
  border: 1px solid #3a5f9a;
  color: #c1d4fa;
}

@media (max-width: 1060px) {
  .split-4,
  .split-3,
  .split-2,
  .kpi-row {
    grid-template-columns: 1fr;
  }

  .h1 {
    font-size: 32px;
  }
}

@media (max-width: 760px) {
  .wrap {
    padding: 16px;
  }

  .top {
    flex-direction: column;
  }
}
