@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Instrument+Sans:wght@400..700&display=swap");

:root {
  color-scheme: light dark;
  --paper: light-dark(#edf0f4, #0b1330);
  --panel: light-dark(#ffffff, #141f47);
  --ink: light-dark(#0f1c3f, #e9edfa);
  --muted: light-dark(#56628a, #9aa6cf);
  --line: light-dark(#c9d1e0, #2b3970);
  --field-border: light-dark(#6c789c, #6879b3);
  --yellow: #f5b700;
  --red: light-dark(#c41e3a, #ff7a8a);
  --teal: light-dark(#087366, #2cd4bf);
  --link-underline: light-dark(#8f6200, #f5b700);
  --accent: var(--yellow);
  --on-accent: #0f1c3f;
  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.35rem;
  --step-2: 1.9rem;
  --step-3: clamp(1.9rem, 1.3rem + 3vw, 3.4rem);
  --step-4: clamp(2.4rem, 1rem + 8vw, 7.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: var(--step-0)/1.55 var(--body);
}
h1, h2, h3 { font-family: var(--display); line-height: 1.02; letter-spacing: -0.02em; margin: 0; text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: var(--step-4); font-weight: 800; font-stretch: 85%; letter-spacing: -0.045em; line-height: 0.92; }
h2 { font-size: var(--step-3); font-weight: 750; }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
p { margin: 0; max-width: 62ch; text-wrap: pretty; overflow-wrap: break-word; }
a { color: inherit; text-decoration-color: var(--link-underline); text-decoration-thickness: 0.15em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.24em; }
code, pre, kbd { font-family: var(--mono); font-size: 0.86em; }
:not(pre) > code { background: color-mix(in srgb, var(--ink) 9%, transparent); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
pre {
  margin: 0; padding: 1rem 1.1rem; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; line-height: 1.5;
  background: light-dark(#0f1c3f, #070d22); color: #e9edfa;
  border: 1px solid light-dark(transparent, #3a4b8c);
  border-radius: 10px; tab-size: 2;
}
pre .c, pre .hl-c { color: #94a3d1; font-style: italic; }
pre .hl-k { color: #ff8599; font-weight: 600; }
pre .hl-s { color: #5eead4; }
pre .hl-n { color: #fbbf24; }
pre .hl-t { color: #ffd166; }
pre .hl-f { color: #93c5fd; }
pre .hl-p { color: #b4c0e0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 1000;
  padding: 0.6rem 1rem; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-weight: 700; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.wrap { width: min(100% - 2rem, 70rem); margin-inline: auto; }
main { min-width: 0; }
.scroll, .table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.stack > * + * { margin-top: var(--gap, 1rem); }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

/* A button looks like the end of a cable: solid, rounded like a plug. */
button, .button {
  font: 600 var(--step-0)/1 var(--body);
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.8em 1.15em; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--ink); background: var(--ink); color: var(--paper);
  text-decoration: none;
}
button:hover:not(:disabled), .button:hover { background: color-mix(in srgb, var(--ink) 82%, var(--accent)); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.quiet, .button.quiet { background: transparent; color: var(--ink); }
button.quiet:hover:not(:disabled), .button.quiet:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
button.accent, .button.accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button.accent:hover:not(:disabled), .button.accent:hover { background: color-mix(in srgb, var(--accent) 84%, #000); border-color: var(--ink); }
button.tiny, .button.tiny { font-size: var(--step--1); padding: 0.5em 0.8em; border-width: 1.5px; }

input[type="text"], input[type="password"], input[type="url"], input[type="search"], input[type="email"], input[type="number"], textarea, select {
  font: inherit; color: inherit; background: var(--panel);
  border: 2px solid var(--field-border); border-radius: 10px; padding: 0.65em 0.8em; width: 100%;
}
:is(input[type="text"], input[type="password"], input[type="url"], input[type="search"], input[type="email"], input[type="number"], textarea, select):focus-visible {
  outline: 3px solid var(--ink); outline-offset: 2px; border-color: var(--ink);
}
label { font-weight: 600; display: block; margin-bottom: 0.3rem; }

.panel { background: var(--panel); border-radius: 16px; padding: clamp(1rem, 3vw, 1.6rem); }
.panel.ruled { border: 2px solid var(--ink); }

/* The jack: a small socket. Filled when something is plugged in. */
.jack {
  display: inline-block; width: 0.8em; height: 0.8em; border-radius: 50%;
  border: 0.18em solid currentColor; vertical-align: -0.05em; margin-right: 0.45em;
}
.jack.on { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 0.2em color-mix(in srgb, var(--accent) 30%, transparent); }

.log {
  font: var(--step--1)/1.5 var(--mono); margin: 0; padding: 0; list-style: none;
  max-height: 14rem; overflow: auto;
}
.log li { padding: 0.3rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; white-space: pre-wrap; }
.log li:first-child { border-top: 0; }
.log .who { font-weight: 700; }

.site-bar {
  display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 0.9rem 0; font-weight: 600;
}
.site-bar nav { display: flex; gap: 0.7rem 1.1rem; flex-wrap: wrap; align-items: center; font-size: var(--step--1); }
.site-bar nav a[aria-current="page"] {
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--ink);
  text-decoration-thickness: 0.22em;
  text-underline-offset: 0.28em;
  background: color-mix(in srgb, var(--accent) 28%, transparent);
  padding: 0.15em 0.45em;
  margin-inline: -0.45em;
  border-radius: 6px;
}
/* On a narrow screen the menu folds away behind a button, which /nav.js adds.
   .has-menu is set by that script, so without it the links wrap instead. */
.menu-toggle { display: none; }
@media (max-width: 48rem) {
  .has-menu .menu-toggle { display: inline-flex; min-height: 2.75rem; padding-inline: 1rem; }
  .has-menu .menu-toggle::after {
    content: ""; width: 0.45em; height: 0.45em;
    border: solid currentColor; border-width: 0 0.14em 0.14em 0;
    rotate: 45deg; translate: 0 -0.12em;
  }
  .has-menu .menu-toggle[aria-expanded="true"]::after { rotate: -135deg; translate: 0 0.12em; }
  .has-menu .site-bar nav {
    display: none; flex: 1 0 100%; flex-direction: column; align-items: stretch;
    gap: 0; font-size: var(--step-0); border-top: 1px solid var(--line);
  }
  .has-menu .site-bar.menu-open nav { display: flex; }
  .has-menu .site-bar nav a { padding: 0.75rem 0.25rem; border-bottom: 1px solid var(--line); text-decoration: none; }
  .has-menu .site-bar nav a[aria-current="page"] { margin-inline: 0; padding-inline: 0.6rem; border-radius: 0; text-decoration: none; }
}
.wordmark { font: 800 1.25rem/1 var(--display); letter-spacing: -0.03em; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.wordmark::before {
  content: ""; width: 1.1em; height: 1.1em; border-radius: 50%;
  border: 0.3em solid var(--ink); background: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Links that refs.js adds to the names of platform features, and its list. */
a.ref { text-decoration-thickness: 0.12em; }
a.ref:hover { text-decoration-thickness: 0.22em; }
.refs { border-top: 2px solid var(--ink); padding-block: clamp(1.6rem, 4vw, 2.6rem) 1rem; display: grid; gap: 1rem; }
.refs h2 { font-size: var(--step-2); }
.refs-features { margin: 0; columns: 2 20rem; column-gap: 3rem; font-size: var(--step--1); }
.refs-features > div { break-inside: avoid; padding-block: 0.6rem; border-top: 1px solid var(--line); }
.refs-features dt { font-family: var(--mono); font-weight: 600; }
.refs-features dd { margin: 0.15rem 0 0; }
.refs-links { display: inline-flex; flex-wrap: wrap; gap: 0 0.8rem; font-weight: 600; }
.refs-projects { margin: 0; padding-left: 1.1rem; font-size: var(--step--1); }
