:root {
  --bg: #090d16;
  --surface: #0f1726;
  --surface-muted: #131d31;
  --surface-soft: #182338;
  --text: #ecf2ff;
  --muted: #9aa8c7;
  --line: rgba(154, 168, 199, 0.18);
  --line-strong: rgba(154, 168, 199, 0.3);
  --brand: #8aa4ff;
  --brand-strong: #b8c7ff;
  --ok: #76d9a1;
  --warn: #f0c674;
  --danger: #f28b82;
  --info: #7fc8ff;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
strong { color: var(--text); }

.shell {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 12px 0 20px;
  background: linear-gradient(180deg, rgba(9, 13, 22, 0.94), rgba(9, 13, 22, 0.82), rgba(9, 13, 22, 0));
  backdrop-filter: blur(10px);
}

.brand {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.nav a:hover,
.button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.button.primary {
  border-color: transparent;
  background: var(--brand);
  color: #08101d;
  font-weight: 700;
}

.button.primary:hover {
  background: #9cb3ff;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero,
.card,
.panel,
.table-panel,
.metric {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero {
  padding: 24px;
}

.card,
.panel,
.table-panel {
  padding: 20px;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  margin-top: 12px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  max-width: 12ch;
}

h2 {
  font-size: 1.125rem;
}

h3 {
  font-size: 1rem;
}

.lede,
p,
li,
td,
th {
  color: var(--muted);
}

.lede {
  margin: 14px 0 0;
  max-width: 68ch;
  font-size: 1rem;
  line-height: 1.65;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

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

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

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

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

.metric {
  padding: 18px;
}

.metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.metric-value {
  margin-top: 8px;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.subtle {
  font-size: 0.92rem;
  color: var(--muted);
}

.badge,
.tag,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge.internal {
  color: var(--brand-strong);
  background: rgba(138, 164, 255, 0.12);
  border-color: rgba(138, 164, 255, 0.18);
}

.badge.live {
  color: #cff5dc;
  background: rgba(118, 217, 161, 0.12);
  border-color: rgba(118, 217, 161, 0.18);
}

.badge.preview {
  color: #d8ecff;
  background: rgba(127, 200, 255, 0.12);
  border-color: rgba(127, 200, 255, 0.18);
}

.badge.warn {
  color: #ffe9b9;
  background: rgba(240, 198, 116, 0.12);
  border-color: rgba(240, 198, 116, 0.18);
}

.badge.risk {
  color: #ffd1cb;
  background: rgba(242, 139, 130, 0.12);
  border-color: rgba(242, 139, 130, 0.18);
}

.tag,
.pill {
  border-color: var(--line);
  color: var(--brand-strong);
  background: rgba(255, 255, 255, 0.02);
}

.footer-note,
.list-item,
.route-box,
.mobile-data-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.footer-note {
  padding: 14px 16px;
}

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

.list-item {
  padding: 14px 16px;
}

.list-item a {
  color: var(--brand-strong);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--brand-strong);
  font-weight: 600;
}

.nested-list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.nested-list li + li,
#highlights-list li + li,
#alerts-list li + li {
  margin-top: 8px;
}

.table-panel table,
.panel table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.table-panel th,
.table-panel td,
.panel th,
.panel td {
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.table-panel th,
.panel th {
  color: var(--brand-strong);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-panel tbody tr:last-child td,
.panel tbody tr:last-child td {
  border-bottom: none;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.status-good { color: var(--ok); }
.status-warn { color: var(--warn); }
.status-risk { color: var(--danger); }

.mobile-data-grid {
  display: none;
  gap: 12px;
  margin-top: 12px;
}

.mobile-data-card {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.mobile-data-row {
  display: grid;
  gap: 6px;
}

.mobile-data-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.mobile-data-value {
  color: var(--text);
}

.mock-card {
  position: relative;
  overflow: hidden;
}

.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mock-platform,
.route-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.mock-handle {
  font-size: 0.9rem;
  color: var(--muted);
}

.mock-title {
  margin-bottom: 10px;
  color: var(--text);
}

.mock-copy {
  display: grid;
  gap: 10px;
}

.mock-copy p {
  margin: 0;
}

.mock-accent {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--brand-strong);
}

.mock-proof {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

.mock-proof-label {
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-strong);
}

.mock-proof-body {
  color: var(--muted);
  line-height: 1.6;
}

.mock-proof-body strong {
  color: var(--text);
}

.mock-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.route-box {
  padding: 16px 18px;
  display: grid;
  gap: 10px;
}

.mix-row {
  display: grid;
  gap: 8px;
}

.mix-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.mix-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.mix-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.nav a[aria-current="page"] {
  border-color: rgba(138, 164, 255, 0.35);
  background: rgba(138, 164, 255, 0.12);
  color: var(--text);
}

.shell-block {
  display: grid;
  gap: 16px;
}

.hero-page .hero {
  padding-bottom: 28px;
}

@media (max-width: 960px) {
  .shell {
    padding: 16px;
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .grid.two,
  .grid.three,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .card,
  .panel,
  .table-panel,
  .metric {
    padding: 16px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .table-panel table,
  .panel table {
    display: none;
  }

  .mobile-data-grid {
    display: grid;
  }
}
