:root {
  --showcase-header-height: 56px;
  --showcase-max-width: 1440px;
  --showcase-page-padding: 32px;
  --showcase-reading-width: 62ch;
}

.showcase-page {
  --header-height: var(--showcase-header-height);
  background: var(--canvas);
}

.showcase-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  width: 100%;
  height: var(--showcase-header-height);
  align-items: center;
  padding-inline: max(12px, calc((100vw - var(--showcase-max-width)) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--surface-1);
}

.showcase-header .brand {
  min-width: 132px;
  height: 100%;
  padding: 0 12px 0 4px;
  border-right: 0;
}

.showcase-header .brand-mark {
  width: 28px;
  height: 28px;
}

.showcase-header .brand-copy small {
  color: var(--muted);
}

.showcase-nav {
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: stretch;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.showcase-nav::-webkit-scrollbar {
  display: none;
}

.showcase-nav a {
  position: relative;
  display: inline-flex;
  min-width: max-content;
  min-height: 44px;
  align-items: center;
  padding-inline: 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.showcase-nav a[aria-current="page"] {
  border-radius: 5px;
  background: var(--navigation-selected);
  box-shadow: inset 0 1px 0 var(--edge-highlight), var(--shadow-contact);
  color: var(--text);
}

.showcase-nav a[aria-current="page"]::after {
  display: none;
}

.showcase-header .header-actions {
  gap: 3px;
  padding: 0 4px 0 10px;
}

.showcase-command-trigger {
  width: 36px;
  min-width: 36px;
  height: 36px;
  justify-content: center;
  padding: 0;
  border-color: transparent;
  background: transparent;
}

.showcase-command-trigger svg {
  width: 16px;
  height: 16px;
}

.showcase-header .language-trigger,
.showcase-header .contrast-toggle {
  min-width: 36px;
  height: 36px;
}

.showcase-header .theme-switch {
  height: 36px;
}

.showcase-header .theme-switch::before {
  inset-block: 4px;
}

.showcase-main {
  width: min(100%, var(--showcase-max-width));
  min-height: calc(100svh - var(--showcase-header-height));
  margin: 0 auto;
  background: var(--surface-1);
}

.legacy-fragment-anchor {
  display: block;
  block-size: 0;
  scroll-margin-block-start: calc(var(--showcase-header-height) + 16px);
}

.showcase-label {
  margin: 0 0 14px;
  color: var(--muted);
  font: 500 11px/1.45 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.showcase-hero {
  display: block;
  min-height: auto;
  padding: clamp(44px, 4vw, 58px) var(--showcase-page-padding) clamp(68px, 6vw, 88px);
}

.showcase-hero-copy {
  display: grid;
  max-width: none;
  margin: 0;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  grid-template-areas:
    "label label"
    "title lead"
    "title actions";
  column-gap: clamp(48px, 6vw, 92px);
  align-items: start;
}

.showcase-hero-copy .showcase-label {
  grid-area: label;
  margin-bottom: 14px;
}

.showcase-hero-copy h1 {
  grid-area: title;
  max-width: 21ch;
  margin: 0;
  font-size: clamp(44px, 4.5vw, 64px);
  font-weight: 620;
  line-height: 1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

html:lang(zh-CN) .showcase-hero-copy h1 {
  max-width: 12em;
  font-size: clamp(42px, 4.6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.showcase-hero-copy .lead {
  grid-area: lead;
  max-width: 42ch;
  margin: 2px 0 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
  text-wrap: pretty;
}

.showcase-hero-actions {
  display: flex;
  grid-area: actions;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: 20px;
}

.showcase-text-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 570;
}

.showcase-text-action svg {
  width: 14px;
  height: 14px;
}

.showcase-button,
.preview-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.2;
  text-align: center;
}

.showcase-button svg,
.preview-action svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.showcase-button.primary,
.preview-action.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.showcase-button.secondary {
  background: transparent;
}

.reference-code {
  margin: 0 0 5px;
  color: var(--muted);
  font: 500 11px/1.45 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.showcase-product-stage {
  --stage-text: #f7f8f8;
  --stage-text-2: #c7cbd0;
  --stage-muted: #858b93;
  --stage-line: rgb(255 255 255 / 0.09);
  --stage-canvas: #090a0b;
  --stage-surface: #0f1012;
  --stage-navigation-selected: rgb(255 255 255 / 0.055);
  --stage-edge-highlight: rgb(255 255 255 / 0.055);
  --stage-loading: rgb(15 16 18 / 0.92);
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  margin-top: clamp(30px, 3vw, 42px);
  overflow: hidden;
  border: 1px solid var(--stage-line);
  border-radius: 10px;
  background: var(--stage-canvas);
  color: var(--stage-text);
  box-shadow: inset 0 1px 0 var(--edge-highlight-strong), var(--shadow-raised);
}

.showcase-product-stage[data-stage-theme="light"] {
  --stage-text: #17181b;
  --stage-text-2: #454850;
  --stage-muted: #747982;
  --stage-line: rgb(17 24 39 / 0.1);
  --stage-canvas: #f6f7f8;
  --stage-surface: #fff;
  --stage-navigation-selected: rgb(20 22 26 / 0.055);
  --stage-edge-highlight: rgb(255 255 255 / 0.84);
  --stage-loading: rgb(255 255 255 / 0.94);
  box-shadow: inset 0 1px 0 var(--edge-highlight-strong), var(--shadow-raised);
}

.stage-toolbar {
  display: flex;
  min-width: 0;
  min-height: 48px;
  grid-column: 1;
  grid-row: 1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 12px;
  border-right: 0;
  border-bottom: 1px solid var(--stage-line);
  background: var(--stage-surface);
}

.stage-tabs {
  display: flex;
  min-width: 0;
  flex-direction: row;
  gap: 2px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

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

.stage-tabs button {
  position: relative;
  display: inline-flex;
  min-width: max-content;
  min-height: 40px;
  align-items: center;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--stage-muted);
  font-size: 12px;
  font-weight: 550;
  text-align: left;
}

.stage-tabs button::before {
  display: none;
}

.stage-tabs button[aria-selected="true"] {
  background: var(--stage-navigation-selected);
  color: var(--stage-text);
  box-shadow: inset 0 1px 0 var(--stage-edge-highlight), 0 1px 2px rgb(0 0 0 / 0.09);
}

.stage-tabs button[aria-selected="true"]::after {
  display: none;
}

.stage-lab-link {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-inline: 8px;
  color: var(--stage-text-2);
  font-size: 11px;
  font-weight: 570;
}

.stage-toolbar-actions,
.stage-language {
  display: flex;
  align-items: center;
}

.stage-toolbar-actions {
  min-width: 0;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

.stage-language {
  min-height: 40px;
  min-width: 0;
  gap: 6px;
  padding-inline: 8px;
  color: var(--stage-muted);
  font-size: 10px;
  font-weight: 540;
  white-space: nowrap;
}

.stage-language svg {
  width: 13px;
  height: 13px;
}

.stage-lab-link svg {
  width: 13px;
  height: 13px;
}

.stage-frame {
  position: relative;
  min-width: 0;
  grid-column: 1;
  grid-row: 2;
  aspect-ratio: 1180 / 760;
  overflow: hidden;
  background: var(--stage-canvas);
}

.stage-frame iframe,
.stage-poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.stage-frame iframe {
  background: var(--stage-canvas);
  opacity: 0;
}

.stage-poster {
  z-index: 2;
  object-fit: cover;
  object-position: top;
}

.stage-loading {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--stage-line);
  border-radius: 5px;
  background: var(--stage-loading);
  color: var(--stage-text-2);
  font-size: 10px;
}

.stage-loading span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7580e0;
}

.showcase-product-stage[data-stage-ready="true"] .stage-frame iframe {
  opacity: 1;
}

.showcase-product-stage[data-stage-ready="true"] .stage-poster,
.showcase-product-stage[data-stage-ready="true"] .stage-loading {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.stage-caption {
  display: grid;
  min-width: 0;
  grid-column: 1;
  grid-row: 3;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.28fr);
  gap: 24px 34px;
  align-items: start;
  padding: 17px 20px 18px;
  border-top: 1px solid var(--stage-line);
  background: var(--stage-surface);
}

.stage-caption h2 {
  margin: 0;
  color: var(--stage-text);
  font-size: 15px;
  font-weight: 610;
  letter-spacing: -0.012em;
}

.stage-caption > div > p:last-child {
  max-width: 68ch;
  margin: 5px 0 0;
  color: var(--stage-muted);
  font-size: 10px;
  line-height: 1.55;
}

.reference-disclosure {
  color: var(--stage-muted);
  font-size: 10px;
}

.reference-disclosure summary,
.catalog-disclosure summary {
  width: max-content;
  cursor: pointer;
  color: var(--stage-text-2);
  font-size: 11px;
  font-weight: 570;
  list-style-position: outside;
}

.reference-disclosure dl {
  margin: 12px 0 0;
}

.reference-disclosure dl div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--stage-line);
}

.reference-disclosure dt,
.reference-disclosure dd {
  margin: 0;
  line-height: 1.45;
}

.reference-disclosure dd {
  color: var(--stage-text-2);
}

.showcase-manifesto,
.showcase-signature,
.showcase-evidence {
  position: relative;
  padding: clamp(64px, 7vw, 96px) var(--showcase-page-padding);
  border-top: 1px solid var(--line);
}

.showcase-section-intro h2,
.signature-heading h2,
.showcase-evidence h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 610;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.showcase-manifesto {
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(0, 0.64fr);
  gap: 44px clamp(64px, 9vw, 140px);
  align-items: start;
}

.showcase-section-intro {
  position: sticky;
  top: calc(var(--showcase-header-height) + 32px);
  display: block;
  align-self: start;
}

.showcase-section-intro > div > .showcase-label {
  margin-bottom: 14px;
}

.showcase-section-intro > p {
  max-width: 42ch;
  margin: 22px 0 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
  text-wrap: pretty;
}

.context-atlas {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: visible;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.context-entry {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 140px;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  grid-template-rows: 1fr auto;
  gap: 12px 18px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.context-entry::after {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  color: var(--muted);
  content: "↗";
  font-size: 14px;
  justify-self: end;
}

.context-symbol {
  display: grid;
  width: 34px;
  height: 34px;
  grid-column: 1;
  grid-row: 1 / 3;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: var(--selected);
  color: var(--muted);
}

.context-symbol svg {
  width: 17px;
  height: 17px;
}

.context-entry > div {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}

.context-entry strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.context-entry p {
  max-width: 46ch;
  margin: 9px 0 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.6;
}

.context-entry small {
  grid-column: 2;
  grid-row: 2;
  color: var(--muted);
  font: 500 9px/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.showcase-manifesto > .section-route {
  grid-column: 2;
  justify-self: start;
  margin-top: -20px;
}

.showcase-signature {
  display: grid;
  grid-template-columns: minmax(240px, 0.3fr) minmax(0, 0.7fr);
  gap: 44px clamp(64px, 9vw, 140px);
  align-items: start;
}

.signature-heading p:last-child {
  max-width: 58ch;
  margin: 20px 0 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.65;
}

.decision-trace {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.decision-trace > div {
  display: flex;
  min-width: 0;
  min-height: 240px;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 22px 20px 24px;
  border-left: 1px solid var(--line);
}

.decision-trace > div:first-child {
  border-left: 0;
}

.decision-trace span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 580;
}

.decision-trace svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.decision-trace p {
  max-width: 76ch;
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}

.decision-trace__current {
  grid-column: 2;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.decision-trace__current strong {
  color: var(--text-2);
  font-weight: 600;
}

.showcase-signature > .section-route {
  grid-column: 2;
  justify-self: start;
  margin-top: 2px;
}

.showcase-evidence {
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
  gap: 48px clamp(56px, 9vw, 132px);
}

.evidence-copy > p {
  max-width: 60ch;
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
}

.evidence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 24px;
}

.evidence-actions a {
  color: var(--text);
  font-size: 12px;
  font-weight: 570;
}

.catalog-disclosure {
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.catalog-disclosure summary {
  color: var(--text-2);
}

.catalog-proof {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.proof-cell {
  display: grid;
  min-width: 0;
  min-height: 84px;
  align-content: center;
  gap: 4px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.proof-cell strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.proof-cell span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.proof-cell.appearance {
  grid-column: 1 / -1;
}

.proof-cell.appearance strong {
  font-size: 12px;
  line-height: 1.5;
}

.showcase-manifesto[id],
.showcase-signature[id],
.showcase-evidence[id] {
  scroll-margin-top: calc(var(--showcase-header-height) + 18px);
}

.section-route {
  display: inline-flex;
  width: max-content;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 550;
}

.section-route svg {
  width: 14px;
  height: 14px;
}

.showcase-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px 32px;
  padding: 28px var(--showcase-page-padding) 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.showcase-footer p {
  max-width: 58ch;
  margin: 0;
}

.showcase-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.showcase-footer a {
  min-height: 24px;
  color: var(--text-2);
}

/* Catalog-backed discovery */
.discovery-page {
  width: min(100%, 1080px);
  padding-top: 64px;
}

.discovery-hero {
  max-width: 860px;
  padding-bottom: 56px;
}

.discovery-hero .eyebrow,
.record-kicker {
  margin: 0 0 12px;
  color: var(--muted);
  font: 550 10px/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.discovery-hero h1 {
  max-width: 19ch;
  margin: 0;
  font-size: clamp(34px, 4.2vw, 48px);
  font-weight: 620;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.discovery-hero .lead {
  max-width: 62ch;
  margin: 20px 0 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.65;
}

.discovery-source-note {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 28px;
  padding: 14px 0;
  border-block: 1px solid var(--line);
  color: var(--muted);
}

.discovery-source-note > svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--text-2);
}

.discovery-source-note h2,
.discovery-source-note h3,
.discovery-source-note p {
  margin: 0;
}

.discovery-source-note h2,
.discovery-source-note h3 {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.discovery-source-note h2 + p,
.discovery-source-note h3 + p {
  margin-top: 3px;
}

.discovery-source-note p {
  max-width: 76ch;
  font-size: 11px;
  line-height: 1.55;
  white-space: normal;
}

.discovery-source-note--compact {
  max-width: 720px;
}

.component-directory {
  padding: 8px 0 56px;
}

.component-directory--secondary {
  padding-top: 0;
}

.component-directory__group + .component-directory__group {
  margin-top: 42px;
}

.component-directory__group--secondary {
  opacity: 0.84;
}

.section-heading--compact {
  margin-bottom: 14px;
}

.section-heading--compact h2,
.section-heading--compact h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.section-heading--compact p {
  font-size: 11px;
  line-height: 1.55;
}

.discovery-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.discovery-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.65fr) minmax(112px, auto);
  gap: 18px;
  min-height: 48px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line-subtle);
}

.discovery-row__identity,
.discovery-row__facts,
.discovery-row__action {
  min-width: 0;
}

.discovery-row__identity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.discovery-row__name {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 570;
}

a.discovery-row__name {
  color: var(--text);
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.discovery-row__identity code,
.component-explorer__identity code {
  overflow-wrap: anywhere;
  color: var(--muted);
  font: 10px/1.45 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.discovery-row__facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  color: var(--muted);
  font-size: 10px;
}

.status-badge {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--text-2);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.status-badge--stable,
.status-badge--showcased {
  border-color: color-mix(in srgb, var(--positive) 36%, var(--line));
  color: var(--positive);
}

.status-badge--candidate,
.status-badge--linked {
  border-color: color-mix(in srgb, var(--warning) 36%, var(--line));
  color: var(--warning);
}

.status-badge--draft,
.status-badge--planned {
  color: var(--muted);
}

.discovery-row__action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.discovery-row__action svg {
  width: 13px;
  height: 13px;
}

.discovery-list__empty {
  padding: 16px 4px;
  border-bottom: 1px solid var(--line-subtle);
  color: var(--muted);
  font-size: 11px;
}

.section-rule {
  height: 1px;
  margin: 0 0 56px;
  border: 0;
  background: var(--line);
}

.showcase-source-link {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.showcase-source-link a,
.component-evidence a,
.pattern-discovery-section__sources a:not(.button) {
  color: var(--text-2);
  text-decoration-line: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.back-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 11px;
}

.back-link svg {
  width: 14px;
  height: 14px;
  rotate: 180deg;
}

.component-explorer__hero {
  max-width: none;
  padding-bottom: 40px;
}

.component-explorer__hero h1 {
  max-width: 24ch;
}

.component-explorer__identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
}

.component-explorer__job {
  display: grid;
  grid-template-columns: minmax(130px, 0.26fr) minmax(0, 1fr);
  gap: 24px;
  max-width: 900px;
  margin-top: 32px;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}

.component-explorer__job h2,
.component-explorer__job p {
  margin: 0;
}

.component-explorer__job h2 {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.component-explorer__job p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.component-reference {
  padding: 8px 0 56px;
}

.component-reference-frame {
  height: clamp(500px, 70vh, 760px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--canvas);
}

.component-reference-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.component-reference__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.component-reference__meta p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.component-reference__meta > div {
  display: grid;
  gap: 4px;
}

.component-reference__meta .reference-language-note {
  max-width: 72ch;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.component-reference__meta strong {
  color: var(--text-2);
  font-size: 11px;
}

.component-reference__meta code {
  color: var(--muted);
  font: 10px/1.45 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.component-applicable-states {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.component-applicable-states h2,
.component-applicable-states p,
.component-applicable-states ul {
  margin: 0;
}

.component-applicable-states h2 {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.component-applicable-states p {
  max-width: 54ch;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.component-applicable-states .component-applicable-states__contract {
  align-self: start;
  margin-top: 0;
}

.component-applicable-states__contract a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-2);
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.component-applicable-states__contract svg {
  width: 13px;
  height: 13px;
}

.component-applicable-states ul {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 6px 14px;
  padding: 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.55;
  list-style: none;
}

.component-applicable-states li {
  position: relative;
  padding-left: 10px;
}

.component-applicable-states li::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--disabled);
  content: "";
}

.component-reference__meta .button,
.pattern-discovery-section__sources .button {
  gap: 7px;
  background: transparent;
}

.component-reference__meta .button svg,
.pattern-discovery-section__sources .button svg {
  width: 13px;
  height: 13px;
}

.component-evidence {
  padding-bottom: 56px;
}

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

.evidence-columns > section {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.evidence-columns > section:first-child {
  padding-left: 0;
}

.evidence-columns > section:last-child {
  border-right: 0;
}

.evidence-columns h3,
.support-list h3,
.known-gaps h3 {
  margin: 0 0 10px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
}

.evidence-columns ul,
.known-gaps ul {
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.evidence-columns li + li,
.known-gaps li + li {
  margin-top: 6px;
}

.evidence-columns a {
  overflow-wrap: anywhere;
}

.support-list,
.known-gaps {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.support-list dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
}

.support-list dl > div {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.support-list dl > div:first-child {
  padding-left: 0;
}

.support-list dl > div:last-child {
  border-right: 0;
}

.support-list dt,
.support-list dd {
  margin: 0;
  font-size: 10px;
}

.support-list dt {
  color: var(--muted);
}

.support-list dd {
  margin-top: 5px;
  color: var(--text-2);
  font-weight: 550;
}

.support-list dd[data-supported="true"] {
  color: var(--positive);
}

.component-evidence > .discovery-source-note {
  margin-top: 24px;
}

.component-evidence > .discovery-source-note + .discovery-source-note {
  margin-top: 10px;
}

.pattern-discovery {
  border-top: 1px solid var(--line);
}

.pattern-discovery-section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.pattern-discovery-section__heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.38fr) minmax(0, 1fr);
  gap: 36px;
  margin-bottom: 20px;
}

.pattern-discovery-section__heading h2,
.pattern-discovery-section__heading p {
  margin: 0;
}

.pattern-discovery-section__heading h2 {
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.015em;
}

.pattern-discovery-section__heading p {
  max-width: 64ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.pattern-blueprint {
  display: grid;
  min-height: 180px;
  gap: 1px;
  margin: 24px 0 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.pattern-blueprint > div {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 16px;
  background: var(--surface-2);
  color: var(--muted);
  font: 500 10px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace;
  text-align: center;
}

.pattern-blueprint--information {
  grid-template: "search search navigation" 40px "reading reading source" 1fr / 1fr 1fr minmax(150px, 0.45fr);
}

.pattern-blueprint__search {
  grid-area: search;
}

.pattern-blueprint__reading {
  grid-area: reading;
}

.pattern-blueprint__source {
  grid-area: source;
}

.pattern-blueprint__navigation {
  grid-area: navigation;
}

.pattern-blueprint--intelligence {
  grid-template: "scope evidence properties" 42px "list evidence properties" 1fr / minmax(150px, 0.48fr) 1fr minmax(160px, 0.45fr);
}

.pattern-blueprint__scope {
  grid-area: scope;
}

.pattern-blueprint__list {
  grid-area: list;
}

.pattern-blueprint__evidence {
  grid-area: evidence;
}

.pattern-blueprint__properties {
  grid-area: properties;
}

.pattern-blueprint--commerce {
  grid-template: "scope scope approval" 42px "queue selected approval" 1fr / minmax(170px, 0.5fr) 1fr minmax(150px, 0.4fr);
}

.pattern-blueprint__queue {
  grid-area: queue;
}

.pattern-blueprint__selected {
  grid-area: selected;
}

.pattern-blueprint__approval {
  grid-area: approval;
}

.pattern-blueprint--engineering {
  grid-template: "tools canvas properties" 1fr "status status status" 40px / 54px 1fr minmax(170px, 0.4fr);
}

.pattern-blueprint__tools {
  grid-area: tools;
}

.pattern-blueprint__canvas {
  grid-area: canvas;
}

.pattern-blueprint__status {
  grid-area: status;
}

.pattern-records {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-block: 1px solid var(--line);
}

.pattern-records > section {
  min-width: 0;
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}

.pattern-records > section:first-child {
  padding-left: 0;
}

.pattern-records > section:last-child {
  border-right: 0;
}

.pattern-records h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 590;
}

.pattern-records dl,
.pattern-composition {
  margin: 14px 0 0;
}

.pattern-records dl > div,
.pattern-composition > div {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 18px;
  padding: 7px 0;
  border-top: 1px solid var(--line-subtle);
}

.pattern-records dt,
.pattern-records dd,
.pattern-composition dt,
.pattern-composition dd {
  min-width: 0;
  margin: 0;
  font-size: 10px;
}

.pattern-records dt,
.pattern-composition dt {
  color: var(--muted);
}

.pattern-records dd,
.pattern-composition dd {
  color: var(--text-2);
  text-align: right;
  overflow-wrap: anywhere;
}

.pattern-job,
.pattern-prohibitions {
  display: grid;
  grid-template-columns: minmax(180px, 0.38fr) minmax(0, 1fr);
  gap: 36px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.pattern-job h3,
.pattern-job p,
.pattern-prohibitions h3,
.pattern-prohibitions ul {
  margin: 0;
}

.pattern-job h3,
.pattern-prohibitions h3 {
  font-size: 12px;
  font-weight: 600;
}

.pattern-job > p,
.pattern-prohibitions ul {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.pattern-composition {
  grid-column: 2;
}

.pattern-prohibitions ul {
  padding-left: 16px;
}

.pattern-prohibitions li + li {
  margin-top: 6px;
}

.pattern-discovery-section__sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding-top: 20px;
}

.pattern-discovery-section__sources p {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.pattern-source-copy {
  display: grid;
  gap: 5px;
}

.pattern-discovery-section__sources .reference-language-note {
  max-width: 68ch;
  color: var(--muted);
  line-height: 1.5;
}

.pattern-discovery-section__sources strong {
  color: var(--text-2);
}

.pattern-discovery-section__sources > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (hover: hover) and (pointer: fine) {
  .showcase-command-trigger:hover {
    background: var(--hover);
  }

  .showcase-nav a:hover,
  .showcase-footer a:hover {
    color: var(--text);
  }

  .showcase-button:hover,
  .preview-action:hover {
    border-color: var(--line-strong);
    color: var(--text);
  }

  .showcase-button.primary:hover,
  .preview-action.primary:hover {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
    color: #fff;
  }

  .task-row:hover,
  .component-row:hover,
  .evidence-row:hover,
  .discovery-row:hover {
    background: var(--hover);
  }

  a.discovery-row__name:hover,
  .showcase-source-link a:hover,
  .component-evidence a:hover,
  .pattern-discovery-section__sources a:not(.button):hover {
    color: var(--text);
    text-decoration-color: currentColor;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .showcase-header .showcase-nav {
    transition:
      transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
      opacity 120ms ease-out;
  }

  .preview-poster,
  .preview-frame {
    transition: opacity 160ms var(--ease), transform 180ms var(--ease);
  }

  .showcase-button,
  .preview-action {
    transition: background-color 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease), transform 90ms var(--ease);
  }

  .showcase-button:active,
  .preview-action:active {
    transform: scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-header .showcase-nav {
    transition: opacity 80ms linear;
  }

  .preview-poster,
  .preview-frame {
    transform: none;
    transition: opacity 80ms linear;
  }

  .showcase-button,
  .preview-action {
    transform: none;
  }
}

/* Shared preview material: product previews are bounded objects; discovery and
   reading surfaces remain planes differentiated by directional contact edges. */
.component-gallery,
.reference-stage {
  box-shadow: inset 0 1px 0 var(--edge-highlight-strong), var(--shadow-raised);
}

.component-gallery-card__header,
.reference-stage__toolbar,
.reference-stage__footer {
  box-shadow: inset 0 1px 0 var(--edge-highlight), inset 0 -1px 0 var(--edge-contact);
}

.reference-stage__viewport {
  box-shadow: inset 0 1px 0 var(--edge-contact);
}

@media (forced-colors: active) {
  .component-gallery,
  .reference-stage,
  .showcase-product-stage {
    border-color: CanvasText;
    box-shadow: none;
  }
}

@media (max-width: 1180px) {
  :root {
    --showcase-page-padding: 24px;
  }

  .showcase-header .brand-copy {
    display: none;
  }

  .showcase-header .brand {
    min-width: auto;
  }

  .showcase-lead {
    grid-template-columns: minmax(244px, 0.3fr) minmax(0, 1fr);
  }

  .catalog-proof {
    grid-template-columns: minmax(150px, 0.8fr) repeat(4, minmax(94px, 0.65fr)) minmax(170px, 1fr);
  }

  .proof-heading,
  .proof-cell {
    padding-inline: 18px;
  }
}

@media (max-width: 900px) {
  .showcase-lead {
    grid-template-columns: 1fr;
    padding-top: 30px;
  }

  .showcase-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.64fr);
    gap: 24px 36px;
    align-items: start;
  }

  .showcase-intro .showcase-label,
  .showcase-intro h1,
  .showcase-intro .lead,
  .showcase-intro .showcase-actions {
    grid-column: 1;
  }

  .showcase-intro-note {
    grid-column: 2;
    grid-row: 1 / span 4;
    margin-top: 0;
  }

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

  .proof-heading,
  .proof-cell {
    padding: 14px 22px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .proof-heading {
    grid-column: 1 / -1;
  }

  .proof-cell:nth-child(even) {
    border-right: 1px solid var(--line);
  }

  .proof-cell.appearance {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .showcase-section-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .discovery-page {
    width: min(100%, 860px);
  }

  .support-list dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .support-list dl > div {
    border-bottom: 1px solid var(--line);
  }

  .support-list dl > div:nth-child(3) {
    border-right: 0;
  }

  .support-list dl > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 780px) {
  :root {
    --showcase-page-padding: 18px;
  }

  .showcase-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-inline: 6px;
  }

  .showcase-header .brand {
    padding-inline: 4px 6px;
  }

  .showcase-header .header-actions {
    gap: 0;
    padding-inline: 2px 0;
  }

  .showcase-header .nav-toggle,
  .showcase-command-trigger,
  .showcase-header .language-trigger,
  .showcase-header .contrast-toggle {
    display: grid;
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .showcase-header .theme-switch {
    width: 54px;
    height: 44px;
  }

  .showcase-header .theme-switch::before {
    inset-block: 8px;
  }

  .showcase-nav {
    position: fixed;
    z-index: 30;
    inset: var(--showcase-header-height) auto 0 0;
    display: grid;
    width: min(300px, calc(100vw - 48px));
    height: auto;
    align-content: start;
    padding: 10px;
    border-right: 1px solid var(--line);
    background: var(--surface-2);
    box-shadow: inset -1px 0 0 var(--edge-highlight-strong), var(--shadow-floating);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-100%);
  }

  body.nav-open,
  body.nav-closing {
    overflow: hidden;
  }

  .showcase-nav[data-drawer-state="open"] {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .showcase-nav[data-drawer-state="closing"] {
    opacity: 0;
    transform: translateX(-100%);
  }

  .showcase-nav a {
    justify-content: space-between;
    border-radius: 5px;
    min-height: 44px;
    padding-inline: 12px;
    font-size: 13px;
  }

  .showcase-nav a[aria-current="page"] {
    background: var(--navigation-selected);
    box-shadow: inset 0 1px 0 var(--edge-highlight), var(--shadow-contact);
  }

  .showcase-nav a[aria-current="page"]::after {
    display: none;
  }

  .showcase-button,
  .preview-action {
    min-height: 44px;
  }

  .reference-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .reference-status {
    width: max-content;
  }

  .preview-controls {
    align-items: flex-start;
  }

  .task-row,
  .component-row,
  .evidence-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 16px;
    min-height: 76px;
    padding-block: 12px;
  }

  .task-kind,
  .component-row strong,
  .evidence-row strong {
    grid-column: 1;
  }

  .task-copy,
  .component-row > span:nth-child(2),
  .evidence-row > span:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .row-meta,
  .component-maturity,
  .evidence-kind {
    grid-column: 1;
    grid-row: 3;
  }

  .row-action {
    grid-column: 2;
    grid-row: 1;
  }

  .discovery-page {
    padding-top: 42px;
  }

  .discovery-hero {
    padding-bottom: 42px;
  }

  .discovery-hero h1 {
    max-width: 20ch;
    font-size: clamp(31px, 8vw, 40px);
  }

  .discovery-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 16px;
    min-height: 64px;
    padding-block: 10px;
  }

  .discovery-row__identity {
    grid-column: 1;
    grid-row: 1;
  }

  .discovery-row__facts {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .discovery-row__action {
    grid-column: 2;
    grid-row: 1;
  }

  .component-explorer__job,
  .component-applicable-states,
  .pattern-discovery-section__heading,
  .pattern-job,
  .pattern-prohibitions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pattern-composition {
    grid-column: auto;
  }

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

  .evidence-columns > section,
  .evidence-columns > section:first-child {
    padding: 16px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .evidence-columns > section:last-child {
    border-bottom: 0;
  }

  .pattern-blueprint--information {
    grid-template: "search search" 40px "reading source" 1fr "navigation navigation" 40px / minmax(0, 1fr) minmax(0, 0.5fr);
  }

  .pattern-blueprint--intelligence {
    grid-template: "scope scope" 40px "list evidence" 1fr "properties properties" 40px / minmax(0, 0.55fr) minmax(0, 1fr);
  }

  .pattern-blueprint--commerce {
    grid-template: "scope scope" 40px "queue selected" 1fr "approval approval" 40px / minmax(0, 0.55fr) minmax(0, 1fr);
  }

  .pattern-blueprint--engineering {
    grid-template: "tools canvas" 1fr "properties properties" 44px "status status" 40px / 54px minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .showcase-intro {
    display: block;
  }

  .showcase-intro h1 {
    max-width: 16ch;
  }

  .showcase-intro-note {
    margin-top: 24px;
  }

  .showcase-lead {
    gap: 30px;
    padding-inline: 14px;
  }

  .reference-heading h2 {
    font-size: 18px;
  }

  .preview-controls {
    display: block;
    padding-block: 10px;
  }

  .preview-actions {
    margin-top: 9px;
  }

  .preview-actions > * {
    flex: 1 1 160px;
  }

  .reference-boundaries div {
    grid-template-columns: 1fr;
    gap: 3px;
    padding-block: 10px;
  }

  .showcase-section {
    padding-block: 54px;
  }

  .showcase-section-heading {
    margin-bottom: 18px;
  }

  .component-directory {
    padding-bottom: 44px;
  }

  .component-directory__group + .component-directory__group {
    margin-top: 34px;
  }

  .component-reference-frame {
    height: 620px;
  }

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

  .support-list dl > div,
  .support-list dl > div:nth-child(3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .support-list dl > div:nth-child(even) {
    border-right: 0;
  }

  .support-list dl > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .pattern-records {
    grid-template-columns: 1fr;
  }

  .pattern-records > section,
  .pattern-records > section:first-child {
    padding: 16px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .pattern-records > section:last-child {
    border-bottom: 0;
  }

  .pattern-discovery-section {
    padding-block: 44px;
  }
}

@media (max-width: 480px) {
  .showcase-header {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 1px;
    padding-inline: 3px;
  }

  .showcase-header .brand {
    min-width: 34px;
    padding: 0 3px;
  }

  .showcase-header .brand-mark {
    width: 27px;
    height: 27px;
  }

  .showcase-actions > * {
    width: 100%;
  }

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

  .proof-heading,
  .proof-cell {
    padding-inline: 14px;
  }

  .preview-viewport {
    border-radius: 5px;
  }

  .preview-action {
    width: 100%;
  }

  .showcase-footer {
    display: block;
  }

  .showcase-footer nav {
    margin-top: 18px;
  }

  .discovery-hero {
    padding-bottom: 34px;
  }

  .discovery-source-note {
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 10px;
    margin-top: 22px;
  }

  .discovery-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .discovery-row__identity,
  .discovery-row__facts,
  .discovery-row__action {
    grid-column: 1;
  }

  .discovery-row__action {
    grid-row: 3;
    justify-content: flex-start;
    text-align: left;
  }

  .component-reference__meta {
    display: block;
  }

  .component-reference__meta .button {
    width: 100%;
    margin-top: 12px;
  }

  .support-list dl {
    grid-template-columns: 1fr;
  }

  .support-list dl > div,
  .support-list dl > div:nth-child(3),
  .support-list dl > div:nth-child(even),
  .support-list dl > div:nth-last-child(-n + 2) {
    padding: 11px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .support-list dl > div:last-child {
    border-bottom: 0;
  }

  .pattern-blueprint {
    min-height: 0;
    grid-template: none;
    grid-template-columns: 1fr;
  }

  .pattern-blueprint > div {
    grid-area: auto;
    min-height: 44px;
  }

  .pattern-discovery-section__sources {
    display: block;
  }

  .pattern-discovery-section__sources > div {
    margin-top: 14px;
  }

  .pattern-discovery-section__sources .button {
    width: 100%;
  }
}

@media print {
  .showcase-header,
  .showcase-actions,
  .preview-controls,
  .command-dialog,
  [data-sonner-root] {
    display: none !important;
  }

  .showcase-main {
    width: auto;
    background: #fff;
    color: #000;
  }

  .showcase-lead {
    display: block;
    padding: 0;
  }

  .featured-reference {
    margin-top: 24px;
  }

  .preview-poster {
    opacity: 1 !important;
    transform: none !important;
  }

  .preview-frame {
    display: none;
  }

  .showcase-section {
    padding-inline: 0;
    break-inside: avoid;
  }
}

.component-browser[data-component-workbench] .component-gallery-card__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}

.component-gallery-card__choice {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text-2);
  text-align: left;
}

.component-gallery-card__choice > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--muted);
}

.component-gallery-card__choice > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.component-gallery-card__choice strong,
.component-gallery-card__choice small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.component-gallery-card__choice strong {
  color: inherit;
  font-size: 10px;
  font-weight: 620;
  line-height: 1.3;
}

.component-gallery-card__choice small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.2;
}

.component-gallery-card__choice[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--navigation-selected) 72%, var(--line));
  background: var(--navigation-selected);
  color: var(--text);
}

.component-gallery-card__choice[aria-selected="true"] > svg,
.component-gallery-card__choice[aria-selected="true"] small {
  color: var(--text-2);
}

.component-gallery-card__choice:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.component-browser[data-component-workbench] .component-gallery-card__header a {
  min-height: 32px;
  justify-content: flex-start;
  margin: 0;
  padding-inline: 6px;
  font-size: 9px;
}

.reference-stage--component-workbench .reference-stage__viewport {
  height: var(--explorer-stage-height, clamp(520px, 62vh, 640px));
}

.reference-stage__toolbar--component-workbench {
  align-items: flex-start;
}

.reference-stage__toolbar--component-workbench .reference-stage__identity {
  display: grid;
  flex: 1 1 220px;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.reference-stage__toolbar--component-workbench .reference-stage__identity small {
  max-width: 44ch;
  overflow: hidden;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
}

.reference-stage__toolbar--component-workbench .reference-stage__identity > small:first-of-type {
  min-height: 0;
  white-space: nowrap;
}

.reference-stage__reset {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-inline: 9px;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 4px;
  background: #0d0e10;
  color: #c5c9cf;
  font-size: 9px;
  font-weight: 600;
}

.reference-stage__reset svg {
  width: 13px;
  height: 13px;
}

.reference-stage__reset:hover {
  color: #fff;
}

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

.reference-stage__footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* The workbench is a browser, not a poster wall: use a quiet rail beside the
   one live reference on wide screens and a touch-scroll rail on small screens. */
@media (min-width: 1100px) {
  .component-browser[data-component-workbench] {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-1);
  }

  .component-browser[data-component-workbench] .component-gallery {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
  }

  .component-browser[data-component-workbench] .component-gallery-card {
    display: block;
    flex: 0 0 auto;
    min-height: 0;
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .component-browser[data-component-workbench] .component-gallery-card:last-child {
    border-bottom: 0;
  }

  .component-browser[data-component-workbench] .component-gallery-card__header {
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
  }

  .component-browser[data-component-workbench] .component-gallery-card__header a {
    justify-content: flex-end;
    min-height: 44px;
    padding-inline: 5px;
    overflow: hidden;
    font-size: 0;
  }

  .component-browser[data-component-workbench] .component-gallery-card__header a svg {
    width: 13px;
    height: 13px;
  }
  .component-browser[data-component-workbench] .reference-stage--component-workbench {
    min-width: 0;
    border: 0;
    border-radius: 0;
  }
}

@media (max-width: 1099px) {
  .component-browser[data-component-workbench] .component-gallery {
    position: relative;
    display: flex;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .component-browser[data-component-workbench] .component-gallery::-webkit-scrollbar {
    display: none;
  }

  .component-browser[data-component-workbench] .component-gallery::after {
    position: sticky;
    z-index: 2;
    right: 0;
    display: grid;
    width: 28px;
    min-width: 28px;
    min-height: 100%;
    flex: 0 0 28px;
    place-items: center;
    border-left: 1px solid var(--line);
    background: var(--surface-1);
    color: var(--muted);
    content: "›";
    font: 600 18px/1 system-ui, sans-serif;
    pointer-events: none;
  }

  .component-browser[data-component-workbench] .component-gallery-card {
    flex: 0 0 188px;
    min-height: 0;
    padding: 8px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
  .component-browser[data-component-workbench] .reference-stage--component-workbench {
    border-top: 0;
    border-radius: 0 0 9px 9px;
  }
}

/* Showcase 2.1: present-first discovery */
.discovery-page {
  width: min(100%, 1240px);
  padding-top: 36px;
}

body[data-showcase-route="patterns"] .discovery-page {
  width: min(100%, 1440px);
}

.discovery-hero--compact {
  display: grid;
  max-width: none;
  grid-template-columns: minmax(260px, 0.4fr) minmax(300px, 0.6fr);
  grid-template-rows: auto auto;
  gap: 8px 54px;
  align-items: end;
  padding-bottom: 28px;
}

.discovery-hero--compact .eyebrow {
  grid-column: 1;
  grid-row: 1;
}

.discovery-hero--compact h1 {
  max-width: 13ch;
  grid-column: 1;
  grid-row: 2;
  font-size: clamp(34px, 3.6vw, 46px);
}

html:lang(zh-CN) .discovery-hero--compact h1 {
  max-width: 12em;
}

.discovery-hero--compact .lead {
  max-width: 56ch;
  grid-column: 2;
  grid-row: 2;
  margin: 0 0 4px;
  font-size: 13px;
}

.discovery-hero--components {
  grid-template-columns: minmax(260px, 0.56fr) minmax(360px, 0.44fr);
  grid-template-rows: auto;
  align-items: end;
  padding-block: 14px 34px;
}

.discovery-hero--components h1,
.discovery-hero--components .lead {
  grid-row: 1;
}

.discovery-hero--components h1 {
  max-width: 17ch;
}

.discovery-hero--components .lead {
  align-self: end;
}

.component-browser {
  min-width: 0;
  margin-bottom: 56px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.component-gallery-card__header a {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: -11px -8px -11px 0;
  padding: 0 8px;
  color: var(--text-2);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
}

.component-gallery-card__header a svg {
  width: 13px;
  height: 13px;
}

.reference-stage {
  --stage-background: #08090a;
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, white 12%, transparent);
  border-radius: 9px;
  background: var(--stage-background);
  color: #f7f8f8;
  box-shadow: inset 0 1px 0 var(--edge-highlight-strong), var(--shadow-raised);
}

.reference-stage__toolbar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 7px 9px 7px 14px;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  background: #111214;
}

.reference-stage__identity {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.reference-stage__identity span {
  color: #777d87;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reference-stage__identity strong {
  overflow: hidden;
  color: #d7dadd;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-stage__identity small {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  gap: 4px;
  padding-inline: 6px;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 4px;
  color: #969ca5;
  font-size: 9px;
  font-weight: 540;
  line-height: 1;
  white-space: nowrap;
}

.reference-stage__identity small[hidden] {
  display: none;
}

.reference-stage__identity small svg {
  width: 12px;
  height: 12px;
}

.reference-stage__controls {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.stage-segmented {
  display: inline-flex;
  min-width: 0;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 5px;
  background: #0d0e10;
}

.stage-segmented button {
  display: inline-flex;
  min-width: 30px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 7px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #737985;
  font-size: 9px;
  font-weight: 600;
}

.stage-segmented button svg {
  width: 13px;
  height: 13px;
}

.stage-segmented button[aria-pressed="true"] {
  background: #202227;
  color: #f4f5f6;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.04);
}

.reference-stage__viewport {
  position: relative;
  height: clamp(520px, 66vh, 720px);
  overflow: hidden;
  background: var(--stage-background);
}

.reference-stage__viewport iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #08090a;
  opacity: 0;
}

.reference-stage[data-stage-viewport="narrow"] .reference-stage__viewport iframe {
  width: 390px;
  max-width: 100%;
  margin-inline: auto;
  border-inline: 1px solid rgb(255 255 255 / 0.1);
}

.reference-stage__loading {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0b0c0e;
  color: #7d838e;
  font-size: 10px;
}

.reference-stage__loading > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5e6ad2;
  opacity: 0.8;
}

.reference-stage[data-stage-ready="true"] .reference-stage__viewport iframe {
  opacity: 1;
}

.reference-stage[data-stage-ready="true"] .reference-stage__loading {
  visibility: hidden;
  opacity: 0;
}

.reference-stage__footer {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 14px;
  border-top: 1px solid rgb(255 255 255 / 0.08);
  background: #111214;
}

.reference-stage__footer p {
  max-width: 70ch;
  margin: 0;
  color: #858b95;
  font-size: 9px;
  line-height: 1.5;
}

.reference-stage__footer > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  color: #777d87;
  font-size: 9px;
}

.reference-stage__footer > div strong {
  color: #c9ccd1;
  font-weight: 600;
}

.reference-stage__footer .reference-language-note {
  flex-basis: 100%;
  color: #858b95;
  font-size: 9px;
  line-height: 1.45;
}

.stage-text-link {
  display: inline-flex;
  min-height: 30px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  color: #aeb3bd;
  font-size: 9px;
  font-weight: 600;
  text-decoration: none;
}

.stage-text-link svg {
  width: 13px;
  height: 13px;
}

.catalog-disclosure,
.pattern-details {
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.catalog-disclosure > summary,
.pattern-details > summary {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-height: 72px;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--text-2);
}

.catalog-disclosure > summary::-webkit-details-marker,
.pattern-details > summary::-webkit-details-marker {
  display: none;
}

.catalog-disclosure > summary > span {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 3px;
}

.catalog-disclosure > summary strong {
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.catalog-disclosure > summary small {
  color: var(--muted);
  font-size: 10px;
}

.catalog-disclosure > summary > svg,
.pattern-details > summary > svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.catalog-disclosure[open] > summary > svg,
.pattern-details[open] > summary > svg {
  rotate: 180deg;
}

.catalog-disclosure__body,
.pattern-details__body {
  padding: 6px 0 42px;
}

.catalog-disclosure--compact {
  margin-top: 24px;
}

body[data-showcase-route="component-explorer"] .docs-shell {
  grid-template-columns: minmax(0, 1fr);
}

body[data-showcase-route="component-explorer"] .docs-nav {
  display: none;
}

body[data-showcase-route="component-explorer"] .showcase-main {
  grid-column: 1;
  width: 100%;
}

body[data-showcase-route="component-explorer"] .discovery-page {
  width: 100%;
  padding: 0;
}

.component-studio {
  display: grid;
  min-width: 0;
  min-height: calc(100svh - var(--showcase-header-height));
  grid-template-columns: 248px minmax(0, 1fr);
}

.component-studio__navigation {
  position: sticky;
  z-index: 3;
  top: var(--showcase-header-height);
  display: block;
  height: calc(100svh - var(--showcase-header-height));
  align-self: start;
  padding: 24px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--canvas);
  scrollbar-width: thin;
}

.component-studio__navigation .back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin: 0;
  padding-inline: 8px;
  white-space: nowrap;
}

.component-studio__navigation .back-link svg {
  rotate: none;
}

.component-studio__navigation-label {
  margin: 20px 8px 8px;
  color: var(--muted);
  font: 600 9px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace;
  text-transform: uppercase;
}

.component-studio__navigation nav {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.component-studio__navigation nav a {
  display: grid;
  min-width: 0;
  min-height: 44px;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  font-size: 10px;
  text-decoration: none;
}

.component-studio__navigation nav a svg {
  width: 14px;
  height: 14px;
}

.component-studio__navigation nav a[aria-current="page"] {
  background: var(--navigation-selected);
  box-shadow: inset 0 1px 0 var(--edge-highlight), var(--shadow-contact);
  color: var(--text);
}

.component-studio__main {
  min-width: 0;
  padding: 34px clamp(28px, 4vw, 56px) 56px;
}

.component-studio__header {
  display: flex;
  min-width: 0;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 6px 0 22px;
}

.component-studio__header h1,
.component-studio__header p {
  margin: 0;
}

.component-studio__header h1 {
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 620;
  letter-spacing: -0.03em;
}

.component-studio__header > div:first-child > p:last-child {
  max-width: 62ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.component-studio__header .component-explorer__identity {
  flex: 0 0 auto;
  margin: 0;
}

.reference-stage--explorer .reference-stage__viewport {
  height: var(--explorer-stage-height, clamp(520px, 62vh, 640px));
}

.reference-stage__toolbar--explorer {
  min-height: 54px;
}

.stage-state-readout {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 4px;
  background: #0d0e10;
  color: #777d87;
  font-size: 9px;
}

.stage-state-readout svg {
  width: 12px;
  height: 12px;
  color: #8e98ff;
}

.stage-state-readout span {
  max-width: 190px;
  overflow: hidden;
  color: #c5c9cf;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.component-detail-tabs {
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

.component-detail-tabs__list {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.component-detail-tabs__list button {
  position: relative;
  min-height: 46px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.component-detail-tabs__list button[aria-selected="true"] {
  background: var(--navigation-selected);
  box-shadow: inset 0 1px 0 var(--edge-highlight), var(--shadow-contact);
  color: var(--text);
}

.component-detail-tabs__list button[aria-selected="true"]::after {
  display: none;
}

.component-detail-tabs__panel {
  min-height: 210px;
  padding: 28px 0 52px;
}

.component-detail-tabs__panel[hidden] {
  display: none;
}

.component-detail-tabs__panel > h2,
.component-detail-tabs__panel > p {
  max-width: 78ch;
}

.component-detail-tabs__panel h2,
.component-detail-tabs__panel h3,
.component-detail-tabs__panel p {
  margin-top: 0;
}

.component-detail-tabs__panel h2 {
  font-size: 15px;
  font-weight: 600;
}

.component-detail-tabs__panel p,
.component-detail-tabs__panel li,
.component-detail-tabs__panel dt,
.component-detail-tabs__panel dd {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.component-detail-tabs__panel aside {
  display: flex;
  max-width: 78ch;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.component-detail-tabs__panel aside svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--muted);
}

.component-support-grid {
  display: grid;
  max-width: 860px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 18px 0 22px;
  border-block: 1px solid var(--line);
}

.component-support-grid > div {
  padding: 12px;
  border-right: 1px solid var(--line);
}

.component-support-grid > div:first-child {
  padding-left: 0;
}

.component-support-grid > div:last-child {
  border-right: 0;
}

.component-support-grid dt,
.component-support-grid dd {
  margin: 0;
}

.component-support-grid dd {
  margin-top: 4px;
  color: var(--text-2);
  font-weight: 600;
}

.component-support-grid dd[data-supported="true"] {
  color: var(--positive);
}

.pattern-browser {
  display: grid;
  min-width: 0;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-areas:
    "selector heading"
    "selector stage"
    "contexts contexts";
  gap: 0 20px;
  align-items: start;
  margin-top: 34px;
}

.pattern-browser__selector {
  position: sticky;
  top: calc(var(--showcase-header-height) + 24px);
  display: flex;
  grid-area: selector;
  flex-direction: column;
  gap: 2px;
  padding-block: 4px;
  overflow: hidden;
  border-block: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.pattern-browser__selector button {
  display: grid;
  min-width: 0;
  min-height: 78px;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 14px 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.pattern-browser__selector button[aria-selected="true"] {
  background: var(--navigation-selected);
  color: var(--text);
  box-shadow: inset 0 1px 0 var(--edge-highlight), var(--shadow-contact);
}

.pattern-browser__selector button > svg {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.pattern-browser__selector button span {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.pattern-browser__selector button strong {
  color: inherit;
  font-size: 11px;
  font-weight: 610;
}

.pattern-browser__selector button small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pattern-browser__heading {
  grid-area: heading;
  display: flex;
  min-height: 84px;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding: 16px 0 12px;
}

.pattern-browser__heading h2,
.pattern-browser__heading p {
  margin: 0;
}

.pattern-browser__heading h2 {
  font-size: 22px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.pattern-browser__heading p {
  max-width: 66ch;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.reference-stage--pattern-browser .reference-stage__viewport {
  height: clamp(560px, 68vh, 760px);
}

/* The browser is a bounded preview: preserve a desktop product viewport before
   reducing selector density. This keeps the commerce inspector in its native
   wide layout while the outer page remains a continuous reading surface. */
@media (min-width: 1500px) {
  .pattern-browser {
    grid-template-columns: 184px minmax(1120px, 1fr);
  }

  .pattern-browser__selector button {
    min-height: 72px;
    padding-inline: 10px;
  }
}

.reference-stage--pattern-browser {
  grid-area: stage;
}

.pattern-browser__contexts {
  grid-area: contexts;
  margin-top: 28px;
  border-bottom: 1px solid var(--line);
}

.pattern-browser__context[hidden] {
  display: none;
}

.pattern-context-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.pattern-context-strip > div {
  min-width: 0;
  padding: 18px 20px 20px;
  border-right: 1px solid var(--line);
}

.pattern-context-strip > div:last-child {
  border-right: 0;
}

.pattern-context-strip dt,
.pattern-context-strip dd {
  margin: 0;
}

.pattern-context-strip dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.pattern-context-strip dd {
  margin-top: 7px;
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.55;
}

.pattern-browser .pattern-details {
  margin-top: 0;
}

.pattern-discovery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 54px 24px;
  border-top: 0;
}

.pattern-discovery-section {
  min-width: 0;
  padding: 0 0 44px;
  border-bottom: 1px solid var(--line);
}

.pattern-discovery-section:first-child {
  padding-top: 0;
}

.pattern-discovery-section__heading {
  display: grid;
  min-height: 96px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.pattern-discovery-section__heading > div:first-child {
  display: block;
  min-width: 0;
}

.pattern-discovery-section__actions {
  flex: 0 0 auto;
}

.pattern-discovery-section__heading h2 {
  font-size: 20px;
}

.pattern-discovery-section__heading p {
  max-width: 52ch;
  margin-top: 8px;
}

.reference-stage--pattern {
  width: 100%;
}

.reference-stage--pattern .reference-stage__viewport {
  height: clamp(360px, 46vh, 520px);
}

.pattern-discovery-section--information-site .reference-stage--pattern {
  width: 100%;
  --stage-background: #f4f5f7;
}

.pattern-discovery-section--information-site .reference-stage__viewport {
  height: clamp(360px, 46vh, 520px);
}

.pattern-discovery-section--ecommerce-operations .reference-stage--pattern {
  width: 100%;
}

.pattern-discovery-section--engineering-canvas .reference-stage--pattern {
  border-radius: 4px;
  box-shadow: inset 0 1px 0 var(--edge-highlight-strong), var(--shadow-raised);
}

.pattern-details {
  margin-top: 18px;
  border-bottom: 0;
}

.pattern-details > summary {
  min-height: 52px;
  color: var(--muted);
  font-size: 10px;
}

.pattern-details__body {
  padding-top: 12px;
}

@media (hover: hover) and (pointer: fine) {
  .stage-tabs button:hover,
  .stage-lab-link:hover {
    color: var(--stage-text);
  }

  .context-entry:hover {
    background: var(--hover);
  }

  .component-gallery-card__header a:hover,
  .component-studio__navigation nav a:hover {
    background: var(--hover);
    color: var(--text);
  }

  .stage-segmented button:hover {
    color: #f4f5f6;
  }

  .pattern-browser__selector button:hover {
    background: var(--hover);
    color: var(--text);
  }

  .stage-text-link:hover {
    color: white;
  }

  .catalog-disclosure > summary:hover,
  .pattern-details > summary:hover {
    color: var(--text);
  }
}

@media (min-width: 901px) {
  .stage-tabs button,
  .stage-lab-link,
  .stage-frame iframe,
  .stage-poster,
  .stage-loading,
  .context-entry,
  .showcase-text-action {
    transition:
      color 140ms var(--ease),
      background-color 140ms var(--ease),
      opacity 180ms var(--ease),
      transform 180ms var(--ease-exit);
  }

  .component-gallery-card__header a,
  .component-studio__navigation nav a,
  .stage-segmented button,
  .reference-stage__viewport iframe,
  .reference-stage__loading,
  .catalog-disclosure > summary > svg,
  .pattern-details > summary > svg {
    transition:
      color 140ms var(--ease),
      background-color 140ms var(--ease),
      opacity 160ms var(--ease),
      transform 160ms var(--ease),
      rotate 160ms var(--ease);
  }

  .component-gallery-card__header a:active,
  .component-studio__navigation nav a:active {
    transform: scale(0.97);
    transition-duration: 100ms;
  }

  .pattern-browser__selector button {
    transition:
      color 140ms var(--ease),
      background-color 140ms var(--ease);
  }

  [data-stage-input="keyboard"] .reference-stage__viewport iframe,
  [data-stage-input="keyboard"] .reference-stage__loading,
  [data-stage-input="keyboard"] .stage-frame iframe,
  [data-stage-input="keyboard"] .stage-poster,
  [data-stage-input="keyboard"] .stage-loading {
    transition-duration: 0ms;
  }
}

@media (max-width: 1080px) {
  .showcase-hero {
    padding-top: 48px;
  }

  .showcase-hero-copy {
    display: block;
    max-width: none;
  }

  .showcase-hero-copy .showcase-label {
    margin-bottom: 12px;
  }

  .showcase-hero-copy h1 {
    max-width: 14ch;
  }

  html:lang(zh-CN) .showcase-hero-copy h1 {
    max-width: 10em;
  }

  .showcase-hero-copy .lead {
    max-width: 52ch;
    margin-top: 18px;
  }

  .showcase-hero-actions {
    margin-top: 22px;
  }

  .showcase-product-stage {
    margin-top: 34px;
  }

  .showcase-manifesto,
  .showcase-signature {
    gap: 40px;
  }

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

  .decision-trace > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .decision-trace > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .reference-stage__toolbar--explorer {
    align-items: flex-start;
  }

  .reference-stage__controls {
    max-width: 64%;
  }
}

@media (max-width: 820px) {
  body[data-showcase-route="component-explorer"] .discovery-page {
    padding-inline: 0;
  }

  .discovery-hero--compact {
    display: block;
  }

  .discovery-hero--compact .lead {
    max-width: 52ch;
    margin-top: 14px;
  }

  .showcase-hero {
    display: block;
    padding: 42px 20px 68px;
  }

  .showcase-hero-copy {
    display: block;
  }

  .showcase-hero-copy .showcase-label {
    margin-bottom: 12px;
  }

  .showcase-hero-copy h1 {
    max-width: 14ch;
    font-size: clamp(38px, 9vw, 56px);
  }

  .showcase-hero-copy .lead {
    max-width: 46ch;
    margin: 18px 0 0;
  }

  .showcase-product-stage {
    margin-top: 30px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .showcase-product-stage::after {
    display: none;
  }

  .stage-toolbar {
    min-height: 52px;
    grid-column: 1;
    grid-row: 1;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--stage-line);
  }

  .stage-tabs {
    flex-direction: row;
    gap: 2px;
    overflow-x: auto;
  }

  .stage-tabs button {
    display: block;
    min-width: max-content;
    min-height: 44px;
    padding: 0 10px;
    text-align: center;
  }

  .stage-tabs button::before {
    display: none;
  }

  .stage-tabs button[aria-selected="true"]::after {
    display: none;
  }

  .stage-toolbar-actions {
    flex-direction: row;
    align-items: center;
  }

  .stage-language {
    padding-inline: 4px;
  }

  .stage-frame {
    grid-column: 1;
    grid-row: 2;
  }

  .stage-caption {
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: 1fr;
  }

  .showcase-manifesto,
  .showcase-signature,
  .showcase-evidence {
    padding: 72px 20px;
  }

  .showcase-evidence {
    display: block;
  }

  .showcase-evidence > .catalog-disclosure {
    margin-top: 36px;
  }

  .showcase-signature > .section-route {
    margin-top: 20px;
  }

  .showcase-manifesto,
  .showcase-signature {
    grid-template-columns: 1fr;
  }

  .showcase-section-intro {
    position: static;
  }

  .context-atlas {
    margin-top: 36px;
  }

  .showcase-manifesto > .section-route,
  .decision-trace__current,
  .showcase-signature > .section-route {
    grid-column: 1;
  }

  .context-entry {
    padding: 24px;
  }

  .component-studio {
    display: block;
    min-height: 0;
  }

  .component-studio__navigation {
    position: sticky;
    top: var(--showcase-header-height);
    width: 100%;
    height: auto;
    padding: 8px 20px 10px;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .component-studio__navigation-label {
    display: none;
  }

  .component-studio__navigation nav {
    display: flex;
    gap: 2px;
    margin-top: 4px;
    position: relative;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .component-studio__navigation nav::after,
  .reference-stage__controls::after,
  .pattern-browser__selector::after {
    position: sticky;
    z-index: 2;
    right: 0;
    display: grid;
    width: 24px;
    min-width: 24px;
    min-height: 44px;
    flex: 0 0 24px;
    place-items: center;
    align-self: stretch;
    border-left: 1px solid var(--line);
    background: var(--surface-1);
    color: var(--muted);
    content: "›";
    font: 600 16px/1 system-ui, sans-serif;
    pointer-events: none;
  }

  .component-studio__navigation nav::-webkit-scrollbar {
    display: none;
  }

  .component-studio__navigation nav a {
    min-width: max-content;
    flex: 0 0 auto;
  }

  .component-studio__main {
    padding: 24px 20px 48px;
  }

  .component-studio__header {
    display: block;
  }

  .component-studio__header .component-explorer__identity {
    margin-top: 12px;
  }

  .reference-stage__toolbar--explorer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
    padding: 9px 10px;
  }

  .reference-stage__controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    position: static;
    flex-wrap: wrap;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    justify-content: flex-start;
  }

  .reference-stage__controls > * {
    min-width: 0;
  }

  .pattern-discovery-section__heading,
  .pattern-discovery-section__heading > div:first-child {
    display: block;
  }

  .pattern-discovery-section__heading p {
    margin-top: 8px;
  }

  .pattern-discovery-section__actions {
    margin-top: 8px;
  }

  .pattern-discovery-section--information-site .reference-stage--pattern,
  .pattern-discovery-section--ecommerce-operations .reference-stage--pattern {
    width: 100%;
  }

  .pattern-discovery {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .pattern-discovery-section__heading {
    min-height: 0;
  }

  .pattern-context-strip {
    grid-template-columns: 1fr;
  }

  .pattern-context-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .pattern-context-strip > div:last-child {
    border-bottom: 0;
  }

  .pattern-browser {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "selector"
      "heading"
      "stage"
      "contexts";
    gap: 0;
  }

  .pattern-browser__selector {
    position: relative;
    flex-direction: row;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .pattern-browser__selector button {
    min-width: 210px;
    border-radius: 0;
  }

}

@media (max-width: 620px) {
  body[data-showcase-route="component-explorer"] .discovery-page {
    padding-inline: 0;
  }

  .showcase-hero {
    padding: 36px 14px 60px;
  }

  .showcase-hero-copy h1 {
    font-size: clamp(34px, 12vw, 46px);
    letter-spacing: -0.045em;
  }

  html:lang(zh-CN) .showcase-hero-copy h1 {
    max-width: none;
    font-size: clamp(34px, 10vw, 42px);
  }

  .showcase-hero-actions {
    margin-top: 18px;
  }

  .showcase-product-stage {
    margin-top: 26px;
  }

  .stage-toolbar {
    min-height: 48px;
    padding-inline: 8px;
  }

  .stage-tabs button {
    min-height: 44px;
    padding-inline: 8px;
  }

  .stage-tabs button[aria-selected="true"]::after {
    display: none;
  }

  .stage-lab-link {
    font-size: 0;
  }

  .stage-lab-link svg {
    width: 16px;
    height: 16px;
  }

  .stage-frame {
    aspect-ratio: 390 / 680;
  }

  .stage-caption {
    padding: 18px 14px;
  }

  .showcase-section-intro {
    display: block;
  }

  .showcase-section-intro > p {
    margin-top: 18px;
  }

  .context-atlas {
    margin-top: 34px;
  }

  .context-entry,
  .context-entry--information,
  .context-entry--intelligence,
  .context-entry--commerce,
  .context-entry--engineering {
    min-height: 132px;
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    padding: 20px 0;
  }

  .decision-trace {
    grid-template-columns: 1fr;
    margin-top: 34px;
  }

  .decision-trace > div {
    min-height: 150px;
    gap: 28px;
    padding: 20px 16px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .decision-trace > div:first-child {
    border-top: 0;
  }

  .showcase-manifesto,
  .showcase-signature,
  .showcase-evidence {
    padding-inline: 14px;
  }

  .discovery-page {
    padding-top: 32px;
  }

  .reference-stage__toolbar {
    min-height: 44px;
    padding-inline: 10px;
  }

  .reference-stage__identity > span {
    display: none;
  }

  .stage-segmented button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    margin: -1px;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .stage-segmented button[aria-pressed="true"] span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    margin: 0;
    clip-path: none;
    white-space: nowrap;
  }

  .stage-state-readout {
    min-height: 44px;
    padding-inline: 10px;
  }

  .stage-state-readout span {
    max-width: 112px;
  }

  .stage-segmented button {
    min-width: 44px;
    min-height: 44px;
  }

  .component-studio__navigation nav a {
    min-height: 44px;
  }

  .reference-stage__viewport {
    height: 620px;
  }

  .reference-stage--pattern .reference-stage__viewport,
  .pattern-discovery-section--information-site .reference-stage__viewport {
    height: 440px;
  }

  .pattern-browser__selector {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .pattern-browser__selector button {
    min-width: 156px;
    min-height: 58px;
  }

  .pattern-browser__selector button small {
    display: none;
  }

  .pattern-browser__heading {
    display: block;
    min-height: 0;
    padding-block: 22px 14px;
  }

  .pattern-browser__heading .stage-text-link {
    margin-top: 8px;
  }

  .reference-stage--pattern-browser .reference-stage__viewport {
    height: 580px;
  }

  .reference-stage--explorer .reference-stage__viewport {
    height: var(--explorer-stage-height, 580px);
  }

  .component-studio__navigation {
    margin-inline: 0;
    padding-inline: 14px;
  }

  .component-studio__navigation .back-link {
    max-width: min(62vw, 230px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .reference-stage__footer {
    align-items: flex-start;
  }

  .reference-stage__footer p {
    max-width: 42ch;
  }

  .component-detail-tabs__list {
    gap: 16px;
    overflow-x: auto;
  }

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

  .component-support-grid > div {
    border-bottom: 1px solid var(--line);
  }

  .component-support-grid > div:nth-child(even) {
    border-right: 0;
  }

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

  .evidence-columns > section,
  .evidence-columns > section:first-child {
    padding: 16px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (any-pointer: coarse) {
  .showcase-header .brand {
    min-width: 44px;
    min-height: 44px;
  }

  .showcase-header .showcase-command-trigger,
  .showcase-header .language-trigger,
  .showcase-header .contrast-toggle {
    min-width: 44px;
    height: 44px;
  }

  .showcase-header .theme-switch {
    width: 62px;
    height: 44px;
  }

  .showcase-text-action,
  .back-link,
  .stage-text-link,
  .showcase-button {
    min-height: 44px;
  }

  .stage-segmented button {
    min-width: 44px;
    min-height: 44px;
  }

  .component-studio__navigation nav a,
  .stage-state-readout {
    min-height: 44px;
  }

  .component-browser[data-component-workbench] .component-gallery-card__header a {
    min-width: 44px;
    min-height: 44px;
  }

  .component-detail-tabs__list button {
    min-width: 44px;
  }

  .pattern-discovery-section__sources a,
  .pattern-discovery-section__sources .button,
  .catalog-disclosure--compact .showcase-source-link a {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
  }

  .reference-disclosure summary {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-tabs button,
  .stage-lab-link,
  .stage-frame iframe,
  .stage-poster,
  .stage-loading,
  .context-entry,
  .showcase-text-action {
    transition: opacity 80ms linear;
  }

  .component-gallery-card__header a,
  .component-studio__navigation nav a,
  .stage-segmented button,
  .reference-stage__viewport iframe,
  .reference-stage__loading,
  .catalog-disclosure > summary > svg,
  .pattern-details > summary > svg {
    transition: opacity 80ms linear;
  }
}

@media print {
  .component-gallery-card__header a,
  .component-studio__navigation,
  .reference-stage__toolbar,
  .reference-stage__footer,
  .component-detail-tabs__list,
  .pattern-discovery-section__actions {
    display: none !important;
  }
}
