/* SPDX-FileCopyrightText: 2026 lasse tech, Lars Gossard
 * SPDX-License-Identifier: AGPL-3.0-or-later */
/* =============================================================
   palaver.social — design tokens and styles
   ============================================================= */

:root {
  /* Backgrounds */
  --bg: #08090f;
  --grid: #12141f;
  --card: #0b0d15;
  --block: #0a0c14;
  --panel: #0b1420;

  /* Borders */
  --border: #1b1e2c;
  --border-soft: #1f2333;
  --border-dashed: #2b3040;
  --border-panel: #16324a;

  /* Accents */
  --cyan: #2EE6FF;
  --magenta: #FF3DBD;
  --blue: #6FA8DC;
  --lime: #9BD40A;
  --violet: #B07CFF;

  /* Text */
  --text: #e7ecf5;
  --text-2: #a9b4c7;
  --text-3: #9aa6ba;
  --text-body: #c2ccdc;
  --muted: #6f7c92;
  --muted-2: #5c6880;

  /* Type */
  --f-display: 'Space Grotesk', system-ui, sans-serif;
  --f-body: 'Hanken Grotesk', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --f-brand: 'Wallpoet', var(--f-mono);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
/* Jump targets (#dogan, #outposts, #mitmachen …) stop below the sticky
   .site-header instead of under it: its height plus some air. */
[id] { scroll-margin-top: 96px; }

body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { text-decoration: none; color: var(--cyan); transition: opacity .15s ease; }
a:hover { opacity: .85; }

img, svg { display: block; }

.container { max-width: 1240px; margin: 0 auto; }

@keyframes ltpulse { 0%,100% { opacity: .5 } 50% { opacity: .95 } }

/* skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--cyan); color: var(--bg); padding: 10px 16px;
  border-radius: 8px; font-family: var(--f-mono); font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

/* =============================== Header =============================== */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 9, 15, .82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand__symbol { width: 36px; height: 36px; flex: none; }
.brand__wordmark {
  font-family: var(--f-brand);
  font-size: 22px; letter-spacing: 1px; line-height: 1;
  color: #fff;
}

.nav { display: flex; align-items: center; gap: 26px; font-family: var(--f-mono); font-size: 14px; }
.nav__link { color: var(--text-3); }
.nav__cta {
  font-weight: 700; color: var(--bg); background: var(--cyan);
  padding: 10px 18px; border-radius: 8px;
  box-shadow: 0 0 18px rgba(46,230,255,.5);
}
.nav__cta:hover { opacity: 1; box-shadow: 0 0 24px rgba(46,230,255,.7); }

/* language switch */
.lang-switch { display: inline-flex; border: 1px solid var(--border-soft); border-radius: 8px; overflow: hidden; }
.lang-switch button {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em;
  background: transparent; color: var(--muted); border: 0; cursor: pointer;
  padding: 7px 10px; transition: color .15s ease, background .15s ease;
}
.lang-switch button[aria-pressed="true"] { color: var(--bg); background: var(--cyan); font-weight: 700; }

/* mobile nav toggle */
.nav-toggle { display: none; background: transparent; border: 1px solid var(--border-soft);
  border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--text); }
.nav-toggle svg { width: 18px; height: 18px; }

/* =============================== Hero =============================== */
.hero { position: relative; padding: 96px 48px 84px; overflow: hidden; }
.hero__glow { position: absolute; pointer-events: none; }
.hero__glow--cyan {
  top: -40px; right: 80px; width: 400px; height: 400px;
  background: radial-gradient(closest-side, rgba(46,230,255,.20), transparent);
  animation: ltpulse 7s ease-in-out infinite;
}
.hero__glow--magenta {
  bottom: -80px; left: 140px; width: 360px; height: 320px;
  background: radial-gradient(closest-side, rgba(255,61,189,.18), transparent);
}

.badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 13px; color: var(--cyan);
  border: 1px solid var(--border-panel); background: var(--panel);
  border-radius: 7px; padding: 7px 13px; margin-bottom: 28px;
}
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 8px var(--lime); flex: none; }

.hero h1 {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(30px, 4.75vw, 52px); line-height: 1.08; letter-spacing: -.02em; margin: 0;
}

/* =============================== Section headers =============================== */
.section { padding: 20px 48px 70px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 8px; }
.section-head h2 { font-family: var(--f-display); font-weight: 600; font-size: 34px; margin: 0; }
.section-head .tag { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }

/* =============================== Footer =============================== */
.site-footer {
  padding: 22px 48px; border-top: 1px solid var(--border);
  font-family: var(--f-mono); font-size: 12px; color: var(--muted-2);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.site-footer a { color: var(--muted-2); }
.site-footer nav { display: flex; gap: 16px; }

/* =============================== Legal pages =============================== */
.legal { max-width: 820px; margin: 0 auto; padding: 64px 48px 80px; }
.legal a { color: var(--cyan); }
.legal h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -.02em; margin: 0 0 8px; }
.legal .lead { font-family: var(--f-mono); font-size: 13px; color: var(--muted); margin: 0 0 40px; }
.legal h2 { font-family: var(--f-display); font-weight: 600; font-size: 22px; margin: 40px 0 12px; }
.legal h3 { font-family: var(--f-display); font-weight: 600; font-size: 17px; margin: 24px 0 8px; }
.legal p, .legal li { font-size: 16px; line-height: 1.7; color: var(--text-2); }
.legal ul { padding-left: 20px; }
.legal address { font-style: normal; color: var(--text); line-height: 1.7; }
.back-link { font-family: var(--f-mono); font-size: 13px; }


/* =============================== Responsive =============================== */
@media (max-width: 860px) {
  .site-header { padding: 16px 22px; }
  .nav { gap: 16px; }
  .nav__link { display: none; }
  .hero { padding: 64px 22px 60px; }
  .section { padding: 12px 22px 56px; }
  .site-footer { padding: 22px; }
  .legal { padding: 48px 22px 64px; }
}

@media (max-width: 560px) {
  .nav__cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav[data-open="true"] .nav__link { display: block; }
  .nav[data-open="true"] {
    position: absolute; top: 68px; right: 22px; left: 22px;
    flex-direction: column; align-items: stretch; gap: 6px;
    background: rgba(8,9,15,.97); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px;
  }
  .nav[data-open="true"] .nav__cta { display: block; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__glow--cyan { animation: none; }
}

/* =============================== Palaver: hero, features, platforms =============================== */

/* The hero starts at the sections' left edge (.section.container): 1240 px
   centered, 48 px inside, 22 px on narrow screens. */
.pv-hero { position: relative; padding: 40px 0 80px; overflow: hidden; }
.pv-hero__inner { position: relative; max-width: 960px; margin: 0 auto; }
.pv-hero__brand { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.pv-wordmark { font-family: var(--f-display); font-weight: 700; font-size: 56px;
  line-height: 1; letter-spacing: .005em;
  background: linear-gradient(120deg, #ff6aa0, #ff2d78 48%, #7a1ce0);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Badges and the "Made with love" chip: stacked, centered */
.pv-badges-row { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.chip-love { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-body);
  font-weight: 500; font-size: 15px; color: var(--text); background: var(--card);
  border: 1px solid var(--border-soft); border-radius: 999px; padding: 11px 20px; }
.chip-love__heart { width: 18px; height: 18px; flex: none; }

.pv-hero__icon { width: 72px; height: 72px; border-radius: 18px; flex: none;
  box-shadow: 0 0 0 1px var(--border-soft), 0 14px 38px rgba(122,28,224,.35); }
.pv-hero__badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pv-hero h1 { font-family: var(--f-display); font-weight: 700;
  font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -.02em; margin: 0; }
.pv-hero__sub { font-size: 19px; line-height: 1.6; color: var(--text-2); max-width: 640px; margin: 16px 0 0; }

/* Feature grid */
.pv-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.pv-feature { background: var(--card); border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 24px; }
.pv-feature h3 { font-family: var(--f-display); font-weight: 600; font-size: 19px; margin: 0 0 8px; }
.pv-feature__k { font-family: var(--f-mono); font-size: 12px; color: var(--violet);
  letter-spacing: .06em; text-transform: uppercase; }
.pv-feature p { font-size: 15px; line-height: 1.6; color: var(--text-3); margin: 6px 0 0; }

/* Platforms strip */
.pv-platforms-strip { display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  border: 1px dashed var(--border-dashed); border-radius: 12px; padding: 16px 22px; margin-top: 16px; }
.pv-platforms-strip__label { font-family: var(--f-mono); font-size: 11px; color: var(--violet);
  text-transform: uppercase; letter-spacing: .08em; }
.pv-platforms-strip__list { font-family: var(--f-mono); font-size: 14px; color: var(--text-2); letter-spacing: .03em; }

@media (max-width: 860px) {
  .pv-hero { padding: 28px 0 56px; }
  .pv-hero__icon { width: 58px; height: 58px; border-radius: 15px; }
  .pv-wordmark { font-size: 42px; }
}

/* =============================================================
   Palaver product page (/palaver/). Brand colours from the Palaver
   design system: brass #f2b23a (amber), pulse #3ddc97 (voice).
   ============================================================= */
[data-lang-block][hidden] { display: none !important; }
.pv-accent { color: #f2b23a; }
.pv-hero .pv-hero__inner { max-width: 1240px; padding: 0 48px; }
.pv-hero .pv-wordmark { background: linear-gradient(120deg, #f5c263, #f2b23a 50%, #b8760a); -webkit-background-clip: text; background-clip: text; }
.pv-dot { background: #3ddc97; }
.pv-k { color: #f2b23a; }
.pv-status { font-family: var(--f-mono); font-size: 13px; color: var(--muted); margin: 22px 0 0; }
.pv-lead { font-size: 17px; line-height: 1.6; color: var(--text-2); max-width: 720px; margin: 0 0 24px; }

.pv-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 18px; padding-top: 0; }
.pv-shot { margin: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--block); padding: 12px; }
.pv-shot img { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid var(--border-soft); }
.pv-shot figcaption { font-family: var(--f-mono); font-size: 12px; color: var(--text-3); padding: 10px 4px 2px; }

.pv-table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 14px; background: var(--card); }
.pv-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 15px; }
.pv-table th, .pv-table td { padding: 16px 20px; text-align: left; vertical-align: top; line-height: 1.5; }
.pv-table thead th { font-family: var(--f-display); font-weight: 600; color: var(--text); background: var(--block); }
.pv-table tbody tr { border-top: 1px solid var(--border-soft); }
.pv-table tbody th { font-weight: 500; color: var(--text); }
.pv-table td { color: var(--text-3); }
.pv-table .pv-us { color: #f2b23a; font-weight: 600; }
.pv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.pv-steps { list-style: none; margin: 0; padding: 0 0 0 4px; display: flex; flex-direction: column; }
.pv-step { position: relative; padding: 0 0 22px 36px; display: flex; flex-direction: column; gap: 4px;
  border-left: 2px solid var(--border-dashed); margin-left: 9px; }
.pv-step:last-child { border-left-color: transparent; padding-bottom: 0; }
.pv-step::before { content: ""; position: absolute; left: -11px; top: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border-dashed); box-sizing: border-box; }
.pv-step--done::before { background: #3ddc97; border-color: #3ddc97; }
.pv-step--now::before { border-color: #f2b23a; box-shadow: 0 0 0 4px rgba(242, 178, 58, .18); }
/* Partly done: the circle fills to --progress, clockwise from the top. */
.pv-step--partial::before { border-color: #3ddc97; background: conic-gradient(#3ddc97 var(--progress, 50%), var(--bg) 0); }
.pv-step--now.pv-step--partial::before { border-color: #f2b23a; background: conic-gradient(#f2b23a var(--progress, 50%), var(--bg) 0); }
.pv-step strong { font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--text); }
.pv-step span { font-size: 15px; line-height: 1.55; color: var(--text-3); }

.pv-join { background: var(--card); border: 1px solid var(--border-soft); border-radius: 18px; padding: 36px 40px; }
.pv-join h2 { font-family: var(--f-display); font-weight: 600; font-size: 30px; margin: 0 0 10px; }
.pv-join p { font-size: 17px; line-height: 1.6; color: var(--text-2); max-width: 64ch; margin: 0; }
.pv-join a { color: #f2b23a; }
.pv-badges { margin-top: 28px; }

@media (max-width: 860px) {
  .pv-join { padding: 26px 22px; }
  .pv-hero .pv-hero__inner { padding: 0 22px; }
}
/* The page's left edge is the site's sections' (.section.container). */
.po { max-width: 1240px; margin: 0 auto; padding: 56px 48px 120px; }
.po-kicker { font-family: var(--f-mono); font-size: 15px; color: #8a90a0; }
.po-kicker span { color: #e6e8ee; }
.po-title { margin: 18px 0 20px; font-family: var(--f-display); font-size: clamp(36px, 5vw, 52px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.05; }
.po-lead { margin: 0; max-width: 760px; font-family: var(--f-display); font-size: 19px; line-height: 1.65; color: #a9afbd;
  text-wrap: pretty; }
.po-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: 64px 0 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-family: var(--f-mono); font-size: 14px; color: #8a90a0; }
.po-meta__end { display: inline-flex; align-items: center; gap: 16px; flex-wrap: wrap; }
/* Cards / table, in the style of the language switch (not .lang-switch: main.js takes those buttons). */
.po-view { display: inline-flex; border: 1px solid var(--border-soft); border-radius: 8px; overflow: hidden; }
.po-view__btn { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; background: transparent;
  color: var(--muted); border: 0; cursor: pointer; padding: 7px 10px; transition: color .15s ease, background .15s ease; }
.po-view__btn[aria-pressed="true"] { color: var(--bg); background: var(--cyan); font-weight: 700; }
.po-view__btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.po-list { display: grid; gap: 16px; }
/* The table view (design "Aussenposten", layout Tabelle). */
.po-table-wrap { overflow-x: auto; border: 1px solid rgba(255, 255, 255, .09); border-radius: 12px; background: rgba(18, 20, 28, .85); }
.po-table { width: 100%; min-width: 900px; border-collapse: collapse; font-family: var(--f-display); font-size: 16px; }
.po-th { padding: 14px 20px; font-size: 12px; font-weight: 500; color: #8a90a0; text-transform: uppercase;
  letter-spacing: .08em; text-align: left; }
.po-table td { padding: 18px 20px; border-top: 1px solid rgba(255, 255, 255, .07); vertical-align: top; }
.po-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.po-table__name { font-weight: 600; }
.po-table__url { font-family: var(--f-mono); font-size: 14px; color: #3fd8f0; overflow-wrap: anywhere; }
.po-table__url:hover { color: #8be9f7; }
.po-table__mono { font-family: var(--f-mono); font-size: 14px; color: #c9cdd8; }
.po-table__reg { color: #3fd8f0; }
.po-dot { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 14px; }
.po-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.po-card { border: 1px solid rgba(255, 255, 255, .09); border-radius: 12px; background: rgba(18, 20, 28, .85); overflow: hidden; }
.po-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 26px 28px 22px; }
.po-card__id { display: grid; gap: 6px; min-width: 0; }
.po-card h2 { margin: 0; font-family: var(--f-display); font-size: 24px; font-weight: 600; letter-spacing: -.01em;
  overflow-wrap: anywhere; }
.po-card__url { font-family: var(--f-mono); font-size: 16px; color: #3fd8f0; overflow-wrap: anywhere; }
.po-card__url:hover { color: #8be9f7; }
.po-status { display: inline-flex; align-items: center; gap: 9px; padding: 7px 13px; border-radius: 999px;
  font-family: var(--f-mono); font-size: 14px; }
.po-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.po-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border-top: 1px solid rgba(255, 255, 255, .07); }
.po-facts > div { padding: 18px 28px; border-right: 1px solid rgba(255, 255, 255, .07); }
.po-facts > div:last-child { border-right: 0; }
/* As .section on narrow screens. */
@media (max-width: 860px) {
  .po { padding-left: 22px; padding-right: 22px; }
}
/* Two columns on narrow screens: no line at the card's edge, one between the rows. */
@media (max-width: 760px) {
  .po-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .po-facts > div:nth-child(2n) { border-right: 0; }
  .po-facts > div:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .07); }
}
.po-facts dt { font-family: var(--f-display); font-size: 13px; color: #8a90a0; text-transform: uppercase; letter-spacing: .08em; }
.po-facts dd { margin: 8px 0 0; }
.po-fact--version { font-family: var(--f-mono); font-size: 15px; color: #e6e8ee; }
.po-fact--registration { font-family: var(--f-display); font-size: 17px; font-weight: 500; color: #3fd8f0; }
.po-fact--number { font-family: var(--f-display); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; color: #e6e8ee; }
.po-fact--uptime { font-family: var(--f-display); font-size: 20px; font-weight: 600; line-height: 30px; font-variant-numeric: tabular-nums; color: #e6e8ee; white-space: nowrap; }
/* A count the owner did not release: the eye-off symbol, explained in the footnote. */
.po-withheld { display: inline-flex; align-items: center; color: #8a90a0; text-decoration: none; }
.po-withheld:hover { color: #c9cdd8; }
.po-withheld svg { width: 1em; height: 1em; }
/* The server's icon (from Dogan) or its initials, before name and address. */
.po-icon { display: inline-grid; place-items: center; flex: none; overflow: hidden; background: rgba(255, 255, 255, .07);
  color: #e6e8ee; font-family: var(--f-display); font-weight: 600; letter-spacing: .02em; }
.po-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.po-icon--table { width: 36px; height: 36px; border-radius: 8px; font-size: 14px; }
.po-icon--card { width: 52px; height: 52px; border-radius: 12px; font-size: 19px; }
.po-table__server { display: flex; align-items: center; gap: 14px; min-width: 0; }
.po-table__text { min-width: 0; }
.po-card__head { display: flex; align-items: center; gap: 16px; min-width: 0; }
.po-members { display: inline-flex; align-items: center; white-space: nowrap; }
.po-members__sep { color: #8a90a0; margin: 0 1px; }
.po-footnote { display: flex; align-items: flex-start; gap: 8px; }
.po-footnote svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.po-note { font-family: var(--f-mono); font-size: 13px; color: var(--muted); margin: 18px 0 0; }
.po-empty { border: 1px dashed var(--border-dashed); border-radius: 12px; padding: 28px; color: var(--text-3); margin: 0; }
.po-how { margin-top: 120px; }
.po-how h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 700; letter-spacing: -.02em; }
.po-how ol { margin: 0; padding-left: 22px; color: var(--text-3); line-height: 1.7; }

/* ---- More specific rules, kept after the simpler selectors they share
   elements with (stylelint no-descending-specificity). Moving them here
   changes nothing on screen: the more specific rule wins either way. ---- */
.lang-switch button:not([aria-pressed="true"]):hover { color: var(--text); }
.site-footer a:hover { color: var(--text-3); }

/* ---- Spacing helpers (formerly inline styles). !important, as the inline
   styles they replace won over the component rules. ---- */
.u-mt-32 { margin-top: 32px !important; }
.u-mt-40 { margin-top: 40px !important; }

/* ============================ Palaver server setup ============================ */
.sg { max-width: 880px; margin: 0 auto; padding: 56px 48px 120px; }
.sg h2 { margin: 48px 0 12px; font-family: var(--f-display);
  font-size: 24px; font-weight: 600; letter-spacing: -.01em; scroll-margin-top: 96px; }
.sg section { scroll-margin-top: 96px; }
.sg p, .sg li { font-size: 16px; line-height: 1.7; color: var(--text-2); }
.sg ul, .sg ol { padding-left: 22px; }
.sg p strong, .sg li strong { color: var(--text); font-weight: 600; }
.sg code { font-family: var(--f-mono); font-size: .88em; font-variant-ligatures: none; color: var(--text); overflow-wrap: anywhere; }
.sg-toc { margin: 24px 0 40px; }
.sg-toc h2 { margin: 0 0 8px; font-size: 18px; }
.sg-toc ol, .sg-toc ul { margin: 0; padding-left: 2em; }
.sg-toc ul { list-style: none; margin-top: 8px; }
.sg-toc li { padding: 1px 0; }
.sg-toc a[href] { color: var(--text-body); }
.sg-toc a[href]:hover, .sg-toc a[href]:focus-visible { color: var(--cyan); }
.sg-code { position: relative; margin: 12px 0 20px; padding: 16px 18px; overflow-x: auto; border: 1px solid var(--border);
  border-radius: 10px; background: var(--block); font-family: var(--f-mono); font-size: 14px; line-height: 1.6;
  color: var(--text-body); scrollbar-color: var(--border-dashed) transparent; }
.sg-code code { font-size: inherit; color: inherit; overflow-wrap: normal; }
.sg-code.has-copy { padding-right: 88px; }
.sg-code-wrap { position: relative; margin: 12px 0 20px; }
.sg-code-wrap .sg-code { margin: 0; }
.sg-copy { position: absolute; top: 10px; right: 10px; padding: 4px 10px; border: 1px solid var(--border-soft);
  border-radius: 6px; background: var(--card); color: var(--text-3); font-family: var(--f-mono); font-size: 12px;
  cursor: pointer; }
.sg-copy:hover, .sg-copy:focus-visible { color: var(--cyan); border-color: var(--cyan); }
.sg-table-wrap { margin: 12px 0 20px; overflow-x: auto; border: 1px solid rgba(255, 255, 255, .09); border-radius: 12px;
  background: rgba(18, 20, 28, .85); }
.sg-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.sg-table thead th { padding: 12px 18px; text-align: left; font-family: var(--f-display); font-size: 12px; font-weight: 500;
  color: #8a90a0; text-transform: uppercase; letter-spacing: .06em; }
.sg-table td { padding: 12px 18px; border-top: 1px solid rgba(255, 255, 255, .07); color: var(--text-2);
  vertical-align: top; }
.sg-warn { padding: 14px 18px; border-left: 3px solid var(--magenta); border-radius: 0 8px 8px 0;
  background: rgba(255, 61, 189, .07); }
/* Server guides (tools/guides.mjs): highlight.js classes, set at build time */
.sg-code .hljs-comment { color: var(--muted); }
.sg-code .hljs-built_in, .sg-code .hljs-section { color: var(--magenta); }
.sg-code .hljs-attribute, .sg-code .hljs-attr { color: var(--blue); }
.sg-code .hljs-string { color: var(--lime); }
.sg-code .hljs-variable, .sg-code .hljs-subst { color: var(--cyan); }
.sg-code .hljs-number, .sg-code .hljs-literal, .sg-code .hljs-regexp { color: var(--violet); }
/* Palaver FAQ (faq.html, from content/faq.*.md): one question per <details> */
.faq { border-bottom: 1px solid var(--border-soft); scroll-margin-top: 96px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0;
  cursor: pointer; list-style: none; font-family: var(--f-display); font-size: 18px; font-weight: 600; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-family: var(--f-mono); font-size: 20px; color: var(--cyan); }
.faq[open] summary::after { content: "−"; }
.faq summary:hover, .faq summary:focus-visible { color: var(--cyan); }
.faq summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 4px; }
.faq__a { padding: 0 0 16px; }
.faq__a > :first-child { margin-top: 0; }
.faq__link { color: var(--cyan); }
.faq__more { margin-top: 48px; }
@media (max-width: 560px) {
  .sg { padding: 40px 16px 80px; }
  .sg h2 { font-size: 21px; }
}
