/* soli-one documentation.
   The visual idea: many small things resolving into one. Node dots in the
   sidebar converge on a single ring; the accent is used only where the docs
   claim something is real today. */

:root {
  --bg: #0b0d10;
  --panel: #111419;
  --line: #1e242c;
  --ink: #d7dee6;
  --ink-dim: #8794a3;
  --ink-faint: #5a6673;
  --accent: #4ee39a;
  --accent-dim: #1f6f4b;
  --amber: #e3b04e;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body.docs {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.shell { display: flex; min-height: 100vh; }

/* ---------- sidebar ---------- */

.side {
  width: 264px;
  flex: 0 0 264px;
  border-right: 1px solid var(--line);
  padding: 28px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.brand { display: block; text-decoration: none; margin-bottom: 22px; }
.brand-name {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand-name .tld { color: var(--accent); }
.brand-sub {
  display: block;
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 2px;
}

/* three nodes resolving onto one ring */
.cluster {
  position: relative;
  height: 54px;
  margin: 4px 0 22px;
}
.cluster .ring {
  position: absolute;
  left: 50%; top: 50%;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid var(--accent-dim);
  border-radius: 50%;
}
.cluster .dot {
  position: absolute;
  top: 50%;
  width: 5px; height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
  animation: converge 3.6s ease-in-out infinite;
}
.cluster .d1 { left: 8%; }
.cluster .d2 { left: 8%; animation-delay: 1.2s; }
.cluster .d3 { left: 8%; animation-delay: 2.4s; }

@keyframes converge {
  0%   { left: 8%;  opacity: 0; }
  20%  { opacity: 0.9; }
  70%  { left: 46%; opacity: 0.9; }
  100% { left: 46%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cluster .dot { animation: none; left: 46%; }
}

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 5px;
  text-decoration: none;
  color: var(--ink-dim);
  font-size: 14px;
  border-left: 2px solid transparent;
}
.nav a:hover { background: var(--panel); color: var(--ink); }
.nav a.on {
  background: var(--panel);
  color: var(--ink);
  border-left-color: var(--accent);
}
.nav .idx {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.nav a.on .idx { color: var(--accent); }

.side-foot {
  margin-top: auto;
  padding-top: 22px;
  font-size: 12px;
  color: var(--ink-faint);
}
.side-foot p { margin: 3px 0; }
.side-foot a { color: var(--ink-dim); }

/* ---------- main ---------- */

.main { flex: 1; min-width: 0; padding: 0 0 96px; }

.topbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 40px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(11, 13, 16, 0.92);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.chip {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.led {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
  display: inline-block;
}
.topbar .spacer { flex: 1; }

article { max-width: 820px; padding: 34px 40px 0; }

h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  font-weight: 600;
}
.lede { color: var(--ink-dim); font-size: 17px; margin: 0 0 30px; }

h2 {
  font-size: 19px;
  margin: 38px 0 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
h3 { font-size: 15px; margin: 24px 0 8px; font-weight: 600; }

p { margin: 0 0 14px; }
a { color: var(--accent); }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin: 5px 0; }

code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}
pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 18px;
}
pre code { background: none; border: 0; padding: 0; font-size: 12.5px; line-height: 1.6; }

/* What a command printed, as opposed to the command.
   On a transcript page the two alternate, and a reader who cannot tell them
   apart at a glance will copy an output line into a terminal. Recessed rather
   than highlighted: this is evidence, not an instruction — so no left accent
   bar, which the theme reserves for things you act on. */
pre.out {
  background: transparent;
  border-style: dashed;
  color: var(--ink-dim);
}
pre.out code { color: var(--ink-dim); }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}
th, td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { color: var(--ink-faint); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

/* Status callouts. The whole docs site distinguishes what runs today from
   what is designed — mislabelling that is how a landing page ends up
   advertising commands that do not exist. */
.note {
  border-left: 2px solid var(--accent);
  background: var(--panel);
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  margin: 0 0 18px;
}
.note.planned { border-left-color: var(--amber); }
.note .tag {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}
.note.planned .tag { color: var(--amber); }
.note p:last-child { margin-bottom: 0; }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: auto; flex: none; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--line); }
  .cluster { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  article, .topbar { padding-left: 20px; padding-right: 20px; }
}

/* Diagrams.
   Inline SVG rather than an image file: it inherits the palette through
   `currentColor` and the custom properties below, so a theme change never
   leaves a diagram behind looking like it belongs to a different site. */
.diagram {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 18px 16px 12px;
  margin: 0 0 18px;
  /* Wide diagrams scroll inside their own box; the page body never does. */
  overflow-x: auto;
}
.diagram svg {
  display: block;
  width: 100%;
  height: auto;
  /* Below this the labels collide and the diagram stops being one. */
  min-width: 460px;
}
.diagram figcaption {
  margin-top: 10px;
  color: var(--ink-dim);
  font-size: 12.5px;
  line-height: 1.5;
}
.diagram .box { fill: var(--bg); stroke: var(--line); }
.diagram .box-accent { fill: var(--bg); stroke: var(--accent-dim); }
.diagram .box-warn { fill: var(--bg); stroke: var(--amber); }
.diagram .label { fill: var(--ink); font-family: var(--sans); font-size: 12px; }
.diagram .label-mono { fill: var(--ink); font-family: var(--mono); font-size: 11px; }
.diagram .label-dim { fill: var(--ink-dim); font-family: var(--sans); font-size: 11px; }
.diagram .label-accent { fill: var(--accent); font-family: var(--sans); font-size: 11px; }
.diagram .label-warn { fill: var(--amber); font-family: var(--sans); font-size: 11px; }
.diagram .wire { stroke: var(--ink-faint); fill: none; }
.diagram .wire-accent { stroke: var(--accent-dim); fill: none; }
.diagram .wire-warn { stroke: var(--amber); fill: none; }
.diagram .wire-dashed { stroke-dasharray: 4 3; }
