/* ==========================================================================
   Makine öğrenmesi kursu — ders, proje ve açılış sayfaları
   main.css (Tema v2) değişkenlerini kullanır; koyu tema [data-theme="dark"].
   ========================================================================== */

.ml-page {
  --ml-mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, Menlo, "DejaVu Sans Mono", monospace;
  --ml-kw: #6d28d9; --ml-str: #15803d; --ml-com: #5b6472; --ml-num: #b45309; --ml-bi: #0e7490; --ml-fn: #1d4ed8; --ml-dec: #a21caf;
  --ml-ok: #15803d; --ml-warn: #b45309; --ml-bad: #b91c1c;
  --ml-term-bg: #0b1220; --ml-term-head: #111b2e; --ml-term-fg: #e5e7eb; --ml-term-mute: #9aa7b8;
}
:root[data-theme="dark"] .ml-page {
  --ml-kw: #c4b5fd; --ml-str: #86efac; --ml-com: #9ca3af; --ml-num: #fbbf24; --ml-bi: #67e8f9; --ml-fn: #93c5fd; --ml-dec: #f0abfc;
  --ml-ok: #4ade80; --ml-warn: #fbbf24; --ml-bad: #f87171;
  --ml-term-bg: #070b12; --ml-term-head: #0d1524;
}

/* ---------- açılış sayfası (eski sınıflar korunur) ---------- */
.ml-hero { padding-block: clamp(40px, 6vw, 72px); }
.ml-hero h1 { max-width: 22ch; }
.ml-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 0; margin: 0; list-style: none; counter-reset: steps; }
.ml-steps li { counter-increment: steps; border-top: 2px solid var(--line); padding-top: 20px; }
.ml-steps li::before { content: "0" counter(steps); display: block; font: .875rem "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; color: var(--blue); margin-bottom: 12px; }
.ml-steps b { display: block; font-size: 1.25rem; margin-bottom: 8px; }
.ml-steps span { color: var(--muted); }

.ml-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 26px 0 0; padding: 0; list-style: none; }
.ml-stats li { color: rgba(255,255,255,.86); font-size: .95rem; }
.ml-stats strong { display: block; color: #fff; font-size: 1.6rem; line-height: 1.2; }

.ml-levels { display: grid; gap: 28px; }
.ml-level { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 32px; padding: 28px 0; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.ml-level:first-child { border-top: 0; padding-top: 0; }
.ml-level-head h3 { margin: 6px 0 8px; font-size: 1.5rem; }
.ml-level-head p { margin: 0 0 8px; color: var(--muted); font-size: .97rem; }
.ml-level-head .eyebrow { margin: 0; }
.ml-level-stats { font-size: .88rem !important; color: var(--faint) !important; }
.ml-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ml-item > a, .ml-item > div { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: inherit; text-decoration: none; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.ml-item > a:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.07); }
.ml-item > a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.ml-item-proje > a { background: color-mix(in srgb, var(--blue) 5%, var(--paper)); }
.ml-item-no { font-size: .82rem; font-weight: 700; color: var(--blue); white-space: nowrap; }
.ml-item-body strong { display: block; font-size: 1.02rem; line-height: 1.4; }
.ml-item-body span { display: block; margin-top: 2px; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.ml-item-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; max-width: 220px; }
.ml-item-time { color: var(--faint); font-size: .82rem; white-space: nowrap; }
.ml-item.is-soon > div { opacity: .55; }
.ml-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .74rem; font-weight: 600; line-height: 1.6; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.ml-tag-etkilesimli { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.ml-tag-pytorch { color: #b45309; border-color: color-mix(in srgb, #b45309 35%, var(--line)); }
:root[data-theme="dark"] .ml-tag-pytorch { color: #fbbf24; }
.ml-tag-proje { color: var(--fg); background: var(--panel); }

.ml-how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.ml-how li { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.ml-how b { display: block; margin-bottom: 6px; font-size: 1.05rem; }
.ml-how span { color: var(--muted); font-size: .95rem; line-height: 1.6; }
.ml-demo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.ml-demo-list a { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; background: var(--paper); }
.ml-demo-list a:hover { border-color: var(--blue); }
.ml-demo-list strong { display: block; }
.ml-demo-list span { display: block; color: var(--muted); font-size: .9rem; margin-top: 4px; }
.ml-setup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ml-setup > div { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.ml-setup h3 { margin: 0 0 8px; font-size: 1.1rem; }
.ml-setup p { margin: 0 0 10px; color: var(--muted); font-size: .95rem; }
.ml-setup pre { margin: 0; padding: 14px 16px; overflow-x: auto; border-radius: 8px; background: var(--ml-term-bg); color: var(--ml-term-fg); font: .84rem/1.6 var(--ml-mono); }

/* ---------- ders sayfası çerçevesi ---------- */
.ml-lesson-hero h1 { max-width: 24ch; }
.ml-lesson-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.ml-reading { min-width: 0; max-width: 80ch; padding-block: 32px 64px; font-size: 1.125rem; line-height: 1.85; }
.ml-reading h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 48px 0 18px; line-height: 1.35; scroll-margin-top: 96px; }
.ml-reading h3 { margin: 28px 0 12px; font-size: 1.22rem; line-height: 1.4; }
.ml-reading > :first-child, .ml-reading > section:first-child h2 { margin-top: 0; }
.ml-reading :is(ul, ol) { padding-left: 1.3em; }
.ml-reading li { margin: .3em 0; }
.ml-reading a { text-underline-offset: 3px; }
.ml-reading code { font: .84em/1.6 var(--ml-mono); overflow-wrap: anywhere; color: var(--blue-strong); background: var(--panel); padding: .1em .35em; border-radius: 4px; }
.ml-reading pre { overflow: auto; max-width: 100%; margin: 0; padding: 18px 22px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; tab-size: 4; font: .875rem/1.6 var(--ml-mono); }
.ml-reading pre code { font: inherit; color: var(--fg); background: none; padding: 0; border-radius: 0; overflow-wrap: normal; white-space: pre; }
.ml-reading mjx-container[display="true"] { display: block; overflow-x: auto; overflow-y: hidden; max-width: 100%; padding: 4px 0; }
.ml-reading mjx-container:not([display="true"]) { overflow-wrap: normal; }

/* sözdizimi renkleri (Pygments sınıfları) */
.ml-page pre code :is(.k, .kn, .kc, .kd, .kr, .ow, .kp) { color: var(--ml-kw); font-weight: 600; }
.ml-page pre code :is(.s, .s1, .s2, .sd, .sa, .si, .se, .sb, .sh, .sr, .sc) { color: var(--ml-str); }
.ml-page pre code :is(.c, .c1, .cm, .ch, .cs, .cp) { color: var(--ml-com); font-style: italic; }
.ml-page pre code :is(.m, .mi, .mf, .mh, .mo, .mb) { color: var(--ml-num); }
.ml-page pre code :is(.nb, .bp) { color: var(--ml-bi); }
.ml-page pre code :is(.nf, .nc, .fm) { color: var(--ml-fn); font-weight: 600; }
.ml-page pre code .nd { color: var(--ml-dec); }
/* main.css'teki .nc { display: grid } kuralı Pygments'in sınıf adı span'ine de uyuyor (class X(nn.Module) satırı bölünüyordu) */
.ml-page pre code .nc { display: inline; }

/* gezinti */
.ml-toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; margin-top: 32px; padding-right: 4px; display: grid; gap: 4px; scrollbar-width: thin; }
.ml-toc-title { margin: 0 0 6px 18px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.ml-toc-links { display: grid; border-left: 2px solid var(--line); }
.ml-toc-links a { display: block; padding: 8px 14px 8px 16px; margin-left: -2px; border-left: 2px solid transparent; font-size: .93rem; line-height: 1.45; color: var(--muted); text-decoration: none; }
.ml-toc-links a:hover { color: var(--blue); background: var(--panel); }
.ml-toc-links a.is-active { color: var(--blue); border-left-color: var(--blue); font-weight: 600; }
.ml-outline { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.ml-outline summary { padding: 10px 14px; cursor: pointer; font-size: .9rem; font-weight: 700; }
.ml-outline-level { margin: 10px 14px 4px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.ml-outline ol { list-style: none; margin: 0; padding: 0 6px 8px; }
.ml-outline a { display: block; padding: 6px 8px; border-radius: 6px; font-size: .84rem; line-height: 1.4; color: var(--muted); text-decoration: none; }
.ml-outline a span { display: block; font-size: .72rem; font-weight: 700; color: var(--faint); }
.ml-outline a:hover { background: var(--panel); color: var(--blue); }
.ml-outline a.is-current { background: var(--blue-soft); color: var(--fg); font-weight: 600; }

/* ders özeti kutusu */
.ml-goals { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0; margin: 0 0 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; font-size: 1rem; line-height: 1.65; }
.ml-goals-main { padding: 20px 24px; }
.ml-goals-title { margin: 0 0 8px; font-weight: 700; }
.ml-goals-main ul { margin: 0; padding-left: 1.2em; }
.ml-goals-main li { margin: .25em 0; }
.ml-goals-meta { margin: 0; padding: 14px 22px; background: var(--panel); border-left: 1px solid var(--line); }
.ml-goals-meta > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ml-goals-meta > div:last-child { border-bottom: 0; }
.ml-goals-meta dt { font-size: .82rem; font-weight: 700; color: var(--faint); }
.ml-goals-meta dd { margin: 0; font-size: .92rem; color: var(--muted); overflow-wrap: anywhere; }

/* kod blokları */
.ml-code { min-width: 0; margin: 24px 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--panel); }
.ml-code-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 10px 14px 10px 18px; background: var(--paper); border-bottom: 1px solid var(--line); }
.ml-code-name { font: 600 .86rem/1.5 var(--ml-mono); overflow-wrap: anywhere; }
.ml-code-meta { color: var(--faint); font-size: .82rem; }
.ml-code-actions { display: flex; gap: 8px; margin-left: auto; }
.ml-code-actions :is(a, button) { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--fg); cursor: pointer; font: 600 .875rem/1.2 "Segoe UI", system-ui, sans-serif; text-decoration: none; }
.ml-code-actions :is(a, button):hover { border-color: var(--blue); color: var(--blue); }
.ml-code pre { border: 0; border-radius: 0; max-height: 640px; }
.ml-copy-status { margin: 0; padding: 0 18px; color: var(--muted); font-size: .875rem; min-height: 0; }
.ml-copy-status:not(:empty) { padding: 8px 18px; border-top: 1px solid var(--line); background: var(--paper); }
.ml-snippet { margin: 20px 0; min-width: 0; }
.ml-snippet-cap { display: block; margin-bottom: 6px; color: var(--faint); font-size: .85rem; font-weight: 600; }
.ml-snippet pre { padding: 16px 20px; }

/* terminal çıktısı */
.ml-output { margin: 24px 0; border-radius: 9px; overflow: hidden; background: var(--ml-term-bg); border: 1px solid #1f2a3d; }
.ml-output figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 9px 16px; background: var(--ml-term-head); color: var(--ml-term-mute); font: 600 .8rem/1.5 var(--ml-mono); }
.ml-output figcaption span:first-child { color: #cbd5e1; }
.ml-reading .ml-output pre { margin: 0; padding: 16px 18px; border: 0; border-radius: 0; background: transparent; max-height: 520px; }
.ml-reading .ml-output pre { font-size: .84rem; line-height: 1.55; }
.ml-reading .ml-output pre code { color: var(--ml-term-fg); }

/* figürler */
.ml-result { margin: 28px 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 10px; }
.ml-result img { display: block; width: 100%; height: auto; border-radius: 4px; }
.ml-result figcaption { padding: 10px 4px 2px; font-size: .9rem; line-height: 1.6; color: #4b5563; }
:root[data-theme="dark"] .ml-result { border-color: var(--line); }

/* kutular */
.ml-box { border-radius: 0 var(--radius) var(--radius) 0; font-size: 1.04rem; line-height: 1.75; }
.ml-box > h3 { margin: 2px 0 8px; font-size: 1.08rem; }
.ml-box p { margin: 0 0 .7em; }
.ml-box > :last-child { margin-bottom: 0; }
.ml-box-dikkat { border-left-color: #d97706; }
.ml-box-dikkat .k-label { color: #b45309; }
.ml-box-muhendislik { border-left-color: var(--navy); }
:root[data-theme="dark"] .ml-box-muhendislik { border-left-color: #6aa8ea; }
.ml-box-ozet { border-left-color: #15803d; }
.ml-box-ozet .k-label { color: var(--ml-ok); }
:root[data-theme="dark"] .ml-box-dikkat .k-label { color: #fbbf24; }

/* tablolar */
.ml-table-wrap { max-width: 100%; overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 8px; }
.ml-reading table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.ml-reading caption { caption-side: top; text-align: left; padding: 10px 14px; font-size: .88rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.ml-reading th, .ml-reading td { padding: 9px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ml-reading thead th { background: var(--panel); font-size: .86rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.ml-reading tbody tr:last-child td { border-bottom: 0; }
.ml-reading td.num, .ml-reading th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ml-reading tr.is-best td { background: color-mix(in srgb, var(--blue) 7%, transparent); font-weight: 600; }

/* alıştırmalar */
.ml-exercise { margin: 22px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font-size: 1.04rem; }
.ml-ex-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 8px; line-height: 1.4; }
.ml-ex-no { font-weight: 800; }
.ml-ex-level { padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; border: 1px solid currentColor; }
.ml-ex-kolay { color: var(--ml-ok); } .ml-ex-orta { color: var(--ml-warn); } .ml-ex-zor { color: var(--ml-bad); }
.ml-ex-title { font-weight: 600; color: var(--muted); }
.ml-ex-q > :last-child { margin-bottom: 0; }
.ml-ex-q p { margin: 0 0 .6em; }
.ml-answer { margin-top: 12px; border-top: 1px dashed var(--line); }
.ml-answer summary { padding: 10px 0 0; cursor: pointer; color: var(--blue); font-weight: 700; font-size: .97rem; }
.ml-answer-body { padding: 8px 0 0; }
.ml-answer-body > :last-child { margin-bottom: 0; }
.ml-reading details:not(.ml-answer):not(.ml-outline) { border: 1px solid var(--line); border-radius: 8px; margin-block: 20px; }
.ml-reading details:not(.ml-answer):not(.ml-outline) > summary { padding: 16px 20px; cursor: pointer; font-weight: 600; line-height: 1.6; }
.ml-reading details:not(.ml-answer):not(.ml-outline) > :not(summary) { padding: 0 20px; }
.ml-reading details:not(.ml-answer):not(.ml-outline) > :last-child { padding-bottom: 18px; margin-bottom: 0; }

/* önceki / sonraki */
.ml-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.ml-pager a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; background: var(--paper); line-height: 1.45; }
.ml-pager a:hover { border-color: var(--blue); }
.ml-pager a span { display: block; color: var(--blue); font-size: .85rem; font-weight: 700; margin-bottom: 4px; }
.ml-pager a strong { font-size: 1rem; }
.ml-pager-next { text-align: right; grid-column: 2; }

/* kaynak notu */
.ml-reading .source-note { font-size: .95rem; color: var(--muted); }
.ml-sources { font-size: .97rem; }
.ml-sources li { margin: .35em 0; }

/* ---------- etkileşimli denemeler ---------- */
.ml-demo { --d-s1: #2a78d6; --d-s2: #eb6834; --d-s3: #1baf7a; --d-s4: #eda100; --d-s5: #e87ba4; --d-s6: #008300; --d-s7: #6250d6; --d-s8: #e34948; --d-ink: #0b0b0b; --d-ink2: #52514e; --d-mute: #898781; --d-grid: #e1e0d9; --d-surf: #fcfcfb; --d-axis: #c3c2b7;
  margin: 28px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); overflow: hidden; font-size: .95rem; line-height: 1.55; }
:root[data-theme="dark"] .ml-demo { --d-s1: #3987e5; --d-s2: #d95926; --d-s3: #199e70; --d-s4: #c98500; --d-s5: #d55181; --d-s6: #008300; --d-s7: #9085e9; --d-s8: #e66767; --d-ink: #f0efec; --d-ink2: #c3c2b7; --d-mute: #8f97a3; --d-grid: #263140; --d-surf: #141b25; --d-axis: #34404f; }
.ml-demo-fallback { margin: 0; padding: 18px 20px; color: var(--muted); }
.ml-demo-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ml-demo-head strong { font-size: 1.02rem; }
.ml-demo-head span { color: var(--muted); font-size: .88rem; }
.ml-demo-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; }
.ml-demo-body.is-wide { grid-template-columns: minmax(0, 1fr); }
.ml-demo-plots { display: grid; gap: 0; min-width: 0; background: var(--d-surf); }
.ml-demo-plots.two { grid-template-columns: 1fr 1fr; }
.ml-demo-plot { position: relative; min-width: 0; }
.ml-demo-plot + .ml-demo-plot { border-left: 1px solid var(--line); }
.ml-demo-plot canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; touch-action: none; }
.ml-demo-plot-title { position: absolute; top: 8px; left: 12px; right: 12px; margin: 0; font-size: .8rem; font-weight: 700; color: var(--d-ink2); pointer-events: none; }
.ml-demo-side { display: grid; align-content: start; gap: 14px; padding: 16px 18px; border-left: 1px solid var(--line); background: var(--paper); }
.ml-demo-body.is-wide .ml-demo-side { border-left: 0; border-top: 1px solid var(--line); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ml-demo label, .ml-demo .ml-demo-label { display: block; font-size: .85rem; font-weight: 600; color: var(--fg); }
.ml-demo output { float: right; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.ml-demo input[type="range"] { width: 100%; margin: 6px 0 0; accent-color: var(--blue); min-height: 28px; }
.ml-demo select { width: 100%; margin-top: 6px; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--fg); font: inherit; }
.ml-demo-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.ml-demo-buttons button { flex: 1 1 auto; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--fg); font: 600 .88rem/1.2 "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.ml-demo-buttons button.is-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
:root[data-theme="dark"] .ml-demo-buttons button.is-primary { color: #0f141b; }
.ml-demo-buttons button:hover { border-color: var(--blue); }
.ml-demo-buttons button:focus-visible, .ml-demo input:focus-visible, .ml-demo select:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.ml-demo-group { display: grid; gap: 12px; align-content: start; min-width: 0; }
.ml-demo [hidden] { display: none !important; }
.ml-demo-buttons button:disabled { opacity: .55; cursor: default; }
.ml-demo-readout { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--panel); font: .84rem/1.7 var(--ml-mono); color: var(--fg); }
.ml-demo-readout b { font-weight: 700; color: var(--blue); }
.ml-demo-note { margin: 0; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.ml-demo-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: .82rem; color: var(--d-ink2); }
.ml-demo-legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.ml-demo-check { display: flex !important; align-items: center; gap: 8px; font-weight: 600; }
.ml-demo-check input { width: 18px; height: 18px; accent-color: var(--blue); }

/* ---------- duyarlı ---------- */
@media (max-width: 1100px) {
  .ml-demo-body { grid-template-columns: minmax(0, 1fr); }
  .ml-demo-side { border-left: 0; border-top: 1px solid var(--line); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@media (max-width: 960px) {
  .ml-lesson-layout { grid-template-columns: 1fr; gap: 0; }
  .ml-toc { position: static; max-height: none; overflow: visible; margin-top: 20px; padding: 0; }
  .ml-toc-title { margin-left: 0; }
  .ml-toc-links { display: flex; flex-wrap: wrap; gap: 6px; border-left: 0; }
  .ml-toc-links a { margin: 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .86rem; }
  .ml-toc-links a.is-active { border-color: var(--blue); }
  .ml-level { grid-template-columns: 1fr; gap: 14px; }
  .ml-how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ml-setup { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ml-goals { grid-template-columns: 1fr; }
  .ml-goals-meta { border-left: 0; border-top: 1px solid var(--line); }
  .ml-item > a, .ml-item > div { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 14px 16px; }
  .ml-item-meta { justify-content: flex-start; max-width: none; }
  .ml-demo-plots.two { grid-template-columns: 1fr; }
  .ml-demo-plot + .ml-demo-plot { border-left: 0; border-top: 1px solid var(--line); }
  .ml-pager { grid-template-columns: 1fr; }
  .ml-pager-next { grid-column: 1; }
}
@media (max-width: 620px) {
  .ml-steps { grid-template-columns: 1fr; gap: 20px; }
  .ml-how { grid-template-columns: 1fr; }
  .ml-reading { font-size: 1.0625rem; }
  .ml-reading pre { padding: 14px 16px; }
  .ml-page .button-row .button { width: 100%; }
  .ml-goals-main { padding: 16px 18px; }
  .ml-goals-meta { padding: 10px 18px; }
  .ml-exercise { padding: 16px; }
}
@media print {
  .ml-toc, .ml-code-actions, .ml-demo, .ml-pager { display: none; }
  .ml-lesson-layout { display: block; }
  .ml-code pre, .ml-output pre { max-height: none; white-space: pre-wrap; }
  .ml-answer { display: block; }
}
.ml-page .visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.ml-output-note { margin: 0; padding: 8px 16px 10px; color: var(--ml-term-mute); font-size: .8rem; line-height: 1.5; border-top: 1px solid #1f2a3d; }
