/* ETTIX STREAM built-in operator documentation.

   One stylesheet, no framework, no build step, and no script anywhere:
   the administration listener's Content-Security-Policy is script-src
   'none' for these pages, and documentation that needs a bundler is
   documentation that stops building in three years.

   The palette is the administration interface's, so moving between the
   console and the manual does not feel like leaving the product. */
:root {
  color-scheme: dark light;
  --bg: #0e1116; --panel: #161b22; --panel-2: #1c2230; --line: #2a3140;
  --fg: #e6edf3; --muted: #8b96a5; --accent: #4c8dff;
  --ok: #3fb950; --warn: #d29922; --err: #f85149;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: light) {
  :root { --bg:#f6f8fa; --panel:#fff; --panel-2:#f0f3f6; --line:#d6dde5;
          --fg:#1f2328; --muted:#5a6472; }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.65 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Navigation across the top, wrapping on a narrow screen rather than
   scrolling sideways: this gets read on a phone next to a rack. */
.docnav {
  display: flex; flex-wrap: wrap; gap: .25rem .5rem;
  padding: .75rem 1.25rem; border-bottom: 1px solid var(--line);
  background: var(--panel); position: sticky; top: 0; z-index: 5;
}
.docnav a {
  padding: .3rem .6rem; border-radius: 6px; color: var(--muted);
  white-space: nowrap;
}
.docnav a:hover { background: var(--panel-2); color: var(--fg); text-decoration: none; }
.docnav a.here { background: var(--accent); color: #fff; }
/* The last link leaves the manual for the live console. */
.docnav a:last-child { margin-left: auto; border: 1px solid var(--line); }

main, body > :not(.docnav) { max-width: 52rem; margin: 0 auto; padding: 0 1.25rem; }
main { padding-bottom: 4rem; }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 1.6rem 0 .4rem; }
h2 { font-size: 1.35rem; margin: 2.2rem 0 .5rem; padding-top: .6rem; border-top: 1px solid var(--line); }
h3 { font-size: 1.08rem; margin: 1.5rem 0 .4rem; }
h1 + p, h2 + p, h3 + p { margin-top: .3rem; }
p, li { max-width: 46rem; }
ul, ol { padding-left: 1.4rem; }
li { margin: .3rem 0; }

code {
  font-family: var(--mono); font-size: .9em;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 4px; padding: .08em .35em;
}
pre.cmd {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 6px; padding: .8rem 1rem; overflow-x: auto; margin: .8rem 0;
}
pre.cmd code { background: none; border: 0; padding: 0; font-size: .88rem; line-height: 1.55; }

kbd {
  font-family: var(--mono); font-size: .85em; padding: .1em .4em;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px;
  background: var(--panel-2);
}

/* Numbered steps. The number is drawn by CSS so the markup stays plain
   and the text stays copy-pasteable. */
.step {
  counter-increment: step; position: relative;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); padding: 1rem 1.1rem .9rem 3.2rem; margin: 1rem 0;
}
.step::before {
  content: counter(step); position: absolute; left: 1rem; top: 1rem;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: .85rem;
}
body { counter-reset: step; }
.step > :first-child { margin-top: 0; }
.step > :last-child { margin-bottom: 0; }
.step h3 { margin-top: 0; }

/* Callouts, in increasing order of how much attention they demand. */
.note, .warn, .danger {
  border: 1px solid var(--line); border-left-width: 3px;
  border-radius: 6px; padding: .75rem 1rem; margin: 1rem 0; background: var(--panel);
}
.note { border-left-color: var(--accent); }
.warn { border-left-color: var(--warn); }
.danger { border-left-color: var(--err); }
.note > :first-child, .warn > :first-child, .danger > :first-child { margin-top: 0; }
.note > :last-child, .warn > :last-child, .danger > :last-child { margin-bottom: 0; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .93rem; }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
td code { white-space: nowrap; }

.muted { color: var(--muted); }
footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

@media (max-width: 40rem) {
  .docnav { padding: .6rem .8rem; }
  .docnav a:last-child { margin-left: 0; }
  main, body > :not(.docnav) { padding: 0 .9rem; }
  .step { padding-left: 2.9rem; }
}
