:root {
  --bg: #f4f7fb;
  --sidebar: #102a43;
  --sidebar-text: #d9e2ec;
  --surface: #ffffff;
  --text: #1d2d44;
  --line: #d9e2ec;
  --accent: #0f62fe;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, #e8efff, var(--bg));
  color: var(--text);
  font-family: "Source Sans Pro", "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

.left-nav {
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 18px 16px;
}

.brand {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  opacity: 0.9;
  margin-bottom: 14px;
}

.toc-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  opacity: 0.85;
}

.left-nav ul {
  margin: 0;
  padding-left: 16px;
}

.left-nav a {
  color: #9ed0ff;
  text-decoration: none;
}

.left-nav a:hover {
  text-decoration: underline;
}

.doc-main {
  padding: 24px clamp(16px, 4vw, 44px);
}

.doc-header {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

.doc-header h1 {
  margin: 0;
}

.doc-header p {
  margin: 8px 0 0;
  color: #486581;
}

.doc-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(16px, 3vw, 30px);
}

.doc-content h2 {
  margin-top: 2rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line);
}

.doc-content pre {
  overflow: auto;
  padding: 10px;
  border-radius: 6px;
  background: #0b1726;
  color: #f0f4f8;
}

.doc-footer {
  color: #627d98;
  font-size: 0.9rem;
  margin-top: 12px;
}

img {
  max-width: 60%;
  height: auto;
  border: 1px solid #ddd;
  margin: 1rem auto;
}

code {
  background-color: #ddd;
  border: 1px solid rgb(165, 165, 165);
  border-radius: 5px;
  padding: 5px;
}

/* table formatting */
table {
  border-collapse: collapse;
}

th,td {
  border: 1px solid #aaa;
  padding: 5px 8px;
}

tbody tr:nth-child(even) {
  background-color: #ddd;
}

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

  .left-nav {
    position: sticky;
    top: 0;
    z-index: 2;
  }
}