/* sidetone.sh — one stylesheet for every page.
   Layout: one quiet column, the width of a manual. Terminal blocks and one real
   screenshot are the only pictures; the accent is the product's own blue and is
   spent on links, buttons and the mark, nowhere else. */
:root {
  --bg: #f5f6f8;          /* the console's own palette, light */
  --panel: #ffffff;
  --fg: #1c2330;
  --dim: #667085;
  --line: #e1e4ea;
  --accent: #2f6fde;
  --accent-fg: #ffffff;
  --term-bg: #161c27;     /* the console's sidebar: where the terminal lives */
  --term-fg: #c8cfdb;
  --term-dim: #7f8aa0;
  --term-hi: #ffffff;
  --warn-bg: #fdefc8;
  --warn: #8a5a00;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 8px;
  --measure: 66ch;
  --wide: 60rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10141b; --panel: #181e28; --fg: #e6e9ef; --dim: #98a2b3; --line: #2a3140;
    --accent: #5b8ff0; --accent-fg: #0b1220; --term-bg: #0b0f16; --term-fg: #c8cfdb; --term-dim: #6f7a90; --term-hi: #ffffff;
    --warn-bg: #3a2e0c; --warn: #f4c866; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10141b; --panel: #181e28; --fg: #e6e9ef; --dim: #98a2b3; --line: #2a3140;
  --accent: #5b8ff0; --accent-fg: #0b1220; --term-bg: #0b0f16; --term-fg: #c8cfdb; --term-dim: #6f7a90; --term-hi: #ffffff;
  --warn-bg: #3a2e0c; --warn: #f4c866; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 1.0625rem/1.6 var(--sans);
}
a { color: var(--accent); text-decoration: none; text-underline-offset: .15em; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
code, pre, kbd { font-family: var(--mono); font-size: .92em; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem); }
h3 { font-size: 1.05rem; }
p { margin: 0; max-width: var(--measure); }
ul, ol { margin: 0; padding-left: 1.2em; }
li { margin: .2em 0; }
.wrap { width: min(100% - 2rem, var(--wide)); margin-inline: auto; }
.prose { max-width: var(--measure); }
.muted { color: var(--dim); }
.eyebrow { font: 500 .78rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.lede { font-size: 1.15rem; }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 2; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: .7rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--fg); font: 600 1.05rem/1 var(--mono); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 1.35rem; height: 1.35rem; flex: none; }
.top nav { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .95rem; }
.top nav a { color: var(--fg); padding-block: .15rem; border-bottom: 2px solid transparent; }
.top nav a:hover { text-decoration: none; border-bottom-color: var(--line); }
.top nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* pages and sections */
.page-head { padding-block: 3.5rem 2.5rem; border-bottom: 1px solid var(--line); }
section { padding-block: 3rem; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
.stack { display: grid; gap: 1.25rem; }
.stack-lg { display: grid; gap: 2rem; }

/* hero */
.hero { padding-block: 4rem 3.5rem; }
.hero .stack-lg { gap: 2.25rem; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; padding: .6rem 1.05rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--fg); font-weight: 500; font-size: .98rem; }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn:hover { text-decoration: none; filter: brightness(1.06); }

/* the terminal: the one picture the subject would draw of itself */
.term { background: var(--term-bg); color: var(--term-fg); border-radius: var(--radius); padding: 1.1rem 1.25rem; overflow-x: auto; border: 1px solid color-mix(in srgb, var(--term-bg) 70%, var(--line)); }
.term pre { margin: 0; font: 400 .95rem/1.55 var(--mono); white-space: pre; min-width: 0; }
.term .p { color: var(--term-dim); user-select: none; }
.term .c { color: var(--term-hi); }
.term .k { color: #8fc1ff; }
.term .cur::after { content: "▍"; color: var(--term-hi); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .term .cur::after { animation: none; } }
.hero .term pre { font-size: clamp(.85rem, .75rem + .5vw, 1.02rem); }

/* a file to copy, as a terminal block but named */
.file { display: grid; gap: 0; }
.file .name { font: 500 .8rem/1 var(--mono); color: var(--dim); padding: 0 .25rem .4rem; }

/* the console, shown */
.shot { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); box-shadow: 0 20px 50px -30px rgba(10, 20, 40, .45); }
.shot img { display: block; width: 100%; height: auto; max-width: 100%; }
/* one of the two is shown, the theme's own; the selectors carry the img so that they outrank .shot img */
.shot img.shot-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shot img.shot-light { display: none; } :root:not([data-theme="light"]) .shot img.shot-dark { display: block; } }
:root[data-theme="dark"] .shot img.shot-light { display: none; }
:root[data-theme="dark"] .shot img.shot-dark { display: block; }
figure { margin: 0; }
figcaption { font-size: .95rem; color: var(--dim); max-width: var(--measure); }

/* three claims on the home page, each a door to a page */
.claims { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem 2.5rem; }
.claims > a { color: var(--fg); min-width: 0; display: grid; gap: .5rem; align-content: start; }
.claims > a:hover { text-decoration: none; }
.claims > a:hover h3 { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .2em; }
.claims p { font-size: .98rem; color: var(--dim); }
.claims .more { color: var(--accent); font-size: .95rem; }

/* what it does */
.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem 2.5rem; }
.groups > div { min-width: 0; }
.groups h3 { margin-bottom: .45rem; }
.groups ul { padding-left: 1.1em; }
.groups li { margin: .25em 0; }

/* how it works */
.diagram { width: 100%; max-width: 46rem; height: auto; display: block; }
.diagram text { font-family: var(--sans); fill: var(--fg); }
.diagram .label { font-size: 13px; font-weight: 500; }
.diagram .sub { font-size: 11.5px; fill: var(--dim); }
.diagram .box { fill: var(--panel); stroke: var(--line); }
.diagram .mid { fill: var(--accent); stroke: var(--accent); }
.diagram .mid-text { fill: var(--accent-fg); font-family: var(--mono); font-weight: 600; font-size: 14px; }
.diagram .wire { stroke: var(--dim); stroke-width: 1.5; fill: none; }
.diagram .wire-text { font-family: var(--mono); font-size: 11px; fill: var(--dim); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .5rem 2rem; padding: 0; margin: 0; list-style: none; font-size: .98rem; }
.facts li { padding: .55rem 0; border-top: 1px solid var(--line); min-width: 0; }
.facts code { color: var(--fg); }

/* what it is not */
.not { columns: 2; column-gap: 2.5rem; max-width: 40rem; }
@media (max-width: 36rem) { .not { columns: 1; } }

/* install: three ways, side by side on a wide screen */
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.5rem; }
.way { min-width: 0; display: grid; gap: .75rem; align-content: start; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.way h3 { display: flex; align-items: baseline; gap: .6rem; }
.way .tag { font: 500 .72rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.way p { font-size: .95rem; }
.way .term { padding: .85rem 1rem; }
.way .term pre { font-size: .85rem; }
dl.facts-list { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0; font-size: .98rem; max-width: var(--wide); }
dl.facts-list dt { font-weight: 500; }
dl.facts-list dd { margin: 0; min-width: 0; }
@media (max-width: 36rem) { dl.facts-list { grid-template-columns: 1fr; } dl.facts-list dd { margin-bottom: .5rem; } }

/* licence */
blockquote { margin: 0; padding: .9rem 1.1rem; border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 var(--radius) var(--radius) 0; max-width: var(--measure); font-size: .98rem; }
blockquote p { max-width: none; }
blockquote cite { display: block; margin-top: .4rem; font-style: normal; color: var(--dim); font-size: .9rem; }

/* notes */
.note { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius); padding: .8rem 1rem; font-size: .95rem; max-width: var(--wide); }
.note strong { letter-spacing: .04em; text-transform: uppercase; font-size: .85em; margin-right: .3em; }
.links { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .98rem; }

footer { padding-block: 2rem 3rem; color: var(--dim); font-size: .9rem; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* the documentation: a contents column beside the text on a wide screen, above it on a narrow one */
.docs { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 3rem; align-items: start; padding-block: 2.5rem 3.5rem; }
@media (max-width: 52rem) { .docs { grid-template-columns: 1fr; gap: 2rem; } }
.docs-nav { position: sticky; top: 4.2rem; font-size: .92rem; display: grid; gap: 1.1rem; }
@media (max-width: 52rem) { .docs-nav { position: static; } }
.docs-nav h2 { font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: .4rem; }
.docs-nav ul { list-style: none; padding: 0; margin: 0; }
.docs-nav li { margin: 0; }
.docs-nav a { display: block; color: var(--fg); padding: .22rem 0 .22rem .6rem; border-left: 2px solid transparent; }
.docs-nav a:hover { text-decoration: none; border-left-color: var(--line); }
.docs-nav a[aria-current="page"] { border-left-color: var(--accent); color: var(--accent); font-weight: 500; }
.doc { display: grid; gap: 1.1rem; min-width: 0; }
.doc h1 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem); }
.doc h2 { font-size: 1.35rem; margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.doc h3 { margin-top: .6rem; }
.doc p, .doc ul, .doc ol { max-width: var(--measure); }
.doc ul, .doc ol { padding-left: 1.2em; }
.doc li { margin: .3em 0; }
.doc .term { margin-block: .25rem; }
.doc .term pre { font-size: .88rem; }
.doc table { border-collapse: collapse; width: 100%; font-size: .93rem; margin-block: .25rem; }
.doc th, .doc td { text-align: left; padding: .5rem .75rem .5rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font: 500 .72rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.doc td code { white-space: nowrap; }
.doc .tablewrap { overflow-x: auto; }
.doc .next { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .95rem; }
.doc .lede { color: var(--dim); }
.doc dl { margin: 0; display: grid; gap: .3rem 1.25rem; grid-template-columns: max-content 1fr; font-size: .97rem; max-width: var(--wide); }
.doc dt { font-family: var(--mono); font-size: .9em; }
.doc dd { margin: 0; min-width: 0; }
@media (max-width: 36rem) { .doc dl { grid-template-columns: 1fr; } .doc dd { margin-bottom: .5rem; } }
.toc { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem 2.5rem; }
.toc > div { min-width: 0; }
.toc h2 { margin: 0 0 .4rem; padding: 0; border: 0; font-size: 1.05rem; }
.toc ul { list-style: none; padding: 0; }
.toc li { margin: .35em 0; }
.toc li span { display: block; color: var(--dim); font-size: .9rem; }
