:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --surface-2: #eef2ee;
  --text: #1c2420;
  --muted: #5d6b64;
  --line: #dbe2dd;
  --accent: #127a5a;
  --accent-soft: #dff1e9;
  --accent-text: #ffffff;
  --ok: #17803d;
  --ok-soft: #e3f5e8;
  --bad: #b3261e;
  --bad-soft: #fbe9e7;
  --warn-soft: #fff4dc;
  --code-bg: #14201b;
  --code-text: #e6efe9;
  --code-head: #1d2c25;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --v1: #127a5a; --v2: #d9622b; --v3: #7c8a83; --v4: #b3261e; --v5: #3f6fd1;
  --v-grid: #e3e9e5; --v-axis: #9aa8a1; --v-mat: #d9534f; --v-pat: #3f7ad6;
}
body[data-theme="dark"] {
  --v1: #4cc39a; --v2: #f0904f; --v3: #8d9c95; --v4: #f28b82; --v5: #7aa7f5;
  --v-grid: #24302b; --v-axis: #4d5e57; --v-mat: #ef7b77; --v-pat: #6b9cf0;
  --bg: #0f1513;
  --surface: #161e1b;
  --surface-2: #1c2622;
  --text: #e3ebe6;
  --muted: #93a39b;
  --line: #2a3631;
  --accent: #4cc39a;
  --accent-soft: #1b3229;
  --accent-text: #0b1411;
  --ok: #5fd08a;
  --ok-soft: #173123;
  --bad: #f28b82;
  --bad-soft: #3a1d1b;
  --warn-soft: #33290f;
  --code-bg: #0a100d;
  --code-head: #131d18;
  --shadow: none;
}
body[data-theme="light"] {
  --v1: #127a5a; --v2: #d9622b; --v3: #7c8a83; --v4: #b3261e; --v5: #3f6fd1;
  --v-grid: #e3e9e5; --v-axis: #9aa8a1; --v-mat: #d9534f; --v-pat: #3f7ad6;
  --bg: #f7f8f6;
  --surface: #ffffff;
  --surface-2: #eef2ee;
  --text: #1c2420;
  --muted: #5d6b64;
  --line: #dbe2dd;
  --accent: #127a5a;
  --accent-soft: #dff1e9;
  --accent-text: #ffffff;
  --ok: #17803d;
  --ok-soft: #e3f5e8;
  --bad: #b3261e;
  --bad-soft: #fbe9e7;
  --warn-soft: #fff4dc;
  --code-bg: #14201b;
  --code-text: #e6efe9;
  --code-head: #1d2c25;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--sans); }
a { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.25; }
code { font-family: var(--mono); font-size: .92em; }
:not(pre) > code { background: var(--surface-2); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 24px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.logo { font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
.logo-mark { color: var(--accent); }
.topnav { display: flex; align-items: center; gap: 18px; font-size: .95rem; }
.topnav a { color: var(--muted); text-decoration: none; }
.topnav a:hover { color: var(--text); }
.theme-toggle {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 6px 10px; cursor: pointer; font: inherit; font-size: .8rem;
}
.theme-toggle:hover { border-color: var(--accent); }
.xp-pill { background: var(--accent-soft); color: var(--accent); font-weight: 700; padding: 3px 10px; border-radius: 99px; font-size: .85rem; white-space: nowrap; }

.app { max-width: 1160px; margin: 0 auto; padding: 32px 24px 64px; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; text-align: center; padding: 20px 16px 32px; }
.footer p { margin: 4px 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.linkbtn.danger { color: var(--bad); }
.muted { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.hero { background: linear-gradient(135deg, var(--surface) 0%, color-mix(in srgb, var(--surface) 85%, var(--accent-soft) 15%) 100%); border: 1px solid var(--line); border-radius: 18px; padding: 36px; box-shadow: var(--shadow); margin-bottom: 32px; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; margin: 0; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 6px 0 10px; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 720px; }
.hero-progress { max-width: 420px; margin: 20px 0 24px; }
.hp-row { margin-bottom: 6px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin: 0 0 40px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px;
}
.stat-label { text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; color: var(--muted); }
.stat-card strong { font-size: 1.6rem; line-height: 1.2; }
.stat-card small { color: var(--muted); }

.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }

.section-title { font-size: 1.35rem; margin: 0 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { margin: 0; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; flex: 1; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.card-meta { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mod-no { font-size: .8rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.tag { font-size: .75rem; background: var(--surface-2); color: var(--muted); padding: 2px 8px; border-radius: 99px; }
.badge { font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.badge.done { background: var(--ok-soft); color: var(--ok); }

.how { margin-top: 40px; }
.steps { padding-left: 20px; color: var(--muted); }
.steps strong { color: var(--text); }

.page-title { margin-top: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.mod-block { margin-bottom: 36px; }
.mod-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 12px; }
.mod-head h2 { margin: 2px 0 4px; }
.mod-head h2 a { color: var(--text); text-decoration: none; }
.mod-head p { margin: 0; }
.mod-stat { min-width: 140px; text-align: right; font-size: .9rem; }
.mod-stat .bar { margin-top: 6px; }

.lesson-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lesson-list li + li { border-top: 1px solid var(--line); }
.lesson-list a, .lesson-list li > div { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--text); text-decoration: none; }
.lesson-list a:hover { background: var(--surface-2); }
.lesson-list .ln { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: .8rem; font-weight: 700; color: var(--muted); }
.lesson-list .lt { flex: 1; display: flex; flex-direction: column; }
.lesson-list .lt small { color: var(--muted); font-size: .83rem; }
.lesson-list .dur { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.lesson-list .done .ln { background: var(--ok); color: #fff; }
.lesson-list .active a { background: var(--accent-soft); }
.lesson-list .soon { opacity: .55; }
.soon-tag { font-size: .72rem; background: var(--surface-2); color: var(--muted); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }

.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.lesson { min-width: 0; max-width: 780px; }
.lesson h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0 0 8px; }
.lesson h2 { margin-top: 2em; font-size: 1.35rem; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .88rem; margin-bottom: 20px; align-items: center; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; margin-bottom: 8px; }
.toc summary { font-weight: 700; cursor: pointer; }
.toc ol { margin: 8px 0 0; padding-left: 20px; }
.sidebar { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
.sidebar h4 { margin: 0 0 8px; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.sidebar .lesson-list a, .sidebar .lesson-list li > div { padding: 9px 12px; font-size: .9rem; }
.sidebar .lesson-list .lt small { display: none; }

.lesson table { width: 100%; border-collapse: collapse; font-size: .93rem; margin: 16px 0; display: block; overflow-x: auto; }
.lesson th, .lesson td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lesson th { background: var(--surface-2); }

.code, .output { border-radius: 10px; overflow: hidden; margin: 16px 0 0; background: var(--code-bg); color: var(--code-text); }
.output { margin-top: 8px; margin-bottom: 16px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.code + :not(.output) { margin-top: 16px; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; font: 600 .78rem var(--mono); background: var(--code-head); color: #9fb6aa; gap: 8px; }
.output .code-head { background: transparent; color: var(--muted); padding-bottom: 0; }
.code-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.code pre, .output pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: .88rem/1.55 var(--mono); }
.copy, .paste-colab, .download-script, .run-code { background: transparent; color: #cfe3d8; border: 1px solid #3b5048; border-radius: 6px; padding: 3px 10px; font: 600 .75rem var(--sans); cursor: pointer; }
.copy:hover, .paste-colab:hover, .download-script:hover, .run-code:hover { border-color: #7fbfa5; }
.copy.copied { color: #7ee2b0; border-color: #7ee2b0; }
.run-code:disabled { opacity: .7; cursor: wait; }
.run-output { background: #0d1513; color: #e6efe9; border: 1px solid var(--line); border-radius: 10px; margin: 12px 0 0; overflow: hidden; }
.run-output pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: .88rem/1.55 var(--mono); white-space: pre-wrap; }
.run-status { padding: 12px 16px; color: var(--muted); }
.run-error { color: #ffb4b4; padding: 12px 16px; white-space: pre-wrap; font: .85rem/1.5 var(--mono); }
.lab-output .run-error { color: var(--bad); padding: 8px 0 0; }
.run-warn { padding: 12px 16px; color: #ffd98a; font: .9rem/1.55 var(--sans); white-space: normal; }
.lab-output .run-warn { color: var(--text); background: var(--warn-soft); border-radius: 8px; padding: 10px 12px; }
.run-output .lab-plot-grid, .run-output .lab-dna { padding: 0 16px 14px; }
.run-output .lab-dna, .lab-dna { color: var(--text); }
.run-output .lab-dna { background: var(--surface); }
.lab-dna h4 { margin: 12px 0 4px; color: var(--muted); font: 600 .85rem var(--sans); }
.lab-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lab-select { font: inherit; font-size: .85rem; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); max-width: 240px; }
.lab-run:disabled { opacity: .6; cursor: wait; }

.lesson-lab {
  margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow);
}
.lab-toolbar {
  display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px;
}
.lab-toolbar h3 { margin: 0; font-size: 1.1rem; }
.lab-hint { margin: 3px 0 0; color: var(--muted); font-size: .85rem; }
.lab-run {
  flex: none; border: 0; border-radius: 9px; background: var(--accent); color: var(--accent-text);
  font: inherit; font-weight: 700; padding: 9px 16px; cursor: pointer;
}
.lab-run:hover { filter: brightness(1.08); }
.lab-shell {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px;
}
.lab-editor {
  width: 100%; min-height: 220px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font: .88rem/1.55 var(--mono); padding: 12px 14px; }
.lab-editor:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.lab-output-panel {
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); min-height: 220px; display: flex; flex-direction: column; overflow: hidden;
}
.lab-output-header {
  padding: 10px 12px; background: var(--surface-2); font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line);
}
.lab-output {
  flex: 1; padding: 12px; white-space: pre-wrap; overflow: auto; font: .88rem/1.5 var(--mono); min-height: 110px; color: var(--text);
}
.lab-output pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.lab-output .run-status { color: var(--muted); }
.lab-plot-grid { display: grid; gap: 8px; margin-top: 12px; }
.lab-plot-grid h4 { margin: 0; color: var(--muted); font: 600 .85rem var(--sans); }
.lab-plot-grid img {
  width: 100%; border-radius: 8px; border: 1px solid #2d3d37; background: #fff; display: block;
}
.lab-plot-grid img + img { margin-top: 8px; }
@media (max-width: 760px) {
  .lab-shell { grid-template-columns: 1fr; }
  .viz-2 { grid-template-columns: 1fr; }
  .lab-toolbar { flex-direction: column; align-items: stretch; }
}

.note { border-radius: 10px; padding: 12px 16px; margin: 16px 0; border-left: 4px solid var(--accent); background: var(--accent-soft); }
.note.uyari { border-left-color: #c98a00; background: var(--warn-soft); }
.note p { margin: .3em 0; }

.practice, .quiz { margin-top: 40px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.practice h2, .quiz h2 { margin-top: 0; }
.label { font-weight: 700; font-size: .85rem; color: var(--muted); margin: 16px 0 0; }
.solution { margin-top: 12px; }
.solution summary { cursor: pointer; font-weight: 600; color: var(--accent); }

.q { padding: 16px 0; }
.q + .q { border-top: 1px solid var(--line); }
.qt { font-weight: 600; display: flex; gap: 10px; margin-top: 0; }
.qn { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: .78rem; }
.q.solved .qn { background: var(--ok); color: #fff; }
.options { display: grid; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; cursor: pointer; }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt .ol { font-weight: 700; color: var(--muted); }
.opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt:disabled { cursor: default; }
.fill { display: flex; gap: 8px; flex-wrap: wrap; }
.fill input { flex: 1; min-width: 180px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
.fill input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.feedback .ok { color: var(--ok); margin: 10px 0 0; }
.feedback .bad { color: var(--bad); margin: 10px 0 0; }

.complete-box { margin: 32px 0; padding: 20px 24px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; }
.complete-box p { margin: 0 0 12px; }
.ok-big { color: var(--ok); font-weight: 700; font-size: 1.1rem; }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pager .btn { max-width: 48%; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; }
}
@media (max-width: 600px) {
  .topbar { padding: 10px 16px; }
  .topnav { gap: 12px; }
  .topnav a:first-child { display: none; }
  .app { padding: 20px 16px 48px; }
  .hero { padding: 24px 20px; }
  .mod-head { flex-direction: column; align-items: stretch; }
  .mod-stat { text-align: left; }
  .practice, .quiz { padding: 18px 16px; }
  .pager .btn { max-width: 100%; width: 100%; justify-content: center; }
}

/* ---------- Ders görselleri ---------- */
.viz { margin: 18px 0 24px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); min-width: 0; }
.viz figcaption { font-weight: 700; margin-bottom: 10px; }
.viz-tag { display: inline-block; font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 9px; margin-right: 6px; vertical-align: 2px; }
.viz-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; margin-bottom: 12px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }
.ctl { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted); min-width: 160px; }
.ctl b { color: var(--text); font-variant-numeric: tabular-nums; }
.ctl.chk { flex-direction: row; align-items: center; gap: 6px; min-width: 0; color: var(--text); }
.ctl.wide { flex: 1 1 100%; }
.ctl input[type=range] { accent-color: var(--accent); width: 100%; }
.ctl select, .ctl input[type=text] { font: inherit; font-size: .85rem; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.ctl input[type=text] { font-family: var(--mono); width: 100%; }
.viz-btn { padding: 6px 12px; font-size: .82rem; }
.viz-out { min-width: 0; }
.viz-note { color: var(--muted); font-size: .85rem; margin: 10px 0 0; line-height: 1.55; }
.viz-sub { color: var(--muted); font-size: .85rem; margin: 6px 0; line-height: 1.55; }
.viz-sub strong { color: var(--text); }
.viz-h { margin: 12px 0 4px; font-size: .85rem; color: var(--muted); }
.viz-err { color: var(--bad); }
.viz-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.gel-wrap { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.viz-pre { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; font: .85rem/1.5 var(--mono); overflow-x: auto; margin: 8px 0; }
.viz-link { font-size: .85rem; }
.viz-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: 10px; }
.viz-table th, .viz-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.viz-table tr.on td { background: var(--accent-soft); }
.viz-table .mono { font-family: var(--mono); font-size: .8rem; }
.visual-scroll { overflow-x: auto; padding: 4px 0; }

svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart text, svg.dpm text, svg.gel text, svg.dna-ladder text { font-family: var(--sans); }
.chart .grid { stroke: var(--v-grid); stroke-width: 1; }
.chart .axis { stroke: var(--v-axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; }
.chart .axlabel { fill: var(--text); font-size: 12px; font-weight: 600; }
.chart .ln { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln.thin { stroke-width: 1.3; opacity: .85; }
.chart .ln.dash, .chart .ref.dash { stroke-dasharray: 6 4; }
.chart .ref { stroke: var(--v-axis); stroke-width: 1.2; stroke-dasharray: 4 3; }
.chart .reftext, .dna-ladder .reftext { fill: var(--muted); font-size: 10.5px; }
.chart .barlabel { fill: var(--text); font-size: 11px; font-weight: 600; }
.chart .area { opacity: .22; stroke: none; }
.chart .dot { stroke: var(--surface); stroke-width: 1; }
.c1.ln, .ref.c1 { stroke: var(--v1); } .c1.dot, .c1.vbar, .c1.area, .c1.orf { fill: var(--v1); }
.c2.ln, .ref.c2 { stroke: var(--v2); } .c2.dot, .c2.vbar, .c2.area, .c2.orf { fill: var(--v2); }
.c3.ln, .ref.c3 { stroke: var(--v3); } .c3.dot, .c3.vbar, .c3.area { fill: var(--v3); }
.c4.ln, .ref.c4 { stroke: var(--v4); } .c4.dot, .c4.vbar, .c4.area { fill: var(--v4); }
.c5.ln { stroke: var(--v5); } .c5.dot, .c5.vbar { fill: var(--v5); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--muted); margin: 6px 0; }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw.c1 { background: var(--v1); } .sw.c2 { background: var(--v2); } .sw.c3 { background: var(--v3); } .sw.c4 { background: var(--v4); } .sw.c5 { background: var(--v5); }
.sw.kr-mat { background: var(--v-mat); } .sw.kr-pat { background: var(--v-pat); }
.sw.hmsw { background: linear-gradient(90deg, transparent, var(--v1)); border: 1px solid var(--line); }
.sw.prot-sw { background: color-mix(in srgb, var(--v1) 30%, transparent); } .sw.pam-sw { background: color-mix(in srgb, var(--v2) 55%, transparent); }

/* DNA */
.dna-ladder { display: block; max-width: none; }
.dna-ladder .omurga { stroke: var(--v-axis); stroke-width: 3; stroke-linecap: round; }
.dna-ladder .hbag { stroke: var(--v-axis); stroke-width: 1.2; stroke-dasharray: 2 2; }
.dna-ladder .strand, .dna-ladder .pos { fill: var(--muted); font-size: 11px; font-weight: 700; }
.dna-ladder .pos { font-size: 9px; font-weight: 400; }
.baz.bA { fill: #2f9e6a; } .baz.bT { fill: #d1533f; } .baz.bG { fill: #e0a526; } .baz.bC { fill: #3f7ad6; } .baz.bN { fill: #889; }
.baz.yeni { stroke: var(--text); stroke-width: 2; }
.bazt { fill: #fff; font: 700 11px var(--mono) !important; }
.bazt.kucuk { font-size: 9px !important; }
.dna-ladder .okazaki { stroke: var(--v4); stroke-width: 2; }
.dna-ladder .helikaz { fill: var(--v5); }
.dna-ladder .seq-t { fill: var(--text); font: 10px var(--mono) !important; }
.dna-ladder .prot { fill: var(--v1); opacity: .28; } .dna-ladder .pamk { fill: var(--v2); opacity: .55; }
.dna-ladder .kesim { stroke: var(--v4); stroke-width: 2; stroke-dasharray: 3 2; }
.codon-strip { display: flex; flex-wrap: wrap; gap: 4px; font-family: var(--mono); }
.codon { display: flex; flex-direction: column; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; background: var(--surface-2); font-size: .8rem; line-height: 1.35; }
.codon .cm { color: var(--muted); }
.codon .ca { font: 700 .72rem var(--sans); color: var(--accent); }
.codon.start { border-color: var(--v1); background: var(--accent-soft); }
.codon.stop { border-color: var(--v4); background: var(--bad-soft); } .codon.stop .ca { color: var(--v4); }
.codon.after { opacity: .35; }
.codon.utr { opacity: .55; border-style: dashed; }
.nt-row { display: flex; flex-wrap: wrap; gap: 2px; margin: 6px 0 10px; }
.nt { width: 22px; height: 26px; border: 0; border-radius: 4px; color: #fff; font: 700 .8rem var(--mono); cursor: pointer; padding: 0; }
.nt.bA { background: #2f9e6a; } .nt.bT { background: #d1533f; } .nt.bG { background: #e0a526; } .nt.bC { background: #3f7ad6; }
.nt.mut { outline: 3px solid var(--text); outline-offset: 1px; }
.nt-gap { width: 6px; }
.aa-row { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; font-family: var(--mono); margin: 4px 0; }
.aa-lbl { font: 600 .78rem var(--sans); color: var(--muted); width: 90px; }
.aa { display: inline-block; width: 18px; text-align: center; border-radius: 3px; background: var(--surface-2); font-size: .8rem; }
.aa.mut { background: var(--v2); color: #fff; } .aa.stop { background: var(--v4); color: #fff; }
.aa-more { color: var(--muted); font-size: .78rem; margin-left: 4px; }
.aln { display: flex; flex-wrap: wrap; gap: 4px; font-family: var(--mono); }
.aln-c { display: flex; flex-direction: column; align-items: center; padding: 3px 5px; border-radius: 6px; border: 1px solid var(--line); font-size: .8rem; }
.aln-c b { font: 700 .72rem var(--sans); color: var(--accent); } .aln-c small { color: var(--muted); font-size: .65rem; }
.aln-c.hl { border-color: var(--v2); background: color-mix(in srgb, var(--v2) 15%, transparent); } .aln-c.hl b { color: var(--v2); }
.aln-c .diff { background: var(--v2); color: #fff; border-radius: 2px; }
.exon { fill: var(--v1); } .ex-t { fill: #fff; font-size: 11px; font-weight: 700; }
.intron { stroke: var(--v-axis); stroke-width: 2; } .in-t { fill: var(--muted); font-size: 10px; }
.product { fill: var(--v1); opacity: .3; }
.arrow { fill: none; stroke-width: 3; stroke-linecap: round; } .arrow.c1f { stroke: var(--v1); } .arrow.c2f { stroke: var(--v2); }

/* jel */
svg.gel { width: 100%; height: auto; display: block; max-width: 260px; margin: 0 auto; }
.gel-bg { fill: #1b1f2a; } .well { fill: #000; opacity: .6; }
.band { fill: #ff9de0; filter: drop-shadow(0 0 3px #ff4fc6); } .band.hl { fill: #fff3a8; filter: drop-shadow(0 0 4px #ffd84f); }
.gel-t { fill: #c9cfe0; font-size: 9px; }
.plasmid { fill: none; stroke: var(--v1); stroke-width: 7; opacity: .5; }
.cut { stroke: var(--v-axis); stroke-width: 2; } .cut.on { stroke: var(--v4); stroke-width: 3; }
.cut-t { fill: var(--muted); font-size: 10px; } .cut-t.on { fill: var(--text); font-weight: 700; }

/* matris */
svg.dpm { display: block; max-width: none; }
.dp { fill: var(--v1); } .dp.yol { fill: var(--v2); }
.dpt { fill: var(--text); font-size: 9px; } .dpt.yol { fill: #fff; font-weight: 700; }
.sm.pos { fill: var(--v1); } .sm.neg { fill: var(--v4); } .sm.zero { fill: var(--surface-2); }
.sm-t { fill: var(--text); font-size: 12px; font-weight: 700; }
.hm { fill: var(--v1); }
.pie.c1 { fill: var(--v1); } .pie.c3 { fill: var(--v2); } .pie.c4 { fill: var(--v4); }
.pie-hole { fill: var(--surface); }
.flux { stroke: var(--v1); stroke-linecap: round; } .flux.off { stroke: var(--v-axis); opacity: .5; }
.okuc { fill: var(--v1); }
.flux-t { fill: var(--text); font-size: 11px; }
.met { fill: var(--surface-2); stroke: var(--v-axis); stroke-width: 1.5; } .met.c-atp { fill: color-mix(in srgb, var(--v2) 25%, var(--surface)); }
.met-t { fill: var(--text); font-size: 12px; font-weight: 700; }

/* hücre bölünmesi */
.phase-row { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.phase { font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.phase.gecti { color: var(--text); }
.phase.on { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.cell-svg .hucre { fill: color-mix(in srgb, var(--v1) 7%, var(--surface)); stroke: var(--v1); stroke-width: 2; }
.cell-svg .cekirdek { fill: none; stroke: var(--v-axis); stroke-width: 1.5; }
.cell-svg .cekirdek.kesik { stroke-dasharray: 5 5; }
.cell-svg .kr.mat { fill: var(--v-mat); } .cell-svg .kr.pat { fill: var(--v-pat); }
.cell-svg .sentromer { fill: var(--text); }
.cell-svg .ig { stroke: var(--v-axis); stroke-width: .8; opacity: .7; }
.cell-svg .sentrozom { fill: var(--v2); }

/* ---------- Görseller: kullanıcı dostu arayüz (v2) ---------- */
.viz { padding: 20px 22px; border-radius: 16px; margin: 22px 0 28px; }
.viz figcaption { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-weight: 700; font-size: 1.04rem; line-height: 1.35; }
.viz figcaption .viz-tag { margin: 0; vertical-align: 0; }
.viz-title { flex: 1 1 260px; }
.viz-note { position: relative; margin: 0 0 14px; padding: 10px 14px 10px 40px; background: var(--accent-soft); border-radius: 10px; color: var(--text); font-size: .88rem; line-height: 1.55; }
.viz-note::before { content: "💡"; position: absolute; left: 13px; top: 9px; font-size: 1rem; }
.viz-controls { display: block; padding: 14px 16px 12px; margin-bottom: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.ctl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 22px; align-items: end; }
.ctl { min-width: 0; color: var(--text); font-size: .86rem; gap: 6px; }
.ctl-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.ctl-val { font: 700 .8rem var(--sans); font-variant-numeric: tabular-nums; background: var(--surface); color: var(--accent); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; white-space: nowrap; }
.rng-row { display: flex; align-items: center; gap: 6px; }
.rng-row input[type=range] { flex: 1; }
.rng-ends { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); margin-top: -2px; }
.ctl.stepper { grid-column: 1 / -1; }
.ctl input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--dolu, 50%), var(--line) var(--dolu, 50%)); outline: none; margin: 8px 0; cursor: pointer; }
.ctl input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .12s; }
.ctl input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.ctl input[type=range]:hover::-webkit-slider-thumb, .ctl input[type=range]:focus-visible::-webkit-slider-thumb { transform: scale(1.15); }
.ctl input[type=range]:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); }
.ctl select, .ctl input[type=text] { padding: 8px 10px; border-radius: 9px; font-size: .88rem; }
.ctl.chk { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; align-self: center; }
.ctl.chk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { flex: none; width: 38px; height: 22px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .15s; }
.ctl.chk input:checked + .switch { background: var(--accent); }
.ctl.chk input:checked + .switch::after { left: 19px; }
.ctl.chk input:focus-visible + .switch { box-shadow: 0 0 0 3px var(--accent-soft); }
.ctl-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.viz-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); border-radius: 9px; padding: 6px 14px; font: 600 .84rem var(--sans); cursor: pointer; }
.viz-btn:hover { filter: brightness(1.08); }
.viz-btn.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.viz-btn.ghost:hover { color: var(--text); border-color: var(--muted); }
.step { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 8px; min-width: 34px; height: 32px; font-size: .8rem; cursor: pointer; }
.step:hover { border-color: var(--accent); color: var(--accent); }
.step.play { padding: 0 12px; font-weight: 600; }
.step.play.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.viz-out { margin-top: 4px; }
.viz-out > .viz-sub:last-of-type, .viz-out .viz-sub.sonuc { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; color: var(--text); }
.viz-sub { font-size: .88rem; }
.viz-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 6px; }
.chart .tick { font-size: 12px; }
.chart .axlabel { font-size: 13px; }
.chart .ln { stroke-width: 2.6; }
.chart .grid { stroke-dasharray: 2 4; }
.chart .dot, .chart .vbar, .chart rect, .chart path.pie, .dpm .dp { transition: opacity .12s, stroke-width .12s; }
.chart .tip-on, .dpm .tip-on, .gel .tip-on { stroke: var(--text); stroke-width: 2.5px; }
.chart circle.tip-on { r: 6; }
.legend { gap: 8px; margin: 10px 0; }
.legend > span { display: inline-flex; align-items: center; background: var(--surface-2); border-radius: 999px; padding: 3px 10px 3px 8px; color: var(--text); font-size: .8rem; }
.legend .sw { border-radius: 50%; width: 10px; height: 10px; }
.viz-tip { position: fixed; z-index: 1000; display: none; pointer-events: none; max-width: 280px; background: #17201c; color: #f1f6f3; font: 600 .8rem/1.4 var(--sans); padding: 7px 10px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
body[data-theme="dark"] .viz-tip { background: #f1f6f3; color: #17201c; }
.viz-table { border-radius: 10px; overflow: hidden; }
.viz-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.phase-row { gap: 6px; margin: 4px 0 10px; }
.phase { font-size: .75rem; padding: 3px 10px; border: 1px solid var(--line); background: var(--surface); }
.phase.gecti { background: var(--accent-soft); border-color: transparent; }
.phase.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nt { width: 24px; height: 28px; transition: transform .1s; }
.nt:hover { transform: translateY(-2px); }
.codon { padding: 4px 8px; border-radius: 9px; }
@media (max-width: 640px) {
  .viz { padding: 14px; margin-left: -4px; margin-right: -4px; }
  .ctl-grid { grid-template-columns: 1fr; }
  .ctl-actions { justify-content: stretch; }
  .ctl-actions .viz-btn { flex: 1; justify-content: center; }
  .chart .tick { font-size: 13px; }
  .viz-note { font-size: .84rem; }
}
