/* Container-aware projection of the existing content-fit law. No global zoom. */
:root {
  --act4-space: clamp(.75rem, .5rem + 1.25vw, 2rem);
  --act4-stroke: 1px;
  --act4-focus-stroke: 2px;
  --act4-target: 2.75rem;
}
html, body { min-inline-size: 0; }
html { font-size: 100%; }
body { font-size: 1rem; }
/* RL-FACE-SCROLL-CHROME-001: preserve scroll semantics without native gray chrome. */
:where(html, body, *) { -ms-overflow-style: none !important; scrollbar-width: none !important; }
:where(html, body, *)::-webkit-scrollbar { display: none !important; inline-size: 0 !important; block-size: 0 !important; }
.runtime {
  min-block-size: 100%;
  overflow: auto;
  block-size: 100dvh;
  grid-template-columns: clamp(13rem, 19vw, 18rem) minmax(0, 1fr);
  grid-template-rows: auto minmax(10rem, 1fr) auto;
}
.runtime > *, .runtime .canvas > * { min-inline-size: 0; }
.runtime .mast { min-block-size: 4.5rem; padding: .5rem var(--act4-space); gap: .75rem; flex-wrap: wrap; }
.runtime .mast-actions { min-inline-size: 0; flex-wrap: wrap; gap: .75rem; }
.runtime .brand small { font-size: .75rem; letter-spacing: .08em; }
.runtime :is(.member span, .live-state) { font-size: .8125rem; }
.runtime .member { min-block-size: var(--act4-target); }
.runtime .navigation {
  min-block-size: 0; overflow: auto;
  padding: var(--act4-space); gap: .25rem;
}
.runtime .navigation .nav-item { flex-shrink: 0; min-block-size: var(--act4-target); font-size: .9375rem; }
.runtime .navigation :is(.nav-note small, .nav-note strong, .nav-note span, p) { font-size: .8125rem; }
.runtime .workspace {
  container-type: inline-size;
  padding: 0; display: flex; flex-direction: column; overflow: hidden;
}
.runtime .workspace-head {
  position: static; flex: 0 0 auto; padding: var(--act4-space);
  overflow-wrap: anywhere;
}
.runtime .workspace-head h1 { font-size: clamp(1.25rem, 1rem + 1.5cqi, 2.5rem); line-height: 1.2; }
.runtime .workspace-head p { font-size: .8125rem; }
.runtime .canvas-action-dock {
  position: static; transform: none; flex: 0 0 auto; padding: 0 var(--act4-space) .5rem;
  max-inline-size: 100%;
}
.runtime .canvas-action-dock .consumer-link {
  white-space: normal; font-size: .875rem; min-block-size: var(--act4-target);
}
.runtime .canvas {
  flex: 1 1 auto; block-size: auto; min-block-size: 6.25rem;
  padding: var(--act4-space); container-type: inline-size;
  overflow: auto; scroll-padding: 1rem;
}
.runtime .canvas .overview-field { grid-template-columns: minmax(0, 1fr); }
.runtime .canvas .overview-field > * { min-inline-size: 0; }
.runtime .canvas :where(p, li, dd, input, select, textarea) { font-size: 1rem; line-height: 1.55; }
.runtime .canvas :where(h2) { font-size: clamp(2rem, 1.5rem + 3cqi, 4.5rem); line-height: 1.12; overflow-wrap: anywhere; }
.runtime .canvas :where(h3) { font-size: clamp(1.25rem, 1rem + 2cqi, 2.5rem); line-height: 1.2; overflow-wrap: anywhere; }
.runtime .canvas :where(h4) { font-size: 1.125rem; line-height: 1.3; }
.runtime .canvas :where(small, .kicker, dt) { font-size: .8125rem; }
.runtime .canvas :where(button, label, output, .action) { font-size: 1rem; }
.runtime .canvas :where(button, .action, .owner-route) { min-block-size: var(--act4-target); white-space: normal; }
.runtime .canvas :where(img, video, canvas, svg) { max-inline-size: 100%; }
.runtime .canvas :where(pre) { max-inline-size: 100%; overflow: auto; }
.runtime .canvas :where(input, select, textarea) { min-inline-size: 0; max-inline-size: 100%; }
.runtime .canvas :is(.intent-badge) { flex-wrap: wrap; }
.runtime .canvas > :is(.dna-page, .devices-page, .one-experience-page, .field-method-page) { padding: var(--act4-space); }
.runtime .canvas :is(.hero-grid, .truth-grid, .consumer-grid, .device-grid, .stack-grid, .field-method-flow, .field-method-risks>div, .field-method-metrics>div) {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: clamp(.75rem, .5rem + 1cqi, 1.5rem);
}
.runtime .canvas :is(.truth-card, .consumer-card, .skin-card, .device-grid article) {
  min-inline-size: 0; padding: clamp(.75rem, .5rem + 1cqi, 1.5rem);
  border-width: var(--act4-stroke); border-radius: clamp(.5rem, .4rem + 1cqi, 1.25rem);
}
.runtime .floor { padding: .5rem var(--act4-space); gap: .5rem; min-inline-size: 0; }
.runtime .floor .suit-switcher {
  grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; grid-auto-columns: auto;
  max-height: calc(100dvh - 6rem); overflow-x: hidden; overflow-y: auto; gap: .5rem;
}
.runtime .floor .suit-switcher :is(strong, small) { white-space: normal; overflow-wrap: anywhere; }
.runtime .floor > [data-runtime-stack] { max-inline-size: none; white-space: normal; overflow-wrap: anywhere; }
.runtime :focus-visible { outline-width: var(--act4-focus-stroke); outline-offset: 3px; }
/* em follows user text preferences; short windows retain a scrollable document. */
@media (max-width: 60em) {
  .runtime { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(10rem, 1fr) auto; }
  .runtime .navigation { flex-direction: row; max-block-size: 7rem; padding: .5rem; }
  .runtime .navigation .nav-item { min-inline-size: max-content; }
  .runtime .navigation > p, .runtime .nav-note { display: none; }
}
@media (max-width: 35em) {
  .runtime .floor .suit-switcher { grid-template-columns: minmax(0, 1fr); }
}
@media (max-height: 24em) {
  .runtime { block-size: auto; min-block-size: 100dvh; }
  .runtime .workspace { min-block-size: 20rem; }
}
@container (max-width: 36rem) {
  .runtime .canvas :is(.member-panel, .continuity-specimen-stage, .skin-card, .dna-hero) { grid-template-columns: minmax(0, 1fr); }
  .runtime .canvas :is(.dna-jump, .collection-tools, .exchange-filters) { margin-inline: 0; flex-wrap: wrap; }
  .runtime .canvas :is(.memory-list dl) { grid-template-columns: minmax(0, 1fr); }
}

/* Contents replaces the permanent rail with a calm card HUD in the canvas plane. */
.runtime{
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto minmax(10rem,1fr) auto;
}
.runtime .mast{grid-column:1;grid-row:1}
.runtime .workspace,.runtime .navigation{grid-column:1;grid-row:2;transition:opacity 160ms cubic-bezier(.22,1,.36,1)}
.runtime .workspace{opacity:1;pointer-events:auto}
.runtime .navigation{
  position:relative;z-index:8;align-content:center;
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr));
  gap:.75rem;padding:clamp(1.25rem,4vw,4.5rem);border:0;background:var(--bg);
  opacity:0;pointer-events:none;overflow:auto;
}
.runtime .navigation[hidden]{display:none}
.runtime.contents-open .workspace{opacity:0;pointer-events:none}
.runtime.contents-open .navigation{opacity:1;pointer-events:auto}
.runtime .navigation>p{grid-column:1/-1;margin:0 0 .5rem;padding:0;font-size:.8125rem}
.runtime .navigation .nav-item{
  min-inline-size:0;min-block-size:5.5rem;padding:1.15rem;border:0;border-radius:1.15rem;
  grid-template-columns:2.25rem minmax(0,1fr);background:#ffffff06;
}
.runtime .navigation .nav-item:hover,.runtime .navigation .nav-item:focus-visible,.runtime .navigation .nav-item.is-active{background:#ffffff0d}
.runtime .navigation .nav-subitem{margin:0}
.runtime .navigation .nav-note{margin:0;min-block-size:5.5rem;padding:1.15rem;border:0;border-radius:1.15rem;background:#ffffff04}
.runtime .floor{grid-column:1;grid-row:3;justify-content:space-between}
@media(max-width:60em){
  .runtime{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(10rem,1fr) auto}
  .runtime .navigation{max-block-size:none;display:grid;padding:var(--act4-space)}
  .runtime .navigation[hidden]{display:none}
  .runtime .navigation>p,.runtime .nav-note{display:flex}
  .runtime .navigation .nav-item{min-inline-size:0}
}
@media(max-width:35em){.floor .brand strong,.contents-trigger>span:last-child,.suit-menu-trigger>span:last-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.floor-home{gap:2px}}
@media(prefers-reduced-motion:reduce){.runtime .workspace,.runtime .navigation{transition:none}}
