/* ÖYG213 — ders notları ve ana sayfa. Slayt temasıyla aynı renk tokenları. */
:root {
  /* Gece mavisi: nötr-soğuk zemin, lacivert ana renk, turuncu yalnızca küçük vurgularda (--hl).
     --c-*: şemalardaki kategorik paletin aynısı; bilgi kutuları bunları kullanır. */
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #eceff4; --ink: #121722; --ink-2: #465063;
  --muted: #687184; --line: #dde2ea; --accent: #2b4a9e; --accent-ink: #ffffff; --hl: #d4541f;
  --blue: #1f63c6; --good: #1a8a5f; --bad: #c9363a;
  --c-blue: #2a78d6; --c-orange: #d4541f; --c-green: #1a9a6a; --c-violet: #7a55c7; --c-red: #c9363a; --c-amber: #d29a1a; --c-gray: #6b6e76; --c-teal: #0f8b8d;
  --box-tint: 5%; --title-mix: 25%;
  --code-bg: #141a26; --code-ink: #e8ebf2; --fs: 1;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1320; --surface: #161c2b; --surface-2: #202839; --ink: #eef1f7; --ink-2: #bcc4d4;
    --muted: #8d97aa; --line: #2c3549; --accent: #8aa4f0; --accent-ink: #0e1320; --hl: #f0773f;
    --blue: #79aef5; --good: #4cc79a; --bad: #f07070;
    --c-blue: #6aa7f2; --c-orange: #f0773f; --c-green: #4cc79a; --c-violet: #a888f0; --c-red: #f07070; --c-amber: #eab54a; --c-gray: #9a9ca3; --c-teal: #3cc4c6;
    --box-tint: 10%; --title-mix: 30%;
    --code-bg: #090d16; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1320; --surface: #161c2b; --surface-2: #202839; --ink: #eef1f7; --ink-2: #bcc4d4;
  --muted: #8d97aa; --line: #2c3549; --accent: #8aa4f0; --accent-ink: #0e1320; --hl: #f0773f;
  --blue: #79aef5; --good: #4cc79a; --bad: #f07070;
  --c-blue: #6aa7f2; --c-orange: #f0773f; --c-green: #4cc79a; --c-violet: #a888f0; --c-red: #f07070; --c-amber: #eab54a; --c-gray: #9a9ca3; --c-teal: #3cc4c6;
  --box-tint: 10%; --title-mix: 30%;
  --code-bg: #090d16; color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: calc(17px * var(--fs)); scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0; background: var(--bg); color: var(--ink); line-height: 1.65;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--blue); text-underline-offset: 2px; }
img { max-width: 100%; height: auto; }

/* Üst çubuk */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .5rem;
  padding: .55rem 1rem; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.top .home { font-weight: 850; color: var(--accent); text-decoration: none; letter-spacing: -.01em; }
.top .ttl { color: var(--ink-2); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top .sp { flex: 1; }
.top button {
  font-family: inherit; font-weight: 700; font-size: .82rem; line-height: 1; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: .55rem; padding: .5rem .65rem; cursor: pointer; white-space: nowrap;
}
.top button:hover { border-color: var(--accent); }
.top a.lang {
  font-weight: 800; font-size: .82rem; line-height: 1; color: var(--accent); background: var(--surface); border: 1px solid var(--line);
  border-radius: .55rem; padding: .5rem .65rem; text-decoration: none; white-space: nowrap;
}
.top a.lang:hover { border-color: var(--accent); }
.top button:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.only-narrow { display: none; }

/* Notlar yerleşimi */
.layout { display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); max-width: 100rem; margin: 0 auto; }
.toc-off .layout { grid-template-columns: minmax(0, 1fr); }
.toc-off .toc { display: none; }
.toc {
  position: sticky; top: 3.3rem; align-self: start; max-height: calc(100vh - 3.3rem); overflow-y: auto;
  padding: 1.2rem 1rem 3rem; font-size: .84rem; border-right: 1px solid var(--line); scrollbar-width: thin;
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc > .toc > ul > li { margin-bottom: .7rem; }
.toc ul ul { margin: .2rem 0 0 .2rem; padding-left: .7rem; border-left: 1px solid var(--line); }
.toc a { display: block; padding: .18rem .4rem; color: var(--ink-2); text-decoration: none; border-radius: .35rem; line-height: 1.35; }
.toc > .toc > ul > li > a { font-weight: 750; color: var(--ink); }
.toc a:hover { background: var(--surface-2); }
.toc a.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

.doc { padding: 2rem clamp(1rem, 4vw, 3.5rem) 6rem; max-width: 50rem; min-width: 0; }
.doc h1 { font-size: 2.3rem; line-height: 1.1; letter-spacing: -.03em; margin: 0 0 .6rem; text-wrap: balance; }
.doc h2 { font-size: 1.6rem; line-height: 1.15; letter-spacing: -.02em; margin: 3.2rem 0 .8rem; padding-top: 1.2rem; border-top: 2px solid var(--line); text-wrap: balance; }
.doc h3 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
.doc h4 { font-size: 1rem; margin: 1.4rem 0 .4rem; color: var(--ink-2); }
.doc p, .doc li { text-wrap: pretty; }
.doc ul, .doc ol { padding-left: 1.3rem; }
.doc li { margin: .3rem 0; }
.doc li::marker { color: var(--accent); }
.doc strong { font-weight: 720; }
.doc .headerlink { margin-left: .4rem; color: var(--line); text-decoration: none; font-weight: 400; }
.doc h2:hover .headerlink, .doc h3:hover .headerlink { color: var(--accent); }
.doc code { font-family: "JetBrains Mono", "Cascadia Code", ui-monospace, Consolas, monospace; font-size: .87em; background: var(--surface-2); padding: .1em .35em; border-radius: .3rem; overflow-wrap: anywhere; }
.doc pre { background: var(--code-bg); color: var(--code-ink); padding: 1rem 1.1rem; border-radius: .7rem; overflow-x: auto; font-size: .86rem; line-height: 1.55; }
.doc pre code { background: none; padding: 0; color: inherit; font-size: inherit; white-space: pre-wrap; }
.doc blockquote { margin: 1.2rem 0; padding: .2rem 0 .2rem 1rem; border-left: 4px solid var(--accent); color: var(--ink-2); font-size: 1.05rem; }
.doc figure { margin: 1.5rem 0; }
.doc figure img { display: block; margin: 0 auto; border-radius: .6rem; border: 1px solid var(--line); background: #fff; max-height: 30rem; width: auto; }
.doc figcaption { font-size: .8rem; color: var(--muted); text-align: center; margin-top: .5rem; }
.doc table { border-collapse: collapse; width: 100%; font-size: .9rem; margin: 1.2rem 0; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-size: .84rem; font-weight: 750; color: var(--ink); white-space: nowrap; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.doc .lead { font-size: 1.15rem; color: var(--ink-2); }

/* Bilgi kutuları (admonition) */
.admonition { margin: 1.3rem 0; padding: .8rem 1rem; border-radius: .7rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--blue); }
.admonition > :last-child { margin-bottom: 0; }
.admonition-title { font-weight: 800; margin: 0 0 .4rem; font-size: .95rem; letter-spacing: -.005em; color: var(--blue); }

/* Ana sayfa */
.home-wrap { max-width: 68rem; margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 4vw, 2.5rem) 5rem; }
.home-wrap .kicker { font-size: .78rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
.home-wrap h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: 1; letter-spacing: -.04em; margin: 0 0 1rem; }
.home-wrap .lead { font-size: 1.2rem; color: var(--ink-2); max-width: 40rem; }
.home-wrap h2 { font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 3rem 0 1rem; }
.decks { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.deck {
  display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: start; padding: 1.2rem; border-radius: 1rem;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: transform .15s, border-color .15s;
}
.deck:hover { transform: translateY(-2px); border-color: var(--accent); }
.deck .no { grid-row: 1 / span 3; font-size: 2.6rem; font-weight: 850; line-height: .9; color: var(--accent); letter-spacing: -.04em; }
.deck .dt { font-weight: 780; line-height: 1.2; }
.deck .dd { font-size: .86rem; color: var(--ink-2); margin-top: .3rem; }
.deck .dc { font-size: .76rem; color: var(--muted); margin-top: .5rem; font-variant-numeric: tabular-nums; }
.big-link { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; padding: 1.4rem; border-radius: 1rem; background: var(--accent); color: var(--accent-ink); text-decoration: none; }
:root[data-theme="dark"] .big-link { color: var(--accent-ink); }
.big-link b { font-size: 1.3rem; } .big-link span { opacity: .9; }
.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .6rem; padding: 0; list-style: none; font-size: .9rem; }
.keys kbd { font: 700 .8rem ui-monospace, monospace; background: var(--surface); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: .4rem; padding: .15rem .45rem; margin-right: .4rem; }
.foot { margin-top: 4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }

@media (max-width: 900px) {
  .only-narrow { display: inline-block; }
  .top .ttl { display: none; }
  .layout, .toc-off .layout { grid-template-columns: minmax(0, 1fr); }
  .toc, .toc-off .toc { display: none; position: fixed; inset: 3.2rem 0 0 0; max-height: none; background: var(--bg); z-index: 15; border-right: 0; font-size: 1rem; }
  .toc.open, .toc-off .toc.open { display: block; }
}
@media print { .top, .toc { display: none; } .layout { display: block; } }

/* Notlarda sohbet ve düşünme blokları */
.doc .chat { margin: 1.3rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; overflow: hidden; font-size: .95rem; }
.doc .chat::before { content: attr(data-title); display: block; padding: .45rem .9rem; font-weight: 700; font-size: .8rem; color: var(--ink-2); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.doc .chat > p { margin: .6rem .8rem; padding: .55rem .8rem; border-radius: .8rem; max-width: 88%; width: fit-content; }
.doc .chat > p.u { background: var(--blue); color: #fff; margin-left: auto; border-bottom-right-radius: .2rem; }
.doc .chat > p.a { background: var(--surface-2); border-bottom-left-radius: .2rem; }
.doc .chat > p.think { max-width: 100%; width: auto; background: color-mix(in srgb, var(--c-amber) 12%, transparent); border-left: 4px solid var(--c-amber); border-radius: 0 .6rem .6rem 0; color: var(--ink-2); font-size: .9rem; }
.doc .chat > p.think::before { content: "💭 Düşünme (thinking) · kullanıcıya çoğunlukla gösterilmez"; display: block; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #b97a00; margin-bottom: .3rem; }
.doc .chat > p.tool { max-width: 100%; width: auto; background: var(--code-bg); color: var(--code-ink); font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
/* Yan yana görseller, logo şeridi, karikatür */
.doc .fig2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; align-items: start; margin: 1.5rem 0; }
.doc .fig2 figure { margin: 0; }
.doc figure.comic img { max-height: 26rem; }
.doc figure.wide img { max-height: none; width: 100%; }
.doc .logos { display: flex; flex-wrap: wrap; gap: 1.2rem 1.6rem; align-items: center; margin: 1.3rem 0; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; }
.doc .logos span { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 650; }
.doc .logos img { height: 2rem; width: auto; border: 0; background: none; }
:root[data-theme="dark"] .doc .logos img.mono { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .doc .logos img.mono { filter: invert(1); } }
.doc .term { color: var(--muted); font-style: italic; }
/* Video kartları: küçük resim + başlık; yan yana gelenler ızgarada */
.doc .vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.2rem; margin: 1.6rem 0; }
.doc .vid { display: flex; flex-direction: column; border-radius: .8rem; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); overflow: hidden; transition: border-color .15s, transform .15s; }
.doc .vid:hover { border-color: var(--accent); transform: translateY(-2px); }
.doc .vid b { color: var(--accent); }
.doc .vid .th { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.doc .vid .th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border: 0; border-radius: 0; margin: 0; max-height: none; }
.doc .vid .th::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4rem; height: 2.8rem; transform: translate(-50%, -50%); border-radius: .6rem; background: rgba(220, 30, 30, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 1.8rem no-repeat; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.doc .vid .tx { display: block; padding: .8rem 1rem .95rem; font-size: .95rem; line-height: 1.45; }
.doc .bos { display: inline-block; width: 4.5em; border-bottom: 2px solid var(--accent); margin: 0 .15em; transform: translateY(-.15em); }
.doc p.fill { font-size: 1.35rem; font-weight: 650; text-align: center; margin: 1.2rem 0; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; }
/* Token kutuları */
.doc .tok { font-family: ui-monospace, Consolas, monospace; font-size: .95em; line-height: 2.1; }
.doc .tok span { padding: .2em .1em; border-radius: .3em; white-space: pre; }
.doc .tok span:nth-child(5n+1) { background: var(--tok1); } .doc .tok span:nth-child(5n+2) { background: var(--tok2); }
.doc .tok span:nth-child(5n+3) { background: var(--tok3); } .doc .tok span:nth-child(5n+4) { background: var(--tok4); }
.doc .tok span:nth-child(5n+5) { background: var(--tok5); }
.doc .toktable td:nth-child(n+2), .doc .toktable th:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
:root { --tok1: #cde2fb; --tok2: #fbdccd; --tok3: #c9efdf; --tok4: #fbe9b8; --tok5: #f6d3e1; }
:root[data-theme="dark"] { --tok1: #1c4a80; --tok2: #7a3a1c; --tok3: #14573f; --tok4: #6b4f08; --tok5: #6e2a47; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tok1: #1c4a80; --tok2: #7a3a1c; --tok3: #14573f; --tok4: #6b4f08; --tok5: #6e2a47; } }
/* Portreler */
.doc figure.kisi { float: right; width: 9.5rem; margin: .2rem 0 .8rem 1.2rem; }
.doc figure.kisi img { width: 9.5rem; height: 9.5rem; object-fit: cover; object-position: 50% 20%; border-radius: 50%; max-height: none; }
.doc .faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 1.4rem 1rem; margin: 1.5rem 0; clear: both; }
.doc .faces figure { margin: 0; text-align: center; }
.doc .faces img { width: 7.5rem; height: 7.5rem; object-fit: cover; object-position: 50% 20%; border-radius: 50%; margin: 0 auto .4rem; max-height: none; }
.doc .faces figcaption { font-size: .8rem; color: var(--ink-2); text-align: center; line-height: 1.35; }
.doc .faces figcaption b { display: block; color: var(--ink); font-size: .92rem; }
.doc h2, .doc h3 { clear: both; }
@media (max-width: 600px) { .doc figure.kisi { float: none; margin: 1rem auto; } }
.doc footer.credits { margin-top: 4rem; padding: 1.2rem 1.4rem; border-radius: 1rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); font-size: .92rem; clear: both; }
.doc footer.credits h2 { margin: 0 0 .6rem; padding: 0; border: 0; font-size: 1.15rem; }
.doc footer.credits p { margin: .5rem 0; }

/* 2. ünite: terminal ve renkli kod notlarda da kullanılır (tanımlar deck.css ile aynı) */
.doc .term { background: #0f1115; color: #d7dae0; border-radius: .7rem; overflow: hidden; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: .84rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; padding: 0 1rem .9rem; margin: 1.2rem 0; border: 1px solid #2a2e36; }
.doc .term::before { content: "●  ●  ●     " attr(data-t); display: block; margin: 0 -1rem .6rem; padding: .35rem .9rem; background: #1d2027; color: #8b9099; font-size: .75rem; white-space: pre; }
.doc .term .p { color: #6ad46a; font-weight: 700; } .doc .term .o { color: #aab0ba; } .doc .term .e { color: #ff7b72; } .doc .term .c { color: #6f7682; font-style: italic; } .doc .term .h { color: #ffd479; } .doc .term b { color: #fff; font-weight: 600; }
.doc .code { background: #fbfaf7; color: #24292f; border: 1px solid var(--line); border-radius: .7rem; padding: .8rem 1rem; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: .84rem; line-height: 1.55; white-space: pre; overflow-x: auto; margin: 1.2rem 0; }
:root[data-theme="dark"] .doc .code { background: #15181e; color: #e6e6e6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .doc .code { background: #15181e; color: #e6e6e6; } }
.doc .code .k { color: #cf222e; font-weight: 600; } .doc .code .s { color: #0a7a3a; } .doc .code .f { color: #8250df; } .doc .code .n { color: #0550ae; } .doc .code .c { color: #6e7781; font-style: italic; } .doc .code .t { color: #953800; }
:root[data-theme="dark"] .doc .code .k { color: #ff7b72; } :root[data-theme="dark"] .doc .code .s { color: #7ee787; } :root[data-theme="dark"] .doc .code .f { color: #d2a8ff; } :root[data-theme="dark"] .doc .code .n { color: #79c0ff; } :root[data-theme="dark"] .doc .code .c { color: #8b949e; } :root[data-theme="dark"] .doc .code .t { color: #ffa657; }
.admonition.prompt pre { margin: .5rem 0 0; }
.unit { margin: 2.5rem 0 3rem; } .unit h2 { margin-top: .2rem; } .unit .kicker { margin: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .doc .code .k { color: #ff7b72; } :root:not([data-theme="light"]) .doc .code .s { color: #7ee787; } :root:not([data-theme="light"]) .doc .code .f { color: #d2a8ff; } :root:not([data-theme="light"]) .doc .code .n { color: #79c0ff; } :root:not([data-theme="light"]) .doc .code .c { color: #8b949e; } :root:not([data-theme="light"]) .doc .code .t { color: #ffa657; } }

/* Ünite başlıkları: kitabın iki kısmını ayırır */
.doc h2.part { font-size: 2.1rem; margin-top: 4.5rem; padding: 1.4rem 0 .4rem; border-top: 6px solid var(--accent); color: var(--accent); }
.doc h2.part + p.lead { font-size: 1.15rem; color: var(--ink-2); }
.toc a[href="#unite-1"], .toc a[href="#unite-2"] { font-weight: 800; color: var(--accent); text-transform: uppercase; font-size: .78em; letter-spacing: .04em; }

/* Okunabilirlik: daha kısa satır, belirgin başlık hiyerarşisi, ayrışan tablo satırları */
.doc { max-width: 58rem; width: 100%; margin: 0 auto; }
.toc-off .doc { max-width: 64rem; }
.doc p { margin: 0 0 1.05em; }
.doc li { margin: .4rem 0; }
.doc li > p { margin: 0 0 .4em; }
.doc strong { color: var(--ink); font-weight: 700; }
.doc h3 { font-size: 1.32rem; line-height: 1.25; letter-spacing: -.01em; margin: 2.6rem 0 .7rem; padding-left: .7rem; border-left: 4px solid var(--accent); text-wrap: balance; }
.doc h4 { font-size: 1.08rem; color: var(--ink); margin: 1.9rem 0 .5rem; }
.doc h4::before { content: "▸ "; color: var(--hl); }
.doc h5 { font-size: 1rem; font-weight: 700; color: var(--ink-2); margin: 1.5rem 0 .4rem; }
.doc table { font-size: .92rem; border: 1px solid var(--line); border-radius: .7rem; }
.doc th { background: var(--surface-2); border-bottom: 2px solid var(--line); }
.doc th, .doc td { padding: .6rem .8rem; }
.doc tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.doc tbody tr:last-child td { border-bottom: 0; }
.doc td:first-child { font-weight: 600; }
/* Geniş figürler: metin sütunu dar, figürdeki yazı küçülmesin diye geniş ekranda sağa taşar */
@media (min-width: 1500px) { .doc figure.wide { width: calc(100% + 8rem); margin-left: -4rem; margin-right: -4rem; } }

/* Bölüm başı: büyük numara, rozetler, alt başlık haritası */
.doc h2.ch { display: flex; align-items: center; gap: .9rem; border-top: 0; padding-top: 0; margin-top: 4.2rem; }
.doc h2.ch .chno { flex: none; display: grid; place-items: center; min-width: 3.2rem; height: 3.2rem; padding: 0 .5rem; border-radius: .9rem; background: var(--accent); color: var(--accent-ink); font-size: 1.5rem; font-weight: 850; letter-spacing: -.03em; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.doc h2.ch .cht { flex: 1; }
.chcard { margin: .9rem 0 1.6rem; padding: .9rem 1rem; border-radius: .9rem; background: var(--surface); border: 1px solid var(--line); }
.chbadges { display: flex; flex-wrap: wrap; gap: .4rem; }
.chbadges span { font-size: .78rem; font-weight: 650; padding: .25rem .6rem; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); }
.chmap { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--line); font-size: .8rem; }
.chmap b { width: 100%; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chmap a { padding: .2rem .55rem; border-radius: .45rem; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; line-height: 1.3; }
.chmap a:hover { border-color: var(--accent); color: var(--accent); }

/* Bilgi kutuları: şemalarla aynı kategorik palet, hepsi aynı hafiflikte zemin; kimliği sol çizgi, başlık rengi ve simge taşır */
.admonition { --ad: var(--c-blue); background: color-mix(in oklab, var(--ad) var(--box-tint), var(--surface)); border: 1px solid color-mix(in oklab, var(--ad) 18%, var(--line)); border-left: 4px solid var(--ad); }
.admonition-title { color: color-mix(in oklab, var(--ad), var(--ink) var(--title-mix)); display: flex; align-items: center; gap: .45rem; }
.admonition-title::before { content: "ℹ️"; font-size: 1.05rem; letter-spacing: 0; }
.admonition.deney { --ad: var(--c-orange); } .admonition.deney .admonition-title::before { content: "🧪"; }
.admonition.dikkat { --ad: var(--c-red); } .admonition.dikkat .admonition-title::before { content: "⚠️"; }
.admonition.ozet { --ad: var(--c-green); } .admonition.ozet .admonition-title::before { content: "📌"; }
.admonition.prompt { --ad: var(--c-violet); } .admonition.prompt .admonition-title::before { content: "💬"; }
.admonition.arastir { --ad: var(--c-blue); } .admonition.arastir .admonition-title::before { content: "🔎"; }
.admonition.fikir { --ad: var(--c-amber); --title-mix: 45%; } .admonition.fikir .admonition-title::before { content: "💡"; }
.admonition.slayt { --ad: var(--c-gray); font-size: .9rem; }
.admonition.ogren { --ad: var(--c-teal); } .admonition.ogren .admonition-title::before { content: "🎓"; } .admonition.slayt .admonition-title::before { content: "🖥️"; }
.admonition.deney, .admonition.dikkat, .admonition.ozet, .admonition.prompt, .admonition.arastir, .admonition.fikir, .admonition.slayt, .admonition.ogren { border-left-color: var(--ad); }
.admonition .admonition-title, .admonition.deney .admonition-title, .admonition.dikkat .admonition-title, .admonition.ozet .admonition-title, .admonition.prompt .admonition-title, .admonition.arastir .admonition-title, .admonition.fikir .admonition-title, .admonition.slayt .admonition-title, .admonition.ogren .admonition-title { color: color-mix(in oklab, var(--ad), var(--ink) var(--title-mix)); }

/* Liste işaretleri vurgu renginde */
.doc ul > li::marker { color: var(--hl); }
.doc ol > li::marker { color: var(--hl); font-weight: 750; }

/* İçerikte kullanılabilecek rozetler: <span class="badge good">Ücretsiz</span> */
.doc .badge { display: inline-block; font-size: .74em; font-weight: 700; line-height: 1.2; padding: .18em .55em; border-radius: 99px; vertical-align: .12em; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.doc .badge.good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.doc .badge.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.doc .badge.warn { background: color-mix(in srgb, var(--c-amber) 16%, transparent); color: #8a5d00; border-color: color-mix(in srgb, var(--c-amber) 40%, transparent); }
.doc .badge.info { background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 35%, transparent); }
@media (max-width: 600px) { .doc h2.ch .chno { min-width: 2.6rem; height: 2.6rem; font-size: 1.2rem; } }
:root[data-theme="dark"] .doc .badge.warn { color: #ffd479; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .doc .badge.warn { color: #ffd479; } }

/* Kısa videolar ve terminal kayıtları */
.doc figure video { display: block; width: 100%; height: auto; border-radius: .6rem; border: 1px solid var(--line); background: #000; }
.doc .cast { margin: 1.4rem 0; border-radius: .6rem; overflow: hidden; border: 1px solid #2a2e36; }
.doc figure .cast { margin: 0; }

/* Figür kartları: tek başına duran her figür metin sütunu genişliğinde bir kartın içindedir (kenarları metinle hizalı).
   Görselin genişliği en-boy oranından gelir (build.py figure_sizes): yatay (fy) kartı doldurur; kare (fk) ve dikey (fd)
   ortalanır ve tutarlı bir yükseklikte kalır; küçük çözünürlüklü görseller doğal boyutlarının 1,5 katından fazla büyümez. */
.doc figure.fc { margin: 1.7rem 0; padding: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; }
.doc figure.fc img { width: min(100%, calc(var(--hmax) * var(--ar, 1.6)), var(--wmax, 9999px)); height: auto; max-height: none; object-fit: contain; border: 0; border-radius: .45rem; background: #fff; }
.doc figure.fy { --hmax: 80rem; } .doc figure.fk { --hmax: 30rem; } .doc figure.fd { --hmax: 34rem; }
.doc figure.fc figcaption { margin-top: .65rem; padding: 0 .3rem; }
.doc figure.fc video, .doc figure.fc .cast { border-radius: .45rem; }
@media (min-width: 1500px) { .doc figure.wide.fc { width: auto; margin-left: 0; margin-right: 0; } }
/* Izgaradaki figürler: kart yok, hücreyi doldurur */
.doc .fig2 figure.fc { margin: 0; padding: .6rem; }
.doc .fig2 figure.fc img { width: 100%; }
.doc .faces figure.fc { padding: 0; background: none; border: 0; }
.doc .faces figure.fc img { width: 7.5rem; border-radius: 50%; }
@media (max-width: 600px) { .doc figure.fc { padding: .35rem; margin-left: -.35rem; margin-right: -.35rem; } .doc figure.fc figcaption { padding: 0 .4rem .3rem; } }
.big-link { margin-top: 1.4rem; }
/* Yazılı ekran görüntülerinden oluşan ızgaralar alt alta (okunabilsin) */
.doc .fig2.yigin { grid-template-columns: 1fr; gap: 1.2rem; }
/* Video kartları: tek video sütunu doldurur, iki video yan yana */
.doc .vids { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.doc .vid .tx { font-size: 1rem; }
/* Tıklayınca büyüyen görseller */
.doc figure img { cursor: zoom-in; }
.doc a figure img, .doc figure a img { cursor: pointer; }
.zoom { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; padding: 2rem; background: rgba(8, 11, 18, .88); cursor: zoom-out; }
.zoom img { max-width: 100%; max-height: calc(100vh - 6rem); width: auto; height: auto; object-fit: contain; border-radius: .5rem; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.zoom p { margin: 0; max-width: 60rem; color: #e8ebf2; font-size: .9rem; text-align: center; }

/* Kopyala düğmesi */
.doc pre, .doc .term, .doc .code { position: relative; }
.kopyala { position: absolute; top: .45rem; right: .45rem; z-index: 2; font: 600 .72rem/1 Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none;
  padding: .35rem .55rem; border-radius: .45rem; border: 1px solid rgba(127,127,127,.45); background: rgba(255,255,255,.88); color: #1f2430; cursor: pointer; opacity: .55; transition: opacity .15s; }
.doc pre:hover .kopyala, .doc .term:hover .kopyala, .doc .code:hover .kopyala, .kopyala:focus-visible { opacity: 1; }
.kopyala.ok { background: #1a9a6a; border-color: #1a9a6a; color: #fff; opacity: 1; }
@media (hover: none) { .kopyala { opacity: .9; } }

/* Kod yazı tiplerinde bitişik harf (ligature) kapalı: "==", "!=", "->", "<=" yazıldığı gibi görünsün */
code, pre, kbd, samp, .code, .term, .tok, .probs, .chat > p.tool, .asciinema-player, .ap-term {
  font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0, "dlig" 0;
}
