/* One continuous v2 color wash, below every section and the footer. */
body { isolation: isolate; }
main, .footer { position: relative; z-index: 1; }
.page-aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}
.aura-blob {
  position: absolute;
  left: -44vw;
  top: -50vh;
  width: 88vw;
  height: 100vh;
  border-radius: 50%;
  filter: blur(24px);
  will-change: transform;
}
.aura-orange {
  background: radial-gradient(ellipse, #ffae8755, #ffae8722 38%, #ffae8700 70%);
  transform: translate3d(30vw, 62vh, 0);
}
.aura-blue {
  background: radial-gradient(ellipse, #acd7f455, #acd7f422 38%, #acd7f400 70%);
  transform: translate3d(75vw, 36vh, 0);
}
.aura-sage {
  background: radial-gradient(ellipse, #dcdfb956, #dcdfb922 38%, #dcdfb900 70%);
  transform: translate3d(60vw, 85vh, 0);
}

/* Fade only the existing grid; never paint paper over the shared glow. */
.hero-grid { background-image: none; }
.hero-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(#e8ebef70 1px, transparent 1px), linear-gradient(90deg, #e8ebef70 1px, transparent 1px);
  background-size: inherit;
  background-position: center top;
  mask-image: linear-gradient(#000 calc(100% - 240px), transparent);
}
.story-section, .stores-section, .closing-section, .story-console-wrap {
  background: transparent;
  color: var(--ink);
}
/* Transparent borders retain the exact section geometry without a seam. */
.stores-section, .closing-section { border-block-color: transparent; }
.footer-note { border-top-color: transparent; }

/* Reuse v2's light surfaces and ink for the formerly charcoal story. */
.story-console {
  background: #ffffffbf;
  border-color: var(--line);
  box-shadow: 0 20px 60px -24px #273d4b32, 0 3px 8px #212a3704;
}
.story-console-head, .trace-foot, .step-tag { border-color: var(--line); }
.trace-node { background: #ffffffbf; border-color: #dce2e9; }
.trace-icon { color: #555d6b; border-color: #bec5d0; }
.trace-dots i { background: #6d7480; }
.trace-line { background: #bec5d0; }
.trace-foot { background: #f7f9fb70; }
.story-top > .mono, .story-top p, .story-step .mono, .story-step p,
.step-tag, .story-console-head > .mono, .trace-node .mono, .trace-foot,
.story-caption { color: #4e5663; }
.step-number { color: #b33c18; }
.story-console[data-step="0"] .trace-buyer,
.story-console[data-step="1"] .trace-rules,
.story-console[data-step="2"] .trace-result {
  background: #fff0e9;
  border-color: #f9a185;
}
.story-console:is([data-state=stale], [data-state=unavailable]) .trace-result {
  background: #f5f7fa;
  border-color: #bec5d0;
}
/* Keep the stage emphasis and transforms, with readable inactive copy. */
.story-step { opacity: .95; }
.story-console[data-step="0"] .trace-rules,
.story-console[data-step="0"] .trace-result,
.story-console[data-step="1"] .trace-result,
.story-console:is([data-state=stale], [data-state=unavailable]) .trace-result,
.story-console[data-step="0"] .trace-foot { opacity: .95; }

/* Existing slate ink stays legible over the tinted page, including small copy. */
.muted, .fine-print, .intro-aside p:not(:first-child), .control-heading p,
.control-item p, .control-item > .mono, .method-note, .store-link > p,
.stores-heading > p, .pilot-intro > .mono, .pilot-intro > p:not(.fine-print),
.pilot-faq details > p, .closing-inner > .mono, .footer > p, .footer-note,
.hero-description, .hero-bottom > p, .section-index { color: #555d6b; }

/* Small labels need the same readable ink as the other secondary copy. */
.app-environment, .scenario-toolbar > p, .phase-caption > .mono, .phase-status,
.packet-meta, .condition-gate .mono, .outcome-slots > div:not([data-active=true]) b,
.outcome-receipt .mono, .outcome-receipt p, .receipt-price > span:first-child,
.receipt-price > span:last-child, .app-statusbar, .stores-heading .mono,
.store-number { color: #555d6b; }

@media (max-width: 700px) {
  /* The pinned card must screen the moving story copy underneath it. */
  .story-console { background: #fffffffa; }
  .story-console-wrap::before {
    content: "";
    position: absolute;
    inset: auto 0 -8px;
    height: 42px;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(transparent, var(--paper) 10px, var(--paper) calc(100% - 12px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 8px), transparent);
  }
  .aura-blob {
    left: -60vw;
    top: -42vh;
    width: 120vw;
    height: 84vh;
    filter: blur(14px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .aura-blob { will-change: auto; }
  .story-step, .story-console[data-step] .trace-node,
  .story-console[data-step] .trace-foot { opacity: 1; }
}
