/* ============================================================
   SACAM SERVICES — Documentation / engineering site
   Left sidebar TOC · narrow prose column · monospace headings
   ============================================================ */

:root {
  /* palette — light off-white / slate */
  --bg: #f6f7f9;
  --bg-soft: #eef1f4;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #1b1f27;
  --ink-soft: #3c4453;
  --muted: #5f6a7a;
  --faint: #8a93a0;
  --line: #e2e5ea;
  --line-soft: #eceef2;
  --line-strong: #d3d8df;

  /* syntax accents on light */
  --blue: #2563eb;
  --blue-ink: #1d4ed8;
  --blue-soft: #eaf1fe;
  --purple: #7c3aed;
  --purple-ink: #6d28d9;
  --purple-soft: #f3edfe;
  --green: #0f9d58;
  --green-ink: #0b7a44;
  --green-soft: #eaf7ef;
  --amber: #b45309;
  --amber-soft: #fdf3e3;
  --red: #b91c1c;
  --red-soft: #fdecec;

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
    Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --sidebar-w: 282px;
  --toc-w: 210px;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(27, 31, 39, 0.05), 0 6px 18px rgba(27, 31, 39, 0.06);
  --shadow-lg: 0 2px 8px rgba(27, 31, 39, 0.07), 0 24px 48px rgba(27, 31, 39, 0.12);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  background-color: var(--bg);
  /* subtle grid-paper texture */
  background-image:
    linear-gradient(to right, rgba(27, 31, 39, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(27, 31, 39, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  color: var(--blue-ink);
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--mono);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

code, kbd, pre {
  font-family: var(--mono);
}

::selection {
  background: var(--blue-soft);
  color: var(--blue-ink);
}

/* `.grid-bg` is now global via body; keep the class inert. */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 6px 0;
  z-index: 2000;
}
.skip-link:focus {
  left: 0;
}

/* ============================================================
   Sidebar (persistent documentation TOC)
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  z-index: 800;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 20px;
  overflow-y: auto;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
  color: var(--ink);
}
.brand .brand-mark {
  background: var(--ink);
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.84rem;
}
.brand .brand-slash {
  margin: 0 5px;
  color: var(--blue);
  font-weight: 400;
}
.brand .brand-sub {
  color: var(--muted);
  font-weight: 500;
}

.version-badge {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--green-ink);
  background: var(--green-soft);
  border: 1px solid #bfe6cf;
  border-radius: 999px;
  padding: 2px 8px;
  letter-spacing: 0.02em;
}

/* language switcher (EN | FR) */
.sidebar-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.lang-switch a {
  color: var(--muted);
  text-decoration: none;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.4;
}
.lang-switch a:hover {
  color: var(--ink);
  background: var(--bg-soft);
  text-decoration: none;
}
.lang-switch a.active {
  color: #fff;
  background: var(--blue);
}
.lang-switch .lang-sep {
  color: var(--faint);
  font-weight: 400;
}

/* documentation nav */
.doc-nav {
  flex: 1 1 auto;
}
.nav-title {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 18px 0 7px;
}
.nav-title:first-child {
  margin-top: 0;
}
.doc-nav ul {
  list-style: none;
}
.doc-nav li {
  margin: 1px 0;
}
.doc-nav a {
  display: block;
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--ink-soft);
  padding: 5px 10px;
  border-radius: 5px;
  text-decoration: none;
  border-left: 2px solid transparent;
}
.doc-nav a:hover {
  background: var(--bg-soft);
  color: var(--ink);
  text-decoration: none;
}
.doc-nav a.active {
  color: var(--blue);
  background: var(--blue-soft);
  border-left-color: var(--blue);
  font-weight: 600;
}
/* indented sub-links (legal references) */
.nav-indent a {
  padding-left: 22px;
  font-size: 0.78rem;
  color: var(--muted);
}
.nav-indent a.active {
  color: var(--blue);
}

.sidebar-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.sidebar-foot .mono {
  font-size: 0.72rem;
  color: var(--faint);
}

/* mobile toggle */
.nav-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1001;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: var(--shadow);
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

.sidebar-backdrop {
  display: none;
}

/* ============================================================
   Layout — main content offset by sidebar
   ============================================================ */
main {
  margin-left: var(--sidebar-w);
  padding: 40px 32px 72px;
}

.container {
  width: 100%;
  max-width: 760px; /* narrow prose column (~72ch) */
  margin-inline: auto;
}

/* heading markers — README / docs flavour */
main h1::before {
  content: "# ";
  color: var(--faint);
  font-weight: 600;
  margin-right: 0.1em;
}
main h2::before {
  content: "## ";
  color: var(--blue);
  font-weight: 600;
  margin-right: 0.15em;
}
main h3::before {
  content: "### ";
  color: var(--muted);
  font-weight: 600;
  margin-right: 0.15em;
}
.readme-head h1::before {
  color: var(--blue);
}
.cta-band h2::before,
.cta-band h3::before {
  content: none;
}

/* ============================================================
   README home header
   ============================================================ */
.readme-head {
  padding: 8px 0 6px;
  margin-bottom: 30px;
}
.readme-head h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.7rem;
}
.readme-head h1 .accent {
  color: var(--blue);
}
.readme-head .lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 1.2rem;
}
.readme-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ============================================================
   Doc sections
   ============================================================ */
.doc-section {
  margin-top: 52px;
  scroll-margin-top: 24px;
}
.doc-section h2 {
  font-size: 1.32rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line-soft);
}
.doc-section h3 {
  font-size: 1.02rem;
  margin: 1.3rem 0 0.5rem;
}
.doc-section p {
  margin-bottom: 0.9rem;
  max-width: 68ch;
}
.doc-section p + p {
  margin-top: -0.2rem;
}

.doc-list {
  list-style: none;
  margin: 0.4rem 0 1.1rem;
  padding-left: 0;
}
.doc-list li {
  position: relative;
  padding: 7px 0 7px 1.6rem;
  border-bottom: 1px solid var(--line-soft);
  max-width: 70ch;
}
.doc-list li::before {
  content: "·";
  position: absolute;
  left: 0.35rem;
  color: var(--faint);
  font-family: var(--mono);
  font-weight: 700;
}
.doc-list li:last-child {
  border-bottom: 0;
}
.doc-list strong {
  color: var(--ink);
}
.doc-list .idx {
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
}
.doc-list li:has(.idx)::before {
  content: none;
}
.doc-list li:has(.idx) {
  padding-left: 2.6rem;
}
.doc-list .date {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--faint);
  margin-right: 0.4rem;
}
.doc-list.ol {
  list-style: none;
  counter-reset: step;
}
.doc-list.ol li {
  padding-left: 1.6rem;
  counter-increment: step;
}
.doc-list.ol li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--blue);
  font-weight: 700;
  left: 0;
}

/* compact stack list */
.stack {
  list-style: none;
  margin: 0.4rem 0 1.2rem;
}
.stack li {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}
.stack li:last-child {
  border-bottom: 0;
}
.stack .k {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue);
  min-width: 92px;
  text-align: right;
}

/* ============================================================
   Page head (sub-pages)
   ============================================================ */
.page-head {
  padding: 6px 0 28px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  margin: 0.55rem 0 0.7rem;
}
.page-head p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 70ch;
}

.breadcrumb {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--faint);
}
.breadcrumb a {
  color: var(--blue);
}
.breadcrumb .sep {
  opacity: 0.5;
  margin: 0 6px;
}

/* ============================================================
   Sections & layout helpers
   ============================================================ */
.section {
  padding: 34px 0;
  scroll-margin-top: 24px;
}
.section-alt {
  background: transparent;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head {
  max-width: 68ch;
  margin-bottom: 1.6rem;
}
.section-head h2 {
  font-size: 1.26rem;
  margin: 0.45rem 0 0.6rem;
}
.section-head p {
  color: var(--muted);
}
.section-head.center {
  margin-inline: auto;
  text-align: left;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--blue);
  text-transform: uppercase;
}
.section-label::before {
  content: "// ";
  opacity: 0.55;
}

/* grids — flattened to vertical documentation lists */
.grid {
  display: grid;
  gap: 14px;
}
.grid-2,
.grid-3,
.grid-4 {
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* card → documentation panel (flat, no hover lift, no big tiles) */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.card .card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 2px 9px;
  border-radius: 4px;
  margin-bottom: 0.7rem;
}
.card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.45rem;
}
.card p {
  color: var(--muted);
  font-size: 0.92rem;
}
.card .card-link {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 0.9rem;
}
.icon-blue {
  background: var(--blue-soft);
  color: var(--blue-ink);
}
.icon-purple {
  background: var(--purple-soft);
  color: var(--purple-ink);
}
.icon-green {
  background: var(--green-soft);
  color: var(--green-ink);
}
.icon-amber {
  background: var(--amber-soft);
  color: var(--amber);
}

/* badges & tags */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.badge-blue { color: var(--blue-ink); background: var(--blue-soft); border-color: #c5d8f8; }
.badge-purple { color: var(--purple-ink); background: var(--purple-soft); border-color: #ddccf8; }
.badge-green { color: var(--green-ink); background: var(--green-soft); border-color: #bfe6cf; }
.badge-amber { color: var(--amber); background: var(--amber-soft); border-color: #f0d9ae; }
.badge-gray { color: var(--muted); background: var(--bg-soft); border-color: var(--line); }

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
}
.tag-list li {
  font-family: var(--mono);
  font-size: 0.74rem;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-soft);
  background: var(--surface);
}

/* checklist */
.checklist {
  list-style: none;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.checklist li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.checklist li::before {
  content: "✔";
  font-family: var(--mono);
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

/* prose (legal pages) */
.prose {
  color: var(--ink-soft);
}
.prose p { margin-bottom: 1rem; }
.prose h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.8rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line-soft);
}
.prose h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.55rem;
}
.prose ul, .prose ol {
  margin: 0 0 1.2rem 1.4rem;
}
.prose li { margin-bottom: 0.4rem; }
.prose strong { color: var(--ink); }
.prose blockquote {
  border-left: 3px solid var(--blue);
  padding-left: 1rem;
  font-style: italic;
  color: var(--ink);
  margin: 0.8rem 0;
}
.prose .note {
  background: var(--amber-soft);
  border: 1px solid #f0d9ae;
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-size: 0.9rem;
  margin: 1.2rem 0;
}

/* ============================================================
   Code blocks — light, syntax-highlighted terminal
   ============================================================ */
pre.snippet,
.codeblock,
.terminal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.82rem;
  box-shadow: var(--shadow);
  margin: 1rem 0 1.4rem;
}
.terminal {
  margin-top: 0;
}
.terminal-bar,
.codeblock .cb-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.terminal-bar .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-r { background: #f0736a; }
.dot-y { background: #e5b64a; }
.dot-g { background: #53b766; }
.terminal-bar .title {
  margin-left: 10px;
  color: var(--faint);
  font-size: 0.72rem;
  font-family: var(--mono);
}
.terminal-body,
.codeblock pre {
  padding: 16px 18px;
  color: var(--ink-soft);
  line-height: 1.75;
  overflow-x: auto;
  white-space: pre;
}
.codeblock .cb-head {
  color: var(--faint);
  font-size: 0.72rem;
  justify-content: space-between;
  font-family: var(--mono);
}
.codeblock .cb-head .lang,
.cb-head .lang {
  color: var(--blue);
}
/* standalone code-file header used on top of cards (e.g. blog) */
.card > .cb-head {
  background: var(--bg-soft);
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 8px 14px;
  margin: -20px -22px 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
pre.snippet {
  padding: 16px 18px;
  white-space: pre;
  overflow-x: auto;
  line-height: 1.75;
}
pre.snippet code {
  color: var(--ink-soft);
}

/* syntax tokens (light theme — blue/purple/green on light) */
.tk-kw { color: var(--purple-ink); }
.tk-str { color: var(--green-ink); }
.tk-fn { color: var(--blue-ink); }
.tk-var { color: var(--ink); }
.tk-cmt { color: var(--faint); font-style: italic; }
.tk-num { color: var(--amber); }
.tk-prompt { color: var(--green); }
.tk-ok { color: var(--green-ink); }

.inline-code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--purple-ink);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.65rem 1.2rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: var(--blue); }
.btn-accent {
  background: var(--blue);
  color: #fff;
}
.btn-accent:hover { background: var(--blue-ink); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--surface);
}
.btn-green {
  background: var(--green);
  color: #fff;
}
.btn-green:hover { background: var(--green-ink); }

/* ============================================================
   Forms
   ============================================================ */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
}
.field {
  margin-bottom: 1rem;
}
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.field label .req {
  color: var(--red);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.94rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.field .hint {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-success {
  display: none;
  background: var(--green-soft);
  border: 1px solid #bfe6cf;
  border-left: 4px solid var(--green);
  color: var(--green-ink);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-size: 0.92rem;
  margin-bottom: 1.1rem;
}
.form-success.show {
  display: block;
  animation: fadein 0.3s ease;
}
.form-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.9rem;
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Two-col, stats, steps, cta, misc
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: start;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--surface);
  padding: 18px 20px;
}
.stat .stat-value {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.stat .stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  counter-reset: step;
}
.step {
  background: var(--surface);
  padding: 18px 20px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.76rem;
  color: var(--blue);
}
.step h3 {
  font-size: 0.88rem;
  margin: 0.55rem 0 0.35rem;
}
.step p {
  font-size: 0.82rem;
  color: var(--muted);
}

.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 30px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cta-band h2 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}
.cta-band p {
  color: #c3c9d3;
  font-size: 0.92rem;
}
.cta-band .btn { flex-shrink: 0; }

.avatar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.76rem;
  color: #fff;
  background: var(--ink-soft);
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

table.kpis {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
table.kpis th, table.kpis td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
}
table.kpis th {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--bg-soft);
}
table.kpis tr:last-child td {
  border-bottom: 0;
}

/* ============================================================
   Footer — restyled documentation footer (identity text identical)
   ============================================================ */
.site-footer {
  margin-left: var(--sidebar-w);
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}
.site-footer .container {
  max-width: 1080px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 34px;
  padding: 46px 0 34px;
}
.footer-brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.footer-grid p {
  font-size: 0.84rem;
  line-height: 1.6;
}
.footer-grid .mono {
  font-family: var(--mono);
  color: var(--green-ink);
  font-size: 0.78rem;
  margin-top: 0.6rem;
}
.footer-head {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.9rem;
}
.footer-grid ul {
  list-style: none;
}
.footer-grid ul li {
  margin-bottom: 0.5rem;
}
.footer-grid ul a {
  color: var(--ink-soft);
  font-size: 0.86rem;
  text-decoration: none;
}
.footer-grid ul a:hover {
  color: var(--blue);
  text-decoration: underline;
}
.footer-contact a {
  color: var(--ink-soft);
  word-break: break-word;
}
.footer-legal {
  border-top: 1px solid var(--line-soft);
  padding: 20px 0 26px;
  font-size: 0.78rem;
  color: var(--faint);
}
.footer-legal p {
  margin-bottom: 0.35rem;
}
.footer-legal .mono {
  font-family: var(--mono);
}

/* ============================================================
   Cookie banner
   ============================================================ */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  background: var(--ink);
  color: #cdd3dc;
  border: 1px solid #343b46;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 16px 18px;
  max-width: 700px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.cookie-banner[hidden] {
  display: none;
}
.cookie-banner p {
  flex: 1 1 280px;
  font-size: 0.84rem;
}
.cookie-banner a {
  color: #8fd3a9;
}
.cookie-banner .cookie-actions {
  display: flex;
  gap: 8px;
}
.cookie-banner button {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
}
.cb-accept {
  background: var(--blue);
  color: #fff;
}
.cb-accept:hover { background: var(--blue-ink); }
.cb-decline {
  background: transparent;
  color: #cdd3dc;
  border-color: #3c4453 !important;
}
.cb-decline:hover { background: #2a313c; }

/* ============================================================
   Floating "On this page" TOC (scrollspy)
   ============================================================ */
.toc {
  display: none;
}
@media (min-width: 1500px) {
  .toc {
    display: block;
    position: fixed;
    top: 96px;
    right: 30px;
    width: var(--toc-w);
    z-index: 700;
    font-family: var(--mono);
  }
  .toc-title {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: 8px;
  }
  .toc ul {
    list-style: none;
    border-left: 1px solid var(--line);
  }
  .toc a {
    display: block;
    font-size: 0.74rem;
    color: var(--muted);
    padding: 3px 0 3px 12px;
    text-decoration: none;
    border-left: 2px solid transparent;
    margin-left: -1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .toc a:hover {
    color: var(--ink);
  }
  .toc a.current {
    color: var(--blue);
    border-left-color: var(--blue);
    font-weight: 600;
  }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar-inner {
    padding-top: 72px;
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  main,
  .site-footer {
    margin-left: 0;
  }
  .nav-toggle {
    display: flex;
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(27, 31, 39, 0.4);
    z-index: 790;
  }
  body.sidebar-open .sidebar-backdrop {
    display: block;
  }
  main {
    padding-top: 72px;
  }
}

@media (max-width: 760px) {
  main {
    padding: 72px 20px 48px;
  }
  .grid-2,
  .grid-3,
  .grid-4,
  .stats,
  .steps,
  .form-row {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .cta-band {
    padding: 26px 24px;
  }
  .section {
    padding: 28px 0;
  }
}

@media (min-width: 761px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
  .steps {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
