:root {
  --page: #f4f7fa;
  --paper: #ffffff;
  --ink: #172033;
  --muted: #607188;
  --border: #cbd5df;
  --accent: #176b87;
  --accent-tint: #e8f2f5;
  --ordinary: #277ed8;
  --service: #7b678d;
  --danger: #b14b55;
  --permission: #2e8b67;
  --review-bg: #dfe6ec;
  --title-font: "Songti SC", STSong, "Source Han Serif SC", serif;
  --ui-font: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  --mono-font: "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body {
  overflow: hidden;
  color: var(--ink);
  background: var(--review-bg);
  font-family: var(--ui-font);
  -webkit-font-smoothing: antialiased;
}
button, a, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, iframe:focus-visible {
  outline: 3px solid rgba(23, 107, 135, .28);
  outline-offset: 2px;
}
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
code { font-family: var(--mono-font); font-size: .91em; color: var(--accent); }

.review-bar {
  height: 52px;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid #b9c6d2;
  background: #edf2f6;
  position: relative;
  z-index: 20;
}
.review-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-right: 1px solid var(--border);
}
.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font: 700 12px var(--mono-font);
}
.review-brand strong, .review-brand small { display: block; }
.review-brand strong { font: 700 11px var(--mono-font); letter-spacing: .45px; }
.review-brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.review-nav { display: flex; min-width: 0; overflow-x: auto; }
.review-nav button, .review-actions button {
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}
.review-nav button {
  min-width: 88px;
  padding: 0 12px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
}
.review-nav button span { margin-right: 5px; font: 700 10px var(--mono-font); color: var(--accent); }
.review-nav button:hover, .review-nav button[aria-current="page"] { color: var(--ink); background: var(--paper); }
.review-nav button[aria-current="page"] { border-bottom: 3px solid var(--accent); }
.review-actions { display: flex; border-left: 1px solid var(--border); }
.review-actions button { width: 52px; font: 700 10px var(--mono-font); }
.review-actions button[aria-pressed="true"] { color: var(--paper); background: var(--accent); }

.review-canvas {
  height: calc(100vh - 52px);
  display: grid;
  place-items: center;
  padding: 14px;
}
.prototype-shell {
  width: min(calc(100vw - 28px), calc((100vh - 80px) * 16 / 9));
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 80px);
  overflow: hidden;
  border: 1px solid #b9c6d2;
  background: var(--paper);
  container: prototype / inline-size;
}
body[data-device="mobile"] .prototype-shell {
  width: min(390px, calc(100vw - 28px), calc((100vh - 80px) * .4620853));
  height: auto;
  max-height: none;
  aspect-ratio: 390 / 844;
}
.prototype-frame, .frame-stage { width: 100%; height: 100%; }
.frame-stage { display: flex; flex-direction: column; overflow: hidden; background: var(--page); }
.overall-animatic-frame { display: block; width: 100%; height: 100%; border: 0; background: #e8eef2; }

.product-header {
  min-height: 52px;
  height: 8.2%;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 3.3%;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .9);
}
.product-id { display: inline-flex; align-items: center; gap: 11px; justify-self: start; min-width: 0; }
.product-id b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font: 700 12px var(--mono-font);
}
.product-id span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 650 11px var(--mono-font); letter-spacing: .9px; }
.product-modes { display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.product-modes a, .product-modes span, .product-modes button {
  min-height: 30px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}
.product-modes .is-active { border-color: var(--border); color: var(--ink); background: var(--paper); }
.boundary-badge {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 11px;
}
.boundary-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--permission); }
.boundary-badge.warning i { background: var(--danger); }

.kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font: 700 11px var(--mono-font);
  letter-spacing: 1.5px;
}
h1, h2 { margin: 0; font-family: var(--title-font); color: var(--ink); }
h1 { font-size: clamp(32px, 4.1cqw, 64px); line-height: 1.07; letter-spacing: -.035em; }
h2 { font-size: clamp(26px, 3cqw, 46px); line-height: 1.15; letter-spacing: -.025em; }
.lead { margin: 18px 0 0; color: #405168; font-size: clamp(13px, 1.25cqw, 18px); line-height: 1.75; }
.lead.compact { font-size: clamp(12px, 1.08cqw, 16px); }

.hero-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 43% 57%; padding: 3.8% 3.8% 2.4%; }
.hero-copy { min-width: 0; padding: 2% 6% 0 0; display: flex; flex-direction: column; justify-content: center; }
.hero-facts { margin-top: 5.5%; border-top: 1px solid var(--border); }
.hero-facts > div { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.hero-facts > div > b { padding-top: 2px; color: var(--accent); font: 700 10px var(--mono-font); }
.hero-facts span, .hero-facts strong, .hero-facts small { display: block; }
.hero-facts strong { font-size: 13px; line-height: 1.4; }
.hero-facts small { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.hero-actions { display: flex; gap: 8px; margin-top: 4.2%; }
.button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.button.primary { color: var(--paper); background: var(--accent); }
.button.secondary { color: var(--accent); background: transparent; }
.button.compact { min-height: 30px; padding: 6px 10px; font-size: 11px; }
.product-header > .button { justify-self: end; }
.hero-visual { min-width: 0; min-height: 0; margin: 0; display: flex; flex-direction: column; border-left: 1px solid var(--border); }
.hero-visual img { width: 100%; min-height: 0; flex: 1; object-fit: contain; background: #eef3f7; }
.hero-visual figcaption { height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; border-top: 1px solid var(--border); color: var(--muted); font: 600 9.5px var(--mono-font); }

.frame-footer {
  min-height: 31px;
  height: 4.6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 3.3%;
  border-top: 1px solid var(--border);
  background: var(--paper);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}
.frame-footer span:last-child { text-align: right; font-family: var(--mono-font); }

.explain-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 34% 66%; }
.explain-copy { padding: 6% 9% 4% 11%; overflow: auto; }
.definition-list { margin: 8% 0 0; border-top: 1px solid var(--border); }
.definition-list div { padding: 11px 0; border-bottom: 1px solid var(--border); }
.definition-list dt { margin-bottom: 4px; color: var(--accent); font-size: 12px; font-weight: 700; }
.definition-list dd { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.fact-note { margin: 7% 0 0; padding-left: 13px; border-left: 2px solid var(--accent); color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.fact-note b { color: var(--ink); }
.diagram-stage { min-width: 0; min-height: 0; border-left: 1px solid var(--border); background: var(--paper); }
.diagram-stage iframe, .design-visual iframe { width: 100%; height: 100%; border: 0; display: block; }

.design-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 72% 28%; }
.design-visual { min-width: 0; min-height: 0; border-right: 1px solid var(--border); background: var(--paper); }
.section-image { position: relative; width: 100%; height: 100%; overflow: hidden; background: #eef3f7; }
.section-image > img { width: 100%; height: 100%; object-fit: cover; }
.cad-pin { position: absolute; display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font: 700 10px var(--mono-font); }
.cad-pin b { width: 23px; height: 23px; display: grid; place-items: center; border: 2px solid var(--paper); border-radius: 50%; color: var(--paper); background: var(--accent); }
.cad-pin small { padding: 3px 5px; border: 1px solid var(--border); border-radius: 4px; background: rgba(255,255,255,.94); }
.pin-a2 { left: 29%; top: 59%; }
.pin-m1 { left: 48%; top: 61%; }
.pin-w { left: 60%; top: 55%; }
.pin-m2 { left: 72%; top: 63%; }
.prototype-location-note { position: absolute; left: 2%; bottom: 2%; margin: 0; padding: 5px 8px; border: 1px solid var(--border); background: rgba(255,255,255,.92); color: var(--muted); font-size: 9px; }
.responsibility-rail, .assembly-rail, .motion-rail { min-width: 0; min-height: 0; padding: 10% 9%; overflow: auto; background: var(--page); }
.pin-list, .module-list { margin: 8% 0 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.pin-list li, .module-list li { display: grid; grid-template-columns: 32px 1fr; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.pin-list li > b, .module-list li > b { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font: 700 9px var(--mono-font); }
.pin-list span, .pin-list strong, .pin-list small, .module-list span, .module-list strong, .module-list small { display: block; }
.pin-list strong, .module-list strong { font-size: 11.5px; line-height: 1.4; }
.pin-list small, .module-list small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.boundary-callout { margin-top: 7%; padding: 10px 11px; border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--paper); }
.boundary-callout b, .boundary-callout span { display: block; }
.boundary-callout b { color: var(--accent); font-size: 10px; }
.boundary-callout span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }

.cad-product-header { grid-template-columns: auto 1fr auto; }
.cad-configs { display: flex; justify-content: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.cad-configs button {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}
.cad-configs button.is-active { border-color: var(--accent); color: var(--paper); background: var(--accent); }
.cad-live-shell { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #eef3f7; }
.cad-stage-host { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; background: #eef3f7; }
.shared-cad-viewport { position: absolute; inset: 0; z-index: 1; overflow: hidden; background: #eef3f7; }
.shared-cad-viewport canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.shared-cad-viewport canvas:active { cursor: grabbing; }
.cad-loading { position: absolute; inset: 0; z-index: 7; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); background: rgba(238,243,247,.92); font-size: 11px; }
.cad-loading span { width: 30px; height: 30px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: cad-spin .8s linear infinite; }
@keyframes cad-spin { to { transform: rotate(360deg); } }
.cad-gesture-hint { position: absolute; right: 12px; bottom: 11px; z-index: 4; margin: 0; padding: 5px 8px; border: 1px solid rgba(203,213,223,.86); border-radius: 4px; color: #4c6074; background: rgba(255,255,255,.88); pointer-events: none; font: 600 9px var(--mono-font); }
.cad-tool-strip { position: absolute; left: 12px; top: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 4px; max-width: 58%; }
.cad-tool-strip button, .cad-tool-strip a, .assembly-rail-actions button, .assembly-rail-actions a {
  min-height: 29px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(255,255,255,.93);
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
}
.cad-tool-strip button:hover, .cad-tool-strip a:hover, .cad-tool-strip button[aria-pressed="true"], .cad-tool-strip .is-recommended { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); }
.cad-state-card { position: absolute; right: 12px; top: 12px; z-index: 4; width: min(34%, 380px); padding: 10px 12px; border: 1px solid rgba(203,213,223,.92); border-left: 3px solid var(--accent); background: rgba(255,255,255,.93); pointer-events: none; }
.cad-state-card span, .cad-state-card b, .cad-state-card small { display: block; }
.cad-state-card span { color: var(--accent); font: 700 9px var(--mono-font); letter-spacing: .4px; }
.cad-state-card b { margin-top: 4px; font-size: 11.5px; line-height: 1.35; }
.cad-state-card small { margin-top: 5px; color: var(--muted); font-size: 9.5px; line-height: 1.45; }

.assembly-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 73% 27%; }
.assembly-visual { position: relative; min-width: 0; min-height: 0; border-right: 1px solid var(--border); background: #eef3f7; }
.live-assembly-visual { overflow: hidden; }
.visual-tag { position: absolute; left: 14px; bottom: 12px; z-index: 4; padding: 5px 8px; border: 1px solid var(--border); background: rgba(255,255,255,.92); color: var(--accent); font: 700 9px var(--mono-font); }
.rail-intro { margin: 5% 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.state-facts { margin: 9% 0 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.state-facts li { padding: 11px 0; border-bottom: 1px solid var(--border); }
.state-facts span, .state-facts b { display: block; }
.state-facts span { color: var(--accent); font: 700 9.5px var(--mono-font); }
.state-facts b { margin-top: 4px; font-size: 11px; line-height: 1.45; }
.explode-scrub { display: block; margin-top: 7%; padding: 9px 10px; border: 1px solid var(--border); background: var(--paper); }
.explode-scrub span { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.explode-scrub output { color: var(--accent); font: 700 10px var(--mono-font); }
.explode-scrub input, .motion-scrub input { width: 100%; margin: 8px 0 0; accent-color: var(--accent); }
.assembly-rail-actions { display: flex; gap: 6px; margin-top: 8%; }
.assembly-rail-actions > * { flex: 1; text-align: center; }

.demo-stage { background: #eef3f7; }
.demo-product-header { position: relative; z-index: 9; }
.demo-mode-switch button {
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.demo-mode-switch button.is-active { border-color: var(--border); color: var(--ink); background: var(--paper); }
.demo-visual { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #eef3f7; }
.demo-visual > .cad-stage-host { position: absolute; inset: 0; }
.demo-route-panel {
  position: absolute;
  right: 2.5%;
  top: 3.5%;
  z-index: 4;
  width: min(29%, 340px);
  padding: 8px 10px;
  border: 1px solid rgba(203,213,223,.92);
  background: rgba(255,255,255,.92);
  pointer-events: none;
}
.demo-route { position: relative; display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; column-gap: 8px; padding: 7px 5px; border-bottom: 1px solid var(--border); opacity: .52; transition: opacity .35s ease, background .35s ease, border-color .35s ease; }
.demo-route > span { grid-row: 1 / 3; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font: 700 8px var(--mono-font); }
.demo-route b { font-size: 10.5px; }
.demo-route small { margin-top: 2px; color: var(--muted); font-size: 8.5px; }
.demo-route.ordinary { color: var(--ordinary); }
.demo-route.service { color: var(--service); }
.demo-route-outlet { display: flex; align-items: center; gap: 7px; padding: 7px 5px 2px; color: var(--muted); font-size: 9px; }
.demo-route-outlet span { width: 18px; height: 1px; background: var(--accent); }
.demo-stage[data-demo-route="overview"] .demo-route,
.demo-stage[data-demo-route="ordinary"] .demo-route.ordinary,
.demo-stage[data-demo-route="ordinary-restored"] .demo-route.ordinary,
.demo-stage[data-demo-route="service"] .demo-route.service,
.demo-stage[data-demo-route="service-open"] .demo-route.service,
.demo-stage[data-demo-route="recovery"] .demo-route { opacity: 1; }
.demo-stage[data-demo-route="ordinary"] .demo-route.ordinary,
.demo-stage[data-demo-route="ordinary-restored"] .demo-route.ordinary { background: rgba(39,126,216,.08); }
.demo-stage[data-demo-route="service"] .demo-route.service,
.demo-stage[data-demo-route="service-open"] .demo-route.service { background: rgba(123,103,141,.09); }
.demo-stage[data-demo-route="closed"] .demo-route { opacity: .85; background: rgba(177,75,85,.055); }
.demo-stage[data-demo-route="closed"] .demo-route::after,
.demo-stage[data-demo-route="service-open"] .demo-route.ordinary::after {
  content: "CLOSED";
  position: absolute;
  right: 5px;
  top: 8px;
  color: var(--danger);
  font: 700 7.5px var(--mono-font);
}
.demo-stage[data-demo-route="service-open"] .demo-route.service::after {
  content: "OPEN";
  position: absolute;
  right: 5px;
  top: 8px;
  color: var(--permission);
  font: 700 7.5px var(--mono-font);
}
.demo-stage[data-demo-route="ordinary-restored"] .demo-route.ordinary::after {
  content: "OPEN";
  position: absolute;
  right: 5px;
  top: 8px;
  color: var(--permission);
  font: 700 7.5px var(--mono-font);
}
.demo-stage[data-demo-route="ordinary-restored"] .demo-route.service::after {
  content: "CLOSED";
  position: absolute;
  right: 5px;
  top: 8px;
  color: var(--danger);
  font: 700 7.5px var(--mono-font);
}
.demo-narrative {
  position: absolute;
  left: 3.3%;
  top: 9%;
  z-index: 4;
  width: min(34%, 430px);
  padding: 16px 18px 17px;
  border-left: 3px solid var(--accent);
  background: rgba(255,255,255,.91);
  pointer-events: none;
}
.demo-narrative.is-entering { animation: demo-copy-in .5s ease both; }
@keyframes demo-copy-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.demo-narrative .kicker { margin-bottom: 8px; }
.demo-narrative h2 { font-size: clamp(26px, 3.05cqw, 44px); line-height: 1.12; }
.demo-narrative > p:not(.kicker) { margin: 12px 0 0; color: #405168; font-size: clamp(11px, 1.05cqw, 15px); line-height: 1.65; }
.demo-logic { margin-top: 13px; padding-top: 9px; border-top: 1px solid var(--border); }
.demo-logic span, .demo-logic b { display: block; }
.demo-logic span { color: var(--accent); font: 700 8.5px var(--mono-font); }
.demo-logic b { margin-top: 4px; font-size: 11px; line-height: 1.4; }
.demo-state-chip { position: absolute; right: 2.5%; bottom: 8%; z-index: 4; display: flex; align-items: stretch; border: 1px solid var(--border); background: rgba(255,255,255,.92); pointer-events: none; }
.demo-state-chip span, .demo-state-chip b { display: grid; place-items: center; min-height: 31px; padding: 0 9px; }
.demo-state-chip span { color: var(--paper); background: var(--accent); font: 700 8.5px var(--mono-font); }
.demo-state-chip b { font-size: 9.5px; }
.demo-start { position: absolute; left: 3.3%; bottom: 6%; z-index: 5; min-width: 230px; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 10px 13px; border: 1px solid var(--accent); border-radius: 6px; color: var(--paper); background: var(--accent); cursor: pointer; text-align: left; }
.demo-start > span { grid-row: 1 / 3; display: grid; place-items: center; font-size: 18px; }
.demo-start b { font-size: 11px; }
.demo-start small { margin-top: 2px; opacity: .8; font-size: 8.5px; }
.demo-boundary { position: absolute; right: 2.5%; bottom: 2.2%; z-index: 4; margin: 0; color: var(--muted); pointer-events: none; font-size: 8px; }
.demo-core-markers { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.demo-marker { position: absolute; display: grid; justify-items: center; gap: 4px; color: var(--accent); font: 700 9px var(--mono-font); }
.demo-marker i { width: 13px; height: 13px; border: 2px solid var(--accent); border-radius: 50%; background: rgba(255,255,255,.78); animation: demo-pulse 1.8s ease-in-out infinite; }
.demo-marker b { padding: 2px 5px; border: 1px solid var(--border); background: rgba(255,255,255,.9); }
.marker-m1 { left: 44%; top: 47%; }
.marker-w { left: 52%; top: 52%; }
.marker-m2 { left: 60%; top: 47%; }
@keyframes demo-pulse { 50% { box-shadow: 0 0 0 7px rgba(23,107,135,.12); } }
.demo-control-deck {
  min-height: 74px;
  height: 11.5%;
  display: grid;
  grid-template-columns: 224px 1fr;
  grid-template-rows: 32px 4px 38px;
  border-top: 1px solid var(--border);
  background: var(--paper);
}
.demo-controls { grid-row: 1 / 4; display: grid; grid-template-columns: 32px 1fr 32px .85fr .75fr; gap: 4px; align-content: center; padding: 0 10px; border-right: 1px solid var(--border); }
.demo-controls button, .demo-controls a { min-height: 31px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 5px; background: var(--paper); cursor: pointer; font-size: 9px; }
.demo-controls .primary-control { border-color: var(--accent); color: var(--paper); background: var(--accent); }
.demo-progress { grid-column: 2; align-self: end; height: 3px; margin: 0 3.3%; overflow: hidden; background: var(--accent-tint); }
.demo-progress span { width: 0; height: 100%; display: block; background: var(--accent); transition: width .12s linear; }
.demo-chapters { grid-column: 2; grid-row: 3; display: grid; grid-template-columns: repeat(7, 1fr); margin: 0; padding: 0 3.3%; list-style: none; }
.demo-chapters li { min-width: 0; }
.demo-chapters button { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-right: 1px solid var(--border); color: var(--muted); background: transparent; cursor: pointer; }
.demo-chapters li:first-child button { border-left: 1px solid var(--border); }
.demo-chapters span { color: var(--accent); font: 700 8px var(--mono-font); }
.demo-chapters b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.demo-chapters button[aria-current="step"] { color: var(--ink); background: var(--accent-tint); border-top: 2px solid var(--accent); }
.demo-stage .cad-gesture-hint { right: 2.5%; bottom: 14%; }
body.capture .demo-control-deck, body.capture .demo-start, body.capture .demo-boundary, body.capture .cad-gesture-hint { display: none; }

.mechanism-stage { background: #edf2f5; }
.mechanism-product-header { min-height: 48px; height: 7.3%; background: rgba(250,252,253,.96); }
.mechanism-workbench { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 292px; }
.mechanism-viewport { position: relative; min-width: 0; min-height: 0; overflow: hidden; border-right: 1px solid #aebcc8; background: #e8eef2; }
.mechanism-viewport::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.19), transparent 22%, transparent 78%, rgba(18,42,59,.035)); }
.mechanism-overlay { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.mechanism-anchor line { stroke: #176b87; stroke-width: 1.15; vector-effect: non-scaling-stroke; }
.mechanism-anchor circle { fill: #fff; stroke: #176b87; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.mechanism-anchor text { fill: #14354a; stroke: rgba(255,255,255,.96); stroke-width: 5px; paint-order: stroke fill; font: 700 9px var(--mono-font); letter-spacing: .2px; }
.mechanism-anchor.moving line, .mechanism-anchor.moving circle { stroke: #b14b55; }
.mechanism-anchor.moving text { fill: #8f3440; }
.mechanism-anchor.secondary line, .mechanism-anchor.secondary circle { stroke: #7b678d; }
.mechanism-anchor.secondary text { fill: #695576; }
.mechanism-axis-dimension line { stroke: #66798b; stroke-width: .8; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.mechanism-axis-dimension text { fill: #53677a; stroke: rgba(255,255,255,.94); stroke-width: 4px; paint-order: stroke fill; font: 650 7.5px var(--mono-font); }
.mechanism-state-readout { position: absolute; left: 16px; top: 14px; z-index: 7; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; min-width: 245px; border: 1px solid #9eb0bf; background: rgba(250,252,253,.92); box-shadow: 0 8px 22px rgba(20,48,66,.08); pointer-events: none; }
.mechanism-state-readout span { grid-row: 1 / 3; display: grid; place-items: center; min-width: 54px; padding: 0 9px; color: #fff; background: #176b87; font: 700 10px var(--mono-font); }
.mechanism-state-readout b { padding: 7px 10px 2px; font-size: 11px; }
.mechanism-state-readout small { padding: 0 10px 7px; color: var(--muted); font-size: 8.5px; }
.mechanism-view-tools { position: absolute; right: 14px; top: 14px; z-index: 7; display: flex; border: 1px solid #9eb0bf; background: rgba(250,252,253,.92); box-shadow: 0 8px 22px rgba(20,48,66,.06); }
.mechanism-view-tools button { min-height: 31px; padding: 5px 8px; border: 0; border-right: 1px solid var(--border); color: var(--muted); background: transparent; cursor: pointer; font-size: 8.5px; }
.mechanism-view-tools button:last-child { border-right: 0; }
.mechanism-view-tools button.is-active { color: #fff; background: #176b87; }
.mechanism-event { position: absolute; left: 50%; bottom: 16px; z-index: 7; min-width: 310px; transform: translateX(-50%); display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; padding: 8px 11px; border: 1px solid #b14b55; background: rgba(255,250,250,.95); box-shadow: 0 8px 24px rgba(78,26,34,.1); pointer-events: none; }
.mechanism-event span { grid-row: 1 / 3; align-self: center; margin-right: 10px; color: #b14b55; font: 700 8px var(--mono-font); }
.mechanism-event b { font-size: 10px; }
.mechanism-event small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.mechanism-section-tag { position: absolute; left: 14px; bottom: 13px; z-index: 7; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; padding: 6px 8px; border-left: 2px solid #176b87; background: rgba(250,252,253,.84); pointer-events: none; }
.mechanism-section-tag span { grid-row: 1 / 3; align-self: center; margin-right: 8px; color: #176b87; font: 700 13px var(--mono-font); }
.mechanism-section-tag b { font: 700 7.5px var(--mono-font); }
.mechanism-section-tag small { color: var(--muted); font: 600 7px var(--mono-font); }

.mechanism-inspector { min-width: 0; min-height: 0; overflow: auto; padding: 14px 14px 10px; background: #f8fafb; }
.mechanism-inspector-head .kicker { margin-bottom: 6px; font-size: 8px; }
.mechanism-inspector-head h2 { font-size: 26px; line-height: 1.08; }
.mechanism-inspector-head > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.52; }
.mechanism-numbers { margin: 11px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); background: #fff; }
.mechanism-numbers div { min-width: 0; padding: 7px 6px; border-right: 1px solid var(--border); }
.mechanism-numbers div:last-child { border-right: 0; }
.mechanism-numbers dt { color: var(--muted); font: 700 6.8px var(--mono-font); }
.mechanism-numbers dd { margin: 4px 0 0; display: flex; align-items: baseline; gap: 2px; }
.mechanism-numbers strong { color: #176b87; font: 700 15px var(--mono-font); }
.mechanism-numbers span { color: var(--muted); font: 600 7px var(--mono-font); }
.mechanism-chain { margin-top: 10px; border-top: 1px solid var(--border); }
.mechanism-chain > div { display: grid; grid-template-columns: 31px 1fr auto; align-items: center; min-height: 35px; border-bottom: 1px solid var(--border); }
.mechanism-chain span { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #176b87; border-radius: 50%; color: #176b87; font: 700 8px var(--mono-font); }
.mechanism-chain b { font: 700 8px var(--mono-font); }
.mechanism-chain small { color: var(--muted); font: 600 7px var(--mono-font); }
.mechanism-chain [data-chain="w"].is-covered span { color: #fff; background: #176b87; }
.mechanism-chain [data-chain="m2"].is-installed span { color: #fff; background: #7b678d; border-color: #7b678d; }
.mechanism-status-list { margin: 9px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.mechanism-status-list li { display: grid; grid-template-columns: 62px 1fr; gap: 7px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.mechanism-status-list span { color: var(--muted); font-size: 8px; }
.mechanism-status-list b { font-size: 8.5px; line-height: 1.35; }
.mechanism-boundary { margin: 9px 0 0; padding: 7px 8px; border-left: 2px solid #b14b55; color: var(--muted); background: #fff6f6; font-size: 8px; line-height: 1.45; }
.mechanism-boundary b { color: #b14b55; font-family: var(--mono-font); }

.mechanism-control-deck { min-height: 104px; height: 16.2%; display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: 34px 1fr; border-top: 1px solid #aebcc8; background: #fff; }
.mechanism-controls { grid-row: 1 / 3; display: grid; grid-template-columns: 32px 1fr 32px 1fr; grid-template-rows: 32px 32px; gap: 4px; align-content: center; padding: 8px 9px; border-right: 1px solid var(--border); }
.mechanism-controls button, .mechanism-controls a, .mechanism-controls label { min-height: 30px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 4px; background: #fff; cursor: pointer; font-size: 8.5px; }
.mechanism-controls .primary-control { color: #fff; border-color: #176b87; background: #176b87; }
.mechanism-controls label { grid-column: 1 / 3; grid-template-columns: auto 1fr; padding-left: 7px; color: var(--muted); }
.mechanism-controls select { width: 100%; height: 100%; border: 0; background: transparent; font-size: 8px; }
.mechanism-controls a { grid-column: 3 / 5; }
.mechanism-scrub { grid-column: 2; display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 8px; padding: 5px 3.3% 0; color: var(--muted); font: 700 8px var(--mono-font); }
.mechanism-scrub input { width: 100%; accent-color: #176b87; }
.mechanism-timeline { grid-column: 2; display: grid; grid-template-columns: .8fr 1fr .8fr 1fr .8fr 1fr .8fr 1fr .8fr; min-height: 0; margin: 0; padding: 0 3.3%; list-style: none; }
.mechanism-timeline li { min-width: 0; }
.mechanism-timeline button { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 2px; border: 0; border-right: 1px solid var(--border); color: var(--muted); background: transparent; cursor: pointer; }
.mechanism-timeline li:first-child button { border-left: 1px solid var(--border); }
.mechanism-timeline span { color: #176b87; font: 700 8px var(--mono-font); }
.mechanism-timeline b { font: 650 7px var(--mono-font); }
.mechanism-timeline .travel button { background: #f1f5f7; }
.mechanism-timeline button[aria-current="step"] { color: var(--ink); background: #e4f0f3; box-shadow: inset 0 3px #176b87; }
body.capture .mechanism-control-deck, body.capture .mechanism-view-tools, body.capture .cad-gesture-hint { display: none; }
body.capture .mechanism-section-tag { bottom: 16px; }

.motion-disclaimer { justify-self: center; text-align: center; }
.motion-disclaimer b, .motion-disclaimer span { display: block; }
.motion-disclaimer b { font-size: 12px; }
.motion-disclaimer span { margin-top: 2px; color: var(--danger); font-size: 9.5px; }
.motion-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 72% 28%; }
.motion-visual { position: relative; min-width: 0; min-height: 0; overflow: hidden; border-right: 1px solid var(--border); background: #eef3f7; }
.motion-state-badge { position: absolute; left: 14px; top: 14px; z-index: 4; display: inline-flex; align-items: stretch; border: 1px solid var(--border); background: rgba(255,255,255,.94); }
.motion-state-badge span, .motion-state-badge b { display: grid; place-items: center; min-height: 32px; padding: 0 9px; }
.motion-state-badge span { color: var(--paper); background: var(--accent); font: 700 10px var(--mono-font); }
.motion-state-badge b { font-size: 11px; }
.motion-shot-note { position: absolute; left: 14px; bottom: 14px; z-index: 4; margin: 0; padding: 7px 10px; border: 1px solid var(--border); background: rgba(255,255,255,.94); color: var(--ink); font-size: 11px; }
.motion-rail > p:not(.kicker):not(.motion-rule) { color: var(--muted); font-size: 11px; line-height: 1.6; }
.motion-current { margin-top: 9%; padding: 10px 11px; border: 1px solid var(--border); background: var(--paper); }
.motion-current span, .motion-current b, .motion-current small { display: block; }
.motion-current span { color: var(--accent); font: 700 9px var(--mono-font); }
.motion-current b { margin-top: 5px; font-size: 12px; line-height: 1.4; }
.motion-current small { margin-top: 6px; color: var(--muted); font: 600 9px var(--mono-font); }
.motion-controls { margin-top: 8px; display: grid; grid-template-columns: 36px 1fr 36px 1fr; gap: 5px; }
.motion-controls button, .motion-controls select { min-height: 32px; border: 1px solid var(--border); border-radius: 5px; background: var(--paper); cursor: pointer; font-size: 10px; }
.motion-controls .primary-control { border-color: var(--accent); color: var(--paper); background: var(--accent); }
.motion-controls label { grid-column: 1 / span 2; display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.motion-controls .loop-option { grid-column: 3 / -1; grid-template-columns: 1fr auto; padding: 0 7px; border: 1px solid var(--border); border-radius: 5px; background: var(--paper); }
.motion-controls .loop-option input { accent-color: var(--accent); }
.motion-scrub { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 6px; margin-top: 7px; color: var(--muted); font-size: 10px; }
.motion-scrub input { margin-top: 0; }
.motion-rule { margin-top: 8px; color: var(--danger); font-size: 9.5px; line-height: 1.55; }
.motion-timeline { min-height: 56px; height: 8.8%; display: grid; grid-template-columns: repeat(8, 1fr); margin: 0; padding: 0 3.3%; list-style: none; border-top: 1px solid var(--border); background: var(--paper); }
.motion-timeline li { min-width: 0; }
.motion-timeline button { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-right: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; }
.motion-timeline li:first-child button { border-left: 1px solid var(--border); }
.motion-timeline span { font: 700 9px var(--mono-font); color: var(--accent); }
.motion-timeline b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.motion-timeline button[aria-current="step"] { color: var(--ink); background: var(--accent-tint); border-top: 3px solid var(--accent); }
.noscript-note { position: fixed; left: 0; bottom: 0; margin: 0; padding: 6px; background: #fff; color: var(--danger); font-size: 10px; }

@container prototype (max-width: 700px) {
  .product-header { min-height: 48px; height: 6.3%; grid-template-columns: 1fr auto; padding: 0 4%; gap: 8px; }
  .product-id span { font-size: 9px; }
  .product-modes { display: none; }
  .boundary-badge { font-size: 9px; }
  .product-header > .button.compact { padding: 5px 7px; font-size: 9px; }
  .frame-footer { min-height: 37px; height: 4.5%; padding: 0 4%; font-size: 8.5px; }
  .frame-footer span:first-child { max-width: 65%; }
  .hero-layout { grid-template-columns: 1fr; grid-template-rows: 52% 48%; padding: 5% 5% 2%; }
  .hero-copy { padding: 0; justify-content: flex-start; }
  h1 { font-size: clamp(34px, 11cqw, 46px); }
  h2 { font-size: clamp(28px, 8cqw, 38px); }
  .lead { margin-top: 11px; font-size: 12px; line-height: 1.6; }
  .kicker { margin-bottom: 8px; font-size: 9px; }
  .hero-facts { margin-top: 13px; display: grid; grid-template-columns: repeat(3, 1fr); }
  .hero-facts > div { display: block; padding: 7px 6px; border-right: 1px solid var(--border); }
  .hero-facts > div:last-child { border-right: 0; }
  .hero-facts > div > b { display: block; margin-bottom: 3px; }
  .hero-facts strong { font-size: 9.5px; }
  .hero-facts small { display: none; }
  .hero-actions { margin-top: 11px; }
  .button { min-height: 32px; padding: 6px 10px; font-size: 10px; }
  .hero-visual { border-left: 0; border-top: 1px solid var(--border); }
  .hero-visual figcaption { font-size: 7.5px; }
  .explain-layout { grid-template-columns: 1fr; grid-template-rows: 42% 58%; }
  .explain-copy { padding: 6% 5%; }
  .definition-list { margin-top: 4%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .definition-list div { padding: 7px 5px; border-right: 1px solid var(--border); }
  .definition-list div:last-child { border-right: 0; }
  .definition-list dt { font-size: 9.5px; }
  .definition-list dd { font-size: 8.5px; }
  .fact-note { display: none; }
  .diagram-stage { border-left: 0; border-top: 1px solid var(--border); }
  .design-layout { grid-template-columns: 1fr; grid-template-rows: 55% 45%; }
  .design-visual { border-right: 0; border-bottom: 1px solid var(--border); }
  .section-image > img { object-fit: cover; }
  .cad-pin small { display: none; }
  .cad-pin b { width: 21px; height: 21px; font-size: 8px; }
  .prototype-location-note { font-size: 7px; }
  .responsibility-rail { padding: 5%; }
  .responsibility-rail h2 { display: none; }
  .pin-list { margin-top: 4px; display: grid; grid-template-columns: repeat(2, 1fr); }
  .pin-list li { padding: 6px 5px; border-right: 1px solid var(--border); }
  .pin-list li > b { width: 20px; height: 20px; }
  .pin-list strong { font-size: 9.5px; }
  .pin-list small { font-size: 8px; }
  .boundary-callout { display: none; }
  .cad-product-header { grid-template-columns: 1fr auto; }
  .cad-configs { grid-column: 1 / -1; grid-row: 2; width: 100%; justify-content: flex-start; order: 2; padding-bottom: 2px; }
  .cad-configs button { flex: 0 0 auto; min-width: 64px; min-height: 27px; padding: 4px 6px; font-size: 8.5px; }
  .cad-product-header { min-height: 92px; height: 11%; padding-top: 6px; padding-bottom: 6px; }
  .cad-tool-strip { left: 7px; top: 7px; max-width: calc(100% - 14px); gap: 3px; overflow-x: auto; flex-wrap: nowrap; }
  .cad-tool-strip button, .cad-tool-strip a { flex: 0 0 auto; min-height: 27px; padding: 4px 7px; font-size: 8.5px; }
  .cad-state-card { right: 7px; top: 42px; width: calc(100% - 14px); padding: 7px 9px; }
  .cad-state-card b { font-size: 10px; }
  .cad-state-card small { max-height: 28px; overflow: hidden; font-size: 8px; }
  .cad-gesture-hint { right: 7px; bottom: 7px; max-width: calc(100% - 14px); font-size: 7.5px; }
  .assembly-product-header { min-height: 86px; height: 10.2%; grid-template-columns: 1fr auto; padding-top: 5px; padding-bottom: 5px; }
  .assembly-product-header .product-modes { grid-column: 1 / -1; grid-row: 2; display: flex; width: 100%; gap: 3px; }
  .assembly-product-header .product-modes button { flex: 1; min-height: 27px; padding: 4px 3px; font-size: 8.5px; }
  .assembly-layout { grid-template-columns: 1fr; grid-template-rows: 55% 45%; }
  .assembly-visual { border-right: 0; border-bottom: 1px solid var(--border); }
  .assembly-rail { padding: 5%; }
  .assembly-rail h2 { font-size: 25px; }
  .rail-intro { margin-top: 3%; font-size: 9.5px; }
  .explode-scrub { margin-top: 4%; padding: 6px 8px; }
  .module-list { margin-top: 4%; display: grid; grid-template-columns: repeat(2, 1fr); }
  .module-list li { padding: 6px 5px; border-right: 1px solid var(--border); }
  .module-list strong { font-size: 9.5px; }
  .module-list small { font-size: 8px; }
  .state-facts { margin-top: 4%; display: grid; grid-template-columns: repeat(2, 1fr); }
  .state-facts li { padding: 7px 6px; border-right: 1px solid var(--border); }
  .state-facts b { font-size: 9px; }
  .assembly-rail-actions { margin-top: 4%; }
  .assembly-rail-actions button, .assembly-rail-actions a { min-height: 27px; padding: 4px 6px; font-size: 8.5px; }
  .demo-product-header { min-height: 86px; height: 10.2%; grid-template-columns: 1fr auto; padding-top: 5px; padding-bottom: 5px; }
  .demo-product-header .demo-mode-switch { grid-column: 1 / -1; grid-row: 2; display: flex; width: 100%; gap: 3px; }
  .demo-product-header .demo-mode-switch button { flex: 1; min-height: 27px; padding: 4px 3px; font-size: 8.5px; }
  .demo-route-panel { left: 4%; right: 4%; top: 2.5%; width: auto; display: grid; grid-template-columns: 1fr 1fr; padding: 5px 6px; }
  .demo-route { padding: 5px 4px; border-bottom: 0; }
  .demo-route:first-child { border-right: 1px solid var(--border); }
  .demo-route small { font-size: 7.5px; }
  .demo-route-outlet { grid-column: 1 / -1; justify-content: center; padding-top: 5px; border-top: 1px solid var(--border); }
  .demo-narrative { left: 4%; right: 4%; top: auto; bottom: 11%; width: auto; padding: 11px 12px 12px; }
  .demo-narrative .kicker { margin-bottom: 5px; }
  .demo-narrative h2 { font-size: 25px; }
  .demo-narrative > p:not(.kicker) { margin-top: 7px; font-size: 10px; line-height: 1.5; }
  .demo-logic { margin-top: 8px; padding-top: 6px; }
  .demo-state-chip { right: 4%; bottom: 3.5%; }
  .demo-start { left: 4%; right: 4%; bottom: 2.5%; min-width: 0; }
  .demo-boundary { display: none; }
  .marker-m1 { left: 34%; top: 43%; }
  .marker-w { left: 49%; top: 48%; }
  .marker-m2 { left: 64%; top: 43%; }
  .demo-control-deck { min-height: 112px; height: 13.3%; grid-template-columns: 1fr; grid-template-rows: 38px 4px 1fr; }
  .demo-controls { grid-column: 1; grid-row: 1; grid-template-columns: 34px 1fr 34px .85fr .75fr; padding: 4px 5%; border-right: 0; }
  .demo-controls button, .demo-controls a { min-height: 29px; }
  .demo-progress { grid-column: 1; grid-row: 2; margin: 0 5%; }
  .demo-chapters { grid-column: 1; grid-row: 3; padding: 0; }
  .demo-chapters button { display: grid; gap: 1px; padding: 3px 1px; }
  .demo-chapters b { font-size: 7px; }
  .mechanism-product-header { min-height: 82px; height: 9.8%; grid-template-columns: 1fr auto; padding-top: 5px; padding-bottom: 5px; }
  .mechanism-product-header .demo-mode-switch { grid-column: 1 / -1; grid-row: 2; display: flex; width: 100%; gap: 3px; }
  .mechanism-product-header .demo-mode-switch button { flex: 1; min-height: 27px; padding: 4px; font-size: 8.5px; }
  .mechanism-workbench { grid-template-columns: 1fr; grid-template-rows: 64% 36%; }
  .mechanism-viewport { border-right: 0; border-bottom: 1px solid #aebcc8; }
  .mechanism-state-readout { left: 7px; top: 7px; min-width: 0; max-width: 68%; }
  .mechanism-state-readout span { min-width: 42px; font-size: 8px; }
  .mechanism-state-readout b { padding: 5px 7px 1px; font-size: 8.5px; }
  .mechanism-state-readout small { padding: 0 7px 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 6.8px; }
  .mechanism-view-tools { right: 7px; top: 7px; display: grid; }
  .mechanism-view-tools button { min-height: 24px; padding: 3px 5px; border-right: 0; border-bottom: 1px solid var(--border); font-size: 6.8px; }
  .mechanism-view-tools button:nth-child(3) { display: none; }
  .mechanism-section-tag { left: 7px; bottom: 7px; padding: 4px 5px; }
  .mechanism-section-tag span { font-size: 9px; }
  .mechanism-section-tag b, .mechanism-section-tag small { font-size: 5.5px; }
  .mechanism-event { left: 7px; right: 7px; bottom: 7px; min-width: 0; transform: none; padding: 6px 7px; }
  .mechanism-event span { font-size: 6px; }
  .mechanism-event b { font-size: 7.5px; }
  .mechanism-event small { font-size: 6px; }
  .mechanism-anchor text { font-size: 6.5px; stroke-width: 3px; }
  .mechanism-axis-dimension text { display: none; }
  #mechAnchorGate { display: none; }
  .mechanism-inspector { padding: 8px 9px 6px; }
  .mechanism-inspector-head .kicker, .mechanism-inspector-head h2, .mechanism-inspector-head > p:last-child { display: none; }
  .mechanism-numbers { margin-top: 0; }
  .mechanism-numbers div { padding: 5px 4px; }
  .mechanism-numbers dt { font-size: 5.8px; }
  .mechanism-numbers strong { font-size: 12px; }
  .mechanism-chain { margin-top: 6px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); }
  .mechanism-chain > div { grid-template-columns: 24px 1fr; grid-template-rows: auto auto; min-height: 42px; padding: 4px; border-right: 1px solid var(--border); border-bottom: 0; }
  .mechanism-chain > div:last-child { border-right: 0; }
  .mechanism-chain span { grid-row: 1 / 3; width: 19px; height: 19px; font-size: 6px; }
  .mechanism-chain b { font-size: 6.5px; }
  .mechanism-chain small { font-size: 5.5px; }
  .mechanism-status-list { margin-top: 5px; display: grid; grid-template-columns: repeat(2, 1fr); }
  .mechanism-status-list li { grid-template-columns: 1fr; gap: 2px; padding: 4px; border-right: 1px solid var(--border); }
  .mechanism-status-list li:last-child { display: none; }
  .mechanism-status-list span { font-size: 6px; }
  .mechanism-status-list b { font-size: 6.7px; }
  .mechanism-boundary { margin-top: 5px; padding: 4px 5px; font-size: 6.5px; }
  .mechanism-control-deck { min-height: 118px; height: 14%; grid-template-columns: 1fr; grid-template-rows: 36px 26px 1fr; }
  .mechanism-controls { grid-column: 1; grid-row: 1; grid-template-columns: 28px 1fr 28px .8fr .8fr; grid-template-rows: 30px; padding: 3px 5%; border-right: 0; }
  .mechanism-controls label { display: none; }
  .mechanism-controls a { grid-column: auto; }
  .mechanism-controls button, .mechanism-controls a { min-height: 28px; font-size: 7px; }
  .mechanism-scrub { grid-column: 1; grid-row: 2; grid-template-columns: 70px 1fr; padding: 2px 5%; font-size: 6.5px; }
  .mechanism-timeline { grid-column: 1; grid-row: 3; padding: 0; }
  .mechanism-timeline span { font-size: 6.5px; }
  .mechanism-timeline b { font-size: 5.5px; }
  .motion-disclaimer { display: none; }
  .motion-layout { grid-template-columns: 1fr; grid-template-rows: 48% 52%; }
  .motion-visual { border-right: 0; border-bottom: 1px solid var(--border); }
  .motion-rail { padding: 4% 5%; }
  .motion-rail .kicker { display: none; }
  .motion-rail h2 { font-size: 22px; }
  .motion-rail > p:not(.kicker):not(.motion-rule) { display: none; }
  .motion-current { margin-top: 4%; padding: 7px; }
  .motion-controls { margin-top: 5px; }
  .motion-scrub { margin-top: 5px; }
  .motion-rule { display: none; }
  .motion-timeline { min-height: 55px; height: 7%; padding: 0; }
  .motion-timeline button { display: grid; gap: 1px; }
  .motion-timeline b { font-size: 7px; }
}

body.clean .review-bar { display: none; }
body.clean .review-canvas { height: 100vh; padding: 0; }
body.clean .prototype-shell { width: min(100vw, calc(100vh * 16 / 9)); max-height: 100vh; border: 0; }
body.clean[data-device="mobile"] .prototype-shell { width: min(390px, 100vw, calc(100vh * .4620853)); height: auto; max-height: none; }

@media (max-width: 820px) {
  .review-bar { grid-template-columns: 122px minmax(0, 1fr) auto; }
  .review-brand { padding: 0 8px; gap: 6px; }
  .review-brand strong { font-size: 9px; }
  .review-brand small { display: none; }
  .review-nav button { min-width: 62px; padding: 0 7px; font-size: 10px; }
  .review-actions button { width: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
