/* ==========================================================================
   MKC 501 — etkileşimli araçlar (Hafta 1)
   Çerçeve: css/components/ml.css içindeki .ml-demo sınıfları. Burada yalnız eksikler.
   ========================================================================== */
.mk-tool {
  --mk-acc: var(--blue);
  --mk-acc2: #c2410c;
  --mk-acc3: #15803d;
  --mk-soft: color-mix(in srgb, var(--blue) 14%, transparent);
  --mk-soft2: color-mix(in srgb, #c2410c 12%, transparent);
  --mk-plot: var(--d-surf, #fcfcfb);
}
:root[data-theme="dark"] .mk-tool { --mk-acc2: #fb923c; --mk-acc3: #4ade80; --mk-soft2: color-mix(in srgb, #fb923c 16%, transparent); }

.mk-tool .ml-demo-plot svg { overflow: hidden; display: block; width: 100%; height: auto; touch-action: none; color: var(--fg); }
.mk-tool .ml-demo-plot { padding-top: 28px; }
.mk-tool .ml-demo-plot.mk-square { padding-top: 0; }
.mk-tool .ml-demo-plot.mk-plot-free + .mk-plot-free { border-top: 1px solid var(--line); border-left: 0; }
.mk-tool .ml-demo-plots:not(.two) > .ml-demo-plot + .ml-demo-plot { border-left: 0; border-top: 1px solid var(--line); }
.mk-tool .mk-ctl { min-width: 0; }
.mk-tool .ml-demo-side { min-width: 0; }
.mk-tool .ml-demo-readout { overflow-wrap: anywhere; }
.mk-tool .ml-demo-readout sub, .mk-tool .ml-demo-readout sup { line-height: 0; }
.mk-tool .mk-warn:empty, .mk-tool .mk-msg:empty { display: none; }
.mk-tool .mk-warn { margin: 0; padding: 8px 12px; border-left: 3px solid var(--mk-acc2); background: var(--mk-soft2); border-radius: 0 6px 6px 0; font-size: .86rem; line-height: 1.5; }
.mk-tool .mk-msg { margin: 0; padding: 8px 12px; border-left: 3px solid var(--mk-acc); background: var(--mk-soft); border-radius: 0 6px 6px 0; font-size: .86rem; line-height: 1.5; font-weight: 600; }
.mk-tool .ml-demo-buttons button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px currentColor; }

/* lejant işaretleri: renk + çizgi biçimi */
.mk-tool .mk-sw { display: inline-block; width: 22px !important; height: 0 !important; border-radius: 0 !important; vertical-align: middle !important; border-top: 3px solid var(--mk-acc); }
.mk-tool .mk-sw-acc2 { border-top: 3px dashed var(--mk-acc2); }
.mk-tool .mk-sw-ink { border-top: 2px dashed var(--fg); }
.mk-tool .mk-sw-soft { height: 10px !important; border: 2px solid var(--mk-acc3) !important; background: color-mix(in srgb, var(--mk-acc3) 28%, transparent); border-radius: 50% !important; }

/* --- SVG ortak --- */
.mk-tool .mk-plotbg { fill: var(--mk-plot); stroke: var(--line); }
.mk-tool .mk-axis { stroke: var(--muted); stroke-width: 1; }
.mk-tool .mk-grid0 { stroke: var(--line); stroke-width: 1; }
.mk-tool .mk-grid1 { stroke: color-mix(in srgb, var(--fg) 38%, transparent); stroke-width: 1; }
.mk-tool .mk-ink-line { stroke: var(--fg); stroke-width: 1.6; }
.mk-tool .mk-ink-thin { stroke: var(--muted); stroke-width: 1; }
.mk-tool .mk-svg-lbl { fill: var(--fg); font: 600 13px "Segoe UI", system-ui, sans-serif; }
.mk-tool .mk-svg-sm { fill: var(--muted); font: 11px "Segoe UI", system-ui, sans-serif; }
.mk-tool .mk-acc-txt { fill: var(--mk-acc); }
.mk-tool .mk-acc2-txt { fill: var(--mk-acc2); }
.mk-tool .mk-fill-ink { fill: var(--fg); }
.mk-tool .mk-fill-acc { fill: var(--mk-acc); }
.mk-tool .mk-fill-acc2 { fill: var(--mk-acc2); }
.mk-tool .mk-fill-mute { fill: var(--muted); }

/* kafes */
.mk-tool .mk-bar { stroke: var(--fg); stroke-width: 5; stroke-linecap: round; }
.mk-tool .mk-bar2 { stroke: var(--graphite, var(--fg)); stroke-dasharray: none; }
.mk-tool .mk-support { fill: var(--panel); stroke: var(--fg); stroke-width: 1.5; }
.mk-tool .mk-pin, .mk-tool .mk-node { fill: var(--paper); stroke: var(--fg); stroke-width: 2; }
.mk-tool .mk-load { stroke: var(--fg); stroke-width: 2.4; }
.mk-tool .mk-disp { stroke: var(--mk-acc2); stroke-width: 3; stroke-dasharray: 7 4; }
.mk-tool .mk-row1 { stroke: var(--mk-acc); stroke-width: 2; }
.mk-tool .mk-row2 { stroke: var(--mk-acc2); stroke-width: 2; stroke-dasharray: 8 5; }
.mk-tool .mk-ellipse { fill: color-mix(in srgb, var(--mk-acc3) 28%, transparent); stroke: var(--mk-acc3); stroke-width: 2; }
.mk-tool .mk-sol { fill: var(--fg); stroke: var(--paper); stroke-width: 1.5; }

/* matris dönüşümü */
.mk-tool .mk-circle0 { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 3 3; }
.mk-tool .mk-circle1 { fill: var(--mk-soft); stroke: var(--mk-acc); stroke-width: 2; }
.mk-tool .mk-eigline { stroke: var(--fg); stroke-width: 1.6; stroke-dasharray: 9 6; opacity: .85; }
.mk-tool .mk-col { stroke: var(--muted); stroke-width: 1.8; }
.mk-tool .mk-xvec { stroke: var(--mk-acc); stroke-width: 3; }
.mk-tool .mk-axvec { stroke: var(--mk-acc2); stroke-width: 4.5; }
.mk-tool .mk-handle { fill: transparent; stroke: var(--mk-acc); stroke-width: 1.5; stroke-dasharray: 2 2; cursor: grab; }
.mk-tool svg.mk-drag { cursor: crosshair; }
.mk-tool .mk-matgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; border: 1px solid var(--line); border-left-width: 3px; border-right-width: 3px; border-radius: 4px; }
.mk-tool .mk-matcell { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mk-tool .mk-matcell label { font-style: italic; width: 1em; flex: none; }
.mk-tool .mk-matcell input { width: 100%; min-width: 0; min-height: 38px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--fg); font: inherit; font-variant-numeric: tabular-nums; }
.mk-tool .mk-matcell input:focus-visible, .mk-tool .mk-mat-in input:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }

/* iki serbestlik dereceli sistem */
.mk-tool .mk-wall { stroke: var(--fg); stroke-width: 3; }
.mk-tool .mk-spring { fill: none; stroke: var(--fg); stroke-width: 1.8; stroke-linejoin: round; }
.mk-tool .mk-spring-none { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 2 4; }
.mk-tool .mk-mass { fill: var(--mk-soft); stroke: var(--mk-acc); stroke-width: 2; }
.mk-tool .mk-mass-txt { fill: var(--fg); }
.mk-tool .mk-ref { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.mk-tool .mk-th1 { fill: none; stroke: var(--mk-acc); stroke-width: 2; }
.mk-tool .mk-th2 { fill: none; stroke: var(--mk-acc2); stroke-width: 2; stroke-dasharray: 7 4; }
.mk-tool .mk-cursor { stroke: var(--fg); stroke-width: 1; opacity: .6; }
.mk-tool .mk-bar-a { fill: var(--mk-acc); }
.mk-tool .mk-bar-b { fill: var(--mk-soft2); stroke: var(--mk-acc2); stroke-width: 2; stroke-dasharray: 4 3; }

/* --- Gauss --- */
.mk-tool .mk-gauss-main { display: grid; gap: 14px; padding: 14px 16px; align-content: start; background: var(--paper); }
.mk-tool .mk-scroll { max-width: 100%; overflow-x: auto; }
.mk-tool .mk-gauss-edit { margin: 0; padding: 8px 10px 10px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.mk-tool .mk-gauss-edit legend { padding: 0 6px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.mk-tool table.mk-mat-in { width: auto; border-collapse: separate; border-spacing: 4px; font-size: 1rem; }
.mk-tool .mk-mat-in td { padding: 0; border: 0; }
.mk-tool .mk-mat-in input { width: 5.2em; min-height: 36px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--fg); font: .9rem/1.2 var(--ml-mono, monospace); text-align: right; }
.mk-tool .mk-mat-in td.mk-bcol { border-left: 2px solid var(--muted); padding-left: 6px; }
.mk-tool .mk-gauss-table { border: 1px solid var(--line); border-radius: 8px; background: var(--d-surf, var(--panel)); }
.mk-tool .mk-gauss-table:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.mk-tool table.mk-mat { width: auto; min-width: 100%; border-collapse: collapse; font: .9rem/1.4 var(--ml-mono, monospace); font-variant-numeric: tabular-nums; }
.mk-tool table.mk-mat th, .mk-tool table.mk-mat td { padding: 7px 10px; border: 0; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.mk-tool table.mk-mat thead th { background: transparent; color: var(--muted); font: 700 .78rem/1.3 "Segoe UI", system-ui, sans-serif; text-align: right; }
.mk-tool table.mk-mat tbody th { text-align: left; color: var(--muted); font: 700 .8rem/1.3 "Segoe UI", system-ui, sans-serif; }
.mk-tool table.mk-mat .mk-bcol { border-left: 2px solid var(--muted); }
.mk-tool table.mk-mat tr.is-op td, .mk-tool table.mk-mat tr.is-op th { background: var(--mk-soft2); }
.mk-tool table.mk-mat tr.is-op th { color: var(--mk-acc2); }
.mk-tool table.mk-mat td.is-pivcol { background: var(--mk-soft); }
.mk-tool table.mk-mat td.is-piv { outline: 2.5px solid var(--mk-acc); outline-offset: -3px; font-weight: 800; background: var(--mk-soft); }
.mk-tool .mk-gauss-op { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--panel); font: 600 .9rem/1.6 var(--ml-mono, monospace); overflow-wrap: anywhere; }
.mk-tool .mk-gauss-result:empty { display: none; }
.mk-tool .mk-gauss-result { display: grid; gap: 8px; }
.mk-tool .mk-gauss-result p, .mk-tool .mk-gauss-facts { margin: 0; }
.mk-tool .mk-gauss-facts { padding-left: 1.1em; font-size: .9rem; }
.mk-tool .mk-verdict { padding: 8px 12px; border-left: 4px solid var(--mk-acc); border-radius: 0 6px 6px 0; background: var(--mk-soft); font-size: .92rem; }
.mk-tool .mk-verdict.is-bad { border-left-color: var(--mk-acc2); background: var(--mk-soft2); }
.mk-tool .mk-verdict.is-inf { border-left-style: dashed; }
.mk-tool pre.mk-gauss-back { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font: .86rem/1.6 var(--ml-mono, monospace); white-space: pre-wrap; overflow-wrap: anywhere; }
.mk-tool .mk-gauss-x { font: 700 .9rem/1.6 var(--ml-mono, monospace); overflow-wrap: anywhere; }
.mk-tool .mk-gauss-count { margin: 0; font-size: .85rem; color: var(--muted); }
.mk-tool .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; }

@media (max-width: 720px) {
  .mk-tool .ml-demo-plots.two { grid-template-columns: 1fr; }
  .mk-tool .ml-demo-plots.two > .ml-demo-plot + .ml-demo-plot { border-left: 0; border-top: 1px solid var(--line); }
  .mk-tool .mk-gauss-main { padding: 12px; }
  .mk-tool .mk-mat-in input { width: 3.9em; padding: 4px; font-size: .84rem; }
  .mk-tool .mk-gauss-edit { padding: 6px; }
  .mk-tool table.mk-mat th, .mk-tool table.mk-mat td { padding: 6px 7px; }
  .mk-tool .ml-demo-side { grid-template-columns: minmax(0, 1fr) !important; }
}
@media print { .mk-tool { display: none; } }

/* geniş ekranda SVG yazıları aşırı büyümesin */
.mk-tool .ml-demo-plot svg { max-width: 640px; margin-inline: auto; }
.mk-tool .ml-demo-plots.two .ml-demo-plot svg { max-width: 460px; }
.mk-tool .ml-demo-plot.mk-square svg { max-width: 560px; }

/* ==========================================================================
   Ek araçlar (Hafta 2–14): serbest titreşim, büyütme, Fourier, özel fonksiyonlar, ısı, Duffing
   ========================================================================== */
.mk-tool { --mk-c3: #7c3aed; --mk-c4: #0e7490; --mk-c5: #b45309; --mk-c6: #be185d; --mk-c7: #4d7c0f; }
:root[data-theme="dark"] .mk-tool { --mk-c3: #c4b5fd; --mk-c4: #67e8f9; --mk-c5: #fbbf24; --mk-c6: #f9a8d4; --mk-c7: #bef264; }
.mk-tool .mk-th2dot { fill: none; stroke: var(--mk-acc2); stroke-width: 2.4; stroke-dasharray: 1.5 4; stroke-linecap: round; }
.mk-tool .mk-env { fill: none; stroke: var(--fg); stroke-width: 1.2; stroke-dasharray: 6 4; opacity: .7; }
.mk-tool .mk-faint { fill: none; stroke: var(--muted); stroke-width: 1; opacity: .55; }
.mk-tool .mk-thick { stroke-width: 3; }
.mk-tool .mk-dot { fill: var(--mk-acc2); stroke: var(--paper); stroke-width: 1.5; }
.mk-tool .mk-ref-line { fill: none; stroke: var(--fg); stroke-width: 4; opacity: .28; }
.mk-tool .mk-th3 { fill: none; stroke: var(--mk-c3); stroke-width: 2; stroke-dasharray: 2 3; }
.mk-tool .mk-th4 { fill: none; stroke: var(--mk-c4); stroke-width: 2; stroke-dasharray: 10 3 2 3; }
.mk-tool .mk-th5 { fill: none; stroke: var(--mk-c5); stroke-width: 2.2; stroke-dasharray: 12 5; }
.mk-tool .mk-th6 { fill: none; stroke: var(--mk-c6); stroke-width: 2; stroke-dasharray: 4 2; }
.mk-tool .mk-th7 { fill: none; stroke: var(--mk-c7); stroke-width: 2; stroke-dasharray: 1 3; stroke-linecap: round; }
.mk-tool .mk-sw-1 { border-top: 3px solid var(--mk-acc); }
.mk-tool .mk-sw-2 { border-top: 3px dashed var(--mk-acc2); }
.mk-tool .mk-sw-3 { border-top: 3px dotted var(--mk-c3); }
.mk-tool .mk-sw-4 { border-top: 3px dashed var(--mk-c4); }
.mk-tool .mk-sw-5 { border-top: 3px dashed var(--mk-c5); }
.mk-tool .mk-sw-6 { border-top: 3px dashed var(--mk-c6); }
.mk-tool .mk-sw-7 { border-top: 3px dotted var(--mk-c7); }
.mk-tool .mk-fs { margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 6px; min-width: 0; }
.mk-tool .mk-fs legend { padding: 0 6px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.mk-tool .mk-ylab { fill: var(--muted); }
.mk-tool .ml-demo-plot.mk-ek { padding-top: 0; }
.mk-tool .mk-ek .ml-demo-plot-title { position: static; margin: 0; padding: 8px 12px 2px; }
.mk-tool .mk-sw-ref { border-top: 5px solid color-mix(in srgb, var(--fg) 30%, transparent); }
