*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; font-family: 'DM Sans', sans-serif; }
body { overflow: hidden; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: oklch(var(--bc)/0.15); border-radius: 4px; }

/* ── KYDO brand blue (~#1B5AA6) ──────────────────── */
[data-theme="light"], [data-theme="dark"] {
  --p:  49% 0.165 252;
  --pc: 98% 0     0;
  --pf: 44% 0.165 252;
}

/* Active nav item */
.menu li > a.active {
  background-color: oklch(49% 0.165 252 / 0.12) !important;
  color: oklch(49% 0.165 252) !important;
  font-weight: 600;
}
[data-theme="dark"] .menu li > a.active {
  background-color: oklch(49% 0.165 252 / 0.18) !important;
  color: oklch(72% 0.14 252) !important;
}

/* Better text contrast */
[data-theme="light"] { --bc: 20% 0.02 252; }
[data-theme="dark"]  { --bc: 90% 0.01 252; }

/* ── Section icons (Material Icons) ─────────────── */
.section-icon {
  font-size: 1.1em;
  vertical-align: -0.15em;
  margin-right: 0.35em;
  opacity: 0.55;
}

/* ── Article body (Markdown output) ──────────────── */
.article-body h2 {
  font-size: 16px; font-weight: 600;
  color: oklch(var(--bc));
  letter-spacing: -0.01em;
  margin-top: 2rem; margin-bottom: 0.75rem;
}
.article-body p {
  font-size: 15px; line-height: 1.7;
  color: oklch(var(--bc) / 0.7);
  margin-bottom: 0.75rem;
}
.article-body a { color: oklch(var(--p)); }

/* Bullet list */
.article-body ul { list-style: none; padding-left: 0; margin-bottom: 0.75rem; }
.article-body ul li {
  display: flex; gap: 0.75rem;
  font-size: 15px; line-height: 1.6;
  color: oklch(var(--bc) / 0.7);
  margin-bottom: 0.5rem;
}
.article-body ul li::before {
  content: '';
  flex-shrink: 0; width: 0.375rem; height: 0.375rem;
  border-radius: 50%; background: oklch(var(--p));
  margin-top: 0.5625rem;
}

/* Step list */
.article-body ol {
  list-style: none; padding-left: 0;
  margin-bottom: 0.75rem;
  counter-reset: step-counter;
}
.article-body ol li {
  display: flex; gap: 0.75rem; align-items: flex-start;
  font-size: 15px; line-height: 1.6;
  color: oklch(var(--bc) / 0.7);
  margin-bottom: 0.75rem;
  counter-increment: step-counter;
}
.article-body ol li::before {
  content: counter(step-counter);
  flex-shrink: 0; width: 1.5rem; height: 1.5rem;
  border-radius: 50%; background: oklch(var(--p));
  color: oklch(var(--pc));
  font-weight: 600; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 0.125rem;
}

/* ── Screenshot placeholder ──────────────────────── */
/* Screenshot image */
figure.screenshot {
  margin: 1.25rem auto;
  text-align: center;
}
figure.screenshot img {
  max-width: 480px; width: 100%;
  border-radius: 0.75rem;
  border: 1px solid oklch(var(--b3));
  display: block;
  margin: 0 auto;
}
figure.screenshot--full img { max-width: 100%; }

figure.screenshot figcaption {
  font-size: 12px; text-align: center;
  color: oklch(var(--bc) / 0.4);
  margin-top: 0.5rem;
}

.screenshot-placeholder {
  height: 200px; border-radius: 0.75rem;
  border: 1px solid oklch(var(--b3));
  background: repeating-linear-gradient(135deg,
    oklch(var(--b2)) 0, oklch(var(--b2)) 10px,
    oklch(var(--b1)) 10px, oklch(var(--b1)) 20px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  margin: 1.25rem 0;
}
.screenshot-placeholder svg { opacity: 0.3; }
.screenshot-placeholder span {
  font-family: monospace; font-size: 12px;
  opacity: 0.4; letter-spacing: 0.025em;
}

/* ── Pagefind search ─────────────────────────────── */
:root {
  --pagefind-ui-scale: 0.8;
  --pagefind-ui-primary: oklch(49% 0.165 252);
  --pagefind-ui-font: 'DM Sans', sans-serif;
  --pagefind-ui-border-radius: 6px;
}

#search { width: 100%; }

.pagefind-ui { width: 100%; }

.pagefind-ui__form {
  display: flex !important;
  align-items: center !important;
}
.pagefind-ui__form::before {
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
}

.pagefind-ui__search-input {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  height: 32px !important;
  min-height: 32px !important;
  font-size: 14px !important;
  color: oklch(var(--bc)) !important;
}
.pagefind-ui__search-input::placeholder { color: oklch(var(--bc) / 0.9) !important; }
.pagefind-ui__search-input:focus { outline: none !important; }

.pagefind-ui__search-clear {
  background: transparent !important;
  color: oklch(var(--bc) / 0.4) !important;
}

/* Results panel — fixed overlay below topbar */
.pagefind-ui__drawer {
  position: fixed !important;
  top: 52px !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 200 !important;
  background: oklch(var(--b1)) !important;
  border-top: 1px solid oklch(var(--b3)) !important;
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.15) !important;
  max-height: calc(100vh - 52px);
  overflow-y: auto;
  padding: 1.5rem 2rem !important;
}

.pagefind-ui__result {
  border-bottom: 1px solid oklch(var(--b3)) !important;
  padding: 0.75rem 0 !important;
}
.pagefind-ui__result:last-child { border-bottom: none !important; }

.pagefind-ui__result-title a {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: oklch(var(--p)) !important;
}

.pagefind-ui__result-excerpt {
  font-size: 13px !important;
  color: oklch(var(--bc) / 0.6) !important;
  margin-top: 0.25rem !important;
}

mark { background: oklch(var(--p) / 0.15); color: inherit; border-radius: 2px; }

.pagefind-ui__message {
  font-size: 14px !important;
  color: oklch(var(--bc) / 0.5) !important;
  padding: 1rem 0 !important;
}

/* ── FAQ accordion ───────────────────────────────── */
.faq-accordion .collapse-title { font-size: 15px; padding-right: 2.5rem; }
.faq-accordion .collapse-content p {
  font-size: 14px; line-height: 1.7;
  color: oklch(var(--bc) / 0.7);
  padding-top: 0.25rem;
}
