/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 284px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow: auto; background: var(--panel); border-right: 1px solid var(--line); padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; z-index: 30; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 4px; }
.searchbtn { display: flex; justify-content: space-between; align-items: center; width: 100%; font: 13px var(--sans); color: var(--mute); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; cursor: pointer; }
.searchbtn:hover { border-color: var(--line2); }
#nav { display: flex; flex-direction: column; gap: 1px; }
.ng { font: 700 11px var(--mono); color: var(--mute); letter-spacing: .06em; margin: 14px 8px 6px; display: flex; justify-content: space-between; }
.nl { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 8px; color: var(--ink2); font-size: 13.5px; line-height: 1.3; text-decoration: none; border: 1px solid transparent; }
.nl:hover { background: var(--panel2); text-decoration: none; }
.nl.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--ink); font-weight: 600; }
.nl .ico { width: 20px; text-align: center; flex: none; }
.nl .t { flex: 1; }
.nl .meta { font: 11px var(--mono); color: var(--mute); }
.nl.locked .t { color: var(--mute); }
.nl .lk { font-size: 11px; opacity: .7; }
.unlock { background: linear-gradient(160deg, var(--amber-soft), var(--accent-soft)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 7px; margin-top: 6px; }
.unlock .u-h { font-weight: 700; font-size: 13px; }
.u-price { display: flex; align-items: center; gap: 8px; }
.u-price b { font-size: 18px; } .u-price s { color: var(--mute); font-size: 12px; }
.u-sub { font-size: 12px; color: var(--ink2); line-height: 1.45; }
body.paid .unlock { display: none; }
.side-foot { margin-top: auto; padding: 10px 4px 2px; }
.pf-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--mute); margin-bottom: 6px; letter-spacing: .05em; }
.pbar { height: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.pbar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .4s; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); min-height: 56px; }
.tb-crumb { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.iconbtn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; font-size: 14px; }
.iconbtn:hover { background: var(--panel2); }
.only-mobile { display: none; }
.acct-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); cursor: pointer; font: 12px var(--mono); color: var(--ink); position: relative; }
.acct-chip .av { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; width: 260px; display: none; text-align: left; font-family: var(--sans); }
.acct-menu.on { display: block; }
.acct-menu .am-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 5px 0; color: var(--ink2); }
.acct-menu hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.acct-menu button { width: 100%; justify-content: flex-start; margin-top: 4px; }

.view { padding: 24px; max-width: 1320px; width: 100%; margin: 0 auto; flex: 1; position: relative; }
body.paid .view::before { /* watermark with the buyer's email */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5; background-image: var(--wm); opacity: .5; }
.muted { color: var(--mute); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.wide { width: 100%; justify-content: center; padding: 13px; font-size: 14px; }

/* ---------- home ---------- */
.hero-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; box-shadow: var(--shadow); }
.hero-card h1 { font-size: 26px; margin-bottom: 8px; }
.hero-card p { color: var(--ink2); margin: 0 0 16px; }
.plan-box { background: var(--bg); border: 1px dashed var(--line2); border-radius: 12px; padding: 16px; }
.plan-box label { font: 700 11px var(--mono); color: var(--mute); letter-spacing: .05em; display: block; margin-bottom: 8px; }
.plan-out { margin-top: 12px; font-size: 13px; color: var(--ink2); }
.plan-days { display: grid; gap: 6px; margin-top: 10px; max-height: 220px; overflow: auto; }
.plan-day { display: grid; grid-template-columns: 62px 1fr; gap: 8px; font-size: 12.5px; padding: 6px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.plan-day b { font: 700 11px var(--mono); color: var(--accent-ink); padding-top: 2px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 0 12px; }
.sec-h h2 { font-size: 17px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.lcard { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 8px; transition: transform .12s, box-shadow .12s, border-color .12s; min-height: 150px; }
.lcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line2); text-decoration: none; }
.lcard .thumb { height: 64px; border-radius: 9px; background-color: var(--bg); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 14px 14px; display: grid; place-items: center; font-size: 26px; border: 1px solid var(--line); }
.lcard h3 { font-size: 14px; }
.lcard p { margin: 0; font-size: 12.5px; color: var(--mute); line-height: 1.45; }
.lcard .foot { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.lcard.locked .thumb { filter: grayscale(.6); opacity: .75; }
.ready { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.rd { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.rd:hover { border-color: var(--line2); text-decoration: none; }
.rd .top { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.rd .top span:last-child { font: 12px var(--mono); color: var(--mute); }

/* ---------- question bank ---------- */
.tr-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.tr-head h1 { font-size: 24px; }
.tr-head p { margin: 6px 0 0; color: var(--ink2); max-width: 640px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 16px; }
.chip { font: 600 12px var(--mono); padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--ink2); cursor: pointer; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.grp-h { font: 700 12px var(--mono); color: var(--mute); letter-spacing: .06em; text-transform: uppercase; margin: 22px 0 8px; }
details.q { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; transition: border-color .15s; }
details.q[open] { border-color: var(--line2); box-shadow: var(--shadow); }
details.q > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
details.q > summary::-webkit-details-marker { display: none; }
details.q > summary .qt { flex: 1; font-weight: 600; font-size: 14.5px; line-height: 1.4; }
details.q.done > summary .qt { color: var(--mute); }
.pri { font: 700 10.5px var(--mono); padding: 3px 6px; border-radius: 6px; border: 1px solid; flex: none; }
.pri.p1 { color: var(--accent-ink); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.pri.p2 { color: var(--blue); background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 30%, transparent); }
.pri.p3 { color: var(--violet); background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet) 30%, transparent); }
.donebox { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line2); display: grid; place-items: center; flex: none; cursor: pointer; font-size: 12px; color: transparent; background: var(--bg); }
details.q.done .donebox { background: var(--green); border-color: var(--green); color: #fff; }
details.q .a { padding: 2px 18px 16px 18px; border-top: 1px dashed var(--line); }
.a .tests { font-size: 13px; color: var(--mute); margin: 12px 0; }
.a .lbl { display: block; font: 700 11px var(--mono); letter-spacing: .05em; color: var(--mute); margin-bottom: 4px; text-transform: uppercase; }
.a .say { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.a .say p { margin: 6px 0; }
.a .explain { margin: 14px 0; } .a .explain p { margin: 8px 0; }
.a .fups { margin: 14px 0; }
.a details.fu { border: 1px solid var(--line); border-radius: 9px; margin: 6px 0; background: var(--bg); }
.a details.fu summary { cursor: pointer; padding: 8px 12px; font-size: 13.5px; font-weight: 600; }
.a details.fu > div { padding: 0 12px 10px; font-size: 13.5px; color: var(--ink2); }
.a .trap { background: var(--red-soft); border-radius: 9px; padding: 9px 12px; font-size: 13.5px; }
.a .more { font-size: 13px; }
.a .qcode { margin: 10px 0; }
.locked-list details.q { pointer-events: none; }
.locked-list details.q .qt { filter: blur(4px); user-select: none; }
.locked-list details.q:nth-child(-n+3) .qt { filter: none; }
.lockpanel { text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; margin: 18px 0; box-shadow: var(--shadow); }
.lockpanel .big { font-size: 34px; }
.lockpanel h2 { font-size: 19px; margin: 6px 0; }
.lockpanel p { color: var(--ink2); max-width: 520px; margin: 6px auto 16px; }

/* ---------- lesson ---------- */
.lesson .l-head { margin-bottom: 14px; }
.crumb { font-size: 12px; color: var(--mute); margin-bottom: 4px; }
.l-title-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.l-title-row h1 { font-size: 26px; }
.l-tags { display: flex; gap: 6px; }
.l-sub { color: var(--mute); margin: 4px 0 0; font-size: 14px; }
.l-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.stage { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background-color: var(--bg); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 22px 22px; background-position: -1px -1px; }
[data-theme="dark"] .stage { background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); }
.metrics { display: flex; gap: 8px; padding: 10px; flex-wrap: wrap; position: relative; z-index: 2; }
.metric { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; min-width: 112px; }
.metric .m-lab { font-size: 10px; color: var(--mute); letter-spacing: .05em; }
.metric .m-val { font-size: 15px; font-weight: 700; }
.metric[data-tone="ok"] .m-val { color: var(--green); }
.metric[data-tone="bad"] .m-val { color: var(--red); }
.metric[data-tone="warn"] .m-val { color: var(--amber); }
.metric.flash { animation: flash .6s ease; }
@keyframes flash { 30% { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } }
.stage-btns { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; z-index: 3; }
.svgwrap { padding: 0 8px; }
.stage-svg { width: 100%; height: auto; display: block; max-height: 440px; }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--mute); padding: 4px 12px 10px; flex-wrap: wrap; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 22px; height: 0; border-top: 2.5px solid var(--ink2); display: inline-block; }
.lg.weak { border-top: 2px dashed var(--mute); } .lg.cycle { border-color: var(--red); }
.rcdot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* svg nodes */
.node { opacity: 0; transform: scale(.85); transition: opacity .45s ease, transform .45s cubic-bezier(.3,1.4,.5,1); }
.node.on { opacity: 1; transform: none; }
.node .box { fill: var(--panel); stroke: var(--line2); stroke-width: 1.5; transition: fill .4s, stroke .4s; }
.node .shadow { fill: var(--line); }
.node.root .box { fill: var(--panel2); }
.node.closure .box { fill: var(--violet-soft); stroke: color-mix(in srgb, var(--violet) 45%, transparent); }
.node.focus .box { stroke: var(--accent); stroke-width: 2.5; }
.node .n1 { font: 700 13px var(--mono); fill: var(--ink); text-anchor: middle; }
.node .n2 { font: 11.5px var(--sans); fill: var(--mute); text-anchor: middle; }
.node .rc circle { fill: var(--accent); stroke: var(--bg); stroke-width: 3; }
.node .rc text { font: 700 12.5px var(--mono); fill: #fff; text-anchor: middle; }
.node.norc .rc { display: none; }
.node.bump .rc { animation: bump .5s ease; transform-box: fill-box; transform-origin: center; }
@keyframes bump { 40% { transform: scale(1.45); } }
.node .stamp { font: 700 11px var(--mono); text-anchor: start; letter-spacing: .08em; fill: var(--red); }
.node.leaked .box { fill: var(--red-soft); stroke: var(--red); stroke-width: 2; }
.node.leaked .rc circle { fill: var(--red); }
.node.leaked { animation: throb 1.6s ease-in-out infinite; }
@keyframes throb { 50% { opacity: .78; } }
.node.freed .stamp { fill: var(--green); }
/* freed nodes turn green, then fade to a ghost so the user sees them go */
.node.freed { animation: ghost 2.2s ease forwards; }
@keyframes ghost { 0% { opacity: 1; transform: none; } 45% { opacity: 1; transform: none; } 100% { opacity: .18; transform: scale(.94) translateY(6px); } }
.node.freed .box { fill: var(--green-soft); stroke: var(--green); }
.node.freed .rc circle { fill: var(--green); }

.edge { opacity: 0; transition: opacity .45s ease; }
.edge.on { opacity: 1; }
.edge .base { fill: none; stroke: var(--ink2); stroke-width: 2.5; }
.edge .flow { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 3 16; stroke-linecap: round; animation: flow 1.2s linear infinite; }
.edge[data-kind="weak"] .base { stroke: var(--mute); stroke-width: 2; stroke-dasharray: 6 6; }
.edge[data-kind="weak"] .flow { display: none; }
.edge[data-kind="cycle"] .base { stroke: var(--red); stroke-width: 3; }
.edge[data-kind="cycle"] .flow { stroke: #fff; animation-duration: .7s; opacity: .85; }
@keyframes flow { to { stroke-dashoffset: -19; } }
.edge .elab { font: 600 11px var(--mono); fill: var(--ink2); text-anchor: middle; }
.edge .lbg { fill: var(--panel); stroke: var(--line); }
.edge[data-kind="cycle"] .elab { fill: var(--red); }
.lesson.instant .node, .lesson.instant .edge { transition: none !important; }

.under { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.codecard, .console { background: var(--code-bg); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.cc-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 11.5px; color: #b9ad98; border-bottom: 1px solid rgba(255,255,255,.07); }
.dots { display: inline-flex; gap: 5px; } .dots i { width: 9px; height: 9px; border-radius: 50%; background: #5a5146; }
.dots i:first-child { background: #ec6a5e; } .dots i:nth-child(2) { background: #f4bf4f; } .dots i:nth-child(3) { background: #61c554; }
.cc-body { margin: 0; border-radius: 0; padding: 10px 0; font-size: 12.5px; line-height: 1.65; background: transparent; }
.cl { padding: 0 14px 0 0; white-space: pre; transition: background .3s; }
.cl .ln { display: inline-block; width: 34px; text-align: right; padding-right: 12px; color: #6b6255; user-select: none; }
.cl.hi { background: rgba(255, 138, 92, .16); box-shadow: inset 3px 0 0 var(--accent); }
.cl.chg { background: rgba(76, 194, 139, .2); box-shadow: inset 3px 0 0 var(--green); }
.con-body { padding: 12px 14px; font-size: 12.5px; color: #9fd28a; min-height: 70px; }
.con-body .muted { color: #6b6255; }
.cline { opacity: 0; animation: typein .3s ease forwards; }
@keyframes typein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.timeline { margin-top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; }
.tl-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--mute); letter-spacing: .05em; margin-bottom: 8px; }
.tl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; position: relative; }
.tl-steps::before { content: ""; position: absolute; top: 13px; left: 5%; right: 5%; border-top: 1px dashed var(--line2); }
.tl-steps button { position: relative; width: 100%; background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; color: var(--mute); }
.tl-steps .num { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--panel); border: 1.5px solid var(--line2); }
.tl-steps .lab { font-size: 11px; line-height: 1.25; text-align: center; }
.tl-steps li.seen .num { border-color: var(--green); color: var(--green); }
.tl-steps li.cur .num { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-steps li.cur .lab { color: var(--ink); font-weight: 600; }

.narr { position: sticky; top: 72px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); max-height: calc(100vh - 88px); overflow: auto; }
.n-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.n-step { font-size: 11px; color: var(--mute); letter-spacing: .05em; }
.n-title { font-size: 18px; margin-bottom: 8px; }
.n-body { font-size: 14px; color: var(--ink2); }
.n-body p { margin: 0 0 10px; }
.keyidea, .sayit { border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.keyidea { background: var(--violet-soft); border: 1px solid color-mix(in srgb, var(--violet) 30%, transparent); }
.sayit { background: var(--blue-soft); border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); }
.ki-h { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--violet); margin-bottom: 4px; }
.sayit .ki-h { color: var(--blue); }
.keyidea p, .sayit p { margin: 0; font-size: 13.5px; color: var(--ink); }
.n-nav { display: flex; gap: 8px; margin-top: 14px; }
.n-nav .btn:last-child { flex: 1; justify-content: center; }
.n-keys { font-size: 11px; color: var(--mute); margin-top: 8px; display: flex; gap: 5px; align-items: center; }
.learn { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.learn-h { font-size: 11px; color: var(--mute); letter-spacing: .06em; margin-bottom: 6px; }
.learn ul { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.learn li { display: flex; gap: 8px; padding: 3px 0; color: var(--ink2); }
.learn .ck { width: 15px; height: 15px; border: 1.5px solid var(--line2); border-radius: 4px; flex: none; margin-top: 2px; display: grid; place-items: center; font-size: 10px; color: #fff; }
.learn li.done .ck { background: var(--green); border-color: var(--green); }
.learn li.done .ck::after { content: "✓"; }
.quiz { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg); }
.q-h { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--accent-ink); }
.q-q { font-size: 13.5px; color: var(--ink); margin: 6px 0 10px !important; }
.q-opts { display: flex; flex-direction: column; gap: 6px; }
.q-opt { display: flex; gap: 10px; text-align: left; align-items: flex-start; font: 13px/1.4 var(--sans); padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); cursor: pointer; }
.q-opt:hover:not(:disabled) { border-color: var(--accent); }
.q-opt .mono { font-weight: 700; color: var(--mute); }
.q-opt.right { border-color: var(--green); background: var(--green-soft); }
.q-opt.wrong { border-color: var(--red); background: var(--red-soft); }
.q-opt.dim { opacity: .55; }
.q-exp { font-size: 13px; margin-top: 8px; color: var(--ink2); }
.lesson-done { margin-top: 14px; }

/* embed (landing page hero) */
.lesson.embed .l-head, .lesson.embed .timeline, .lesson.embed .learn, .lesson.embed .n-keys, .lesson.embed .under, .lesson.embed .stage-btns { display: none; }
.lesson.embed .l-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; }
.lesson.embed .narr { position: static; max-height: none; box-shadow: none; }

/* ---------- modals ---------- */
.pw-pane { display: none; } .pw-pane.on { display: block; }
.pw-modal h2 { font-size: 20px; margin: 10px 0 6px; }
.offer-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 8px 0 12px; }
.offer-price b { font-size: 30px; } .offer-price s { color: var(--mute); }
.offer-price .muted { font-size: 12.5px; width: 100%; }
.ticks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; font-size: 14px; }
.ticks li { display: flex; gap: 10px; }
.ticks li::before { content: "✓"; color: var(--green); font-weight: 700; }
.fine { font-size: 12px; color: var(--mute); text-align: center; margin: 10px 0 0; }
.err { color: var(--red); font-size: 13px; min-height: 18px; margin: 6px 0; }
.demo-note { font-size: 11.5px; background: var(--amber-soft); color: var(--amber); border: 1px dashed color-mix(in srgb, var(--amber) 50%, transparent); padding: 8px 10px; border-radius: 8px; margin: 12px 0; line-height: 1.5; }
.codefield { font: 700 22px var(--mono) !important; letter-spacing: .4em; text-align: center; }
.order { display: flex; justify-content: space-between; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); margin: 12px 0; font-size: 14px; }
.order .muted { font-size: 12px; }
.methods { display: grid; gap: 8px; }
.methods label { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid var(--line2); border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600; }
.methods label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.methods em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--mute); }
.done-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 28px; margin: 8px auto 0; animation: pop .4s cubic-bezier(.3,1.6,.5,1); }
.pw-pane[data-pane="done"] { text-align: center; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scrim.top { align-items: flex-start; padding-top: 12vh; }
.search-modal { width: min(640px, 100%); padding: 12px; }
.search-res { max-height: 56vh; overflow: auto; margin-top: 8px; }
.sr { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
.sr:hover, .sr.sel { background: var(--panel2); text-decoration: none; }
.sr .where { margin-left: auto; font: 11px var(--mono); color: var(--mute); white-space: nowrap; }
.practice-modal { width: min(720px, 100%); }
.pr-top { display: flex; gap: 12px; font-size: 12px; color: var(--mute); align-items: center; padding-right: 40px; }
.pr-timer { margin-left: auto; font-weight: 700; font-size: 15px; color: var(--ink); }
.practice-modal h2 { font-size: 20px; margin: 14px 0 6px; }
.pr-hint { font-size: 13px; }
.pr-ans { display: none; max-height: 46vh; overflow: auto; border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 4px; }
.pr-ans.on { display: block; }
.pr-btns { margin-top: 14px; justify-content: flex-end; }

/* ---------- mobile ---------- */
@media (max-width: 1100px) {
  .l-grid { grid-template-columns: 1fr; }
  .narr { position: static; max-height: none; }
  .hero-card { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 290px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .only-mobile { display: inline-grid; }
  .view { padding: 16px; }
  .topbar { padding: 10px 14px; }
  .under { grid-template-columns: 1fr; }
  .tl-steps .lab { display: none; }
  .metric { min-width: 0; flex: 1 1 40%; }
  .stage-btns { position: static; padding: 0 10px; }
  .lesson.embed .l-grid { grid-template-columns: 1fr; }
  .svgwrap { overflow-x: auto; }
  .stage-svg { min-width: 640px; }
}
.stage-col, .narr { min-width: 0; }
