/* v4 · Course player F (Finale) – builds on the B/C/E pieces from v2/v3, plus the prototype control.
   Builds on the tokens and components in styles.css. */

.small { font-size: 13px; }
.hide-sm { margin-left: 2px; }
.mobile-only { display: none !important; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Shared: segmented progress ---------- */
.segs { display: inline-flex; gap: 6px; align-items: center; }
.segs-g { display: inline-flex; gap: 2px; }
.segs i { width: 14px; height: 6px; border-radius: 3px; background: var(--border); display: block; flex: none; transition: background .3s, width .3s var(--ease); }
.segs i.done { background: var(--success); }
/* current lesson: a wider bar (slider/page-control style), same height as the others */
.segs i.cur, .segs i.done.cur { width: 30px; background: var(--accent); }
.segs-lg i { width: clamp(18px, 6vw, 40px); height: 8px; border-radius: 4px; }
/* large courses: thinner segments; in the lesson bar they share the available width */
.segs-many { gap: 4px; }
.segs-many i { width: 6px; }
.segs-many i.cur, .segs-many i.done.cur { width: 20px; }
.segs-lg.segs-many { flex: 1; max-width: 680px; }
.segs-lg.segs-many .segs-g { display: flex; }
.segs-lg.segs-many i { flex: 1; width: auto; min-width: 3px; }

/* ---------- Shared: outline (B home, B sheet) ---------- */
.ol { display: grid; gap: 18px; }
.ol-mod-h { display: flex; justify-content: space-between; align-items: center; padding: 0 12px 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ol-mod-h span:last-child { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.ol-mod-h .ok { color: var(--success); }
.ol-mod-h .icon { width: 14px; height: 14px; stroke-width: 3; }
.ol-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-size: 15px; transition: background .15s; }
.ol-row:hover { background: var(--surface-2); }
.ol-row .st { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--border); flex: none; display: grid; place-items: center; color: var(--muted); }
.ol-row .st .icon { width: 13px; height: 13px; }
.ol-row.st-done .st { background: var(--success); border-color: var(--success); color: #fff; }
.ol-row.st-done .st .icon { stroke-width: 3; }
.ol-row.st-locked, .ol-row.st-drip { color: var(--muted); }
.ol-t { flex: 1; min-width: 0; }
.ol-no { display: inline-block; margin-right: 8px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 22px; }
.ol-tag { display: inline-block; margin-left: 8px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 99px; }
.ol-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.ol-meta .icon { width: 15px; height: 15px; }
.ol-row.cur { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ol-row.cur .st { border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--accent-soft), inset 0 0 0 12px var(--accent); }
.ol-row.cur.st-done .st { box-shadow: none; }
.ol-fold summary { list-style: none; cursor: pointer; font-weight: 600; }
.ol-fold summary::-webkit-details-marker { display: none; }
.ol-fold summary .ol-meta .icon { display: inline; width: 14px; height: 14px; transition: transform .2s; }
.ol-fold[open] summary .ol-meta .icon { transform: rotate(90deg); }
.ol-fold > a { padding-left: 24px; }
.ol-row.upnext { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); }
.ol-row.upnext .st { border-color: var(--accent); }

/* ---------- Shared: focus article ---------- */
.focus-lesson { max-width: 760px; margin: 0 auto; padding: 32px 16px 96px; }
.focus-lesson h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin: 8px 0 24px; letter-spacing: -.025em; }
.teacher { display: flex; gap: 12px; align-items: flex-start; }
.teacher > div { display: grid; gap: 2px; font-size: 14px; }
.teacher .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; background: var(--accent); color: var(--accent-ink); }

/* ---------- B · Kursseite + Fokus ---------- */
.kh-hero { position: relative; color: #fff; background: var(--g); overflow: hidden; }
.kh-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.22) 1.5px, transparent 1.6px); background-size: 22px 22px; opacity: .6; }
.kh-hero::after { content: ""; position: absolute; width: 520px; height: 520px; right: -120px; bottom: -300px; border-radius: 50%; background: rgba(255,255,255,.14); }
.kh-hero-in { position: relative; z-index: 1; padding-top: 20px; padding-bottom: 96px; }
.kh-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; opacity: .9; }
.kh-back:hover { opacity: 1; }
.kh-kicker { display: flex; align-items: center; gap: 8px; margin-top: 36px; font-size: 13px; font-weight: 600; opacity: .92; }
.kh-kicker .icon { width: 16px; height: 16px; }
.kh-hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -.03em; margin: 10px 0 8px; text-shadow: 0 2px 24px rgba(0,0,0,.15); }
.kh-hero p { opacity: .92; font-size: 17px; }
.kh-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; margin-top: -64px; position: relative; z-index: 2; padding-bottom: 80px; }
.resume {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center;
  padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.resume-pr { position: relative; width: 76px; height: 76px; }
.resume-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; }
.resume-pct small { font-size: 12px; margin-left: 1px; }
.resume-txt { display: grid; gap: 3px; min-width: 0; }
.resume-txt strong { font-size: 19px; letter-spacing: -.01em; }
.resume-txt .muted { font-size: 14px; }
.resume-btn { height: 52px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
.kh-h2 { font-size: 20px; margin: 36px 0 14px; }
.ol-big { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 10px; }
.kh-main, .kh-side, .course > .lesson { min-width: 0; }
.kh-side { display: grid; gap: 16px; align-content: start; padding-top: 0; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.side-card h3 { font-size: 15px; margin-bottom: 14px; }
.mats .file { padding: 10px; }
.mats .file-ico { width: 38px; height: 46px; font-size: 10px; }
.file.cert .file-ico { background: var(--accent-soft); color: var(--accent); }
.file.cert .file-ico::after { display: none; }
.file.cert .file-ico .icon { width: 20px; height: 20px; }
.file.cert.pending { opacity: .75; }

.focus-bar {
  position: sticky; top: 60px; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.focus-bar > :first-child { justify-self: start; }
.focus-pr { justify-self: end; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.pill {
  display: inline-flex; align-items: center; gap: 12px; height: 42px; padding: 0 14px 0 18px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 14px; font-weight: 600;
  transition: border-color .15s, box-shadow .15s;
}
.pill:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill .chev { width: 16px; height: 16px; color: var(--muted); }

/* sheet: bottom sheet on mobile, anchored panel on desktop */
.sheet-wrap { position: fixed; inset: 0; z-index: 85; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10,10,16,.35); opacity: 0; transition: opacity .25s; }
.sheet {
  position: absolute; left: 50%; top: 116px; width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 140px); overflow-y: auto;
  transform: translate(-50%, -8px); opacity: 0; transition: transform .25s var(--ease), opacity .2s;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding-bottom: 12px;
}
.sheet-wrap.open .sheet { transform: translate(-50%, 0); opacity: 1; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-grip { display: none; }
.sheet-top { position: sticky; top: 0; z-index: 1; background: var(--surface); padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; }
.sheet-head > div { display: grid; gap: 2px; }
.sheet-head .muted { font-size: 13px; }
.sheet .ol { padding: 12px 8px 4px; gap: 14px; }
.sheet-home { display: flex; align-items: center; gap: 8px; margin: 6px 20px 4px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--accent); }

/* ---------- E · Sequenz / Fokus-Modus ---------- */
.seq-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.seq-top > :first-child { justify-self: start; }
.seq-title { display: grid; text-align: center; font-size: 14px; line-height: 1.3; }
.seq-title .muted { font-size: 12px; }
.seq-pr { justify-self: end; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.seq-pr .ring circle { stroke-width: 5; }
.seq-bar {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 12px 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.seq-arrow { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); }
.seq-arrow:hover { border-color: var(--accent); color: var(--accent); }
.seq-arrow.off { opacity: .35; }
.sg-wrap { position: relative; display: flex; gap: 14px; justify-content: safe center; align-items: flex-end; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 6px 2px 2px; }
.sg-wrap::-webkit-scrollbar { display: none; }
.sg-mini { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border-radius: 10px; background: var(--surface-2); color: var(--muted); flex: none; border: 1.5px solid transparent; }
.sg-mini:hover { border-color: var(--border); color: var(--text); }
.sg-mini b { font-size: 12px; }
.sg-mini.ok { background: var(--success-soft); color: var(--success); }
.sg { flex: none; }
.sg { display: grid; gap: 6px; min-width: 0; }
.sg-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-l b { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 5px; background: var(--surface-2); color: var(--text); font-size: 10px; margin-right: 2px; }
.sg.cur .sg-l { color: var(--accent); }
.sg.cur .sg-l b { background: var(--accent); color: var(--accent-ink); }
.sg-i { display: flex; gap: 4px; }
.si {
  position: relative; height: 40px; min-width: 48px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2); color: var(--muted); border: 1.5px solid transparent; transition: background .15s, border-color .15s;
}
.si:hover { border-color: var(--border); color: var(--text); }
.si > .icon { width: 18px; height: 18px; }
.si.st-done { background: var(--success-soft); color: var(--success); }
.si.st-locked, .si.st-drip { opacity: .55; }
.si.cur { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.si-ok { position: absolute; top: -5px; right: -5px; width: 16px; height: 16px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.si-ok .icon { width: 10px; height: 10px; stroke-width: 3.5; }
.si-t { font-size: 13px; font-weight: 600; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.seq-done { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding: 16px 18px; border-radius: var(--radius); background: var(--accent-soft); }
.nav-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.nav-card { display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: border-color .15s, transform .15s var(--ease); }
.nav-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.nav-card .small { display: inline-flex; align-items: center; gap: 4px; }
.nav-card .small .icon { width: 14px; height: 14px; }
.nav-card.next { text-align: right; justify-items: end; }

/* ---------- Prototype switcher ---------- */
.nsw { position: fixed; left: 16px; bottom: 16px; z-index: 80; }
.nsw-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px 0 8px; border-radius: 99px;
  background: var(--text); color: var(--bg); border: 0; box-shadow: var(--shadow-lg);
}
.nsw-btn .icon { width: 16px; height: 16px; opacity: .7; }
.nsw-k { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--accent); color: #fff; flex: none; }
.nsw-n { display: grid; text-align: left; font-size: 14px; font-weight: 600; line-height: 1.2; }
.nsw-n small { font-size: 11px; font-weight: 500; opacity: .65; }
.nsw-pop {
  position: absolute; left: 0; bottom: 64px; width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 100px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 8px; animation: pop .2s var(--ease);
}
.nsw-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 10px 10px 6px; }
.nsw-title .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.nsw-opt { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; border-radius: 14px; padding: 10px; }
.nsw-opt:hover { background: var(--surface-2); }
.nsw-opt.on { background: var(--accent-soft); }
.nsw-opt .nsw-k { background: var(--surface-2); color: var(--text); width: 32px; height: 32px; font-size: 14px; }
.nsw-opt.on .nsw-k { background: var(--accent); color: #fff; }
.nsw-txt { display: grid; gap: 2px; flex: 1; font-size: 14px; }
.nsw-txt em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); border-radius: 99px; padding: 0 6px; margin-left: 4px; }
.nsw-by { font-size: 12px; font-weight: 600; color: var(--accent); }
.nsw-idea { font-size: 13px; color: var(--muted); line-height: 1.45; }
.nsw-opt kbd { font: 600 11px/1 Inter, sans-serif; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; }
.nsw-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; padding: 12px 10px 6px; border-top: 1px solid var(--border); }
.nsw-demo > span { flex-basis: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kh-body { grid-template-columns: 1fr; }
  .kh-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .mobile-only:not([hidden]) { display: revert !important; }
  .sg-l { display: none; }
  .si { min-width: 0; padding: 0 10px; }
  .si-t { display: none; }
  .sg-wrap { gap: 8px; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .kh-hero-in { padding-bottom: 80px; }
  .kh-kicker { margin-top: 24px; }
  .kh-side { grid-template-columns: minmax(0, 1fr); }
  .resume { grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 18px; }
  .resume-pr, .resume-pr .ring { width: 60px; height: 60px; }
  .resume-pct { font-size: 16px; }
  .resume-btn { grid-column: 1 / -1; width: 100%; }
  .ol-row { padding: 10px; gap: 10px; }
  .ol-tn { display: none; }
  .ol-meta .icon { display: none; }
  .ol-big { padding: 14px 6px; }
  .focus-bar { grid-template-columns: auto 1fr auto; padding: 8px 12px; }
  .focus-bar .pill { justify-self: center; gap: 8px; padding: 0 10px 0 14px; font-size: 13px; }
  .pill .segs i { width: 9px; }
  .pill .segs-many { display: none; }
  .sg-mini .segs { display: none; }
  .sg-mini { padding: 0 9px; height: 36px; }
  .seq-done .btn { width: 100%; }
  .nav-cards { grid-template-columns: 1fr; }
  .nav-card.next { order: -1; }
  .nav-card.prev { text-align: left; }
  .si { height: 36px; padding: 0 8px; }
  .si > .icon { width: 16px; height: 16px; }
  .sg-i { gap: 3px; }
  .seq-arrow { width: 36px; height: 36px; }
  .seq-bar { padding: 10px 12px; gap: 8px; }
  /* sheet becomes a real bottom sheet (medium detent) */
  .sheet { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 72vh; border-radius: 22px 22px 0 0; transform: translateY(24px); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .sheet-wrap.open .sheet { transform: none; }
  .sheet-grip { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 8px auto 0; }
  .nsw { left: auto; right: 12px; bottom: 12px; }
  .nsw-btn { height: 44px; padding: 0 10px 0 4px; gap: 6px; }
  .nsw-k { width: 36px; height: 36px; }
  .nsw-n small { display: none; }
  .nsw-n { font-size: 13px; }
  .nsw-pop { left: auto; right: 0; bottom: 56px; }
  .nsw-opt kbd { display: none; }
}

/* =====================================================================
   v5 · Essenz
   Level 1: sticky lesson header (pill or steps, one row) · Level 2: outline panel left · Level 3: course page
   ===================================================================== */
body[data-nav="F"] .topbar { position: relative; }
.fhead { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.fhead .focus-bar, .fbar { border-bottom: 0; }
.fbar-r { justify-self: end; display: inline-flex; align-items: center; gap: 12px; }
.fp-toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 14px/1 Inter, system-ui, sans-serif;
  transition: border-color .15s, background .15s, color .15s;
}
.fp-toggle .icon { width: 18px; height: 18px; }
.fp-toggle:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.fp-toggle.on { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.fp-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.fp-body { display: grid; grid-template-columns: minmax(0, 1fr); }
.panel-open .fp-body { grid-template-columns: minmax(0, 1fr) 340px; }
.fpanel { order: 2; }
.fp-body > .focus-lesson { min-width: 0; width: 100%; }

/* Level 2 · side panel */
.fpanel {
  position: sticky; top: var(--fh, 63px); height: calc(100vh - var(--fh, 63px)); display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border-left: 1px solid var(--border);
}
.fpanel.anim { animation: fpanel-in .22s var(--ease); }
@keyframes fpanel-in { from { opacity: 0; transform: translateX(12px); } }
.fpanel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 16px 12px 10px 18px; }
.fpanel-t { display: grid; gap: 2px; font-size: 14px; line-height: 1.35; min-width: 0; }
.fpanel-t .muted { font-size: 12px; }
.fpanel-pr { margin: 0 18px 12px; height: 6px; }
.fpanel-list { position: relative; flex: 1; overflow-y: auto; padding: 12px 8px 16px; border-top: 1px solid var(--border); overscroll-behavior: contain; }
.fpanel .ol { gap: 14px; }
.fpanel .ol-mod-h { padding: 0 10px 4px; font-size: 11px; }
.fpanel .ol-row { padding: 8px 10px; gap: 10px; font-size: 14px; line-height: 1.35; }
.fpanel .ol-row .st { width: 22px; height: 22px; }
.fpanel .ol-no { min-width: 20px; margin-right: 6px; font-size: 12px; }
.fpanel .ol-tn, .fpanel .ol-meta .icon { display: none; }
.fpanel .ol-meta { font-size: 12px; }
.fpanel .ol-fold summary .ol-meta .icon { display: inline; }
.fpanel-home { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--accent); }
.fpanel-home .icon { width: 16px; height: 16px; }

/* bottom of the lesson */
.seq-done.is-done { background: var(--success-soft); }
.seq-done.is-done > span { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-weight: 600; }
.seq-done.is-done > span .icon { width: 16px; height: 16px; stroke-width: 3; }
.seq-done.is-done .linkbtn { color: var(--muted); font-weight: 500; font-size: 14px; }
.nav-card.end { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: var(--accent-soft); }
.nav-card.end strong { color: var(--accent); }

/* prototype control: creator settings */
.nsw-row { display: grid; gap: 6px; padding: 8px 10px; }
.nsw-row > span { font-size: 13px; font-weight: 600; }
.nsw-row.off { opacity: .45; }
.segc { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--surface-2); }
.segc button { flex: 1; border: 0; background: none; padding: 8px 6px; border-radius: 8px; font: 600 13px/1 Inter, system-ui, sans-serif; color: var(--muted); }
.segc button:hover:not(:disabled) { color: var(--text); }
.segc button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(16,16,24,.12); }
.nsw-note { font-size: 12px; color: var(--muted); padding: 6px 10px 4px; line-height: 1.45; }

@media (max-width: 1099px) {
  .panel-open .fp-body { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 899px) {
  .fpanel { display: none; }
  .panel-open .fp-body { grid-template-columns: minmax(0, 1fr); }
  .top-pill .fp-toggle { display: none; }
  .fp-toggle.on { background: var(--surface); color: var(--text); border-color: var(--border); }
}
@media (max-width: 640px) {
  .hide-md { display: none; }
  .fp-toggle { padding: 0 9px; }
  .fbar-r { gap: 8px; }
  .top-steps .focus-pr { display: none; }
  .top-steps .fbar { gap: 8px; padding: 8px 10px; }
}

/* header: steps live in the one header row */
.top-steps .fbar { grid-template-columns: auto minmax(0, 1fr) auto; }
.top-steps .fbar .sg-wrap { padding-top: 2px; }
.top-steps .sg-l { display: none; }
.top-steps .si { height: 36px; min-width: 40px; padding: 0 10px; }

/* end of lesson: the forward card is the one primary action */
.nav-card.go { text-align: right; justify-items: end; border: 0; background: var(--accent); color: var(--accent-ink); font: inherit; cursor: pointer; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent); }
.nav-card.go:hover { background: var(--accent-hover); }
.nav-card.go .small { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; opacity: .92; }
.nav-card.go .small .icon { width: 15px; height: 15px; stroke-width: 3; }
.nav-card.go strong { font-size: 17px; }
.nav-card.go:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.nav-cards { margin-top: 40px; align-items: stretch; }
.nav-card.prev { align-content: center; }
.done-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 40px 0 -24px; font-size: 14px; color: var(--success); font-weight: 600; }
.done-note > .icon { width: 16px; height: 16px; stroke-width: 3; }
.done-note .linkbtn { color: var(--muted); font-weight: 500; margin-left: 6px; }
.seq-done + .nav-cards { margin-top: 16px; }
.nav-card.go .small, .nav-card.go strong { color: var(--accent-ink); }
@media (max-width: 640px) { .nav-card.go { text-align: left; justify-items: start; } .done-note { margin-bottom: -28px; } }

/* v8 · preview of unpublished changes */
.preview-ribbon { position: relative; z-index: 40; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; font-size: 13px; background: #FFF4D6; color: #6B4A00; border-bottom: 1px solid #F1D99A; text-align: center; }
.preview-ribbon .icon { width: 16px; height: 16px; flex: none; }
:root[data-theme="dark"] .preview-ribbon { background: #2A2311; color: #F3D27A; border-color: #4A3D17; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .preview-ribbon { background: #2A2311; color: #F3D27A; border-color: #4A3D17; } }
