/* Svhapes demo — technical-minimal reskin (reference lane: essential.com)
   Canvas: flat light gray. Ink: near-black. One yellow accent per view.
   Display: Doto (dot matrix). Everything else: Geist Mono. */

:root {
  color-scheme: light;
  --paper: oklch(95.8% 0.002 95);
  --paper-2: oklch(92.6% 0.002 95);
  --card: oklch(99.3% 0.001 95);
  --ink: oklch(24% 0.005 95);
  --ink-2: oklch(46% 0.004 95);
  --faint: oklch(68% 0.003 95);
  --line: oklch(24% 0.005 95 / 0.14);
  --accent: oklch(86% 0.169 92);
  --radius: 6px;
  --page: min(1180px, calc(100vw - 40px));
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-dot: "Doto", var(--font-mono);
  font-family: var(--font-mono);
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-width: 320px;
  font-size: 14px;
  line-height: 1.7;
  background: var(--paper);
}

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

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 120ms ease-out;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- shared microtype ---------- */

.eyebrow {
  margin: 0 0 1rem;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* Flatten the library's default drop shadows: this look is flat. */
.svhape-shadow {
  --svhape-shadow: drop-shadow(0 1px 1px oklch(24% 0.005 95 / 0.1));
}

/* ---------- fills: mono + dither, one accent ---------- */

.fill-ink {
  background-color: var(--ink);
  color: var(--paper);
}

.fill-gray {
  background-color: var(--paper-2);
  color: var(--ink);
}

.fill-dither-light {
  background-color: var(--card);
  background-image: radial-gradient(oklch(24% 0.005 95 / 0.5) 1px, transparent 1.1px);
  background-size: 4px 4px;
  color: var(--ink);
}

.fill-dither-dark {
  background-color: var(--ink);
  background-image: radial-gradient(oklch(95.8% 0.002 95 / 0.38) 1px, transparent 1.1px);
  background-size: 4px 4px;
  color: var(--paper);
}

.fill-accent {
  background-color: var(--accent);
  color: var(--ink);
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: var(--page);
  margin: 0 auto;
  padding: 1.4rem 0 1.2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-dot);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.wordmark-mark {
  display: none;
}

.site-header nav {
  display: flex;
  gap: 1.6rem;
}

.site-header nav a {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
}

.site-header nav a:hover {
  color: var(--ink);
}

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: var(--page);
  margin: clamp(2.5rem, 7vh, 5rem) auto 0;
}

.hero-wordmark {
  margin: 0;
  font-family: var(--font-dot);
  font-size: clamp(3.4rem, 12.5vw, 10rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  user-select: none;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(1.6rem, 4vh, 3rem);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-dot);
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-lead {
  max-width: 58ch;
  margin: 1.4rem 0 0;
  font-size: 13px;
  color: var(--ink-2);
}

.hero-stage {
  position: relative;
  width: min(720px, 100%);
  height: clamp(280px, 44vw, 400px);
  margin-top: clamp(2rem, 5vh, 3.5rem);
}

.hero-shape {
  position: absolute;
}

.hero-shape .svhape {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.hero-shape-back {
  left: 2%;
  top: 14%;
  width: 36%;
  height: 62%;
  transform: rotate(-5deg);
}

.hero-shape-middle {
  right: 3%;
  top: 8%;
  width: 34%;
  height: 58%;
  transform: rotate(4deg);
}

.hero-shape-front {
  left: 50%;
  top: 6%;
  width: 46%;
  height: 88%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero-shape-front .svhape span {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-shape-front .svhape strong {
  font-family: var(--font-dot);
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: clamp(2rem, 5vh, 3rem);
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.3rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--card);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease-out, color 120ms ease-out;
}

.button:hover {
  background: var(--ink);
  color: var(--paper);
}

.button-primary {
  background: var(--ink);
  color: var(--paper);
}

.button-primary:hover {
  background: var(--card);
  color: var(--ink);
}

/* ---------- support strip ---------- */

.support-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem 2.6rem;
  width: var(--page);
  margin: clamp(3rem, 9vh, 6rem) auto 0;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.support-strip span {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.support-strip span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

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

main > section {
  width: var(--page);
  margin: clamp(4rem, 11vh, 7.5rem) auto 0;
}

.section-heading {
  max-width: 640px;
  margin: 0 auto 2.6rem;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--font-dot);
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-heading p:not(.eyebrow) {
  margin: 1.2rem 0 0;
  font-size: 13px;
  color: var(--ink-2);
}

/* ---------- use section ---------- */

.code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  max-width: 880px;
  margin: 0 auto;
}

.code-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.code-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
}

.code-panel header span {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.code-panel pre {
  margin: 0;
  padding: 1.1rem 1rem 1.3rem;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.7;
}

.code-panel button,
.agent-command button,
.shape-actions button {
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 120ms ease-out, color 120ms ease-out, border-color 120ms ease-out;
}

.code-panel button:hover,
.agent-command button:hover,
.shape-actions button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.support-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  max-width: 880px;
  margin: 1.6rem auto 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.support-note::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}

.support-note[data-supported="true"]::before {
  background: var(--ink);
}

/* ---------- motion ---------- */

.motion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.motion-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: var(--card);
}

.motion-preview {
  display: grid;
  min-height: 270px;
  place-items: center;
  padding: 1.3rem;
  background: var(--paper);
}

.motion-preview > .svhape {
  display: flex;
  width: min(220px, 100%);
  aspect-ratio: 1.32;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 2rem;
  text-align: center;
}

.motion-preview > .svhape span {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
}

.motion-preview > .svhape strong {
  font-family: var(--font-dot);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.motion-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.1rem 1.2rem 1.2rem;
  border-top: 1px solid var(--line);
}

.motion-label {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.motion-card-body > p:not(.motion-label) {
  min-height: 4.8em;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
}

.motion-code {
  flex: 1;
  min-height: 10.5rem;
  margin: 0;
  padding: 0.85rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.motion-card-body > button {
  align-self: flex-start;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 120ms ease-out, color 120ms ease-out, border-color 120ms ease-out;
}

.motion-card-body > button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.motion-note {
  max-width: 860px;
  margin: 1.6rem auto 0;
  padding: 0.9rem 1rem;
  border-left: 2px solid var(--ink);
  background: var(--paper-2);
  font-size: 11px;
  line-height: 1.65;
  color: var(--ink-2);
}

.motion-note strong {
  color: var(--ink);
}

@media (prefers-reduced-motion: no-preference) {
  .svhape-motion--float {
    animation: svhapes-float 5s ease-in-out infinite;
  }

  .svhape-motion--hover {
    transition: transform 220ms ease, filter 220ms ease;
  }

  .svhape-motion--hover:hover,
  .svhape-motion--hover:focus-visible {
    transform: translateY(-5px) rotate(-0.5deg);
  }
}

@keyframes svhapes-float {
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@supports (clip-path: shape(from 0 0, line to 100% 0, close)) {
  @media (prefers-reduced-motion: no-preference) {
    .svhape-motion--morph {
      animation: svhapes-morph 6s ease-in-out infinite alternate;
    }
  }

  @keyframes svhapes-morph {
    from {
      clip-path: shape(from 8% 12%, curve to 30% 5% with 11.5% 4.83% / 22.33% 5.5%, curve to 54% 9% with 37.67% 4.5% / 46% 9.17%, curve to 78% 4% with 62% 8.83% / 71.33% 3.33%, curve to 94% 13% with 84.67% 4.67% / 91.67% 5.33%, curve to 92% 50% with 96.33% 20.67% / 91.83% 37.5%, curve to 95% 88% with 92.17% 62.5% / 98.67% 80.67%, curve to 70% 94% with 91.33% 95.33% / 78% 93.67%, curve to 47% 90% with 62% 94.33% / 54.83% 89.67%, curve to 23% 96% with 39.17% 90.33% / 30% 97%, curve to 5% 84% with 16% 95% / 7.33% 92%, curve to 9% 48% with 2.67% 76% / 8.5% 60%, curve to 8% 12% with 9.5% 36% / 4.5% 19.17%, close);
    }

    to {
      clip-path: shape(from 5% 21%, curve to 24% 4% with 7% 13.17% / 16.5% 5.5%, curve to 50% 12% with 31.5% 2.5% / 41.33% 12.17%, curve to 76% 3% with 58.67% 11.83% / 68.5% 1.5%, curve to 95% 21% with 83.5% 4.5% / 93% 13.5%, curve to 88% 48% with 97% 28.5% / 87.83% 38.33%, curve to 96% 79% with 88.17% 57.67% / 99.17% 70.83%, curve to 69% 97% with 92.83% 87.17% / 76.67% 95.83%, curve to 50% 86% with 61.33% 98.17% / 56.83% 85.83%, curve to 28% 98% with 43.17% 86.17% / 35.83% 99.17%, curve to 3% 79% with 20.17% 96.83% / 5.67% 86.83%, curve to 12% 51% with 0.33% 71.17% / 11.67% 60.67%, curve to 5% 21% with 12.33% 41.33% / 3% 28.83%, close);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .svhape-motion--float,
  .svhape-motion--morph {
    animation: none;
  }

  .svhape-motion--hover {
    transition: none;
  }
}

/* ---------- geometry builders ---------- */

.builder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.builder-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: var(--card);
}

.builder-preview {
  display: grid;
  min-height: 230px;
  place-items: center;
  padding: 1.3rem;
  background: var(--paper);
}

.builder-preview > .svhape {
  display: grid;
  width: min(220px, 100%);
  aspect-ratio: 1.4;
  place-items: center;
  padding: 1.4rem;
}

.builder-preview--squircle > .svhape {
  aspect-ratio: 1;
}

.builder-preview strong {
  font-family: var(--font-dot);
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.builder-card-body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.1rem 1.2rem 1.2rem;
  border-top: 1px solid var(--line);
}

.builder-label {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.builder-card-body > p:not(.builder-label) {
  min-height: 4.8em;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
}

.builder-code {
  flex: 1;
  min-height: 10rem;
  margin: 0;
  padding: 0.85rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.builder-card-body > button {
  align-self: flex-start;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 120ms ease-out, color 120ms ease-out, border-color 120ms ease-out;
}

.builder-card-body > button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.builder-note {
  max-width: 900px;
  margin: 1.6rem auto 0;
  padding: 0.9rem 1rem;
  border-left: 2px solid var(--ink);
  background: var(--paper-2);
  font-size: 11px;
  line-height: 1.65;
  color: var(--ink-2);
}

.builder-note a {
  text-underline-offset: 0.18em;
}

/* ---------- catalog ---------- */

.catalog-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.catalog-heading [data-results-count] {
  margin: 0.8rem 0 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.catalog-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 2.2rem;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: min(430px, 100%);
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--card);
}

.search-field svg {
  flex: none;
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.search-field input {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: var(--ink);
}

.search-field input:focus {
  outline: none;
}

.search-field:focus-within {
  border-color: var(--ink);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.filter-button {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink-2);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 120ms ease-out, color 120ms ease-out, border-color 120ms ease-out;
}

.filter-button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.filter-button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* spec-sheet grid: hairline gaps over the line color */
.shape-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

/* fill the trailing cells of a partial last row so the line color
   never shows as a solid block */
.shape-grid::after {
  content: "";
  grid-column: auto / -1;
  background: var(--card);
}

.shape-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
}

.shape-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.6rem 1.4rem;
  background: var(--paper);
}

.shape-preview-shadow {
  width: 100%;
}

.shape-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  height: 205px;
  padding: var(--preview-padding, 20px);
  text-align: center;
}

.shape-preview span {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}

.shape-preview strong {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  max-width: 18ch;
}

.shape-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.1rem 1.2rem 1.2rem;
  border-top: 1px solid var(--line);
}

.shape-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.shape-card-title h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shape-id {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.shape-description {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
}

.shape-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.shape-meta span:not(:last-child)::after {
  content: "·";
  margin: 0 0.55rem;
}

.shape-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.empty-results {
  margin-top: 2.4rem;
  text-align: center;
}

.empty-results h3 {
  margin: 0;
  font-family: var(--font-dot);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.empty-results p {
  margin: 0.6rem 0 0;
  font-size: 12px;
  color: var(--ink-2);
}

.catalog-error {
  grid-column: 1 / -1;
  margin: 0;
  padding: 2rem;
  font-size: 12px;
  color: var(--ink-2);
  text-align: center;
}

/* ---------- agents ---------- */

.agents-section {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.agents-stage {
  height: clamp(260px, 34vw, 380px);
}

.agents-stage .svhape {
  width: 100%;
  height: 100%;
}

.agents-copy h2 {
  margin: 0;
  font-family: var(--font-dot);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.agents-copy > p:not(.eyebrow) {
  margin: 1.2rem 0 0;
  font-size: 13px;
  color: var(--ink-2);
  max-width: 52ch;
}

.agent-links {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.agent-links li {
  border-top: 1px solid var(--line);
}

.agent-links li:last-child {
  border-bottom: 1px solid var(--line);
}

.agent-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.2rem;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}

.agent-links a:hover {
  background: var(--card);
}

.agent-links a span {
  color: var(--faint);
}

.agent-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.4rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.agent-command code {
  font-size: 12px;
  overflow-x: auto;
  white-space: nowrap;
}

/* ---------- maker ---------- */

.maker-code {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 12.5px;
  line-height: 1.8;
  overflow-x: auto;
}

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

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  width: var(--page);
  margin: clamp(4.5rem, 12vh, 8rem) auto 0;
  padding: 2.6rem 0 2.8rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-wordmark {
  font-family: var(--font-dot);
  font-size: clamp(2.6rem, 9vw, 6.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: oklch(24% 0.005 95 / 0.22);
}

.footer-wordmark:hover {
  color: var(--ink);
}

footer p {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

footer div {
  display: flex;
  gap: 1.6rem;
}

footer div a {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
}

footer div a:hover {
  color: var(--ink);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  z-index: 30;
  transform: translate(-50%, 0.6rem);
  padding: 0.65rem 1.1rem;
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease-out, transform 140ms ease-out;
}

.toast[data-visible="true"] {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .skip-link,
  .button,
  .filter-button,
  .code-panel button,
  .agent-command button,
  .shape-actions button {
    transition: none;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .agents-section {
    /* minmax(0, 1fr): a plain 1fr's min-content sizing lets the nowrap
       agent command force the column past the viewport */
    grid-template-columns: minmax(0, 1fr);
  }

  .agents-stage {
    order: 2;
    margin-top: 1.6rem;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    gap: 0.9rem;
  }

  .site-header nav {
    width: 100%;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
  }

  .hero-stage {
    height: 300px;
  }

  .hero-shape-back {
    left: 0;
    width: 44%;
  }

  .hero-shape-middle {
    right: 0;
    width: 42%;
  }

  .hero-shape-front {
    width: 58%;
  }

  .shape-grid {
    grid-template-columns: 1fr;
  }

  .motion-grid {
    grid-template-columns: 1fr;
  }

  .builder-grid {
    grid-template-columns: 1fr;
  }

  .motion-preview {
    min-height: 230px;
  }
}
