/* Atolye > Editor (public/editor.js). Siniflar ed- onekli, ortak tonlar style.css'ten. Solda dosya paneli (proje secimi, agac), sagda
   editor yuzeyi (sekme, yol, Kaydet; CodeMirror; durum cubugu). Kod renkleri .tok-* (tools/editor-cm/giris.js VURGU), iki temada ayri.
   760 px alti: dosya paneli soldan acilan cekmece, editor tam genislik. */
#editor {
  --ed-bg: #fcfcfb;
  --ed-gut: #9a9a94;
  --ed-act: rgb(47 111 228 / .055);
  --ed-sel: rgb(47 111 228 / .2);
  --ed-sel-blur: rgb(30 30 25 / .09);
  --ed-r: 12px;
  --ed-sh: 0 1px 0 rgb(255 255 255 / .6) inset, 0 1px 2px rgb(20 20 18 / .05), 0 18px 40px -26px rgb(20 20 18 / .3);
  /* kod renkleri (acik tema) */
  --k-kw: #b42fa8; --k-str: #0f7b4b; --k-num: #b4580f; --k-cm: #7d8590; --k-fn: #2a5bd7; --k-ty: #0d7f8c; --k-prop: #1f4f9e;
  --k-tag: #c2372c; --k-attr: #8a5a00; --k-atom: #b4580f; --k-op: #59595a; --k-meta: #6b46c1; --k-var: #1c1c1a; --k-def: #1f4f9e; --k-head: #2a5bd7;
  padding: 0; overflow: hidden;
  background:
    radial-gradient(900px 420px at 92% -10%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%),
    radial-gradient(640px 320px at 10% 110%, color-mix(in srgb, var(--far) 6%, transparent), transparent 70%),
    var(--bg);
}
@media (prefers-color-scheme: dark) {
  #editor {
    --ed-bg: #141416;
    --ed-gut: #5f5f63;
    --ed-act: rgb(255 255 255 / .035);
    --ed-sel: rgb(91 143 240 / .3);
    --ed-sel-blur: rgb(255 255 255 / .08);
    --ed-sh: 0 1px 0 rgb(255 255 255 / .04) inset, 0 18px 40px -24px rgb(0 0 0 / .8);
    --k-kw: #d58cf5; --k-str: #8fd19e; --k-num: #f2a96b; --k-cm: #6f7681; --k-fn: #79a8ff; --k-ty: #5fd0d9; --k-prop: #9cc4ff;
    --k-tag: #f08a7e; --k-attr: #e8c26a; --k-atom: #f2a96b; --k-op: #a3a3a0; --k-meta: #b9a3ff; --k-var: #e8e8e6; --k-def: #9cc4ff; --k-head: #79a8ff;
  }
}
.ed { position: relative; height: 100%; display: grid; grid-template-columns: clamp(236px, 23%, 300px) minmax(0, 1fr); min-width: 0; }
.ed button { font: inherit; }

/* ------------------------------------------------------------ sol panel */
.ed-yan { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 70%, transparent); backdrop-filter: blur(10px); }
.ed-yan-bas { display: flex; align-items: center; gap: 10px; padding: 16px 12px 12px 16px; }
.ed-logo { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; color: #fff; font-size: 18px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 88%, #fff) 0%, var(--accent) 45%, color-mix(in srgb, var(--far) 85%, var(--accent)) 100%);
  box-shadow: 0 1px 0 rgb(255 255 255 / .35) inset, 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.ed-baslik { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ed-baslik h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.ed-kok { font: 11px "Geist Mono", ui-monospace, monospace; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-ib { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: none;
  color: var(--muted); font-size: 16px; cursor: pointer; transition: background 160ms var(--ease-out), color 160ms var(--ease-out), transform 120ms var(--ease-out); }
.ed-ib:hover { background: var(--panel-2); color: var(--text); }
.ed-ib:active { transform: scale(.94); }
.ed-ib:focus-visible, .ed-btn:focus-visible, .ed-ag:focus-visible, .ed-hizli button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ed-yan-kapat, .ed-cek { display: none; }

.ed-proje { position: relative; display: flex; align-items: center; margin: 0 12px 8px; height: 34px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); box-shadow: 0 1px 2px rgb(20 20 18 / .04); transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.ed-proje:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ed-proje .ph { position: absolute; pointer-events: none; color: var(--muted); font-size: 15px; }
.ed-proje .ph:first-child { left: 10px; color: var(--accent); }
.ed-proje .ph:last-child { right: 9px; font-size: 13px; }
.ed-proje select { appearance: none; -webkit-appearance: none; width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text);
  font: 500 13px "Geist", system-ui, sans-serif; padding: 0 28px 0 32px; cursor: pointer; text-overflow: ellipsis; }

.ed-agac { flex: 1; min-height: 0; overflow: auto; padding: 2px 6px 24px; font-size: 13px; overscroll-behavior: contain; }
.ed-ag { position: relative; display: flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px 0 calc(6px + var(--d, 0) * 14px); border-radius: 6px;
  color: var(--text); cursor: pointer; user-select: none; white-space: nowrap; outline: 0; transition: background 120ms var(--ease-out); }
/* girinti cizgileri: her derinlik icin ince dikey cizgi */
.ed-ag::before { content: ""; position: absolute; top: 0; bottom: 0; left: 13px; width: calc(var(--d, 0) * 14px);
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--line) 90%, transparent) 0 1px, transparent 1px 14px); pointer-events: none; }
.ed-ag:hover { background: var(--panel-2); }
.ed-ag.ed-sec { background: var(--accent-soft); }
.ed-agac:focus-within .ed-ag.ed-sec { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.ed-ok, .ed-ok-yok { width: 14px; flex: none; font-size: 11px; color: var(--faint); transition: transform 140ms var(--ease-out); }
.ed-ag[aria-expanded="true"] > .ed-ok { transform: rotate(90deg); }
.ed-ik { flex: none; font-size: 15px; color: var(--muted); }
.ed-ag.ed-kl .ed-ik { color: color-mix(in srgb, var(--accent) 70%, var(--muted)); }
.ed-ag-ad { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ed-ag.agir .ed-ag-ad, .ed-ag.nokta .ed-ag-ad { color: var(--muted); }
.ed-ag.dis { opacity: .6; }
.ed-ag-link { font-size: 11px; color: var(--faint); flex: none; }
.ed-ag-n { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ed-ag.kirli .ed-ag-n { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent); }
.ed-ag.kirli .ed-ag-ad { color: color-mix(in srgb, var(--warn) 70%, var(--text)); }
.ed-ag-bilgi { display: flex; align-items: center; gap: 6px; height: 26px; padding-left: calc(26px + var(--d, 0) * 14px); color: var(--faint); font-size: 12px; font-style: italic; }
.ed-ag-bilgi.kotu { color: var(--bad); font-style: normal; }
/* dil simgelerinin renkleri (VS Code'daki gibi dosya turu bakista ayrilsin) */
.ed .l-js { color: #c99a06; } .ed .l-ts { color: #2f74c0; } .ed .l-json { color: #b07d0b; } .ed .l-css, .ed .l-scss { color: #7c4dd6; }
.ed .l-html, .ed .l-xml { color: #d4552a; } .ed .l-md { color: #4b7bbd; } .ed .l-py { color: #3572a5; } .ed .l-sh, .ed .l-ps { color: #2f9a5e; }
.ed .l-yaml, .ed .l-toml, .ed .l-ini { color: #8a6a3d; } .ed .l-swift { color: #e0542f; } .ed .l-rust { color: #b7410e; } .ed .l-go { color: #0f9cb5; }
@media (prefers-color-scheme: dark) {
  .ed .l-js { color: #e7c447; } .ed .l-ts { color: #6aa5ef; } .ed .l-json { color: #e2b54a; } .ed .l-css, .ed .l-scss { color: #b190f5; }
  .ed .l-html, .ed .l-xml { color: #f08560; } .ed .l-md { color: #7fa7e0; } .ed .l-py { color: #6aa2d8; } .ed .l-sh, .ed .l-ps { color: #5fcf8e; }
  .ed .l-yaml, .ed .l-toml, .ed .l-ini { color: #cfa76f; } .ed .l-swift { color: #f5835f; } .ed .l-rust { color: #e3814f; } .ed .l-go { color: #4fc8de; }
}

.ed-bos { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 14px; text-align: center; color: var(--muted); }
.ed-bos > .ph { font-size: 26px; color: var(--faint); }
.ed-bos p { margin: 0; font-size: 12.5px; line-height: 1.5; max-width: 26ch; }
.ed-hizli { display: flex; flex-direction: column; gap: 4px; width: 100%; margin-top: 8px; }
.ed-hizli button { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  color: var(--text); font-size: 12.5px; cursor: pointer; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  transition: border-color 160ms var(--ease-out), background 160ms var(--ease-out), transform 120ms var(--ease-out); }
.ed-hizli button:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.ed-hizli button:active { transform: scale(.98); }
.ed-hizli .ph { color: var(--accent); flex: none; }
.ed-perde { display: none; }

/* ------------------------------------------------------------ editor yuzeyi */
/* Dikey akis flex: gizli serit (uyari, yol satiri) yer tutmaz, govde kalan yuksekligin tamamini alir. */
.ed-ana { display: flex; flex-direction: column; min-width: 0; min-height: 0; margin: 10px;
  border: 1px solid var(--line); border-radius: var(--ed-r); background: var(--ed-bg); box-shadow: var(--ed-sh); overflow: hidden; }
.ed-ust { flex: none; display: flex; align-items: center; gap: 8px; min-width: 0; height: 46px; padding: 0 8px 0 0; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 80%, var(--ed-bg)); }
.ed-sekme { position: relative; display: flex; align-items: center; gap: 7px; height: 100%; max-width: 46%; padding: 0 14px 0 14px; flex: none;
  background: var(--ed-bg); border-right: 1px solid var(--line); font-size: 13px; }
.ed-sekme::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); }
.ed-sekme::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ed-bg); }
.ed-sekme .ph { font-size: 15px; flex: none; }
.ed-sekme b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-nokta { width: 8px; height: 8px; border-radius: 50%; flex: none; background: transparent; transition: background 160ms var(--ease-out), transform 200ms var(--ease-out); transform: scale(.4); }
.ed-sekme.kirli .ed-nokta { background: var(--warn); transform: scale(1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 20%, transparent); }
.ed-sekme.kirli b { font-style: italic; }
.ed-yolsatir { flex: none; display: none; align-items: center; gap: 3px; min-width: 0; height: 26px; padding: 0 12px; overflow-x: auto; white-space: nowrap;
  font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--ed-bg); scrollbar-width: none; }
.ed-yolsatir .ph { font-size: 9px; color: var(--faint); flex: none; }
.ed-yolsatir span { flex: none; }
.ed-yolsatir span.son { color: var(--text); }
.ed-sar { width: 32px; padding: 0; justify-content: center; }
.ed-sar.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
.ed-yol { display: flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 12px; color: var(--muted); padding-left: 4px;
  mask-image: linear-gradient(90deg, transparent 0, #000 8px); }
.ed-yol .ph { font-size: 10px; color: var(--faint); flex: none; }
.ed-yol span { flex: none; }
.ed-yol span.son { color: var(--text); }
.ed-sp { flex: 1; min-width: 0; }
.ed-rozet { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; flex: none;
  color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); }
.ed-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; flex: none; border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  color: var(--text); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 120ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.ed-btn:hover:not(:disabled) { background: var(--panel-2); }
.ed-btn:active:not(:disabled) { transform: scale(.97); }
.ed-btn:disabled { opacity: .5; cursor: default; }
.ed-btn .ph { font-size: 15px; }
.ed-btn kbd { font: 10.5px/16px "Geist Mono", ui-monospace, monospace; padding: 0 4px; border-radius: 4px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); color: inherit; opacity: .8; }
.ed-btn.pri.hazir { background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 1px 0 rgb(255 255 255 / .25) inset, 0 6px 14px -6px color-mix(in srgb, var(--accent) 80%, transparent); }
.ed-btn.pri.hazir:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.ed-btn.hafif { border-color: var(--line); background: var(--panel); color: var(--text); }

.ed-uyari { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 9px 12px; border-bottom: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line));
  background: color-mix(in srgb, var(--warn) 10%, var(--ed-bg)); font-size: 12.5px; animation: ed-in 220ms var(--ease-out); }
.ed-uyari > .ph { font-size: 17px; color: var(--warn); flex: none; }
.ed-uyari p { margin: 0; flex: 1 1 240px; line-height: 1.45; font-weight: 500; }
.ed-uyari p small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.ed-uyari.cakisma, .ed-uyari.hata { border-bottom-color: color-mix(in srgb, var(--bad) 35%, var(--line)); background: color-mix(in srgb, var(--bad) 8%, var(--ed-bg)); }
.ed-uyari.cakisma > .ph, .ed-uyari.hata > .ph { color: var(--bad); }
.ed-uy-b { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-uyari .ed-btn { height: 28px; }
.ed-uyari .ed-btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
@keyframes ed-in { from { opacity: 0; transform: translateY(-4px); } }

.ed-govde { position: relative; flex: 1 1 auto; min-height: 0; }
.ed-cm, .ed-mesaj { position: absolute; inset: 0; }
.ed-mesaj { display: grid; place-items: center; padding: 24px; overflow: auto;
  background: radial-gradient(520px 300px at 50% 38%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 70%), var(--ed-bg); }
.ed-hos { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 420px; animation: ed-in 260ms var(--ease-out); }
.ed-hos-ik { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; font-size: 30px; color: #fff; margin-bottom: 18px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent) 50%, color-mix(in srgb, var(--far) 80%, var(--accent)));
  box-shadow: 0 1px 0 rgb(255 255 255 / .35) inset, 0 18px 36px -14px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 0 8px color-mix(in srgb, var(--accent) 7%, transparent); }
.ed-hos h2, .ed-kart h2 { margin: 0 0 6px; font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.ed-hos p, .ed-kart p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 13px; }
.ed-ks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; font-size: 12.5px; color: var(--muted); }
.ed-ks li { display: flex; align-items: center; gap: 8px; }
.ed-ks kbd { min-width: 44px; text-align: center; font: 11px/20px "Geist Mono", ui-monospace, monospace; padding: 0 6px; border-radius: 5px; color: var(--text);
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--panel); }
.ed-hos-btn { display: none; margin-top: 20px; }
.ed-kart { max-width: 460px; width: 100%; padding: 26px 26px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--ed-sh);
  display: flex; flex-direction: column; align-items: flex-start; animation: ed-in 240ms var(--ease-out); }
.ed-kart-ik { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; font-size: 21px; margin-bottom: 14px;
  color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); }
.ed-kart.uyar .ed-kart-ik { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--panel)); border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); }
.ed-kart code { margin-top: 14px; max-width: 100%; padding: 4px 8px; border-radius: 6px; background: var(--panel-2); font: 11.5px "Geist Mono", ui-monospace, monospace;
  color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-yuk { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.ed-don { animation: ed-don 1s linear infinite; }
@keyframes ed-don { to { transform: rotate(360deg); } }

.ed-alt { flex: none; display: flex; align-items: center; gap: 14px; height: 28px; padding: 0 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted);
  background: color-mix(in srgb, var(--panel) 80%, var(--ed-bg)); white-space: nowrap; min-width: 0; }
.ed-alt-i { font-variant-numeric: tabular-nums; }
.ed-kayit { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.ed-kayit .ph { font-size: 13px; }
.ed-kayit.ok { color: var(--ok); }
.ed-kayit.kirli { color: color-mix(in srgb, var(--warn) 85%, var(--text)); }
.ed-kayit.sur { color: var(--accent); }
.ed-pul { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); animation: ed-pul 1.8s ease-in-out infinite; }
@keyframes ed-pul { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .ed-pul, .ed-don { animation: none; }
  .ed-uyari, .ed-hos, .ed-kart { animation: none; }
}

/* Atolye menusunde kaydedilmemis degisiklik isareti */
.ed-kirli-atl { position: relative; }
.ed-kirli-atl::after { content: ""; position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }

/* ------------------------------------------------------------ CodeMirror */
.ed-cm .cm-editor { height: 100%; background: var(--ed-bg); color: var(--k-var); font-size: 13px; }
.ed-cm .cm-editor.cm-focused { outline: 0; }
.ed-cm .cm-scroller { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.65; }
.ed-cm .cm-content { padding: 10px 0 40vh; caret-color: var(--accent); }
.ed-cm .cm-line { padding: 0 18px 0 6px; }
.ed-cm .cm-gutters { background: var(--ed-bg); border-right: 0; color: var(--ed-gut); }
.ed-cm .cm-lineNumbers .cm-gutterElement { padding: 0 6px 0 16px; min-width: 40px; font-variant-numeric: tabular-nums; }
.ed-cm .cm-activeLineGutter { background: transparent; color: var(--text); }
.ed-cm .cm-activeLine { background: var(--ed-act); }
.ed-cm .cm-cursor, .ed-cm .cm-dropCursor { border-left: 2px solid var(--accent); }
.ed-cm .cm-selectionBackground { background: var(--ed-sel-blur) !important; }
.ed-cm .cm-focused .cm-selectionBackground { background: var(--ed-sel) !important; }
.ed-cm .cm-selectionMatch { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.ed-cm .cm-matchingBracket { background: color-mix(in srgb, var(--accent) 16%, transparent); outline: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 2px; }
.ed-cm .cm-nonmatchingBracket { background: color-mix(in srgb, var(--bad) 18%, transparent); }
.ed-cm .cm-searchMatch { background: color-mix(in srgb, var(--warn) 28%, transparent); border-radius: 2px; }
.ed-cm .cm-searchMatch-selected { background: color-mix(in srgb, var(--warn) 55%, transparent); }
.ed-cm .cm-foldGutter .cm-gutterElement { width: 16px; display: grid; place-items: center; }
.ked-fold { color: var(--faint); font-size: 14px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity 160ms var(--ease-out), transform 140ms var(--ease-out); display: inline-block; }
.ked-fold.acik { transform: rotate(90deg); }
.ked-fold.kapali { opacity: 1; }
.ed-cm .cm-gutters:hover .ked-fold { opacity: 1; }
.ed-cm .cm-foldPlaceholder { background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); border-radius: 4px; padding: 0 5px; margin: 0 3px; }
.ed-cm .cm-specialChar { color: var(--bad); }
.ed-cm .cm-tooltip { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); color: var(--text); }
/* arama ve degistirme paneli */
.ed-cm .cm-panels { background: color-mix(in srgb, var(--panel) 92%, var(--ed-bg)); color: var(--text); }
.ed-cm .cm-panels-top { border-bottom: 1px solid var(--line); }
.ed-cm .cm-panels-bottom { border-top: 1px solid var(--line); }
.ed-cm .cm-search { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 40px 8px 12px; font: 12px "Geist", system-ui, sans-serif; }
.ed-cm .cm-search br { flex-basis: 100%; height: 0; content: ""; }
.ed-cm .cm-search label { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.ed-cm .cm-textfield { height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--ed-bg); color: var(--text); font: 12.5px "Geist Mono", ui-monospace, monospace; outline: 0; }
.ed-cm .cm-textfield:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ed-cm .cm-button { height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); background-image: none; color: var(--text); font: 500 12px "Geist", system-ui, sans-serif; cursor: pointer; }
.ed-cm .cm-button:hover { background: var(--panel-2); }
.ed-cm .cm-panel.cm-search [name="close"] { top: 8px; right: 10px; width: 26px; height: 26px; border-radius: 6px; font-size: 18px; color: var(--muted); cursor: pointer; }
.ed-cm .cm-panel.cm-search [name="close"]:hover { background: var(--panel-2); color: var(--text); }
.ed-cm .cm-panel.cm-gotoLine { padding: 8px 12px; }

/* kod renkleri */
.tok-keyword { color: var(--k-kw); }
.tok-string { color: var(--k-str); }
.tok-string2 { color: color-mix(in srgb, var(--k-str) 70%, var(--k-num)); }
.tok-number, .tok-atom, .tok-bool, .tok-literal { color: var(--k-num); }
.tok-comment { color: var(--k-cm); font-style: italic; }
.tok-function { color: var(--k-fn); }
.tok-typeName, .tok-className, .tok-namespace { color: var(--k-ty); }
.tok-propertyName { color: var(--k-prop); }
.tok-definition { color: var(--k-def); }
.tok-variableName2, .tok-labelName { color: var(--k-meta); }
.tok-tag { color: var(--k-tag); }
.tok-attr { color: var(--k-attr); }
.tok-operator { color: var(--k-op); }
.tok-punctuation { color: color-mix(in srgb, var(--k-op) 85%, var(--k-var)); }
.tok-meta, .tok-macroName { color: var(--k-meta); }
.tok-heading { color: var(--k-head); font-weight: 600; }
.tok-strong { font-weight: 600; }
.tok-emphasis { font-style: italic; }
.tok-link, .tok-url { color: var(--k-fn); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.tok-inserted { color: var(--ok); }
.tok-deleted { color: var(--bad); }
.tok-invalid { color: var(--bad); }

/* ------------------------------------------------------------ dar pencere ve telefon */
@media (max-width: 980px) {
  .ed-yol { display: none; }
  .ed-yolsatir:not([hidden]) { display: flex; }
  .ed-sekme { max-width: none; flex: 0 1 auto; min-width: 0; }
}
@media (max-width: 760px) {
  .ed { grid-template-columns: minmax(0, 1fr); }
  .ed-yan { position: absolute; z-index: 6; top: 0; bottom: 0; left: 0; width: min(86vw, 340px); background: var(--panel); backdrop-filter: none;
    transform: translateX(-104%); transition: transform 260ms var(--ease-out); box-shadow: var(--shadow); visibility: hidden; }
  .ed[data-cekmece="1"] .ed-yan { transform: none; visibility: visible; }
  .ed-perde { display: block; position: absolute; inset: 0; z-index: 5; background: rgb(10 10 12 / .32); opacity: 0; pointer-events: none; transition: opacity 220ms var(--ease-out); }
  .ed[data-cekmece="1"] .ed-perde { opacity: 1; pointer-events: auto; }
  .ed-yan-kapat, .ed-cek { display: grid; }
  .ed-cek { margin-left: 6px; }
  .ed-ana { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .ed-ust { gap: 6px; padding-right: 6px; }
  .ed-sekme { padding: 0 10px; border-left: 1px solid var(--line); }
  .ed-btn kbd, .ed-btn[data-ed="ara"] span { display: none; }
  .ed-btn[data-ed="ara"] { width: 34px; padding: 0; justify-content: center; }
  .ed-rozet { width: 26px; padding: 0; justify-content: center; font-size: 0; }
  .ed-rozet .ph { font-size: 13px; }
  .ed-alt { gap: 10px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; font-size: 11px; }
  .ed-alt .ed-sp { flex: 0 0 4px; }
  .ed-ag { height: 34px; }
  .ed-cm .cm-editor { font-size: 12.5px; }
  .ed-cm .cm-lineNumbers .cm-gutterElement { padding: 0 4px 0 8px; min-width: 30px; }
  .ed-cm .cm-line { padding: 0 12px 0 4px; }
  .ed-hos-btn { display: inline-flex; }
  .ed-ks { grid-template-columns: minmax(0, 1fr); }
  .ed-kart { padding: 22px 18px 18px; }
}
