:root {
  --bg: #0b1220;
  --surface: #111c30;
  --surface-alt: #16243d;
  --border: rgba(148, 163, 184, 0.16);
  --text: #e6edf7;
  --muted: #98abc4;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --teal: #14b8a6;
  --amber: #f59e0b;
  --rose: #fb7185;
  --emerald: #34d399;
  --code-bg: #080e1a;
  --sidebar-w: 290px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code, pre {
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

code {
  background: rgba(56, 189, 248, 0.1);
  color: #7dd3fc;
  padding: 0.14em 0.42em;
  border-radius: 5px;
  font-size: 0.875em;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #dbeafe;
  margin: 1rem 0;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(11, 18, 32, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 60;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #07111f;
  font-weight: 800;
  font-size: 0.85rem;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.9rem;
}

.topbar-links a {
  color: var(--muted);
}

.topbar-links a:hover {
  color: #fff;
}

.menu-btn {
  display: none;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.layout {
  display: flex;
  padding-top: 60px;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 1.15rem 1rem 2.5rem;
  z-index: 40;
}

.search-wrap {
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  background: var(--code-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.52rem 0.75rem;
  font-size: 0.87rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
}

.nav-group-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 1.15rem 0 0.45rem;
  font-weight: 600;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li a {
  display: block;
  padding: 0.32rem 0.6rem;
  border-radius: 6px;
  color: #c2d1e5;
  font-size: 0.86rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-list li a:hover {
  background: var(--surface-alt);
  color: #fff;
  text-decoration: none;
}

.nav-list li a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  padding: 2.2rem clamp(1.2rem, 4vw, 3.6rem) 4rem;
  max-width: 1120px;
}

.hero {
  background: linear-gradient(155deg, #0f1f3a 0%, #10192b 65%, #0c1627 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(1.8rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.hero-kicker {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #fff;
}

.hero-sub {
  font-size: 1.08rem;
  color: #bdd0e6;
  max-width: 68ch;
  margin-bottom: 1.5rem;
}

.hero-meta {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.45rem 1.5rem;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.4rem;
}

.pill {
  font-size: 0.78rem;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: #dbeafe;
}

.pill.new {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
}

section {
  margin-bottom: 3.4rem;
  scroll-margin-top: 78px;
}

h2 {
  font-size: 1.6rem;
  margin: 0 0 0.9rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
  color: #fff;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.65rem;
  color: #e0f2fe;
}

h4 {
  font-size: 1.02rem;
  margin: 1.25rem 0 0.4rem;
  color: var(--accent);
}

p {
  margin: 0.65rem 0 0.95rem;
  color: #d1deee;
}

ul, ol {
  padding-left: 1.35rem;
  color: #d1deee;
}

li {
  margin-bottom: 0.42rem;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
}

.callout.warn {
  border-left-color: var(--amber);
}

.callout.shipped {
  border-left-color: var(--emerald);
}

.callout-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.15rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--surface);
}

th {
  text-align: left;
  background: #13314c;
  color: #f0f9ff;
  font-weight: 600;
  padding: 0.68rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.64rem 0.9rem;
  border-bottom: 1px solid var(--border);
  color: #d3e0f0;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 0.16rem 0.52rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.high {
  background: rgba(251, 113, 133, 0.16);
  color: #fda4af;
}

.badge.med {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

.badge.low {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

.badge.done {
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
  margin: 1.15rem 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
}

.card h4 {
  margin-top: 0;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1.4rem 0;
}

.chart-caption {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.65rem;
}

.loc-row {
  display: grid;
  grid-template-columns: 220px 1fr 64px;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.48rem;
  font-size: 0.84rem;
}

.loc-label {
  color: #dbeafe;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loc-track {
  background: var(--code-bg);
  border-radius: 6px;
  height: 16px;
  overflow: hidden;
}

.loc-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #0ea5e9, #14b8a6);
}

.loc-num {
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 920px) {
  .menu-btn {
    display: inline-block;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    width: 270px;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main {
    margin-left: 0;
  }
  .loc-row {
    grid-template-columns: 150px 1fr 52px;
  }
}
