:root {
  color-scheme: light;
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-soft: #f9f8f5;
  --ink: #191919;
  --muted: #696969;
  --line: rgba(25, 25, 25, 0.09);
  --nav: #141414;
  --nav-muted: #a0a0a0;
  --accent: #ffc85a;
  --teal: #167c72;
  --blue: #315f9b;
  --amber: #a86b00;
  --rose: #b84444;
  --green-bg: #eaf6f1;
  --blue-bg: #edf3fb;
  --amber-bg: #fff5df;
  --rose-bg: #fff0ef;
  --shadow: 0 18px 42px rgba(27, 30, 35, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--nav);
  color: #f6f6f6;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #151515;
  font-weight: 700;
}

.brand strong {
  display: block;
  font-weight: 650;
  font-size: 14px;
}

.brand small {
  display: block;
  color: var(--nav-muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-item {
  position: relative;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--nav-muted);
  text-align: left;
  padding: 11px 12px 11px 22px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 99px;
  background: transparent;
}

.nav-item:hover,
.nav-item:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  outline: 0;
}

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-item.is-active::before {
  background: var(--accent);
}

.main-shell {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 245, 242, 0.92);
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.08;
  font-weight: 650;
}

#pageSubtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-btn,
.ghost-btn,
.mobile-menu {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  text-decoration: none;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.primary-btn {
  background: #1f1f1f;
  color: #fff;
  border-color: #1f1f1f;
}

.mobile-menu {
  display: none;
}

.content {
  padding: 24px;
  display: grid;
  gap: 24px;
}

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

.section-head h2 {
  margin-bottom: 4px;
  font-size: 18px;
  font-weight: 650;
}

.section-head p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 0;
}

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

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

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

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

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

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

.metric-card {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.metric-value {
  display: block;
  margin: 6px 0 2px;
  font-size: 24px;
  font-weight: 650;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.tab.is-active {
  color: var(--ink);
  background: #fff8e8;
  border-color: rgba(255, 200, 90, 0.8);
}

.card {
  padding: 14px;
}

.card h3 {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 650;
}

.card p,
.card li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 650;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  background: #eeeeee;
  color: #4d4d4d;
}

.pill.teal {
  background: var(--green-bg);
  color: var(--teal);
}

.pill.blue {
  background: var(--blue-bg);
  color: var(--blue);
}

.pill.amber {
  background: var(--amber-bg);
  color: var(--amber);
}

.pill.rose {
  background: var(--rose-bg);
  color: var(--rose);
}

.evidence-gap,
.is-muted {
  opacity: 0.55;
  filter: grayscale(0.4);
  background: #f1f1f1;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.toolbar input,
.toolbar select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px 10px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
  font-size: 13px;
}

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

th {
  color: var(--muted);
  font-weight: 650;
  background: var(--surface-soft);
}

details {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}

summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.source-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--blue);
  font-size: 12px;
}

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

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.status-row:last-child {
  border-bottom: 0;
}

.footer-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 30;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  body.menu-open .scrim {
    display: block;
  }

  .scrim {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.35);
  }

  .mobile-menu {
    display: inline-flex;
    align-items: center;
  }

  .topbar {
    padding: 12px 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .content {
    padding: 16px;
    gap: 16px;
  }

  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 760px;
  }
}
