/* Playbook Static Site — Vizzuality */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: #fff;
  color: #333;
}

/* Layout */
.site {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: #fafafa;
  border-right: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header svg {
  height: 18px;
  width: auto;
}

.sidebar-header .divider {
  width: 1px;
  height: 20px;
  background: #ddd;
}

.sidebar-header .title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  letter-spacing: -0.2px;
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 8;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  cursor: pointer;
  padding: 6px;
  color: #555;
}

.sidebar-toggle svg {
  width: 22px;
  height: 22px;
}

.sidebar-nav {
  padding: 12px 0;
  flex: 1;
}

/* Navigation groups (details/summary) */
.nav-group {
  margin-bottom: 2px;
}

.nav-depth-0 {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.nav-depth-0:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.nav-group summary {
  list-style: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
}

.nav-group-header:hover {
  color: #2ba4a0;
}

.nav-group-header .arrow {
  font-size: 10px;
  color: #999;
  transition: transform 0.2s;
  display: inline-block;
}

.nav-group[open] > summary .arrow {
  transform: rotate(90deg);
}

/* Navigation items */
.nav-item {
  display: block;
  padding: 6px 20px 6px 36px;
  font-size: 13px;
  color: #666;
  text-decoration: none;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}

.nav-item:hover {
  color: #2ba4a0;
  background: rgba(43, 164, 160, 0.04);
}

.nav-item.active {
  color: #2ba4a0;
  font-weight: 500;
  background: rgba(43, 164, 160, 0.06);
  border-left-color: #2ba4a0;
}

/* Content */
.content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.content-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 48px;
  flex: 1;
  width: 100%;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 13px;
  color: #999;
  margin-bottom: 8px;
}

.breadcrumb a {
  color: #2ba4a0;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .sep {
  margin: 0 6px;
  color: #ccc;
}

/* Page title */
.page-title {
  font-size: 32px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.5px;
  margin-bottom: 32px;
  line-height: 1.2;
}

/* Page body (rendered markdown) */
.page-body h2 {
  font-size: 22px;
  font-weight: 600;
  color: #222;
  margin: 32px 0 16px;
  letter-spacing: -0.3px;
}

.page-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: #222;
  margin: 24px 0 12px;
}

.page-body p {
  font-size: 15px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 16px;
}

.page-body ul,
.page-body ol {
  margin: 0 0 16px 24px;
  font-size: 15px;
  line-height: 1.7;
  color: #444;
}

.page-body ul li,
.page-body ol li {
  margin-bottom: 6px;
}

.page-body blockquote {
  border-left: 3px solid #2ba4a0;
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(43, 164, 160, 0.04);
  color: #555;
  font-size: 15px;
  line-height: 1.6;
}

.page-body code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
  font-family: 'Geist Mono', 'Fira Code', monospace;
}

.page-body pre {
  background: #f5f5f5;
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.page-body pre code {
  background: none;
  padding: 0;
  font-size: 13px;
}

.page-body a {
  color: #2ba4a0;
  text-decoration: none;
}

.page-body a:hover {
  text-decoration: underline;
}

.page-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.page-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 14px;
}

.page-body th,
.page-body td {
  padding: 8px 12px;
  border: 1px solid #e5e5e5;
  text-align: left;
}

.page-body th {
  background: #fafafa;
  font-weight: 600;
}

.page-body hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 32px 0;
}

/* Landing page hint */
.landing-hint {
  font-size: 16px;
  color: #999;
  margin-top: 24px;
}

/* Group page children list */
.children-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.children-list li {
  margin-bottom: 8px;
}

.children-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 15px;
  color: #2ba4a0;
  text-decoration: none;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  transition: all 0.15s;
  width: 100%;
}

.children-list a:hover {
  background: rgba(43, 164, 160, 0.04);
  border-color: #2ba4a0;
}

.children-list a::before {
  content: "\2192";
}

/* Prev/Next navigation */
.page-nav {
  display: flex;
  justify-content: space-between;
  padding: 24px 0;
  margin-top: 48px;
  border-top: 1px solid #e5e5e5;
}

.page-nav a {
  text-decoration: none;
  font-size: 14px;
}

.page-nav a .label {
  font-size: 12px;
  color: #999;
  display: block;
  margin-bottom: 2px;
}

.page-nav a .nav-title {
  color: #2ba4a0;
  font-weight: 500;
}

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

.page-nav .next {
  text-align: right;
  margin-left: auto;
}

/* Footer */
.site-footer {
  padding: 20px 48px;
  border-top: 1px solid #e5e5e5;
  font-size: 12px;
  color: #999;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9;
}

/* 404 page */
.not-found {
  text-align: center;
  padding: 80px 24px;
}

.not-found h1 {
  font-size: 48px;
  font-weight: 700;
  color: #111;
  margin-bottom: 12px;
}

.not-found p {
  font-size: 16px;
  color: #666;
  margin-bottom: 24px;
}

.not-found a {
  color: #2ba4a0;
  text-decoration: none;
  font-weight: 500;
}

.not-found a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100vh;
    z-index: 10;
    transition: left 0.25s ease;
  }

  .site.sidebar-open .sidebar {
    left: 0;
  }

  .site.sidebar-open .sidebar-overlay {
    display: block;
  }

  .sidebar-toggle {
    display: block;
  }

  .content-inner {
    padding: 52px 20px 24px;
  }

  .site-footer {
    padding: 20px;
  }

  .page-title {
    font-size: 26px;
  }
}
