/* ============ ETKİLEŞİMLİ İÇERİK ============ */
.lesson-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.lesson-head h1 { font-size: clamp(1.8rem, 3vw, 2.3rem); font-weight: 800; margin: 8px 0 4px; }
.lesson-head p { margin: 0; max-width: 60ch; }
.badge-int { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--amber-soft); color: var(--amber); }

.steps-bar { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.steps-bar li { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: .88rem; color: var(--muted); }
.steps-bar span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-alt); font-size: .8rem; }
.steps-bar li.active { border-color: var(--primary); color: var(--text); }
.steps-bar li.active span { background: var(--primary); color: var(--primary-ink); }
.steps-bar li.passed span { background: var(--green); color: #fff; }
.steps-bar li.passed span { font-size: 0; }
.steps-bar li.passed span::after { content: "✓"; font-size: .8rem; }

.lab { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.graph-card { display: grid; gap: 14px; }
.mode-switch { display: flex; gap: 6px; background: var(--bg-alt); padding: 5px; border-radius: 14px; flex-wrap: wrap; }
.mode-switch label { flex: 1; position: relative; min-width: 180px; }
.mode-switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.mode-switch span { display: block; text-align: center; padding: 10px; border-radius: 10px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.mode-switch input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.mode-switch input:focus-visible + span { outline: 3px solid var(--primary); }
.equation { margin: 0; text-align: center; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }

.graph-wrap { position: relative; max-width: 520px; width: 100%; margin: 0 auto; }
#graph { width: 100%; height: auto; display: block; background: var(--bg); border: 1px solid var(--border); border-radius: 16px; touch-action: none; cursor: crosshair; }
.grid .minor { stroke: var(--border); stroke-width: .5; }
.grid .major { stroke: var(--border); stroke-width: 1; }
.grid .axis { stroke: var(--muted); stroke-width: 1.5; }
.tick { fill: var(--muted); font-size: 10px; font-family: inherit; }
.axis-name { fill: var(--muted); font-size: 13px; font-weight: 700; font-style: italic; font-family: inherit; }
.curve { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.marks circle { stroke: var(--surface); stroke-width: 2; }
.m-y { fill: var(--accent); } .m-root { fill: var(--green); } .m-vertex { fill: var(--amber); }
.mark-lbl { fill: var(--text); font-size: 11px; font-weight: 700; font-family: inherit; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
.cross line { stroke: var(--muted); stroke-dasharray: 3 3; }
.cross circle { fill: var(--primary); stroke: var(--surface); stroke-width: 2; }
.coord { position: absolute; top: 10px; right: 10px; background: #0b1f4d; color: #fff; padding: 5px 10px; border-radius: 8px; font-size: .82rem; font-weight: 600; pointer-events: none; }
.coord[hidden] { display: none; }

.sliders { display: grid; gap: 12px; }
.sl { display: grid; gap: 4px; }
.sl[hidden] { display: none; }
.sl span { display: flex; justify-content: space-between; font-weight: 800; font-style: italic; }
.sl output { font-style: normal; background: var(--primary-soft); color: var(--primary); padding: 1px 10px; border-radius: 99px; min-width: 48px; text-align: center; }
.sl input { width: 100%; accent-color: var(--primary); height: 28px; cursor: pointer; }
#reset { justify-self: start; }

.side-col { display: grid; gap: 16px; }
.side-h { font-size: 1.05rem; margin: 0 0 12px; }
.card-head .side-h { margin: 0; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.facts li { background: var(--bg-alt); border-radius: 12px; padding: 10px 12px; display: grid; line-height: 1.35; }
.facts small { color: var(--muted); font-size: .8rem; }

.challenges { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.ch { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.ch:hover { border-color: var(--primary); }
.ch-box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border); flex-shrink: 0; display: grid; place-items: center; font-size: .8rem; font-weight: 800; }
.ch.done { background: var(--green-soft); border-color: var(--green); }
.ch.done .ch-box { background: var(--green); border-color: var(--green); color: #fff; }
.ch.done .ch-box::after { content: "✓"; }
.ch-t { display: grid; font-weight: 600; font-size: .92rem; line-height: 1.3; }
.ch-t small { color: var(--muted); font-weight: 500; font-size: .76rem; }
.hint { display: block; text-align: center; margin-top: 8px; font-size: .8rem; }

/* Test */
.quiz, .done { max-width: 720px; margin: 0 auto; }
.quiz-card, .done-card { padding: 32px; }
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; color: var(--muted); }
.q-progress { flex: 1; height: 8px; border-radius: 99px; background: var(--bg-alt); overflow: hidden; }
.q-progress span { display: block; height: 100%; background: var(--primary); transition: width .3s; }
.quiz-card h2 { font-size: 1.4rem; margin-bottom: 18px; }
.options { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); font-weight: 600; font-size: 1rem; }
.opt:not(:disabled):hover { border-color: var(--primary); background: var(--primary-soft); }
.opt-l { width: 30px; height: 30px; border-radius: 50%; background: var(--bg-alt); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.right .opt-l { background: var(--green); color: #fff; }
.opt.wrong { border-color: var(--live); background: var(--accent-soft); }
.opt.wrong .opt-l { background: var(--live); color: #fff; }
.opt:disabled { cursor: default; color: var(--text); }
.feedback { min-height: 1.5em; margin: 16px 0 0; font-weight: 600; padding: 0; border-radius: 12px; }
.feedback.ok, .feedback.no { padding: 12px 14px; }
.feedback.ok { background: var(--green-soft); color: var(--green); }
.feedback.no { background: var(--accent-soft); color: var(--live); }
.quiz-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.quiz-actions .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.done-card { text-align: center; }
.done-ic { font-size: 3.5rem; }
.done-card h2 { font-size: 1.7rem; margin: 8px 0; }
.done-stats { list-style: none; margin: 20px 0; padding: 0; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.done-stats li { background: var(--bg-alt); border-radius: 16px; padding: 14px 22px; display: grid; min-width: 110px; }
.done-stats b { font-size: 1.6rem; color: var(--primary); }
.done-stats small { color: var(--muted); }
.done-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

@media (max-width: 1100px) { .lab { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .steps-bar li { padding: 6px 10px 6px 6px; font-size: .8rem; }
  .quiz-card, .done-card { padding: 22px 18px; }
}
