:root {
  --bg: #f4f7fb;
  --bg-2: #e9eef5;
  --panel: #ffffff;
  --panel-2: #f7fafd;
  --border: #d5deea;
  --text: #1b2430;
  --muted: #5b6675;
  --accent: #4f8cff;
  --accent-2: #22d3a6;
  --warn: #ffb020;
  --danger: #ff5c72;
  --radius: 14px;
  --mono: "Cascadia Code", "Consolas", "Fira Code", monospace;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background:
    radial-gradient(1200px 600px at 80% -10%, #e6eefb 0%, transparent 55%),
    radial-gradient(900px 500px at -10% 10%, #e3f5ee 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px var(--accent);
}
.brand small { color: var(--muted); font-weight: 500; }

.week-nav { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.week-nav a {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
}
.week-nav a:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.week-nav a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* ---------- Layout ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 34px 22px 70px; }

.hero { text-align: center; padding: 40px 10px 10px; }
.hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 0 0 12px;
  background: linear-gradient(120deg, #1b2430 10%, var(--accent) 60%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { color: var(--muted); max-width: 720px; margin: 0 auto 8px; }
.hero .tags { margin-top: 18px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.tag {
  font-size: .78rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-2);
}

/* ---------- Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  overflow: hidden;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: .8;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px -22px var(--accent);
}
.card .week-no {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
}
.card h3 { margin: 6px 0 8px; font-size: 1.2rem; }
.card p { color: var(--muted); margin: 0 0 16px; font-size: .93rem; flex: 1; }
.card .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.card .meta span {
  font-size: .74rem;
  background: rgba(79, 140, 255, .12);
  color: #1d4ed8;
  border: 1px solid rgba(79, 140, 255, .3);
  padding: 3px 9px;
  border-radius: 6px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: .9rem;
  padding: 9px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: filter .15s ease;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.ghost:hover { border-color: var(--accent); filter: none; }
.btn.small { padding: 6px 12px; font-size: .82rem; }

/* ---------- Lab page ---------- */
.breadcrumb { color: var(--muted); font-size: .86rem; margin-bottom: 14px; }
.lab-head h1 { margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.lab-head .lede { color: var(--muted); max-width: 860px; }

.panels {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  margin: 26px 0;
}
@media (max-width: 900px) { .panels { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.panel h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 9px;
}
.panel h2 .ico { font-size: 1.1rem; }
.panel ul, .panel ol { margin: 0; padding-left: 20px; }
.panel li { margin-bottom: 8px; color: #334155; }
.panel li::marker { color: var(--accent-2); }

.panel.accent { border-color: rgba(34, 211, 166, .4); }
.panel.accent h2 { color: var(--accent-2); }

/* ---------- Workspace ---------- */
.workspace {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 10px;
}
.ws-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.ws-toolbar label { color: var(--muted); font-size: .85rem; }
.ws-toolbar select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-family: var(--mono);
  font-size: .85rem;
}
.ws-toolbar .spacer { margin-left: auto; }
.status { font-size: .8rem; color: var(--muted); }
.status.ok { color: var(--accent-2); }
.status.err { color: var(--danger); }

.ws-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
}
@media (max-width: 900px) {
  .ws-body { grid-template-columns: 1fr; }
  .ws-body .pane-preview { border-left: none; border-top: 1px solid var(--border); }
}
.ws-body-single { grid-template-columns: 1fr; }
.ws-body-single .pane-preview { border-left: none; }

.pane { display: flex; flex-direction: column; min-width: 0; }
.pane-title {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  padding: 8px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.pane-preview { border-left: 1px solid var(--border); }

#editor {
  flex: 1;
  width: 100%;
  min-height: 420px;
  resize: vertical;
  border: none;
  outline: none;
  background: #f3f6fb;
  color: #24324a;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  padding: 14px 16px;
  tab-size: 4;
  white-space: pre;
  overflow: auto;
}

.pane-preview iframe {
  flex: 1;
  width: 100%;
  min-height: 420px;
  border: none;
  background: #fff;
}

.hint {
  font-size: .84rem;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 12px;
}
.hint code, code {
  font-family: var(--mono);
  background: rgba(79, 140, 255, .12);
  color: #1d4ed8;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: .86em;
}

.files-list { margin-top: 8px; font-size: .88rem; color: var(--muted); }
.files-list a { font-family: var(--mono); }

/* ---------- Per-file task panel ---------- */
.tasks-for-file {
  margin-top: 22px;
  border-color: rgba(79, 140, 255, .45);
  background: linear-gradient(180deg, rgba(79, 140, 255, .08), var(--panel));
}
.tasks-for-file h2 { color: #1d4ed8; flex-wrap: wrap; }
.ft-name { color: var(--accent-2); }
.ft-file-badge {
  font-family: var(--mono);
  font-size: .74rem;
  background: rgba(34, 211, 166, .14);
  color: #0e9f6e;
  border: 1px solid rgba(34, 211, 166, .35);
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 600;
}
.ft-summary { color: var(--muted); margin: 0 0 12px; }
.tasks-for-file ol { counter-reset: t; list-style: none; padding-left: 0; }
.tasks-for-file ol > li {
  position: relative;
  padding: 8px 8px 8px 44px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, .02);
  border: 1px solid var(--border);
}
.tasks-for-file ol > li::before {
  counter-increment: t;
  content: counter(t);
  position: absolute;
  left: 10px;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- IDE hint ---------- */
.ide-hint {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f3f6fb;
  border: 1px dashed var(--accent);
}
.ide-lead { margin: 0 0 10px; color: #1d4ed8; font-size: .9rem; }
.ide-steps { margin: 0 0 12px; padding-left: 20px; }
.ide-steps li { margin-bottom: 6px; color: #334155; font-size: .88rem; }
.ide-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .ide-cols { grid-template-columns: 1fr; } }
.ide-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  min-width: 0;
}
.ide-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent-2);
  font-weight: 700;
}
.ide-col code { font-size: .8rem; overflow-wrap: anywhere; }
kbd {
  font-family: var(--mono);
  font-size: .78em;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
}

/* ---------- Getting started guide ---------- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.guide-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.guide-card h3 { margin: 0 0 10px; font-size: 1.05rem; color: var(--accent-2); }
.guide-card ol, .guide-card ul { margin: 0; padding-left: 20px; }
.guide-card li { margin-bottom: 7px; color: #334155; font-size: .92rem; }
.callout {
  border-left: 4px solid var(--warn);
  background: rgba(255, 176, 32, .08);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0;
  color: #92400e;
  font-size: .9rem;
}
.callout.good { border-left-color: var(--accent-2); background: rgba(34, 211, 166, .08); color: #0e9f6e; }
.callout strong { color: var(--text); }
.toc {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 6px;
}
.toc a {
  font-size: .82rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 13px;
  color: var(--muted);
}
.toc a:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.os-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(79, 140, 255, .14);
  color: #1d4ed8;
  border-radius: 6px;
  padding: 2px 8px;
  margin-right: 6px;
}
.kbd-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .9rem; }
.kbd-table th, .kbd-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.kbd-table th { color: var(--muted); font-weight: 600; }

/* ---------- Progress panel ---------- */
.push-right { margin-left: auto; }
.progress-panel h2 { gap: 10px; flex-wrap: wrap; }
.progress-count { font-size: .85rem; color: var(--muted); font-weight: 600; }
.progress-bar {
  height: 14px;
  border-radius: 999px;
  background: #f3f6fb;
  border: 1px solid var(--border);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .3s ease;
}
.progress-note { margin: 10px 0 0; color: var(--muted); font-size: .85rem; }
.instructor-badge {
  margin: 8px 0 0;
  color: var(--warn);
  font-size: .82rem;
  font-weight: 600;
}

/* ---------- Task items with checkboxes ---------- */
.tasks-for-file ol > li.task-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.tasks-for-file ol > li.task-item::before { display: none; }
.task-check {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin-top: 2px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: #f3f6fb;
  cursor: pointer;
  position: relative;
}
.task-check:checked {
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.task-check:checked::after {
  content: "\2713";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 14px;
}
.task-body { flex: 1; min-width: 0; }
.task-item.done .task-text { color: var(--muted); text-decoration: line-through; }
.hint-toggle {
  margin-top: 6px;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--accent);
  font-size: .78rem;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.hint-toggle:hover { border-color: var(--accent); }
.task-hint {
  margin-top: 6px;
  padding: 8px 12px;
  border-left: 3px solid var(--warn);
  background: rgba(255, 176, 32, .08);
  border-radius: 6px;
  color: #92400e;
  font-size: .85rem;
}

/* ---------- Solution ---------- */
.solution-wrap { margin-top: 14px; }
.solution-box {
  margin-top: 10px;
  padding: 12px 14px;
  background: #f3f6fb;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.solution-box strong { display: block; color: var(--accent-2); margin-bottom: 8px; font-size: .85rem; }
.solution-box pre {
  margin: 0;
  overflow: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: #24324a;
}
.solution-box code { background: none; padding: 0; }

/* ---------- Run of show + timer ---------- */
.run-panel h2 { flex-wrap: wrap; gap: 10px; }
.timer {
  font-family: var(--mono);
  font-size: 1.15rem;
  color: var(--accent-2);
  background: #f3f6fb;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px 12px;
  margin-left: auto;
}
.run-list { list-style: none; padding-left: 0; margin: 0; display: grid; gap: 4px; }
.run-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: #334155;
  font-size: .9rem;
}
.run-list li .t {
  font-family: var(--mono);
  color: var(--muted);
  min-width: 46px;
}
.run-list li .dur { margin-left: auto; color: var(--muted); font-size: .78rem; }
.run-list li.active {
  background: rgba(79, 140, 255, .14);
  border-color: var(--accent);
  color: var(--text);
}
.run-list li.active .t { color: var(--accent-2); }

/* ---------- Exit quiz ---------- */
.quiz-panel h2 { gap: 10px; }
.quiz-best { font-size: .82rem; color: var(--accent-2); font-weight: 600; }
.quiz-lede { color: var(--muted); margin: 0 0 14px; }
.quiz-q {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  background: var(--bg-2);
}
.quiz-q.ok { border-color: var(--accent-2); }
.quiz-q.bad { border-color: var(--danger); }
.quiz-text { margin: 0 0 10px; font-weight: 600; }
.quiz-opt {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.quiz-opt:hover { background: rgba(15, 23, 42, .03); }
.quiz-opt input { accent-color: var(--accent); }
.quiz-why { margin: 10px 0 0; font-size: .86rem; color: var(--muted); }
.quiz-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.quiz-score { font-weight: 700; color: var(--accent-2); }

/* ---------- Guided lab activity ---------- */
.activity-panel {
  margin-top: 22px;
  border-color: rgba(34, 211, 166, .4);
}
.activity-panel h2 { flex-wrap: wrap; gap: 10px; }
.activity-intro { color: var(--muted); }
.activity-steps {
  list-style: none;
  padding-left: 0;
  margin: 16px 0 0;
  counter-reset: part;
}
.activity-step {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: var(--bg-2);
}
.activity-step h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.activity-step h3::before {
  counter-increment: part;
  content: counter(part);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-2);
  color: #ffffff;
  font-weight: 700;
  font-size: .82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
}
.activity-step .obj {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent-2);
  border: 1px solid rgba(34, 211, 166, .5);
  border-radius: 999px;
  padding: 1px 9px;
}
.activity-step p { color: #334155; }
.activity-panel pre {
  background: #f3f6fb;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 14px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: #24324a;
  white-space: pre;
}
.activity-panel pre code { background: none; padding: 0; }

.file-path {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--muted);
  margin: 0 0 8px;
}
.activity-step .mini-steps {
  counter-reset: ms;
  list-style: none;
  padding-left: 0;
  margin: 10px 0 0;
}
.activity-step .mini-steps li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 7px;
  color: #334155;
  font-size: .9rem;
}
.activity-step .mini-steps li pre {
  margin: 8px 0 4px;
  font-size: 12px;
}
.activity-step .mini-steps li::before {
  counter-increment: ms;
  content: counter(ms);
  position: absolute;
  left: 0;
  top: 1px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(79, 140, 255, .22);
  color: #1d4ed8;
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.checkpoint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed var(--accent-2);
  border-radius: 9px;
  background: rgba(34, 211, 166, .06);
  color: #0e9f6e;
  font-size: .88rem;
  cursor: pointer;
}
.checkpoint input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 1px;
  border: 2px solid var(--accent-2);
  border-radius: 5px;
  background: #f3f6fb;
  cursor: pointer;
  position: relative;
}
.checkpoint input:checked { background: var(--accent-2); }
.checkpoint input:checked::after {
  content: "\2713";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 13px;
}
.checkpoint.done { opacity: .6; }
.checkpoint.done { text-decoration: line-through; }

/* ---------- Week materials ---------- */
.materials-panel h2 { flex-wrap: wrap; gap: 10px; }
.materials-list {
  list-style: none;
  padding-left: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}
.materials-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-2);
}
.materials-list .mat-name { font-family: var(--mono); font-size: .86rem; color: #334155; overflow-wrap: anywhere; }
.materials-list li a { margin-left: auto; }
.materials-list .mat-none { color: var(--muted); font-style: italic; }

/* ---------- Fill in the blanks (drag & drop) ---------- */
.fill-panel { margin-top: 22px; }
.fill-title { color: var(--accent-2); }
.fill-intro { color: #334155; }
.fill-list { display: grid; gap: 20px; margin-top: 12px; }
.fill-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  background: var(--panel-2);
}
.fill-heading { margin: 0 0 8px; font-size: .98rem; color: var(--accent); }
.fill-item.done { border-color: var(--accent-2); }
.fill-panel.done { border-color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent-2); }
.fill-panel.done h2 { color: var(--accent-2); }
.fill-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--bg-2);
  border: 1px dashed var(--border);
  border-radius: 9px;
  min-height: 46px;
}
.fill-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12.5px;
  background: #dbeafe;
  color: #24324a;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 3px 9px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.fill-chip.selected { outline: 2px solid var(--accent-2); }
.fill-code {
  background: #f3f6fb;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px 16px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 2;
  color: #24324a;
  white-space: pre;
}
.fill-zone {
  display: inline-block;
  min-width: 92px;
  height: 22px;
  border-bottom: 2px dashed var(--accent);
  margin: 0 3px;
  vertical-align: middle;
  text-align: center;
  border-radius: 4px;
}
.fill-zone.hover { background: rgba(79, 140, 255, .2); }
.fill-zone.ok { border-bottom-color: var(--accent-2); }
.fill-zone.bad { border-bottom-color: var(--danger); }
.fill-zone .fill-chip { margin: 0; vertical-align: middle; }
.fill-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.fill-score { font-weight: 700; color: var(--accent-2); }

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
  padding: 26px 20px 40px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* ---------- Lecture activity ---------- */
.lecture-panel { margin: 0 0 26px; border-color: rgba(79, 140, 255, .45); }
.lecture-panel h2 { color: var(--accent); }
.lecture-panel h3 { margin: 0 0 10px; font-size: .95rem; }
.lecture-intro { color: var(--muted); margin: 0 0 16px; max-width: 900px; }
.lecture-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
@media (max-width: 900px) { .lecture-cols { grid-template-columns: 1fr; } }
.panel .lecture-plan { list-style: none; padding: 0; }
.lecture-plan li {
  display: grid;
  grid-template-columns: 44px 58px 150px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 7px 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.lecture-plan li:last-child { border-bottom: none; }
.seg-time { font-family: ui-monospace, Consolas, monospace; color: var(--muted); font-size: .85rem; }
.seg-len { font-size: .78rem; color: var(--muted); }
.seg-what { color: #334155; font-size: .9rem; }
@media (max-width: 560px) {
  .lecture-plan li { grid-template-columns: 44px 1fr; }
  .seg-len { display: none; }
  .seg-what { grid-column: 2; }
}
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
