/* Planet3D Help — styling voor de gemigreerde helpdocumentatie.
   Gebruikt dezelfde huisstijl-tokens als css/style.css.
   BRON: help-src/help.css — build.js kopieert dit naar help/help.css. */

:root {
  --sky-top: #8fb1ea;
  --sky-mid: #c3c9f1;
  --sky-low: #efe7f4;
  --ink: #24314f;
  --ink-soft: #56618a;
  --accent: #4f6ef7;
  --accent-dark: #3b55d6;
  --surface: #ffffff;
  --surface-alt: #f4f6fd;
  --line: #dfe4f5;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(52, 74, 140, .12);
  --font: 'Outfit', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  font-family: var(--font);
  color: #24314f;
  color: var(--ink);
  background: #f4f6fd;
  background: var(--surface-alt);
  line-height: 1.65;
}

img { max-width: 100%; height: auto; }

a { color: #3b55d6; color: var(--accent-dark); }
a:hover { color: #4f6ef7; color: var(--accent); }

/* ---------- Header ---------- */

.help-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 4%;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #dfe4f5;
  border-bottom: 1px solid var(--line);
}

.help-brand { display: flex; height: 58px; }
.help-brand img { height: 100%; width: auto; }

.help-label {
  font-weight: 600;
  color: #56618a;
  color: var(--ink-soft);
  border-left: 2px solid #dfe4f5;
  border-left: 2px solid var(--line);
  padding-left: 1rem;
}

.back-link {
  margin-left: auto;
  font-size: .88rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Layout ---------- */

/* De indeling staat er twee keer: eerst met floats, daarna met grid.
   De ingebouwde browser van Planet3D draait Chromium 45 (2015) en kent geen
   grid; die houdt het dus bij de floats. @supports kent hij wel - dat kwam in
   Chromium 28 - dus dat is de juiste schakelaar om de twee uit elkaar te
   houden. Ook `min()` is eruit: dat kon pas vanaf Chromium 79, en
   width + max-width doet hetzelfde. */

.help-layout {
  width: 96%;
  max-width: 1180px;
  margin: 1.6rem auto;
}
.help-layout::after { content: ""; display: table; clear: both; }

.help-layout > .help-sidebar { float: left; width: 270px; }
.help-layout > .help-article { margin-left: 294px; }

@supports (display: grid) {
  .help-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 1.6rem;
    align-items: start;
  }
  .help-layout > .help-sidebar { float: none; width: auto; }
  .help-layout > .help-article { margin-left: 0; }
  /* De clearfix hierboven is in een grid geen clearfix meer maar een cel, en
     die zou een lege rij opleveren. */
  .help-layout::after { display: none; }
}

/* ---------- Zijbalk ---------- */

.help-sidebar {
  background: #ffffff;
  background: var(--surface);
  border: 1px solid #dfe4f5;
  border: 1px solid var(--line);
  border-radius: 16px;
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 95px);
  overflow-y: auto;
  font-size: .92rem;
}

.help-sidebar h2 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #56618a;
  color: var(--ink-soft);
  margin: 1.1rem 0 .35rem;
}
.help-sidebar h2:first-child { margin-top: 0; }

.help-sidebar ul { list-style: none; }

.help-sidebar li { margin: 0; }

.help-sidebar a {
  display: block;
  padding: .22rem .55rem;
  border-radius: 8px;
  text-decoration: none;
  color: #24314f;
  color: var(--ink);
}
.help-sidebar a:hover { background: #f4f6fd; background: var(--surface-alt); color: #3b55d6; color: var(--accent-dark); }

.help-sidebar a.active {
  background: rgba(79, 110, 247, .12);
  color: #3b55d6;
  color: var(--accent-dark);
  font-weight: 600;
}

.sidebar-note {
  margin-top: 1.2rem;
  font-size: .8rem;
  color: #56618a;
  color: var(--ink-soft);
  border-top: 1px dashed #dfe4f5;
  border-top: 1px dashed var(--line);
  padding-top: .8rem;
}

/* ---------- Artikel ---------- */

.help-article {
  background: #ffffff;
  background: var(--surface);
  border: 1px solid #dfe4f5;
  border: 1px solid var(--line);
  border-radius: 16px;
  border-radius: var(--radius);
  padding: 2rem 2.4rem 2.6rem;
  box-shadow: 0 4px 14px rgba(52, 74, 140, .05);
  min-width: 0;
  overflow-x: auto;
}

.help-article h1 {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: .4rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid #dfe4f5;
  border-bottom: 1px solid var(--line);
}

.help-article h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #3b55d6;
  color: var(--accent-dark);
  margin: 1.6rem 0 .4rem;
}

.help-article h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.3rem 0 .3rem;
}

.help-article p { margin: .7rem 0; }

.help-article ul, .help-article ol { margin: .7rem 0 .7rem 1.5rem; }

.help-article table {
  border-collapse: collapse;
  margin: 1rem auto;
}

.help-article th, .help-article td {
  border: 1px solid #dfe4f5;
  border: 1px solid var(--line);
  padding: .4rem .8rem;
  text-align: left;
}

.help-article th { background: #f4f6fd; background: var(--surface-alt); }

.help-article tr:nth-child(even) td { background: #fafbfe; }

.help-article code, .help-article tt {
  font-family: Consolas, 'Courier New', monospace;
  font-size: .9em;
  background: #f4f6fd;
  background: var(--surface-alt);
  border: 1px solid #dfe4f5;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .05rem .35rem;
  color: #24314f;
  color: var(--ink);
  font-weight: normal;
}

.swatch {
  display: inline-block;
  width: 3.2rem;
  height: 1.1rem;
  border-radius: 6px;
  border: 1px solid #dfe4f5;
  border: 1px solid var(--line);
  vertical-align: middle;
}

.note {
  background: #f4f6fd;
  background: var(--surface-alt);
  border-left: 3px solid #4f6ef7;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: .7rem 1rem;
  margin: 1rem 0;
  font-size: .92rem;
  color: #56618a;
  color: var(--ink-soft);
}

/* ---------- Legacy-content (batch-demo): oude markup netjes maken met CSS ---------- */

.legacy-content blockquote {
  margin: 0;
  font: inherit;
  color: inherit;
  font-weight: normal;
}

.legacy-content p { margin: .7rem 0; }

.legacy-content p.head2, .legacy-content .head2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #3b55d6;
  color: var(--accent-dark);
  letter-spacing: 0;
  margin: 1.6rem 0 .4rem;
  background: none;
}

.legacy-content .head3 {
  font-weight: 600;
  color: #24314f;
  color: var(--ink);
  border-bottom: 1px dashed #4f6ef7;
  border-bottom: 1px dashed var(--accent);
}

.legacy-content .warn { color: #bb3333; font-weight: 600; }

.legacy-content table {
  border-collapse: collapse;
  margin: 1rem auto;
}

.legacy-content th, .legacy-content td {
  border: 1px solid #dfe4f5;
  border: 1px solid var(--line);
  padding: .35rem .7rem;
}

.legacy-content th { background: #f4f6fd; background: var(--surface-alt); }

.legacy-content th p, .legacy-content td p { margin: 0; display: inline; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid #dfe4f5;
  border-top: 1px solid var(--line);
  padding: 1.1rem 4%;
  display: flex;
  justify-content: center;
  font-size: .9rem;
  color: #56618a;
  color: var(--ink-soft);
  background: #ffffff;
  background: var(--surface);
}

.footer-version { font-weight: 600; color: #3b55d6; color: var(--accent-dark); }

/* ---------- Responsief ---------- */

.md-content > img, .md-content p > img {
  display: block;
  margin: 1rem auto;
}

/* TOC-pagina's (contents.html): secties in kolommen */
.toc-columns {
  -webkit-columns: 2;
  columns: 2;
  -webkit-column-gap: 2.5rem;
  column-gap: 2.5rem;
}
.toc-columns section {
  -webkit-column-break-inside: avoid;
  break-inside: avoid;
  margin-bottom: 1.4rem;
}
.toc-columns h2 { margin-top: 0; }
@media (max-width: 760px) { .toc-columns { -webkit-columns: 1; columns: 1; } }

/* ---------- Responsief ---------- */

@media (max-width: 860px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-layout > .help-sidebar { float: none; width: auto; }
  .help-layout > .help-article { margin-left: 0; }
  .help-sidebar { position: static; max-height: 260px; }
  .help-article { padding: 1.4rem 1.2rem 1.8rem; }
}

/* Ruimte tussen de items in de kop en de voettekst.
   Bewust geen `gap`: die werkt in flexbox pas vanaf Chromium 84, en de
   ingebouwde browser van Planet3D draait op een oudere versie. In een grid
   mag `gap` wel - dat kan Chromium al sinds 57, en .help-layout gebruikt het. */
.help-header > * + * { margin-left: 1rem; }
.site-footer > * + * { margin-left: .5rem; }

/* Een anker mag niet onder de vastgezette kop uitkomen. scroll-margin-top kwam
   in Chromium 69; oudere motoren zetten de kop toch niet vast, dus daar valt er
   ook niets onder te verdwijnen. */
.help-article [id] { scroll-margin-top: 74px; }
