/* The Via site's look: paper and ink, one steel-blue accent, weights 400 and 500,
   no borders. Colours for state only: green for GREEN, red for red. Drawings are
   ink on dotted paper: blue for a dimension or a bound, red for what a gate caught.
   The text face is Inter, 1 latin file. Commands use the system's monospace
   face, so the first load carries no second font. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;
  --background: oklch(0.985 0.004 85);
  --foreground: oklch(0.2 0.01 60);
  --card: oklch(0.995 0.002 85);
  --primary: oklch(0.5 0.09 237);
  --primary-foreground: oklch(0.985 0.004 85);
  --secondary: oklch(0.955 0.006 80);
  --muted-foreground: oklch(0.52 0.015 70);
  --accent: oklch(0.94 0.025 237);
  --accent-foreground: oklch(0.33 0.07 237);
  --ring: oklch(0.6 0.09 237);
  --status-ok: oklch(0.5 0.14 150);
  --status-red: oklch(0.55 0.2 27);
  --edge: oklch(0.2 0.01 60 / 7%);
  --dot: oklch(0.2 0.01 60 / 15%);
  --shadow: 0 8px 24px -12px oklch(0.2 0.01 60 / 25%);
  --tour: oklch(0.6 0.13 220);
  --tour-ink: oklch(0.99 0.005 220);
  --font-sans: "Inter Variable", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --text-display: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem);
  --text-title: clamp(1.875rem, 1.4rem + 1.9vw, 3rem);
  --text-lede: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
}

html.dark {
  color-scheme: dark;
  --background: oklch(0.19 0.006 60);
  --foreground: oklch(0.95 0.005 85);
  --card: oklch(0.23 0.006 60);
  --primary: oklch(0.74 0.09 230);
  --primary-foreground: oklch(0.17 0.03 237);
  --secondary: oklch(0.27 0.006 60);
  --muted-foreground: oklch(0.68 0.012 75);
  --accent: oklch(0.31 0.035 237);
  --accent-foreground: oklch(0.88 0.05 230);
  --ring: oklch(0.64 0.09 237);
  --status-ok: oklch(0.76 0.15 150);
  --status-red: oklch(0.72 0.17 27);
  --edge: oklch(1 0 0 / 10%);
  --dot: oklch(1 0 0 / 13%);
  --shadow: 0 8px 24px -12px oklch(0 0 0 / 60%);
  --tour: oklch(0.8 0.12 210);
  --tour-ink: oklch(0.18 0.03 220);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-feature-settings: "cv11", "ss01";
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure,
pre {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

svg {
  display: block;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
}

p code,
li code,
dd code,
figcaption code {
  font-size: 0.9em;
  color: var(--foreground);
}

::selection {
  background: var(--accent);
  color: var(--accent-foreground);
}

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

main:focus:not(:focus-visible) {
  outline: none;
}

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

/* The theme swap is instant: no transition paints the old colours over the new. */
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: none !important;
}

/* A capture of 1 part of the page: index.html?shot=diagram shows the diagram alone, edge to edge. */
html[data-shot] .skip,
html[data-shot] .site-header,
html[data-shot] .site-footer,
html[data-shot="diagram"] main > :not(#how-it-works),
html[data-shot="diagram"] #how-it-works .head,
html[data-shot="diagram"] #how-it-works .after {
  display: none;
}

html[data-shot="diagram"] #how-it-works > .wrap {
  max-width: none;
  padding: 0;
}

html[data-shot="diagram"] .diagram {
  min-height: 100vh;
  margin-top: 0;
  border-radius: 0;
}

/* ---------------------------------------------------------------- pieces */

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 50;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.875rem;
}

.skip:focus {
  position: fixed;
  left: 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.display {
  font-size: var(--text-display);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 500;
  text-wrap: balance;
}

.title {
  font-size: var(--text-title);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 500;
  text-wrap: balance;
}

.lede {
  font-size: var(--text-lede);
  line-height: 1.55;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.small {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.link {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklch, var(--primary) 30%, transparent);
  text-underline-offset: 4px;
  transition: text-decoration-color 150ms var(--ease);
}

.link:hover {
  text-decoration-color: var(--primary);
}

.btn {
  display: inline-flex;
  height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding-inline: 1.5rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  transition:
    opacity 150ms var(--ease),
    background-color 150ms var(--ease),
    color 150ms var(--ease);
}

.btn svg {
  width: 1rem;
  height: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-quiet:hover {
  background: var(--secondary);
}

.btn-fill {
  background: var(--secondary);
}

.btn-fill:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.btn .arrow {
  transition: transform 150ms var(--ease);
}

.btn:hover .arrow {
  transform: translateX(2px);
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklch, var(--background) 72%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header .wrap {
  display: flex;
  height: 4rem;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-left: -0.25rem;
  padding-inline: 0.25rem;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.brand svg {
  width: 22px;
  height: 22px;
}

.site-nav {
  display: none;
  margin-left: 1rem;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  white-space: nowrap;
  color: var(--muted-foreground);
}

.site-nav a {
  display: block;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  transition:
    background-color 150ms var(--ease),
    color 150ms var(--ease);
}

.site-nav a:hover {
  background: var(--secondary);
  color: var(--foreground);
}

.header-end {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-left: auto;
}

.icon-btn {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 999px;
  color: var(--muted-foreground);
  transition:
    background-color 150ms var(--ease),
    color 150ms var(--ease);
}

.icon-btn:hover {
  background: var(--secondary);
  color: var(--foreground);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn .sun,
html.dark .icon-btn .moon {
  display: none;
}

html.dark .icon-btn .sun {
  display: block;
}

.gh-pill {
  display: flex;
  height: 2.25rem;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 1rem;
  border-radius: 999px;
  background: var(--secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition:
    background-color 150ms var(--ease),
    color 150ms var(--ease);
}

.gh-pill:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.gh-pill svg {
  width: 1rem;
  height: 1rem;
}

/* ------------------------------------------------------------------ hero */

/* Paragraphs in a section are justified to their column, and hyphenated so the spaces between words
   stay even. A part's label is too narrow for it: its lines stay ragged. The hero is centred. */
main .section p:not(.eyebrow):not(.spec):not(.board3d-hint):not(.part-d):not(.fname):not(.meta),
main .section figcaption {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.head.center .lede {
  text-align-last: center;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* A run: what the command printed, as it printed it. Long lines wrap as they do
   in a terminal that is this wide. */
.run {
  overflow: hidden;
  border-radius: 1rem;
  background: var(--card);
  box-shadow:
    0 0 0 1px var(--edge),
    var(--shadow);
}

.run pre {
  padding: 1.25rem 1.25rem 1.375rem;
  font-size: 0.75rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 4;
}

/* On a narrow screen the gates' columns stay whole and the run scrolls sideways. */
.run pre[data-run="gates"] {
  white-space: pre;
  overflow-x: auto;
}

.run .cmd {
  color: var(--foreground);
  font-weight: 500;
}

.run .prompt,
.run .out {
  color: var(--muted-foreground);
}

/* The tool prints no colour, so a run here has none: the verdict line is set in the ink. */
.run .verdict {
  color: var(--foreground);
  font-weight: 500;
}

.shot {
  margin-top: 3rem;
}

figcaption {
  margin-top: 1rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

/* ----------------------------------------------------------------- files */

/* 3 files side by side: lines of a design file, and the 2 files the command writes from it. */
.files {
  display: grid;
  gap: 2rem 1.25rem;
  margin-top: 3rem;
}

.file {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--card);
  box-shadow:
    0 0 0 1px var(--edge),
    var(--shadow);
}

.file h3 {
  padding: 0.875rem 1.25rem 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted-foreground);
}

.file pre {
  overflow: hidden;
  padding: 0.75rem 1.25rem 0;
  font-size: 0.8125rem;
  line-height: 1.62;
}

.file pre .s {
  color: var(--primary);
}

.file pre .n {
  color: var(--muted-foreground);
}

/* The file goes on below the card: its last lines fade out. */
.file.code {
  position: relative;
}

.file.code::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5.25rem;
  background: linear-gradient(to bottom, transparent, var(--card) 88%);
}

.file .view {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0.375rem 0.875rem 0.875rem;
}

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

/* The board runs off the picture's right and lower edges, so it meets the card's. */
.file .view.bleed {
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0;
}

/* KiCad draws a schematic for a white sheet, and the picture carries its own: on GitHub's dark
   page a schematic with no background is dark red on black. The card is that white in both themes. */
.file.sheet {
  background: #fff;
}

.file.sheet h3 {
  color: oklch(0.52 0.015 70);
}

.files figcaption b {
  font-weight: 500;
  color: var(--foreground);
}

/* The design file's lines across the top, whole; the 2 files it writes side by side below. */
.files.wide .file.code::after {
  display: none;
}

.files.wide figure {
  min-width: 0;
}

.files.wide .file pre {
  overflow-x: auto;
  padding-bottom: 1.25rem;
}

/* -------------------------------------------------------------- sections */

.section > .wrap {
  padding-block: 4rem;
}

.section.band {
  background: var(--secondary);
}

.section.band > .wrap {
  padding-block: 6rem;
}

.head {
  max-width: 46rem;
}

.head .eyebrow {
  margin-bottom: 1rem;
}

.head .lede {
  margin-top: 1.25rem;
}

.head.center {
  margin-inline: auto;
  text-align: center;
}

.cards h3 {
  font-size: 1.0625rem;
  line-height: 1.4;
  font-weight: 500;
}

.cards p {
  margin-top: 0.5rem;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.cards {
  display: grid;
  gap: 2.5rem 2rem;
  margin-top: 3.5rem;
}

.cards p {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.cards a.card {
  display: block;
  border-radius: 0.75rem;
}

.cards a.card h3 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cards a.card h3 svg {
  width: 0.875rem;
  height: 0.875rem;
  margin-top: 0.3rem;
  flex: none;
  color: var(--muted-foreground);
  transition:
    transform 150ms var(--ease),
    color 150ms var(--ease);
}

.cards a.card:hover h3 svg {
  color: var(--foreground);
  transform: translate(1px, -1px);
}

.verdicts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.verdicts li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  background: var(--background);
}

.verdicts i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--muted-foreground);
}

.verdicts .ok i {
  background: var(--status-ok);
}

.verdicts .bad i {
  background: var(--status-red);
}

.verdicts span {
  font-family: var(--font-sans);
  color: var(--muted-foreground);
}

/* --------------------------------------------------------------- diagram */

.frame {
  overflow: hidden;
  border-radius: 1rem;
  background: var(--secondary);
}

.diagram {
  margin-top: 3rem;
  padding: 1.5rem;
}

.flow {
  display: grid;
  gap: 0.5rem;
  align-items: stretch;
}

.node {
  padding: 1.125rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--background);
}

.node b {
  display: block;
  font-size: 1rem;
  font-weight: 500;
}

.node span {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted-foreground);
}

.node.accent {
  background: var(--accent);
  color: var(--accent-foreground);
}

.node.accent span {
  color: color-mix(in oklch, var(--accent-foreground) 80%, transparent);
}

.node code {
  font-size: 0.9375rem;
}

.hop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.25rem 0;
  font-size: 0.75rem;
  line-height: 1.3;
  text-align: center;
  color: var(--muted-foreground);
}

.hop code {
  font-size: 0.6875rem;
}

.hop svg {
  width: 1.25rem;
  height: 1.25rem;
  transform: rotate(90deg);
}

.engines {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  background-image: linear-gradient(to right, var(--muted-foreground) 50%, transparent 50%);
  background-size: 8px 1px;
  background-repeat: repeat-x;
  background-position: top;
}

.engines-label {
  margin-top: 1.5rem;
  margin-bottom: -0.75rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.after {
  max-width: 46rem;
  margin-top: 2.5rem;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.after + .after {
  margin-top: 1rem;
}

.after b {
  font-weight: 500;
  color: var(--foreground);
}

/* -------------------------------------------------------------- commands */

.commands {
  position: relative;
  margin-top: 3rem;
}

.commands pre {
  padding: 1.5rem 3.5rem 1.5rem 1.5rem;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 2.15;
}

.commands .prompt {
  color: var(--muted-foreground);
  user-select: none;
}

.copy {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.5rem;
  color: var(--muted-foreground);
  transition:
    background-color 150ms var(--ease),
    color 150ms var(--ease);
}

.copy:hover {
  background: var(--background);
  color: var(--foreground);
}

.copy svg {
  width: 1rem;
  height: 1rem;
}

.copy .done,
.copy[data-copied] .todo {
  display: none;
}

.copy[data-copied] .done {
  display: block;
  color: var(--status-ok);
}

/* --------------------------------------------------------------- closing */

.closing .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: 5rem 6rem;
  text-align: center;
}

.closing .mark {
  width: 7.5rem;
  height: 7.5rem;
  margin-bottom: 2rem;
}

.closing .lede {
  max-width: 32rem;
  margin-top: 1.25rem;
}

.closing .actions {
  margin-top: 2.25rem;
  width: 100%;
}

/* ---------------------------------------------------------------- footer */

.site-footer .wrap {
  padding-bottom: 3rem;
}

.site-footer .row {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.site-footer .brand {
  margin-left: 0;
  padding: 0;
}

.site-footer .brand svg {
  width: 20px;
  height: 20px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.site-footer li a {
  transition: color 150ms var(--ease);
}

.site-footer li a:hover {
  color: var(--foreground);
}

.site-footer .small {
  margin-top: 1.5rem;
}

/* ------------------------------------------------------------ the 404 page */

.lost .wrap {
  display: flex;
  min-height: calc(100dvh - 14rem);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-block: 4rem;
}

.lost .lede {
  margin-top: 1.25rem;
}

/* ------------------------------------------------------------ wider screens */

@media (min-width: 640px) {
  .wrap {
    padding-inline: 1.5rem;
  }
  .actions {
    flex-direction: row;
    align-items: center;
  }
  .closing .actions {
    width: auto;
  }
  .run pre {
    font-size: 0.8125rem;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-footer .row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .diagram {
    padding: 2.5rem;
  }
}

@media (min-width: 768px) {
  .section > .wrap {
    padding-block: 6rem;
  }
  .section.band > .wrap {
    padding-block: 9rem;
  }
}

@media (min-width: 1024px) {
  .wrap {
    padding-inline: 2rem;
  }
  .site-nav {
    display: block;
  }
  .run pre {
    font-size: 0.78125rem;
  }
  .run pre[data-run="gates"] {
    white-space: pre-wrap;
  }
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem 2.5rem;
  }
  .files {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .files .file {
    height: 20.5rem;
  }
  .files.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .files.wide figure:first-child {
    grid-column: 1 / -1;
  }
  .files.wide .file.code {
    height: auto;
  }
  .files.wide .file {
    height: 24rem;
  }
  .flow {
    grid-template-columns: minmax(0, 1fr) 7.5rem minmax(0, 1fr) 7.5rem minmax(0, 1.2fr) 5rem minmax(0, 1fr);
  }
  .hop svg {
    transform: none;
  }
  .engines {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---- motion: effects.js brings these in; without it they sit where they end ------------------- */
.motion [data-reveal]:not([data-stagger]),
.motion [data-reveal][data-stagger] > *,
.motion .run pre .cmd,
.motion .run pre .out,
.motion .run pre .verdict {
  opacity: 0;
}
.motion [data-logo] .lg-letter,
.motion [data-logo] .lg-pad {
  opacity: 0;
}
.logo .lg-letter,
.logo .lg-pad {
  transform-box: fill-box;
  transform-origin: center;
}
.progress {
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0.8;
}
html:not(.motion) .progress {
  display: none;
}

/* ---- the wordmark ------------------------------------------------------------------------------- */
.brand svg.logo {
  width: auto;
  height: 30px;
  aspect-ratio: 394 / 136;
}
.site-footer .brand svg.logo {
  height: 18px;
}
.closing svg.logo {
  width: auto;
  height: 3.25rem;
  margin-inline: auto;
}

/* ---- the hero's traces ------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.traces {
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  width: 100%;
  height: min(100%, 46rem);
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linejoin: round;
  opacity: 1;
  color: var(--primary);
  mask-image:
    radial-gradient(ellipse 80% 70% at 50% 40%, transparent 30%, black 85%),
    linear-gradient(to bottom, black 60%, transparent);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
}
.traces path {
  stroke-opacity: 0.16;
}
.traces circle {
  fill: var(--background);
  stroke-opacity: 0.3;
  transform-box: fill-box;
  transform-origin: center;
}

/* ---- the example: Herald ---------------------------------------------------------------------- */
.showcase .stage {
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
  padding: 1rem;
  border-radius: 1.5rem;
  background: var(--card);
  box-shadow:
    0 0 0 1px var(--edge),
    var(--shadow);
}
/* The tour: the board in the middle, the labels of 4 of its parts beside it, 2 to a side, 1 of them
   swapped for the next every 3 s, a leader from each part to its label. Beside the board a label
   stands at most half its height and ends in an ellipsis where it is cut (effects.js), so a side's
   2 fit and the board never moves. Under 1024 px the labels stack below the board, 1 to 4, whole,
   and the numbers pair them. */
.tour {
  position: relative;
  gap: 0.75rem;
}
.tour .face {
  grid-area: auto;
  order: -1;
  margin-bottom: 0.5rem;
}
.part-card.has-sheet {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  column-gap: 0.875rem;
  align-items: start;
}
.part-sheet img {
  display: block;
  width: 3.5rem;
  height: auto;
  border-radius: 0.3rem;
  background: #fff;
  box-shadow:
    0 0 0 1px var(--edge),
    0 2px 8px -3px oklch(0 0 0 / 35%);
}
.face {
  grid-area: face;
  min-width: 0;
}
.tour-cards {
  display: contents;
  gap: 0.75rem;
}
.tour-cards[data-cards="left"] {
  grid-area: left;
}
.tour-cards[data-cards="right"] {
  grid-area: right;
}
.part-card {
  order: var(--n, 0);
  padding: 0.875rem 1rem;
  border-radius: 0.875rem;
  background: var(--secondary);
  box-shadow: inset 3px 0 0 var(--tour);
  font-size: 0.8125rem;
  line-height: 1.45;
}
.part-card header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.part-n {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: var(--tour);
  color: var(--tour-ink);
  font-size: 0.75rem;
  font-weight: 600;
}
.part-card b {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 600;
}
.part-v {
  color: var(--muted-foreground);
  overflow-wrap: anywhere;
}
.part-d {
  margin-top: 0.25rem;
  color: var(--muted-foreground);
  overflow-wrap: anywhere;
}
.part-card dl {
  display: grid;
  gap: 0.375rem;
  margin-top: 0.5rem;
}
.part-card dt {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
}
.part-card dd {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
/* A label cut to its room beside the board (effects.js): the text where the room ends keeps the
   lines that fit and ends in an ellipsis; what is under it is left out. */
.part-card [data-cut] {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--lines);
  line-clamp: var(--lines);
  overflow: hidden;
}
.part-card [data-gone] {
  display: none;
}
.part-card [data-last]::after {
  content: " …";
}
.part-ds {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.leaders {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.leaders path {
  fill: none;
  stroke: var(--tour);
  stroke-width: 1.25;
  stroke-linejoin: round;
}
.leaders circle {
  fill: var(--tour);
}
.face-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
/* Herald's stackup, with the copper as the subject: a deep red mask so the tracks stand out, each
   layer in copper of its own depth, the front's with a glow; the parts as faint outlines. */
.face-svg .pcb {
  fill: oklch(0.34 0.12 25);
  stroke: oklch(0.28 0.1 25);
  stroke-width: 0.4;
}
.face-svg .cu-b,
.face-svg .cu-i,
.face-svg .cu-f {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.face-svg .cu-b {
  stroke: oklch(0.66 0.11 45);
  stroke-opacity: 0.45;
}
.face-svg .cu-i {
  stroke: oklch(0.74 0.12 60);
  stroke-opacity: 0.6;
}
.face-svg .cu-f {
  stroke: oklch(0.86 0.14 75);
  filter: drop-shadow(0 0 0.5px oklch(0.86 0.14 75 / 70%));
}
.face-svg .vias circle {
  fill: oklch(0.88 0.13 85);
}
.face-svg .pads rect {
  fill: oklch(0.82 0.12 85 / 85%);
}
.face-svg .body {
  fill: none;
  stroke: oklch(1 0 0 / 22%);
  stroke-width: 0.2;
  stroke-dasharray: 0.8 0.6;
  cursor: pointer;
  pointer-events: all;
  transition:
    stroke 0.3s var(--ease),
    fill 0.3s var(--ease);
}
.face-svg .body:hover {
  stroke: oklch(1 0 0 / 60%);
}
.face-svg .body.on {
  stroke: var(--tour);
  stroke-width: 0.45;
  stroke-dasharray: none;
  fill: color-mix(in oklch, var(--tour) 16%, transparent);
}
.face-svg text {
  fill: oklch(0.97 0.005 85);
  text-anchor: middle;
  font-family: var(--font-sans);
  font-weight: 500;
}
.face-svg .silk {
  fill: oklch(0.97 0.005 85 / 70%);
}
.face-svg .silk-line {
  fill: none;
  stroke: oklch(0.97 0.005 85 / 70%);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.face-svg .silk-fill {
  fill: oklch(0.97 0.005 85 / 70%);
}
.face-svg .tag {
  font-size: 1.6px;
  fill: oklch(1 0 0 / 70%);
}
.face-svg .part-tag {
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: none;
}
.face-svg .part-tag circle {
  fill: var(--tour);
  stroke: oklch(0.15 0.01 260 / 60%);
  stroke-width: 0.2;
}
.face-svg .part-tag text {
  fill: var(--tour-ink);
  font-size: 1.9px;
  font-weight: 600;
}
.hard {
  display: grid;
  gap: 1rem;
  margin-top: 3.5rem;
}
.hard > div {
  padding: 1.25rem;
  border-radius: 1rem;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--edge);
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.hard > div:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px var(--edge),
    var(--shadow);
}
.hard .ref {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
}
.hard h3 {
  margin-top: 0.375rem;
  font-size: 1.0625rem;
  font-weight: 500;
}
.hard p {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}
.renders {
  display: grid;
  gap: 2rem;
  margin-top: 4rem;
  align-items: center;
}
/* The board in 3D: KiCad's picture first, in the same frame the model then fills. The frame's
   gradient is the picture's own background, so the swap does not show. */
.board3d {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1200 / 762;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgb(195 195 220), rgb(163 163 187) 50%, rgb(119 119 144));
  box-shadow:
    0 0 0 1px var(--edge),
    var(--shadow);
}
.board3d-poster,
.board3d model-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.board3d-poster {
  object-fit: cover;
  transition: opacity 0.6s var(--ease);
}
.board3d model-viewer {
  --poster-color: transparent;
  background: transparent;
}
.board3d.is-live .board3d-poster {
  opacity: 0;
  pointer-events: none;
}
.board3d-hint {
  position: absolute;
  left: 1rem;
  bottom: 0.875rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: oklch(0.2 0.01 60 / 45%);
  color: oklch(0.98 0 0);
  font-size: 0.8125rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.board3d.is-live .board3d-hint {
  opacity: 1;
}
.renders-side h3 {
  font-size: 1.25rem;
  font-weight: 500;
}
.renders-side p {
  margin-top: 0.5rem;
  color: var(--muted-foreground);
}
.renders-side .btn {
  margin-top: 1.25rem;
}
.layers-thumb {
  width: 100%;
  height: auto;
  margin-top: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 0 0 1px var(--edge);
  background: #fff;
}
.proof {
  margin-top: 4rem;
}
.built {
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
}
.proj {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--edge);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.proj:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px var(--edge),
    var(--shadow);
}
.proj img {
  width: 100%;
  height: 13rem;
  object-fit: cover;
  background: var(--secondary);
}
.proj > div {
  padding: 1.25rem;
}
.proj h3 {
  font-size: 1.125rem;
  font-weight: 500;
}
.proj p {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}
.proj .spec {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
}
@media (min-width: 640px) {
  .hard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .showcase .stage {
    padding: 1.5rem;
  }
  .tour {
    grid-template-columns: 16.5rem minmax(0, 1fr) 16.5rem;
    grid-template-areas: "left face right";
    align-items: center;
    column-gap: 2.75rem;
    row-gap: 1.25rem;
  }
  .tour .face {
    grid-area: face;
    align-self: start;
    margin-bottom: 0;
  }
  .tour-cards {
    display: grid;
    align-content: center;
  }
  .tour-cards .part-card {
    order: 0;
  }
  .leaders {
    display: block;
  }
  .hard {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .renders {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 3rem;
  }
  .built {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  .built {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* ---- the hero: the wordmark builds itself as a board, then the line, the install, the agents ---- */
.hero > .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  text-align: center;
}
.wm-stage {
  position: relative;
  width: min(100%, 36rem);
}
/* Drafting paper behind the wordmark, fading out at its edges. */
.wm-paper {
  position: absolute;
  inset: -18% -12%;
  z-index: -1;
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.3px);
  background-size: 16px 16px;
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 40%, transparent 100%);
}
.wordmark {
  width: 100%;
  height: auto;
  overflow: visible;
}
.wordmark .wm-sketch {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.wordmark .wm-pt {
  fill: var(--background);
  stroke: var(--primary);
  stroke-width: 2.5;
}
.wordmark .wm-cu,
.wordmark .wm-tr {
  stroke: currentColor;
  stroke-width: 12;
  stroke-linejoin: round;
}
.wordmark .wm-cu {
  fill: currentColor;
}
.wordmark .wm-tr {
  fill: none;
}
/* Still: the finished wordmark on its paper. Moving: effects.js brings each stage in. */
html:not(.motion) .wordmark .wm-sketch,
html:not(.motion) .wordmark .wm-pt,
.motion .wordmark .wm-sketch,
.motion .wordmark .wm-pt,
.motion .wordmark .wm-cu,
.motion .wordmark .wm-tr,
.motion .wm-paper {
  opacity: 0;
}
.wordmark .wm-pt,
.wordmark .wm-cu {
  transform-box: fill-box;
  transform-origin: center;
}
/* The copy is as wide as the page and centres each line; a long command scrolls inside its box. */
.hero-copy {
  width: 100%;
  min-width: 0;
}
.hero-copy > * {
  margin-inline: auto;
}
.hero-line {
  max-width: 48rem;
  margin-top: 2.25rem;
  font-size: clamp(1.625rem, 1.15rem + 1.7vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 500;
  text-wrap: balance;
}
.hero-line em {
  display: block;
  font-style: normal;
  color: var(--primary);
}
.hero .lede {
  max-width: 40rem;
  margin-top: 1rem;
}
.hero .actions {
  align-items: stretch;
  width: 100%;
}
.install {
  width: 100%;
  max-width: 44rem;
  margin-top: 2.25rem;
  border-radius: 1rem;
  background: var(--card);
  box-shadow:
    0 0 0 1px var(--edge),
    var(--shadow);
  text-align: left;
}
.install-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.75rem 0 1.25rem;
}
.install-head .eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
}
.install pre {
  overflow-x: auto;
  padding: 0.625rem 1.25rem 1.125rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  scrollbar-width: thin;
}
.install pre .prompt {
  color: var(--muted-foreground);
  user-select: none;
}
.install .copy {
  position: static;
  flex: none;
}
.install .copy:hover {
  background: var(--secondary);
}
@media (min-width: 640px) {
  .hero .actions {
    width: auto;
    justify-content: center;
  }
}
@media (min-width: 1024px) {
  .hero > .wrap {
    padding-top: 4rem;
  }
}

/* ---- the agents: a strip that drifts sideways, and that a mouse, a finger or the keys move ----- */
.agents {
  width: 100%;
  margin-top: 4.5rem;
}
.agents > .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}
.strip-mask {
  margin-top: 1.5rem;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.strip-mask:has(:focus-visible) {
  mask-image: none;
}
.strip {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
}
.strip::-webkit-scrollbar {
  display: none;
}
.strip[data-dragging] {
  cursor: grabbing;
}
.strip:focus-visible {
  outline-offset: -2px;
}
.strip ul {
  display: flex;
  flex-shrink: 0;
}
.strip li {
  display: flex;
  width: 6.5rem;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  user-select: none;
  -webkit-user-select: none;
}
.strip svg {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--foreground);
  pointer-events: none;
}
.strip span {
  font-size: 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--muted-foreground);
}
.agents > .small {
  max-width: 40rem;
  margin: 1.5rem auto 0;
}

/* ---- drawings: ink on dotted paper, a file's name under each, drawn as they come into view ------ */
.draws {
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
}
.draw {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--edge);
}
.draw .paper {
  display: grid;
  min-height: 14rem;
  flex: 1;
  place-items: center;
  padding: 1.25rem;
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.3px);
  background-size: 14px 14px;
  background-position: 7px 7px;
}
.draw .paper svg {
  width: 100%;
  max-width: 26rem;
  height: auto;
  overflow: visible;
}
.draw .fname {
  padding: 0.5rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted-foreground);
  box-shadow:
    0 -1px 0 var(--edge),
    0 1px 0 var(--edge);
}
.draw .text {
  padding: 1rem 1.25rem 1.375rem;
}
.draw h3 {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}
.draw p {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  text-wrap: pretty;
}
.draw p code {
  font-size: 0.85em;
}
/* A drawing's inks. */
.dwg .s-ink,
.dwg .s-thin,
.dwg .s-faint,
.dwg .s-dim,
.dwg .s-err {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dwg .s-ink {
  stroke: var(--foreground);
  stroke-width: 2;
}
.dwg .s-thin {
  stroke: var(--foreground);
  stroke-width: 1.25;
}
.dwg .s-faint {
  stroke: var(--muted-foreground);
  stroke-width: 1.25;
}
.dwg .s-dim {
  stroke: var(--primary);
  stroke-width: 1.25;
}
.dwg .s-err {
  stroke: var(--status-red);
  stroke-width: 2;
}
.dwg .dash {
  stroke-dasharray: 4 4;
}
.dwg .f-ink {
  fill: var(--foreground);
}
.dwg .f-dim {
  fill: var(--primary);
}
.dwg .f-err {
  fill: var(--status-red);
}
.dwg .f-card {
  fill: var(--card);
}
.dwg .f-band {
  fill: color-mix(in oklch, var(--primary) 12%, transparent);
}
.dwg text {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--muted-foreground);
  paint-order: stroke;
  stroke: var(--card);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.dwg text.t-dim {
  fill: var(--primary);
}
.dwg text.t-err {
  fill: var(--status-red);
}
.dwg text.t-ink {
  fill: var(--foreground);
}
.dwg text.big {
  font-size: 13px;
}
/* Drawn: each stroke marked .d draws from its start, then what is marked .fade comes in. */
.motion .dwg .d {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
}
.motion .dwg .fade {
  opacity: 0;
}
.motion .draw.drawn .d {
  animation: dwg-draw 0.9s cubic-bezier(0.65, 0, 0.35, 1) var(--at, 0s) forwards;
}
.motion .draw.drawn .fade {
  animation: dwg-fade 0.5s ease-out calc(var(--at, 0s) + 0.5s) forwards;
}
@keyframes dwg-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes dwg-fade {
  to {
    opacity: 1;
  }
}
/* A run in a drawing card: what the command printed, in place of a drawing. */
.draw .paper.term {
  place-items: stretch;
  padding: 0;
  background: none;
}
.draw .paper.term pre {
  padding: 1.25rem;
  font-size: 0.75rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.runs {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.runs figure {
  min-width: 0;
}
@media (min-width: 768px) {
  .draws {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .draw.wide {
    grid-column: 1 / -1;
  }
}

/* ---- examples: each board in 3D, a link to its page --------------------------------------------- */
.proj .shot3d {
  display: grid;
  height: 13rem;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% 60%, color-mix(in oklch, var(--primary) 9%, transparent), transparent 70%),
    var(--secondary);
}
.proj .shot3d img {
  width: 92%;
  height: 92%;
  object-fit: contain;
  background: none;
  filter: drop-shadow(0 18px 18px oklch(0 0 0 / 22%));
  transition: transform 0.4s var(--ease);
}
.proj:hover .shot3d img {
  transform: scale(1.04) rotate(-1deg);
}
.proj .meta {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 2rem;
  font-weight: 500;
}
.more svg {
  width: 1rem;
  height: 1rem;
  transition: transform 150ms var(--ease);
}
.more:hover svg {
  transform: translateX(2px);
}
/* A track, drawn as copper is on a fab drawing: an outline, hollow. */
.dwg .trk-o,
.dwg .trk-i {
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.dwg .trk-o {
  stroke: var(--foreground);
  stroke-width: 12;
}
.dwg .trk-i {
  stroke: var(--card);
  stroke-width: 9;
}
.draw .term .run {
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.verdict-side {
  align-self: start;
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--secondary);
}
.verdict-side .verdicts {
  justify-content: flex-start;
  margin-top: 0;
}
.verdict-side p {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  text-wrap: pretty;
}
@media (min-width: 1024px) {
  .runs {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    align-items: start;
  }
}

/* ---- an example's page ---------------------------------------------------------------------------- */
.ex-hero > .wrap {
  padding-top: 3rem;
  padding-bottom: 2rem;
}
.crumb {
  color: var(--primary);
}
.ex-hero .display {
  margin-top: 0.75rem;
}
.ex-tagline {
  margin-top: 0.5rem;
  font-size: var(--text-lede);
  font-weight: 500;
}
.ex-hero .lede {
  max-width: 44rem;
  margin-top: 1rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.chips li {
  padding: 0.3125rem 0.75rem;
  border-radius: 999px;
  background: var(--secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.chips li.ok {
  background: color-mix(in oklch, var(--status-ok) 14%, transparent);
  color: var(--status-ok);
}
.turntable {
  position: relative;
  max-width: 56rem;
  margin: 2rem auto 0;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.turntable[data-dragging] {
  cursor: grabbing;
}
.turntable:focus-visible {
  border-radius: 1rem;
}
.tt-frames {
  aspect-ratio: 616 / 368;
  background-repeat: no-repeat;
}
.tt-hint {
  margin-top: 0.25rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}
.lead {
  max-width: 40rem;
  margin: 2.5rem auto 0;
}
.lead figcaption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}
.stills {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
}
.lead img,
.stills img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 22px oklch(0 0 0 / 18%));
}
.stills figcaption {
  text-align: center;
}
.hard > div h3 {
  margin-top: 0;
}
@media (min-width: 768px) {
  .stills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* The explorer: the board as its file holds it, on a dark canvas in both themes, as KiCad draws it. */
.explorer {
  margin-top: 2.5rem;
}
.ex-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.ex-layers,
.ex-zoom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.ex-tools button {
  display: inline-flex;
  height: 2.25rem;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 0.875rem;
  border-radius: 999px;
  background: var(--background);
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: 0 0 0 1px var(--edge);
}
.ex-tools button[aria-pressed="false"] {
  color: var(--muted-foreground);
}
.ex-tools button i {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 2px;
  background: currentColor;
}
.ex-tools button[data-layer="F.Cu"] i {
  background: var(--cu-f);
}
.ex-tools button[data-layer="In1.Cu"] i {
  background: var(--cu-in1);
}
.ex-tools button[data-layer="In2.Cu"] i {
  background: var(--cu-in2);
}
.ex-tools button[data-layer="B.Cu"] i {
  background: var(--cu-b);
}
.ex-tools button[aria-pressed="false"] i {
  opacity: 0.3;
}
.ex-zoom button {
  min-width: 2.25rem;
  justify-content: center;
}
.ex-view {
  margin-top: 0.75rem;
  overflow: hidden;
  border-radius: 1rem;
  background: oklch(0.17 0.02 250);
  min-height: 12rem;
}
.ex-view svg {
  display: block;
  width: 100%;
  height: auto;
  cursor: grab;
  touch-action: none;
}
.ex-view svg:active {
  cursor: grabbing;
}
.ex-info {
  min-height: 1.6em;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}
:root {
  --cu-f: oklch(0.66 0.19 27);
  --cu-in1: oklch(0.7 0.14 150);
  --cu-in2: oklch(0.8 0.14 85);
  --cu-b: oklch(0.68 0.13 250);
}
.board .edge {
  fill: oklch(0.22 0.025 250);
  stroke: oklch(0.85 0.1 90);
  stroke-width: 0.25;
}
.board .pour {
  fill: var(--cu-in1);
  fill-opacity: 0.14;
}
.board .tracks path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.board [data-layer="F.Cu"] path {
  stroke: var(--cu-f);
}
.board [data-layer="In2.Cu"] path {
  stroke: var(--cu-in2);
  stroke-opacity: 0.85;
}
.board [data-layer="B.Cu"] path {
  stroke: var(--cu-b);
  stroke-opacity: 0.85;
}
.board .vias circle {
  fill: oklch(0.82 0.08 85);
  stroke: oklch(0.17 0.02 250);
  stroke-width: 0.06;
}
.board .part .p {
  fill: oklch(0.83 0.12 85);
}
.board .part[data-side="back"] .p {
  fill: oklch(0.72 0.09 250);
}
.board .part .th {
  fill: oklch(0.83 0.12 85);
}
.board .part .hole {
  fill: oklch(0.12 0.01 250);
  pointer-events: none;
}
.board .part.near-part .p,
.board .part.near-part .th {
  fill: oklch(0.97 0.02 85);
}
.board .refs text {
  font-family: var(--font-mono);
  font-size: 1.1px;
  fill: oklch(0.95 0 0 / 85%);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  paint-order: stroke;
  stroke: oklch(0.17 0.02 250 / 70%);
  stroke-width: 0.25px;
}
.board .tracks path,
.board .vias circle,
.board .part > * {
  transition: opacity 0.2s var(--ease);
}
.board.focus [data-net]:not(.hl),
.board.focus .pour:not(.hl) {
  opacity: 0.12;
}
.board.focus .tracks .hl {
  stroke: oklch(0.98 0.03 95);
  stroke-opacity: 1;
}
.board.focus .vias .hl,
.board.focus .part .hl {
  fill: oklch(0.98 0.03 95);
}
.board.off-FCu [data-layer="F.Cu"],
.board.off-FCu .part[data-side="front"] .p,
.board.off-BCu [data-layer="B.Cu"],
.board.off-BCu .part[data-side="back"] .p,
.board.off-In1Cu [data-layer="In1.Cu"],
.board.off-In2Cu [data-layer="In2.Cu"],
.board.off-refs .refs {
  display: none;
}
.board.off-FCu.off-BCu .part .th,
.board.off-FCu.off-BCu .part .hole {
  display: none;
}

/* The timeline: each step with its date, its stage and what it changed. */
.timeline {
  position: relative;
  display: grid;
  gap: 2.25rem;
  margin-top: 3rem;
  padding-left: 1.5rem;
}
.timeline::before {
  content: "";
  position: absolute;
  inset: 0.5rem auto 0.5rem 0.3125rem;
  width: 1px;
  background: var(--edge);
  box-shadow: 0 0 0 0.5px var(--edge);
}
.timeline > li {
  position: relative;
  display: grid;
  gap: 0.5rem;
}
.timeline > li::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: -1.5rem;
  width: 0.6875rem;
  height: 0.6875rem;
  border-radius: 999px;
  background: var(--background);
  box-shadow:
    inset 0 0 0 2px var(--primary),
    0 0 0 4px var(--background);
}
.tl-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.tl-meta .stage {
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-foreground);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.6875rem;
}
.tl-body {
  max-width: 46rem;
}
.tl-body h3 {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
}
.tl-body p {
  margin-top: 0.5rem;
  color: var(--muted-foreground);
  text-wrap: pretty;
}
.tl-body p.evidence {
  font-size: 0.8125rem;
}
.tl-body .run {
  margin-top: 1rem;
}
.open {
  display: grid;
  gap: 1rem;
  max-width: 50rem;
  margin-top: 2.5rem;
  list-style: disc;
  padding-left: 1.25rem;
}
.open li {
  color: var(--muted-foreground);
  text-wrap: pretty;
}
.open li b {
  font-weight: 500;
  color: var(--foreground);
}
.open + .actions {
  margin-top: 2.5rem;
}
@media (min-width: 768px) {
  .timeline > li {
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 1.5rem;
  }
  .tl-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
    padding-top: 0.2rem;
  }
}
/* On a phone the traces would run behind the headline. */
@media (max-width: 639px) {
  .traces {
    display: none;
  }
}

/* The owner's headline, on 3 lines in title case (docs/STYLE.md, the website). */
.hero-title {
  margin-top: 0.5rem;
  font-size: var(--text-display);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
}
.hero-copy > .eyebrow {
  margin-top: 2rem;
}

/* An example's checks: each gate, or each board, with what its last run printed. */
.checks-run {
  margin-top: 2.5rem;
}
.checks {
  display: grid;
  gap: 0.5rem;
  max-width: 46rem;
}
.checks li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.875rem 1.125rem;
  border-radius: 0.75rem;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--edge);
}
.checks li span {
  font-weight: 500;
}
.checks li b {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted-foreground);
}
.tl-meta .step {
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Inner copper layers past the second, for boards of 6 layers and more. */
:root {
  --cu-in3: oklch(0.7 0.13 300);
  --cu-in4: oklch(0.75 0.11 200);
  --cu-in5: oklch(0.72 0.12 330);
  --cu-in6: oklch(0.78 0.12 120);
  --cu-in7: oklch(0.7 0.1 50);
  --cu-in8: oklch(0.75 0.08 260);
}
.board [data-layer="In3.Cu"] path,
.board .pour[data-layer="In3.Cu"] {
  stroke: var(--cu-in3);
  fill: var(--cu-in3);
}
.board [data-layer="In4.Cu"] path,
.board .pour[data-layer="In4.Cu"] {
  stroke: var(--cu-in4);
  fill: var(--cu-in4);
}
.board [data-layer="In5.Cu"] path,
.board .pour[data-layer="In5.Cu"] {
  stroke: var(--cu-in5);
  fill: var(--cu-in5);
}
.board [data-layer="In6.Cu"] path,
.board .pour[data-layer="In6.Cu"] {
  stroke: var(--cu-in6);
  fill: var(--cu-in6);
}
.board [data-layer="In7.Cu"] path,
.board .pour[data-layer="In7.Cu"] {
  stroke: var(--cu-in7);
  fill: var(--cu-in7);
}
.board [data-layer="In8.Cu"] path,
.board .pour[data-layer="In8.Cu"] {
  stroke: var(--cu-in8);
  fill: var(--cu-in8);
}
.board .tracks path {
  fill: none;
}
.board .pour {
  stroke: none;
}
.board .pour[data-layer="F.Cu"] {
  fill: var(--cu-f);
}
.board .pour[data-layer="B.Cu"] {
  fill: var(--cu-b);
}
.board .pour[data-layer="In2.Cu"] {
  fill: var(--cu-in2);
}
.ex-tools button[data-layer="In3.Cu"] i {
  background: var(--cu-in3);
}
.ex-tools button[data-layer="In4.Cu"] i {
  background: var(--cu-in4);
}
.ex-tools button[data-layer="In5.Cu"] i {
  background: var(--cu-in5);
}
.ex-tools button[data-layer="In6.Cu"] i {
  background: var(--cu-in6);
}
.ex-tools button[data-layer="In7.Cu"] i {
  background: var(--cu-in7);
}
.ex-tools button[data-layer="In8.Cu"] i {
  background: var(--cu-in8);
}
