body.lab-demo {
  --ink: #031614;
  --ink-2: #0a2622;
  --ink-3: #194840;
  --paper: #f4f1e9;
  --paper-2: #e9e5da;
  --surface: #fbf9f3;
  --lime: #c9f45b;
  --aqua: #67e6d0;
  --coral: #ff825f;
  --container: 1240px;
  overflow-x: hidden;
  background: var(--paper);
}

body.lab-demo::before { display: none; }
.lab-demo .site-header { background: rgba(3, 22, 20, 0.94); }
.lab-demo .button { border-radius: 8px; }
.lab-demo .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
html:not(.js) .lab-demo .demo-form,
html:not(.js) .lab-demo .demo-start { display: none; }
html:not(.js) .lab-demo [data-demo-unavailable] { display: none; }

.demo-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4.8rem, 8vw, 7.5rem) 0;
  color: var(--white);
  background:
    radial-gradient(circle at 84% 22%, rgba(103, 230, 208, 0.12), transparent 28rem),
    var(--ink);
}

.demo-hero::before,
.demo-explain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px, 16px 16px, 16px 16px;
}

.demo-hero-grid,
.demo-explain > .container { position: relative; z-index: 1; }
.demo-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.65fr); gap: clamp(3rem, 9vw, 8rem); align-items: end; }
.demo-hero .eyebrow,
.demo-explain .eyebrow { color: var(--lime); }
.demo-hero h1 {
  max-width: 10ch;
  margin-bottom: 1.4rem;
  font-family: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  font-size: clamp(4.2rem, 9vw, 8rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.028em;
  text-transform: uppercase;
}
.demo-hero .lead { max-width: 62ch; margin: 0; color: rgba(255, 255, 255, 0.7); }
.demo-start { margin-top: 1.6rem; }

.demo-trust-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.demo-trust-list li { display: grid; grid-template-columns: 0.55fr 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.demo-trust-list strong { color: var(--lime); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.demo-trust-list span { color: rgba(255, 255, 255, 0.62); font-size: 0.88rem; }

.demo-workbench { padding: clamp(4.5rem, 8vw, 7rem) 0; background: var(--paper); }
.demo-heading { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr); gap: clamp(2rem, 8vw, 7rem); align-items: end; margin-bottom: 3rem; }
.demo-heading > * { min-width: 0; }
.demo-heading h2 { max-width: 13ch; margin: 0; font-size: clamp(2.6rem, 5vw, 4.8rem); line-height: 0.94; letter-spacing: -0.038em; }
.demo-heading > p { max-width: 58ch; margin: 0; color: var(--muted); font-size: 1rem; }

.demo-form { border: 1px solid var(--line); background: rgba(255, 253, 248, 0.62); }
.demo-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.demo-form legend {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0;
  padding: 1.25rem 1.4rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.demo-form legend span,
.demo-runbar p span { color: #587805; }

.demo-choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.demo-choice { position: relative; min-width: 0; cursor: pointer; }
.demo-choice + .demo-choice { border-left: 1px solid var(--line); }
.demo-choice input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0.001; }
.demo-choice > span {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: transparent;
  transition: background 160ms ease, box-shadow 160ms ease;
}
.demo-choice > span::after { content: ""; position: absolute; inset: 0; border: 3px solid transparent; pointer-events: none; }
.demo-choice > span::before {
  content: "";
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  color: var(--ink);
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.demo-choice input:checked + span { background: var(--lime-soft); }
.demo-choice input:checked + span::after { border-color: var(--lime); }
.demo-choice input:checked + span::before { content: "✓ Selected"; }
.demo-choice input:focus-visible + span { outline: 3px solid var(--ink-3); outline-offset: -5px; }
.demo-choice small { color: var(--ink-3); font-size: 0.68rem; font-style: normal; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.demo-choice strong { display: block; margin-top: auto; font-size: 1.35rem; line-height: 1.1; }
.demo-choice em { display: block; margin-top: 0.45rem; color: var(--muted); font-size: 0.85rem; font-style: normal; }

.demo-assumption-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(310px, 0.8fr); border-top: 1px solid var(--line); }
.demo-controls { border-right: 1px solid var(--line) !important; }
.demo-field-intro { max-width: 66ch; margin: 1.4rem 1.4rem 0; color: var(--muted); font-size: 0.9rem; }
.demo-range { display: block; padding: 1.15rem 1.4rem; border-bottom: 1px solid var(--line); }
.demo-range:last-child { border-bottom: 0; }
.demo-range > span,
.demo-range > small { display: flex; justify-content: space-between; gap: 1rem; }
.demo-range strong { font-size: 0.92rem; }
.demo-range output { min-width: 2.5rem; color: var(--ink-3); font-size: 0.82rem; font-weight: 900; text-align: right; }
.demo-range input { width: 100%; height: 30px; margin: 0.5rem 0 0.2rem; accent-color: var(--ink); cursor: pointer; }
.demo-range > small { color: var(--muted); font-size: 0.7rem; }

.demo-model-card { padding: 1.5rem; background: var(--ink); color: var(--white); }
.demo-card-code { margin-bottom: 1rem; color: var(--lime); font-size: 0.67rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.demo-model-card h3 { max-width: 22ch; font-size: clamp(1.65rem, 3vw, 2.25rem); }
.demo-model-card > p:not(.demo-card-code) { color: rgba(255, 255, 255, 0.62); font-size: 0.88rem; }
.demo-model-card dl { margin: 1.5rem 0 0; }
.demo-model-card dl > div { display: grid; grid-template-columns: 0.38fr 1fr; gap: 0.8rem; padding: 0.75rem 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.demo-model-card dt { color: var(--aqua); font-size: 0.72rem; font-weight: 850; }
.demo-model-card dd { margin: 0; color: rgba(255, 255, 255, 0.56); font-size: 0.75rem; }

.agent-field { display: grid; grid-template-columns: repeat(18, 1fr); gap: 5px; padding: 1rem; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.12); }
.agent-field-preview { margin: 1.4rem 0; }
.agent-field i { display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.agent-field-preview i:nth-child(4n) { background: rgba(201, 244, 91, 0.66); }
.agent-field-preview i:nth-child(7n) { background: rgba(103, 230, 208, 0.6); }
.agent-field-preview i:nth-child(11n) { background: rgba(255, 130, 95, 0.56); }

.demo-runbar { display: flex; justify-content: space-between; gap: 2rem; align-items: center; padding: 1.4rem; color: var(--white); background: var(--ink-2); }
.demo-runbar p { margin: 0; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.demo-runbar p span { margin-right: 0.6rem; color: var(--lime); }
.demo-runbar small { display: block; margin-top: 0.3rem; color: rgba(255, 255, 255, 0.52); }
.demo-runbar .button { min-width: 210px; }
.demo-runbar .button[disabled] { opacity: 0.66; cursor: wait; transform: none; }
.demo-boundary { margin: 0; padding: 0.9rem 1.4rem; color: var(--muted); background: var(--paper-2); border-top: 1px solid var(--line); font-size: 0.78rem; }
.demo-boundary strong { color: var(--ink); }
.demo-noscript { margin-top: 1rem; padding: 1rem; color: var(--ink); background: var(--coral); }
.demo-noscript p { margin: 0.35rem 0 0; }
.demo-noscript a { text-decoration: underline; }

.demo-results { margin-top: 1.25rem; color: var(--white); background: var(--ink); border: 1px solid rgba(255, 255, 255, 0.14); }
.demo-result-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; padding: clamp(1.5rem, 4vw, 2.4rem); border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.demo-result-head .eyebrow { color: var(--lime); }
.demo-result-head h2 { max-width: 15ch; margin-bottom: 1rem; font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 0.92; letter-spacing: -0.035em; }
.demo-result-head > div:first-child > p:last-child { max-width: 65ch; margin: 0; color: rgba(255, 255, 255, 0.62); }
.demo-result-count { min-width: 200px; padding: 1.2rem; background: rgba(255, 255, 255, 0.055); border-top: 3px solid var(--lime); }
.demo-result-count strong { display: block; font-family: "Barlow Condensed", "Arial Narrow", Impact, sans-serif; font-size: 3.2rem; line-height: 0.9; }
.demo-result-count span { display: block; margin-top: 0.45rem; color: rgba(255, 255, 255, 0.55); font-size: 0.75rem; }

.demo-result-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.65fr); }
.demo-table-wrap { min-width: 0; padding: 1.5rem; border-right: 1px solid rgba(255, 255, 255, 0.14); }
.demo-table-wrap:focus-visible { outline-color: var(--lime); outline-offset: -4px; }
.demo-table-cue { display: none; margin: 0 0 0.7rem; color: var(--aqua); font-size: 0.72rem; font-weight: 800; }
.demo-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.demo-table caption { padding: 0 0 1rem; color: rgba(255, 255, 255, 0.5); font-size: 0.68rem; font-weight: 850; letter-spacing: 0.09em; text-align: left; text-transform: uppercase; }
.demo-table th,
.demo-table td { padding: 0.9rem 0.7rem; border-top: 1px solid rgba(255, 255, 255, 0.14); text-align: left; vertical-align: top; }
.demo-table th { color: rgba(255, 255, 255, 0.52); font-size: 0.67rem; letter-spacing: 0.08em; text-transform: uppercase; }
.demo-table td { color: rgba(255, 255, 255, 0.7); }
.demo-table tbody th { color: var(--white); font-size: 0.84rem; font-weight: 800; letter-spacing: normal; text-transform: none; }
.demo-table tr.is-recommended th:first-child { color: var(--lime); }
.demo-table .result-band { display: block; margin-top: 0.18rem; color: var(--aqua); font-size: 0.68rem; font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; }
.demo-table .result-band[data-band="Low hold"] { color: var(--coral); }
.demo-table .result-band[data-band="Mixed hold"] { color: var(--aqua); }
.demo-table .result-band[data-band="Wide hold"] { color: var(--lime); }
.demo-table-note { max-width: 70ch; margin: 1rem 0 0; color: rgba(255, 255, 255, 0.48); font-size: 0.72rem; }
.demo-method-details { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.demo-method-details summary { width: fit-content; color: var(--aqua); cursor: pointer; font-size: 0.76rem; font-weight: 850; }
.demo-method-details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0.8rem 0 0; border-top: 1px solid rgba(255, 255, 255, 0.1); border-left: 1px solid rgba(255, 255, 255, 0.1); }
.demo-method-details dl > div { padding: 0.75rem; border-right: 1px solid rgba(255, 255, 255, 0.1); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.demo-method-details dt { color: var(--white); font-size: 0.66rem; font-weight: 850; letter-spacing: 0.07em; text-transform: uppercase; }
.demo-method-details dd { margin: 0.25rem 0 0; color: rgba(255, 255, 255, 0.56); font-size: 0.72rem; }

.demo-snapshot { padding: 1.5rem; }
.demo-snapshot h3 { font-size: 1.55rem; }
.demo-snapshot .agent-field { margin: 1.2rem 0; }
.demo-snapshot .agent-adopted { background: var(--lime); }
.demo-snapshot .agent-delayed { background: var(--aqua); }
.demo-snapshot .agent-blocked { background: var(--coral); }
.agent-legend { display: grid; gap: 0.65rem; margin: 0; padding: 0; list-style: none; }
.agent-legend li { display: grid; grid-template-columns: auto 1fr; gap: 0.65rem; align-items: center; color: rgba(255, 255, 255, 0.58); font-size: 0.75rem; }
.agent-dot { width: 10px; height: 10px; border-radius: 50%; }
.agent-legend strong { color: var(--white); }

.demo-insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255, 255, 255, 0.14); }
.demo-insight-grid article { min-height: 210px; padding: 1.5rem; border-right: 1px solid rgba(255, 255, 255, 0.14); }
.demo-insight-grid article:last-child { border-right: 0; }
.demo-insight-grid h3 { max-width: 20ch; color: var(--white); }
.demo-insight-grid article > p:last-child { color: rgba(255, 255, 255, 0.58); font-size: 0.82rem; }

.demo-result-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1rem; align-items: center; padding: 1.5rem; color: var(--ink); background: var(--lime); }
.demo-result-actions strong,
.demo-result-actions span { display: block; }
.demo-result-actions span { max-width: 60ch; margin-top: 0.2rem; color: var(--ink-3); font-size: 0.78rem; }
.demo-result-actions .button-primary { color: var(--white); background: var(--ink); border-color: var(--ink); }
.demo-result-actions .button-ghost { color: var(--ink); border-color: rgba(3, 22, 20, 0.35); }

.demo-explain { position: relative; overflow: hidden; padding: clamp(5rem, 8vw, 7rem) 0; color: var(--white); background: var(--ink-2); }
.demo-heading-light > p { color: rgba(255, 255, 255, 0.62); }
.demo-real-steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, 0.14); border-left: 1px solid rgba(255, 255, 255, 0.14); }
.demo-real-steps li { min-height: 280px; padding: 1.5rem; border-right: 1px solid rgba(255, 255, 255, 0.14); border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.demo-real-steps li > span { display: block; margin-bottom: 4rem; color: var(--lime); font-size: 0.68rem; font-weight: 900; letter-spacing: 0.12em; }
.demo-real-steps h3 { font-size: 1.5rem; }
.demo-real-steps p { color: rgba(255, 255, 255, 0.58); font-size: 0.84rem; }
.demo-method-link { display: flex; justify-content: space-between; gap: 2rem; align-items: center; margin-top: 1rem; padding: 1.3rem 1.5rem; background: rgba(255, 255, 255, 0.055); border: 1px solid rgba(255, 255, 255, 0.14); }
.demo-method-link p { max-width: 70ch; margin: 0; color: rgba(255, 255, 255, 0.6); font-size: 0.82rem; }
.demo-method-link strong { color: var(--white); }
.demo-method-link .text-link { flex: 0 0 auto; color: var(--lime); }

@media (max-width: 980px) {
  .demo-hero-grid,
  .demo-heading { grid-template-columns: 1fr; }
  .demo-hero-grid { gap: 3rem; }
  .demo-trust-list { max-width: 620px; }
  .demo-assumption-grid,
  .demo-result-grid { grid-template-columns: 1fr; }
  .demo-controls,
  .demo-table-wrap { border-right: 0 !important; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
  .demo-choice-grid { grid-template-columns: 1fr; }
  .demo-choice + .demo-choice { border-top: 1px solid var(--line); border-left: 0; }
  .demo-choice > span { min-height: 140px; }
  .demo-real-steps { grid-template-columns: repeat(2, 1fr); }
  .demo-result-actions { grid-template-columns: 1fr 1fr; }
  .demo-result-actions > div { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .demo-hero { padding: 4.5rem 0; }
  .demo-hero h1 { font-size: clamp(3.5rem, 17vw, 5.4rem); line-height: 0.89; letter-spacing: -0.018em; }
  .demo-result-head h2 { line-height: 0.96; letter-spacing: -0.022em; }
  .demo-result-head { grid-template-columns: 1fr; }
  .demo-result-count { width: 100%; }
  .demo-table-wrap { overflow-x: auto; }
  .demo-table-cue { display: block; }
  .demo-table { min-width: 650px; }
  .demo-insight-grid { grid-template-columns: 1fr; }
  .demo-insight-grid article { min-height: auto; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
  .demo-insight-grid article:last-child { border-bottom: 0; }
  .demo-method-link { align-items: flex-start; flex-direction: column; }
  .demo-method-details dl { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .demo-heading h2 { font-size: clamp(2.2rem, 12vw, 3rem); }
  .demo-trust-list li { grid-template-columns: 1fr; gap: 0.2rem; }
  .demo-choice > span { min-height: 128px; padding: 1.2rem; }
  .demo-form legend,
  .demo-range,
  .demo-field-intro { padding-inline: 1rem; }
  .demo-field-intro { margin-inline: 0; }
  .demo-model-card { padding: 1rem; }
  .demo-runbar { align-items: stretch; flex-direction: column; padding: 1rem; }
  .demo-runbar .button { width: 100%; }
  .demo-result-head,
  .demo-table-wrap,
  .demo-snapshot,
  .demo-insight-grid article { padding: 1rem; }
  .demo-result-actions { grid-template-columns: 1fr; padding: 1rem; }
  .demo-result-actions > div { grid-column: auto; }
  .demo-result-actions .button { width: 100%; }
  .demo-real-steps { grid-template-columns: 1fr; }
  .demo-real-steps li { min-height: auto; }
  .demo-real-steps li > span { margin-bottom: 2rem; }
  .agent-field { gap: 4px; padding: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-choice > span { transition: none; }
}
