@font-face { font-family: "Staking Montserrat"; src: url("../fonts/staking-montserrat-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
/* Staking scene: the portal's own material. A black page, one accent (the portal's APR teal), Montserrat for the one redraw.
   This file carries every staking rule; the older .sk rules in story.css are no longer needed. One motion idea: state on the root. */
.sk { --acc: #82cfc9; background: #000; color: #f2f2f4; }
.story:has(.sk), .story:has(.sk) .story-scene, .story:has(.sk) .story-line, .story:has(.sk) .story-prog { background: #000; color: #f2f2f4; }
.story:has(.sk) .story-hint { background: #000; color: #9a9aa3; }

/* the layers: one shows per beat; the stake panel stays for the last beat */
.sk .sk-layer { position: absolute; inset: 0; display: block; padding: 0; opacity: 0; transform: translateY(14px); visibility: hidden; pointer-events: none;
  transition: transform 420ms var(--ease), opacity 420ms var(--ease), visibility 0s linear 420ms; }
.story[data-layer="map"] .sk-map, .story[data-layer="list"] .sk-list, .story[data-layer="panel"] .sk-panel, .story[data-layer="done"] .sk-panel,
.story[data-layer="editor"] .sk-editor { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.story[data-layer="map"] .sk-map { pointer-events: auto; }

/* 1. Our drawing of the user flow (from the journey board): lanes that line up, calm cards, diamonds for decisions,
   dashed loops for failures. One accent. Pick a path to close in on its lane. */
.sk .sk-map { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; padding: 0 3%; }
.story[data-layer="map"] .sk-map { pointer-events: auto; }
.sk-steps { display: none; width: 100%; padding: 0 1rem; }
.sk-steps ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .25rem; font-size: .9rem; max-height: 46vh; overflow: auto; }
@media (max-width: 640px) { .sk-view { display: none; } .sk-steps { display: block; } .sk-map { justify-content: flex-start; padding-top: .5rem; } .sk-chip { min-height: 44px; padding: 0 .8rem; } .sk-steps ol { max-height: 34vh; list-style: decimal; } }


.sk-view { position: relative; width: 100%; aspect-ratio: 1400 / 760; overflow: hidden; container-type: inline-size; }
.sk-flow { position: absolute; inset: 0; transform-origin: 0 0; transition: transform 420ms var(--ease); }
.sk-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sk-wire { fill: none; stroke: #4a4a54; stroke-width: 1.5; vector-effect: non-scaling-stroke; transition: stroke 420ms var(--ease), opacity 420ms var(--ease); }
.sk-wire.sk-fail { stroke-dasharray: 4 4; }
.sk-dia { fill: #0c0c0f; stroke: var(--acc); stroke-width: 1.5; vector-effect: non-scaling-stroke; transition: opacity 420ms var(--ease); }
.sk-dl { position: absolute; width: 11%; transform: translate(-50%, -100%); text-align: center; font-size: 1cqw; line-height: 1.15; color: #c9c9d0; transition: opacity 420ms var(--ease); }
.sk-band { position: absolute; border: 1px solid #1d1d23; border-radius: 14px; background: #101014; transition: opacity 420ms var(--ease), border-color 420ms var(--ease); }
.sk-lane { position: absolute; left: .8cqw; top: .5cqw; min-height: 0; padding: .2cqw .6cqw; border: 0; background: none; color: #7d7d88; font: inherit; font-size: 1cqw; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.sk-flow[data-branch="stake"] .sk-band[data-b="stake"], .sk-flow[data-branch="unstake"] .sk-band[data-b="unstake"], .sk-flow[data-branch="withdraw"] .sk-band[data-b="withdraw"] { border-color: #2a4a44; }
.sk-flow[data-branch="stake"] .sk-band[data-b="stake"] .sk-lane, .sk-flow[data-branch="unstake"] .sk-band[data-b="unstake"] .sk-lane, .sk-flow[data-branch="withdraw"] .sk-band[data-b="withdraw"] .sk-lane { color: var(--acc); }
.sk-n { position: absolute; transform: translate(-50%, -50%); width: 10%; height: 7.4%; display: grid; place-content: center; padding: 0 .4cqw; box-sizing: border-box; text-align: center; font-size: 1.1cqw; line-height: 1.05; color: #f2f2f4; background: #17171c; border: 1px solid #30303a; border-radius: 999px; transition: opacity 420ms var(--ease); }
.sk-n.sk-ok { background: #12302a; border-color: var(--acc); }
.sk-n.sk-bad { background: none; border: 1px dashed #5c5c66; color: #a9a9b2; }
.sk-n.sk-quiet { color: #8e8e99; background: none; border-color: #26262c; }
.sk-start { position: absolute; transform: translateX(-50%); color: var(--acc); font-size: 1cqw; letter-spacing: .1em; text-transform: uppercase; }
.sk-flow[data-branch="stake"] :is(.sk-n, .sk-dl, .sk-dia, .sk-wire, .sk-band):not([data-b~="stake"]), .sk-flow[data-branch="unstake"] :is(.sk-n, .sk-dl, .sk-dia, .sk-wire, .sk-band):not([data-b~="unstake"]), .sk-flow[data-branch="withdraw"] :is(.sk-n, .sk-dl, .sk-dia, .sk-wire, .sk-band):not([data-b~="withdraw"]) { opacity: .07; }
.sk-flow[data-branch="stake"] .sk-wire[data-b~="stake"], .sk-flow[data-branch="unstake"] .sk-wire[data-b~="unstake"], .sk-flow[data-branch="withdraw"] .sk-wire[data-b~="withdraw"] { stroke: var(--acc); stroke-width: 2; }
@media (prefers-reduced-motion: reduce) { .sk-flow, .sk-wire, .sk-dia, .sk-n, .sk-dl, .sk-band { transition: none; } }

.sk-view { -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.sk-lines { display: grid; gap: .15rem; }

.sk-view { cursor: zoom-in; }
.sk-flow[data-branch="all"] .sk-n, .sk-flow[data-branch="all"] .sk-band { cursor: pointer; }
.sk-flow[data-branch="stake"], .sk-flow[data-branch="unstake"], .sk-flow[data-branch="withdraw"] { cursor: zoom-out; }

/* The path buttons and the walk's Back and Next step are the site's own buttons, docked in the step row beside the story's dots,
   only while the board shows; Back and Next step only while a path is picked. */
.sk-chips-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-left: auto; }
.story:not([data-layer="map"]) .sk-chips-row { display: none; }
.sk-chips-row .btn { min-height: 40px; width: auto; padding: 0 12px; font-size: 12px; white-space: nowrap; }
.sk-chips-row .btn[aria-pressed="true"] { --f: var(--accent); --fill: var(--sel); color: var(--accent); }

/* 4. The build: the real editor on the left, the redrawn result on the right; on a narrow stage, the result sits below */
.sk .sk-editor { container-type: size; }
.sk .sk-edshot { right: 40%; }
.sk .sk-res { position: absolute; right: 5%; top: 50%; width: 31%; box-sizing: border-box; display: grid; gap: .9rem; padding: 1.1rem 1.2rem;
  background: #171717; border: 1px solid #2c2c31; border-radius: 14px;
  font-family: "Staking Montserrat", Montserrat, system-ui, sans-serif; font-weight: 500; font-synthesis: none;
  opacity: 0; transform: translateY(calc(-50% + 18px)); transition-delay: 120ms; }
.story[data-layer="editor"] .sk-res { opacity: 1; transform: translateY(-50%); }
.sk-res-tip { position: relative; justify-self: start; padding: .55rem .8rem; border: 1px solid var(--acc); border-radius: 6px; background: #252525; color: #ececef;
  font-size: clamp(.8rem, 2.2cqw, 1rem); line-height: 1.3; }
.sk-res-tip::after { content: ""; position: absolute; left: 1.4rem; bottom: -6px; width: 10px; height: 10px; background: #252525; border: solid var(--acc);
  border-width: 0 1px 1px 0; transform: rotate(45deg); }
.sk-res-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: clamp(.85rem, 2.4cqw, 1.05rem); color: #b8bec3; }
.sk-res-row b { color: #fff; font-weight: 500; }
.sk-field { text-decoration: underline dotted var(--acc); text-underline-offset: 4px; }
@container (max-width: 560px) {
  .sk .sk-edshot { right: 0; bottom: 36%; }
  .sk .sk-res { left: 6%; right: 6%; width: auto; top: auto; bottom: 5%; transform: translateY(18px); }
  .story[data-layer="editor"] .sk-res { transform: none; }
}

/* 5. The result over the stake panel: the panel steps back, the figure stands large in the accent */
.sk-panel .story-shot img { transition: transform 700ms var(--ease), filter 420ms var(--ease); }
.story[data-layer="done"] .sk-panel .story-shot img { filter: brightness(.28) blur(2px); }
.sk .sk-stat { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .2rem; container-type: inline-size;
  font-family: "Staking Montserrat", Montserrat, system-ui, sans-serif; font-weight: 500; font-synthesis: none; text-align: center;
  opacity: 0; transform: translateY(14px); transition: opacity 420ms var(--ease), transform 420ms var(--ease); pointer-events: none; }
.story[data-layer="done"] .sk-stat { opacity: 1; transform: none; transition-delay: 120ms; }
.sk-stat b { font-size: clamp(4.5rem, 24cqw, 12rem); line-height: .9; letter-spacing: -.03em; color: var(--acc); font-weight: 500; }
.sk-stat small, .sk-stat span { font-size: clamp(.9rem, 2.6cqw, 1.25rem); color: #d8d8de; }

@media (prefers-reduced-motion: reduce) { .sk .sk-layer, .sk .sk-res, .sk .sk-stat, .sk-panel .story-shot img { transition: none; } }
