:root {
  --sidebar-bg: #f4f6f8;
  --page-bg: #ffffff;
  --ink: #111827;
  --muted: #4b5563;
  --accent: #3730a3;
  --accent-soft: #eef2ff;
  --border: #e5e7eb;
  --code-bg: #f3f4f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

aside.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.logo-link {
  display: block;
  margin-bottom: 1.5rem;
}

.logo-link img {
  display: block;
  max-width: 100%;
  height: auto;
}

.side-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 1.2rem 0 0.5rem;
}

aside nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

aside nav a {
  display: block;
  padding: 0.42rem 0.65rem;
  border-radius: 5px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
}

aside nav a:hover {
  background: #e5e7eb;
}

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

main {
  padding: 2.25rem 3rem 3.5rem;
  max-width: 56rem;
}

h1 {
  margin: 0 0 0.6rem;
  font-size: 1.95rem;
  letter-spacing: -0.015em;
}

h2 {
  margin: 2rem 0 0.65rem;
  font-size: 1.28rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
}

.subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.04rem;
}

pre {
  background: #1e293b;
  color: #f8fafc;
  padding: 0.95rem 1.1rem;
  border-radius: 6px;
  overflow-x: auto;
  font: 0.87rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
}

pre code {
  background: transparent;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
}

th, td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--sidebar-bg);
  font-weight: 600;
}

.note {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 0.8rem 1rem;
  margin: 1.25rem 0;
  border-radius: 0 5px 5px 0;
}

@media (max-width: 780px) {
  .layout {
    grid-template-columns: 1fr;
  }
  aside.sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  main {
    padding: 1.5rem 1.25rem 2.5rem;
  }
}
