/* ============================================================================
   silab.securytik.com — marketing + docs
   ----------------------------------------------------------------------------
   SILAB's pages are SAMM's pages with SILAB's words: the home page uses the
   shared marketing primitives (ecosystem.css) plus samm-marketing.css, and the
   docs page is SAMM's /docs manual. SAMM keeps its docs styles inline in
   services/samm_web/templates/docs.html; they are copied here once so the home
   page's install terminals and the docs share one set of rules.

   Tokens only (themes.css), logical properties for anything new. Loaded by
   services/silab_web/templates/_marketing_base.html — bump its ?v= on edit.
   ============================================================================ */

/* ════════════════════════════════════════════════════════════════════
   Docs — operator manual: sticky sidebar menu + tabbed panels.
   Scoped to .docs; consumes only theme tokens so light + dark both work.
   ════════════════════════════════════════════════════════════════════ */
.docs {
  --docs-grad: linear-gradient(120deg, var(--info) 0%, var(--primary) 52%, var(--violet) 100%);
  max-width: 1200px; margin: 0 auto;
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.docs-hero { position: relative; text-align: center; overflow: hidden;
  margin: 0 0 22px; padding: 32px 24px 34px;
  border: 1px solid var(--border); border-radius: 22px;
  background:
    radial-gradient(ellipse 620px 300px at 50% -10%, color-mix(in srgb, var(--primary) 17%, transparent), transparent 70%),
    radial-gradient(ellipse 460px 240px at 88% 6%, color-mix(in srgb, var(--violet) 14%, transparent), transparent 72%),
    var(--bg-elev); }
.docs-hero::before { content: ""; position: absolute; inset: 0 0 auto 0;
  height: 3px; background: var(--docs-grad); }
.docs-hero__eyebrow { display: inline-flex; align-items: center; gap: 7px;
  margin: 0 0 15px; padding: 5px 13px 5px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--bg-elev));
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent); }
.docs-hero__eyebrow svg { width: 14px; height: 14px; }
.docs-hero h1 { font-size: clamp(30px, 4.4vw, 43px); line-height: 1.1;
  letter-spacing: -.022em; font-weight: 800; margin: 0 0 12px; color: var(--fg); }
.docs-hero__brand { background: var(--docs-grad); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.docs-hero__sub { font-size: 16px; line-height: 1.6; color: var(--fg-muted);
  margin: 0 auto; max-width: 64ch; }
.docs-hero__meta { display: flex; flex-wrap: wrap; justify-content: center;
  gap: 9px; margin: 19px 0 0; }
.docs-hero__meta span { display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--fg-muted);
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px; }
.docs-hero__meta svg { width: 13px; height: 13px; color: var(--primary); }

/* ── "What is SILAB?" — definitional block, inset into the hero ───────── */
.docs-hero .tldr { max-width: 660px; margin: 16px auto 2px; text-align:start;
  padding: 13px 16px 13px 17px; border-radius: 11px;
  border: 1px solid var(--border); border-left: 3px solid var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--bg-elev-2));
  font-size: 13.6px; line-height: 1.6; color: var(--fg-muted); }
.docs-hero .tldr__label { display: block; margin: 0 0 5px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .085em;
  text-transform: uppercase; color: var(--primary); }
.docs-hero .tldr a { color: var(--primary); font-weight: 600; }

/* ── Quick install — split panel with a terminal window ──────────────── */
.docs-quickstart { display: grid; grid-template-columns: 1fr 1.05fr; gap: 24px;
  align-items: center; margin: 0 auto 30px; padding: 24px;
  border: 1px solid var(--border); border-radius: 18px;
  background: var(--bg-elev); box-shadow: var(--shadow-sm); }
.docs-quickstart__label { display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 12px; padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 13%, transparent); }
.docs-quickstart__title { font-size: 21px; font-weight: 800; letter-spacing: -.012em;
  line-height: 1.25; color: var(--fg); margin: 0 0 8px; }
.docs-quickstart__lead { font-size: 14px; line-height: 1.62; color: var(--fg-muted);
  margin: 0 0 15px; }
.docs-quickstart__link { display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 700; color: var(--primary); text-decoration: none; }
.docs-quickstart__link svg { width: 15px; height: 15px; transition: transform .15s ease; }
.docs-quickstart__link:hover { text-decoration: underline; }
.docs-quickstart__link:hover svg { transform: translateX(3px); }

/* Terminal window — wraps the install one-liner */
.docs-terminal { border: 1px solid var(--border-strong); border-radius: 12px;
  overflow: hidden; background: var(--bg-elev-2); box-shadow: var(--shadow); }
.docs-terminal__bar { display: flex; align-items: center; gap: 7px;
  padding: 9px 13px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--fg) 5%, var(--bg-elev-2)); }
.docs-terminal__dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.docs-terminal__dot:nth-child(1) { background: #ef4d4d; }
.docs-terminal__dot:nth-child(2) { background: #f5b428; }
.docs-terminal__dot:nth-child(3) { background: #28c244; }
.docs-terminal__name { margin-left: 6px; font-family: 'Fira Code', monospace;
  font-size: 11.5px; color: var(--fg-dim); }
.docs-terminal .docs-pre { margin: 0; }
.docs-terminal pre { margin: 0; border: 0; border-radius: 0; background: transparent;
  color: var(--fg); padding: 15px 16px; overflow-x: auto;
  font-family: 'Fira Code', monospace; font-size: 12.6px; line-height: 1.6; }

.docs-shell { display: flex; gap: 30px; align-items: flex-start; }
#docs-top { scroll-margin-top: 80px; }

/* ── Sidebar menu ───────────────────────────────────────────────────── */
.docs-sidebar { flex: 0 0 250px; position: sticky; top: 78px; align-self: flex-start;
  display: flex; flex-direction: column; max-height: calc(100vh - 96px);
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--bg-elev); box-shadow: var(--shadow-sm); overflow: hidden; }
.docs-sidebar__head { flex: none; padding: 14px 14px 11px;
  border-bottom: 1px solid var(--border); }
.docs-sidebar__title { font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .09em; color: var(--fg-dim); margin: 0 0 9px; }
.docs-search { position: relative; }
.docs-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--fg-dim); pointer-events: none; }
.docs-filter { width: 100%; box-sizing: border-box; padding: 8px 11px 8px 32px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--bg-elev-2);
  color: var(--fg); font: inherit; font-size: 13px;
  transition: border-color .12s, box-shadow .12s; }
.docs-filter::placeholder { color: var(--fg-dim); }
.docs-filter:focus { outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring); }
.docs-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1px; padding: 8px; scrollbar-width: thin; }
.docs-nav__group { display: flex; align-items: center; gap: 7px;
  margin: 14px 0 4px; padding: 0 9px; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; color: var(--fg-dim); }
.docs-nav__group::before { content: ""; width: 5px; height: 5px; flex: none;
  border-radius: 50%; background: var(--docs-grad); }
.docs-nav__group:first-child { margin-top: 2px; }
.docs-nav__group.is-hidden { display: none; }
.docs-nav__link { position: relative; display: block; padding: 7px 11px;
  border-radius: 8px; font-size: 13.5px; color: var(--fg-muted);
  text-decoration: none; transition: background .12s, color .12s; }
.docs-nav__link:hover { background: var(--bg-elev-2); color: var(--fg); }
.docs-nav__link.is-active { font-weight: 700; color: var(--primary);
  background: color-mix(in srgb, var(--primary) 11%, transparent); }
.docs-nav__link.is-active::before { content: ""; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%); width: 3px; height: 17px;
  border-radius: 0 3px 3px 0; background: var(--docs-grad); }
.docs-nav__link.is-hidden { display: none; }
.docs-nav__link--sub { padding-inline-start: 26px; font-size: 12.8px; }
.docs-nav__link--sub::after { content: ""; position: absolute;
  inset-inline-start: 13px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--fg-dim); }

/* Install-option cards on the Installation overview */
.docs-optgrid { list-style: none; margin: 16px 0 6px; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr)); gap: 12px; }
.docs-optgrid li { margin: 0; padding: 0; }
.docs-optcard { display: flex; gap: 13px; align-items: flex-start; height: 100%;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 13px;
  background: var(--bg-elev); text-decoration: none; color: var(--fg-muted);
  transition: border-color .15s, transform .15s, box-shadow .15s; }
.docs-optcard:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  transform: translateY(-2px);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 13%, transparent); }
.docs-optcard__k { flex: none; width: 31px; height: 31px; border-radius: 9px;
  display: grid; place-items: center; font-weight: 800; font-size: 14.5px;
  color: #fff; background: var(--docs-grad); box-shadow: var(--shadow-sm); }
.docs-optcard strong { display: block; color: var(--fg); font-size: 14px;
  line-height: 1.3; margin-bottom: 4px; }
.docs-optcard__d { display: block; font-size: 12.8px; line-height: 1.55; }
/* beat the generic .docs-panel link/list styling inside the cards */
.docs-panel .docs-optgrid li { padding: 0; margin: 0; }
.docs-panel .docs-optgrid li::before,
.docs-panel .docs-optgrid li::marker { content: none; display: none; }
.docs-panel a.docs-optcard,
.docs-panel a.docs-optcard:hover { text-decoration: none; }
.docs-panel a.docs-optcard .docs-optcard__d { color: var(--fg-muted);
  text-decoration: none; }

.docs-nav__empty { display: none; padding: 16px 11px; text-align: center;
  font-size: 12.5px; color: var(--fg-dim); }
.docs-nav__empty.is-shown { display: block; }

/* ── Content panels ─────────────────────────────────────────────────── */
.docs-content { flex: 1 1 auto; min-width: 0; }
html.docs-js .docs-panel:not(.is-active) { display: none; }
.docs-panel { animation: docsFade .26s ease both; }
@keyframes docsFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.docs-panel__eyebrow { display: inline-block; margin: 0 0 12px;
  padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent); }
.docs-panel h2 { font-size: clamp(24px, 3.1vw, 30px); line-height: 1.18;
  letter-spacing: -.02em; font-weight: 800; margin: 0 0 9px; color: var(--fg); }
.docs-panel > h2 + p { font-size: 15.5px; color: var(--fg-muted); }
.docs-panel h3 { display: flex; align-items: center; gap: 9px;
  font-size: 18px; font-weight: 700; color: var(--fg); margin: 30px 0 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.docs-panel h3::before { content: ""; width: 4px; height: 16px; flex: none;
  border-radius: 3px; background: var(--docs-grad); }
.docs-panel h4 { font-size: 14.5px; font-weight: 700; color: var(--fg); margin: 22px 0 8px; }
/* No typographic measure here. The panel already sits inside .docs, which
   caps at 1200px, so 74ch was a SECOND and tighter cap — it stopped text at
   ~870px while the alert boxes, code blocks and tables beside it ran the full
   width. The result read as ragged short lines against full-width furniture,
   and made every page taller than it needed to be. */
.docs-panel p { margin: 0 0 13px; color: var(--fg-muted); line-height: 1.72; max-width: 100%; }
.docs-panel ul, .docs-panel ol:not(.docs-steps) { margin: 0 0 14px; padding-inline-start: 4px;
  list-style: none; color: var(--fg-muted); line-height: 1.72; max-width: 100%; }
.docs-panel li { position: relative; margin-bottom: 7px; padding-inline-start: 23px; }
.docs-panel ul > li::before { content: ""; position: absolute; inset-inline-start: 5px; top: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 55%, var(--border)); }
.docs-panel ol:not(.docs-steps) { counter-reset: li; }
.docs-panel ol:not(.docs-steps) > li { counter-increment: li; }
.docs-panel ol:not(.docs-steps) > li::before { content: counter(li);
  position: absolute; inset-inline-start: 0; top: 1px; width: 17px; height: 17px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 800; color: var(--primary); border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 15%, transparent); }
.docs-panel a { color: var(--primary); font-weight: 600; text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--primary) 35%, transparent);
  text-underline-offset: 2px; }
.docs-panel a:hover { text-decoration-color: var(--primary); }
.docs-panel strong { color: var(--fg); font-weight: 700; }
.docs-panel code { font-family: 'Fira Code', monospace; font-size: .85em;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: 5px; padding: 1.5px 5px; color: var(--fg); }
.docs-panel pre { margin: 0; padding: 15px 17px; overflow-x: auto;
  background: var(--bg-elev-2); color: var(--fg);
  border: 1px solid var(--border); border-radius: 11px;
  font-family: 'Fira Code', monospace; font-size: 12.6px; line-height: 1.7;
  /* Wrap long commands (curl one-liners, URLs) instead of running off the
     screen on mobile. pre-wrap keeps intentional line breaks; overflow-wrap
     breaks over-long tokens only when there's no space to wrap at. Wrapping
     is visual only — copied text keeps its exact single-line form. */
  white-space: pre-wrap; overflow-wrap: anywhere; }
.docs-panel pre code { background: none; border: 0; padding: 0;
  color: inherit; font-size: inherit; }
.docs-panel td code, .docs-panel p code, .docs-panel li code { overflow-wrap: anywhere; }
.docs-panel hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }

/* Copyable command block — JS wraps each <pre> in .docs-pre */
.docs-pre { position: relative; margin: 0 0 15px; }
/* Physical, not logical: the box is forced LTR in every language, so the
   Copy button sits top-right always and the padding that clears it must
   be on the right too. */
.docs-pre pre { margin: 0; padding-right: 82px; }
.docs-pre__copy { position: absolute; top: 9px; right: 9px; font: inherit;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 5px 11px;
  border-radius: 7px; cursor: pointer;
  background: var(--bg-elev); color: var(--fg-muted);
  border: 1px solid var(--border-strong);
  transition: background .12s, color .12s, border-color .12s, transform .12s; }
.docs-pre__copy:hover { background: var(--primary); color: #fff;
  border-color: var(--primary); transform: translateY(-1px); }
.docs-pre__copy:active { transform: translateY(0); }
.docs-pre__copy.is-done { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Long blocks are clipped to the first 10 lines with a "show all" toggle.
   The full docker-compose.yml is ~90 lines; printed in full it pushed the
   rest of the page below three screens of YAML that nobody reads inline —
   they press Copy. 10 lines is enough to recognise the file.

   Clip height is 10 lines at the pre's own line-height (1.7) plus its top
   padding, so the cut always lands ON a line boundary rather than slicing
   one in half. The fade makes it obvious there is more, without needing to
   read the button. */
.docs-pre.is-clipped pre { max-height: calc(10 * 1.7em + 15px); overflow: hidden; }
.docs-pre.is-clipped::after {
  content: ''; position: absolute; left: 1px; right: 1px; bottom: 1px; height: 62px;
  border-radius: 0 0 11px 11px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg-elev-2));
}
.docs-pre__more { display: block; width: 100%; margin-top: -1px; font: inherit;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em; padding: 7px 11px;
  border-radius: 0 0 11px 11px; cursor: pointer; text-align: center;
  background: var(--bg-elev); color: var(--fg-muted);
  border: 1px solid var(--border); border-top: 0;
  transition: background .12s, color .12s; }
.docs-pre__more:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Command boxes stay LTR even on Arabic pages — shell commands look
   broken when right-aligned, and would also reorder around any embedded
   URLs / quoted strings due to bidi mirroring. Covers both .docs-panel
   (regular code blocks) and .docs-terminal (fake-terminal style). */
[dir="rtl"] .docs-panel pre,
[dir="rtl"] .docs-panel pre code,
[dir="rtl"] .docs-terminal pre,
[dir="rtl"] .docs-terminal pre code {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

/* Inline process flow — replaces ASCII-art diagrams */
.docs-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 7px;
  margin: 0 0 16px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--primary) 4%, var(--bg-elev-2)); }
.docs-flow__step { font-size: 12.8px; font-weight: 700; color: var(--fg);
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 11px; }
.docs-flow__arrow { color: var(--primary); font-weight: 800; }

/* Tables */
.docs-panel table { width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 0 0 16px; font-size: 13.4px; border: 1px solid var(--border);
  border-radius: 11px; overflow: hidden; }
.docs-panel th, .docs-panel td { padding: 9px 13px; text-align:start;
  vertical-align: top; border-bottom: 1px solid var(--border); }
.docs-panel tr:last-child td { border-bottom: 0; }
.docs-panel th { background: var(--bg-elev-2); font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; color: var(--fg-dim); white-space: nowrap; }
.docs-panel td { color: var(--fg-muted); }
.docs-panel tr:hover td { background: color-mix(in srgb, var(--primary) 4%, transparent); }

/* Menu-path chip — e.g. System -> License */
.docs-path { display: inline; font-weight: 700; color: var(--fg);
  background: var(--bg-elev-2); border: 1px solid var(--border-strong);
  border-radius: 6px; padding: 1.5px 7px; font-size: .88em; white-space: nowrap; }

/* Callouts */
.docs-cl { margin: 0 0 16px; padding: 12px 15px; border-radius: 10px;
  font-size: 13.5px; line-height: 1.64; color: var(--fg-muted);
  border: 1px solid var(--border); border-left-width: 3px; }
.docs-cl strong { color: var(--fg); }
.docs-cl__label { display: block; margin-bottom: 3px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em; }
.docs-cl--note { border-left-color: var(--info);
  background: color-mix(in srgb, var(--info) 7%, var(--bg-elev)); }
.docs-cl--note .docs-cl__label { color: var(--info); }
.docs-cl--tip { border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--bg-elev)); }
.docs-cl--tip .docs-cl__label { color: var(--accent); }
.docs-cl--warn { border-left-color: var(--warn);
  background: color-mix(in srgb, var(--warn) 9%, var(--bg-elev)); }
.docs-cl--warn .docs-cl__label { color: var(--warn); }
/* Destructive / irreversible actions — loudest callout we have. */
.docs-cl--danger { border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  border-left-color: var(--danger); border-left-width: 4px;
  background: color-mix(in srgb, var(--danger) 11%, var(--bg-elev)); }
.docs-cl--danger .docs-cl__label { color: var(--danger); }
.docs-cl--danger strong { color: var(--danger); }

/* Numbered step list */
.docs-steps { counter-reset: step; list-style: none; padding: 0;
  margin: 0 0 16px; max-width: 100%; }
.docs-steps > li { position: relative; padding: 3px 0 0; padding-inline-start: 42px;
  margin-bottom: 14px;
  min-height: 28px; color: var(--fg-muted); line-height: 1.66; }
.docs-steps > li::before { counter-increment: step; content: counter(step);
  position: absolute; inset-inline-start: 0; top: 0; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px; background: var(--docs-grad); color: #fff;
  font-size: 13px; font-weight: 800;
  box-shadow: 0 3px 8px color-mix(in srgb, var(--primary) 30%, transparent); }

/* Feature card grid */
.docs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 13px; margin: 4px 0 16px; }
.docs-card { position: relative; overflow: hidden; padding: 15px 16px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elev);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.docs-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--docs-grad); transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.22,1,.36,1); }
.docs-card:hover { transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
  box-shadow: var(--shadow); }
.docs-card:hover::before { transform: scaleX(1); }
.docs-card h4 { margin: 0 0 5px; font-size: 14px; color: var(--fg); }
.docs-card p { margin: 0; font-size: 12.8px; line-height: 1.6; max-width: none; }

/* Pager */
.docs-pager { display: flex; gap: 13px; margin-top: 36px; padding-top: 22px;
  border-top: 1px solid var(--border); }
.docs-pager__btn { flex: 1 1 0; display: flex; flex-direction: column; gap: 3px;
  padding: 13px 16px; border: 1px solid var(--border); border-radius: 12px;
  text-decoration: none; background: var(--bg-elev);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.docs-pager__btn:hover { transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  box-shadow: var(--shadow-sm); }
.docs-pager__btn span { font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: var(--fg-dim); }
.docs-pager__btn strong { color: var(--fg); font-size: 14.5px; font-weight: 700; }
.docs-pager__btn--next { text-align:end; }
.docs-pager__spacer { flex: 1 1 0; }

@media (prefers-reduced-motion: reduce) {
  .docs-panel { animation: none; }
  .docs-card, .docs-card::before, .docs-pager__btn,
  .docs-pre__copy, .docs-quickstart__link svg { transition: none; }
  .docs-card:hover, .docs-pager__btn:hover { transform: none; }
  .docs-card:hover::before { transform: scaleX(1); }
}

/* Responsive — sidebar stacks above content */
@media (max-width: 940px) {
  .docs-quickstart { grid-template-columns: 1fr; }
  .docs-shell { flex-direction: column; gap: 16px; }
  .docs-sidebar { position: static; width: 100%; flex: none; max-height: none; }
  .docs-nav { max-height: 340px; }
}
@media (max-width: 560px) {
  .docs-hero { padding: 26px 16px 28px; }
  .docs-quickstart { padding: 18px; }
  .docs-panel pre { font-size: 11.6px; padding: 13px 14px; }
  .docs-pre pre { padding-right: 60px; }
  .docs-pre__copy { top: 7px; right: 7px; padding: 4px 8px; font-size: 10px; }
  .docs-panel table { font-size: 12.4px; }
  .docs-panel th, .docs-panel td { padding: 8px 9px; }
}
/* First-login credentials — one compact green banner with URL / username /
   password inline, so they can't be misread. Wraps on narrow screens. */
.docs .cred-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  padding: 10px 14px; margin: 12px 0; border-radius: 9px;
  background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.30);
  font-size: 13px;
}
.docs .cred-banner .cred-item { display: inline-flex; align-items: baseline; gap: 7px; }
.docs .cred-banner .cred-label {
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; color: var(--accent);
}
.docs .cred-banner .cred-value {
  font-family: 'Fira Code', monospace; font-size: 13px; font-weight: 700;
  color: var(--fg); word-break: break-all;
}
.docs .cred-banner .cred-sep { color: rgba(16,185,129,.5); user-select: none; }
.docs .cred-note { font-size: 12.5px; color: var(--fg-muted); margin: 0 0 14px; }


/* ════════════════════════════════════════════════════════════════════
   Home — the two install one-liners (Linux + Windows), SAMM's terminal
   window from the docs quick-install, one card per platform.
   ════════════════════════════════════════════════════════════════════ */
.silab-install {
  --docs-grad: linear-gradient(120deg, var(--info) 0%, var(--primary) 52%, var(--violet) 100%);
  max-width: 1180px; margin: 0 auto;
}
.silab-install__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px; text-align: start; }
.silab-install__card { position: relative; display: flex; flex-direction: column; gap: 12px;
  min-width: 0; padding: 22px; overflow: hidden;
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow-sm); }
.silab-install__card::before { content: ""; position: absolute; inset: 0 0 auto 0;
  height: 3px; background: var(--docs-grad); }
.silab-install__head { display: flex; align-items: center; gap: 12px; }
.silab-install__os { flex: none; width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 26%, transparent); }
.silab-install__os svg { width: 20px; height: 20px; }
.silab-install__title { margin: 0; font-size: 17px; font-weight: 800; color: var(--fg); }
.silab-install__sub { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--fg-muted); }
.silab-install__label { margin: 4px 0 0; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em; color: var(--fg-dim); }
/* Right padding clears the Copy button (physical: the box is LTR in every
   language, same as .docs-pre pre). */
.silab-install__fallback pre { margin: 0; padding: 11px 82px 11px 13px; overflow-x: auto;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-elev-2); color: var(--fg-muted);
  font-family: 'Fira Code', monospace; font-size: 12px; line-height: 1.6; }
.silab-install__fallback .docs-pre { margin: 0; }
.silab-install__note { margin: 0; font-size: 12.8px; line-height: 1.6; color: var(--fg-muted); }
.silab-install__note a { color: var(--primary); font-weight: 600; }
/* Commands wrap instead of scrolling sideways on a phone. Visual only: the
   copied text keeps its exact one-line form. */
.silab-install pre, .docs-terminal pre { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Shell and PowerShell stay LTR on Arabic / Persian pages. */
[dir="rtl"] .silab-install pre { direction: ltr; text-align: left; unicode-bidi: isolate; }
@media (max-width: 900px) {
  .silab-install__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .silab-install__card { padding: 18px 16px; }
  .silab-install__fallback pre { font-size: 11.4px; padding-right: 60px; }
}

/* Docs quick-install holds two terminals (Linux over Windows). */
.docs-quickstart__terms { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Home — a topology mock inside .split__visual, drawn in SVG with tokens. */
.silab-topo { width: 100%; height: auto; display: block; }
.silab-topo text { font-family: 'Fira Sans', sans-serif; }
.silab-menu { align-self: flex-start; min-width: 190px; padding: 6px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--bg-elev); box-shadow: var(--shadow); font-size: 12.5px; }
.silab-menu__item { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 6px 10px; border-radius: 6px; color: var(--fg); }
.silab-menu__item span { color: var(--fg-dim); font-family: 'Fira Code', monospace; font-size: 11px; }
.silab-menu__item.is-hover { background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary); font-weight: 600; }
.silab-menu__sep { height: 1px; margin: 4px 6px; background: var(--border); }

/* GitHub-blocked mirror note under an install command (SAMM docs pattern). */
.docs-mirror-note { margin: 12px 0 8px; font-size: 13.5px; color: var(--fg-muted); }
.docs-mirror-note strong { color: var(--danger); }

/* Sova features: framed panel screenshot. */
.sova-shot { max-width: 1080px; margin: 18px auto 26px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: var(--bg-elev); }
.sova-shot__bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev) 85%, var(--primary) 4%); }
.sova-shot__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.sova-shot__bar em { margin-inline-start: 8px; font-style: normal; font-size: 12px; color: var(--fg-dim); }
.sova-shot img { display: block; width: 100%; height: auto; }
