/* v1.19.0 — Pscilly Learning Lab (Learn page). */
.ll, .ll-lib, .ll-dialog { --ll-ink: #14231f; --ll-muted: #5c6b60; --ll-line: #e1e5d8; --ll-paper: #fffdf4; --ll-forest: #173c35; --ll-lime: #dfefa8; --ll-olive: #6e853b; --ll-rust: #b4512f; }
.ll { margin-top: 18px; overflow-x: clip; color: var(--ll-ink); }
.ll h2, .ll h3, .ll h4, .ll-dialog h2, .ll-dialog h3, .ll-dialog h4 { margin: 0; }
.ll button, .ll-dialog button { font: inherit; }
.ll-linkbtn { background: none; border: none; padding: 0; color: var(--ll-forest); font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ---------- Head ---------- */
.ll-head { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px 28px; padding: 28px 30px 22px; border-radius: 22px; color: #fff; background: radial-gradient(circle at 88% 10%, rgba(223, 239, 168, 0.18), transparent 40%), radial-gradient(circle at 10% 120%, rgba(110, 133, 59, 0.5), transparent 50%), #173c35; overflow: hidden; }
.ll-head::after { content: ""; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 95% 105%, transparent 0 22px, rgba(255, 255, 255, 0.035) 22px 23px); pointer-events: none; }
.ll-head > * { position: relative; z-index: 1; }
.ll-kick { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ll-lime); }
.ll-head h2 { font: 600 clamp(28px, 3.2vw, 42px) / 1.04 Cormorant, Georgia, serif; letter-spacing: -0.02em; margin: 10px 0 10px; max-width: 18ch; }
.ll-head-copy p { font-size: 14.5px; line-height: 1.5; opacity: 0.88; max-width: 54ch; margin: 0; }
.ll-head-side { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-content: start; align-items: center; }
.ll-ring { position: relative; width: 64px; height: 64px; display: grid; place-items: center; grid-row: span 2; }
.ll-ring svg { position: absolute; inset: 0; }
.ll-ring b { font-size: 14px; font-variant-numeric: tabular-nums; }
.ll-go { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-radius: 14px; border: none; background: var(--ll-lime); color: var(--ll-forest); font-weight: 800; font-size: 14px; cursor: pointer; text-align: left; line-height: 1.25; }
.ll-go:hover { background: #fff; }
.ll-find { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22); }
.ll-find input { flex: 1; min-width: 0; background: none; border: none; color: #fff; font: inherit; font-size: 14px; outline: none; }
.ll-find input::placeholder { color: rgba(255, 255, 255, 0.7); }
.ll-layouts { grid-column: 1 / -1; justify-self: end; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.35); background: transparent; color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; }
.ll-layouts:hover { background: rgba(255, 255, 255, 0.12); }
.ll-path { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 4px 0 0; padding: 0; counter-reset: p; }
.ll-path li { position: relative; }
.ll-path li:not(:last-child)::after { content: ""; position: absolute; right: -9px; top: 50%; width: 8px; height: 8px; border-top: 2px solid rgba(255, 255, 255, 0.5); border-right: 2px solid rgba(255, 255, 255, 0.5); transform: translateY(-50%) rotate(45deg); }
.ll-path button { position: relative; width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; cursor: pointer; text-align: left; overflow: hidden; }
.ll-path button:hover { background: rgba(255, 255, 255, 0.16); }
.ll-path i { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--c); color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25); }
.ll-path span { display: grid; gap: 2px; min-width: 0; }
.ll-path b { font-size: 13.5px; }
.ll-path small { font-size: 11.5px; opacity: 0.75; }
.ll-path em { position: absolute; left: 0; bottom: 0; height: 4px; width: var(--p); background: var(--ll-lime); border-radius: 0 4px 4px 0; transition: width 0.4s; }

/* ---------- Lesson reader ---------- */
.ll-lesson { --c: #173c35; display: grid; gap: 16px; padding: 26px 28px; border-radius: 20px; background: #fff; border: 1px solid var(--ll-line); box-shadow: 0 18px 40px -30px rgba(20, 35, 30, 0.4); scroll-margin-top: 120px; }
.ll-lesson > header { display: grid; gap: 8px; }
.ll-tag { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.ll-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ll-muted); }
.ll-lesson header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ll-lesson h2, .ll-lesson h3 { flex-basis: 100%; font: 600 clamp(28px, 2.8vw, 38px) / 1.05 Cormorant, Georgia, serif; letter-spacing: -0.02em; color: var(--ll-ink); }
.ll-lesson h3 { font-size: clamp(26px, 2.4vw, 34px); }
.ll-sum { flex-basis: 100%; margin: 0; font-size: 16px; line-height: 1.5; color: #33443d; max-width: 70ch; }
.ll-body { display: grid; gap: 10px; max-width: 74ch; }
.ll-body p { margin: 0; font-size: 15px; line-height: 1.65; color: #26352f; }
.ll-facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ll-facts li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; background: color-mix(in srgb, var(--c) 8%, #fffdf4); border: 1px solid color-mix(in srgb, var(--c) 22%, #fff); font-size: 13px; font-weight: 700; color: var(--ll-ink); }
.ll-facts li svg { color: var(--c); }
.ll-src summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ll-muted); }
.ll-src ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; }
.ll-src a { color: var(--ll-forest); }
.ll-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--ll-line); }
.ll-done { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; border: 2px solid var(--c); background: #fff; color: var(--c); font-weight: 800; font-size: 13.5px; cursor: pointer; }
.ll-done[aria-pressed="true"] { background: var(--c); color: #fff; }
.ll-pn { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.ll-pn button { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--ll-line); background: #fff; color: var(--ll-ink); font-weight: 700; font-size: 13.5px; cursor: pointer; max-width: 100%; text-align: left; }
.ll-pn .ll-next { background: var(--ll-forest); border-color: var(--ll-forest); color: #fff; }
.ll-pn button:hover { filter: brightness(1.08); }

/* ---------- Visuals ---------- */
.lv { margin: 0; padding: 18px; border-radius: 16px; background: linear-gradient(180deg, #fbfcf6, #f4f7ea); border: 1px solid var(--ll-line); display: grid; gap: 12px; min-width: 0; }
.lv figcaption { font-size: 12px; color: var(--ll-muted); }
.lv svg { display: block; width: 100%; height: auto; }
.lv svg[aria-hidden="true"] { display: inline-block; width: auto; flex: none; }
.lv text { font-family: "DM Sans", sans-serif; font-size: 12px; fill: #33443d; }
.lv .lv-tick { font-size: 11px; fill: #7a877f; }
.lv .lv-note { font-size: 11px; font-weight: 700; fill: #b4512f; }
.lv .lv-band { font-size: 11px; font-weight: 800; fill: #6e853b; letter-spacing: 0.04em; text-transform: uppercase; }
.lv .lv-mono { font-family: ui-monospace, monospace; font-weight: 700; fill: #173c35; }
.lv-out { padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--ll-line); min-height: 64px; }
.lv-out b { display: block; font-size: 14.5px; margin-bottom: 3px; color: var(--ll-ink); }
.lv-out p { margin: 0; font-size: 13.5px; line-height: 1.5; color: #3b4a43; }
.lv-chips, .lv-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.lv-chips button, .lv-seg button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--ll-line); background: #fff; color: var(--ll-ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.lv-chips button[aria-pressed="true"], .lv-seg button[aria-pressed="true"] { background: var(--ll-forest); border-color: var(--ll-forest); color: #fff; }
.lv-play { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: none; background: var(--ll-rust); color: #fff; font-weight: 800; font-size: 13px; cursor: pointer; }
.lv-small { margin: 0; font-size: 12.5px; color: var(--ll-muted); line-height: 1.45; }
.lv-small a { color: var(--ll-forest); font-weight: 700; }
.lv-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ll-muted); }
.lv-legend i, .lv-hist-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* anatomy */
.lv-anat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: center; }
.lv-anat-side { display: grid; gap: 10px; }
.lv-part { transition: opacity 0.25s, filter 0.25s; opacity: 0.45; }
.lv-anat[data-on="cap"] [data-p="cap"], .lv-anat[data-on="gills"] [data-p="gills"], .lv-anat[data-on="ring"] [data-p="ring"], .lv-anat[data-on="stipe"] [data-p="stipe"], .lv-anat[data-on="volva"] [data-p="volva"], .lv-anat[data-on="mycelium"] [data-p="mycelium"] { opacity: 1; filter: drop-shadow(0 0 6px rgba(180, 81, 47, 0.55)); }

/* life cycle */
.lv-cycle { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: center; }
.lv-cycle-side { display: grid; gap: 10px; }
.lv-node { cursor: pointer; outline: none; }
.lv-node circle { fill: #fff; stroke: #6e853b; stroke-width: 3; transition: fill 0.25s, r 0.25s; }
.lv-node text { font-weight: 800; fill: #173c35; }
.lv-node.on circle, .lv-node:hover circle, .lv-node:focus-visible circle { fill: #dfefa8; }
.lv-cycle[data-stage="0"] .lv-node:nth-of-type(1) circle { fill: #dfefa8; }
.lv .lv-cycle-h { font: 600 22px Cormorant, Georgia, serif; fill: #173c35; }
.lv .lv-cycle-s { font-size: 11px; fill: #7a877f; }

/* kinds */
div.lv-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lv-kind { display: grid; gap: 4px; align-content: start; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--ll-line); border-top: 5px solid var(--c); }
.lv-kind span { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c); }
.lv-kind b { font: 600 22px/1.05 Cormorant, Georgia, serif; }
.lv-kind small { font-size: 12px; color: var(--ll-muted); }
.lv-kind p { margin: 4px 0 0; font-size: 13px; line-height: 1.4; }

/* history */
.lv-hist { display: grid; gap: 10px; min-width: 0; }
.lv-hist-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ll-muted); }
.lv-hist-track { position: relative; display: flex; gap: 6px; list-style: none; margin: 0; padding: 10px 2px 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.lv-hist-track::before { content: ""; position: absolute; left: 0; right: 0; top: 27px; height: 3px; background: linear-gradient(90deg, #c9821a, #b4512f 22%, #2f6f8f 40%, #173c35 70%, #5b4a8a); border-radius: 3px; min-width: 100%; }
.lv-hist-track li { flex: none; scroll-snap-align: start; }
.lv-hist-track button { position: relative; display: grid; justify-items: center; gap: 4px; width: 92px; padding: 0 4px; background: none; border: none; cursor: pointer; color: var(--ll-ink); }
.lv-hist-track button::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--c); box-sizing: border-box; margin: 9px 0 4px; transition: transform 0.2s; }
.lv-hist-track button[aria-pressed="true"]::before { transform: scale(1.35); background: var(--c); }
.lv-hist-track b { font-size: 14px; font-variant-numeric: tabular-nums; }
.lv-hist-track span { font-size: 11.5px; line-height: 1.2; color: var(--ll-muted); text-align: center; }

/* pathway */
.lv-pw { display: grid; gap: 12px; }
.lv-pw-node { opacity: 0.35; transition: opacity 0.35s; }
.lv-pw-node.on { opacity: 1; }
.lv-pw-node.cur { filter: drop-shadow(0 4px 10px rgba(23, 60, 53, 0.35)); }
.lv-pw-fill { transition: stroke-dashoffset 0.6s ease; }
.lv-pw-dot { transition: cx 0.6s ease; }
.lv-flow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; list-style: none; margin: 0; padding: 0; }
.lv-flow li { position: relative; min-width: 0; }
.lv-flow button, .lv-acc-step { width: 100%; height: 100%; display: grid; justify-items: start; gap: 2px; padding: 10px 11px; border-radius: 12px; background: #fff; border: 1px solid var(--ll-line); color: var(--ll-ink); cursor: pointer; text-align: left; }
.lv-acc-step { cursor: default; align-content: start; }
.lv-flow i { font-style: normal; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #eef2e2; color: var(--ll-forest); font-size: 12px; font-weight: 800; margin-bottom: 2px; }
.lv-flow b { font-size: 13.5px; }
.lv-flow small { font-size: 11.5px; color: var(--ll-muted); }
.lv-flow button[aria-pressed="true"] { background: var(--ll-forest); border-color: var(--ll-forest); color: #fff; }
.lv-flow button[aria-pressed="true"] i { background: var(--ll-lime); }
.lv-flow button[aria-pressed="true"] small { color: rgba(255, 255, 255, 0.8); }
.lv-flow-arrows li:not(:last-child)::after { content: ""; position: absolute; right: -7px; top: 50%; z-index: 1; width: 8px; height: 8px; background: #fbfcf6; border-top: 2px solid #9aa79e; border-right: 2px solid #9aa79e; transform: translateY(-50%) rotate(45deg); }
.lv-acc .lv-flow i { background: var(--c, #173c35); color: #fff; }
.lv-acc-step p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.4; color: #3b4a43; }
.lv-acc { display: grid; gap: 12px; }

/* curve */
div.lv-curve { display: grid; gap: 10px; }
.lv-range { display: flex; align-items: center; gap: 12px; font-size: 12.5px; font-weight: 700; color: var(--ll-muted); }
.lv-range input { flex: 1; accent-color: #b4512f; }

/* bars */
.lv-chart-h { display: grid; gap: 2px; }
.lv-chart-h b { font-size: 14.5px; }
.lv-chart-h small { font-size: 12px; color: var(--ll-muted); }
.lv-bars { display: grid; gap: 8px; }
.lv-bar { display: grid; grid-template-columns: minmax(110px, 0.9fr) minmax(0, 2fr) auto; align-items: center; gap: 10px; }
.lv-bar-l { font-size: 13px; font-weight: 700; }
.lv-bar-t { height: 16px; border-radius: 6px; background: #eceee4; overflow: hidden; }
.lv-bar-t i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--c); transition: width 0.9s cubic-bezier(.2, .8, .2, 1); }
.lv-bars.in .lv-bar-t i { width: var(--w); }
.lv-bar > b { font-size: 13px; font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; }
.lv-bar small { grid-column: 2 / -1; font-size: 11.5px; color: var(--ll-muted); }

/* spines */
div.lv-spines { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: center; }
.lv-spines-r { display: grid; justify-items: center; gap: 6px; text-align: center; }
.lv-spines-r p { margin: 0; font-size: 13px; color: #3b4a43; }
.lv-ring { width: 130px !important; }
.lv .lv-ring-n { font: 700 24px "DM Sans", sans-serif; fill: #173c35; }

/* trial flow */
.lv-tf { display: grid; gap: 12px; }
.lv-weeks { display: flex; gap: 6px; flex-wrap: wrap; }
.lv-weeks span { padding: 5px 10px; border-radius: 8px; background: color-mix(in srgb, #b4512f calc(10% + var(--i) * 8%), #fff); font-size: 12px; font-weight: 700; color: #4a2416; }

/* depression */
.lv-dep { display: grid; gap: 12px; }
.lv-dep-body { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--ll-line); }
.lv-dep-body h4 { font-size: 15px; }
.lv-m { margin: -6px 0 0; font-size: 12.5px; color: var(--ll-muted); }

/* pipeline */
.lv-pipe { display: grid; gap: 10px; overflow-x: auto; }
.lv-pipe-head, .lv-pipe-row { display: grid; grid-template-columns: 190px minmax(420px, 1fr); gap: 12px; align-items: center; }
.lv-pipe-n { display: grid; gap: 2px; }
.lv-pipe-n b { font-size: 14px; color: var(--c); }
.lv-pipe-n small { font-size: 11.5px; color: var(--ll-muted); }
.lv-pipe-track { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.lv-pipe-track span { height: 18px; border-radius: 5px; background: #eceee4; }
.lv-pipe-track span.on { background: var(--c); }
.lv-pipe-track span.half { background: repeating-linear-gradient(135deg, var(--c) 0 5px, color-mix(in srgb, var(--c) 30%, #fff) 5px 10px); animation: lv-pulse 1.8s ease-in-out infinite; }
@keyframes lv-pulse { 50% { opacity: 0.6; } }
.lv-pipe-labels span { height: auto; background: none; font-size: 10.5px; font-weight: 700; color: var(--ll-muted); text-align: center; line-height: 1.15; }
.lv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.lv-stats3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lv-stats div { display: grid; gap: 3px; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--ll-line); }
.lv-stats b { font: 700 22px/1 "DM Sans", sans-serif; color: var(--ll-forest); letter-spacing: -0.02em; }
.lv-stats span { font-size: 12px; line-height: 1.35; color: var(--ll-muted); }

/* outcomes */
.lv-out3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lv-o { display: grid; gap: 10px; align-content: start; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--ll-line); }
.lv-o h4 { font-size: 14px; }
.lv-o .lv-bar { grid-template-columns: 1fr auto; }
.lv-o .lv-bar-l { grid-column: 1 / -1; font-size: 12px; }
.lv-o .lv-bar-t { grid-column: 1; }

/* ladder */
div.lv-ladder { display: grid; gap: 4px; overflow-x: auto; }
.lv-lad-row { display: grid; grid-template-columns: minmax(170px, 1.6fr) repeat(5, minmax(56px, 1fr)); align-items: center; gap: 4px; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--ll-line); color: var(--ll-ink); text-align: left; cursor: pointer; }
.lv-lad-head { background: none; border: none; cursor: default; font-size: 11px; font-weight: 800; color: var(--ll-muted); text-transform: uppercase; letter-spacing: 0.04em; padding-top: 0; padding-bottom: 0; }
.lv-lad-head span:not(:first-child) { text-align: center; }
.lv-lad-row > span:first-child { font-size: 13px; font-weight: 700; }
.lv-lad-row > span:not(:first-child) { display: grid; place-items: center; }
.lv-lad-row i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #c9cfbd; }
.lv-lad-row i.on { background: var(--ll-forest); border-color: var(--ll-forest); }
.lv-lad-row i.half { background: linear-gradient(90deg, var(--ll-olive) 50%, #fff 50%); border-color: var(--ll-olive); }
.lv-lad-row i.x { border-style: dashed; }
.lv-lad-row:not(.lv-lad-head)[aria-pressed="true"] { border-color: var(--ll-forest); box-shadow: 0 0 0 2px var(--ll-lime); }

/* safety */
.lv-safe { display: grid; gap: 12px; }
.lv-check { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--ll-line); }
.lv-check > b { font-size: 14px; }
.lv-check label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; cursor: pointer; }
.lv-check input { margin-top: 2px; accent-color: #5b4a8a; }
.lv-check .lv-out { min-height: 0; font-size: 13px; margin: 0; }

/* ---------- Course layout ---------- */
.ll-course { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; margin-top: 22px; align-items: start; }
.ll-side { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; padding: 14px; border-radius: 18px; background: #fff; border: 1px solid var(--ll-line); scrollbar-width: thin; }
.ll-side-d > summary { display: none; }
.ll-side-t { display: grid; gap: 4px; margin-bottom: 14px; }
.ll-side-t h3 { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c); padding: 0 6px 4px; border-bottom: 2px solid color-mix(in srgb, var(--c) 30%, #fff); }
.ll-side-t h3 small { margin-left: auto; font-size: 11px; color: var(--ll-muted); letter-spacing: 0; }
.ll-side-t ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ll-side-t button { width: 100%; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 8px; border-radius: 10px; border: none; background: none; color: var(--ll-ink); cursor: pointer; text-align: left; font-size: 13.5px; line-height: 1.25; }
.ll-side-t button:hover { background: #f4f6ec; }
.ll-side-t button[aria-current="true"] { background: color-mix(in srgb, var(--c) 12%, #fff); font-weight: 700; }
.ll-side-t button i { font-style: normal; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--c) 40%, #fff); font-size: 11px; font-weight: 800; color: var(--c); }
.ll-side-t button.is-done i { background: var(--c); border-color: var(--c); color: #fff; }
.ll-side-t button small { font-size: 11px; color: var(--ll-muted); }
.ll-side-quiz { width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px; border-radius: 12px; border: 1px dashed var(--ll-rust); background: #fdf3ee; color: var(--ll-rust); font-weight: 800; font-size: 13px; cursor: pointer; }

/* ---------- Metro layout ---------- */
.ll-metro { margin-top: 22px; display: grid; gap: 14px; }
.lm-map { padding: 14px; border-radius: 20px; background: #fff; border: 1px solid var(--ll-line); overflow-x: auto; }
.lm-svg { min-width: 860px; display: block; width: 100%; height: auto; }
.lm-svg text { font-family: "DM Sans", sans-serif; font-size: 11.5px; fill: #33443d; }
.lm-svg .lm-line { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.lm-st { cursor: pointer; outline: none; }
.lm-st text, .lm-svg .lm-line { paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }
.lm-st circle { transition: r 0.2s; }
.lm-st:hover circle, .lm-st:focus-visible circle { r: 16; }
.lm-st.cur circle { fill: #dfefa8; r: 17; }
.lm-st.cur text { font-weight: 800; }
.lm-st.done circle { fill: #fff; }
.lm-hub { cursor: pointer; }
.lm-hub circle { fill: #173c35; }
.lm-hub text { fill: #dfefa8 !important; font-weight: 800; font-size: 12px !important; }
.lm-end circle { fill: #b4512f; }
.lm-end text { fill: #fff !important; }
.lm-hint { margin: -4px 0 0; font-size: 12.5px; color: var(--ll-muted); }

/* ---------- Bench layout ---------- */
.ll-bench { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; grid-auto-flow: dense; }
.lb-tile { --c: #173c35; display: grid; gap: 12px; align-content: start; padding: 16px; border-radius: 18px; background: #fff; border: 1px solid var(--ll-line); border-top: 5px solid var(--c); min-width: 0; }
.lb-wide { grid-column: span 2; }
.lb-tile header { display: grid; gap: 6px; }
.lb-tile h3 { font: 600 24px/1.08 Cormorant, Georgia, serif; }
.lb-tile header p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ll-muted); }
.lb-done { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; color: var(--c); }
.lb-tile .lv { padding: 12px; }
.lb-open { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: none; background: var(--c); color: #fff; font-weight: 800; font-size: 13px; cursor: pointer; margin-top: auto; }
.lb-tile:not(.lb-wide) .lv-anat, .lb-tile:not(.lb-wide) .lv-cycle, .lb-tile:not(.lb-wide) div.lv-spines { grid-template-columns: 1fr; }
.lb-tile:not(.lb-wide) div.lv-kinds { grid-template-columns: 1fr; }
.lb-tile:not(.lb-wide) .lv-ring { width: 100px !important; }
.lb-tile:not(.lb-wide) .lv-stats3 { grid-template-columns: 1fr; }
.lb-tile:not(.lb-wide) .lv-flow { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lb-tile:not(.lb-wide) .lv-flow-arrows li::after { display: none; }

/* ---------- Story layout ---------- */
.ll-story { margin-top: 18px; }
.ls-bar { position: sticky; top: 72px; z-index: 5; height: 5px; border-radius: 4px; background: #e8ecdc; overflow: hidden; }
.ls-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6e853b, #173c35, #b4512f, #5b4a8a); }
.ls-chap { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.ls-chap a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--ll-line); color: var(--ll-ink); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.ls-chap a b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--c); color: #fff; font-size: 12px; }
.ls-ch { display: grid; gap: 18px; margin-top: 30px; scroll-margin-top: 110px; }
.ls-ch-h { display: grid; gap: 4px; padding: 26px 28px; border-radius: 20px; background: var(--c); color: #fff; position: relative; overflow: hidden; }
.ls-ch-h::after { content: ""; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; border: 30px solid rgba(255, 255, 255, 0.08); }
.ls-ch-h span { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ll-lime); }
.ls-ch-h h2 { font: 600 clamp(32px, 3.6vw, 48px) / 1 Cormorant, Georgia, serif; }
.ls-ch-h p { margin: 0; opacity: 0.88; font-size: 15px; }

/* ---------- Cards layout ---------- */
.ll-cards { margin-top: 30px; display: grid; gap: 14px; }
.ll-cards header h2, .ll-quiz header h2, .ll-gloss h2, .ll-lib header h2 { font: 600 32px/1.05 Cormorant, Georgia, serif; }
.ll-cards header p, .ll-quiz header p, .ll-lib header p { margin: 4px 0 0; color: var(--ll-muted); font-size: 14px; }
.lc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.lc-card { --c: #173c35; display: grid; gap: 8px; }
.lc-inner { position: relative; height: 200px; border: none; padding: 0; background: none; cursor: pointer; perspective: 900px; text-align: left; }
.lc-front, .lc-back { position: absolute; inset: 0; display: grid; align-content: space-between; gap: 8px; padding: 16px; border-radius: 16px; backface-visibility: hidden; transition: transform 0.55s cubic-bezier(.2, .8, .2, 1); }
.lc-front { background: #fff; border: 1px solid var(--ll-line); border-top: 6px solid var(--c); }
.lc-front b { font: 600 24px/1.08 Cormorant, Georgia, serif; color: var(--ll-ink); }
.lc-front small { font-size: 12px; color: var(--ll-muted); }
.lc-back { background: var(--c); color: #fff; transform: rotateY(180deg); align-content: start; }
.lc-back b { font-size: 14px; }
.lc-back ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.35; }
.lc-inner[aria-pressed="true"] .lc-front { transform: rotateY(-180deg); }
.lc-inner[aria-pressed="true"] .lc-back { transform: rotateY(0); }
.lc-open { justify-self: start; display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--ll-line); background: #fff; color: var(--ll-ink); font-weight: 700; font-size: 12.5px; cursor: pointer; }

/* ---------- Quiz, glossary, library ---------- */
.ll-quiz { margin-top: 34px; display: grid; gap: 14px; scroll-margin-top: 110px; }
.ll-qs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; counter-reset: q; }
.ll-q { counter-increment: q; display: grid; gap: 10px; align-content: start; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--ll-line); transition: border-color 0.2s, background 0.2s; }
.ll-q > p { margin: 0; font-size: 14.5px; line-height: 1.4; font-weight: 600; }
.ll-q > p::before { content: counter(q) ". "; color: var(--ll-olive); font-weight: 800; }
.ll-q-btns { display: flex; gap: 8px; }
.ll-q-btns button { padding: 7px 18px; border-radius: 999px; border: 1px solid var(--ll-line); background: #f7f8f1; font-weight: 800; font-size: 13px; cursor: pointer; color: var(--ll-ink); }
.ll-q-btns button:hover:not(:disabled) { background: var(--ll-lime); }
.ll-q-btns button:disabled { opacity: 0.55; cursor: default; }
.ll-q-why { font-size: 13px; line-height: 1.45; color: #3b4a43; }
.ll-q.ok { border-color: #8fb35c; background: #f6fbec; }
.ll-q.no { border-color: #e2a48c; background: #fdf4ef; }
.ll-q.ok .ll-q-why b { color: #4f7a2e; }
.ll-q.no .ll-q-why b { color: var(--ll-rust); }
.ll-gloss { margin-top: 34px; padding: 22px 24px; border-radius: 20px; background: #eef2e2; }
.ll-gloss dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 22px; margin: 14px 0 0; }
.ll-gloss dt { font-weight: 800; font-size: 14px; }
.ll-gloss dd { margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: #3b4a43; }
.ll-disc { margin: 16px 0 0; padding-left: 12px; border-left: 3px solid var(--ll-lime); font-size: 12.5px; color: var(--ll-muted); }
.ll-lib { margin-top: 40px; }
.ll-lib > header { margin-bottom: 8px; }
.ll-lib header h2 { display: flex; align-items: center; gap: 10px; }

/* ---------- Dialog ---------- */
.ll-dialog { border: none; border-radius: 22px; padding: 0; width: min(980px, calc(100vw - 20px)); max-height: calc(100vh - 30px); background: #fffdf4; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.ll-dialog::backdrop { background: rgba(10, 20, 16, 0.6); }
.ll-dlg-in { position: relative; padding: 12px; }
.ll-dlg-in .ll-lesson { box-shadow: none; }
.ll-x { position: sticky; top: 6px; float: right; z-index: 3; width: 38px; height: 38px; display: grid; place-items: center; margin: 6px 6px -44px 0; border-radius: 50%; border: 1px solid var(--ll-line); background: #fff; color: var(--ll-ink); cursor: pointer; }
.ll-pick.nl-dialog, .nl-dialog { border: none; border-radius: 18px; padding: 0; width: min(940px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: #fffdf4; color: #14231f; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.nl-dialog::backdrop { background: rgba(10, 20, 16, 0.55); }
.nl-dialog form { padding: 22px; }
.nl-dialog header { position: relative; padding-right: 40px; margin-bottom: 16px; }
.nl-dialog h2 { font: 650 32px/1 Cormorant, Georgia, serif; margin: 0 0 6px; }
.nl-dialog header p { margin: 0; color: #5c6b60; font-size: 14px; }
.nl-x { position: absolute; top: 0; right: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid #e1e5d8; background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: #14231f; }
.nl-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.nl-opts button { display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 6px; padding: 10px; border-radius: 14px; border: 2px solid #e1e5d8; background: #fff; color: #14231f; cursor: pointer; font: inherit; }
.nl-opts button:hover { border-color: #6e853b; }
.nl-opts button[aria-pressed="true"] { border-color: #173c35; box-shadow: 0 0 0 3px #dfefa8; }
.nl-opts img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 9px; background: #eef2e2; }
.nl-opts b { font-size: 15px; }
.nl-opts b small { font-size: 10px; font-weight: 700; background: #dfefa8; color: #173c35; border-radius: 999px; padding: 2px 7px; margin-left: 4px; vertical-align: 2px; }
.nl-opts span { font-size: 12.5px; color: #5c6b60; line-height: 1.35; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ll-bench { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ll-course { grid-template-columns: 250px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .ll-head { grid-template-columns: 1fr; padding: 22px 18px 18px; }
  .ll-path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ll-path li:nth-child(2)::after { display: none; }
  .ll-course { grid-template-columns: 1fr; }
  .ll-side { position: static; max-height: none; padding: 0; background: none; border: none; }
  .ll-side-d { border-radius: 16px; background: #fff; border: 1px solid var(--ll-line); padding: 4px 12px; }
  .ll-side-d > summary { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px; font-weight: 800; cursor: pointer; }
  .ll-side-d[open] > summary { border-bottom: 1px solid var(--ll-line); margin-bottom: 10px; }
  div.lv-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lv-out3 { grid-template-columns: 1fr; }
  .lv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ll-gloss dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nl-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .ll-head-side { grid-template-columns: auto minmax(0, 1fr); }
  .ll-path { gap: 8px; }
  .ll-path li::after { display: none; }
  .ll-path button { padding: 9px 9px 12px; gap: 8px; }
  .ll-path i { width: 28px; height: 28px; }
  .ll-lesson { padding: 18px 16px; border-radius: 16px; }
  .lv { padding: 12px; }
  .lv-anat, .lv-cycle, div.lv-spines { grid-template-columns: 1fr; }
  .lv-flow { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lv-flow-arrows li::after { display: none; }
  .lv-stats3 { grid-template-columns: 1fr; }
  div.lv-kinds { grid-template-columns: 1fr; }
  .lv-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .lv-bar-l { grid-column: 1 / -1; }
  .lv-bar-t { grid-column: 1; }
  .ll-bench { grid-template-columns: 1fr; }
  .lb-wide { grid-column: auto; }
  .ll-qs { grid-template-columns: 1fr; }
  .ll-gloss dl { grid-template-columns: 1fr; }
  .ll-pn { margin-left: 0; width: 100%; }
  .ll-pn .ll-next { flex: 1; }
  .lc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lc-inner { height: 220px; }
  .lc-front b { font-size: 19px; }
  .lc-back ul { font-size: 12.5px; }
  .ll-dialog { width: 100vw; max-height: 100vh; border-radius: 16px 16px 0 0; margin-bottom: 0; }
  .nl-opts { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .lv-bar-t i, .lc-front, .lc-back, .lv-pw-fill, .lv-pw-dot { transition: none; }
  .lv-pipe-track span.half { animation: none; }
}

/* v1.20.0 — links to the Mushroom Glossary. */
.ll-side-gloss { margin-top: 8px; border-color: #2f6f8f; background: #eef5f8; color: #2f6f8f !important; text-decoration: none; }
.ll-gloss-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 4px; padding: 14px 18px; border-radius: 14px; background: #173c35; color: #fff !important; text-decoration: none; transition: transform .18s; }
.ll-gloss-cta:hover { transform: translateY(-2px); }
.ll-gloss-cta b { display: block; font-size: 15px; } .ll-gloss-cta small { font-size: 12.5px; color: #dfefa8; }
.ll-gloss dt a { color: #173c35; text-decoration: underline; text-decoration-color: rgba(23, 60, 53, .35); text-underline-offset: 3px; }
