/* Pierce the Shadow: the beginner's guide (Session 113). Loaded after site.css on /guide, /sl/vodnik and their library pages.
   Built from the reviewed draft (draft 12). Layout: one reading column; the sample dream on the left of a two-part
   "desk" (sticky on wide screens), the small questions on the right; library pages open in a side sheet. */
:root { --type: 'Courier Prime', 'Courier New', Courier, monospace; --radius: 14px; }
body.guide { background: var(--ground); color: var(--muted); font-family: var(--serif); font-size: 18px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
body.guide h1, body.guide h2, body.guide h3 { margin: 0; color: var(--ink); font-weight: 400; text-wrap: balance; line-height: 1.2; }
body.guide p { margin: 0; }
body.guide button { font: inherit; }
body.guide [hidden] { display: none !important; }
body.guide a { color: var(--purple); text-decoration-color: color-mix(in srgb, var(--purple) 35%, transparent); text-underline-offset: 3px; }
body.guide .nav a { text-decoration: none; }
body.guide .nav-links a.active { text-decoration: underline; text-decoration-color: var(--gold-bright); }
body.guide .nav-links a.pill-btn { color: #FFFDF8; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 4px; }
.lang-switch { font-size: 13px; letter-spacing: .06em; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; color: var(--muted) !important; background: var(--card); }
.lang-hint { background: var(--gold-soft); border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-soft); text-align: center; padding: 8px 16px; }
.guide-foot { padding-block: 36px 24px; font-size: 15px; color: var(--faint); }
.guide-foot .col { gap: 8px; }
footer.wrap .foot-sign { text-align: center; }

/* library pages, standalone (same look as the side sheet) */
.lib { padding-block: 40px 64px; }
.lib .col { gap: 16px; }
.crumbs { font-size: 14px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs a { color: var(--muted); }
.lib-page { display: grid; gap: 16px; }
.lib-page h1 { font-size: clamp(32px, 5vw, 42px); font-weight: 400; }
.lib-page p, .lib-page ul { color: var(--ink-soft); }
.lib-page ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.lib-page .src { font-size: 15px; color: var(--faint); }
.lib-next { background: var(--panel); border-radius: var(--radius); padding: 22px 24px; display: grid; gap: 10px; margin-top: 12px; }
.lib-next p { color: var(--ink-soft); }
.lib-index h1 { font-size: clamp(32px, 5vw, 42px); font-weight: 400; }
.lib-index .shelf section { padding-bottom: 14px; }
.sheet-body h1 { font-size: 32px; font-weight: 400; }

.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.col { max-width: 660px; margin: 0 auto; display: grid; gap: 20px; }


/* hero: the envelope */
.hero { padding-block: 56px 52px; background: linear-gradient(180deg, #F3E4F0 0%, #FAEEE6 45%, var(--ground) 100%); }
.hero .col { justify-items: center; text-align: center; gap: 22px; }
.envelope { width: min(260px, 70vw); aspect-ratio: 26 / 17; position: relative; perspective: 800px; }
.env-body { position: absolute; inset: 0; border-radius: 10px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.env-body::before, .env-body::after { content: ""; position: absolute; bottom: 0; width: 60%; height: 100%; background: var(--panel); opacity: .7; }
.env-body::before { left: 0; clip-path: polygon(0 0, 0 100%, 100% 100%); }
.env-body::after { right: 0; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 58%; transform-origin: top center; transition: transform .7s cubic-bezier(.3,.7,.3,1); z-index: 2; }
.env-flap::before { content: ""; position: absolute; inset: 0; background: #F4E3D4; clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 10px 10px 0 0; }
.seal { position: absolute; left: 50%; top: 52%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #9C6CCC, var(--purple-deep)); box-shadow: 0 2px 6px rgba(58,33,72,.3); z-index: 3; display: grid; place-items: center; transition: opacity .3s, transform .3s; }
.seal svg { width: 22px; height: 22px; }
.letter-peek { position: absolute; left: 10%; right: 10%; top: 14%; height: 70%; background: #fff; border-radius: 4px; box-shadow: 0 1px 4px rgba(58,33,72,.12); transition: transform .7s .25s cubic-bezier(.3,.7,.3,1); z-index: 1; padding: 14px; display: grid; gap: 6px; align-content: start; opacity: 0; }
.letter-peek i { display: block; height: 4px; border-radius: 2px; background: var(--line); }
.letter-peek i:nth-child(2) { width: 80%; } .letter-peek i:nth-child(3) { width: 92%; } .letter-peek i:nth-child(4) { width: 60%; }
.envelope.open .env-flap { transform: rotateX(180deg); z-index: 0; }
.envelope.open .seal { opacity: 0; transform: scale(.6); }
.envelope.open .letter-peek { opacity: 1; transform: translateY(-46%); }
.hero h1 { font-size: clamp(40px, 8vw, 64px); font-weight: 300; letter-spacing: -.01em; }
.lede { font-size: 21px; color: var(--ink-soft); max-width: 32ch; }
.quote { font-style: italic; color: var(--ink-soft); font-size: 17px; max-width: 40ch; }
.intro { font-size: 18px; color: var(--ink-soft); max-width: 40ch; }
.quote cite { display: block; font-style: normal; font-size: 14px; color: var(--faint); margin-top: 4px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 999px; font-size: 17px; text-decoration: none; border: 0; cursor: pointer; }
.btn.primary { background: var(--purple); color: #FFFDF8; }
.btn.primary:hover { background: var(--purple-deep); color: #FFFDF8; }
.btn.primary:disabled { background: var(--line); color: var(--faint); cursor: default; }
.btn.ghost { border: 1px solid var(--line); color: var(--ink); background: var(--card); }
.btn.ghost:hover { border-color: var(--gold-bright); }
.btn .spark { width: 18px; height: 18px; }
.quiet { color: var(--faint); font-size: 15px; }
.skip-row { text-align: center; padding-block: 8px 48px; }
.skip-row a { color: var(--muted); }

section.part { padding-block: 56px; border-top: 1px solid var(--line); }
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-label); }
section.part h2 { font-size: clamp(28px, 4.6vw, 38px); font-weight: 400; }

/* the desk: dream on the left (sticky on wide screens), the path of questions on the right */
.desk { max-width: 1060px; margin: 0 auto; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); position: relative; }
.story { display: grid; gap: 16px; align-content: start; min-width: 0; }
.before { font-size: 18px; color: var(--ink-soft); }
.before em { color: var(--ink); }
.dream { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; display: grid; gap: 14px; }
.dream-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 14px; color: var(--faint); }
.dream-head strong { color: var(--purple-deep); font-weight: 600; font-size: 24px; line-height: 1.25; letter-spacing: -0.01em; }
.dream-text { color: var(--ink); font-size: 20px; line-height: 1.8; font-style: italic; font-weight: 300; transition: color 1.2s; }
.dream-text mark { background: transparent; color: inherit; border-radius: 4px; padding: 1px 2px; margin: 0 -2px; transition: background-color .8s, box-shadow .8s, color 1.2s; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.dream-text mark.lit { background: color-mix(in srgb, var(--gold-bright) 22%, transparent); box-shadow: inset 0 -2px 0 var(--gold-bright); }
.dream-text mark.found { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--purple) 55%, transparent); }
/* the Aha: the noise fades, the parts that carry the message shine together */
.dream-text.clear { color: color-mix(in srgb, var(--ink) 30%, transparent); }
.dream-text.clear mark { color: var(--ink); background: color-mix(in srgb, var(--gold-bright) 26%, transparent); box-shadow: inset 0 -2px 0 var(--gold-bright); }
.dream-note { font-size: 15px; color: var(--faint); }
.guide-line { color: var(--ink-soft); }
.ask { display: grid; gap: 14px; justify-items: center; text-align: center; }

.path { display: grid; gap: 14px; align-content: start; min-width: 0; }
.big-q { font-size: clamp(26px, 3.6vw, 32px); color: var(--ink); line-height: 1.25; transition: color .8s, opacity .8s; }
.big-q.waiting { color: var(--faint); }
.path-note { color: var(--ink-soft); font-size: 17px; }
.answered { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.answered li button { width: 100%; text-align: left; background: none; border: 0; border-left: 2px solid var(--line); padding: 4px 0 4px 14px; cursor: pointer; display: grid; gap: 0; color: inherit; animation: pop .5s both; }
.answered li button:hover { border-left-color: var(--gold-bright); }
.answered .q { font-size: 15px; color: var(--faint); }
.answered .clue { font-size: 17px; color: var(--ink); }
.qcard { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--gold-bright); border-radius: 12px; box-shadow: var(--shadow); padding: 18px 20px 20px; display: grid; gap: 10px; animation: pop .5s cubic-bezier(.3,.8,.3,1.1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.qcard .kind { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-label); font-weight: 500; }
.qcard h3 { font-size: 23px; font-weight: 500; }
.qcard .quote-line { font-size: 15px; font-style: italic; color: var(--muted); border-left: 2px solid var(--gold-bright); padding-left: 10px; }
.qcard .voice { font-size: 13px; color: var(--faint); font-style: italic; }
.qcard .typed { font-family: var(--type); font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); min-height: 3.4em; }
.typed.caret::after { content: "\258C"; color: var(--purple); animation: blink 1s steps(1) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }
.qcard .foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; opacity: 0; transition: opacity .5s; }
.qcard .foot.show { opacity: 1; }
.qcard .more { font-size: 15px; }
.btn.small { padding: 9px 18px; font-size: 16px; }
.qbtn { justify-self: start; display: grid; gap: 2px; text-align: left; padding: 14px 20px; border-radius: 14px; border: 1px dashed var(--gold-bright); background: var(--gold-soft); color: var(--ink); cursor: pointer; animation: pop .5s both; }
.qbtn:hover { background: #F8E6C6; }
.qbtn .kind { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-label); }
.qbtn .q { font-size: 21px; }
.progress { display: flex; gap: 6px; }
.progress i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .4s; }
.progress i.on { background: var(--gold-bright); }

/* the Aha: scattered clues fall into place and become the message */
.aha { max-width: 720px; margin: 40px auto 0; background: #FFFEFB; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); padding: 34px 30px 30px; display: grid; gap: 18px; position: relative; overflow: hidden; scroll-margin-top: 90px; }
.aha::before { content: ""; position: absolute; inset: 10px; border: 1px solid color-mix(in srgb, var(--gold-bright) 30%, transparent); border-radius: 3px; pointer-events: none; }
.aha .kind { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--purple); text-align: center; }
.aha .big-again { text-align: center; font-size: clamp(24px, 3.4vw, 30px); color: var(--ink); }
.aha .echo { font-size: 17px; line-height: 1.75; text-align: left; padding: 4px 6px 14px; border-bottom: 1px dashed var(--line); }
.board { position: relative; display: grid; gap: 16px; min-height: 120px; }
.row { display: grid; gap: 8px; position: relative; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; transition: opacity .6s, max-height .8s; }
.chip { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-soft); font-size: 15.5px; line-height: 1.4; transition: transform 1.3s cubic-bezier(.2,.8,.2,1), filter 1.3s, opacity 1.3s, border-color .6s, background-color .6s; will-change: transform; }
.chip.noise { filter: blur(1.5px); opacity: .55; }
.chip.joined { border-color: var(--gold-bright); background: var(--gold-soft); color: var(--ink); }
.row .says { text-align: center; font-size: clamp(19px, 2.6vw, 22px); line-height: 1.45; color: var(--ink-soft); min-height: 0; }
.w { display: inline-block; opacity: 0; filter: blur(6px); transform: translateY(6px); animation: wordin 1s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes wordin { to { opacity: 1; filter: blur(0); transform: none; } }
.realize { position: relative; text-align: center; display: grid; gap: 8px; justify-items: center; border-top: 1px solid var(--line); padding-top: 22px; }
.realize .line { position: relative; font-size: clamp(30px, 5vw, 42px); line-height: 1.2; color: var(--ink); font-weight: 400; padding-bottom: 10px; }
.realize .line::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 0; height: 3px; border-radius: 2px; background: var(--gold-bright); transform: scaleX(0); transition: transform 1.2s cubic-bezier(.3,.7,.3,1); }
.realize.sealed .line::after { transform: scaleX(1); }
.row.done .chips { opacity: 0; max-height: 0; overflow: hidden; }
.flash { position: absolute; inset: -60px -20px; pointer-events: none; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--gold-bright) 55%, transparent), transparent 60%); opacity: 0; }
.flash.go { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.choice { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.choice .typed { font-size: clamp(19px, 2.8vw, 23px); line-height: 1.4; color: var(--ink); font-weight: 300; max-width: 30ch; min-height: 2.8em; }
.choice .after { font-size: 16.5px; color: var(--ink-soft); max-width: 50ch; opacity: 0; transition: opacity .8s; text-align: left; display: grid; gap: 12px; }
.choice .after.show { opacity: 1; }
.road { width: 100%; max-width: 420px; height: 40px; }
.again-row { max-width: 660px; margin: 30px auto 0; display: grid; justify-items: center; gap: 10px; text-align: center; }

/* thread through time */
.thread { display: grid; gap: 14px; }
.track { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding-top: 22px; }
.track::before { content: ""; position: absolute; left: 10%; right: 10%; top: 31px; height: 2px; background: linear-gradient(90deg, var(--line), var(--gold-bright)); }
.stop { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; background: none; border: 0; cursor: pointer; padding: 0; color: inherit; }
.stop .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--card); border: 2px solid var(--gold-bright); z-index: 1; transition: transform .2s; }
.stop.now .dot { background: var(--purple); border-color: var(--purple); }
.stop[aria-pressed="true"] .dot { transform: scale(1.3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold-bright) 30%, transparent); }
.stop time { font-size: 13px; color: var(--gold-label); font-variant-numeric: tabular-nums; }
.stop-text { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 16px; color: var(--ink-soft); min-height: 4.6em; }

/* your turn */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 14px; }
.steps li::before { content: counter(s); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--purple-soft); color: var(--purple-deep); font-weight: 500; font-size: 16px; }
.steps strong { color: var(--ink); font-weight: 500; }
.cta { background: var(--panel); border-radius: var(--radius); padding: 30px 28px; display: grid; gap: 14px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.before mark { background: transparent; color: inherit; border-radius: 4px; padding: 1px 2px; margin: 0 -2px; transition: background-color .8s, box-shadow .8s; }
.before mark.lit { background: color-mix(in srgb, var(--gold-bright) 22%, transparent); box-shadow: inset 0 -2px 0 var(--gold-bright); }
.before mark.found { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--purple) 55%, transparent); }
.before { transition: color 1.2s; }
.before.clear-before { color: color-mix(in srgb, var(--ink-soft) 40%, transparent); }
.before.clear-before mark { background: color-mix(in srgb, var(--gold-bright) 26%, transparent); box-shadow: inset 0 -2px 0 var(--gold-bright); }
.answered li { border-left: 2px solid var(--gold-bright); animation: pop .5s both; }
.answered .head { width: 100%; text-align: left; background: none; border: 0; padding: 2px 0 2px 14px; display: grid; cursor: pointer; color: inherit; font: inherit; }
.answered .head:hover .clue, .answered li.open .clue { color: var(--purple-deep); }
.answered .head .clue::after { content: " +"; color: var(--faint); }
.answered li.open .head .clue::after { content: " \2212"; }
.answered .full { padding: 4px 0 10px 14px; display: grid; gap: 8px; animation: pop .4s both; }
.answered .full .quote-line { font-size: 15px; font-style: italic; color: var(--muted); border-left: 2px solid var(--gold-bright); padding-left: 10px; }
.answered .full .typed { font-family: var(--type); font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.answered .full a { font-size: 15px; }
.answered li.flash-li { animation: glowli 1.2s ease-out; }
@keyframes glowli { 0% { background: color-mix(in srgb, var(--gold-bright) 30%, transparent); } 100% { background: transparent; } }
mark.found { cursor: pointer; }
mark.found:hover, mark.peek { background: color-mix(in srgb, var(--purple) 12%, transparent); }

@media (min-width: 980px) {
  .desk { grid-template-columns: minmax(0, 540px) minmax(0, 1fr); column-gap: 48px; }
  .story { position: sticky; top: 76px; align-self: start; }
  .desk.solo { grid-template-columns: minmax(0, 660px); justify-content: center; }
}
.story { view-transition-name: story; }
@media (min-width: 980px) {
}

/* side sheet */
.scrim { position: fixed; inset: 0; background: rgba(58, 33, 72, .28); z-index: 20; opacity: 0; transition: opacity .25s; }
.scrim.show { opacity: 1; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--ground); z-index: 21; box-shadow: -20px 0 50px -20px rgba(58,33,72,.35); display: grid; grid-template-rows: auto minmax(0, 1fr); transform: translateX(100%); transition: transform .3s cubic-bezier(.3,.7,.3,1); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); }
.sheet.show { transform: none; }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
.sheet-bar button { background: none; border: 0; cursor: pointer; color: var(--purple); padding: 6px 4px; font-size: 15px; }
.sheet-bar .close { color: var(--ink); }
.sheet-body { overflow-y: auto; padding: 26px 24px 48px; display: grid; gap: 16px; align-content: start; }
.sheet-body h2 { font-size: 32px; font-weight: 400; }
.sheet-body .eyebrow { margin-bottom: -6px; }
.sheet-body p { color: var(--ink-soft); }
.sheet-body ul { margin: 0; padding-left: 20px; color: var(--ink-soft); display: grid; gap: 6px; }
.sheet-body .src { font-size: 15px; color: var(--faint); }
.related { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.related a { font-size: 15px; padding: 4px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); text-decoration: none; }
.shelf { display: grid; gap: 18px; }
.shelf section { background: var(--panel); border-radius: 12px; padding: 18px 18px 8px; display: grid; gap: 4px; }
.shelf h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-label); font-weight: 500; }
.shelf .blurb { font-size: 15.5px; color: var(--ink-soft); margin-bottom: 8px; line-height: 1.5; }
.shelf ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.shelf li a { display: grid; gap: 1px; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; }
.shelf li a strong { color: var(--purple); font-weight: 500; font-size: 17px; }
.shelf li a strong::after { content: " \2192"; color: var(--faint); font-weight: 400; }
.shelf li a span { color: var(--muted); font-size: 15px; line-height: 1.5; }
.shelf li a:hover strong { color: var(--purple-deep); }
.shelf details summary { cursor: pointer; color: var(--purple); font-size: 15px; padding: 8px 0; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.shelf .shelf-h { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-label); font-weight: 500; }
.lib-next .btn.small { padding: 9px 18px; font-size: 16px; }
.lib-next p:last-child { display: flex; flex-wrap: wrap; gap: 10px; }
/* above the site's sticky nav (z-index 50) */
.scrim { z-index: 60; }
.sheet { z-index: 61; }
