#pieces.primitives-story {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center; gap: 72px; padding-block: 104px 96px;
}
.primitives-story__copy h2 { max-width: 17ch; font-size: clamp(2.25rem, 3.8vw, 3.25rem); line-height: 1.1; letter-spacing: -.045em; text-wrap: balance; }
.primitives-story__copy p { max-width: 43ch; margin: 28px 0 0; font-size: 1rem; line-height: 1.75; color: var(--muted); }
.primitives-scene { min-width: 0; --scene-ink: #f0f6e9; --scene-secondary: #b8d3c8; --scene-teal: #14564e; --scene-gutter: 120px; }
.scene-navigation { position: relative; z-index: 3; display: flex; align-items: stretch; gap: 4px; margin: 0 0 20px 36px; padding: 4px; border: 1px solid #d9e1d7; border-radius: 4px; }
.scene-app-picker { position: relative; display: flex; flex: 0 0 112px; border-right: 1px solid #d9e1d7; margin-right: 4px; }
.scene-app-select { text-align: left; width: 100%; min-height: 44px; padding: 10px 28px 10px 12px; border: 0; border-radius: 2px; background: transparent; color: var(--accent); font: inherit; font-size: .875rem; font-weight: 500; cursor: pointer; }
.scene-app-select:hover { background: #edf2e9; }
.scene-app-options { position: absolute; top: calc(100% + 10px); left: -5px; min-width: 180px; padding: 5px; background: #fffefa; border: 1px solid #cedbd2; border-radius: 4px; box-shadow: 0 12px 32px -12px #203d3538; z-index: 5; }
.scene-app-options [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 44px; padding: 10px 12px; border-radius: 2px; font-size: .875rem; color: var(--muted); cursor: pointer; }
.scene-app-options [data-highlighted="true"] { background: #e4eee5; color: var(--accent); }
.scene-app-options [aria-selected="true"] { color: var(--accent); }
.scene-app-options [aria-selected="true"]::after { content: '✓'; font-size: .75rem; }
.scene-app-select[aria-expanded="true"] { background: #edf2e9; }
.scene-app-select[aria-expanded="true"] ~ svg { transform: rotate(180deg); }
.scene-app-picker svg { position: absolute; right: 10px; top: calc(50% - 8px); width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.3; pointer-events: none; }
.scene-progress { position: absolute; bottom: 0; left: 12px; right: 12px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.primitives-scene[data-guided="false"] .scene-progress { transform: scaleX(0); }
.scene-views { display: flex; flex: 1; min-width: 0; gap: 4px; }
.scene-views button { flex: 1; min-width: 0; padding: 9px 6px; min-height: 44px; border: 0; border-radius: 2px; background: transparent; color: var(--muted); font-size: .75rem; line-height: 1.4; cursor: pointer; }
.scene-views button[aria-pressed="true"] { color: var(--accent); background: #e4eee5; }
.scene-views button:hover { color: var(--accent); background: #edf2e9; }
.scene-mode-toggle { flex: 0 0 40px; display: grid; place-items: center; align-self: stretch; min-height: 44px; padding: 8px; border: 0; border-left: 1px solid #d9e1d7; border-radius: 0; background: transparent; color: var(--accent); cursor: pointer; }
.scene-mode-toggle:hover { background: #edf2e9; }
.scene-mode-toggle svg { grid-area: 1 / 1; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.scene-collapse-icon { display: none; }
.primitives-scene[data-mode="primitives"] .scene-expand-icon { display: none; }
.primitives-scene[data-mode="primitives"] .scene-collapse-icon { display: block; }
.primitives-story__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 28px; font-size: .875rem; }
.primitives-story__actions > a:not(.btn) { color: var(--muted); }
.scene-stage { position: relative; height: 574px; }
.scene-shell { position: absolute; inset: 4px 0 14px 36px; background: var(--scene-teal); border: 1px solid #276c61; border-radius: 6px; box-shadow: 0 24px 50px -32px #123f3555; color: var(--scene-ink); transition: opacity .3s; }
.scene-shell__brand { height: 48px; display: flex; gap: 9px; align-items: center; padding: 0 22px; border-bottom: 1px solid #ffffff18; color: var(--scene-secondary); font-size: .75rem; }
.scene-example-label { margin-left: auto; font-size: .625rem; }
.scene-brand-mark { width: 10px; height: 10px; background: #c6e1bc; border-radius: 2px; flex: none; }
.scene-shell__heading { padding: 20px 24px 0; font-size: 1.25rem; line-height: 1.3; font-weight: 500; letter-spacing: -.025em; }
.scene-module { position: absolute; left: 60px; right: 24px; top: var(--module-top, 20px); }
.scene-module:nth-of-type(3) { --module-top: 200px; }
.scene-module:nth-of-type(4) { --module-top: 340px; }
.scene-module__label { position: absolute; width: calc(var(--scene-gutter) - 12px); left: calc(-1 * var(--scene-gutter)); top: 12px; color: var(--accent); font-size: 1rem; font-weight: 500; line-height: 1.4; opacity: 0; pointer-events: none; }
.scene-module__label span { display: block; margin-top: 5px; color: var(--muted); font-size: .75rem; line-height: 1.5; font-weight: 400; }
.scene-surface { border: 1px solid transparent; border-radius: 3px; background: var(--scene-teal); color: var(--scene-ink); transition: border-color .4s; }
.scene-record-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; color: var(--scene-secondary); font-size: .6875rem; border-bottom: 1px solid #ffffff1c; }
.scene-record { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 10px 14px; border-bottom: 1px solid #ffffff1c; font-size: .875rem; }
.scene-record:last-child { border-bottom: 0; }
.scene-status { flex: none; font-size: .625rem; color: #d5ebbf; background: #ffffff12; padding: 3px 7px; border-radius: 3px; }
.scene-item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.scene-item > span:last-child { min-width: 0; }
.scene-surface strong { display: block; font-size: .875rem; line-height: 1.45; font-weight: 500; }
.scene-surface small { display: block; margin-top: 3px; font-size: .75rem; line-height: 1.5; color: var(--scene-secondary); }
.scene-file-icon { display: grid; place-items: center; flex: none; width: 28px; height: 34px; border: 1px solid #92b6a8; border-radius: 2px 7px 2px 2px; color: var(--scene-secondary); font-size: .5rem; }
.scene-avatar { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; color: #dcebcf; background: #ffffff16; font-size: .6875rem; }
.scene-surface .scene-detail { margin: 0; padding: 0 14px 12px; font-size: .6875rem; line-height: 1.55; color: var(--scene-secondary); }
.scene-insight { padding: 14px; }
.scene-chart { display: grid; gap: 9px; margin: 14px 0; }
.scene-bar-row { display: grid; grid-template-columns: 66px 1fr 32px; align-items: center; gap: 8px; color: var(--scene-secondary); font-size: .6875rem; line-height: 1.2; }
.scene-bar-row i { height: 7px; background: linear-gradient(to right, #bdd8ad var(--bar), #ffffff0e var(--bar)); border-radius: 1px; }
.scene-bar-row b { font-weight: 400; text-align: right; }
.scene-grants { display: grid; gap: 12px; padding: 14px; }
.scene-grants > div { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.scene-grants small { text-align: right; }
.scene-agent-mark { flex: none; width: 28px; color: #c6e1bc; font-size: 2rem; line-height: 1; text-align: center; }
.scene-workflow { margin: 0; padding: 14px 14px 4px; list-style: none; }
.scene-workflow li { position: relative; padding: 0 0 14px 22px; font-size: .8125rem; line-height: 1.5; }
.scene-workflow li::before { content: ''; position: absolute; left: 2px; top: 5px; width: 6px; height: 6px; border: 1px solid #c6e1bc; border-radius: 50%; }
.scene-workflow li:not(:last-child)::after { content: ''; position: absolute; left: 5px; top: 14px; bottom: 3px; width: 1px; background: #ffffff30; }
.scene-schedule { margin: 0 14px 10px; padding-top: 10px; border-top: 1px solid #ffffff1c; font-size: .75rem; color: var(--scene-ink); line-height: 1.5; }
.scene-notice-mark { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #c6e1bc; box-shadow: 0 0 0 4px #ffffff0b; margin-inline: 4px; }
.scene-audit { padding: 0 14px; }
.scene-audit > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-block: 12px; }
.scene-audit > div + div { border-top: 1px solid #ffffff1c; }
.scene-audit time { color: var(--scene-secondary); font-size: .625rem; }
.primitives-scene[data-mode="primitives"] .scene-shell { opacity: 0; }
.primitives-scene[data-mode="primitives"] .scene-module { left: var(--scene-gutter); right: 0; }
.primitives-scene[data-mode="primitives"] .scene-module__label { opacity: 1; }
.primitives-scene[data-mode="primitives"] .scene-surface { border-color: #276c61; box-shadow: 0 12px 22px -20px #123f3566; }
#examples { margin-bottom: 72px; }
@media (max-width: 1050px) {
  #pieces.primitives-story { gap: 32px; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .primitives-story__copy h2 { font-size: 2.5rem; }
  .primitives-scene { --scene-gutter: 104px; }
}
@media (max-width: 800px) {
  #pieces.primitives-story { grid-template-columns: 1fr; gap: 40px; padding-block: 64px; }
  .primitives-story__copy h2 { max-width: 22ch; font-size: clamp(2rem, 6vw, 2.75rem); }
  .primitives-story__copy p { max-width: 56ch; margin-top: 24px; }
  .primitives-scene { width: 100%; max-width: 560px; margin-inline: auto; }
}
@media (max-width: 480px) {
  .scene-navigation { margin-left: 0; gap: 2px; }
  .scene-app-picker { flex-basis: 82px; margin-right: 0; }
  .scene-app-select { font-size: .75rem; padding-left: 6px; padding-right: 20px; }
  .scene-app-picker svg { right: 4px; width: 14px; }
  .scene-progress { left: 6px; right: 6px; }
  .scene-views { gap: 2px; }
  .scene-views button { font-size: .6875rem; padding-inline: 4px; }
  .scene-stage { height: 600px; }
  .scene-shell { left: 0; }
  .scene-shell__brand { padding-inline: 14px; }
  .scene-shell__heading { padding-inline: 14px; font-size: 1.125rem; }
  .scene-example-label { display: none; }
  .scene-module { left: 10px; right: 10px; }
  .primitives-scene[data-mode="primitives"] .scene-module { left: 0; right: 0; }
  .scene-module__label { left: 0; top: auto; bottom: calc(100% + 12px); width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .9375rem; }
  .scene-module__label span { margin: 0; font-size: .6875rem; text-align: right; }
  .scene-record { padding-inline: 10px; gap: 8px; }
  .scene-record-head { padding-inline: 10px; }
  .scene-grants > div { display: block; }
  .scene-grants small { text-align: left; }
  #examples { margin-bottom: 56px; }
}
@media (prefers-reduced-motion: reduce) { .scene-shell, .scene-surface { transition: none; } }

.primitives-scene:not([data-ready]) .scene-shell,
.primitives-scene[data-assembling="true"] .scene-shell { transition: none; }
