/* shabadoo.shabadu.us — one stylesheet, no build step.
   The project is stdlib-only with no toolchain; its site should not need npm
   to render a paragraph. */

:root {
  --bg: #0b1017;
  --panel: #111823;
  --line: #1d2735;
  --line2: #2a3547;
  --fg: #dce6f2;
  --dim: #7f8ea3;
  --faint: #5a6879;
  --accent: #5b9dff;
  --accent2: #7fd1c8;
  --warn: #e6b850;
  --ok: #63c78b;
  --danger: #e2695f;
  --radius: 8px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 46rem; }

a { color: var(--accent); text-decoration-color: rgba(91, 157, 255, .35); }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent2); outline-offset: 2px; border-radius: 3px;
}

/* ---- header ---- */
header.top {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 16, 23, .85);
  backdrop-filter: blur(8px);
}
header.top .wrap {
  display: flex; align-items: center; gap: 1.25rem;
  padding-top: .85rem; padding-bottom: .85rem;
}
.brand {
  font-weight: 800; letter-spacing: -.02em; font-size: 1.05rem;
  color: var(--fg); text-decoration: none;
}
.brand span { color: var(--accent2); }
header.top nav { margin-left: auto; display: flex; gap: 1.1rem; font-size: .9rem; }
header.top nav a { color: var(--dim); text-decoration: none; }
header.top nav a:hover { color: var(--fg); }

/* ---- hero ---- */
.hero { padding: 4.5rem 0 3rem; }
.hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  line-height: 1.1; letter-spacing: -.03em; margin: 0 0 1.1rem;
}
.hero .lede { font-size: 1.15rem; color: var(--dim); max-width: 40rem; margin: 0 0 1.75rem; }
.hero .lede strong { color: var(--fg); font-weight: 600; }

.cta { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.hero .proof { color: var(--faint); font-size: .92rem; margin: 1.1rem 0 0; max-width: 40rem; }
.btn {
  display: inline-block; padding: .6rem 1.1rem; border-radius: var(--radius);
  font-weight: 600; font-size: .92rem; text-decoration: none;
  border: 1px solid var(--line2); color: var(--fg); background: var(--panel);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #06101f; }
.btn:hover { border-color: var(--accent2); }

/* ---- generic blocks ---- */
section { padding: 3rem 0; border-top: 1px solid var(--line); }
h2 { font-size: 1.55rem; letter-spacing: -.02em; margin: 0 0 .5rem; }
h3 { font-size: 1.05rem; margin: 2rem 0 .4rem; }
.sub { color: var(--dim); margin: 0 0 1.75rem; max-width: 44rem; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.2rem;
}
.card h3 { margin: 0 0 .35rem; font-size: 1rem; }
.card p { margin: 0; color: var(--dim); font-size: .92rem; }

/* ---- the loop ----
   Three cards read as three parallel features. This is a sequence with a clock
   in it, and the clock is the argument. */
ol.loop { list-style: none; counter-reset: step; margin: 0; padding: 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
ol.loop li {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; position: relative;
}
ol.loop .when {
  display: inline-block; font-family: var(--mono); font-size: .74rem;
  letter-spacing: .06em; color: var(--accent2);
  border: 1px solid var(--line2); border-radius: 100px; padding: .08rem .5rem;
}
ol.loop h3 { margin: .5rem 0 .35rem; font-size: 1rem; }
ol.loop p { margin: 0; color: var(--dim); font-size: .92rem; }

/* ---- queue figure ---- */
.queue-fig { margin: 1.75rem 0 0; }
.queue { width: 100%; height: auto; display: block; font-family: var(--sans); }
.queue-fig figcaption { color: var(--faint); font-size: .86rem; margin-top: .6rem; max-width: 44rem; }
.q-panel { fill: var(--panel); stroke: var(--line); }
.q-rule  { stroke: var(--line); }
.q-flag  { fill: var(--danger); }
.q-head  { fill: var(--fg); font-size: 13px; font-weight: 700; }
.q-count { fill: var(--faint); font-size: 12px; font-family: var(--mono); }
.q-proj  { fill: var(--fg); font-size: 13px; font-weight: 600; }
.q-host  { fill: var(--faint); font-size: 11px; font-family: var(--mono); }
/* The status is the session's own words, so it is teal and italic in the real
   dashboard — upright and grey would read as another machine-derived column. */
.q-status { fill: var(--accent2); font-size: 11.5px; font-style: italic; }
.q-age   { fill: var(--faint); font-size: 13px; font-family: var(--mono); }
.q-age.q-over { fill: var(--danger); }
/* Amber pill, dark text. The literal is deliberate: --bg is near-white in the
   light theme and would vanish against the amber. */
.q-badge-bg { fill: var(--warn); stroke: none; }
.q-badge { fill: #21180a; font-size: 9.5px; font-weight: 700;
  font-family: var(--mono); letter-spacing: .09em; }
.q-arrow { stroke: var(--line2); stroke-width: 1.5; fill: none; }
.q-arrowhead { fill: var(--line2); }
.q-label { fill: var(--accent2); font-size: 11px; font-family: var(--mono); }
.q-phone { fill: var(--panel); stroke: var(--line2); }
.q-screen { fill: var(--bg); stroke: none; }
.q-toast { fill: none; stroke: var(--danger); }
.q-toastline { fill: var(--fg); font-size: 8px; font-family: var(--mono); }
.q-toastline.q-dim { fill: var(--faint); }

/* ---- code ---- */
pre, code { font-family: var(--mono); }
pre {
  background: #070c13; border: 1px solid var(--line);
  border-radius: var(--radius); padding: .95rem 1.1rem;
  overflow-x: auto; font-size: .85rem; line-height: 1.55;
}
code { font-size: .88em; }
p code, li code, td code {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 4px; padding: .05rem .32rem;
}
pre .c { color: var(--faint); }
pre .p { color: var(--accent2); }

/* ---- callout ---- */
.note {
  border-left: 3px solid var(--warn); background: rgba(230, 184, 80, .07);
  padding: .9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.25rem 0;
}
.note.danger { border-left-color: var(--danger); background: rgba(226, 105, 95, .07); }
.note strong { color: var(--fg); }
.note p { margin: .4rem 0 0; color: var(--dim); font-size: .93rem; }
.note p:first-child { margin-top: 0; }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 1rem 0; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--faint); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
td { color: var(--dim); }
td strong, td b { color: var(--fg); }

/* ---- footer ---- */
footer { border-top: 1px solid var(--line); padding: 2.5rem 0; color: var(--faint); font-size: .88rem; }
footer a { color: var(--dim); }

/* ---- docs layout ---- */
.doc { display: grid; grid-template-columns: 15rem 1fr; gap: 2.5rem; padding: 2.5rem 0; }
.toc { position: sticky; top: 5rem; align-self: start; font-size: .9rem; }
.toc strong { display: block; color: var(--faint); font-size: .74rem;
  text-transform: uppercase; letter-spacing: .1em; margin: 1.2rem 0 .45rem; }
.toc strong:first-child { margin-top: 0; }
.toc a { display: block; color: var(--dim); text-decoration: none; padding: .18rem 0; }
.toc a:hover { color: var(--fg); }
.doc-body h2 { margin-top: 2.5rem; scroll-margin-top: 5rem; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { scroll-margin-top: 5rem; }
.doc-body li { margin: .3rem 0; }

@media (max-width: 800px) {
  .doc { grid-template-columns: 1fr; gap: 1.5rem; }
  .toc { position: static; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
  .toc strong { margin-top: .8rem; }
}

/* Light theme: the site is read by people who have not opted into anything. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfcfd; --panel: #f2f5f8; --line: #e2e8ef; --line2: #cfd8e3;
    --fg: #101720; --dim: #4d5b6b; --faint: #7b8797;
    --accent: #1f62d0; --accent2: #157f74;
  }
  header.top { background: rgba(251, 252, 253, .85); }
  pre { background: #f7f9fb; }
  .btn.primary { color: #fff; }
}
