/* code-languages.html: "Code is a language" (code-languages.js). Laid out like the founder's
   picture: soft cards with a coloured dot, the language, what it is used for, and a dark code
   block; here each one also runs. Theme variables, so light and dark both work. */
.hl-runall { gap: 8px; }
.hl-runall svg { width: 14px; height: 14px; }
.hl-runall:disabled { opacity: 0.6; cursor: wait; }
.hl-sec { padding: 10px 0 70px; }

.hl-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; align-items: start; }
.hl-card { --dot: var(--accent-2); grid-column: span 4; display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 14px; border-radius: 18px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
/* Bottom row like the picture: a wide Java card, then C and C++. */
.hl-card.is-wide { grid-column: span 6; }
.hl-card.is-tall { grid-column: span 3; }
.hl-card.is-tall .hl-code { font-size: 0.92rem; }
.hl-card:hover, .hl-card:focus-within { border-color: color-mix(in srgb, var(--dot) 45%, var(--border)); }
.hl-card.is-busy { box-shadow: 0 0 0 1px color-mix(in srgb, var(--dot) 60%, transparent), 0 12px 30px -16px var(--dot); }
.hl-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hl-card-h h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.35rem; letter-spacing: -0.01em; }
.hl-dot { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; background: var(--dot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot) 22%, transparent); align-self: center; }
.hl-use { font-size: 0.86rem; color: var(--text-muted); }
.hl-code { width: 100%; box-sizing: border-box; min-height: 52px; margin: 0; padding: 13px 16px; border-radius: 10px; resize: none; overflow: hidden;
  font: 400 1.02rem/1.55 ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace; color: #e8ecf8; background: #262c42; border: 1px solid transparent;
  white-space: pre; overflow-x: auto; tab-size: 2; }
.hl-code:focus { outline: none; border-color: color-mix(in srgb, var(--dot) 70%, #fff 0%); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot) 25%, transparent); }
.hl-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hl-run { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px 0 12px; border-radius: 999px; font: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; box-shadow: 0 8px 20px -12px var(--accent); }
.hl-run svg { width: 12px; height: 12px; }
.hl-run:disabled { opacity: 0.7; cursor: wait; }
.hl-run:focus-visible, .hl-reset:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.hl-reset { height: 32px; padding: 0 12px; border-radius: 999px; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; color: var(--text-muted); background: transparent; border: 1px solid var(--border); }
.hl-reset[hidden] { display: none; }
.hl-where { margin-left: auto; font-size: 0.76rem; color: var(--text-muted); }
.hl-out { border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #0b1020; }
.hl-out[hidden] { display: none; }
.hl-out-h { display: flex; justify-content: space-between; gap: 8px; padding: 6px 12px; font-size: 0.74rem; font-weight: 700; color: #9aa3bf; background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.hl-out-h small { font-weight: 500; }
.hl-pre { margin: 0; padding: 10px 12px; max-height: 220px; overflow: auto; font: 0.95rem/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: #e8ecf8; }
.hl-out.is-ok { border-color: color-mix(in srgb, #22c55e 45%, var(--border)); }
.hl-out.is-ok .hl-out-h span:first-child { color: #4ade80; }
.hl-out.is-err { border-color: color-mix(in srgb, #ef4444 50%, var(--border)); }
.hl-out.is-err .hl-out-h, .hl-out.is-err .hl-pre { color: #fca5a5; }
.hl-out.is-wait { padding: 10px 12px; font-size: 0.86rem; color: #9aa3bf; }
.hl-frame { display: block; width: 100%; height: 120px; border: 0; background: #fff; }
@media (max-width: 1180px) {
  .hl-card.is-wide { grid-column: 1 / -1; }
  .hl-card.is-tall { grid-column: span 6; }
}
@media (max-width: 1000px) {
  .hl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hl-card, .hl-card.is-wide, .hl-card.is-tall { grid-column: span 1; }
  .hl-card.is-wide { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .hl-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hl-card.is-wide { grid-column: auto; }
  .hl-code { font-size: 0.92rem; }
  .hl-where { margin-left: 0; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .hl-card { transition: none; } }
/* Full width like the Code Lab (founder, 2026-10-04): no 1180px cap, the same side margin as
   .lab-container (16-40px, grows with the screen). Header and footer keep their own widths. */
.hl .container { max-width: none; padding: 0 clamp(16px, 2vw, 40px); }

/* ===== Hero: the phrasebook (founder: "give it a great design", 2026-10-04) =====
   Left: name, heading, intro, actions, three facts. Right: greetings our students speak next to
   code saying the same thing; one row lights up at a time. */
.hl-head { position: relative; padding: 46px 0 34px; overflow: hidden; }
.hl-head::before { content: ""; position: absolute; inset: -40px 0 0; z-index: -1; pointer-events: none;
  background: radial-gradient(640px 380px at 82% 40%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 70%),
              radial-gradient(480px 300px at 6% 0%, color-mix(in srgb, #8b5cf6 12%, transparent), transparent 70%); }
.hl-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.hl-name { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 13px 6px 10px; border-radius: 999px; font-size: 0.86rem; font-weight: 700;
  color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent-2) 35%, transparent); }
.hl-name svg { width: 16px; height: 16px; }
.hl-hero h1 { margin: 0 0 16px; max-width: 16ch; font-size: clamp(2.2rem, 4.8vw, 4rem); line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance; }
.hl-lede { margin: 0 0 26px; max-width: 58ch; font-size: 1.1rem; line-height: 1.65; color: var(--text-muted); }
.hl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-bottom: 30px; }
.hl-runall { gap: 9px; padding-left: 22px; padding-right: 24px; }
.hl-codelab { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; padding: 10px 0; border-bottom: 2px solid color-mix(in srgb, var(--accent-2) 55%, transparent); }
.hl-codelab svg { width: 17px; height: 17px; color: var(--accent-2); transition: transform 0.2s ease; }
.hl-codelab:hover { color: var(--accent-2); } .hl-codelab:hover svg { transform: translateX(3px); }
.hl-facts { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; }
.hl-facts li { display: flex; flex-direction: column; padding: 0 26px; border-left: 1px solid var(--border); }
.hl-facts li:first-child { padding-left: 0; border-left: 0; }
.hl-facts strong { font-family: var(--font-head, inherit); font-size: 2rem; line-height: 1.1; letter-spacing: -0.02em; }
.hl-facts span { font-size: 0.84rem; color: var(--text-muted); }

.hl-book { margin: 0; padding: 18px 18px 14px; border-radius: 22px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--border); box-shadow: 0 30px 70px -36px color-mix(in srgb, var(--accent) 70%, #000); }
.hl-book-top { display: grid; grid-template-columns: minmax(0, 0.8fr) 28px minmax(0, 1.2fr); align-items: center; gap: 10px; padding: 0 12px 12px; font-size: 0.78rem; font-weight: 700; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.hl-book-arrow { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
.hl-book-arrow svg { width: 15px; height: 15px; }
.hl-book-rows { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.hl-book-rows li { --c: var(--accent-2); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 38px; align-items: center; padding: 10px 12px; border-radius: 14px;
  border: 1px solid transparent; transition: background 0.35s ease, border-color 0.35s ease, transform 0.35s ease; animation: hlRow 9s infinite; }
.hl-book-rows li:nth-child(2) { animation-delay: 1.5s; } .hl-book-rows li:nth-child(3) { animation-delay: 3s; }
.hl-book-rows li:nth-child(4) { animation-delay: 4.5s; } .hl-book-rows li:nth-child(5) { animation-delay: 6s; } .hl-book-rows li:nth-child(6) { animation-delay: 7.5s; }
@keyframes hlRow { 0%, 17% { background: color-mix(in srgb, var(--c) 12%, transparent); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
  22%, 100% { background: transparent; border-color: transparent; } }
.hl-sp { display: flex; flex-direction: column; min-width: 0; }
.hl-sp b { font-family: var(--font-head, inherit); font-size: 1.25rem; letter-spacing: -0.01em; }
.hl-sp small, .hl-book-rows code small { font-size: 0.74rem; color: var(--text-muted); font-family: var(--font-body, inherit); }
.hl-book-rows code { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 12px 7px 26px; border-radius: 10px; overflow: hidden;
  font: 0.95rem/1.35 ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; color: #e8ecf8; background: #262c42; white-space: nowrap; text-overflow: ellipsis; }
.hl-book-rows code i { position: absolute; left: 11px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.hl-book-rows code small { color: #8b93ad; }
.hl-book figcaption { margin-top: 12px; padding: 10px 12px 2px; border-top: 1px solid var(--border); font-size: 0.86rem; font-style: italic; color: var(--text-muted); }

/* ===== Where your code runs ===== */
.hl-where-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.hl-wcard { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.hl-wic { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
.hl-wic svg { width: 23px; height: 23px; }
.hl-wcard h2 { margin: 2px 0 4px; font-size: 1.08rem; }
.hl-wcard p { margin: 0 0 12px; font-size: 0.9rem; line-height: 1.55; color: var(--text-muted); }
.hl-wcard a { color: var(--accent-2); }
.hl-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.hl-chips li { --c: var(--accent-2); display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
  background: color-mix(in srgb, var(--c) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.hl-chips li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.hl-safe { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 16px; border-radius: 14px; font-size: 0.9rem; font-weight: 600;
  color: var(--text); background: color-mix(in srgb, #f59e0b 9%, transparent); border: 1px solid color-mix(in srgb, #f59e0b 35%, transparent); }
.hl-safe svg { width: 18px; height: 18px; flex-shrink: 0; color: #f59e0b; }

@media (max-width: 1000px) {
  .hl-hero { grid-template-columns: minmax(0, 1fr); }
  .hl-hero h1 { max-width: 20ch; }
  .hl-where-box { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .hl-head { padding: 26px 0 18px; }
  .hl-hero h1 { font-size: 2.1rem; }
  .hl-lede { font-size: 1rem; }
  .hl-facts li { padding: 0 16px; }
  .hl-facts strong { font-size: 1.5rem; }
  .hl-book { padding: 12px 10px 10px; }
  .hl-book-top { grid-template-columns: minmax(0, 0.75fr) 24px minmax(0, 1.25fr); padding: 0 8px 10px; }
  .hl-book-rows li { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: 34px; padding: 8px; }
  .hl-sp b { font-size: 1.05rem; }
  .hl-book-rows code { font-size: 0.8rem; }
  .hl-wcard { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hl-book-rows li { animation: none; }
  .hl-book-rows li:first-child { background: color-mix(in srgb, var(--c) 12%, transparent); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
  .hl-codelab svg { transition: none; }
}
/* The intro in its own panel next to the phrasebook (founder, 2026-10-04); both panels match. */
.hl-hero { align-items: stretch; }
.hl-hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 3vw, 44px); border-radius: 22px;
  background: radial-gradient(520px 300px at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%), color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--border); box-shadow: 0 30px 70px -40px color-mix(in srgb, var(--accent) 60%, #000); }
.hl-hero-copy .hl-name { align-self: flex-start; }
.hl-hero-copy .hl-facts { padding-top: 22px; border-top: 1px solid var(--border); }
@media (max-width: 640px) { .hl-hero-copy { padding: 22px 18px; border-radius: 18px; } }
/* Tighter intro panel (founder: "looks too scattered", 2026-10-04): the heading on two lines,
   small even gaps, the buttons on one line, and the three facts as one compact strip. */
.hl-hero-copy { justify-content: center; gap: 0; }
.hl-hero-copy .hl-name { margin-bottom: 14px; padding: 5px 12px 5px 9px; font-size: 0.8rem; }
.hl-hero-copy h1 { max-width: none; margin: 0 0 12px; font-size: clamp(1.9rem, 3vw, 2.8rem); line-height: 1.08; letter-spacing: -0.025em; }
.hl-hero-copy .hl-lede { margin: 0 0 22px; max-width: 60ch; font-size: 1.02rem; line-height: 1.6; }
.hl-hero-copy .hl-actions { flex-wrap: nowrap; gap: 18px; margin-bottom: 24px; }
.hl-hero-copy .hl-codelab { padding: 6px 0; border-bottom-width: 1px; font-size: 0.95rem; white-space: nowrap; }
.hl-hero-copy .hl-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 0; border: 1px solid var(--border); border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 40%, transparent); overflow: hidden; }
.hl-hero-copy .hl-facts li { flex-direction: row; align-items: baseline; gap: 8px; padding: 12px 16px; border-left: 1px solid var(--border); }
.hl-hero-copy .hl-facts li:first-child { padding-left: 16px; border-left: 0; }
.hl-hero-copy .hl-facts strong { font-size: 1.5rem; }
.hl-hero-copy .hl-facts span { font-size: 0.82rem; line-height: 1.25; }
@media (max-width: 640px) {
  .hl-hero-copy h1 { font-size: 1.85rem; }
  .hl-hero-copy .hl-actions { flex-wrap: wrap; gap: 10px 16px; margin-bottom: 20px; }
  .hl-hero-copy .hl-facts li { flex-direction: column; gap: 0; padding: 10px 12px; }
  .hl-hero-copy .hl-facts li:first-child { padding-left: 12px; }
  .hl-hero-copy .hl-facts strong { font-size: 1.3rem; }
}
/* Compact phrasebook, so the two hero panels hold their content snugly side by side. */
.hl-book { display: flex; flex-direction: column; padding: 14px 14px 10px; }
.hl-book-top { padding: 0 10px 10px; }
.hl-book-rows { margin-top: 8px; gap: 4px; flex: 1; align-content: center; }
.hl-book-rows li { padding: 7px 10px; gap: 30px; }
.hl-sp { flex-direction: row; align-items: baseline; gap: 8px; }
.hl-sp b { font-size: 1.1rem; }
.hl-book-rows code { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 12px 7px 24px; font-size: 0.88rem; }
.hl-book-rows code i { top: 50%; margin-top: -4px; left: 10px; }
.hl-book-rows code small { flex-shrink: 0; font-size: 0.7rem; }
.hl-book figcaption { margin-top: 8px; padding: 8px 10px 2px; }
@media (max-width: 640px) {
  .hl-sp { flex-direction: column; gap: 0; }
  .hl-book-rows code { flex-direction: column; gap: 0; }
  .hl-book-rows code i { top: 13px; margin-top: 0; }
}
/* Smaller intro panel (founder, 2026-10-04): narrower column, less padding, its own height
   (no longer stretched to the phrasebook's), centred beside it. */
.hl-hero { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(20px, 2.5vw, 40px); }
.hl-hero-copy { padding: clamp(20px, 2vw, 30px); border-radius: 18px; }
.hl-hero-copy .hl-name { margin-bottom: 12px; }
.hl-hero-copy h1 { font-size: clamp(1.7rem, 2.5vw, 2.35rem); margin-bottom: 10px; }
.hl-hero-copy .hl-lede { font-size: 0.97rem; margin-bottom: 18px; }
.hl-hero-copy .hl-actions { margin-bottom: 18px; }
.hl-hero-copy .hl-runall { padding: 10px 18px 10px 16px; font-size: 0.92rem; }
.hl-hero-copy .hl-facts li { padding: 9px 14px; }
.hl-hero-copy .hl-facts li:first-child { padding-left: 14px; }
.hl-hero-copy .hl-facts strong { font-size: 1.3rem; }
@media (max-width: 1000px) { .hl-hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .hl-hero-copy { padding: 18px 16px; } .hl-hero-copy h1 { font-size: 1.65rem; } }
/* No intro sentence any more (founder, 2026-10-04): a little more room under the heading. */
.hl-hero-copy h1 { margin-bottom: 20px; }
/* One long panel (founder, 2026-10-04): the intro and the phrasebook share a single container,
   like the Code Lab header. The intro sits on the panel itself; the phrasebook is an inner window. */
.hl-head .hl-hero { position: relative; align-items: center; gap: clamp(20px, 3vw, 48px); padding: clamp(20px, 2.6vw, 36px); border-radius: 26px;
  background: radial-gradient(600px 340px at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
              radial-gradient(520px 320px at 100% 100%, color-mix(in srgb, #8b5cf6 12%, transparent), transparent 70%),
              color-mix(in srgb, var(--surface) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-2) 30%, var(--border)); box-shadow: 0 30px 80px -44px color-mix(in srgb, var(--accent) 70%, #000); }
.hl-head .hl-hero-copy { padding: 0 0 0 clamp(4px, 1vw, 12px); border: 0; border-radius: 0; background: none; box-shadow: none; }
.hl-head .hl-book { background: color-mix(in srgb, var(--bg) 55%, transparent); box-shadow: none; border-radius: 18px; }
@media (max-width: 640px) {
  .hl-head .hl-hero { padding: 18px 14px; border-radius: 20px; }
  .hl-head .hl-hero-copy { padding: 0 2px; }
}
/* Keep the page's side margin outside the panel, so it lines up with the cards below. */
.hl-head .container.hl-hero { margin-inline: clamp(16px, 2vw, 40px); }

/* ===== 2026-11-17: the learning version (tabs, lessons, challenges, compare, quiz, progress). Full container width. ===== */
.cl-app { display: flex; flex-direction: column; gap: 18px; }
.cl-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); position: sticky; top: 64px; z-index: 5; }
.cl-tab { flex: 1 1 auto; height: 40px; padding: 0 16px; border-radius: 10px; font: inherit; font-size: 0.92rem; font-weight: 700; cursor: pointer; color: var(--text-muted); background: transparent; border: 0; white-space: nowrap; }
.cl-tab:hover { color: var(--text); background: color-mix(in srgb, var(--accent-2) 8%, transparent); }
.cl-tab.is-on { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.cl-tab:focus-visible, .cl-chip:focus-visible, .cl-tool:focus-visible, .cl-mini:focus-visible, .cl-quiz-opt:focus-visible, .cl-chal:focus-visible, .cl-step button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.cl-panel[hidden] { display: none; }
.cl-panel { display: flex; flex-direction: column; gap: 16px; }
.cl-head h2 { margin: 0 0 4px; font-size: 1.35rem; }
.cl-head p { margin: 0; color: var(--text-muted); max-width: 75ch; line-height: 1.55; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.cl-card { grid-column: auto; }
.cl-card .hl-card-h h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.3rem; letter-spacing: -0.01em; }
.cl-box { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cl-mini { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; color: var(--text); background: transparent; border: 1px solid var(--border); }
.cl-mini svg, .cl-tool svg, .cl-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.cl-mini[hidden], .cl-tool[hidden] { display: none; }
.cl-mini:disabled { opacity: 0.5; cursor: default; }
.cl-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 2px; border-top: 1px dashed var(--border); padding-top: 10px; }
.cl-tool { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; color: var(--text-muted); background: color-mix(in srgb, var(--text) 4%, transparent); border: 1px solid transparent; }
.cl-tool:hover { color: var(--text); border-color: var(--border); }
.cl-tool:disabled { opacity: 0.6; cursor: wait; }
.cl-speak { height: 30px; margin-left: auto; padding: 0 8px; border-radius: 8px; font: inherit; font-size: 0.78rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); }
.cl-input label { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.cl-input[hidden] { display: none; }
.cl-input-box { width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 8px; resize: vertical; font: 400 0.95rem/1.5 ui-monospace, Menlo, Consolas, monospace; color: #e8ecf8; background: #1b2033; border: 1px solid var(--border); }
.cl-help { border-radius: 10px; padding: 10px 12px; font-size: 0.9rem; line-height: 1.55; background: color-mix(in srgb, var(--accent-2) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent-2) 30%, var(--border)); }
.cl-help[hidden] { display: none; }
.cl-help.is-err { background: color-mix(in srgb, #ef4444 8%, var(--surface)); border-color: color-mix(in srgb, #ef4444 35%, var(--border)); }
.cl-help.is-fix { background: color-mix(in srgb, #22c55e 8%, var(--surface)); border-color: color-mix(in srgb, #22c55e 35%, var(--border)); }
.cl-help.is-wait .cl-help-body { color: var(--text-muted); }
.cl-help-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.cl-help-body { white-space: pre-wrap; }
.cl-x { width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; }
.cl-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; font-size: 0.86rem; font-weight: 700; color: var(--accent-2); cursor: pointer; }
.cl-shared { margin: 0; padding: 8px 12px; border-radius: 10px; font-size: 0.88rem; background: color-mix(in srgb, var(--accent-2) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent-2) 30%, var(--border)); }

.cl-langs { display: flex; flex-wrap: wrap; gap: 8px; }
.cl-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; color: var(--text); background: var(--surface); border: 1px solid var(--border); }
.cl-chip .hl-dot { width: 10px; height: 10px; box-shadow: none; }
.cl-chip[aria-pressed="true"] { border-color: color-mix(in srgb, var(--dot, var(--accent-2)) 70%, var(--border)); background: color-mix(in srgb, var(--dot, var(--accent-2)) 14%, var(--surface)); }

/* Lessons: steps on the left, the lesson on the right; one column on a phone. */
.cl-lesson { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 18px; align-items: start; }
.cl-steps { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); position: sticky; top: 130px; }
.cl-step button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font: inherit; font-size: 0.9rem; text-align: left; cursor: pointer; color: var(--text); background: transparent; border: 0; }
.cl-step.is-on button { background: color-mix(in srgb, var(--accent-2) 12%, transparent); font-weight: 700; }
.cl-step-n { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; font-size: 0.8rem; font-weight: 700; border: 1px solid var(--border); }
.cl-step-n svg { width: 14px; height: 14px; }
.cl-step.is-done .cl-step-n { color: #fff; background: #16a34a; border-color: #16a34a; }
.cl-lesson-body { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.cl-lesson-body h3, .cl-chal-work h3, .cl-quiz h3 { margin: 0; font-size: 1.3rem; }
.cl-kicker { margin: 0; font-size: 0.82rem; font-weight: 700; color: var(--accent-2); }
.cl-teach { margin: 0; line-height: 1.6; max-width: 75ch; }
.cl-try { padding: 10px 12px; border-radius: 10px; font-size: 0.92rem; line-height: 1.55; background: color-mix(in srgb, #f59e0b 9%, var(--surface)); border: 1px solid color-mix(in srgb, #f59e0b 30%, var(--border)); }
.cl-try[hidden] { display: none; }
.cl-status { padding: 9px 12px; border-radius: 10px; font-size: 0.92rem; font-weight: 600; }
.cl-status[hidden] { display: none; }
.cl-status.is-ok { color: #15803d; background: color-mix(in srgb, #22c55e 12%, var(--surface)); }
.cl-status.is-err { color: #b91c1c; background: color-mix(in srgb, #ef4444 10%, var(--surface)); }
:root[data-theme="dark"] .cl-status.is-ok, .dark .cl-status.is-ok { color: #86efac; }
:root[data-theme="dark"] .cl-status.is-err, .dark .cl-status.is-err { color: #fca5a5; }
.cl-nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cl-solution { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: #0b1020; color: #e8ecf8; }
.cl-solution[hidden] { display: none; }
.cl-solution p { margin: 0 0 6px; font-size: 0.86rem; color: #9aa3bf; }

/* Challenges: the five in one row (wrapping), the work area under them. */
.cl-chal-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.cl-chal { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; font: inherit; text-align: left; cursor: pointer; color: var(--text); background: var(--surface); border: 1px solid var(--border); }
.cl-chal.is-on { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2); }
.cl-chal-n { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; font-weight: 700; border: 1px solid var(--border); }
.cl-chal-n svg { width: 15px; height: 15px; }
.cl-chal.is-done .cl-chal-n { color: #fff; background: #16a34a; border-color: #16a34a; }
.cl-chal-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cl-chal-t small { color: var(--text-muted); font-size: 0.78rem; }
.cl-chal-work { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.cl-chal-work:empty { display: none; }

.cl-compare-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Quiz */
.cl-quiz { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.cl-quiz-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.cl-quiz-opt { padding: 14px 16px; border-radius: 12px; font: inherit; font-size: 0.96rem; font-weight: 600; text-align: left; cursor: pointer; color: var(--text); background: color-mix(in srgb, var(--text) 3%, transparent); border: 1px solid var(--border); }
.cl-quiz-opt:hover { border-color: var(--accent-2); }
.cl-quiz-bar { height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.cl-quiz-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.cl-quiz-top { display: flex; align-items: center; gap: 12px; font-size: 1.8rem !important; }

/* Progress */
.cl-progress { display: flex; flex-direction: column; gap: 18px; }
.cl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cl-stat { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.cl-stat svg { width: 52px; height: 52px; transform: rotate(-90deg); flex-shrink: 0; }
.cl-ring-bg { fill: none; stroke: color-mix(in srgb, var(--text) 10%, transparent); stroke-width: 5; }
.cl-ring { fill: none; stroke: var(--accent-2); stroke-width: 5; stroke-linecap: round; }
.cl-stat div { display: flex; flex-direction: column; }
.cl-stat strong { font-size: 1.25rem; }
.cl-stat span { font-size: 0.82rem; color: var(--text-muted); }
.cl-stat.is-points { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
.cl-stat.is-points strong { font-size: 1.6rem; }
.cl-awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.cl-award { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); opacity: 0.65; }
.cl-award.is-on { opacity: 1; border-color: color-mix(in srgb, #f5b82e 55%, var(--border)); }
.cl-award > svg { width: 30px; height: 30px; flex-shrink: 0; color: #f5b82e; }
.cl-award div { display: flex; flex-direction: column; gap: 2px; }
.cl-award span, .cl-muted { font-size: 0.84rem; color: var(--text-muted); }
.cl-award a { font-size: 0.86rem; font-weight: 700; color: var(--accent-2); }
.cl-left h3, .cl-snips h3 { margin: 0 0 10px; font-size: 1.05rem; }
.cl-snips { display: flex; flex-direction: column; gap: 8px; }
.cl-snip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--dot); }
.cl-snip > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cl-snip span { font-size: 0.8rem; color: var(--text-muted); }
.cl-signin { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.cl-signin p { margin: 0; }

.cl-toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.cl-toast { padding: 10px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 600; color: #fff; background: #1f2740; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5); transition: opacity 0.3s ease; }
.cl-toast.is-good { background: #15803d; }
.cl-toast.is-out { opacity: 0; }

@media (max-width: 860px) {
  .cl-lesson { grid-template-columns: 1fr; }
  .cl-steps { position: static; flex-direction: row; overflow-x: auto; }
  .cl-step button { white-space: nowrap; }
  .cl-tabs { top: 56px; overflow-x: auto; flex-wrap: nowrap; }
  .cl-grid { grid-template-columns: 1fr; }
  .cl-speak { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .cl-toast { transition: none; } }
/* The TaniX AI daily nudge bubble sat on top of the code results here (bottom right, over the last card). This stylesheet
   only loads on this page, so the nudge is hidden here only; the TaniX AI button stays. */
.aip-nudge { display: none !important; }
