/* A session: the path, the questions at its end, the player (forest, with the breathing bloom) and the mini bar. */

.session { gap: 1.5rem; padding-top: 1rem; }
.session.with-lab { max-width: 1120px; }
@media (min-width: 980px) {
  .session.with-lab { grid-template-columns: minmax(0, var(--col)) minmax(280px, 1fr); gap: 3rem; align-items: start; }
  .session.with-lab > aside { position: sticky; top: 84px; max-height: calc(100dvh - 104px); overflow-y: auto; padding-right: .25rem; }
}
.session > aside { border-top: 1px solid var(--border2); padding-top: 1.5rem; }
@media (min-width: 980px) { .session.with-lab > aside { border-top: 0; padding-top: 0; } }
.s-main { display: grid; gap: 1.75rem; min-width: 0; }
.s-head { display: grid; gap: 1rem; }
.s-photo { width: 100%; aspect-ratio: 5 / 2; object-fit: cover; border-radius: var(--r-lg); }
.s-bar { display: flex; align-items: flex-start; gap: .25rem; margin-left: -.75rem; margin-right: -.5rem; }
.s-titles { display: grid; gap: .5rem; padding-top: .3rem; }
.s-titles h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 2.75rem); overflow-wrap: anywhere; }
.s-titles p { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.s-titles svg { width: 14px; height: 14px; }
.s-titles .link { min-height: 0; }
.s-mark { width: 40px; height: 40px; margin: .125rem .25rem 0; border-radius: 23%; overflow: hidden; flex: none; }
.s-mark svg { width: 100%; height: 100%; }

/* ─── The path: a rail down the left, a mark at each stop. The stop that is live is the bloom. ── */
.path { display: grid; }
.stop { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: .875rem; padding-bottom: 1.75rem; }
.stop::before { content: ""; position: absolute; left: 9.5px; top: 0; bottom: 0; width: 1px; background: var(--border2); }
.stop.first::before { top: 10px; }
#tail > .stop::before { bottom: auto; height: 10px; }
#tail > .stop { padding-bottom: 0; }
.path > .stop.end::before, .aside .path > .stop:last-child::before { bottom: auto; height: 10px; }
.stop-dot { position: relative; z-index: 1; width: 9px; height: 9px; margin: 6px 0 0 5.5px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 4px var(--bg); border: var(--stroke) solid var(--muted); }
.stop.part > .stop-dot { background: var(--fg); border-color: var(--fg); width: 11px; height: 11px; margin: 5px 0 0 4.5px; }
.stop.fork > .stop-dot { border-radius: 2px; transform: rotate(45deg); }
.stop.end > .stop-dot { border-radius: 2px; background: var(--muted); }
.stop.word > .stop-dot { border-color: var(--border2); }
.stop.now > .stop-dot, .stop.writing > .stop-dot, .stop.part.playing > .stop-dot {
  width: 20px; height: 20px; margin: 1px 0 0; border: 0; border-radius: 0; box-shadow: none; transform: none; background: var(--bloom);
  -webkit-mask: var(--bloom-mask) center / contain no-repeat; mask: var(--bloom-mask) center / contain no-repeat;
}
.stop-body { min-width: 0; display: grid; gap: .5rem; align-content: start; }

.first-text { font-size: 1.0625rem; line-height: 1.45; color: var(--fg2); overflow-wrap: anywhere; }
.first-photos { display: flex; gap: .5rem; flex-wrap: wrap; }
.first-photos img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); }

/* A part */
.part-top { display: flex; align-items: flex-start; gap: .5rem; }
.part-head { flex: 1; min-width: 0; display: grid; gap: .1875rem; justify-items: start; padding: 0 0 .25rem; border-radius: var(--r-sm); }
.part-title { font-size: 1.375rem; font-weight: 800; letter-spacing: -.045em; line-height: 1.05; }
.part-gist { color: var(--fg2); font-size: .9375rem; line-height: 1.35; }
.part-foot { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .625rem; margin-top: .25rem; }
.part-foot:empty { display: none; }
.part-read { display: inline-flex; align-items: center; gap: .125rem; color: var(--muted); min-height: 24px; }
.part-read svg { width: 14px; height: 14px; transition: transform .2s; }
.part-head[aria-expanded="true"] .part-read svg { transform: rotate(180deg); }
.part-head:hover .part-read { color: var(--fg); }
.part-head .status { min-height: 24px; }
.part-play { border: var(--stroke) solid var(--line); margin-top: -2px; color: var(--fg); }
.part-play svg { width: 18px; height: 18px; margin-left: 1px; }
.playing .part-play { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.passages { display: grid; gap: 1.25rem; padding: .875rem 0 .25rem; border-top: 1px solid var(--border); margin-top: .25rem; }
.passage { display: grid; gap: .375rem; }
.passage .prose { color: var(--fg2); font-size: .9375rem; line-height: 1.55; }
.passage.now .prose { color: var(--fg); }
.passage.now { border-left: 2px solid var(--accent); padding-left: .75rem; margin-left: calc(-.75rem - 2px); }
.pass-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .875rem; }
.pass-play { display: inline-flex; align-items: center; gap: .25rem; min-height: 32px; color: var(--fg); font-weight: 700; position: relative; }
.pass-play::after { content: ""; position: absolute; inset: -6px -4px; }
.pass-play svg { width: 13px; height: 13px; }
.woven { border-left: 2px solid var(--border2); padding: .125rem 0 .125rem .75rem; display: grid; gap: .25rem; margin-top: .25rem; }
.woven-head { display: flex; align-items: center; gap: .375rem; font-size: .8125rem; font-weight: 600; color: var(--fg2); }
.woven-head svg { width: 14px; height: 14px; flex: none; }
.woven .prose { font-size: .875rem; line-height: 1.5; color: var(--fg2); }

/* A fork: the questions, what was picked, and the roads not taken */
.fork-note { color: var(--fg2); font-size: .9375rem; }
.fq { display: grid; gap: .375rem; }
.fq-text { font-size: .875rem; font-weight: 500; color: var(--fg2); }
.fq-opts { display: flex; flex-wrap: wrap; gap: .25rem .375rem; }
.fq-opts li { display: inline-flex; align-items: center; gap: .25rem; min-height: 28px; padding: 0 .625rem; border-radius: var(--pill); font-size: .8125rem; font-weight: 500; }
.fq-opts .picked { background: var(--primary); color: var(--primary-fg); font-weight: 700; padding-left: .4375rem; }
.fq-opts .unpicked { color: var(--muted); border: 1px dashed var(--border2); }
/* At a glance: what was picked, quietly. */
.fq-opts.glance .picked { background: none; color: var(--fg); border: var(--stroke) solid var(--border2); padding: 0 .625rem; font-weight: 600; }
.fork-more { justify-self: start; }
.fork-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.fork-more:hover { color: var(--fg); }
.fork-full { display: grid; gap: .5rem; padding: .75rem 0 .25rem; border-top: 1px solid var(--border); }
.stop.fork .first-photos img { width: 56px; height: 56px; }
.fq-check { display: inline-flex; }
.fq-check svg { width: 14px; height: 14px; stroke-width: 2.25; }
.fq-rec { font-size: .6875rem; font-weight: 400; margin-left: .125rem; opacity: .75; }
.fq-own { font-size: .9375rem; color: var(--fg2); overflow-wrap: anywhere; }
.fq-skip { font-size: .8125rem; color: var(--muted); }
.fq-scale { display: flex; align-items: center; gap: .5rem; font-size: .875rem; flex-wrap: wrap; }
.fq-pips { display: inline-flex; gap: 3px; }
.fq-pips i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--border2); }
.fq-pips i.on { background: var(--fg); border-color: var(--fg); }
.fork-change { justify-self: start; color: var(--fg2); min-height: 32px; }
.went-back { display: grid; gap: .125rem; justify-items: start; color: var(--fg2); padding-top: .125rem; }
.went-back > p { display: flex; align-items: center; gap: .375rem; }
.went-back svg { width: 14px; height: 14px; flex: none; }
.went-back .link { min-height: 32px; color: var(--fg2); }
.aside { justify-self: stretch; border: var(--stroke) dashed var(--border2); border-radius: var(--r); padding: 1rem 1rem 0; display: grid; gap: .625rem; margin-top: .25rem; opacity: .85; }
.aside > .fq:last-child, .aside > p:last-child { margin-bottom: 1rem; }
.aside .path { margin-top: .5rem; }
.aside .part-title { font-size: 1.0625rem; }
.aside .stop-dot { box-shadow: none; }

/* The end of the path */
.care { display: grid; gap: .875rem; border: var(--stroke) solid var(--line); border-radius: var(--r-lg); padding: 1.375rem; }
.care-list { display: grid; gap: .625rem; }
.care-list li { display: grid; }
.resume { display: flex; align-items: center; gap: .75rem; padding: .875rem 1rem; flex-wrap: wrap; border-radius: var(--r); }
.how-was { display: grid; gap: .625rem; justify-items: start; }
.how-was form { width: 100%; }
.end-acts { padding-top: .5rem; gap: .5rem; }
.end-done { margin-top: 1rem; }

/* ─── The questions ── */
.ask { display: grid; gap: 1.75rem; }
.ask > * { min-width: 0; }
.ask-note { font-size: 1.0625rem; line-height: 1.45; }
.q { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: .625rem; }
.q legend { padding: 0; font-weight: 800; font-size: 1.5rem; letter-spacing: -.045em; line-height: 1.05; margin-bottom: .625rem; float: left; width: 100%; text-wrap: balance; }
.q-help { color: var(--fg2); font-size: .875rem; margin-top: -.375rem; clear: both; }
.q > .opts, .q > .scale, .q > .textarea { clear: both; }
/* A dial: a hairline track, and the bloom for a thumb. */
.scale { display: grid; gap: .25rem; padding-top: .25rem; }
.scale input { width: 100%; height: 44px; margin: 0; background: none; appearance: none; -webkit-appearance: none; cursor: pointer; }
.scale input::-webkit-slider-runnable-track { height: 1.5px; background: var(--line); }
.scale input::-moz-range-track { height: 1.5px; background: var(--line); }
.scale input::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -14.25px; border: 0; border-radius: 0; background: var(--bloom); -webkit-mask: var(--bloom-mask) center / contain no-repeat; mask: var(--bloom-mask) center / contain no-repeat; }
.scale input::-moz-range-thumb { width: 30px; height: 30px; border: 0; border-radius: 0; background: var(--bloom); mask: var(--bloom-mask) center / contain no-repeat; }
.scale.untouched input::-webkit-slider-thumb { background: var(--faint); }
.scale.untouched input::-moz-range-thumb { background: var(--faint); }
.scale input:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.scale-ends { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: start; }
.scale-ends span:last-child { text-align: right; }
.scale-now { color: var(--fg); font-weight: 700; }
.scale.untouched .scale-now { color: var(--muted); font-weight: 500; }
.ask-extras { display: grid; gap: .75rem; padding-top: 1.5rem; border-top: 1px solid var(--border2); }
.ask-len { display: grid; gap: .5rem; justify-items: start; }
.ask-len .seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; overflow: visible; }
.ask-len .seg button { padding: 0 .25rem; font-size: .875rem; }
.ask-extras .btn.sm { color: var(--fg2); padding-left: .5rem; margin-left: -.5rem; }
.ask-extras .btn.sm svg { width: 16px; height: 16px; }
.ask-go { display: grid; gap: .375rem; }

/* ─── The player: full screen, forest, quiet ── */
.focus { position: fixed; inset: 0; z-index: 40; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto auto; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); animation: fade .5s ease; }
.focus::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(var(--grid), var(--grid)) 50% 0 / 1px 100% no-repeat, linear-gradient(var(--grid), var(--grid)) 0 50% / 100% 1px no-repeat; }
.focus > * { position: relative; width: min(100%, 700px); margin-inline: auto; padding-inline: var(--pad); }
.f-top { display: flex; align-items: center; gap: .5rem; min-height: 60px; padding-inline: .5rem; }
.f-head { flex: 1; min-width: 0; display: grid; justify-items: center; text-align: center; gap: 1px; }
.f-head .label { color: var(--fg2); }
.f-name { font-size: 1rem; font-weight: 700; letter-spacing: -.03em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-top-end { width: 44px; }
.f-stage { overflow-y: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%); }
.f-stage::-webkit-scrollbar { display: none; }
.f-text { padding: 14vh 0 50vh; display: grid; gap: 1.75rem; position: relative; }
.f-pass { font-size: clamp(1.375rem, 1.15rem + 1.3vw, 1.75rem); line-height: 1.24; letter-spacing: -.035em; font-weight: 600; transition: opacity 1s ease; text-wrap: pretty; }
.f-pass p + p { margin-top: .7em; }
.f-pass.past { opacity: .22; }
/* What the voice is not saying just now steps back: a passage in its silence, an aside once it has been said. */
.focus[data-phase="quiet"] .f-pass.cur, .focus[data-phase="ended"] .f-pass.cur, .focus[data-phase^="extra"] .f-pass.cur, .focus.paused .f-pass.cur, .f-extra.cur { opacity: .42; }
.focus[data-phase^="extra"]:not(.paused) .f-extra.now { opacity: 1; }
.f-extra { border-left: 2px solid var(--accent); padding-left: 1rem; font-size: clamp(1.1875rem, 1rem + 1vw, 1.5rem); display: grid; gap: .5rem; }
.f-extra .label { font-size: .8125rem; letter-spacing: -.01em; color: var(--fg2); }
.f-wait { justify-content: center; }
.caret { display: inline-block; width: .5em; height: .5em; background: var(--accent); -webkit-mask: var(--bloom-mask) center / contain no-repeat; mask: var(--bloom-mask) center / contain no-repeat; margin-left: .3em; animation: pulse 2.4s var(--ease-breath) infinite; vertical-align: baseline; }
/* The bloom: small and still while the voice speaks, open and breathing through a silence (the
   seconds left stand in it). When the part has ended it is the button that moves on. */
.f-bloom { height: 148px; display: grid; place-items: center; }
.f-bloom-in { position: relative; width: 64px; height: 64px; display: grid; place-items: center; transition: width 1.6s var(--ease-breath), height 1.6s var(--ease-breath), opacity .6s ease, transform .6s ease; }
.f-bloom-in .bloom { width: 100%; height: 100%; color: #EDE84A; }
.focus[data-phase="quiet"] .f-bloom-in { width: 128px; height: 128px; }
.focus[data-phase="ended"] .f-bloom-in { width: 132px; height: 132px; cursor: pointer; }
.focus[data-phase="ended"] .f-bloom-in:active { transform: scale(.96); }
.f-bloom-in:disabled { cursor: default; }
.f-bloom-in:focus-visible { outline: 0; }
.f-bloom-in:focus-visible .f-on { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.f-on { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.0625rem; font-weight: 800; letter-spacing: -.04em; color: #12402C; opacity: 0; transition: opacity .4s ease; }
.focus[data-phase="ended"] .f-on { opacity: 1; transition: opacity .9s ease .7s; }
.focus.paused .f-bloom-in { opacity: .6; }
.f-left { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.375rem; font-weight: 800; letter-spacing: -.05em; color: #12402C; opacity: 0; transition: opacity .8s ease; }
.focus[data-phase="quiet"] .f-left { opacity: 1; }
.f-quiet { min-height: 52px; display: grid; justify-items: center; align-content: start; gap: .5rem; text-align: center; }
.f-cue { font-size: 1.25rem; font-weight: 700; letter-spacing: -.04em; line-height: 1.08; max-width: 22ch; text-wrap: balance; }
.f-how { display: grid; gap: .5rem; justify-items: center; }
.f-end { color: var(--fg2); font-weight: 500; }
.f-ctl { display: flex; justify-content: center; align-items: center; gap: 1.75rem; padding-block: .5rem; }
.f-ctl .icon-btn { width: 48px; height: 48px; }
.f-ctl .icon-btn svg { width: 24px; height: 24px; }
.f-play { width: 64px; height: 64px; border-radius: 50%; border: var(--stroke) solid var(--line); color: var(--fg); display: grid; place-items: center; transition: transform .2s, background .2s; }
.f-play:hover { background: var(--surface2); }
.f-play:active { transform: scale(.96); }
.f-play svg { width: 26px; height: 26px; }
.f-acts { min-height: 64px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .25rem .5rem; padding-block: .25rem .75rem; }
.f-act { min-height: 44px; padding: 0 1rem; border-radius: var(--pill); color: var(--fg2); font-size: .9375rem; font-weight: 600; letter-spacing: -.02em; border: var(--stroke) solid transparent; transition: background .2s, color .2s; }
.f-act:hover { background: var(--surface2); color: var(--fg); }
.f-act.big { border-color: var(--line); color: var(--fg); padding: 0 1.25rem; font-weight: 700; animation: rise .8s ease both; }
@media (max-height: 700px) { .f-bloom { height: 112px; } .focus[data-phase="quiet"] .f-bloom-in { width: 96px; height: 96px; } .focus[data-phase="ended"] .f-bloom-in { width: 104px; height: 104px; } .f-on { font-size: .875rem; } .f-text { padding-top: 9vh; } }

/* ─── The mini bar: what is playing, pinned to the foot of the path ── */
.mini { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(.75rem + env(safe-area-inset-bottom)); width: min(calc(100% - 1.5rem), 620px); display: flex; align-items: center; gap: .125rem; padding: .375rem .5rem .375rem .625rem; border: 1px solid var(--border2); border-radius: var(--pill); box-shadow: var(--shadow-lg); animation: fade .4s ease; }
.mini-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: .75rem; min-height: 48px; border-radius: var(--pill); }
.mini-main .grow { display: grid; }
.mini-main .bloom { width: 34px; height: 34px; }
.mini-title { font-size: 1rem; font-weight: 700; letter-spacing: -.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini .muted { color: var(--fg2); }
body.has-mini .page { padding-bottom: 9rem; }

.stop.writing > .stop-dot { animation: pulse 3.6s var(--ease-breath) infinite; }
.stop.writing .status { min-height: 24px; }
#tail { margin-top: -1.75rem; }
#tail:empty { display: none; }
.to-questions { justify-self: start; color: var(--fg2); }
.auto-line { display: flex; align-items: center; gap: .625rem; color: var(--fg); padding: .75rem 1rem; border-radius: var(--r); background: var(--surface2); }
.resume.hold { display: grid; padding: 1.125rem; }
.resume .grow { min-width: 9rem; }

/* What the guide was shown from memory when the session began. */
.known { margin-top: .625rem; }
.known summary { cursor: pointer; }
.known ul { margin: .375rem 0 .25rem; }
