/* ============================================================
   Meschain Dokümantasyon — Beyaz Tema (GitBook-sınıfı, profesyonel)
   Referans tasarım dili: docs.meschain.io (temiz beyaz, 3 kolon,
   küçük-büyük-harf bölüm etiketleri, sağda "Bu sayfada" rayı)
   Marka: mor #8b5cf6 (dolgu/rozet) · #6d28d9 (metin linki, AAA)
   ============================================================ */

/* ---------- Tokenlar ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --text: #0a1a2f;
  --text-2: #475569;
  --text-3: #7b8794;
  --line: #e6e9f0;
  --line-soft: #eef1f6;

  --link: #6d28d9;
  --link-hover: #5b21b6;
  --brand: #8b5cf6;
  --brand-dark: #6d28d9;
  --brand-soft: #f4f0fe;
  --brand-grad: linear-gradient(135deg, #8b5cf6, #6d28d9);

  --ok: #059669;      --ok-border: #10b981;   --ok-bg: #ecfdf5;
  --info: #1d4ed8;    --info-border: #3b82f6; --info-bg: #eff6ff;
  --warn: #b45309;    --warn-border: #f59e0b; --warn-bg: #fffbeb;
  --danger: #b91c1c;  --danger-border: #ef4444; --danger-bg: #fef2f2;

  --header-h: 64px;
  --sidebar-w: 300px;
  --toc-w: 240px;
  --content-max: 760px;

  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(10, 26, 47, .05);
  --shadow: 0 4px 16px rgba(10, 26, 47, .08);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

/* ---------- Reset / taban ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid #7c3aed; outline-offset: 2px; border-radius: 4px; }
::selection { background: #ede9fe; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand-dark); color: #fff; padding: 10px 18px;
  border-radius: 0 0 var(--r) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ============================================================
   ÜST BAR
   ============================================================ */
.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 100;
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px; background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; min-width: 0; }
.brand img, .brand svg { width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto; }
.brand-name { font-weight: 700; font-size: 16.5px; letter-spacing: -.02em; color: var(--text); white-space: nowrap; }
.brand-tag {
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: var(--brand-dark); background: var(--brand-soft);
  border: 1px solid #e4d9fb; padding: 2px 8px; border-radius: 999px;
}
.header-spacer { flex: 1; }

/* Arama (üst bar, referanstaki gibi Ctrl+K ipuçlu) */
.search-wrap { position: relative; }
.search-box {
  display: flex; align-items: center; gap: 8px; width: 300px; max-width: 42vw;
  height: 38px; padding: 0 10px 0 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--text-3); cursor: text; transition: border-color .15s, box-shadow .15s;
}
.search-box:hover { border-color: #d5dae3; }
.search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(139, 92, 246, .12); }
.search-box svg { flex: 0 0 auto; opacity: .55; }
.search-box input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 14px; color: var(--text);
}
.search-box input::placeholder { color: var(--text-3); }
.search-kbd {
  flex: 0 0 auto; font-size: 11px; font-weight: 600; color: var(--text-3);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 6px; background: var(--bg-soft);
}
.search-panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: 420px; max-width: 90vw;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 6px; display: none; max-height: 60vh; overflow: auto;
}
.search-panel.open { display: block; }
.search-hit {
  display: block; padding: 10px 12px; border-radius: var(--r-sm);
  text-decoration: none !important;
}
.search-hit .hit-title { font-weight: 600; font-size: 14px; color: var(--text); }
.search-hit .hit-title mark { background: #ede9fe; color: var(--brand-dark); border-radius: 3px; padding: 0 2px; }
.search-hit .hit-meta { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.search-hit .hit-meta b { color: var(--brand-dark); font-weight: 600; }
.search-hit:hover, .search-hit.active { background: var(--brand-soft); }
.search-empty { padding: 14px 12px; font-size: 13.5px; color: var(--text-2); }
.search-empty a { font-weight: 600; }

/* Üst bar: Uygulamayı Aç */
.btn-open-app {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px;
  background: var(--brand-grad); color: #fff !important; font-weight: 600; font-size: 14px;
  border-radius: var(--r); text-decoration: none !important; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(109, 40, 217, .25); transition: transform .12s, box-shadow .12s;
}
.btn-open-app:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(109, 40, 217, .32); }

.hamburger {
  display: none; width: 40px; height: 40px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--bg); cursor: pointer; align-items: center; justify-content: center;
}
.hamburger svg { width: 20px; height: 20px; color: var(--text-2); }

/* ============================================================
   YERLEŞİM
   ============================================================ */
#app-shell {
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  gap: 0; max-width: 1440px; margin: 0 auto; padding-top: var(--header-h);
  min-height: 100vh;
}

/* ---------- Sol menü ---------- */
.doc-sidebar {
  position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 24px 12px 40px 24px; border-right: 1px solid var(--line-soft);
}
.doc-sidebar::-webkit-scrollbar { width: 8px; }
.doc-sidebar::-webkit-scrollbar-thumb { background: #dde2ea; border-radius: 8px; }
.nav-group { margin-bottom: 6px; }
.nav-group + .nav-group { margin-top: 18px; }
.group-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: 0; cursor: pointer; padding: 4px 10px;
  font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--text-3); text-transform: uppercase;
}
.group-toggle .chev { transition: transform .18s; opacity: .5; }
.group-toggle[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.nav-group ul { list-style: none; margin: 4px 0 0; padding: 0; }
.nav-group[data-collapsed="true"] ul { display: none; }
.nav-item a {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; margin: 1px 0;
  border-radius: var(--r-sm); font-size: 14px; color: var(--text-2);
  text-decoration: none !important; line-height: 1.4;
}
.nav-item a:hover { background: var(--bg-soft); color: var(--text); }
.nav-item a[aria-current="page"] {
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 600;
  box-shadow: inset 2.5px 0 0 var(--brand);
}
.badge {
  font-size: 10px; font-weight: 700; letter-spacing: .03em; padding: 1.5px 7px;
  border-radius: 999px; margin-left: auto; flex: 0 0 auto;
}
.badge.soon { color: var(--warn); background: var(--warn-bg); border: 1px solid #fde9c3; }
.badge.beta { color: var(--info); background: var(--info-bg); border: 1px solid #dbe7fd; }

/* ---------- İçerik ---------- */
#icerik { min-width: 0; padding: 40px 48px 80px; }
article.doc { max-width: var(--content-max); margin: 0 auto; }

/* ---------- Sağ ray: Bu sayfada ---------- */
.toc-rail {
  position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h));
  overflow-y: auto; padding: 40px 24px 40px 8px; font-size: 13px;
}
.toc-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--text-3); text-transform: uppercase; margin-bottom: 10px;
}
.toc-rail ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc-rail li a {
  display: block; padding: 5px 0 5px 14px; margin-left: -1px;
  color: var(--text-3); text-decoration: none !important; border-left: 2px solid transparent;
  line-height: 1.45;
}
.toc-rail li a:hover { color: var(--text); }
.toc-rail li a.active { color: var(--brand-dark); font-weight: 600; border-left-color: var(--brand); }

/* Mobil "Bu sayfada" */
.toc-mobile { display: none; margin: 20px 0 4px; border: 1px solid var(--line); border-radius: var(--r); }
.toc-mobile summary {
  cursor: pointer; padding: 11px 14px; font-size: 13px; font-weight: 600; color: var(--text-2);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile ul { list-style: none; margin: 0; padding: 0 14px 12px; }
.toc-mobile li a { display: block; padding: 6px 0; font-size: 14px; }

/* ============================================================
   MAKALE TİPOGRAFİSİ
   ============================================================ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-dark); margin: 0 0 14px;
}
.eyebrow .sep { color: var(--text-3); font-weight: 500; }
.eyebrow .crumb-cur { color: var(--text-3); font-weight: 600; letter-spacing: .06em; }

article.doc h1 {
  margin: 0 0 10px; font-size: 34px; line-height: 1.2; font-weight: 800; letter-spacing: -.025em;
}
.hero-lead { margin: 0 0 22px; font-size: 18px; line-height: 1.65; color: var(--text-2); }

.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.btn-app {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 20px;
  background: var(--brand-grad); color: #fff !important; font-weight: 600; font-size: 14.5px;
  border-radius: var(--r); text-decoration: none !important;
  box-shadow: 0 2px 10px rgba(109, 40, 217, .25); transition: transform .12s, box-shadow .12s;
}
.btn-app:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(109, 40, 217, .33); }
.btn-app svg { width: 15px; height: 15px; }
.chip-soon {
  display: inline-flex; align-items: center; height: 42px; padding: 0 18px;
  color: var(--warn); background: var(--warn-bg); border: 1px solid #fde9c3;
  border-radius: var(--r); font-weight: 600; font-size: 14px;
}
.pill-beta {
  display: inline-flex; align-items: center; padding: 4px 12px;
  color: var(--info); background: var(--info-bg); border: 1px solid #dbe7fd;
  border-radius: 999px; font-weight: 600; font-size: 12.5px;
}

.prereqs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 8px; }
.prereq-label { font-size: 13px; font-weight: 600; color: var(--text-3); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none !important;
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.chip::before { content: '✓'; color: var(--ok); font-weight: 700; }

article.doc h2 {
  margin: 44px 0 14px; padding-top: 8px; font-size: 23px; line-height: 1.3;
  font-weight: 700; letter-spacing: -.02em; scroll-margin-top: calc(var(--header-h) + 20px);
  position: relative;
}
article.doc h2 .anchor {
  position: absolute; left: -24px; top: 8px; opacity: 0; font-weight: 400;
  color: var(--brand); text-decoration: none !important; font-size: 20px;
}
article.doc h2:hover .anchor { opacity: .8; }
article.doc h3 { margin: 26px 0 8px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
article.doc p { margin: 0 0 14px; color: var(--text); }
article.doc ul, article.doc ol { margin: 0 0 16px; padding-left: 24px; }
article.doc li { margin-bottom: 6px; }
article.doc ul.benefits { list-style: none; padding-left: 0; }
article.doc ul.benefits li {
  position: relative; padding-left: 30px; margin-bottom: 10px; font-size: 16.5px;
}
article.doc ul.benefits li::before {
  content: ''; position: absolute; left: 0; top: 5px; width: 18px; height: 18px;
  border-radius: 6px; background: var(--brand-grad);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='black'%3E%3Cpath fill-rule='evenodd' d='M16.7 5.3a1 1 0 010 1.4l-8 8a1 1 0 01-1.4 0l-4-4a1 1 0 111.4-1.4L8 12.6l7.3-7.3a1 1 0 011.4 0z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='black'%3E%3Cpath fill-rule='evenodd' d='M16.7 5.3a1 1 0 010 1.4l-8 8a1 1 0 01-1.4 0l-4-4a1 1 0 111.4-1.4L8 12.6l7.3-7.3a1 1 0 011.4 0z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Uygulama arayüz etiketi çipi */
.ui {
  display: inline-block; padding: 1px 8px; border-radius: 6px;
  background: var(--brand-soft); border: 1px solid #e4d9fb;
  color: var(--brand-dark); font-weight: 600; font-size: .92em; white-space: nowrap;
}

/* Menü yolu (Nerede?) */
.menu-path {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 14px; margin: 0 0 16px; border: 1px dashed var(--line);
  border-radius: var(--r); background: var(--bg-soft); font-size: 13.5px; color: var(--text-2);
}
.menu-path b { color: var(--text); font-weight: 600; }
.menu-path .mp-sep { color: var(--text-3); }

/* ---------- Adım kartları ---------- */
ol.steps { list-style: none; counter-reset: adim; margin: 18px 0 24px; padding: 0; }
ol.steps > li.step {
  position: relative; counter-increment: adim;
  padding: 0 0 26px 56px; margin: 0;
}
ol.steps > li.step::before {
  content: counter(adim);
  position: absolute; left: 0; top: 0; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-grad); color: #fff; font-weight: 700; font-size: 15px;
  border-radius: 50%; box-shadow: 0 2px 8px rgba(109, 40, 217, .28);
}
ol.steps > li.step::after {
  content: ''; position: absolute; left: 17.5px; top: 42px; bottom: 6px; width: 1.5px;
  background: var(--line);
}
ol.steps > li.step:last-child::after { display: none; }
ol.steps > li.step > h3 { margin: 5px 0 6px; font-size: 16.5px; }
ol.steps > li.step > p { margin-bottom: 10px; color: var(--text-2); font-size: 15.5px; }
.result {
  display: flex; align-items: baseline; gap: 8px; margin: 8px 0 0;
  font-size: 14.5px; color: var(--ok); font-weight: 500;
}

/* ---------- Ekran görüntüsü / placeholder ---------- */
figure.shot { margin: 14px 0 6px; }
figure.shot img {
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
figure.shot figcaption { margin-top: 8px; font-size: 13px; color: var(--text-3); }
figure.shot.missing img { display: none; }
figure.shot.missing::before {
  content: '📷  Ekran görüntüsü yakında eklenecek';
  display: flex; align-items: center; justify-content: center; min-height: 150px;
  border: 1.5px dashed #d5dae3; border-radius: var(--r-lg);
  background: var(--bg-soft); color: var(--text-3); font-size: 14px; font-weight: 500;
}

/* ---------- Ekran bölge şeması ---------- */
.screen-map {
  display: grid; gap: 8px; margin: 16px 0 20px; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-soft);
}
.screen-map .sm-row { display: grid; gap: 8px; }
.screen-map .sm-zone {
  border: 1.5px solid #d9cdf8; background: #fff; border-radius: var(--r);
  padding: 12px 14px; min-height: 56px;
}
.screen-map .sm-zone b { display: block; font-size: 13.5px; color: var(--brand-dark); margin-bottom: 2px; }
.screen-map .sm-zone span { font-size: 12.5px; color: var(--text-3); line-height: 1.45; display: block; }
.screen-map figcaption, .screen-map .sm-cap { font-size: 12.5px; color: var(--text-3); text-align: center; margin-top: 2px; }

/* ---------- Bilgi kutuları ---------- */
.callout {
  display: block; margin: 18px 0; padding: 13px 16px 13px 18px;
  border-radius: var(--r); border: 1px solid; border-left-width: 4px;
  font-size: 15px; line-height: 1.65;
}
.callout > strong { font-weight: 700; }
.callout.tip    { background: var(--ok-bg);     border-color: #c7f0df; border-left-color: var(--ok-border); }
.callout.tip    > strong { color: var(--ok); }
.callout.info   { background: var(--info-bg);   border-color: #d6e4fc; border-left-color: var(--info-border); }
.callout.info   > strong { color: var(--info); }
.callout.warn   { background: var(--warn-bg);   border-color: #fbe8c4; border-left-color: var(--warn-border); }
.callout.warn   > strong { color: var(--warn); }
.callout.danger { background: var(--danger-bg); border-color: #fbd5d5; border-left-color: var(--danger-border); }
.callout.danger > strong { color: var(--danger); }

/* ---------- SSS ---------- */
details.faq {
  margin: 0 0 10px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg); transition: border-color .15s;
}
details.faq:hover { border-color: #d5dae3; }
details.faq[open] { border-color: #d9cdf8; }
details.faq summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
  padding: 13px 16px; font-weight: 600; font-size: 15px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before {
  content: '+'; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 700;
}
details.faq[open] summary::before { content: '−'; }
details.faq > *:not(summary) { padding: 0 16px; }
details.faq > p:last-child, details.faq div:last-child { padding-bottom: 14px; }
details.faq p { color: var(--text-2); font-size: 14.5px; margin-bottom: 10px; }

/* ---------- Tablolar (sözlük vb.) ---------- */
.table-wrap { overflow-x: auto; margin: 16px 0 20px; }
article.doc table {
  width: 100%; border-collapse: collapse; font-size: 14.5px;
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
article.doc th {
  text-align: left; padding: 10px 14px; background: var(--bg-soft);
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-3); border-bottom: 1px solid var(--line);
}
article.doc td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
article.doc tr:last-child td { border-bottom: 0; }

/* ---------- İlgili sayfalar ---------- */
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 14px 0 8px; }
.rel-card {
  display: flex; flex-direction: column; gap: 3px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .12s;
}
.rel-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-1px); }
.rel-card strong { color: var(--text); font-size: 14.5px; }
.rel-card span { color: var(--text-3); font-size: 13px; line-height: 1.5; }

/* ---------- Önceki / Sonraki ---------- */
.prevnext {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line);
}
.pn-card {
  display: flex; flex-direction: column; gap: 3px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none !important; transition: border-color .15s, box-shadow .15s;
}
.pn-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.pn-card.next { text-align: right; grid-column: 2; }
.pn-card.prev { grid-column: 1; }
.pn-dir { font-size: 12px; font-weight: 600; letter-spacing: .05em; color: var(--text-3); text-transform: uppercase; }
.pn-title { font-weight: 600; color: var(--brand-dark); font-size: 15px; }

/* ---------- Modül kart gridi (Tanıtım / site haritası) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.mod-card {
  display: flex; flex-direction: column; gap: 6px; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg);
  text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .12s;
}
.mod-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.mod-tag {
  align-self: flex-start; font-size: 10px; font-weight: 700; letter-spacing: .07em;
  color: var(--brand-dark); background: var(--brand-soft); border: 1px solid #e4d9fb;
  padding: 2px 8px; border-radius: 999px; text-transform: uppercase;
}
.mod-card strong { color: var(--text); font-size: 15.5px; letter-spacing: -.01em; }
.mod-card span { color: var(--text-3); font-size: 13.5px; line-height: 1.55; }

/* ---------- Sayfa altı ---------- */
.doc-footer {
  margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line-soft);
  font-size: 13px; color: var(--text-3); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.doc-footer a { color: var(--text-3); }
.doc-footer a:hover { color: var(--brand-dark); }

/* ============================================================
   MOBİL / DUYARLILIK
   ============================================================ */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(10, 26, 47, .4);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
body.drawer-open .drawer-overlay { opacity: 1; pointer-events: auto; }

@media (max-width: 1199px) {
  #app-shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .toc-rail { display: none; }
  .toc-mobile { display: block; }
}
@media (max-width: 1023px) {
  #app-shell { grid-template-columns: minmax(0, 1fr); }
  .hamburger { display: flex; }
  .search-box { width: 200px; }
  .doc-sidebar {
    position: fixed; left: 0; top: var(--header-h); z-index: 95;
    width: min(320px, 85vw); height: calc(100vh - var(--header-h));
    background: var(--bg); border-right: 1px solid var(--line);
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: none;
  }
  body.drawer-open .doc-sidebar { transform: translateX(0); box-shadow: var(--shadow); }
  #icerik { padding: 28px 20px 64px; }
  article.doc h1 { font-size: 28px; }
  .hero-lead { font-size: 16.5px; }
}
@media (max-width: 599px) {
  .search-box { width: 40px; padding: 0; justify-content: center; cursor: pointer; }
  .search-box input, .search-kbd { display: none; }
  .search-box.expanded { position: fixed; left: 12px; right: 12px; top: 13px; width: auto; z-index: 110; padding: 0 10px 0 12px; justify-content: flex-start; }
  .search-box.expanded input { display: block; }
  .search-wrap.expanded .search-panel { position: fixed; left: 12px; right: 12px; top: 58px; width: auto; }
  .brand-tag { display: none; }
  .btn-open-app { padding: 0 12px; font-size: 13px; }
  .prevnext { grid-template-columns: 1fr; }
  .pn-card.next { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Yazdırma ---------- */
@media print {
  .site-header, .doc-sidebar, .toc-rail, .prevnext, .action-row, .drawer-overlay { display: none !important; }
  #app-shell { display: block; padding-top: 0; }
  #icerik { padding: 0; }
}
