/* Rehber sayfaları (web/rehber/*.html, derleme scripts/rehberler.py). Belirteçler, menü, alt bilgi ve düğmeler
   styles.css'ten gelir; burada yalnızca okuma düzeni var. Kurallar ve gerekçeler: DESIGN.md, "Rehber sayfaları". */
.doc { padding-block: clamp(20px, 4vw, 48px) clamp(56px, 8vw, 104px); }
/* Masaüstü: solda başlık ve metin, sağda yapışkan yan sütun. Telefonda tek sütun: başlık, içindekiler, metin, tanıtım. */
.doc-grid {
  display: grid; grid-template-columns: minmax(0, 44rem) minmax(0, 17rem); grid-template-areas: "head side" "body side";
  grid-template-rows: auto 1fr; justify-content: space-between; gap: clamp(28px, 4vw, 40px) 48px;
}
.doc-head { grid-area: head; }
.doc-body { grid-area: body; display: flex; flex-direction: column; gap: clamp(32px, 4vw, 44px); min-width: 0; }

.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; font-size: .9rem; color: var(--ink3); }
.crumbs li:not(:last-child)::after { content: "/"; margin-inline: 8px; color: var(--line2); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

.doc-head { display: flex; flex-direction: column; gap: 18px; }
.doc-head h1 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; }
.doc-head .lead { max-width: none; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .9rem; color: var(--ink3); }

/* Metin */
.prose { display: flex; flex-direction: column; gap: 18px; color: var(--ink2); line-height: 1.7; }
.prose h2 { margin-top: 26px; color: var(--ink); font-size: clamp(1.45rem, 2.2vw, 1.8rem); line-height: 1.2; letter-spacing: -.025em; scroll-margin-top: calc(var(--nav-h) + 16px); }
.prose h3 { margin-top: 8px; color: var(--ink); font-size: 1.15rem; }
.prose strong, .prose b { color: var(--ink); font-weight: 600; }
.prose a:not(.btn) { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:not(.btn):hover { color: var(--accent-ink); }
.prose ul, .prose ol { display: flex; flex-direction: column; gap: 10px; }
.prose ul > li { position: relative; padding-left: 22px; }
.prose ul > li::before { content: ""; position: absolute; left: 2px; top: .68em; width: 7px; height: 7px; border-radius: 2px; background: var(--line2); }
/* Adımlar: logodaki ve test tablosundaki kare dilinde numara */
.prose ol { counter-reset: adim; gap: 16px; }
.prose ol > li { counter-increment: adim; position: relative; padding-left: 46px; min-height: 30px; }
.prose ol > li::before {
  content: counter(adim); position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 8px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink);
  font: 500 .95rem/1 var(--mono);
}
.prose ol > li > b:first-child { display: block; }
.prose blockquote { margin: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--line2); color: var(--ink); }
.prose blockquote p + p { margin-top: 8px; }
.prose blockquote cite { display: block; margin-top: 6px; font-size: .9rem; font-style: normal; color: var(--ink3); }
.prose code { padding: .1em .35em; border-radius: 6px; background: var(--soft); font: .92em var(--mono); color: var(--ink); overflow-wrap: anywhere; }
/* Kutu: dikkat edilecek nokta ya da "resmî kaynakta yok" notu. Durum rengi değil, nötr zemin. */
.box { padding: 18px 20px; border-radius: var(--r-m); background: var(--soft); color: var(--ink2); }
.box > b:first-child { display: block; margin-bottom: 4px; color: var(--ink); }
.box.dashed { background: transparent; border: 1.5px dashed var(--line2); }
.prose .tbl-wrap { margin-block: 4px; }
.prose .tbl { min-width: 640px; line-height: 1.5; }
.prose .tbl th, .prose .tbl td { padding: 14px 16px; }
.prose .tbl thead th { width: auto; font-size: 1rem; }
.prose .tbl thead td, .prose .tbl tbody th { width: 9.5rem; }

/* Kaynaklar */
.sources { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.sources h2 { font-size: 1.15rem; letter-spacing: -.015em; }
.sources ul { display: flex; flex-direction: column; gap: 4px; font-size: .95rem; }
.sources a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.sources a:hover { color: var(--accent-ink); }
.sources .fine { margin-top: 4px; }

/* Yan sütun (masaüstü): bu sayfada + kısa tanıtım. Telefonda tanıtım metnin sonuna iner, içindekiler başta kalır. */
.doc-side { grid-area: side; align-self: start; position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 24px; }
.toc { display: flex; flex-direction: column; gap: 6px; }
.toc b { font-size: .9rem; color: var(--ink3); font-weight: 500; }
.toc ol { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.toc a { display: flex; align-items: center; min-height: 40px; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: .95rem; line-height: 1.35; color: var(--ink2); text-decoration: none; }
.toc a:hover { color: var(--ink); border-left-color: var(--line2); }
.toc a[aria-current] { color: var(--ink); border-left-color: var(--accent-ink); } /* okunan bölüm (rehber.js) */
.promo { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: var(--r-m); background: var(--stage-a); }
.promo b { font-size: 1.1rem; letter-spacing: -.015em; line-height: 1.3; }
.promo p { font-size: .95rem; color: var(--ink2); }
.promo .btn { align-self: flex-start; }
/* İki kopya (scripts/rehberler.py): masaüstünde yan sütundaki, telefonda metnin sonundaki görünür. */
.promo.son { display: none; }

/* Diğer rehberler: ana sayfadaki rehber satırlarıyla aynı dil */
.doc-more { display: flex; flex-direction: column; gap: 16px; margin-top: clamp(48px, 7vw, 88px); }
.doc-more h2 { font-size: clamp(1.45rem, 2.2vw, 1.8rem); }

/* Dile özel başlıklar: i18n/<dil>.css'teki h1/h2 kurallarının rehber karşılığı (buradaki sınıflı seçiciler onları ezer).
   CJK ve Tayca harf aralığı 0; satır yüksekliği yazı sistemine göre (üst ve alt işaretler kesilmesin). */
:is(:lang(ja), :lang(ko), :lang(zh)) :is(.doc-head h1, .prose h2, .prose h3, .doc-more h2, .sources h2, .promo b) { letter-spacing: 0; }
:is(:lang(ja), :lang(ko), :lang(zh)) .doc-head h1 { line-height: 1.2; }
:is(:lang(ja), :lang(ko), :lang(zh)) :is(.prose h2, .doc-more h2) { line-height: 1.3; }
:lang(th) :is(.doc-head h1, .prose h2, .prose h3, .doc-more h2, .sources h2, .promo b) { letter-spacing: 0; line-height: 1.35; }
:lang(vi) :is(.doc-head h1, .prose h2, .doc-more h2) { line-height: 1.2; }
:lang(th) .prose { line-height: 1.8; }

@media (max-width: 980px) {
  .doc-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; grid-template-rows: none; row-gap: 32px; }
  .doc-head, .doc-body, .doc-side { grid-area: auto; }
  .doc-side { position: static; }
  .promo.yan { display: none; }
  .promo.son { display: flex; }
  .toc ol { border-left: 0; border-top: 1px solid var(--line); }
  .toc a { padding-left: 0; border-left: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .promo .btn { align-self: stretch; }
  .prose .tbl { min-width: 540px; }
  .prose .tbl th, .prose .tbl td { padding: 12px; }
  .prose .tbl thead td, .prose .tbl tbody th { width: 6.75rem; }
  /* Japonca ve Çincede 540 px'lik tabloda dar sütun sözcüğü ortadan kırıyordu ("セットアップ完|了前"); tablo zaten yana kayar. */
  :is(:lang(ja), :lang(zh)) .prose .tbl { min-width: 660px; }
  .prose ol > li { padding-left: 42px; }
}

/* 404 sayfası (rehberler.py hata_sayfasi; her derinlikte açılır, bağlantılar mutlak). */
.nf-sayfa { min-height: 100dvh; display: flex; flex-direction: column; } /* kısa sayfada alt bilgi ekranın dibinde */
.nf-sayfa > main { flex: 1 0 auto; width: 100%; } /* esnek kapta .wrap içeriğe daralmasın, logoyla hizalı kalsın */
.nf { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding-block: clamp(56px, 11vw, 132px) clamp(72px, 12vw, 148px); }
.nf-kod { font-size: .95rem; font-weight: 600; color: var(--accent-ink); font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.nf h1 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; max-width: 18em; }
.nf-act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Yasal sayfalar (scripts/yasal.py; kabuk 404 ile ortak). Okuma sütunu rehberle aynı; madde numaralı paragraflar sık. */
.yasal .prose { max-width: 46rem; }
.yasal .prose h1 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; margin-bottom: 18px; }
.yasal .prose p + p { margin-top: 10px; }
.yasal-taslak { max-width: 46rem; margin-bottom: 20px; padding: 10px 14px; border-radius: var(--r-s); background: var(--wait-soft); color: var(--wait); font-weight: 600; } /* yer tutucuyla aynı turuncu (DESIGN.md) */

/* Bize ulaş (rehberler.py destek_sayfasi; kullanıcının isteği 2026-11-22). Kurallar: DESIGN.md "Bize ulaş sayfası". */
.ds-sayfa { min-height: 100dvh; display: flex; flex-direction: column; }
.ds-sayfa > main { flex: 1 0 auto; width: 100%; }
.ds { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 44px); padding-block: clamp(40px, 7vw, 88px) clamp(64px, 9vw, 112px); }
.ds-head { display: flex; flex-direction: column; gap: 16px; max-width: 40rem; }
.ds h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.05; letter-spacing: -.03em; }
.ds h2 { font-size: 1.15rem; line-height: 1.3; }
.ds-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; align-items: center; padding: clamp(24px, 3.4vw, 40px); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow); }
.ds-info { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: var(--ink2); }
.ds-info h2 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); color: var(--ink); letter-spacing: -.015em; }
.ds-ikon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.ds-sure { font-size: .92rem; color: var(--ink3); }
.ds-act { display: flex; flex-direction: column; gap: 12px; }
.ds-adres { display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 16px; border: 1px solid var(--line2); border-radius: var(--r-s); background: var(--bg); font: 500 1.02rem var(--mono); color: var(--ink); overflow-wrap: anywhere; text-align: center; user-select: all; }
.ds-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ds-btns .btn { justify-content: center; }
.ds-btns .btn:active { transform: scale(.97); }
.ds-not { font-size: .88rem; color: var(--ink3); }
.ds-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.ds-box { display: flex; flex-direction: column; gap: 12px; padding: clamp(22px, 2.6vw, 30px); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink2); }
.ds-box h2 { color: var(--ink); }
.ds-liste { display: flex; flex-direction: column; gap: 10px; counter-reset: ds; }
.ds-liste li { display: flex; gap: 12px; counter-increment: ds; }
.ds-liste li::before { content: counter(ds); flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px; background: var(--soft); color: var(--ink); font: 600 .8rem var(--mono); }
.ds-kaynak { display: flex; flex-direction: column; gap: 6px; }
.ds-kaynak h2 { padding-bottom: 10px; }
.ds-kaynak ul { border-top: 1px solid var(--line); }
.ds-kaynak a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ds-kaynak a > span { display: flex; flex-direction: column; gap: 2px; }
.ds-kaynak a b { font-weight: 600; }
.ds-kaynak a > span > span { color: var(--ink3); font-size: .92rem; }
.ds-kaynak svg { flex: none; color: var(--ink3); transition: transform .2s var(--ease), color .2s; }
@media (hover: hover) and (pointer: fine) { .ds-kaynak a:hover svg { transform: translateX(3px); color: var(--ink); } }
@media (max-width: 980px) { .ds-card, .ds-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .ds-btns { grid-template-columns: minmax(0, 1fr); } .ds-adres { font-size: .95rem; } }
