/* Signal palette. Dark is the default. Inter and JetBrains Mono are self-hosted (SIL OFL). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --p0-aubergine: #1f0917;
  --p0-night: #2c0f24;
  --p0-deep-plum: #4b1239;
  --p0-damson: #7f3296;
  --p0-claret: #b0214f;
  --p0-ripe: #e04a77;
  --p0-bloom: #c4b0d6;
  --p0-milk: #f7eef3;
  --p0-skin: #eadce4;
  --p0-mist: #d9c6d2;
  --p0-dusk: #6a3f59;

  --bg: var(--p0-aubergine);
  --surface: var(--p0-night);
  --border: var(--p0-deep-plum);
  --text: var(--p0-milk);
  --text-muted: var(--p0-bloom);
  --accent: var(--p0-ripe);
  --accent-fill: var(--p0-claret);
  --focus: var(--p0-bloom);
  --code-bg: var(--p0-aubergine);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="light"] {
  --bg: var(--p0-milk);
  --surface: var(--p0-skin);
  --border: var(--p0-mist);
  --text: var(--p0-aubergine);
  --text-muted: var(--p0-dusk);
  --accent: var(--p0-claret);
  --focus: var(--p0-damson);
  --code-bg: var(--p0-milk);
  color-scheme: light;
  -webkit-font-smoothing: auto;
}

/* No script: follow the OS. With a script, data-theme wins. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: var(--p0-milk);
    --surface: var(--p0-skin);
    --border: var(--p0-mist);
    --text: var(--p0-aubergine);
    --text-muted: var(--p0-dusk);
    --accent: var(--p0-claret);
    --focus: var(--p0-damson);
    --code-bg: var(--p0-milk);
    color-scheme: light;
    -webkit-font-smoothing: auto;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  max-width: 11em;
}

h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

h3 {
  margin: 0;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: var(--p0-claret);
  color: var(--p0-milk);
}

code,
pre {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
}

p code,
li code,
dd code {
  font-size: 0.88em;
  font-weight: 500;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  overflow-wrap: anywhere;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 5;
  background: var(--accent-fill);
  color: var(--p0-milk);
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(72rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: none;
}

.brand img {
  display: block;
  height: 3.35rem;
  width: auto;
}

img.theme-only-light {
  display: none;
}

:root[data-theme="light"] img.theme-only-dark {
  display: none;
}

:root[data-theme="light"] img.theme-only-light {
  display: block;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) img.theme-only-dark {
    display: none;
  }

  :root:not([data-theme]) img.theme-only-light {
    display: block;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
}

.nav-links a,
.theme-toggle {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  min-height: 2.75rem;
  padding: 0.35rem 0.7rem;
  display: inline-flex;
  align-items: center;
}

.nav-links a:hover,
.theme-toggle:hover {
  color: var(--accent);
}

.theme-toggle {
  border-color: var(--border);
  font-weight: 700;
  min-width: 4.75rem;
  justify-content: center;
  cursor: pointer;
}

main:focus {
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 4.25rem 0 4.75rem;
}

.hero-mark {
  position: absolute;
  right: -1rem;
  top: 2.5rem;
  width: min(28rem, 38vw);
  height: auto;
  opacity: 0.2;
  pointer-events: none;
  user-select: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 40rem;
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--accent);
}

.lede {
  margin-top: 1.15rem;
  max-width: 38rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin-top: 1.5rem;
  padding: 0.55rem 1.05rem;
  background: var(--accent-fill);
  color: var(--p0-milk);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 6px;
}

.button:hover {
  filter: brightness(0.92);
  text-decoration: none;
}

.command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  max-width: 36rem;
  margin-top: 1rem;
  padding: 0.45rem 0.45rem 0.45rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.command-line {
  margin: 0;
  min-width: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.4;
}

.prompt {
  color: var(--accent);
  margin-right: 0.45rem;
}

.command code {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
}

.copy {
  flex: none;
  min-width: 5.5rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.85rem;
  background: var(--accent-fill);
  color: var(--p0-milk);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.875rem;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.copy:hover {
  filter: brightness(0.92);
}

.micro {
  margin-top: 0.75rem;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.section {
  padding: 4.25rem 0;
  border-top: 1px solid var(--border);
}

.section-intro {
  margin-top: 0.85rem;
  max-width: 40rem;
}

.steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}

.steps li {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0.25rem 0.75rem;
}

.step-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--accent);
  padding-top: 0.2rem;
}

.steps pre {
  margin: 0.85rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.55;
}

.steps pre code {
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.comment {
  color: var(--text-muted);
}

.note {
  margin-top: 1.5rem;
  max-width: 40rem;
  color: var(--text-muted);
}

.props {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.props li,
.flow li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem 1.15rem 1.3rem;
}

.props h3 {
  margin-bottom: 0.55rem;
}

.aside-note {
  margin-top: 1.25rem;
  max-width: 46rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.flow {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.flow li {
  position: relative;
  min-width: 0;
}

.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -0.55rem;
  width: 0.4rem;
  height: 1px;
  background: var(--accent);
}

.flow-num {
  margin: 0 0 0.55rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--accent);
}

.flow h3 {
  margin-bottom: 0.35rem;
}

.flow p:last-child {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.tools {
  margin: 1.75rem 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 2rem;
}

.tools div {
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
}

.tools dt {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
}

.tools dd {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
}

.facts {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.facts li {
  padding-left: 0.9rem;
  border-left: 2px solid var(--accent);
  max-width: 44rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 3rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
}

.footer-nav a {
  color: var(--text);
  text-decoration: none;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

.footer-nav a:hover {
  color: var(--accent);
}

.affiliation {
  margin-top: 0.75rem;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.copy-sink {
  position: fixed;
  left: -9999px;
  top: 0;
}

/* The light show rule is :root[data-theme="light"] img.theme-only-light.
   A plain .hero-mark hide loses that specificity, so the watermark stays on
   small screens. These selectors match it, and they come later. */
@media (max-width: 1040px) {
  :root[data-theme] img.hero-mark,
  :root:not([data-theme]) img.hero-mark {
    display: none;
  }
}

@media (max-width: 960px) {
  .props {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .flow {
    grid-template-columns: 1fr;
  }

  .flow li::after {
    display: none;
  }
}

@media (max-width: 700px) {
  .tools {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.75rem 0 3.25rem;
  }

  .section {
    padding: 3.25rem 0;
  }

  .wrap {
    width: min(72rem, calc(100% - 2rem));
  }
}

@media (max-width: 520px) {
  .brand img {
    height: 2.7rem;
  }

  .nav-links a,
  .theme-toggle {
    padding-inline: 0.45rem;
  }

  .theme-toggle {
    min-width: 3.5rem;
  }

  .command {
    flex-wrap: wrap;
    padding: 0.75rem;
  }

  .copy {
    width: 100%;
  }

  .steps li {
    grid-template-columns: 2.25rem 1fr;
  }
}

@media (forced-colors: active) {
  .button,
  .copy,
  .theme-toggle,
  .command,
  .props li,
  .flow li {
    border: 1px solid ButtonText;
  }

  /* Same specificity as the narrow-screen hide above. */
  :root[data-theme] img.hero-mark,
  :root:not([data-theme]) img.hero-mark {
    display: none;
  }
}
