@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(/assets/fonts/geologica-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(/assets/fonts/geologica-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/assets/fonts/onest-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/assets/fonts/onest-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 300 600;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url(/assets/fonts/martian-mono-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 300 600;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url(/assets/fonts/martian-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #101113;
  --panel: #17181b;
  --panel-2: #1d1f23;
  --line: #ffffff12;
  --line-hi: #ffffff24;
  --fg: #eeeef0;
  --muted: #96989f;
  --faint: #676a73;
  --accent: #b7dec9;
  --accent-bg: #b7dec914;
  --code: #111316;
  --font: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: "Geologica", "Onest", -apple-system, system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, SFMono-Regular, monospace;
  --code-font: ui-monospace, SFMono-Regular, Menlo, monospace;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f2;
  --panel: #fff;
  --panel-2: #f1f1ee;
  --line: #00000012;
  --line-hi: #00000025;
  --fg: #1a1c20;
  --muted: #63676e;
  --faint: #7b7e85;
  --accent: #226648;
  --accent-bg: #2266480d;
  --code: #f6f7f6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  background: none;
  border: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
svg {
  width: 18px;
  height: 18px;
}
main {
  min-height: calc(100vh - 122px);
}
.app-header {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 32px;
  position: relative;
  z-index: 100;
  background: var(--bg);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.025em;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.18em;
  font-weight: 500;
  color: var(--muted);
  margin-top: 1px;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid #d7dbdf4d;
  background: linear-gradient(140deg, #e4e5e833, #52585f66 50%, #1a1e22);
  box-shadow:
    inset 2px 2px 6px #fff2,
    0 5px 10px #0002;
}
.brand-icon i {
  display: block;
  width: 15px;
  height: 20px;
  border: 1px solid #fff4;
  border-radius: 6px;
  background: linear-gradient(135deg, #fff7, #fff0);
}
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.icon-btn,
.text-btn {
  display: grid;
  place-items: center;
  min-width: 32px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
}
.header-agent {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 12px;
  background: var(--fg);
  color: var(--bg);
  padding: 9px 13px;
  border-radius: 7px;
  font-weight: 600;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 20px;
  z-index: 300;
  background: var(--accent);
  color: var(--bg);
  padding: 12px;
}
.skip-link:focus {
  top: 10px;
}
.eyebrow {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.13em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}
.eyebrow .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
h1 {
  font-size: 30px;
  letter-spacing: -0.04em;
  line-height: 1.2;
  font-weight: 550;
}
.page-description {
  color: var(--muted);
  margin-top: 8px;
  font-size: 12px;
  max-width: 660px;
}
.control {
  margin: 11px 0;
}
.control > label {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
}
.control output {
  font-family: var(--mono);
  font-stretch: 87.5%;
  color: var(--fg);
  font-size: 10px;
}
.control input[type="range"] {
  width: 100%;
  accent-color: var(--muted);
  height: 12px;
  margin: 0;
  cursor: pointer;
}
.control input[type="color"] {
  height: 23px;
  width: 36px;
  border: 1px solid var(--line);
  background: none;
  padding: 2px;
  border-radius: 4px;
}
.control select {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 10px;
}
.control-checkbox {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  padding: 7px 0;
  gap: 12px;
}
.control-checkbox input {
  accent-color: var(--accent);
}
details {
  margin-top: 15px;
}
summary {
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  padding: 7px 0;
}
.contract-link {
  display: block;
  padding: 9px 0;
  margin-top: 12px;
  font: semi-condensed 10px var(--mono);
  color: var(--accent);
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.check-result {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 9px;
}
.check-result b {
  font-size: 11px;
  font-weight: 500;
  display: block;
}
.check-result p {
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.check-result .check-icon {
  color: var(--accent);
  font-size: 12px;
}
.check-result.warning .check-icon {
  color: #d6b782;
}
.check-result.info .check-icon {
  color: #91b4d6;
}
.code-panel {
  margin: 18px 32px 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--code);
}
.code-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.code-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.code-tabs button {
  padding: 5px 10px;
  border-radius: 5px;
  font: semi-condensed 10px var(--mono);
  color: var(--muted);
}
.code-tabs button.active {
  background: var(--panel-2);
  color: var(--fg);
}
.code-actions {
  display: flex;
  gap: 9px;
}
.code-actions button,
.secondary-btn {
  border: 1px solid var(--line-hi);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 10px;
  background: var(--panel);
}
.code-actions .primary-btn,
.primary-btn {
  background: var(--accent);
  color: #102219;
  border-radius: 6px;
  font-size: 11px;
  padding: 9px 14px;
  font-weight: 600;
}
.code-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
}
.code-content pre {
  margin: 0;
  padding: 16px 20px;
  font:
    10px/1.8 var(--code-font);
  color: #a9b4c3;
  max-height: 190px;
  overflow: auto;
  tab-size: 2;
  white-space: pre;
}
.code-note {
  border-left: 1px solid var(--line);
  padding: 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.code-note b {
  display: block;
  color: var(--fg);
  font-size: 11px;
  margin-bottom: 6px;
  font-weight: 500;
}
.code-note a {
  display: block;
  color: var(--accent);
  margin-top: 12px;
}
.action-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.content-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 60px 32px;
}
.content-page h1 {
  font-size: 40px;
}
.content-intro {
  max-width: 680px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  margin: 16px 0 34px;
}
.agent-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 26px 28px;
  background: var(--accent-bg);
  border: 1px solid var(--line-hi);
  border-radius: 12px;
  margin: 25px 0;
}
.agent-banner h2 {
  font-size: 18px;
  font-weight: 500;
}
.agent-banner p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
}
.agent-entry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 26px 0;
}
.doc-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
  background: var(--panel);
  min-width: 0;
}
.doc-card h2 {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 12px;
}
.doc-card p,
.doc-card li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.doc-card pre,
.inline-code {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  background: var(--code);
  font: 11px/1.7 var(--code-font);
  overflow: auto;
  color: var(--accent);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 18px 0;
}
.resource-list {
  display: grid;
  gap: 0;
}
.resource-list a {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font: semi-condensed 11px var(--mono);
  gap: 12px;
}
.resource-list a span {
  color: var(--muted);
}
.pipeline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 30px 0;
}
.pipeline span {
  border: 1px solid var(--line-hi);
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 11px;
}
.pipeline i {
  font-style: normal;
  color: var(--faint);
  padding: 10px 0;
}
.validation-input {
  width: 100%;
  height: 180px;
  border: 1px solid var(--line-hi);
  background: var(--code);
  border-radius: 7px;
  padding: 12px;
  font:
    10px/1.7 var(--code-font);
  resize: vertical;
}
.validation-output {
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 12px;
  color: var(--muted);
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  margin: 0 32px;
  padding: 22px 0;
  font-size: 9px;
  color: var(--faint);
}
footer b {
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}
footer a {
  font-family: var(--mono);
  font-stretch: 87.5%;
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--fg);
  color: var(--bg);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 1000;
  max-width: 90vw;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.error-box {
  max-width: 650px;
  margin: 80px auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.error-box p {
  margin: 15px 0;
  color: var(--muted);
}
/* Studio: one editor, the design panel and a live stage. */
h1,
h2,
h3,
.brand {
  font-family: var(--display);
}
.header-actions {
  margin-left: auto;
}
.studio-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 26px 32px 20px;
}
.studio-intro h1 {
  font-size: clamp(26px, 2.7vw, 40px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
  max-width: 880px;
}
.studio-intro h1 em {
  display: block;
  font-style: normal;
  font-weight: 300;
  color: var(--muted);
}
.intro-meta {
  display: flex;
  gap: 22px;
  font: semi-condensed 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}
.intro-meta strong {
  display: block;
  font: 600 22px/1.1 var(--display);
  letter-spacing: -0.03em;
  color: var(--fg);
  text-transform: none;
}
.studio {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  height: clamp(640px, calc(100vh - 96px), 1060px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.design-panel {
  overflow-y: auto;
  padding: 6px 20px 28px;
  background: var(--panel);
  scrollbar-width: thin;
}
.design-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.section-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font: semi-condensed 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.section-label span {
  color: var(--fg);
  text-transform: none;
  letter-spacing: 0;
}
.material-note {
  margin: -4px 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.material-group + .material-group {
  margin-top: 12px;
}
.group-label {
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--faint);
}
.material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.material-chip {
  display: grid;
  gap: 5px;
  padding: 5px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  text-align: left;
  min-width: 0;
}
.material-chip > i {
  position: relative;
  display: block;
  height: 34px;
  border-radius: 6px;
  overflow: hidden;
  background:
    linear-gradient(115deg, transparent 46%, #ffffff 46.5% 50%, transparent 50.5%),
    linear-gradient(135deg, #ff7a59, #ffcf5a 28%, #36d1a5 52%, #3b6cff 76%, #8d5bff);
}
.material-chip > i::after {
  content: "";
  position: absolute;
  inset: 7px 10px;
  border-radius: var(--chip-radius);
  /* A static wash instead of backdrop-filter: two dozen blurred swatches in a scroller cost too much in WebKit. */
  background:
    linear-gradient(180deg, #ffffff40, #ffffff00 60%),
    color-mix(in srgb, var(--chip-tint) var(--chip-pct), #8a8f9a55);
  border: 1px solid #ffffff8c;
  box-shadow: 0 4px 10px #0004;
}
.material-chip > span {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-chip:hover {
  border-color: var(--line-hi);
}
.material-chip.active {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}
.control-row .control-checkbox {
  margin: 0 0 12px;
}
.design-group {
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.design-group > summary {
  padding: 14px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  list-style: none;
  display: flex;
  justify-content: space-between;
}
.design-group > summary::-webkit-details-marker {
  display: none;
}
.design-group > summary::after {
  content: "+";
  color: var(--muted);
  font-family: var(--mono);
}
.design-group[open] > summary::after {
  content: "−";
}
.design-group-body {
  padding-bottom: 14px;
}
.segmented {
  display: inline-flex;
  max-width: 100%;
  overflow-x: auto;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  scrollbar-width: none;
}
.segmented button {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.segmented button:hover {
  color: var(--fg);
}
.segmented button.active {
  background: var(--fg);
  color: var(--bg);
  font-weight: 500;
}
.design-section .segmented {
  display: flex;
}
.design-section .segmented button {
  flex: 1;
}
.hint {
  margin: 8px 0 16px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.design-actions {
  display: flex;
  gap: 8px;
  padding-top: 16px;
}
.design-actions button {
  flex: 1;
  justify-content: center;
}
.stage-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-left: 1px solid var(--line);
}
.stage-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.component-picker {
  display: flex;
  gap: 6px;
}
.component-picker[hidden] {
  display: none;
}
.component-picker select {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 12px;
}
.stage-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.stage-link:hover {
  color: var(--fg);
}
.preview-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background: #1b1d22;
}
.scene-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
}
.preview-scroll {
  position: absolute;
  inset: 0;
  overflow: auto;
  padding: 36px;
  scrollbar-width: thin;
}
.preview-root {
  position: relative;
  min-width: 0;
}
.preview-root.is-single {
  min-height: 100%;
  display: grid;
  place-items: center;
}
.preview-root.is-template {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  container-type: inline-size;
}
/* The preview backdrop stands in for the host page, so the screen frame lets it show through. */
.preview-root .lg-template {
  background: color-mix(in srgb, var(--lg-solid) 58%, transparent);
  border-color: color-mix(in srgb, currentColor 16%, transparent);
}
.preview-root .lgt-card {
  background: color-mix(in srgb, var(--lg-solid) 42%, transparent);
}
/* All elements: components sit directly on the backdrop, text keeps its own plate. */
.preview-root [data-template="ui-kit"] {
  background: transparent;
  border-color: transparent;
  padding: 0;
}
.preview-root [data-template="ui-kit"] > .lgt-header,
.preview-root [data-template="ui-kit"] > .lgt-title,
.preview-root [data-template="ui-kit"] > .lgt-footer {
  padding: 16px 20px;
  border-radius: 16px;
  border: 0;
  background: color-mix(in srgb, var(--lg-solid) 74%, transparent);
}
.preview-root .lgt-kit .lgt-card {
  background: transparent;
  border: 1px dashed color-mix(in srgb, #ffffff 34%, transparent);
}
.preview-root .lgt-kit .lgt-eyebrow,
.preview-root .lgt-kit .lgt-card > small {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--lg-solid) 78%, transparent);
}
.preview-coordinates {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #0007;
  color: #fffc;
  font: semi-condensed 10px var(--mono);
  pointer-events: none;
}
.stage-notice {
  position: absolute;
  left: 16px;
  bottom: 14px;
  max-width: min(520px, calc(100% - 32px));
  padding: 10px 12px;
  border-radius: 10px;
  background: #000c;
  color: #fff;
  font-size: 12px;
  line-height: 1.45;
}
.stage-notice[hidden] {
  display: none;
}
.stage-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.scene-selector {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding: 3px;
  scrollbar-width: thin;
}
.scene-swatch {
  flex: 0 0 auto;
  width: 44px;
  height: 30px;
  border: 1px solid #fff2;
  border-radius: 7px;
  background-position: center;
}
.scene-swatch:hover {
  transform: translateY(-1px);
}
.scene-swatch.active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.scene-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.scene-name {
  font: semi-condensed 10px var(--mono);
  color: var(--muted);
  text-transform: uppercase;
}
.own-background {
  position: relative;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.own-background:hover {
  color: var(--fg);
}
.own-background input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.docs-section {
  padding-top: 0;
}
.section-title {
  font-size: 34px;
  letter-spacing: -0.035em;
  font-weight: 600;
  line-height: 1.1;
}
@container (max-width: 760px) {
  .is-template .lgt-grid {
    grid-template-columns: 1fr;
  }
  .is-template .lgt-kit {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .is-template .lgt-header .lg-search {
    width: 100%;
  }
  .is-template .lg-template {
    padding: 20px;
  }
  .is-template .lgt-header {
    align-items: start;
  }
}
@container (max-width: 480px) {
  .is-template .lgt-kit {
    grid-template-columns: 1fr;
  }
  .is-template .lgt-row {
    align-items: stretch;
  }
  .is-template .lg-tabs [role="tab"] {
    padding: 8px 9px;
  }
  .is-template .lgt-actions {
    gap: 8px;
  }
  .is-template .lgt-card {
    padding: 16px;
  }
}
@media (max-width: 1100px) {
  .app-header {
    padding: 0 20px;
  }
  .studio {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .studio-intro {
    padding: 22px 20px 16px;
  }
  .code-panel {
    margin-left: 20px;
    margin-right: 20px;
  }
}
@media (max-width: 850px) {
  .studio-intro {
    display: block;
  }
  .intro-meta {
    margin-top: 14px;
  }
  /* The preview stays pinned while the design controls scroll beneath it. */
  .studio {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .stage-column {
    order: -1;
    position: sticky;
    top: 0;
    z-index: 5;
    height: 56vh;
    min-height: 360px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }
  .preview-scroll {
    padding: 18px 12px;
  }
  .stage-bar,
  .stage-bottom {
    padding: 8px 10px;
  }
  .stage-bar .segmented {
    flex: 1 1 100%;
  }
  .stage-link {
    margin-left: 0;
  }
  .scene-swatch {
    width: 34px;
    height: 26px;
  }
  .scene-meta .scene-name {
    display: none;
  }
  .design-panel {
    overflow: visible;
    padding: 4px 16px 24px;
  }
  .material-grid {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .material-chip {
    flex: 0 0 86px;
  }
  .code-note {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .agent-banner {
    align-items: flex-start;
    flex-direction: column;
  }
  .content-page {
    padding: 35px 20px;
  }
  .agent-entry {
    grid-template-columns: 1fr;
  }
  .doc-card {
    min-width: 0;
  }
  .doc-card pre {
    overflow-x: auto;
  }
  footer {
    margin: 0 20px;
  }
  footer > span:nth-child(2) {
    display: none;
  }
}
@media (max-width: 540px) {
  .app-header {
    height: 64px;
    padding: 0 14px;
    gap: 10px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-agent {
    padding: 8px 10px;
    gap: 8px;
  }
  .studio-intro {
    padding: 18px 14px 14px;
  }
  .intro-meta {
    gap: 16px;
  }
  .code-panel {
    margin: 14px 12px 24px;
  }
  .code-toolbar {
    flex-wrap: wrap;
  }
  .code-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .code-tabs {
    overflow-x: auto;
    max-width: 100%;
  }
  .code-tabs button {
    padding: 5px 7px;
  }
  .content-page {
    padding: 36px 16px;
  }
  .content-page h1 {
    font-size: 31px;
  }
  .section-title {
    font-size: 26px;
  }
  .brand small {
    display: none;
  }
  .stage-link {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
