/* /exemplu: guided demo of the real screens. Tokens from explicat.css; boxes and facts card from cases.css; account/paper classes from site.css. */
.demo { display: grid; gap: 18px; padding-bottom: 96px }
.demo-head { display: grid; gap: 8px; padding-top: 20px; max-width: 46rem }
.demo-head h1 { font-size: clamp(1.8rem, 4.6vw, 2.8rem) }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px 28px; align-items: start; grid-template-areas: "stage narr" }
.demo-grid .stage { grid-area: stage; min-width: 0 }
.demo-grid .narr-box { grid-area: narr; position: sticky; top: 12px }
@media (max-width: 900px) { .demo-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "narr" "stage" } .demo-grid .narr-box { position: static } }

.narr-box { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 12px }
.steps-ind { display: flex; gap: 6px; flex-wrap: wrap }
.sdot { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 10px 4px 5px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 600 .85rem var(--body); cursor: pointer }
.sdot .k { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink); font-size: .8rem }
.sdot[aria-current="step"] { background: var(--ink); color: var(--linen); border-color: var(--ink) }
.sdot[aria-current="step"] .k { background: var(--red); color: #fff }
@media (max-width: 900px) { .sdot .lbl { display: none } .sdot { padding: 4px; min-width: 44px; justify-content: center } .steps-ind { justify-content: space-between } }
.narr-item { display: none } .narr-item.on { display: block }
.narr-item h2 { font-size: 1.15rem; margin-bottom: 4px }
.narr-item p { font-size: 1rem; color: var(--ink) }
.story-switch .btn { font-size: .95rem; min-height: 48px }

.dstep { display: grid; gap: 16px; min-width: 0 }
.demo [data-v] { display: none } .demo [data-v].on { display: block }
.demo-q, .demo-up .cbox { max-width: 34rem }
.demo-up { display: block }
.demo-up .demo-letter { width: 100%; margin-top: 10px; text-align: left }
.demo-up .demo-letter .paper { max-width: 100%; font-size: 12px; padding: 22px 24px; box-shadow: none; border: 1px solid var(--line) }
.demo-letterview .paper { max-width: 640px }
.demo .thumbs { justify-content: center }
.demo .thumb { width: 84px }
.demo .demo-reading, .demo .demo-paid { margin: 24px 0 }
.demo-checkout { max-width: 34rem; margin: 0 }
.demo-checkout input[readonly] { background: var(--linen) }
.demo .acct { margin-top: 0 }
.demo .acct-title { font-size: 1.35rem }
.demo .btnstack { display: grid; gap: 8px }
.demo .acct-bar { justify-content: space-between }
.demo .pages, .demo .pack { margin-top: 0 }
.demo .case3 { margin: 0 }
.demo-fine { max-width: 46rem }

.demo-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 10px; justify-content: center; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--linen); border-top: 1px solid var(--line) }
.demo-nav .btn { width: auto; flex: 1 1 0; max-width: 220px; min-height: 52px }
.demo-nav .btn[disabled] { opacity: .35 }
.demo-head .tag { justify-self: start }
.demo .pagesbox { display: grid; gap: 8px; margin-top: 18px }
.demo .pagesbox .top { display: flex; justify-content: space-between; font-size: .95rem }
