/* ============================================================
   FLOWCHART.CSS — "How the Robot Thinks"
   A kid-friendly (age 10–12) visual tour of simplified.py.
   Builds on style.css (shared shell, fonts, palette).
   ============================================================ */

/* ── PAGE HERO ───────────────────────────────────────────── */
.fc-hero {
  position: relative;
  border-radius: 20px;
  padding: 2.25rem 2.25rem 2rem;
  margin-bottom: 1.75rem;
  background:
    radial-gradient(circle at 88% 12%, rgba(249,115,22,.28), transparent 42%),
    radial-gradient(circle at 8% 90%, rgba(167,139,250,.35), transparent 45%),
    linear-gradient(135deg, #312E81 0%, #4C1D95 55%, #5B21B6 100%);
  color: #F5F3FF;
  overflow: hidden;
  box-shadow: 0 10px 36px rgba(49,46,129,.30);
}
.fc-hero::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 18px 18px; pointer-events: none; opacity: .6;
}
.fc-eyebrow {
  position: relative; display: inline-flex; align-items: center; gap: .45rem;
  font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: #FBBF24; margin-bottom: .75rem;
}
.fc-hero h1 {
  position: relative;
  font-family: 'Fredoka', sans-serif; font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 2.7rem); line-height: 1.08;
  margin-bottom: .6rem;
}
.fc-hero h1 .pop { color: #FBBF24; }
.fc-lead {
  position: relative; max-width: 56ch;
  font-size: 1.02rem; line-height: 1.65; color: #E9D5FF;
}
.fc-hero-tags { position: relative; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.fc-htag {
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: .74rem;
  padding: .3rem .7rem; border-radius: 20px;
  background: rgba(255,255,255,.12); color: #F5F3FF;
  border: 1px solid rgba(255,255,255,.18);
}

/* ── SECTION SCAFFOLD ─────────────────────────────────────── */
.fc-section { margin: 2.75rem 0; }
.fc-sec-head { margin-bottom: 1.1rem; }
.fc-step-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: .68rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: #C2410C; background: #FFEDD5; border: 1px solid #FED7AA;
  padding: .22rem .6rem; border-radius: 20px; margin-bottom: .5rem;
}
.fc-section h2 {
  font-family: 'Fredoka', sans-serif; font-weight: 700;
  font-size: 1.6rem; color: #1E1B4B; line-height: 1.2;
  display: flex; align-items: center; gap: .5rem;
}
.fc-section > p.fc-intro {
  color: #4C1D95; font-size: 1rem; line-height: 1.65; margin-top: .45rem; max-width: 62ch;
}

/* ── ROBOT BODY MAP ──────────────────────────────────────── */
.body-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .85rem; margin-top: 1.2rem;
}
.port-card {
  background: #fff; border: 1px solid #E9D5FF; border-radius: 16px;
  padding: 1rem .95rem; text-align: center;
  box-shadow: 0 3px 12px rgba(79,70,229,.07);
  transition: transform .18s, box-shadow .18s;
}
.port-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(79,70,229,.16); }
.port-emoji { font-size: 1.9rem; line-height: 1; }
.port-tag {
  display: inline-block; margin: .55rem 0 .35rem;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: .72rem;
  color: #fff; background: #4F46E5; padding: .12rem .5rem; border-radius: 6px;
}
.port-name { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: .98rem; color: #1E1B4B; }
.port-role { font-size: .78rem; color: #6D5FA6; margin-top: .15rem; line-height: 1.4; }

/* ── MISSION FLOWCHART ───────────────────────────────────── */
.flow { margin-top: 1.4rem; }
.act { margin-bottom: 1.4rem; }
.act-label {
  display: flex; align-items: center; gap: .55rem; margin-bottom: .7rem;
}
.act-num {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: .85rem;
  color: #fff; background: #F97316; box-shadow: 0 2px 8px rgba(249,115,22,.35);
}
.act-title { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.05rem; color: #312E81; }
.act-sub { font-size: .8rem; color: #8B7DB4; margin-left: auto; font-family: 'Nunito', sans-serif; }

.node {
  position: relative;
  background: #fff; border: 1px solid #E4DBFB; border-left: 5px solid #A78BFA;
  border-radius: 12px; margin: 0 0 .55rem; overflow: hidden;
  box-shadow: 0 2px 8px rgba(79,70,229,.06);
  transition: box-shadow .18s, border-color .18s;
}
.node:hover { box-shadow: 0 6px 18px rgba(79,70,229,.14); }
/* connector arrow between nodes */
.node::after {
  content: '▼'; position: absolute; left: 28px; bottom: -16px;
  font-size: .7rem; color: #C4B5FD; z-index: 2;
}
.node:last-child::after { display: none; }

.node-head {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: .7rem; text-align: left;
  padding: .8rem 1rem; font-family: inherit;
}
.node-idx {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 7px;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: .75rem;
  background: #EDE9FE; color: #5B21B6;
}
.node-fn {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: .9rem;
  color: #4F46E5; flex-shrink: 0;
}
.node-what { font-size: .86rem; color: #4B4564; flex: 1; line-height: 1.4; min-width: 0; }
.node-chev {
  flex-shrink: 0; width: 16px; height: 16px; color: #A78BFA;
  transition: transform .2s;
}
.node-head[aria-expanded="true"] .node-chev { transform: rotate(180deg); }
.node-head[aria-expanded="true"] { background: #FAF7FF; }

.node-body { display: none; padding: 0 1rem 1rem 3.4rem; }
.node-body.open { display: block; }
.node-uses { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .7rem; }
.use-chip {
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: .68rem;
  padding: .12rem .5rem; border-radius: 20px;
  background: #F1FDF6; color: #047857; border: 1px solid #BBF7D0;
}
.use-chip[data-kind="part"] { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.use-chip[data-kind="var"]  { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.use-chip[data-kind="tool"] { background: #F5F3FF; color: #6D28D9; border-color: #DDD6FE; }

pre.code {
  background: #0D0B18; border-radius: 10px; padding: .85rem 1.1rem; margin: 0;
  overflow-x: auto; border: 1px solid rgba(167,139,250,.18);
  box-shadow: 0 4px 16px rgba(13,11,24,.3);
}
pre.code code {
  font-family: 'JetBrains Mono', monospace; font-size: .78rem; line-height: 1.6;
  color: #E2DCFF; white-space: pre;
}
.tok-kw  { color: #C792EA; }
.tok-fn  { color: #82AAFF; }
.tok-num { color: #86EFAC; }
.tok-com { color: #6B6488; font-style: italic; }
.tok-var { color: #FCA5A5; }

.flow-finish {
  display: flex; align-items: center; gap: .65rem;
  background: linear-gradient(135deg, #064E3B, #047857);
  color: #ECFDF5; border-radius: 12px; padding: .85rem 1.1rem;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1rem;
  box-shadow: 0 4px 16px rgba(4,120,87,.3); margin-top: .3rem;
}

/* ── VARIABLE MEMORY ─────────────────────────────────────── */
.var-group { margin-top: 1.3rem; }
.var-group-head {
  display: flex; align-items: center; gap: .55rem; margin-bottom: .7rem;
}
.var-group-icon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px;
  display: grid; place-items: center; font-size: 1.1rem;
}
.var-group-title { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.12rem; color: #1E1B4B; }
.var-group-desc { font-size: .82rem; color: #8B7DB4; }

.vg-brain .var-group-icon { background: #FEF3C7; }
.vg-pos   .var-group-icon { background: #FFE4E6; }
.vg-color .var-group-icon { background: #E0E7FF; }

.var-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.var-card {
  background: #fff; border: 1px solid #E9D5FF; border-radius: 14px;
  padding: .95rem 1rem; box-shadow: 0 2px 10px rgba(79,70,229,.06);
}
.var-card .vc-top { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.vc-name { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: .92rem; color: #B91C1C; }
.vc-val {
  font-family: 'JetBrains Mono', monospace; font-size: .72rem; font-weight: 700;
  background: #ECFDF5; color: #047857; padding: .08rem .42rem; border-radius: 6px; border: 1px solid #BBF7D0;
}
.vc-desc { font-size: .84rem; color: #4B4564; line-height: 1.55; margin-top: .5rem; }
.vc-desc b { color: #5B21B6; }

/* color map chips */
.colormap { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .55rem; margin-top: .4rem; }
.cm-chip {
  display: flex; align-items: center; gap: .5rem;
  background: #fff; border: 1px solid #E4DBFB; border-radius: 12px; padding: .5rem .65rem;
  box-shadow: 0 2px 8px rgba(79,70,229,.05);
}
.cm-swatch { width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0; border: 1px solid rgba(0,0,0,.12); }
.cm-text { line-height: 1.15; }
.cm-num { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: .95rem; color: #312E81; }
.cm-label { font-family: 'Nunito', sans-serif; font-size: .72rem; color: #6D5FA6; font-weight: 700; }

/* ── INTERCONNECTION WIRING BOARD ────────────────────────── */
.wire-hint {
  display: flex; align-items: center; gap: .5rem;
  font-size: .85rem; color: #6D28D9; background: #F5F3FF;
  border: 1px dashed #C4B5FD; border-radius: 12px; padding: .6rem .85rem; margin: 1rem 0 1.2rem;
}
.wire-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.wire-col { background: #FAF8FF; border: 1px solid #EDE9FE; border-radius: 16px; padding: .85rem .8rem; }
.wire-col-title {
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .08em; color: #7C3AED;
  text-align: center; margin-bottom: .7rem;
}
.wire-list { display: flex; flex-direction: column; gap: .4rem; }
.chip {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: .78rem;
  padding: .42rem .6rem; border-radius: 9px; border: 1.5px solid transparent;
  cursor: pointer; text-align: left;
  transition: transform .12s, box-shadow .15s, opacity .15s, background .15s;
}
.chip:hover { transform: translateX(2px); }
.chip-var  { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.chip-tool { background: #F5F3FF; color: #6D28D9; border-color: #DDD6FE; }
.chip-prog { background: #FFF7ED; color: #C2410C; border-color: #FED7AA; }
.chip small { display: block; font-family: 'Nunito', sans-serif; font-weight: 600; font-size: .64rem; opacity: .75; margin-top: 2px; }

/* highlight states (driven by JS) */
.wire-board.lit .chip:not(.active):not(.linked) { opacity: .28; }
.chip.active {
  box-shadow: 0 0 0 3px rgba(249,115,22,.35); transform: scale(1.03);
}
.chip.linked { box-shadow: 0 0 0 2px rgba(124,58,237,.45); }

/* ── TRACE WIDGET ────────────────────────────────────────── */
.tracer {
  background: linear-gradient(135deg, #1E1B4B, #312E81);
  border-radius: 18px; padding: 1.3rem 1.3rem 1.5rem; color: #E9D5FF;
  box-shadow: 0 8px 30px rgba(49,46,129,.3);
}
.tracer h3 { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.05rem; color: #FBBF24; margin-bottom: .3rem; }
.tracer p.tr-sub { font-size: .85rem; color: #C4B5FD; margin-bottom: 1rem; line-height: 1.55; }

.tr-line { display: flex; gap: .4rem; margin: 1rem 0 .4rem; }
.tr-cell {
  flex: 1; text-align: center; padding: .6rem .2rem; border-radius: 10px;
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.1);
  transition: background .2s, transform .2s, border-color .2s;
}
.tr-cell .tc-pos { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: .78rem; color: #A5B4FC; }
.tr-cell .tc-name { font-family: 'Nunito', sans-serif; font-size: .64rem; color: #C4B5FD; margin-top: 2px; }
.tr-cell.robot {
  background: rgba(249,115,22,.25); border-color: #F97316; transform: translateY(-4px);
}
.tr-cell.target { box-shadow: inset 0 0 0 2px #FBBF24; }
.tr-cell .tc-robot { font-size: .95rem; line-height: 1; height: 1rem; }

.tr-state { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.tr-var {
  font-family: 'JetBrains Mono', monospace; font-size: .76rem;
  background: rgba(0,0,0,.28); border-radius: 9px; padding: .4rem .7rem;
  border: 1px solid rgba(255,255,255,.08);
}
.tr-var b { color: #86EFAC; }
.tr-var.changed { border-color: #FBBF24; box-shadow: 0 0 0 1px rgba(251,191,36,.4); }

.tr-controls { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-top: 1rem; }
.tr-controls label { font-size: .78rem; color: #C4B5FD; }
.tr-controls select {
  font-family: 'JetBrains Mono', monospace; font-size: .78rem;
  background: #0D0B18; color: #E2DCFF; border: 1px solid #4C1D95;
  border-radius: 8px; padding: .35rem .5rem;
}
.tr-btn {
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: .85rem;
  border: none; border-radius: 9px; padding: .45rem 1rem; cursor: pointer;
  transition: transform .12s, box-shadow .15s, opacity .15s;
}
.tr-btn:hover { transform: translateY(-2px); }
.tr-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.tr-step { background: #F97316; color: #fff; box-shadow: 0 3px 12px rgba(249,115,22,.4); }
.tr-reset { background: rgba(255,255,255,.12); color: #E9D5FF; }
.tr-log {
  font-family: 'JetBrains Mono', monospace; font-size: .74rem; line-height: 1.6;
  color: #C4B5FD; margin-top: 1rem; min-height: 1.6rem;
}
.tr-log .ok { color: #86EFAC; font-weight: 700; }

/* ── TOOLBOX REFERENCE ───────────────────────────────────── */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; margin-top: 1.2rem; }
.tool-card {
  background: #fff; border: 1px solid #E9D5FF; border-radius: 14px; padding: 1rem;
  box-shadow: 0 2px 10px rgba(79,70,229,.06);
}
.tool-card h4 {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: .9rem;
  color: #6D28D9; margin-bottom: .35rem;
}
.tool-card p { font-size: .84rem; color: #4B4564; line-height: 1.55; }
.tool-card .tool-tag {
  display: inline-block; margin-top: .55rem;
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: .66rem;
  padding: .12rem .5rem; border-radius: 20px;
  background: #EDE9FE; color: #5B21B6;
}

/* ── KEY TAKEAWAY CALLOUT ────────────────────────────────── */
.takeaway {
  display: flex; gap: .9rem; align-items: flex-start;
  background: #FFF7ED; border: 1px solid #FED7AA; border-left: 5px solid #F97316;
  border-radius: 14px; padding: 1.1rem 1.25rem; margin-top: 1rem;
}
.takeaway .ta-emoji { font-size: 1.6rem; line-height: 1; }
.takeaway p { font-size: .92rem; color: #9A3412; line-height: 1.6; }
.takeaway b { color: #7C2D12; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 767px) {
  .fc-hero { padding: 1.6rem 1.4rem; }
  .wire-board { grid-template-columns: 1fr; }
  .node-body { padding-left: 1rem; }
  .node-what { flex-basis: 100%; order: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .port-card, .chip, .tr-cell, .tr-btn, .node-chev { transition: none; }
}

/* ── TABS ────────────────────────────────────────────────── */
.fc-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.5rem; border-bottom: 2px solid #EDE9FE; }
.fc-tab {
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: .95rem;
  background: none; border: none; cursor: pointer; color: #8B7DB4;
  padding: .6rem .9rem; border-radius: 10px 10px 0 0; border-bottom: 3px solid transparent;
  margin-bottom: -2px; transition: color .15s, background .15s, border-color .15s;
}
.fc-tab:hover { color: #4F46E5; background: #FAF7FF; }
.fc-tab.active { color: #4F46E5; border-bottom-color: #F97316; }
.fc-panel { display: none; }
.fc-panel.active { display: block; animation: fade-in .25s ease; }

/* ── SIMULATE ────────────────────────────────────────────── */
.sim-panels { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-top: 1rem; align-items: start; }
.sim-col { display: flex; flex-direction: column; gap: .9rem; }
.sim-banner { background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 12px; padding: .7rem .9rem; font-size: .85rem; color: #9A3412; margin-bottom: .9rem; }
.sim-mat { width: 100%; aspect-ratio: 2362 / 1143; background: #0E0B1C; border-radius: 14px; overflow: hidden; border: 1px solid rgba(167,139,250,.25); }
.sim-mat svg { width: 100%; height: 100%; display: block; }
.sim-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .8rem; }
.sim-btn { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: .85rem; border: 1px solid #DDD6FE; background: #fff; color: #5B21B6; border-radius: 9px; padding: .45rem .8rem; cursor: pointer; transition: transform .12s, box-shadow .15s; }
.sim-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(79,70,229,.15); }
.sim-primary { background: #F97316; color: #fff; border-color: #F97316; }
.sim-speed, .sim-prog, .sim-cal { display: flex; flex-direction: column; font-size: .75rem; color: #6D5FA6; gap: .2rem; font-family: 'Nunito', sans-serif; font-weight: 700; }
.sim-prog select { font-family: 'JetBrains Mono', monospace; font-size: .8rem; padding: .3rem; border-radius: 8px; border: 1px solid #DDD6FE; }
.sim-side { display: flex; flex-direction: column; gap: .9rem; }
.sim-card { background: #fff; border: 1px solid #E9D5FF; border-radius: 14px; padding: .9rem 1rem; }
.sim-card h3 { font-family: 'Fredoka', sans-serif; font-size: .95rem; color: #312E81; margin-bottom: .55rem; }
.sim-state { font-family: 'JetBrains Mono', monospace; font-size: .78rem; line-height: 1.8; color: #4B4564; }
.sim-state b { color: #B91C1C; }
.sim-cal { margin-bottom: .7rem; }
.sim-cal input { width: 100%; }
.sim-code { background: #0D0B18; border-radius: 10px; padding: .8rem; font-family: 'JetBrains Mono', monospace; font-size: .72rem; line-height: 1.6; color: #E2DCFF; max-height: 340px; overflow: auto; white-space: pre; }
.sim-code .cur { background: rgba(249,115,22,.3); display: inline-block; width: 100%; border-radius: 3px; }
@media (max-width: 767px) { .sim-panels { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .fc-panel.active { animation: none; } }
@media (max-width: 600px) { .sim-controls { gap: .35rem; } .sim-btn { padding: .4rem .6rem; font-size: .8rem; } }

/* ── TINKER ──────────────────────────────────────────────── */
.tk-chunks { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.tk-chunk { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: .85rem; background: #fff; border: 1.5px solid #DDD6FE; color: #5B21B6; border-radius: 10px; padding: .5rem .9rem; cursor: pointer; transition: transform .12s, box-shadow .15s; }
.tk-chunk:hover { transform: translateY(-1px); }
.tk-chunk.active { background: #F97316; color: #fff; border-color: #F97316; }
.tk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-bottom: .9rem; }
.tk-demo { background: #0E0B1C; border-radius: 12px; aspect-ratio: 3 / 2; overflow: hidden; }
.tk-demo svg { width: 100%; height: 100%; display: block; }
.tk-note { font-size: .82rem; color: #6D5FA6; margin-top: .55rem; line-height: 1.5; }
.tk-slider { margin-bottom: .9rem; }
.tk-slider label { display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace; font-size: .8rem; color: #4B4564; margin-bottom: .25rem; }
.tk-slider label b { color: #B91C1C; }
.tk-slider input { width: 100%; }
.tk-out-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .55rem; }
.tk-out-head h3 { margin: 0; }

/* ── BUILD ───────────────────────────────────────────────── */
.bd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-bottom: .9rem; }
.bd-toolbox { display: flex; flex-wrap: wrap; gap: .4rem; }
.bd-chip { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: .78rem; background: #FFF7ED; border: 1.5px solid #FED7AA; color: #C2410C; border-radius: 9px; padding: .4rem .65rem; cursor: pointer; transition: transform .12s; }
.bd-chip:hover { transform: translateY(-1px); }
.bd-order { list-style: none; padding: 0; margin: 0 0 .8rem; display: flex; flex-direction: column; gap: .35rem; min-height: 48px; }
.bd-order:empty::after { content: 'Tap a job chunk to add it here…'; color: #A8A0C8; font-size: .85rem; font-style: italic; }
.bd-row { display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid #E9D5FF; border-radius: 9px; padding: .35rem .55rem; }
.bd-row .bd-name { font-family: 'JetBrains Mono', monospace; font-size: .8rem; color: #312E81; flex: 1; }
.bd-row button { border: none; background: #EDE9FE; color: #5B21B6; border-radius: 6px; width: 26px; height: 26px; cursor: pointer; font-size: .85rem; }
.bd-row button:hover { background: #DDD6FE; }
.bd-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.bd-compare { font-size: .82rem; color: #4B4564; line-height: 1.6; }
.bd-compare .ok { color: #047857; font-weight: 700; }
.bd-compare .no { color: #B91C1C; font-weight: 700; }
#bd-mat { margin-bottom: .8rem; }

/* ── QUIZ ────────────────────────────────────────────────── */
.qz-progress { margin-bottom: 1rem; }
.qz-bar { height: 10px; background: #EDE9FE; border-radius: 99px; overflow: hidden; }
.qz-bar-fill { display: block; height: 100%; width: 0; background: #F97316; border-radius: 99px; transition: width .3s ease; }
.qz-count { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: .78rem; color: #6D5FA6; margin-top: .4rem; }
.qz-card { background: #fff; border: 1px solid #E9D5FF; border-radius: 16px; padding: 1.4rem 1.5rem; }
.qz-q { font-family: 'Fredoka', sans-serif; font-size: 1.2rem; color: #1E1B4B; margin-bottom: 1rem; }
.qz-opts { display: flex; flex-direction: column; gap: .5rem; }
.qz-opt { text-align: left; font-family: 'Nunito', sans-serif; font-weight: 600; font-size: .95rem; background: #FAF8FF; border: 1.5px solid #E4DBFB; border-radius: 12px; padding: .7rem .9rem; cursor: pointer; transition: background .15s, border-color .15s; }
.qz-opt:hover { background: #F1ECFF; }
.qz-opt:disabled { cursor: default; }
.qz-opt.correct { background: #ECFDF5; border-color: #34D399; color: #047857; }
.qz-opt.wrong { background: #FEF2F2; border-color: #F87171; color: #B91C1C; }
.qz-explain { margin-top: 1rem; padding: .8rem 1rem; background: #FFF7ED; border-left: 4px solid #F97316; border-radius: 0 10px 10px 0; font-size: .9rem; color: #9A3412; }
.qz-next { margin-top: 1rem; }
.qz-result { text-align: center; background: linear-gradient(135deg, #312E81, #5B21B6); color: #F5F3FF; border-radius: 18px; padding: 2rem; }
.qz-result h3 { font-family: 'Fredoka', sans-serif; font-size: 1.8rem; color: #FBBF24; margin-bottom: .5rem; }
.qz-badge { font-size: 3rem; }
@media (max-width: 720px) { .tk-grid, .bd-grid { grid-template-columns: 1fr; } }
