/* Ascent - design tokens, layout and components. */

:root {
  --bg: #090c12;
  --bg-2: #0d1119;
  --surface: #121722;
  --surface-2: #181e2c;
  --surface-3: #212939;
  --border: #232b3c;
  --border-2: #323c53;
  --text: #e7eaf2;
  --text-2: #b9c0d2;
  --muted: #7f899f;
  --accent: #f6b73c;
  --accent-2: #ffd27a;
  --accent-ink: #1b1303;
  --accent-soft: rgba(246, 183, 60, .12);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .11);
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, .11);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, .11);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, .12);
  --code-bg: #0b0f17;
  --shadow: 0 12px 34px rgba(0, 0, 0, .38);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 228px;
  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", "JetBrains Mono", "Fira Code", Consolas, "SF Mono", Menlo, monospace;

  --t-kw: #c792ea; --t-str: #a5e075; --t-num: #f78c6c; --t-com: #5f6a83; --t-bi: #7fdbca;
  --t-def: #82aaff; --t-cls: #ffcb6b; --t-dec: #f6b73c; --t-op: #89ddff; --t-const: #ff9e64;
  --t-self: #f07178; --t-call: #b7ccff;

  --green: #34d399; --blue: #60a5fa; --violet-c: #a78bfa; --amber: #fbbf24;
  --pink: #fb7185; --cyan: #22d3ee; --gold: #f6b73c;
  --c: var(--accent);
}

[data-theme="light"] {
  --bg: #f3f4f8;
  --bg-2: #e9ebf2;
  --surface: #ffffff;
  --surface-2: #f5f6fa;
  --surface-3: #eaedf4;
  --border: #dde1ea;
  --border-2: #c6ccda;
  --text: #171b26;
  --text-2: #3b4356;
  --muted: #687188;
  --accent: #c27803;
  --accent-2: #a86400;
  --accent-ink: #ffffff;
  --accent-soft: rgba(194, 120, 3, .1);
  --ok: #0c9463;
  --ok-soft: rgba(12, 148, 99, .09);
  --bad: #d5303a;
  --bad-soft: rgba(213, 48, 58, .08);
  --info: #2563eb;
  --info-soft: rgba(37, 99, 235, .08);
  --violet: #7c3aed;
  --violet-soft: rgba(124, 58, 237, .08);
  --code-bg: #f8f9fc;
  --shadow: 0 12px 30px rgba(24, 34, 64, .09);

  --t-kw: #8839ef; --t-str: #2b8a1e; --t-num: #d15a00; --t-com: #8a92a6; --t-bi: #0c7a84;
  --t-def: #1e5fe0; --t-cls: #a86a05; --t-dec: #a86a05; --t-op: #0b6f83; --t-const: #c2410c;
  --t-self: #be185d; --t-call: #3157c9;

  --green: #0c9463; --blue: #2563eb; --violet-c: #7c3aed; --amber: #b7791f;
  --pink: #e11d48; --cyan: #0891b2; --gold: #c27803;
}

.c-green { --c: var(--green); } .c-blue { --c: var(--blue); } .c-violet { --c: var(--violet-c); }
.c-amber { --c: var(--amber); } .c-pink { --c: var(--pink); } .c-cyan { --c: var(--cyan); }
.c-gold { --c: var(--gold); }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; scroll-padding-top: 20px; }
body {
  margin: 0; min-height: 100%; background: var(--bg); color: var(--text);
  font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.015em; font-weight: 680; }
h1 { font-size: 30px; letter-spacing: -.025em; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
kbd {
  font: 11.5px/1 var(--mono); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--border-2);
  border-bottom-width: 2px; background: var(--surface-2); color: var(--text-2);
}
.icon { flex: none; vertical-align: -3px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.fine { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.row.center { justify-content: center; }
.row.wrap, .wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.eyebrow {
  display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; letter-spacing: .09em;
  text-transform: uppercase; color: var(--c);
}
.dotsep { opacity: .5; }
.lead { font-size: 16.5px; color: var(--text-2); margin: 8px 0 0; max-width: 68ch; }
.link { color: var(--accent); display: inline-flex; align-items: center; gap: 3px; font-size: 13.5px; font-weight: 560; }
.link:hover { color: var(--accent-2); }
.section-title { margin: 34px 0 12px; }

/* ---------------------------------------------------------------- layout */
#app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; }
.page { max-width: 1120px; margin: 0 auto; padding: 38px 36px 90px; }
.page-narrow { max-width: 820px; }
.page-lesson { max-width: 860px; }
.center-col { margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; flex-wrap: wrap; }
.head-side { display: flex; align-items: center; gap: 12px; }
body.bare .sidebar { display: none; }

.sidebar {
  position: sticky; top: 0; height: 100vh; width: var(--sidebar-w); flex: none; display: flex;
  flex-direction: column; padding: 18px 12px 14px; background: var(--bg-2); border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand-name { font-size: 19px; font-weight: 720; letter-spacing: -.03em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: var(--text-2);
  font-weight: 540; font-size: 14.5px; position: relative; transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); }
.nav-item.active .icon { color: var(--accent); }
.nav-badge {
  margin-left: auto; min-width: 20px; padding: 0 6px; height: 20px; border-radius: 10px; background: var(--accent);
  color: var(--accent-ink); font-size: 11.5px; font-weight: 700; display: grid; place-items: center;
}
.side-foot { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.side-profile { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; }
.side-profile:hover { background: var(--surface); }
.side-who { min-width: 0; }
.side-name { font-weight: 640; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-rank { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-meta { display: flex; gap: 6px; }
.side-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 8px; font-size: 12.5px;
  font-weight: 620; color: var(--text-2); background: var(--surface); border: 1px solid var(--border);
}
.side-chip.lit { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.side-settings { margin-left: auto; }
.side-settings:hover { color: var(--text); }

/* ---------------------------------------------------------------- primitives */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card.pad { padding: 20px 22px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 15px;
  border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: 14px; line-height: 1.3; white-space: nowrap; position: relative;
  transition: background .12s, border-color .12s, transform .06s, opacity .12s;
}
.btn:hover:not(:disabled) { background: var(--surface-3); border-color: var(--muted); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn.danger { background: transparent; border-color: color-mix(in srgb, var(--bad) 55%, var(--border)); color: var(--bad); }
.btn.danger:hover:not(:disabled) { background: var(--bad-soft); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 11px 20px; font-size: 15px; border-radius: 12px; }
.btn.armed { color: var(--bad); }
.btn.busy { pointer-events: none; }
.btn.busy > * { opacity: .35; }
.btn.busy::after {
  content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 120px 0; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }

.ring-wrap { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring { display: block; }
.ring-track { stroke: var(--surface-3); }
.ring-value { stroke: var(--c); transition: stroke-dashoffset .5s ease; }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--text); text-align: center; line-height: 1.1; }
.ring-label .icon { color: var(--c); }
.ring-label strong { display: block; font-size: 1.5em; }
.ring-label small { display: block; font-weight: 500; color: var(--muted); font-size: .8em; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress.thin { height: 5px; }
.progress-bar { height: 100%; border-radius: 99px; background: var(--c); transition: width .4s ease; }

.badge, .tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px;
  font-weight: 620; white-space: nowrap; border: 1px solid var(--border); color: var(--text-2); background: var(--surface-2);
}
.tag { font-weight: 540; margin-left: 8px; }
.badge.b-mastered, .badge.b-completed { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--border)); background: var(--ok-soft); }
.badge.b-ready { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--accent-soft); }
.badge.b-in_progress, .badge.b-available { color: var(--info); border-color: color-mix(in srgb, var(--info) 35%, var(--border)); background: var(--info-soft); }
.badge.b-locked { color: var(--muted); }
.tag.level-easy { color: var(--ok); } .tag.level-medium { color: var(--accent); } .tag.level-hard { color: var(--bad); }
.tag.stretch { color: var(--violet); }
.banner {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 15px; border-radius: 11px; margin: 14px 0;
  background: var(--info-soft); border: 1px solid color-mix(in srgb, var(--info) 30%, var(--border)); color: var(--text-2); font-size: 14px;
}
.banner .icon { color: var(--info); margin-top: 2px; }
.banner.warn { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.banner.warn .icon { color: var(--accent); }
.empty { text-align: center; padding: 48px 28px; }
.empty h2 { font-size: 22px; margin-bottom: 8px; }
.empty .lead, .empty p { margin-left: auto; margin-right: auto; max-width: 56ch; }
.empty .row { margin-top: 22px; }
.empty-icon { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.text-input, .select, .search-input {
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 10px; padding: 8px 12px; outline: none; min-width: 0;
}
.text-input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.text-input.big { font-size: 17px; padding: 12px 16px; width: 100%; max-width: 380px; text-align: center; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-row.center { justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border-2);
  background: transparent; color: var(--text-2); font-size: 13.5px; font-weight: 540; transition: all .12s;
}
.chip small { color: var(--muted); font-size: 11.5px; }
button.chip:hover { border-color: var(--muted); color: var(--text); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip.static { cursor: default; font-size: 12.5px; padding: 3px 10px; }
.field-label { font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); gap: 2px; }
.seg-item {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 8px; border: 0; background: transparent;
  color: var(--text-2); font-weight: 580; font-size: 13.5px;
}
.seg-item.on { background: var(--surface-3); color: var(--text); }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; margin: 0; }
.switch-track { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--border-2); transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform .15s, background .15s; }
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(20px); background: var(--accent-ink); }

#toasts { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  padding: 10px 16px; border-radius: 11px; background: var(--surface-3); border: 1px solid var(--border-2); box-shadow: var(--shadow);
  font-weight: 580; font-size: 14px; max-width: 420px; opacity: 0; transform: translateY(8px); transition: opacity .22s, transform .22s;
}
.toast.show { opacity: 1; transform: none; }
.toast-xp { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 720; }
.toast-bad { border-color: var(--bad); color: var(--bad); }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }

/* ---------------------------------------------------------------- home */
.continue-card {
  position: relative; display: flex; align-items: center; gap: 22px; padding: 26px 28px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, var(--surface)) 0%, var(--surface) 62%);
  border: 1px solid color-mix(in srgb, var(--c) 34%, var(--border)); transition: transform .15s, border-color .15s;
}
.continue-card:hover { transform: translateY(-2px); border-color: var(--c); }
.continue-glow { position: absolute; right: -80px; top: -120px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 22%, transparent), transparent 68%); pointer-events: none; }
.continue-body { flex: 1; min-width: 0; position: relative; }
.continue-title { font-size: 25px; font-weight: 700; letter-spacing: -.025em; margin: 6px 0 2px; }
.continue-sub { color: var(--text-2); }
.streak-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 13.5px; }
.streak-pill strong { font-size: 16px; color: var(--text); }
.streak-pill.lit { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.streak-pill.lit strong { color: var(--accent); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat-value { font-size: 23px; font-weight: 720; line-height: 1.1; letter-spacing: -.02em; }
.stat-label { font-size: 13px; color: var(--text-2); }
.stat-sub { font-size: 12px; color: var(--muted); }
.track-list { display: flex; flex-direction: column; gap: 4px; }
.track-row { display: flex; align-items: center; gap: 13px; padding: 9px 8px; border-radius: 10px; }
.track-row:hover { background: var(--surface-2); }
.track-num {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 720; flex: none;
  background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c);
}
.track-row.is-locked .track-num { background: var(--surface-3); color: var(--muted); }
.track-row.is-locked .track-row-title { color: var(--muted); }
.track-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.track-row-title { font-weight: 600; font-size: 14.5px; }
.track-row-pct { font-size: 12.5px; color: var(--muted); width: 52px; text-align: right; }
.review-card.has-due { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.ready-list { display: flex; flex-direction: column; gap: 13px; }
.ready-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; gap: 10px; }
.ready-top .muted { font-size: 12.5px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quick { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: border-color .12s, transform .12s; }
.quick:hover { border-color: var(--border-2); transform: translateY(-1px); }
.quick > .icon { color: var(--accent); }
.quick strong { display: block; font-size: 14.5px; }
.quick span { font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- path */
.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--border-2); background: var(--surface); color: var(--muted); min-width: 330px; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-input { border: 0; background: transparent; padding: 9px 0; flex: 1; color: var(--text); }
.search-results { display: flex; flex-direction: column; gap: 8px; }
.track { display: flex; gap: 20px; }
.track-rail { position: relative; width: 38px; flex: none; display: flex; justify-content: center; }
.track-rail::before { content: ""; position: absolute; top: 44px; bottom: -6px; width: 2px; background: linear-gradient(var(--border-2), var(--border)); }
.track:last-child .track-rail::before { display: none; }
.track-node {
  position: relative; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 740;
  background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, var(--border));
}
.track.is-locked .track-node { background: var(--surface); color: var(--muted); border-color: var(--border); }
.track.is-cleared .track-node { background: var(--c); color: var(--bg); }
.track-content { flex: 1; min-width: 0; padding-bottom: 34px; }
.track-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.track-head h2 { font-size: 22px; margin: 4px 0; }
.track-head p { margin: 0; }
.track.is-locked .track-head h2 { color: var(--text-2); }
.module { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; overflow: hidden; transition: border-color .12s; }
.module:hover { border-color: var(--border-2); }
.module.is-locked { background: transparent; }
.module.is-locked .module-title { color: var(--text-2); }
.module-head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; background: transparent; border: 0; text-align: left; }
.module-main { flex: 1; min-width: 0; }
.module-title { font-weight: 660; font-size: 16px; }
.module-sub { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.module-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.module-count { font-size: 12px; }
.chev { color: var(--muted); transition: transform .18s; display: grid; }
.module.open .chev { transform: rotate(180deg); }
.module-body { display: none; border-top: 1px solid var(--border); padding: 6px; }
.module.open .module-body { display: block; }
.lesson-row, .exam-row { display: flex; align-items: center; gap: 13px; padding: 10px 12px; border-radius: 10px; }
a.lesson-row:hover { background: var(--surface-2); }
.lesson-row.locked { opacity: .55; }
.lesson-row.card { padding: 13px 15px; }
.lesson-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px solid var(--border-2); color: var(--muted); }
.lesson-dot.is-completed { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.lesson-dot.is-in_progress { border-color: var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.lesson-dot.is-available { border-color: var(--c); color: var(--c); }
.lesson-dot.exam { border-radius: 9px; border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); color: var(--accent); }
.lesson-dot.exam.is-completed { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.lesson-main { flex: 1; min-width: 0; }
.lesson-title { font-weight: 590; font-size: 14.5px; }
.lesson-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.exam-row { margin-top: 4px; border-top: 1px dashed var(--border); border-radius: 0 0 10px 10px; padding-top: 12px; }
.exam-row .lesson-sub { white-space: normal; }

/* ---------------------------------------------------------------- lesson */
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.lesson-col { min-width: 0; }
.toc { display: none; position: sticky; top: 30px; align-self: start; max-height: calc(100vh - 60px); overflow: auto; font-size: 13px; }
.toc-title { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--border); color: var(--muted); line-height: 1.35; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--c); border-left-color: var(--c); font-weight: 600; }
@media (min-width: 1400px) {
  .page-lesson.has-toc { max-width: 1150px; }
  .page-lesson.has-toc .lesson-layout { grid-template-columns: minmax(0, 812px) 210px; gap: 56px; }
  .toc { display: block; }
}
.lesson-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }
.lesson-progress { display: flex; align-items: center; gap: 10px; }
.pips { display: flex; gap: 5px; }
.pip { width: 22px; height: 7px; border-radius: 99px; border: 0; padding: 0; background: var(--surface-3); transition: background .25s; }
.pip.code { width: 30px; }
.pip.done { background: var(--c); }
.pip:hover { outline: 1px solid var(--muted); }
.pips-count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lesson-head { margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.lesson-head h1 { font-size: 36px; letter-spacing: -.03em; }
.lesson-meta-row { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.meta.done { color: var(--ok); }
.lesson-foot { margin-top: 40px; }
.lesson-done, .ch-pass {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--border));
}
.lesson-done-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--ok); color: var(--bg); display: grid; place-items: center; flex: none; }
.lesson-nav { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.lesson-nav .muted { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.next-slot { margin-top: 18px; }

/* ---------------------------------------------------------------- markdown */
.md { font-size: 16.5px; line-height: 1.75; color: var(--text); }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md p { margin: 0 0 16px; }
.md h2 { font-size: 25px; margin: 44px 0 14px; letter-spacing: -.02em; }
.md h3 { font-size: 19.5px; margin: 32px 0 10px; }
.md h4 { font-size: 16.5px; margin: 24px 0 8px; }
.md h5 { font-size: 13px; margin: 20px 0 6px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.md ul, .md ol { margin: 0 0 16px; padding-left: 26px; }
.md li { margin: 5px 0; }
.md li > ul, .md li > ol { margin: 5px 0; }
.md li::marker { color: var(--muted); }
.md strong { font-weight: 660; color: var(--text); }
.md a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.md a:hover { text-decoration-color: var(--accent); }
.md code, .md-inline code, .answer-chip {
  font: .88em var(--mono); font-variant-ligatures: none; padding: 2px 6px; border-radius: 6px;
  background: var(--surface-3); color: var(--accent-2); border: 1px solid var(--border);
}
[data-theme="light"] .md code, [data-theme="light"] .md-inline code, [data-theme="light"] .answer-chip { color: #8a4b00; }
.md mark { background: var(--accent-soft); color: var(--accent-2); padding: 1px 4px; border-radius: 4px; }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 30px 0; }
.md blockquote { margin: 0 0 16px; padding: 4px 18px; border-left: 3px solid var(--border-2); color: var(--text-2); }
.md-compact { font-size: 15px; line-height: 1.6; }
.md-compact p { margin-bottom: 8px; }
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.md table, table.data { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.md th, .md td, table.data th, table.data td { padding: 9px 13px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.md th, table.data th { background: var(--surface-2); font-weight: 640; font-size: 13px; color: var(--text-2); }
.md tr:last-child td, table.data tr:last-child td { border-bottom: 0; }
.callout { margin: 20px 0; padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border); border-left-width: 3px; background: var(--surface); --k: var(--info); border-left-color: var(--k); }
.callout-title { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--k); margin-bottom: 6px; }
.callout-body { font-size: 15.5px; line-height: 1.68; }
.callout-body > *:last-child { margin-bottom: 0; }
.callout-tip, .callout-analogy { --k: var(--ok); background: var(--ok-soft); }
.callout-warning, .callout-mistake { --k: var(--bad); background: var(--bad-soft); }
.callout-key { --k: var(--accent); background: var(--accent-soft); }
.callout-interview { --k: var(--violet); background: var(--violet-soft); }
.callout-deep { --k: var(--cyan); background: color-mix(in srgb, var(--cyan) 8%, transparent); }
.callout-note { background: var(--info-soft); }
details.box { margin: 20px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
details.box > summary { cursor: pointer; padding: 12px 16px; font-weight: 620; display: flex; align-items: center; gap: 8px; list-style: none; color: var(--text-2); }
details.box > summary::-webkit-details-marker { display: none; }
details.box > summary:hover { color: var(--text); }
details.box[open] > summary { border-bottom: 1px solid var(--border); color: var(--text); }
details.box-deep > summary .icon { color: var(--cyan); }
.box-body { padding: 16px 18px; font-size: 15.5px; }

/* ---------------------------------------------------------------- code */
.t-kw { color: var(--t-kw); } .t-str { color: var(--t-str); } .t-num { color: var(--t-num); }
.t-com { color: var(--t-com); font-style: italic; } .t-bi { color: var(--t-bi); } .t-def { color: var(--t-def); }
.t-cls { color: var(--t-cls); } .t-dec { color: var(--t-dec); } .t-op { color: var(--t-op); }
.t-const { color: var(--t-const); } .t-self { color: var(--t-self); font-style: italic; } .t-call { color: var(--t-call); }
pre, code { font-family: var(--mono); font-variant-ligatures: none; }
.code { position: relative; margin: 18px 0; border-radius: var(--radius-sm); background: var(--code-bg); border: 1px solid var(--border); }
.code pre { margin: 0; padding: 13px 16px; overflow-x: auto; font-size: 13.5px; line-height: 21px; white-space: pre; tab-size: 4; }
.code pre code { background: none; border: 0; padding: 0; font-size: inherit; color: var(--text); }
.code-label { position: absolute; top: 7px; right: 40px; font: 600 10.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.code-copy { position: absolute; top: 5px; right: 6px; width: 28px; height: 26px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); opacity: 0; transition: opacity .12s; display: grid; place-items: center; }
.code:hover .code-copy, .code-copy:focus-visible { opacity: 1; }
.code-copy:hover { background: var(--surface-3); color: var(--text); }
.code-copy.done { color: var(--ok); opacity: 1; }
.code.is-output { background: transparent; border-style: dashed; }
.code.is-output pre { color: var(--text-2); }

.runner { margin: 20px 0; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--surface); overflow: hidden; }
.runner .ed { border: 0; border-radius: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); box-shadow: none; }
.runner-bar, .play-bar { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; }
.runner-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.runner-out:empty { display: none; }
.runner-out { padding: 12px 14px; }
.runner .stdin { margin: 10px 14px 0; }
.out-text, .out-error, .tr-out, .test-msg, .answer-pre {
  margin: 0; font-size: 13.5px; line-height: 21px; white-space: pre-wrap; word-break: break-word; tab-size: 4;
}
.out-text { color: var(--text); }
.out-error { color: var(--bad); margin-top: 6px; padding: 10px 12px; border-radius: 8px; background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 25%, transparent); overflow-x: auto; white-space: pre; }
.out-text + .out-error { margin-top: 10px; }
.out-empty { color: var(--muted); font-size: 13.5px; font-style: italic; }
.out-meta { margin-top: 8px; font-size: 12px; color: var(--muted); }
.err-help { display: flex; gap: 9px; margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); font-size: 14px; color: var(--text-2); line-height: 1.55; }
.err-help .icon { color: var(--accent); margin-top: 3px; }
.stdin { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.stdin-label, .results-label, .predict-label { font-size: 11.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.results-label { margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.stdin-input { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px; font: 13.5px/1.5 var(--mono); resize: vertical; outline: none; }
.stdin-input:focus { border-color: var(--accent); }

/* editor */
.ed { border: 1px solid var(--border-2); border-radius: var(--radius-sm); background: var(--code-bg); overflow: hidden; transition: border-color .12s, box-shadow .12s; }
.ed.focused { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); box-shadow: 0 0 0 3px var(--accent-soft); }
.ed-scroll { overflow: auto; max-height: 520px; }
.ed-inner { display: flex; min-width: 100%; width: max-content; }
.ed-gutter, .ed-hl, .ed-ta { font: 13.5px/21px var(--mono); font-variant-ligatures: none; letter-spacing: 0; tab-size: 4; }
.ed-gutter {
  position: sticky; left: 0; z-index: 2; flex: none; margin: 0; padding: 12px 10px 12px 12px; min-width: 42px; text-align: right;
  color: var(--muted); opacity: .75; background: var(--code-bg); border-right: 1px solid var(--border); user-select: none; white-space: pre;
}
.ed-code { position: relative; flex: 1 0 auto; }
.ed-hl { margin: 0; padding: 12px 28px 12px 12px; white-space: pre; pointer-events: none; color: var(--text); min-height: 45px; }
.ed-hl code { font: inherit; background: none; border: 0; padding: 0; color: inherit; }
.ed-ta {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 12px 0 0 12px; border: 0; outline: 0; resize: none;
  background: transparent; color: transparent; -webkit-text-fill-color: transparent; caret-color: var(--text);
  white-space: pre; overflow: hidden; z-index: 1;
}
.ed-ta::selection { background: color-mix(in srgb, var(--info) 34%, transparent); }
.ed-mark { position: absolute; left: 0; right: 0; pointer-events: none; background: var(--bad-soft); box-shadow: inset 3px 0 0 var(--bad); }

/* tracer */
.tracer { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); padding: 12px; outline: none; }
.tracer:focus-visible { border-color: var(--accent); }
.tr-caption { font-size: 14px; font-weight: 600; padding: 7px 12px; border-radius: 8px; background: var(--surface-2); color: var(--text); }
.tr-caption.ev-call { color: var(--info); } .tr-caption.ev-return { color: var(--violet); }
.tr-caption.ev-exception, .tr-caption.ev-error, .tr-caption.ev-unwind { color: var(--bad); } .tr-caption.ev-end { color: var(--ok); }
.tr-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 10px; }
.tr-code { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 0; font: 13px/21px var(--mono); overflow: auto; max-height: 400px; }
.tr-line { display: flex; white-space: pre; padding-right: 12px; border-left: 3px solid transparent; }
.tr-line.cur { background: var(--accent-soft); border-left-color: var(--accent); }
.tr-line.was { background: color-mix(in srgb, var(--info) 7%, transparent); border-left-color: color-mix(in srgb, var(--info) 55%, transparent); }
.tr-no { width: 34px; text-align: right; padding-right: 10px; color: var(--muted); opacity: .7; flex: none; user-select: none; }
.tr-state { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-height: 400px; overflow: auto; }
.tr-h { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.tr-frame { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); margin-bottom: 7px; overflow: hidden; }
.tr-frame.active { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.tr-frame-name { padding: 5px 10px; font: 600 12px var(--mono); background: var(--surface-2); color: var(--text-2); }
.tr-frame.active .tr-frame-name { color: var(--accent); }
.tr-var { display: flex; justify-content: space-between; gap: 12px; padding: 4px 10px; font: 13px/1.5 var(--mono); border-top: 1px solid var(--border); transition: background .5s; }
.tr-var.changed, .tr-obj.changed { animation: flash 1s ease; }
@keyframes flash { 0% { background: color-mix(in srgb, var(--accent) 30%, transparent); } 100% { background: transparent; } }
.tr-var.tr-ret { color: var(--violet); }
.tr-name { color: var(--text); }
.tr-empty { padding: 4px 10px; font-size: 12.5px; color: var(--muted); font-style: italic; }
.tv { color: var(--text-2); word-break: break-all; text-align: right; }
.tv-int, .tv-float, .tv-complex { color: var(--t-num); } .tv-str { color: var(--t-str); }
.tv-bool, .tv-NoneType { color: var(--t-const); } .tv-function, .tv-class, .tv-module { color: var(--t-def); }
.tr-attr { color: var(--text); }
.tr-ref, .tr-obj-id { display: inline-block; padding: 0 7px; border-radius: 6px; font: 700 12px/19px var(--mono); background: color-mix(in srgb, var(--oc) 18%, transparent); color: var(--oc); border: 1px solid color-mix(in srgb, var(--oc) 50%, transparent); cursor: default; }
.oc0 { --oc: #60a5fa; } .oc1 { --oc: #f6b73c; } .oc2 { --oc: #34d399; } .oc3 { --oc: #fb7185; }
.oc4 { --oc: #a78bfa; } .oc5 { --oc: #22d3ee; } .oc6 { --oc: #f97316; } .oc7 { --oc: #e879f9; }
.tr-ref.hl, .tr-obj.hl { box-shadow: 0 0 0 2px var(--oc); }
.tr-obj { border: 1px solid color-mix(in srgb, var(--oc) 40%, var(--border)); border-radius: 8px; background: var(--surface); margin-bottom: 7px; overflow: hidden; }
.tr-obj-head { display: flex; align-items: center; gap: 8px; padding: 5px 10px; font: 600 12px var(--mono); color: var(--text-2); background: var(--surface-2); }
.tr-obj-body { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 10px; font: 13px/1.5 var(--mono); }
.tr-obj-body.tr-pairs { flex-direction: column; gap: 3px; }
.tr-cell { display: inline-flex; flex-direction: column; align-items: center; min-width: 30px; padding: 2px 7px 4px; border: 1px solid var(--border); border-radius: 6px; background: var(--code-bg); }
.tr-idx { font-size: 10px; color: var(--muted); line-height: 1.3; }
.tr-pair { display: flex; gap: 7px; align-items: baseline; }
.tr-sep { color: var(--muted); }
.tr-obj-body .tr-empty { padding: 0; }
.tr-out-wrap { margin-top: 10px; }
.tr-out { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; min-height: 37px; max-height: 150px; overflow: auto; }
.tr-out.empty { color: var(--muted); font-style: italic; font-family: var(--sans); }
.tr-controls { display: flex; align-items: center; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.tr-slider { flex: 1; min-width: 110px; accent-color: var(--accent); }
.tr-count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------------------------------------------------------- checks */
.check { margin: 26px 0; padding: 18px 20px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-2); position: relative; }
.check::before { content: ""; position: absolute; left: -1px; top: 16px; bottom: 16px; width: 3px; border-radius: 3px; background: var(--c); }
.check.solved::before { background: var(--ok); }
.check.solved { border-color: color-mix(in srgb, var(--ok) 30%, var(--border)); }
.check.review-item.wrong::before { background: var(--bad); }
.check.review-item.right::before { background: var(--ok); }
.check-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; flex-wrap: wrap; }
.check-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--c); }
.check.solved .check-kicker { color: var(--ok); }
.check-type { font-size: 12px; color: var(--muted); padding-left: 9px; border-left: 1px solid var(--border-2); }
.check-status { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; color: var(--ok); }
.check-prompt .md { font-size: 16px; line-height: 1.65; }
.check-prompt { margin-bottom: 14px; }
.check-prompt .code:last-child { margin-bottom: 0; }
.check-actions { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt {
  display: flex; align-items: flex-start; gap: 12px; padding: 11px 14px; border-radius: 11px; border: 1px solid var(--border-2);
  background: var(--bg-2); text-align: left; width: 100%; font-size: 15px; line-height: 1.55; transition: border-color .1s, background .1s;
}
.opt:hover { border-color: var(--muted); }
.opts.locked .opt { cursor: default; }
.opts.locked .opt:hover { border-color: var(--border-2); }
.opt-mark { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-2); flex: none; margin-top: 3px; position: relative; transition: all .1s; }
.opt-mark.square { border-radius: 5px; }
.opt.selected { border-color: var(--accent); background: var(--accent-soft); }
.opt.selected .opt-mark { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--bg-2); }
.opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.opt.correct .opt-mark { border-color: var(--ok); background: var(--ok); box-shadow: inset 0 0 0 3px var(--bg-2); }
.opt.wrong { border-color: color-mix(in srgb, var(--bad) 60%, var(--border)); background: var(--bad-soft); }
.opt.wrong .opt-mark { border-color: var(--bad); }
.opt.eliminated { opacity: .55; cursor: not-allowed; }
.opt.eliminated .opt-text { text-decoration: line-through; text-decoration-color: var(--bad); }
.opt-text { flex: 1; min-width: 0; }
.opt-text .md p { margin: 0; }
.opt-text .code { margin: 6px 0 0; }
.shake { animation: shake .35s; }
@keyframes shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
.predict .code { margin: 0 0 12px; }
.predict-label { display: block; margin-bottom: 6px; }
.predict-input, .short-input, .flash-notes {
  width: 100%; background: var(--code-bg); border: 1px solid var(--border-2); border-radius: 10px; padding: 10px 13px;
  font: 14px/1.55 var(--mono); outline: none; resize: vertical; display: block;
}
.short-input { font-family: var(--sans); font-size: 15.5px; max-width: 420px; }
.predict-input:focus, .short-input:focus, .flash-notes:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.predict-input.ok, .short-input.ok { border-color: var(--ok); background: var(--ok-soft); }
.predict-input.bad, .short-input.bad { border-color: var(--bad); }
.expected { margin-top: 12px; }
.expected .out-text { padding: 10px 13px; border-radius: 10px; background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.short .expected { display: flex; align-items: center; gap: 10px; }
.fill-code { margin: 0; }
.fill-code pre { line-height: 30px; }
.fill-input {
  font: 13.5px var(--mono); padding: 2px 7px; margin: 0 2px; border-radius: 6px; border: 1px solid var(--accent);
  background: var(--accent-soft); color: var(--text); outline: none; min-width: 5ch; vertical-align: baseline;
}
.fill-input:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
.fill-input.ok { border-color: var(--ok); background: var(--ok-soft); }
.fill-input.bad { border-color: var(--bad); background: var(--bad-soft); }
.fill-input.shown { border-color: var(--info); background: var(--info-soft); }
.order-list { display: flex; flex-direction: column; gap: 6px; }
.order-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 8px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--code-bg); cursor: grab; }
.order-item.dragging { opacity: .45; border-style: dashed; }
.order-list.locked .order-item { cursor: default; }
.order-list.ok .order-item { border-color: color-mix(in srgb, var(--ok) 50%, var(--border)); }
.order-list.shown .order-item { border-color: color-mix(in srgb, var(--info) 45%, var(--border)); }
.order-grip { color: var(--muted); display: grid; }
.order-code { flex: 1; margin: 0; font-size: 13.5px; line-height: 21px; white-space: pre; overflow-x: auto; min-width: 0; }
.order-btns { display: flex; gap: 2px; }
.order-btn { width: 26px; height: 24px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.order-btn:hover { background: var(--surface-3); color: var(--text); }
.order-list.locked .order-btns, .order-list.locked .order-grip { visibility: hidden; }
.order-hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.feedback-slot:empty { display: none; }
.feedback-slot { margin-top: 14px; }
.feedback { display: flex; gap: 12px; padding: 13px 15px; border-radius: 11px; border: 1px solid var(--border); }
.feedback.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, var(--border)); }
.feedback.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.feedback.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 35%, var(--border)); }
.feedback-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--bg); }
.feedback.ok .feedback-icon { background: var(--ok); } .feedback.bad .feedback-icon { background: var(--bad); }
.feedback.info .feedback-icon { background: var(--info); }
.feedback-body { flex: 1; min-width: 0; }
.feedback-title { font-weight: 680; margin-bottom: 3px; }
.feedback.ok .feedback-title { color: var(--ok); } .feedback.bad .feedback-title { color: var(--bad); }
.feedback.info .feedback-title { color: var(--info); }
.feedback-body .md { font-size: 15px; line-height: 1.62; }
.feedback-body p { margin-bottom: 6px; }
.feedback-body p:last-child { margin-bottom: 0; }
.feedback-note { font-size: 14px; color: var(--accent); padding: 4px 0; }

/* challenge */
.ch-title { font-size: 20px; margin-bottom: 10px; }
.challenge .ed { margin-top: 4px; }
.ch-toolbar { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ch-pass { margin-top: 14px; padding: 13px 16px; }
.ch-pass > .icon { color: var(--ok); }
.ch-pass .muted { font-size: 13.5px; }
.ch-hints:empty, .ch-results:empty, .ch-solution:empty { display: none; }
.ch-hints, .ch-results, .ch-solution { margin-top: 14px; }
.hint { padding: 11px 14px; border-radius: 10px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border)); margin-bottom: 8px; }
.hint-n { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.hint .md { font-size: 15px; }
.solution-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.complexity { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-2); }
.complexity .icon { color: var(--accent); }
.tests-head { display: flex; align-items: center; gap: 8px; font-weight: 680; margin-bottom: 10px; }
.tests-head.ok { color: var(--ok); } .tests-head.bad { color: var(--bad); }
.test { display: flex; gap: 10px; padding: 8px 11px; border-radius: 9px; margin-bottom: 5px; border: 1px solid var(--border); background: var(--bg-2); }
.test-mark { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; color: var(--bg); }
.test.ok .test-mark { background: var(--ok); } .test.bad .test-mark { background: var(--bad); }
.test.bad { border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.test-body { min-width: 0; flex: 1; }
.test-name { font-size: 14.5px; font-weight: 560; }
.test-msg { margin-top: 4px; color: var(--bad); font-size: 13px; }
.test-stdout { margin-top: 10px; font-size: 13.5px; }
.test-stdout summary { cursor: pointer; color: var(--muted); }
.test-stdout pre { margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: var(--code-bg); border: 1px solid var(--border); max-height: 240px; overflow: auto; }

/* ---------------------------------------------------------------- exam */
.exam-intro, .exam-result { text-align: center; padding: 40px 34px; margin-top: 18px; }
.exam-intro .lead, .exam-result .lead { margin-left: auto; margin-right: auto; }
.exam-intro .eyebrow, .exam-result .eyebrow { justify-content: center; margin-bottom: 8px; }
.exam-badge { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; margin: 0 auto 18px; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }
.exam-rules { list-style: none; padding: 0; margin: 26px auto; max-width: 520px; text-align: left; display: flex; flex-direction: column; gap: 11px; }
.exam-rules li { display: flex; gap: 11px; color: var(--text-2); }
.exam-rules .icon { color: var(--c); margin-top: 4px; }
.exam-intro .banner { text-align: left; max-width: 560px; margin-left: auto; margin-right: auto; }
.exam-intro .muted { margin-top: 4px; }
.answer-text .md-inline code { font-size: .9em; }
.exam-head { margin: 8px 0 8px; }
.exam-head h1 { margin: 6px 0; }
.exam-bar {
  position: sticky; bottom: 14px; display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 14px; margin-top: 22px;
  background: color-mix(in srgb, var(--surface-2) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border-2); box-shadow: var(--shadow); z-index: 5;
}
.exam-answered { font-weight: 620; font-size: 14px; }
.exam-challenge-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.exam-challenge-state.ok { color: var(--ok); }
.exam-result.passed { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); background: linear-gradient(180deg, var(--ok-soft), var(--surface) 55%); }
.exam-result.failed { border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.exam-result.passed .ring-value { stroke: var(--ok); } .exam-result.failed .ring-value { stroke: var(--bad); }
.exam-result h1 { font-size: 38px; margin-bottom: 4px; }
.score-ring { margin-bottom: 18px; }
.score-ring .ring-label strong { font-size: 30px; }
.exam-result .row { margin-top: 24px; }
.result-chip { display: inline-flex; align-items: center; gap: 6px; margin: 14px 4px 0; padding: 5px 12px; border-radius: 99px; font-size: 13.5px; font-weight: 620; border: 1px solid var(--border); }
.result-chip.ok { color: var(--ok); } .result-chip.bad { color: var(--bad); } .result-chip.xp { color: var(--accent); }
.answer-grid { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.answer-row { padding: 9px 13px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); }
.answer-row.ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.answer-row.bad { border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.answer-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.answer-row.ok .answer-label { color: var(--ok); } .answer-row.bad .answer-label { color: var(--bad); }
.explain { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.explain .md { font-size: 15px; color: var(--text-2); }
.session-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.session-bar .progress { flex: 1; }
.session-bar .muted { font-size: 13px; white-space: nowrap; }

/* ---------------------------------------------------------------- flash / interview */
.flash { margin: 18px 0; padding: 22px 24px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-2); --c: var(--violet); }
.flash-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }
.flash-head .tag { margin-left: 0; }
.flash-timer { font-variant-numeric: tabular-nums; }
.level-dots { display: inline-flex; gap: 3px; }
.level-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); }
.level-dots i.on { background: var(--violet); }
.flash-question .md { font-size: 21px; line-height: 1.45; font-weight: 600; letter-spacing: -.012em; }
.flash-question .md p { margin-bottom: 10px; }
.flash-question .md code { font-size: .82em; }
.flash-notes { margin-top: 16px; font-family: var(--sans); font-size: 15px; }
.flash-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.flash-tip { font-size: 13px; }
.flash-answer { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.flash-answer-head { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ok); margin-bottom: 10px; }
.flash-answer > .md { font-size: 16px; }
.points { margin-top: 18px; padding: 14px 16px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border); }
.points-title, .rate-title { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.point { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; cursor: pointer; }
.point input { margin-top: 6px; accent-color: var(--ok); width: 16px; height: 16px; flex: none; }
.point .md { font-size: 15px; line-height: 1.55; }
.rate-title { margin-top: 20px; }
.rate-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rate { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--bg-2); --r: var(--muted); transition: all .12s; }
.rate strong { color: var(--r); font-size: 15px; }
.rate span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.rate:hover:not(:disabled), .rate.suggested { border-color: var(--r); background: color-mix(in srgb, var(--r) 9%, var(--bg-2)); }
.rate.chosen { border-color: var(--r); background: color-mix(in srgb, var(--r) 18%, var(--bg-2)); }
.rate:disabled { cursor: default; opacity: .7; }
.rate-bad { --r: var(--bad); } .rate-mid { --r: var(--accent); } .rate-ok { --r: var(--ok); }
.domain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; margin-bottom: 18px; }
.domain-card { padding: 15px 17px; }
.domain-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; font-size: 14.5px; gap: 8px; }
.domain-top .muted { font-size: 12px; }
.deck-setup .row { margin-top: 22px; }
.tally { display: flex; justify-content: center; gap: 12px; margin: 18px 0; }
.tally-item { padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border); font-size: 13px; color: var(--muted); display: flex; flex-direction: column; min-width: 88px; }
.tally-item strong { font-size: 24px; line-height: 1.1; }
.tally-item.ok strong { color: var(--ok); } .tally-item.mid strong { color: var(--accent); } .tally-item.bad strong { color: var(--bad); }
.weak-box { margin: 6px 0 16px; }
.weak-box .chip-row { justify-content: center; }
.interview-tips { display: flex; gap: 10px; padding: 12px 15px; border-radius: 11px; background: var(--violet-soft); border: 1px solid color-mix(in srgb, var(--violet) 28%, var(--border)); font-size: 14px; color: var(--text-2); margin: 14px 0 0; }
.interview-tips .icon { color: var(--violet); margin-top: 3px; }
.filters { margin-bottom: 14px; }
.filters .field-label { margin-top: 12px; }
.drill-list { padding: 6px; }

/* ---------------------------------------------------------------- projects */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.proj-card { display: flex; flex-direction: column; gap: 10px; transition: transform .14s, border-color .14s; }
a.proj-card:hover { transform: translateY(-2px); border-color: var(--border-2); }
.proj-card.locked { opacity: .6; }
.proj-card h3 { font-size: 18px; }
.proj-card p { margin: 0; font-size: 14px; flex: 1; }
.proj-top { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; }
.proj-foot { display: flex; align-items: center; gap: 12px; font-size: 12.5px; margin-top: 4px; }
.proj-foot .progress { flex: 1; }
.milestones { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.milestone { display: flex; align-items: center; gap: 8px; padding: 6px 13px 6px 7px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font-size: 13.5px; cursor: pointer; color: var(--text-2); }
.milestone.locked { opacity: .5; cursor: not-allowed; }
.milestone.current { border-color: var(--accent); color: var(--text); }
.milestone-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--surface-3); }
.milestone.done .milestone-dot { background: var(--ok); color: var(--bg); }
.milestone.current .milestone-dot { background: var(--accent); color: var(--accent-ink); }

/* ---------------------------------------------------------------- playground */
.play { overflow: hidden; margin-bottom: 16px; }
.play .ed { border: 0; border-radius: 0; border-top: 1px solid var(--border); box-shadow: none; }
.play .stdin { margin: 0; padding: 12px 14px; border-top: 1px solid var(--border); }
.play-bar { padding: 10px 12px; }

/* ---------------------------------------------------------------- progress */
.ranks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rank { display: flex; align-items: center; gap: 8px; padding: 6px 13px 6px 7px; border-radius: 99px; border: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }
.rank-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--surface-3); }
.rank.done { color: var(--text-2); } .rank.done .rank-dot { background: var(--ok); color: var(--bg); }
.rank.current { border-color: var(--accent); color: var(--text); font-weight: 640; }
.rank.current .rank-dot { background: var(--accent); color: var(--accent-ink); }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; margin: 18px 0 0; }
.tile { padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.tile .icon { color: var(--accent); }
.tile-value { font-size: 21px; font-weight: 720; letter-spacing: -.02em; margin-top: 6px; line-height: 1.2; }
.tile-label { font-size: 12.5px; color: var(--muted); }
.heatmap { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.heat-col { display: flex; flex-direction: column; gap: 4px; }
.heat-cell { width: 15px; height: 15px; border-radius: 4px; background: var(--surface-3); display: inline-block; }
.heat-cell.h1 { background: color-mix(in srgb, var(--accent) 28%, var(--surface-3)); }
.heat-cell.h2 { background: color-mix(in srgb, var(--accent) 52%, var(--surface-3)); }
.heat-cell.h3 { background: color-mix(in srgb, var(--accent) 76%, var(--surface-3)); }
.heat-cell.h4 { background: var(--accent); }
.heat-legend { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); margin-top: 10px; justify-content: flex-end; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 8px; }
table.data td { font-size: 14px; white-space: nowrap; }
.weak-list { display: flex; flex-direction: column; }
.weak-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; font-size: 14px; }
.weak-row > span:first-child { flex: 1; min-width: 0; }
a.weak-row:hover { background: var(--surface-2); }
.weak-row .muted { font-size: 12.5px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.badge-card { display: flex; gap: 12px; align-items: center; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--border); opacity: .5; }
.badge-card.earned { opacity: 1; border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--accent-soft); }
.badge-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }
.badge-card.earned .badge-icon { background: var(--accent); color: var(--accent-ink); }
.badge-card strong { display: block; font-size: 14px; }
.badge-card span { font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- settings */
.settings { padding: 6px 22px; margin-bottom: 16px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.setting:last-child { border-bottom: 0; }
.setting > div:first-child { flex: 1; min-width: 240px; }
.setting p { margin: 3px 0 0; font-size: 13.5px; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 30%, var(--border)); }

/* ---------------------------------------------------------------- onboarding */
.onboard {
  min-height: 100vh; display: grid; place-items: center; padding: 48px 24px;
  background: radial-gradient(900px 520px at 50% -8%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%);
}
.onboard-inner { width: 100%; max-width: 780px; text-align: center; }
.onboard-inner.placement { max-width: 760px; }
.onboard-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 720; letter-spacing: -.03em; margin-bottom: 26px; }
.onboard h1 { font-size: 44px; letter-spacing: -.035em; line-height: 1.08; }
.onboard .lead { margin: 16px auto 0; font-size: 18px; }
.onboard-stats { display: flex; justify-content: center; gap: 30px; margin: 30px 0 8px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.onboard-stats strong { display: block; font-size: 28px; color: var(--text); letter-spacing: -.03em; line-height: 1.15; }
.onboard-name { margin: 26px 0 8px; display: flex; justify-content: center; }
.onboard-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0 34px; }
.choice {
  display: flex; flex-direction: column; gap: 7px; align-items: flex-start; text-align: left; padding: 22px; border-radius: 18px;
  border: 1px solid var(--border-2); background: var(--surface); transition: transform .14s, border-color .14s, background .14s;
}
.choice:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--surface-2); }
.choice-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.choice strong { font-size: 18px; letter-spacing: -.015em; }
.choice > span { color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.choice-go { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; color: var(--accent) !important; font-weight: 650; }
.onboard-points { list-style: none; padding: 0; margin: 0 auto; max-width: 620px; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.onboard-points li { display: flex; gap: 12px; color: var(--text-2); font-size: 14.5px; }
.onboard-points .icon { color: var(--accent); margin-top: 3px; }
.onboard-points strong { color: var(--text); }
.onboard .row { margin-top: 28px; }
.placement-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 12px; flex-wrap: wrap; }
.placement .check { text-align: left; }
.placement-next { margin: 24px auto 0; max-width: 480px; }
.placement-next h2 { margin: 6px 0; font-size: 22px; }
.placement-next .eyebrow { justify-content: center; }

/* ---------------------------------------------------------------- widgets (frame) */
.widget { margin: 24px 0; border-radius: var(--radius); border: 1px solid var(--border-2); background: var(--surface); overflow: hidden; }
.widget-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--cyan); font-weight: 700; }
.widget-head strong { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 14.5px; font-weight: 620; margin-left: 4px; }
.widget-body { padding: 16px; }
.widget-missing { color: var(--muted); font-style: italic; font-size: 14px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1060px) {
  .sidebar { width: 66px; padding: 16px 8px; align-items: center; }
  .brand { padding: 4px 0 16px; }
  .brand-name, .nav-label, .side-who, .side-meta .side-chip:not(.side-settings) { display: none; }
  .nav-item { justify-content: center; padding: 11px; }
  .nav-badge { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; font-size: 10px; padding: 0 4px; }
  .side-foot { align-items: center; }
  .side-settings { margin: 0; }
  .two-col { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  #app { flex-direction: column-reverse; }
  .sidebar { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; width: auto; flex-direction: row; padding: 6px 8px; border-right: 0; border-top: 1px solid var(--border); z-index: 40; }
  .brand, .side-foot, .sidebar > .grow { display: none; }
  .nav { flex-direction: row; justify-content: space-around; width: 100%; }
  .main { padding-bottom: 64px; }
  .page { padding: 24px 16px 60px; }
  h1 { font-size: 25px; }
  .lesson-head h1 { font-size: 28px; }
  .onboard h1 { font-size: 31px; }
  .onboard-choices, .tr-main, .rate-row, .quick-grid { grid-template-columns: 1fr; }
  .continue-card { flex-direction: column; align-items: flex-start; }
  .search { min-width: 0; width: 100%; }
  .track-rail { display: none; }
  .module-side { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.brand-tag { margin-left: 2px; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; align-self: center; }
.onboard-brand .brand-tag { font-size: 12px; padding: 3px 9px; }

/* Hosted build: start-up screen while Python loads in the browser, and its status line. */
.boot { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.boot-card { width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.boot-brand { font-size: 26px; font-weight: 760; letter-spacing: -.02em; color: var(--text); }
.boot-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.boot-text { font-size: 16px; font-weight: 600; color: var(--text); min-height: 1.4em; }
.boot-note { font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.boot.is-error .boot-spinner { display: none; }
.boot.is-error .boot-text { color: var(--bad); }
.py-pill { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 150; max-width: min(560px, calc(100vw - 32px)); padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2); font-size: 13.5px; box-shadow: var(--shadow); }
.py-pill.warn { border-color: var(--bad); color: var(--bad); }
.out-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 8px; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--info-soft); color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.out-note .icon { flex: none; margin-top: 3px; color: var(--info); }
.challenge.unavailable .ch-toolbar .btn.primary { opacity: .45; }
