:root {
  --ifree: #24bbef;
  --ifree-dark: #1a9fd4;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --font: "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, Consolas, monospace;
  --sidebar-width: 260px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--ifree-dark);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: var(--ifree);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.brand-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

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

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(36, 187, 239, 0.12);
  color: var(--ifree-dark);
  font-size: 0.75rem;
  font-weight: 600;
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

.sidebar {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.nav-section + .nav-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

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

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

.nav-list a {
  display: block;
  padding: 0.45rem 0.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--text);
}

.nav-list a:hover {
  background: rgba(36, 187, 239, 0.08);
}

.nav-list a.active {
  background: rgba(36, 187, 239, 0.14);
  color: var(--ifree-dark);
  font-weight: 600;
}

.content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.content h1 {
  margin-top: 0;
  font-size: 2rem;
  line-height: 1.2;
}

.content h2 {
  margin-top: 2rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.35rem;
}

.content h3 {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.content p,
.content li {
  color: #374151;
}

.content ul,
.content ol {
  padding-left: 1.25rem;
}

.content hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.content blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--ifree);
  background: rgba(36, 187, 239, 0.08);
  color: var(--muted);
}

.content code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 0.15rem 0.35rem;
  border-radius: 0.35rem;
  background: #f3f4f6;
}

.content pre {
  overflow-x: auto;
  padding: 1rem;
  border-radius: 0.75rem;
  background: #111827;
  color: #f9fafb;
}

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

.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.content th,
.content td {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

.content th {
  background: #f9fafb;
}

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  position: relative;
  padding-left: 1.6rem;
}

.checklist li::before {
  content: "☐";
  position: absolute;
  left: 0;
  color: var(--ifree);
}

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

  .sidebar {
    position: static;
  }

  .content {
    padding: 1.25rem;
  }
}
