@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

:root {
  --bg: #ffffff;
  --fg: #212529;
  --muted: #6c757d;
  --border: #dee2e6;
  --link: #2596be;
  --link-hover: #1c7594;
  --code-bg: #f4f4f4;
  --accent: #2596be;
  --chrome-bg: #212529;
  --chrome-fg: #ffffff;
  --chrome-muted: rgba(255, 255, 255, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f12;
    --fg: #e6e6e6;
    --muted: #a8adb4;
    --border: #2c2f36;
    --link: #4fb3d9;
    --link-hover: #7ecbe8;
    --code-bg: #1d2026;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  padding: 1rem 1.5rem;
  background: var(--chrome-bg);
  border-bottom: 3px solid var(--accent);
}

.site-title {
  color: var(--chrome-fg);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
}

.layout {
  display: flex;
  align-items: stretch;
  max-width: 1100px;
  margin: 0 auto;
  flex: 1 0 auto;
  width: 100%;
}

.sidebar {
  flex: 0 0 240px;
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--border);
}

.sidebar ul { list-style: none; margin: 0; padding-left: 0; }
.sidebar .products > li { margin-bottom: 1.25rem; }
.sidebar .products > li > a { font-weight: 600; text-decoration: none; }
.sidebar .product.active > a { color: var(--accent); }
.sidebar .categories { padding-left: 0.75rem; margin-top: 0.5rem; }
.sidebar .category { margin-bottom: 0.75rem; }
.sidebar .category > span { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.sidebar .pages { padding-left: 0.5rem; margin-top: 0.25rem; }
.sidebar .pages li { margin-bottom: 0.25rem; }
.sidebar .pages a { text-decoration: none; }
.sidebar .pages a:hover { text-decoration: underline; }

.content {
  flex: 1 1 auto;
  padding: 1.5rem 2rem 4rem;
  min-width: 0;
}

.content h1 { margin-top: 0; font-weight: 300; }

.content pre {
  background: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 6px;
}

.content code {
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}

.content pre code {
  background: none;
  padding: 0;
}

.product-grid,
.page-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 1rem;
}

.product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.product-grid li,
.page-list li {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

@media (prefers-color-scheme: dark) {
  .product-grid li,
  .page-list li {
    border-left: 3px solid var(--accent);
  }
}

.product-grid a,
.page-list a {
  font-weight: 600;
  text-decoration: none;
}

.product-grid p,
.page-list p {
  color: var(--muted);
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

.site-footer {
  background: var(--chrome-bg);
  color: var(--chrome-muted);
  padding: 1.5rem;
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-org {
  color: var(--chrome-fg);
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.footer-tagline {
  margin: 0;
  font-size: 0.85rem;
}

.footer-version {
  margin-left: 0.35rem;
  cursor: default;
}

.footer-links a {
  color: var(--chrome-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-left: 1.25rem;
}

.footer-links a:first-child { margin-left: 0; }
.footer-links a:hover { color: var(--chrome-fg); }
