/* Runtime reference in BearScope's yellow product frame, with cobalt controls. */
.runtime-explorer { scroll-margin-top: 12px; padding-bottom: 0; }
.runtime-explorer:focus { outline: none; }
.runtime-explorer-body { position: relative; }
.runtime-selector { display: flex; align-items: center; justify-content: flex-start; gap: 20px; padding-inline: 0 44px; margin-bottom: 20px; }
.runtime-selector > a { display: flex; align-items: center; min-height: 48px; padding: 12px 16px; border-bottom: 2px solid transparent; color: var(--mid); }
.runtime-selector-title { font-size: 16px; font-weight: 500; line-height: 1.4; }
.runtime-selector [aria-selected="true"] { color: #131417; background: var(--yellow); border-bottom-color: transparent; }
.runtime-selector > a:hover:not([aria-selected="true"]) { color: var(--ink); }
.runtime-selector > a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.runtime-next svg, .runtime-contract svg, .runtime-operator-list svg { width: 20px; height: 20px; flex: none; }
.runtime-stage { position: relative; isolation: isolate; overflow: hidden; min-width: 0; }
.runtime-flow { position: absolute; top: 228px; left: 50%; width: min(760px, calc(100% - 88px)); height: 50px; transform: translateX(-50%); z-index: 1; opacity: .8; pointer-events: none; }
.runtime-flow path { fill: none; stroke: #1748d1; stroke-width: 2; stroke-dasharray: 18 120; animation: runtime-current 8s linear infinite paused; }
[data-motion="running"] .runtime-flow path { animation-play-state: running; }
@keyframes runtime-current { to { stroke-dashoffset: -552; } }
.runtime-panel { position: relative; scroll-margin-top: 84px; }
.runtime-panel[hidden] { display: none; }
.runtime-visual { --paper: #fff; --paper-2: #f4f5f7; --ink: #131417; --mid: #50545b; --line: #dfe2e7; padding: 36px 44px; min-height: 440px; background: var(--yellow); border: 0; }
[data-runtime-detail="simple"] .runtime-visual { min-height: 440px; }
.runtime-surface { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.runtime-system-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.runtime-system { display: flex; align-items: center; gap: 12px; padding: 22px 20px; min-height: 94px; background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 500; }
.runtime-system span { flex: 1; }
.runtime-system img { width: 32px; height: 32px; object-fit: contain; }
.runtime-system:hover { background: var(--paper-2); }
.runtime-convergence { height: 50px; }
.runtime-contract { padding: 22px 24px; background: #2450e8; color: #fff; display: grid; grid-template-columns: 1fr auto; gap: 16px; border: 1px solid #2450e8; }
.runtime-contract > span { font-size: 24px; font-weight: 800; letter-spacing: -.035em; }
.runtime-contract > div { grid-row: 2; display: flex; gap: 12px; flex-wrap: wrap; color: #e7edff; }
.runtime-contract code { font: 12px var(--mono); }
.runtime-contract small { display: block; font: 10px var(--mono); color: #e7edff; margin-top: 7px; }
.runtime-caption { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; max-width: 760px; margin: auto; background: var(--paper); }
.story-page .runtime-caption p { color: var(--mid); font-size: 15px; line-height: 1.5; max-width: 52ch; }
.runtime-next { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--ink); font-size: 14px; font-weight: 500; flex: none; }
.runtime-next:hover { text-decoration: underline; text-underline-offset: 4px; }
.runtime-motion { position: absolute; z-index: 3; top: 4px; right: 0; display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.runtime-motion:hover { background: var(--paper-2); }
.runtime-motion svg { width: 16px; height: 16px; }
.runtime-motion[hidden] { display: none; }
.runtime-visual a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.runtime-motion:focus-visible, .runtime-next:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.runtime-code { background: #202327; color: #f5f6ff; border: 1px solid #32383d; }
.runtime-code-title { display: flex; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid #373c50; font: 12px var(--mono); color: #bdc7d2; }
.runtime-code pre { padding: 24px; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: clamp(14px, 1.4vw, 20px)/1.8 var(--mono); }
.runtime-code em { color: #a5bcff; font-style: normal; }
.runtime-code b { color: #a5d2ef; font-weight: 400; }
.runtime-code-foot { display: flex; justify-content: space-between; padding: 14px 24px; border-top: 1px solid #373c50; font-size: 12px; color: #bdc7d2; }
.runtime-operator-card .runtime-code-title { font: 500 22px/1.4 var(--sans); color: #fff; }
.runtime-operator-flow { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 40px 24px; font-size: 26px; line-height: 1.2; letter-spacing: -.02em; }
.runtime-operator-flow > span:last-child { color: #a5d2ef; }
.runtime-operator-flow svg { width: 28px; height: 28px; flex: none; color: #bdc7d2; }
.runtime-operator-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 28px; background: var(--line); border: 1px solid var(--line); }
.runtime-operator-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: 13px; color: var(--ink); background: var(--paper); }
.runtime-plan { display: flex; align-items: center; justify-content: space-between; padding: 24px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.runtime-plan > span { font-size: 24px; font-weight: 500; }
.runtime-plan code { font: 14px var(--mono); color: var(--mid); }
.runtime-policy { display: flex; gap: 22px; align-items: center; padding: 30px 28px; background: #202327; color: #fff; margin: 24px 0; }
.runtime-policy-mark { font-size: 48px; color: #a5d2ef; }
.runtime-policy strong { display: block; font-size: 25px; font-weight: 500; letter-spacing: -.02em; }
.runtime-policy div > span { display: block; color: #bbc3df; font-size: 14px; margin-top: 10px; }
.runtime-decisions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.runtime-decisions > div { display: flex; flex-direction: column; gap: 8px; background: var(--paper); color: var(--ink); padding: 20px; }
.runtime-decisions strong { font: 13px var(--mono); }
.runtime-decisions span { font-size: 20px; letter-spacing: -.02em; }
.runtime-execution-keys { display: flex; gap: 24px; color: var(--mid); font: 11px var(--mono); margin-top: 22px; }
[data-ready] .runtime-panel:not([hidden]) .runtime-surface { animation: runtime-enter 360ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes runtime-enter { from { opacity: .25; transform: translate3d(0,12px,0); } to { opacity: 1; transform: none; } }
[data-view="define"] .runtime-flow { top: 245px; height: 36px; }
[data-view="execute"] .runtime-flow { top: 118px; height: 28px; }
[data-runtime-detail="simple"][data-view="define"] .runtime-flow { top: 222px; }
@media(max-width:1050px) {
  .runtime-visual { padding: 30px 28px; }
  .runtime-system { padding: 18px 16px; gap: 10px; }
  .runtime-caption { max-width: calc(100% - 56px); }
  .runtime-flow { top: 218px; width: min(760px, calc(100% - 56px)); }
}
@media(max-width:760px) {
  .runtime-selector { gap: 20px; padding-inline: 0 40px; margin-bottom: 16px; }
  .runtime-selector > a { padding: 12px 0; }
  .runtime-selector-title { font-size: 14px; }
  .runtime-visual { padding: 24px 20px; min-height: 420px; }
  [data-runtime-detail="simple"] .runtime-visual { min-height: 390px; }
  .runtime-system-grid { grid-template-columns: repeat(2, 1fr); }
  .runtime-system { min-height: 72px; font-size: 12px; padding: 16px 12px; gap: 8px; }
  .runtime-system img { width: 26px; height: 26px; }
  .runtime-convergence { height: 32px; }
  .runtime-contract { padding: 18px; }
  .runtime-contract > span { font-size: 21px; }
  .runtime-contract > div { gap: 8px; }
  .runtime-contract code { font-size: 10px; }
  .runtime-code pre { padding: 24px 16px; }
  .runtime-code-title, .runtime-code-foot { padding-inline: 16px; }
  .runtime-code-foot { font-size: 10px; }
  .runtime-operator-card .runtime-code-title { font-size: 20px; }
  .runtime-operator-flow { padding: 36px 16px; gap: 14px; font-size: 19px; }
  .runtime-operator-flow svg { width: 22px; }
  .runtime-operator-list a { padding: 12px 10px; font-size: 11px; }
  .runtime-operator-list svg { width: 14px; }
  .runtime-plan { padding: 20px; }
  .runtime-plan > span { font-size: 20px; }
  .runtime-policy { padding: 24px 20px; }
  .runtime-decisions > div { padding: 16px 12px; }
  .runtime-decisions span { font-size: 18px; }
  .runtime-execution-keys { gap: 16px; font-size: 9px; }
  .runtime-caption { display: block; max-width: none; padding: 20px 0; text-align: left; }
  .story-page .runtime-caption p { font-size: 14px; max-width: 40ch; margin-inline: 0; }
  .runtime-next { margin-top: 4px; font-size: 13px; }
  .runtime-flow { top: 240px; width: calc(100% - 40px); height: 32px; }
  [data-view="define"] .runtime-flow { top: 228px; }
  [data-view="execute"] .runtime-flow { top: 96px; }
  [data-runtime-detail="simple"][data-view="define"] .runtime-flow { top: 193px; }
}
@media(max-width:380px) {
  .runtime-selector { padding-inline: 0 36px; gap: 14px; }
  .runtime-selector > a { padding-inline: 0; }
  .runtime-selector-title { font-size: 13px; }
  .runtime-motion { width: 32px; }
  .runtime-operator-flow { font-size: 17px; gap: 10px; }
}
@media(prefers-reduced-motion:reduce) {
  .runtime-flow path, [data-ready] .runtime-panel:not([hidden]) .runtime-surface { animation: none; }
}
