:root {
  --font-sans: "Geist Sans";
  --font-mono: "Geist Mono";
}

@font-face {
  font-family: "Geist Sans";
  src: url("https://cdn.jsdelivr.net/npm/geist@1.5.1/dist/fonts/geist-sans/Geist-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("https://cdn.jsdelivr.net/npm/geist@1.5.1/dist/fonts/geist-mono/GeistMono-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --topbar-h: 72px;
  --bg: #f6f8fc;
  --panel: #ffffff;
  --panel2: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --border: rgba(15, 23, 42, 0.12);
  --link: #2563eb;
  --link-hover: #1d4ed8;
  --chip: rgba(37, 99, 235, 0.08);
  --danger: #dc2626;
  --ok: #16a34a;
  --focus: rgba(37, 99, 235, 0.35);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 10px 28px rgba(15, 23, 42, 0.06);
  --mono: var(--font-mono), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: var(--font-sans), ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";

  --code-bg: #f1f5f9;
  --code-text: #0f172a;
  --code-border: rgba(15, 23, 42, 0.12);
  --tok-key: #1d4ed8;
  --tok-string: #15803d;
  --tok-number: #b45309;
  --tok-bool: #7c3aed;
  --tok-null: #64748b;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 450;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code, pre {
  font-family: var(--mono);
  font-variant-ligatures: none;
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}
code {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  padding: 1px 6px;
}
pre code {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}
.brand-logo {
  height: 26px;
  width: auto;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-title { font-weight: 650; letter-spacing: 0.2px; }
.brand-subtitle { color: var(--muted); font-size: 12px; }
.search input {
  width: min(720px, 55vw);
  background: var(--panel2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  outline: none;
}
.search input:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 4px var(--focus);
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - var(--topbar-h));
}
.sidebar {
  border-right: 1px solid var(--border);
  padding: 16px;
  background: var(--panel);
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow: auto;
}
.navlink {
  display: block;
  padding: 10px 10px;
  border-radius: 10px;
  color: var(--text);
  border: 1px solid transparent;
  font-weight: 500;
}
.navgroup { margin-top: 12px; }
.navgroup-title {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.navlink-sub { padding-left: 18px; }
.navlink:hover {
  background: rgba(15, 23, 42, 0.05);
  border-color: var(--border);
  text-decoration: none;
}
.navlink.active {
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.22);
  color: var(--link-hover);
}
.navlink:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus);
}
.navhint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.main {
  padding: 22px;
  display: flex;
  justify-content: center;
  min-width: 0;
}
.main > * {
  width: min(1100px, 100%);
}
.status {
  color: var(--muted);
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.content { display: grid; gap: 14px; }

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 14px 16px;
}
.card h1, .card h2, .card h3 { margin: 0 0 10px 0; letter-spacing: -0.01em; }
.card h1 { font-size: 20px; line-height: 1.2; }
.card h2 { font-size: 16px; line-height: 1.25; }
.card h3 { font-size: 14px; line-height: 1.25; }
.muted { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
}

.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
}
.table th, .table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.table th { color: var(--muted); font-weight: 650; background: rgba(15, 23, 42, 0.04); }
.table tr:hover td { background: rgba(15, 23, 42, 0.03); }
.table td code {
  white-space: normal;
  overflow-wrap: anywhere;
}

pre.codeblock {
  margin: 0;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid var(--code-border);
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 13px;
  line-height: 1.6;
  overflow: auto;
  max-height: 70vh;
}
pre.codeblock code {
  display: block;
  white-space: pre;
}

.sev-high { color: #ea580c; }
.sev-medium { color: #ca8a04; }
.sev-low { color: var(--ok); }
.sev-info { color: var(--link); }
.sev-critical { color: var(--danger); }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    position: static;
    height: auto;
    overflow: visible;
  }
  .search input { width: 100%; }
}
