/* Shared by every page of the site: the colours (copied from the pack into theme.css, each with a fallback here),
   the dotted canvas, the top bar with every section, the footer and the link to the next page. */
:root {
  color-scheme: dark;
  --brand: var(--ab-brand, #00b4aa);
  --on-brand: var(--ab-on-brand, #04201d);
  --brand-soft: var(--ab-brand-soft, rgba(0,180,170,.16));
  --brand-ink: var(--ab-brand-ink, #45d6cb);
  --node-title: var(--ab-node-title, #14424d);
  --node-body: var(--ab-node-body, #161f21);
  --card: var(--ab-card, #101214);
  --fill: var(--ab-fill, #2d3134);
  --fill-hover: var(--ab-fill-hover, #383c40);
  --well: var(--ab-well, #0f1112);
  --rule: var(--ab-rule, #2b2f32);
  --ink: var(--ab-ink, #f6f7f8);
  --ink-soft: var(--ab-ink-soft, #e0e3e5);
  --label: var(--ab-label, #b4b9bd);
  --faint: var(--ab-faint, #979da2);
  --r-node: var(--ab-radius-card, 10px);
  --r-control: var(--ab-radius-control, 6px);
  --ui: var(--ab-font-ui, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  --page: #0b0e0f;
  --dots: #1d2427;
  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body.site { margin: 0; padding: 0 0 0; background: var(--page) radial-gradient(circle, var(--dots) 1.2px, transparent 1.4px) 0 0 / 24px 24px; }

.sitebar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 var(--gutter-r) 0 var(--gutter-l); height: 52px; background: rgba(11,14,15,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.07); font: 500 13px/1 var(--mono); }
.sitebar a { color: var(--label); text-decoration: none; white-space: nowrap; }
.sitebar .home { color: var(--faint); flex: 0 0 auto; }
.sitebar .home b { color: var(--ink); font-weight: 600; }
.sitebar nav { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; height: 100%; align-items: center; }
.sitebar nav::-webkit-scrollbar { display: none; }
.sitebar nav a { display: flex; align-items: center; height: 100%; box-sizing: border-box; border-bottom: 2px solid transparent; border-top: 2px solid transparent; }
.sitebar nav a:hover { color: var(--ink); }
.sitebar nav a.here { color: var(--ink); border-bottom-color: var(--brand); }
.sitebar a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 560px) { .sitebar .home span { display: none; } .sitebar nav { gap: 16px; } }

.nextpage { display: grid; gap: 10px; max-width: 1240px; margin: 72px auto 0; padding: 34px var(--gutter-r) 40px var(--gutter-l); border-top: 1px solid var(--rule); text-decoration: none; box-sizing: border-box; }
.nextpage small { font: 500 12px/1 var(--mono); color: var(--faint); }
.nextpage b { font: 700 clamp(32px, 6.4vw, 76px)/1 var(--sans); letter-spacing: -.035em; color: #5d6669; transition: color .2s; }
.nextpage b i { font-style: normal; color: var(--brand-ink); }
.nextpage:hover b, .nextpage:focus-visible b { color: var(--ink); }

.sitefoot { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 24px var(--gutter-r) 44px var(--gutter-l); border-top: 1px solid var(--rule); font: 500 12px/1.5 var(--mono); color: var(--faint); background: var(--page); }
.sitefoot a { color: var(--label); text-decoration: none; }
.sitefoot a:hover { color: var(--brand-ink); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Inner pages (examples and guides): the page's own styles stay; these add the canvas, a larger title and the strip of examples. */
body.site { padding: 0; }
body.site > .wrap { padding: clamp(28px, 5vw, 56px) var(--gutter-r) 0 var(--gutter-l); box-sizing: content-box; }
body.site > .wrap > header h1 { font-size: clamp(38px, 7vw, 80px); line-height: .98; letter-spacing: -.035em; }
body.site > .wrap > header .eyebrow { letter-spacing: .04em; text-transform: none; font-size: 12px; font-weight: 500; }
body.site > .wrap > footer { border-top: 0; }
.jump { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -18px 0; padding: 2px 0; }
.jump::-webkit-scrollbar { display: none; }
.jump a { flex: 0 0 auto; display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--r-control); background: var(--node-body); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-soft); font: 500 12.5px/1 var(--ui); text-decoration: none; }
.jump a:hover { color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand); }
body.site .example, body.site section.node { box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 14px 34px rgba(0,0,0,.45); border-radius: var(--r-node); scroll-margin-top: 70px; }
body.site .download a.get { background: var(--fill); color: var(--ink); box-shadow: inset 0 0 0 1px var(--brand); border-radius: var(--r-control); }
body.site .download a.get:hover { background: var(--fill-hover); filter: none; }
