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

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

:root {
  --paper: #efe9df;
  --paper-deep: #e4ddd2;
  --surface: #f7f3ec;
  --surface-strong: #fffdf9;
  --ink: #1c1d1a;
  --ink-soft: #3f413c;
  --muted: #74736d;
  --line: rgba(28, 29, 26, 0.14);
  --line-strong: rgba(28, 29, 26, 0.28);
  --accent: #d84a2c;
  --accent-deep: #8d2817;
  --signal: #dfff45;
  --dark: #151714;
  --dark-soft: #20231f;
  --white: #fffdf8;
  --radius-sm: 7px;
  --radius-md: 14px;
  --radius-lg: 26px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-height: 68px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope Variable", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

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

button {
  color: inherit;
}

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

img,
canvas {
  display: block;
}

[hidden] {
  display: none !important;
}

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

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

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-150%);
}

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

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 28px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(239, 233, 223, 0.9);
  backdrop-filter: blur(18px) saturate(0.9);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
  font-family: "Archivo Variable", sans-serif;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: -0.025em;
}

.brand em {
  padding-left: 9px;
  border-left: 1px solid var(--line-strong);
  color: var(--accent);
  font-family: "Manrope Variable", sans-serif;
  font-size: 9px;
  font-style: normal;
  font-weight: 760;
  letter-spacing: 0.12em;
}

.brand-mark {
  width: 24px;
  height: 24px;
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.brand-mark i {
  display: block;
  width: 100%;
  background: var(--ink);
}

.brand-mark i:nth-child(1) {
  height: 5px;
}

.brand-mark i:nth-child(2) {
  height: 10px;
}

.brand-mark i:nth-child(3) {
  height: 7px;
}

.view-tabs {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.view-tabs button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 670;
  transition:
    color 180ms ease,
    background 180ms ease;
}

.view-tabs button span {
  min-width: 26px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(28, 29, 26, 0.07);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
}

.view-tabs button:hover,
.view-tabs button.is-active {
  background: var(--surface);
  color: var(--ink);
}

.view-tabs button.is-active span {
  background: var(--accent);
  color: #fff;
}

.header-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 720;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.header-link:hover {
  background: var(--ink);
  color: var(--white);
}

.hero {
  position: relative;
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.45fr);
  align-items: end;
  gap: clamp(50px, 8vw, 130px);
  overflow: hidden;
  padding: 108px clamp(28px, 6vw, 110px) 78px;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  top: 104px;
  right: 8vw;
  width: clamp(220px, 29vw, 470px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow:
    0 0 0 45px rgba(28, 29, 26, 0.025),
    0 0 0 90px rgba(28, 29, 26, 0.018);
}

.hero::after {
  content: "MCP";
  position: absolute;
  top: 106px;
  right: 6vw;
  color: transparent;
  -webkit-text-stroke: 1px rgba(28, 29, 26, 0.06);
  font-family: "Archivo Variable", sans-serif;
  font-size: clamp(120px, 21vw, 360px);
  font-weight: 800;
  letter-spacing: -0.1em;
  line-height: 0.78;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(28, 29, 26, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 29, 26, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.hero-copy,
.hero-stats {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 34px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.13em;
}

.eyebrow i {
  width: 44px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  max-width: 1040px;
  margin: 0;
  font-family: "Archivo Variable", sans-serif;
  font-size: clamp(70px, 9vw, 150px);
  font-weight: 640;
  letter-spacing: -0.085em;
  line-height: 0.78;
}

.hero h1 em,
.integration-panel h2 em {
  color: var(--accent);
  font-family: Georgia, serif;
  font-weight: 400;
}

.hero-lede {
  max-width: 660px;
  margin: 40px 0 0;
  color: var(--ink-soft);
  font-size: clamp(13px, 1.2vw, 17px);
  line-height: 1.65;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line);
}

.hero-stats div {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-stats dt {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-stats dd {
  margin: 0;
  font-family: "Archivo Variable", sans-serif;
  font-size: clamp(28px, 3vw, 48px);
  font-weight: 650;
  letter-spacing: -0.055em;
}

.protocol-strip {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--dark);
  color: rgba(255, 255, 255, 0.72);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.06em;
}

.protocol-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.protocol-status i,
.inspector-heading p i {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(223, 255, 69, 0.1);
}

.protocol-strip code {
  color: var(--signal);
}

.protocol-strip button {
  justify-self: end;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
}

.protocol-strip button:hover {
  color: #fff;
}

.workspace {
  display: grid;
  grid-template-columns: 232px minmax(500px, 1fr) minmax(360px, 0.72fr);
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.filter-rail {
  min-width: 0;
  min-height: calc(100vh - var(--header-height));
  padding: 27px 20px 40px;
  border-right: 1px solid var(--line);
}

.filter-search label,
.filter-group > p {
  display: block;
  margin: 0 0 9px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.filter-search > span {
  min-height: 42px;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.filter-search svg {
  width: 16px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
}

.filter-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 10px;
}

.filter-search input::placeholder {
  color: #99978e;
}

.filter-search kbd {
  min-width: 20px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  text-align: center;
}

.filter-group {
  margin-top: 30px;
}

.filter-options {
  display: grid;
  max-height: 310px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(28, 29, 26, 0.2) transparent;
}

.filter-options button {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid rgba(28, 29, 26, 0.08);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  text-align: left;
}

.filter-options button span:last-child {
  color: #a29f96;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
}

.filter-options button:hover,
.filter-options button.is-active {
  color: var(--ink);
}

.filter-options button.is-active {
  background: rgba(216, 74, 44, 0.08);
}

.filter-options button.is-active::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}

.filter-options button.is-active span:first-child {
  margin-right: auto;
}

.rights-card {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 30px;
  padding: 12px;
  border: 1px solid rgba(44, 111, 79, 0.25);
  border-radius: var(--radius-sm);
  background: #e4eee7;
  color: #3f6552;
}

.rights-card > span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 9px;
}

.rights-card p {
  margin: 0;
  font-size: 8px;
  line-height: 1.55;
}

.rights-card strong {
  display: block;
  margin-bottom: 2px;
}

.rail-endpoint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.rail-endpoint:hover {
  color: var(--ink);
}

.catalog-panel {
  min-width: 0;
  padding: 28px;
}

.catalog-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.catalog-toolbar p,
.integration-panel > header > p {
  margin: 0 0 7px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.catalog-toolbar h2,
.inspector-heading h2 {
  margin: 0;
  font-family: "Archivo Variable", sans-serif;
  font-size: 24px;
  font-weight: 640;
  letter-spacing: -0.045em;
}

.sort-control {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.sort-control select {
  max-width: 132px;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
}

.catalog-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.component-workflow {
  margin-top: 15px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.component-workflow > header {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(170px, 0.75fr);
  gap: 20px;
  align-items: end;
  padding: 14px 15px 13px;
}

.component-workflow > header span,
.component-workflow-steps button > span {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  font-weight: 650;
  letter-spacing: 0.11em;
}

.component-workflow > header h3 {
  max-width: 390px;
  margin: 5px 0 0;
  font-family: "Archivo Variable", sans-serif;
  font-size: 17px;
  font-weight: 640;
  letter-spacing: -0.035em;
}

.component-workflow > header p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.component-workflow-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.component-workflow-steps button {
  position: relative;
  min-height: 116px;
  padding: 14px 42px 14px 15px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition:
    color 220ms var(--ease),
    background-color 220ms var(--ease);
}

.component-workflow-steps button + button {
  border-left: 1px solid var(--line-strong);
}

.component-workflow-steps button:nth-child(2) {
  background: var(--dark);
  color: var(--white);
}

.component-workflow-steps button:hover,
.component-workflow-steps button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--white);
}

.component-workflow-steps button:nth-child(2) > span {
  color: var(--signal);
}

.component-workflow-steps button:hover > span,
.component-workflow-steps button[aria-pressed="true"] > span {
  color: var(--white);
}

.component-workflow-steps strong,
.component-workflow-steps small {
  display: block;
}

.component-workflow-steps strong {
  margin-top: 14px;
  font-family: "Archivo Variable", sans-serif;
  font-size: 14px;
  font-weight: 640;
  letter-spacing: -0.025em;
}

.component-workflow-steps small {
  max-width: 230px;
  margin-top: 5px;
  color: currentColor;
  font-size: 8px;
  line-height: 1.4;
  opacity: 0.66;
}

.component-workflow-steps em {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  font-style: normal;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-top: 15px;
}

.model-card,
.component-card,
.image-card,
.background-card {
  min-width: 0;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition:
    transform 300ms var(--ease),
    border-color 180ms ease,
    box-shadow 300ms var(--ease);
}

.model-card:hover,
.component-card:hover,
.image-card:hover,
.background-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 36px rgba(28, 29, 26, 0.09);
}

.model-card.is-selected,
.component-card.is-selected,
.image-card.is-selected,
.background-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.image-card-visual,
.image-stage {
  background-color: #ded9cf;
  background-image:
    linear-gradient(45deg, rgba(28, 29, 26, 0.055) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(28, 29, 26, 0.055) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(28, 29, 26, 0.055) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(28, 29, 26, 0.055) 75%);
  background-position:
    0 0,
    0 12px,
    12px -12px,
    -12px 0;
  background-size: 24px 24px;
}

.image-card-visual {
  position: relative;
  aspect-ratio: 1.18;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.image-card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.image-card-visual img {
  width: 76%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(28, 29, 26, 0.12));
  transition: transform 320ms var(--ease);
}

.image-card-tile {
  position: absolute;
  inset: 0;
  background-color: #ded9cf;
  background-position: center;
  background-repeat: repeat;
  background-size: 92px auto;
  opacity: 0.72;
  transition:
    opacity 320ms var(--ease),
    transform 520ms var(--ease);
}

.image-card-visual.is-tile-preview img {
  visibility: hidden;
}

.image-card:hover .image-card-tile {
  opacity: 0.9;
  transform: scale(1.04);
}

.image-card-visual.is-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.image-card:hover .image-card-visual img {
  transform: scale(1.045);
}

.image-card.is-pixel-art .image-card-visual img {
  image-rendering: pixelated;
}

.image-card-pack,
.image-card-format {
  position: absolute;
  z-index: 2;
  top: 9px;
  padding: 5px 6px;
  border: 1px solid rgba(28, 29, 26, 0.12);
  border-radius: 4px;
  background: rgba(244, 240, 232, 0.78);
  color: var(--muted);
  backdrop-filter: blur(8px);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.image-card-pack {
  left: 9px;
  max-width: calc(100% - 58px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-card-format {
  right: 9px;
}

.card-media {
  position: relative;
  aspect-ratio: 1.15;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-color: #e3ded4;
  background-image:
    linear-gradient(rgba(28, 29, 26, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 29, 26, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

.card-media::after {
  content: "";
  position: absolute;
  right: 18%;
  bottom: 8%;
  left: 18%;
  height: 10%;
  border-radius: 50%;
  background: rgba(28, 29, 26, 0.15);
  filter: blur(12px);
}

.card-media img {
  position: relative;
  z-index: 1;
  width: 78%;
  height: 78%;
  object-fit: contain;
  transition: transform 450ms var(--ease);
}

.model-card:hover .card-media img {
  transform: scale(1.055) rotate(-1deg);
}

.card-grade,
.card-source {
  position: absolute;
  z-index: 3;
  top: 9px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border: 1px solid rgba(28, 29, 26, 0.2);
  border-radius: 4px;
  background: rgba(255, 253, 248, 0.82);
  backdrop-filter: blur(8px);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  font-weight: 780;
}

.card-grade {
  left: 9px;
}

.card-source {
  right: 9px;
  color: var(--muted);
}

.card-grade[data-grade="A+"] {
  background: var(--signal);
}

.card-grade[data-grade="C"] {
  background: #f1c8b9;
}

.card-copy {
  padding: 12px;
}

.card-copy h3 {
  overflow: hidden;
  margin: 0;
  font-family: "Archivo Variable", sans-serif;
  font-size: 13px;
  font-weight: 640;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-copy > p {
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: #84827a;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.background-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.background-card-visual {
  --background-hue: 220;
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 154px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(
      circle at 72% 28%,
      hsl(var(--background-hue) 78% 68% / 0.92),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      hsl(calc(var(--background-hue) + 30) 42% 16%),
      hsl(calc(var(--background-hue) - 45) 48% 8%)
    );
  isolation: isolate;
}

.background-card-visual::before,
.background-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -24%;
  background:
    repeating-linear-gradient(
      115deg,
      transparent 0 18px,
      hsl(var(--background-hue) 85% 66% / 0.12) 18px 20px
    ),
    radial-gradient(
      circle at 35% 64%,
      hsl(calc(var(--background-hue) + 100) 86% 60% / 0.52),
      transparent 32%
    );
  transform: rotate(-8deg) scale(1.08);
}

.background-card-visual[data-pattern="1"]::before,
.background-stage[data-pattern="1"]::before {
  background:
    conic-gradient(
      from 48deg at 55% 45%,
      transparent,
      hsl(var(--background-hue) 90% 65% / 0.6),
      transparent 35%
    ),
    repeating-radial-gradient(
      circle at center,
      transparent 0 18px,
      hsl(calc(var(--background-hue) + 70) 70% 70% / 0.16) 19px 21px
    );
}

.background-card-visual[data-pattern="2"]::before,
.background-stage[data-pattern="2"]::before {
  background:
    linear-gradient(
      90deg,
      transparent 18%,
      hsl(var(--background-hue) 90% 64% / 0.46) 18% 24%,
      transparent 24% 62%,
      hsl(calc(var(--background-hue) + 120) 88% 62% / 0.36) 62% 70%,
      transparent 70%
    ),
    linear-gradient(
      hsl(var(--background-hue) 80% 68% / 0.12) 1px,
      transparent 1px
    );
  background-size: auto, 100% 16px;
}

.background-card-visual[data-pattern="3"]::before,
.background-stage[data-pattern="3"]::before {
  background:
    radial-gradient(ellipse at 20% 50%, #fff4, transparent 26%),
    radial-gradient(
      ellipse at 80% 42%,
      hsl(var(--background-hue) 90% 64% / 0.68),
      transparent 30%
    ),
    linear-gradient(24deg, transparent 38%, #fff2 39% 41%, transparent 42%);
  filter: blur(8px);
}

.background-card-visual[data-pattern="4"]::before,
.background-stage[data-pattern="4"]::before {
  background:
    repeating-conic-gradient(
      from 15deg,
      transparent 0 8deg,
      hsl(var(--background-hue) 82% 62% / 0.22) 8deg 10deg
    );
  transform: scale(0.78);
  border-radius: 50%;
}

.background-card-visual[data-pattern="5"]::before,
.background-stage[data-pattern="5"]::before {
  background:
    linear-gradient(135deg, transparent 40%, #fff3 41% 43%, transparent 44%),
    linear-gradient(
      45deg,
      hsl(var(--background-hue) 88% 60% / 0.42),
      transparent 62%
    );
  clip-path: polygon(0 20%, 76% 0, 100% 74%, 24% 100%);
}

.background-card-visual[data-pattern="6"]::before,
.background-stage[data-pattern="6"]::before {
  background-image:
    linear-gradient(hsl(var(--background-hue) 90% 65% / 0.18) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--background-hue) 90% 65% / 0.18) 1px, transparent 1px);
  background-size: 22px 22px;
  transform: perspective(300px) rotateX(50deg) scale(1.5);
}

.background-card-visual[data-pattern="7"]::before,
.background-stage[data-pattern="7"]::before {
  background:
    radial-gradient(circle at 20% 30%, #fff8 0 2px, transparent 3px),
    radial-gradient(
      circle at 70% 62%,
      hsl(var(--background-hue) 90% 70%) 0 3px,
      transparent 4px
    );
  background-size: 34px 34px, 52px 52px;
  filter: blur(0.4px);
}

.background-card-visual::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background: linear-gradient(180deg, #080b0905 42%, #080b09d9);
  pointer-events: none;
}

.background-card-visual img,
.background-card-visual video {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.background-card-visual img {
  transition: opacity 220ms ease;
}

.background-card-visual video {
  opacity: 0;
  transition: opacity 220ms ease;
}

.background-card.is-previewing .background-card-visual video {
  opacity: 1;
}

.background-card.is-previewing .background-card-visual img {
  opacity: 0;
}

.background-card-index,
.background-card-format,
.background-card-action {
  position: absolute;
  z-index: 3;
  color: rgba(255, 255, 255, 0.78);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 6px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}

.background-card-index {
  top: 10px;
  left: 10px;
}

.background-card-format {
  top: 10px;
  right: 10px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(10, 12, 10, 0.28);
  backdrop-filter: blur(6px);
}

.background-card-action {
  bottom: 10px;
  left: 10px;
}

.background-card.is-unavailable {
  opacity: 0.62;
}

.background-card.is-unavailable .background-card-visual {
  filter: grayscale(1);
}

.component-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.component-card-visual {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--pv-bg);
}

.external-component-preview {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: #08090a;
}

.external-component-preview::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  height: 36%;
  background: linear-gradient(to top, rgba(4, 5, 6, 0.76), transparent);
  pointer-events: none;
}

.external-component-preview img,
.external-component-preview video {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.external-component-preview video {
  z-index: 1;
}

.external-preview-fallback {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  color: #f7f5ef;
  background:
    radial-gradient(
      circle at 50% 30%,
      color-mix(in srgb, var(--external-accent) 34%, transparent),
      transparent 48%
    ),
    linear-gradient(135deg, #08090a, #15161a);
  text-align: center;
}

.external-preview-fallback > span {
  display: grid;
  width: 46px;
  aspect-ratio: 1;
  place-content: center;
  border: 1px solid color-mix(in srgb, var(--external-accent) 72%, white);
  border-radius: 50%;
  color: var(--external-accent);
  font: 650 13px/1 var(--font-mono);
  letter-spacing: 0.08em;
}

.external-preview-fallback small {
  max-width: 180px;
  overflow: hidden;
  color: rgba(247, 245, 239, 0.88);
  font: 550 11px/1.2 var(--font-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.external-preview-fallback em {
  color: rgba(247, 245, 239, 0.48);
  font: 500 7px/1 var(--font-mono);
  font-style: normal;
  letter-spacing: 0.12em;
}

.external-component-preview video[data-preview-frame] {
  opacity: 0;
}

.external-component-preview.has-frame video[data-preview-frame] {
  opacity: 1;
}

.component-card.is-external .external-component-preview img,
.component-card.is-external .external-component-preview video {
  transition: transform 500ms var(--ease), filter 500ms var(--ease);
}

.component-card.is-external:hover .external-component-preview img,
.component-card.is-external:hover .external-component-preview video {
  transform: scale(1.035);
  filter: saturate(1.08);
}

.component-card,
.component-stage {
  --pv-bg: #111410;
  --pv-fg: #e6eadf;
  --pv-muted: #7b8175;
  --pv-surface: #242923;
  --pv-accent: #ddff31;
  --pv-accent-2: #ee4b2b;
}

.recipe-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(1.002);
  transition: transform 500ms var(--ease);
}

.component-card:hover .recipe-preview {
  transform: scale(1.025);
}

.recipe-preview.is-live {
  --pv-pointer-x: 0;
  --pv-pointer-y: 0;
}

.recipe-preview.is-live > g,
.recipe-preview.is-live > g > * {
  transform-box: fill-box;
  transform-origin: center;
}

.component-stage.is-preview-paused .recipe-preview.is-live *,
#component-inspector[hidden] .recipe-preview.is-live * {
  animation-play-state: paused !important;
}

.recipe-preview-state {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--pv-fg) 22%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--pv-bg) 86%, transparent);
  color: var(--pv-fg);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 6px;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}

.recipe-preview-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pv-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pv-accent) 18%, transparent);
  animation: pv-status-pulse 1.8s ease-in-out infinite;
}

.recipe-preview-state b {
  font-weight: 760;
}

.recipe-preview-state span {
  color: var(--pv-muted);
}

.recipe-preview.is-live[data-motion="ambient-drift"] > g {
  animation: pv-ambient-drift 7s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="ambient-drift"] .pv-wide-accent,
.recipe-preview.is-live[data-motion="ambient-drift"] .pv-wide-accent-2 {
  animation: pv-ribbon-breathe 4.8s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="reactive-pulse"] .pv-accent,
.recipe-preview.is-live[data-motion="reactive-pulse"] .pv-accent-ring,
.recipe-preview.is-live[data-motion="reactive-pulse"] .pv-glow {
  animation: pv-reactive-pulse 2.6s ease-in-out infinite;
}

.recipe-preview.is-live[data-motion="trace"] path,
.recipe-preview.is-live[data-motion="trace"] line,
.recipe-preview.is-live[data-motion="flow"] path,
.recipe-preview.is-live[data-motion="flow"] line,
.recipe-preview.is-live[data-motion="trail"] path {
  stroke-dasharray: 14 9;
  animation: pv-line-trace 3.8s linear infinite;
}

.recipe-preview.is-live[data-motion="network"] line,
.recipe-preview.is-live[data-motion="network"] path {
  stroke-dasharray: 9 7;
  animation: pv-line-trace 5s linear infinite;
}

.recipe-preview.is-live[data-motion="network"] circle:nth-of-type(2n),
.recipe-preview.is-live[data-motion="network"] .pv-accent,
.recipe-preview.is-live[data-motion="network"] .pv-accent-2 {
  animation: pv-node-pulse 2.4s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="lens"] > g,
.recipe-preview.is-live[data-motion="magnetic"] > g,
.recipe-preview.is-live[data-motion="tilt"] > g {
  transform:
    translate(
      calc(var(--pv-pointer-x) * 7px),
      calc(var(--pv-pointer-y) * 5px)
    )
    rotate(calc(var(--pv-pointer-x) * 1.4deg));
  transition: transform 140ms ease-out;
}

.recipe-preview.is-live[data-motion="lens"] .pv-accent-ring,
.recipe-preview.is-live[data-motion="lens"] .pv-accent-soft,
.recipe-preview.is-live[data-motion="magnetic"] .pv-accent,
.recipe-preview.is-live[data-motion="tilt"] .pv-glow {
  animation: pv-lens-breathe 2.8s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="text-reveal"] > g > *,
.recipe-preview.is-live[data-motion="cascade"] > g > * {
  animation: pv-cascade 4.2s var(--ease) infinite;
}

.recipe-preview.is-live[data-motion="text-reveal"] > g > *:nth-child(2),
.recipe-preview.is-live[data-motion="cascade"] > g > *:nth-child(2) {
  animation-delay: 90ms;
}

.recipe-preview.is-live[data-motion="text-reveal"] > g > *:nth-child(3),
.recipe-preview.is-live[data-motion="cascade"] > g > *:nth-child(3) {
  animation-delay: 180ms;
}

.recipe-preview.is-live[data-motion="text-reveal"] > g > *:nth-child(n + 4),
.recipe-preview.is-live[data-motion="cascade"] > g > *:nth-child(n + 4) {
  animation-delay: 270ms;
}

.recipe-preview.is-live[data-motion="type-wave"] text:nth-of-type(1) {
  animation: pv-type-wave 3.2s ease-in-out infinite;
}

.recipe-preview.is-live[data-motion="type-wave"] text:nth-of-type(2) {
  animation: pv-type-wave 3.2s 180ms ease-in-out infinite;
}

.recipe-preview.is-live[data-motion="marquee"] text {
  animation: pv-marquee 5.5s linear infinite alternate;
}

.recipe-preview.is-live[data-motion="scramble"] text:first-of-type {
  animation: pv-scramble 2.8s steps(2, end) infinite;
}

.recipe-preview.is-live[data-motion="scramble"] text:nth-of-type(2) {
  animation: pv-cascade 4s var(--ease) infinite;
}

.recipe-preview.is-live[data-motion="echo"] text {
  animation: pv-echo 3.2s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="echo"] text:nth-of-type(2) {
  animation-delay: 140ms;
}

.recipe-preview.is-live[data-motion="echo"] text:nth-of-type(3) {
  animation-delay: 280ms;
}

.recipe-preview.is-live[data-motion="liquid"] path {
  transform-origin: center bottom;
  animation: pv-liquid-fill 3.4s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="nudge"] path,
.recipe-preview.is-live[data-motion="cursor"] path:last-of-type {
  transform:
    translate(
      calc(var(--pv-pointer-x) * 8px),
      calc(var(--pv-pointer-y) * 6px)
    );
  animation: pv-nudge 1.8s ease-in-out infinite alternate;
  transition: transform 120ms ease-out;
}

.recipe-preview.is-live[data-motion="switch"] circle:last-of-type {
  animation: pv-switch 3s var(--ease) infinite;
}

.recipe-preview.is-live[data-motion="press"] > g > rect:nth-of-type(2) {
  animation: pv-press 2.4s var(--ease) infinite;
}

.recipe-preview.is-live[data-motion="focus"] .pv-accent-ring,
.recipe-preview.is-live[data-motion="focus"] .pv-accent-ring-dashed {
  animation: pv-focus-halo 2.3s ease-in-out infinite;
}

.recipe-preview.is-live[data-motion="orbit"] .pv-accent,
.recipe-preview.is-live[data-motion="orbit"] .pv-accent-2 {
  transform-box: view-box;
  transform-origin: 160px 90px;
  animation: pv-orbit 6s linear infinite;
}

.recipe-preview.is-live[data-motion="peel"] > g > path:first-of-type {
  transform-origin: right top;
  animation: pv-peel 3.2s var(--ease) infinite alternate;
}

.recipe-preview.is-live[data-motion="stack"] > g > rect:nth-of-type(1) {
  animation: pv-stack-back 3.8s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="stack"] > g > rect:nth-of-type(2) {
  animation: pv-stack-middle 3.8s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="compare"] line,
.recipe-preview.is-live[data-motion="compare"] circle {
  animation: pv-compare 3.6s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="expand"] > g > rect:first-of-type,
.recipe-preview.is-live[data-motion="morph"] > g > rect:last-of-type {
  animation: pv-expand 3s var(--ease) infinite alternate;
}

.recipe-preview.is-live[data-motion="dock"] circle {
  animation: pv-dock 2.8s var(--ease) infinite;
}

.recipe-preview.is-live[data-motion="dock"] circle:nth-of-type(2) {
  animation-delay: 110ms;
}

.recipe-preview.is-live[data-motion="dock"] circle:nth-of-type(3) {
  animation-delay: 220ms;
}

.recipe-preview.is-live[data-motion="dock"] circle:nth-of-type(4) {
  animation-delay: 330ms;
}

.recipe-preview.is-live[data-motion="shift"] > g > rect:nth-of-type(2n),
.recipe-preview.is-live[data-motion="fold"] > g > path,
.recipe-preview.is-live[data-motion="coverflow"] > g > *:first-child,
.recipe-preview.is-live[data-motion="coverflow"] > g > *:last-child {
  animation: pv-shift 3.6s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="curtain"] > g > rect:first-of-type {
  animation: pv-curtain-left 4s var(--ease) infinite;
}

.recipe-preview.is-live[data-motion="curtain"] > g > rect:nth-of-type(2) {
  animation: pv-curtain-right 4s var(--ease) infinite;
}

.recipe-preview.is-live[data-motion="parallax"] > g > *:nth-child(odd) {
  transform:
    translate(
      calc(var(--pv-pointer-x) * -5px),
      calc(var(--pv-pointer-y) * -3px)
    );
  animation: pv-parallax-a 4.6s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="parallax"] > g > *:nth-child(even) {
  transform:
    translate(
      calc(var(--pv-pointer-x) * 5px),
      calc(var(--pv-pointer-y) * 3px)
    );
  animation: pv-parallax-b 4.6s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="progress"] rect.pv-accent {
  transform-origin: left center;
  animation: pv-progress 3.8s var(--ease) infinite;
}

.recipe-preview.is-live[data-motion="progress"] circle.pv-accent {
  animation: pv-node-pulse 1.9s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="portal"] > g > path:first-of-type {
  animation: pv-portal 3.2s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="slide"] > g {
  animation: pv-slide 5s var(--ease) infinite alternate;
}

.recipe-preview.is-live[data-motion="zoom"] > g {
  animation: pv-zoom 4.6s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="pixel"] > g > rect:nth-of-type(3n),
.recipe-preview.is-live[data-motion="scan"] > g > rect:nth-of-type(4n) {
  animation: pv-pixel 2.6s steps(2, end) infinite;
}

.recipe-preview.is-live[data-motion="scan"] > g {
  animation: pv-scan 4s linear infinite alternate;
}

.recipe-preview.is-live[data-motion="slider"] circle {
  animation: pv-slider 3.4s var(--ease) infinite alternate;
}

.recipe-preview.is-live[data-motion="upload"] path {
  animation: pv-upload 2.1s ease-in-out infinite;
}

.recipe-preview.is-live[data-motion="success"] path,
.recipe-preview.is-live[data-motion="burst"] path {
  animation: pv-success 2.8s var(--ease) infinite;
}

.recipe-preview.is-live[data-motion="burst"] line {
  transform-box: view-box;
  transform-origin: 160px 90px;
  animation: pv-burst 2.8s var(--ease) infinite;
}

.recipe-preview.is-live[data-motion="float"] > g {
  animation: pv-float 3.8s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="rotate"] > g {
  transform-box: view-box;
  transform-origin: 160px 90px;
  animation: pv-rotate 10s linear infinite;
}

.recipe-preview.is-live[data-motion="chart"] rect {
  transform-origin: center bottom;
  animation: pv-chart 3.6s var(--ease) infinite alternate;
}

.recipe-preview.is-live[data-motion="explode"] > g > *:nth-child(2n) {
  animation: pv-explode-a 3.8s ease-in-out infinite alternate;
}

.recipe-preview.is-live[data-motion="explode"] > g > *:nth-child(odd) {
  animation: pv-explode-b 3.8s ease-in-out infinite alternate;
}

@keyframes pv-status-pulse {
  50% {
    opacity: 0.46;
    transform: scale(0.72);
  }
}

@keyframes pv-ambient-drift {
  to {
    transform: translate3d(7px, -4px, 0) scale(1.025);
  }
}

@keyframes pv-ribbon-breathe {
  to {
    opacity: 0.7;
    transform: translateY(-5px);
  }
}

@keyframes pv-reactive-pulse {
  50% {
    opacity: 0.45;
    transform: scale(1.16);
  }
}

@keyframes pv-line-trace {
  to {
    stroke-dashoffset: -46;
  }
}

@keyframes pv-node-pulse {
  to {
    opacity: 0.48;
    transform: scale(1.32);
  }
}

@keyframes pv-lens-breathe {
  to {
    opacity: 0.58;
    transform: scale(1.13);
  }
}

@keyframes pv-cascade {
  0%,
  12% {
    opacity: 0;
    transform: translateY(12px);
  }
  28%,
  78% {
    opacity: 1;
    transform: translateY(0);
  }
  92%,
  100% {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes pv-type-wave {
  50% {
    letter-spacing: 0.08em;
    transform: translateY(-7px) scaleX(1.06);
  }
}

@keyframes pv-marquee {
  to {
    transform: translateX(18px);
  }
}

@keyframes pv-scramble {
  0%,
  24%,
  42%,
  100% {
    opacity: 0.32;
    transform: translateX(-2px);
  }
  12%,
  32%,
  64% {
    opacity: 1;
    transform: translateX(3px);
  }
}

@keyframes pv-echo {
  to {
    opacity: 0.42;
    transform: translate(6px, 5px);
  }
}

@keyframes pv-liquid-fill {
  to {
    transform: translateY(-7px) scaleY(1.15);
  }
}

@keyframes pv-nudge {
  to {
    transform: translateX(7px);
  }
}

@keyframes pv-switch {
  0%,
  28% {
    transform: translateX(-10px) scale(0.88);
  }
  48%,
  82% {
    transform: translateX(0) scale(1);
  }
}

@keyframes pv-press {
  45%,
  65% {
    transform: translateY(10px);
  }
}

@keyframes pv-focus-halo {
  50% {
    opacity: 0.4;
    transform: scale(1.09);
  }
}

@keyframes pv-orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pv-peel {
  to {
    transform: rotate(-18deg) scale(1.05);
  }
}

@keyframes pv-stack-back {
  to {
    transform: translate(8px, -5px);
  }
}

@keyframes pv-stack-middle {
  to {
    transform: translate(4px, -2px);
  }
}

@keyframes pv-compare {
  to {
    transform: translateX(34px);
  }
}

@keyframes pv-expand {
  to {
    transform: scale(1.07);
  }
}

@keyframes pv-dock {
  34% {
    transform: translateY(-9px);
  }
  62% {
    transform: translateY(0);
  }
}

@keyframes pv-shift {
  to {
    transform: translate(5px, -5px);
  }
}

@keyframes pv-curtain-left {
  0%,
  18% {
    transform: translateX(0);
  }
  52%,
  78% {
    transform: translateX(-55px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes pv-curtain-right {
  0%,
  18% {
    transform: translateX(0);
  }
  52%,
  78% {
    transform: translateX(55px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes pv-parallax-a {
  to {
    transform: translate(-6px, 3px);
  }
}

@keyframes pv-parallax-b {
  to {
    transform: translate(7px, -4px);
  }
}

@keyframes pv-progress {
  0%,
  16% {
    transform: scaleX(0.18);
  }
  72%,
  100% {
    transform: scaleX(1);
  }
}

@keyframes pv-portal {
  to {
    opacity: 0.52;
    transform: scaleX(1.2) scaleY(0.82);
  }
}

@keyframes pv-slide {
  to {
    transform: translateX(-12px);
  }
}

@keyframes pv-zoom {
  to {
    transform: scale(1.08);
  }
}

@keyframes pv-pixel {
  50% {
    opacity: 0.18;
  }
}

@keyframes pv-scan {
  to {
    transform: translateY(-5px);
  }
}

@keyframes pv-slider {
  to {
    transform: translateX(36px);
  }
}

@keyframes pv-upload {
  45% {
    transform: translateY(-9px);
  }
}

@keyframes pv-success {
  0%,
  18% {
    opacity: 0;
    transform: scale(0.7);
  }
  40%,
  80% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pv-burst {
  0%,
  22% {
    opacity: 0;
    transform: scale(0.4);
  }
  48%,
  78% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.16);
  }
}

@keyframes pv-float {
  to {
    transform: translateY(-8px);
  }
}

@keyframes pv-rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pv-chart {
  from {
    transform: scaleY(0.38);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes pv-explode-a {
  to {
    transform: translate(7px, -8px);
  }
}

@keyframes pv-explode-b {
  to {
    transform: translate(-6px, 7px);
  }
}

.component-visual-label {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 9px;
  color: var(--pv-fg);
  opacity: 0.62;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 6px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pv-canvas {
  fill: var(--pv-bg);
}

.pv-fill {
  fill: var(--pv-fg);
}

.pv-muted-fill {
  fill: var(--pv-muted);
  opacity: 0.54;
}

.pv-surface {
  fill: var(--pv-surface);
}

.pv-accent {
  fill: var(--pv-accent);
}

.pv-accent-2 {
  fill: var(--pv-accent-2);
}

.pv-accent-soft,
.pv-accent-2-soft {
  fill: var(--pv-accent);
  opacity: 0.32;
}

.pv-accent-2-soft {
  fill: var(--pv-accent-2);
}

.pv-glow {
  fill: var(--pv-accent);
  opacity: 0.2;
  filter: drop-shadow(0 0 12px var(--pv-accent));
}

.pv-line,
.pv-muted-line,
.pv-accent-line,
.pv-accent-2-line,
.pv-accent-line-wide,
.pv-wide-accent,
.pv-wide-accent-2,
.pv-accent-ring,
.pv-accent-ring-dashed,
.pv-line-dark {
  fill: none;
  stroke: var(--pv-fg);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.pv-muted-line {
  stroke: var(--pv-muted);
  opacity: 0.7;
}

.pv-accent-line,
.pv-accent-line-wide,
.pv-wide-accent,
.pv-accent-ring,
.pv-accent-ring-dashed {
  stroke: var(--pv-accent);
}

.pv-accent-2-line,
.pv-wide-accent-2 {
  stroke: var(--pv-accent-2);
}

.pv-accent-line-wide {
  stroke-width: 3;
}

.pv-wide-accent,
.pv-wide-accent-2 {
  stroke-width: 20;
  opacity: 0.42;
}

.pv-wide-accent-2 {
  stroke-width: 12;
  opacity: 0.54;
}

.pv-accent-ring {
  fill: none;
  stroke-width: 2;
}

.pv-accent-ring-dashed {
  fill: none;
  stroke-width: 2;
  stroke-dasharray: 7 6;
}

.pv-line-dark {
  stroke: var(--pv-bg);
  stroke-width: 3;
}

.recipe-preview text {
  fill: var(--pv-fg);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.pv-type {
  font-size: 10px;
}

.pv-type-strong {
  font-size: 12px;
}

.pv-button-type {
  font-family: "Archivo Variable", sans-serif !important;
  font-size: 13px;
  font-weight: 760 !important;
  letter-spacing: 0.04em !important;
}

.pv-mono {
  fill: var(--pv-muted) !important;
  font-size: 8px;
  font-weight: 640 !important;
}

.pv-mono-dark {
  fill: var(--pv-bg) !important;
  font-size: 7px;
}

.pv-display,
.pv-display-small,
.pv-display-wide,
.pv-marquee {
  font-family: "Archivo Variable", sans-serif !important;
  font-size: 51px;
  font-weight: 790 !important;
  letter-spacing: -0.07em !important;
}

.pv-display-small {
  font-size: 27px;
  letter-spacing: -0.05em !important;
}

.pv-display-small-muted {
  fill: var(--pv-muted) !important;
  font-family: "Archivo Variable", sans-serif !important;
  font-size: 25px;
  font-weight: 720 !important;
  letter-spacing: -0.04em !important;
}

.pv-display-wide {
  font-size: 36px;
  letter-spacing: 0.02em !important;
}

.pv-marquee {
  font-size: 24px;
  letter-spacing: -0.01em !important;
}

.pv-serif {
  fill: var(--pv-accent) !important;
  font-family: Georgia, serif !important;
  font-size: 38px;
  font-style: italic;
  font-weight: 400 !important;
  letter-spacing: -0.05em !important;
}

.pv-display-cutout,
.pv-display-cutout-small {
  fill: var(--pv-bg) !important;
  font-family: "Archivo Variable", sans-serif !important;
  font-size: 62px;
  font-weight: 820 !important;
  letter-spacing: -0.08em !important;
}

.pv-display-cutout-small {
  font-size: 38px;
}

.pv-type-path {
  fill: var(--pv-fg) !important;
  font-size: 10px;
  letter-spacing: 0.12em !important;
}

.pv-counter,
.pv-counter-muted,
.pv-counter-accent,
.pv-counter-small {
  font-family: "Archivo Variable", sans-serif !important;
  font-size: 60px;
  font-weight: 760 !important;
  letter-spacing: -0.06em !important;
}

.pv-counter-muted {
  fill: var(--pv-muted) !important;
  opacity: 0.5;
}

.pv-counter-accent {
  fill: var(--pv-accent) !important;
}

.pv-counter-small {
  font-size: 26px;
}

.pv-glyph,
.pv-glyph-accent,
.pv-glyph-muted {
  font-family: "Archivo Variable", sans-serif !important;
  font-size: 46px;
  letter-spacing: -0.04em !important;
}

.pv-glyph-accent {
  fill: var(--pv-accent) !important;
}

.pv-glyph-muted {
  fill: var(--pv-muted) !important;
}

.pv-outline-type,
.pv-outline-type-muted {
  fill: none !important;
  stroke: var(--pv-accent);
  stroke-width: 0.7;
  font-family: "Archivo Variable", sans-serif !important;
  font-size: 38px;
  font-weight: 780 !important;
  letter-spacing: -0.04em !important;
}

.pv-outline-type-muted {
  stroke: var(--pv-muted);
  opacity: 0.55;
}

.component-card[data-direction="Editorial Ink"],
.component-stage[data-direction="Editorial Ink"] {
  --pv-bg: #efe6d8;
  --pv-fg: #1d1d19;
  --pv-muted: #9b9184;
  --pv-surface: #fffaf1;
  --pv-accent: #e44a2e;
  --pv-accent-2: #edb92f;
}

.component-card[data-direction="Luminous Grid"],
.component-stage[data-direction="Luminous Grid"] {
  --pv-bg: #0b1218;
  --pv-fg: #eaf8ff;
  --pv-muted: #466271;
  --pv-surface: #14242d;
  --pv-accent: #59e7ff;
  --pv-accent-2: #9b7aff;
}

.component-card[data-direction="Soft Material"],
.component-stage[data-direction="Soft Material"] {
  --pv-bg: #e9e2db;
  --pv-fg: #4b4750;
  --pv-muted: #a99eaa;
  --pv-surface: #f9f3ec;
  --pv-accent: #a77fd3;
  --pv-accent-2: #70b8a1;
}

.component-card[data-direction="Liquid Chrome"],
.component-stage[data-direction="Liquid Chrome"] {
  --pv-bg: #cdd3d5;
  --pv-fg: #111519;
  --pv-muted: #778389;
  --pv-surface: #f0f3f3;
  --pv-accent: #f15aa8;
  --pv-accent-2: #4fcaee;
}

.component-card[data-direction="Swiss Signal"],
.component-stage[data-direction="Swiss Signal"] {
  --pv-bg: #efeee6;
  --pv-fg: #11110f;
  --pv-muted: #8e8c82;
  --pv-surface: #fffef8;
  --pv-accent: #ff3d2f;
  --pv-accent-2: #184be8;
}

.component-card[data-direction="Atmospheric Film"],
.component-stage[data-direction="Atmospheric Film"] {
  --pv-bg: #252e3a;
  --pv-fg: #f1e7d9;
  --pv-muted: #6f7884;
  --pv-surface: #333f4c;
  --pv-accent: #e79a6b;
  --pv-accent-2: #7180d8;
}

.component-card[data-direction="Neo Industrial"],
.component-stage[data-direction="Neo Industrial"] {
  --pv-bg: #111410;
  --pv-fg: #e6eadf;
  --pv-muted: #6d7668;
  --pv-surface: #242923;
  --pv-accent: #ddff31;
  --pv-accent-2: #ee4b2b;
}

.component-card[data-direction="Botanical System"],
.component-stage[data-direction="Botanical System"] {
  --pv-bg: #1c3026;
  --pv-fg: #e3eadc;
  --pv-muted: #6d8b79;
  --pv-surface: #2d4638;
  --pv-accent: #acd477;
  --pv-accent-2: #d59b6b;
}

.component-card[data-direction="Playful Plastic"],
.component-stage[data-direction="Playful Plastic"] {
  --pv-bg: #f0b84b;
  --pv-fg: #3a2449;
  --pv-muted: #bc7648;
  --pv-surface: #ffe3a0;
  --pv-accent: #f34f86;
  --pv-accent-2: #3baee8;
}

.component-card[data-direction="Monochrome Atelier"],
.component-stage[data-direction="Monochrome Atelier"] {
  --pv-bg: #f2eee6;
  --pv-fg: #171715;
  --pv-muted: #a39e94;
  --pv-surface: #fffdf8;
  --pv-accent: #171715;
  --pv-accent-2: #b7afa4;
}

.component-card[data-direction="Retro Terminal"],
.component-stage[data-direction="Retro Terminal"] {
  --pv-bg: #10150e;
  --pv-fg: #d8efa2;
  --pv-muted: #597249;
  --pv-surface: #1d2818;
  --pv-accent: #9cff54;
  --pv-accent-2: #ffad25;
}

.component-card[data-direction="Spatial Glass"],
.component-stage[data-direction="Spatial Glass"] {
  --pv-bg: #dfe8eb;
  --pv-fg: #19282f;
  --pv-muted: #839ba6;
  --pv-surface: #f5fbfc;
  --pv-accent: #4e9fd2;
  --pv-accent-2: #9a72d1;
}

.component-card .card-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.component-card .card-copy > p {
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
}

.component-card .card-meta {
  margin-top: auto;
}

.catalog-progress {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.catalog-progress p {
  margin: 0;
}

.catalog-progress button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.inspector {
  position: sticky;
  top: var(--header-height);
  min-width: 0;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 28px;
  border-left: 1px solid var(--line);
  background: #e8e3da;
  scrollbar-width: thin;
  scrollbar-color: rgba(28, 29, 26, 0.25) transparent;
}

.inspector-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.inspector-heading p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  letter-spacing: 0.12em;
}

.inspector-heading > span {
  flex: 0 0 auto;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
}

.model-stage {
  position: relative;
  aspect-ratio: 1.16;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: var(--dark);
}

.model-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 27px 27px;
  mask-image: radial-gradient(circle, black, transparent 76%);
}

.model-stage canvas {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

#model-poster {
  position: absolute;
  z-index: 1;
  inset: 10%;
  width: 80%;
  height: 80%;
  object-fit: contain;
  filter: saturate(0.65) brightness(0.8);
  opacity: 0.55;
}

.stage-status {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
}

.stage-status i {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--signal);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.stage-status.is-error i {
  border-color: var(--accent);
  animation: none;
  transform: rotate(45deg);
}

.stage-hud {
  position: absolute;
  z-index: 4;
  right: 9px;
  bottom: 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(10, 12, 10, 0.72);
  color: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(8px);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 6px;
  text-transform: uppercase;
  pointer-events: none;
}

.stage-hud i {
  width: 1px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
}

.viewer-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: -1px 18px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
}

.viewer-controls button {
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 8px;
}

.viewer-controls button + button {
  border-left: 1px solid var(--line);
}

.viewer-controls button:hover,
.viewer-controls button[aria-pressed="true"] {
  background: var(--surface-strong);
  color: var(--ink);
}

.object-description {
  margin: 22px 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
}

.object-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.object-specs div {
  min-height: 53px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.object-specs .spec-wide {
  grid-column: 1 / -1;
}

.object-specs dt,
.recipe-specs dt {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  text-transform: uppercase;
}

.object-specs dd {
  margin: 5px 0 0;
  font-family: "Archivo Variable", sans-serif;
  font-size: 12px;
  font-weight: 630;
}

.source-record,
.full-record-link {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 9px 11px;
  border: 1px solid #a8c2b2;
  border-radius: var(--radius-sm);
  background: #e2eee7;
  color: #315440;
}

.source-record > div {
  display: grid;
  gap: 3px;
}

.source-record span {
  font-size: 8px;
}

.source-record strong,
.source-record a {
  font-size: 8px;
}

.copy-record {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: var(--dark);
  color: rgba(255, 255, 255, 0.7);
}

.copy-record > div {
  padding: 11px;
}

.copy-record span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.38);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  letter-spacing: 0.09em;
}

.copy-record code {
  display: block;
  overflow: hidden;
  color: #bdc8bf;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-record button {
  width: calc(100% - 12px);
  min-height: 35px;
  margin: 0 6px 6px;
  border: 0;
  border-radius: 5px;
  background: var(--signal);
  color: #24280d;
  cursor: pointer;
  font-size: 8px;
  font-weight: 760;
}

.component-stage {
  position: relative;
  aspect-ratio: 1.55;
  margin-top: 18px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--pv-bg);
}

.component-stage.is-external {
  background: #08090a;
}

.component-stage .component-visual-label {
  bottom: 12px;
  left: 13px;
  right: auto;
  font-size: 7px;
}

.image-stage {
  position: relative;
  aspect-ratio: 1.55;
  display: grid;
  place-items: center;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.image-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.55), transparent 58%);
  pointer-events: none;
}

.image-stage img {
  position: relative;
  z-index: 1;
  width: 78%;
  height: 72%;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(28, 29, 26, 0.15));
}

.image-stage.is-pixel-art img {
  image-rendering: pixelated;
}

.image-stage.is-tile-preview {
  background-color: #ded9cf;
  background-position: center;
  background-repeat: repeat;
  background-size: 128px auto;
}

.image-stage.is-tile-preview img {
  visibility: hidden;
}

.image-stage.is-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.image-stage-hud {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(28, 29, 26, 0.14);
  border-radius: 4px;
  background: rgba(244, 240, 232, 0.76);
  color: var(--muted);
  backdrop-filter: blur(8px);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-stage-hud i {
  width: 1px;
  height: 8px;
  background: rgba(28, 29, 26, 0.2);
}

.image-specs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.image-variant-picker {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.28);
}

.image-variant-picker[hidden] {
  display: none;
}

.image-variant-picker > span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-variant-picker > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.image-variant-picker button {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  text-transform: capitalize;
}

.image-variant-picker button:hover,
.image-variant-picker button:focus-visible,
.image-variant-picker button.is-active {
  border-color: var(--ink);
  color: var(--ink);
}

.image-variant-picker button.is-active {
  background: var(--ink);
  color: var(--surface);
}

.background-stage {
  --background-hue: 220;
  position: relative;
  aspect-ratio: 1.55;
  margin-top: 18px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background:
    radial-gradient(
      circle at 72% 28%,
      hsl(var(--background-hue) 78% 68% / 0.92),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      hsl(calc(var(--background-hue) + 30) 42% 16%),
      hsl(calc(var(--background-hue) - 45) 48% 8%)
    );
  isolation: isolate;
}

.background-stage::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: inherit;
  background: linear-gradient(180deg, transparent 60%, rgba(7, 9, 7, 0.46));
  pointer-events: none;
}

.background-stage video {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  object-fit: cover;
}

.background-stage video::-webkit-media-controls-panel {
  background: linear-gradient(transparent, rgba(5, 7, 5, 0.78));
}

.background-stage-status {
  z-index: 4;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(10, 12, 10, 0.62);
  backdrop-filter: blur(10px);
}

.background-stage-hud {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: rgba(10, 12, 10, 0.42);
  color: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(8px);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.background-stage-hud i {
  width: 1px;
  height: 8px;
  background: rgba(255, 255, 255, 0.24);
}

.background-source-record {
  border-color: rgba(44, 111, 79, 0.25);
  background: #e4eee7;
  color: #3f6552;
}

.component-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.component-badges span {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.recipe-specs {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}

.recipe-specs div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.recipe-specs dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.55;
}

.component-prompt code {
  max-height: 78px;
  overflow-y: auto;
  white-space: normal;
}

.full-record-link {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 8px;
  font-weight: 700;
}

.integration-panel {
  padding: 110px clamp(28px, 6vw, 110px);
  background: var(--dark);
  color: var(--white);
}

.integration-panel > header {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: end;
  gap: 60px;
}

.integration-panel > header > p:first-child {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.42);
}

.integration-panel h2 {
  margin: 0;
  font-family: "Archivo Variable", sans-serif;
  font-size: clamp(54px, 7vw, 112px);
  font-weight: 620;
  letter-spacing: -0.075em;
  line-height: 0.88;
}

.integration-panel > header > p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.7;
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 90px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  border-left: 1px solid rgba(255, 255, 255, 0.13);
}

.integration-grid article {
  min-height: 280px;
  padding: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.13);
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.integration-grid article > span {
  color: var(--signal);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  letter-spacing: 0.11em;
}

.integration-grid h3 {
  max-width: 12ch;
  margin: 55px 0 18px;
  font-family: "Archivo Variable", sans-serif;
  font-size: 34px;
  font-weight: 620;
  letter-spacing: -0.045em;
}

.integration-grid p,
.integration-grid pre {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  line-height: 1.7;
}

.integration-grid code {
  color: #bdc8bf;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
}

.integration-grid pre {
  overflow-x: auto;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0e100e;
}

.integration-grid button,
.integration-grid a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  margin-top: 24px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}

.endpoint-table {
  margin-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.endpoint-table > * {
  min-height: 58px;
  display: grid;
  grid-template-columns: 0.55fr 1fr 1fr;
  align-items: center;
  gap: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
}

.endpoint-table > div {
  color: rgba(255, 255, 255, 0.36);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.endpoint-table a:hover {
  color: #fff;
}

.endpoint-table code {
  color: var(--signal);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
}

footer {
  min-height: 120px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  padding: 30px;
  background: #0e100e;
  color: rgba(255, 255, 255, 0.58);
}

.footer-brand {
  color: #fff;
}

.footer-brand .brand-mark {
  border-color: #fff;
}

.footer-brand .brand-mark i {
  background: #fff;
}

footer p {
  margin: 0;
  font-size: 8px;
  text-align: center;
}

footer > div {
  display: flex;
  justify-self: end;
  gap: 17px;
  font-size: 8px;
}

footer a:hover {
  color: #fff;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  max-width: 320px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  background: var(--dark);
  color: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  font-size: 9px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 180ms ease,
    transform 260ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 40px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  margin-bottom: 7px;
  color: var(--ink);
  font-family: "Archivo Variable", sans-serif;
  font-size: 20px;
}

.empty-state span {
  font-size: 9px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1380px) {
  .workspace {
    grid-template-columns: 210px minmax(430px, 1fr) minmax(340px, 0.72fr);
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-panel,
  .inspector {
    padding: 22px;
  }
}

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .header-link {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 720px;
  }

  .hero-stats {
    max-width: 720px;
  }

  .workspace {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .inspector {
    position: relative;
    top: auto;
    grid-column: 1 / -1;
    grid-row: 1;
    max-height: none;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  #model-inspector,
  #component-inspector,
  #image-inspector,
  #background-inspector {
    display: grid;
    grid-template-columns: minmax(340px, 0.9fr) minmax(330px, 1.1fr);
    gap: 18px 24px;
  }

  .inspector-heading,
  .model-stage,
  .component-stage,
  .image-stage,
  .background-stage,
  .viewer-controls {
    grid-column: 1;
  }

  .object-description,
  .object-specs,
  .source-record,
  .copy-record,
  .component-badges,
  .recipe-specs,
  .full-record-link {
    grid-column: 2;
  }

  .filter-rail {
    grid-column: 1;
    grid-row: 2;
  }

  .catalog-panel {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 780px) {
  :root {
    --header-height: 60px;
  }

  .site-header {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 0 12px;
  }

  .brand em,
  .view-tabs button span {
    display: none;
  }

  .site-header > .brand > span:not(.brand-mark) {
    display: none;
  }

  .view-tabs button {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 9px;
    font-size: 8px;
  }

  .view-tabs {
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .view-tabs::-webkit-scrollbar {
    display: none;
  }

  .view-tabs button:last-child {
    font-size: 0;
  }

  .view-tabs button:last-child::after {
    content: "Protocol";
    font-size: 8px;
  }

  .hero {
    min-height: 650px;
    padding: 82px 18px 52px;
  }

  .hero::before {
    top: 92px;
    right: -90px;
  }

  .hero::after {
    top: 90px;
    right: -20px;
  }

  .hero h1 {
    font-size: clamp(60px, 18vw, 92px);
  }

  .hero-lede {
    margin-top: 30px;
    font-size: 12px;
  }

  .hero-stats div {
    min-height: 92px;
  }

  .protocol-strip {
    grid-template-columns: 1fr auto;
    padding: 0 14px;
  }

  .protocol-strip code {
    display: none;
  }

  .workspace {
    display: flex;
    flex-direction: column;
  }

  .inspector {
    order: 1;
    width: 100%;
    padding: 20px 14px 28px;
  }

  #model-inspector,
  #component-inspector,
  #image-inspector,
  #background-inspector {
    display: block;
  }

  .object-description,
  .object-specs,
  .source-record,
  .copy-record,
  .component-badges,
  .recipe-specs,
  .full-record-link {
    margin-top: 16px;
  }

  .filter-rail {
    order: 2;
    width: 100%;
    min-height: 0;
    padding: 22px 14px;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .filter-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .catalog-panel {
    order: 3;
    width: 100%;
    padding: 22px 14px 48px;
  }

  .component-workflow > header,
  .component-workflow-steps {
    grid-template-columns: 1fr;
  }

  .component-workflow > header {
    align-items: start;
  }

  .component-workflow-steps button + button {
    border-top: 1px solid var(--line-strong);
    border-left: 0;
  }

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

  .card-media {
    aspect-ratio: 1.45;
  }

  .integration-panel {
    padding: 78px 18px;
  }

  .integration-panel > header {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .integration-panel > header > p:first-child {
    grid-column: 1;
  }

  .integration-panel h2 {
    font-size: clamp(49px, 14vw, 76px);
  }

  .integration-grid {
    grid-template-columns: 1fr;
    margin-top: 60px;
  }

  .integration-grid article {
    min-height: 240px;
    padding: 22px;
  }

  .endpoint-table > * {
    grid-template-columns: 0.65fr 1.35fr;
    gap: 10px;
  }

  .endpoint-table > * > span:last-child {
    display: none;
  }

  footer {
    grid-template-columns: 1fr;
  }

  footer p {
    text-align: left;
  }

  footer > div {
    justify-self: start;
  }
}

@media (max-width: 440px) {
  .site-header {
    grid-template-columns: auto 1fr;
  }

  .view-tabs button {
    padding-inline: 7px;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .hero-stats dd {
    font-size: 27px;
  }

  .catalog-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-progress {
    align-items: flex-start;
    flex-direction: column;
  }

  .stage-hud {
    display: none;
  }

  .background-stage-hud {
    display: none;
  }

  .image-stage-hud {
    display: none;
  }
}

@media (max-width: 360px) {
  .site-header {
    gap: 4px;
    padding-inline: 8px;
  }

  .brand > span:not(.brand-mark) {
    display: none;
  }

  .view-tabs {
    gap: 0;
  }

  .view-tabs button {
    padding-inline: 5px;
    font-size: 7px;
  }

  .view-tabs button:last-child::after {
    font-size: 7px;
  }
}

@media (pointer: coarse) {
  .recipe-preview-state span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .recipe-preview-state i {
    box-shadow: none;
  }

  .recipe-preview-state b,
  .recipe-preview-state span {
    display: none;
  }

  .recipe-preview-state::after {
    content: "Static preview";
    color: var(--pv-muted);
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
