:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --text: #18212f;
  --muted: #5a6577;
  --line: #e1e6ee;
  --brand: #0e7a6b;
  --brand-ink: #0a5c51;
  --brand-soft: #e3f4f0;
  --accent: #f2a33a;
  --wa: #128c4a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .05);
  --tint: var(--brand);
}
:root:not([data-theme="light"]) { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e131b;
    --surface: #161d28;
    --surface-2: #1d2634;
    --text: #e7ecf3;
    --muted: #9aa6b8;
    --line: #273245;
    --brand: #38c2ab;
    --brand-ink: #6fdcc9;
    --brand-soft: #14312d;
    --wa: #3ecf7c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}

/* Grup renkleri */
.g0 { --tint: #0e7a6b; }
.g1 { --tint: #d6336c; }
.g2 { --tint: #e8890c; }
.g3 { --tint: #5b5bd6; }
.g4 { --tint: #1c7ed6; }
.g5 { --tint: #7c5a3a; }
@media (prefers-color-scheme: dark) {
  .g0 { --tint: #38c2ab; }
  .g1 { --tint: #f783ac; }
  .g2 { --tint: #ffb454; }
  .g3 { --tint: #9b9bf5; }
  .g4 { --tint: #6ab7f5; }
  .g5 { --tint: #c9a27e; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; text-wrap: balance; }
ul { list-style: none; margin: 0; padding: 0; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ic { width: 18px; height: 18px; flex: none; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 60; background: #18212f; color: #fff; padding: 10px 16px; border-radius: 0 0 10px 10px; font-weight: 700; }
.skip:focus { top: 0; }
main:focus { outline: 0; }
mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 820px; }
.section { margin-top: 40px; }
.section-title { font-size: 1.35rem; margin: 0 0 16px; }

/* ---------- Üst bölüm ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 14px; height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 1.3rem; letter-spacing: -.02em; margin: 0; }
.logo:hover { text-decoration: none; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand); color: #fff; font: 700 30px/1 Georgia, serif; padding-top: 12px;
}
.logo-text b { color: var(--brand-ink); }
.search { flex: 1; display: flex; max-width: 460px; margin-left: auto; background: var(--surface-2); border-radius: 999px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 9px 4px 9px 16px; outline: 0; }
.search button { border: 0; background: none; padding: 0 14px; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.search:focus-within { box-shadow: 0 0 0 2px var(--brand); }
.menu-toggle {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .92rem;
}
.menu-toggle[aria-expanded="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
/* Kesin yükseklik app.js'te ölçülür; buradaki değer yedektir */
.menu { border-top: 1px solid var(--line); background: var(--surface); max-height: calc(100vh - 62px); max-height: calc(100dvh - 62px); overflow: auto; overscroll-behavior: contain; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px 28px; padding-top: 20px; padding-bottom: 24px; }
.menu-title, .footer-title, .side-title { font-weight: 700; margin: 0 0 8px; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tint); }
.menu a { display: block; padding: 5px 0; color: var(--text); }
/* Menü ve alt bölüm grupları: masaüstünde hep açık, mobilde açılır-kapanır */
.acc > summary { display: block; list-style: none; }
.acc > summary::-webkit-details-marker { display: none; }
.chips-bar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 63px; z-index: 19; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-top: 9px; padding-bottom: 9px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a {
  flex: none; padding: 5px 13px; border-radius: 999px; background: var(--surface-2); color: var(--text);
  font-size: .88rem; white-space: nowrap;
}
.chips a:hover { background: var(--brand-soft); text-decoration: none; }
.chips-wrap { position: relative; }
.chips-wrap .chips { margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-behavior: smooth; }
/* Fareyle kaydırılamayan şerit için ok düğmeleri (app.js gösterir/gizler) */
.chips-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; padding: 0 0 3px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); box-shadow: 0 0 10px 8px var(--surface);
  display: grid; place-items: center; cursor: pointer; font-size: 1.25rem; line-height: 1;
}
.chips-nav[hidden] { display: none; }
.chips-nav.prev { left: 8px; }
.chips-nav.next { right: 8px; }
@media (hover: none) { .chips-nav { display: none; } }
.chips.inline { flex-wrap: wrap; overflow: visible; padding: 0; margin: 16px 0; }
.chips.center { justify-content: center; }

/* ---------- Ana sayfa ---------- */
.hero { background: linear-gradient(135deg, #0b5d53, #0e7a6b 55%, #14967f); color: #fff; padding: 48px 0 54px; text-align: center; }
.hero h1 { font-size: clamp(1.7rem, 4.6vw, 2.7rem); letter-spacing: -.02em; }
.hero h1 span { color: #ffd58a; }
.hero p { max-width: 620px; margin: 14px auto 24px; opacity: .92; }
.hero-search { display: flex; max-width: 560px; margin: 0 auto; background: #fff; border-radius: 999px; padding: 5px; box-shadow: 0 8px 30px rgba(0, 0, 0, .18); }
.hero-search input { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 18px; outline: 0; color: #18212f; }
.hero-search button {
  display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: #2b1c02; font-weight: 700; padding: 10px 20px;
}
.hero-search.on-page { margin: 0 0 8px; max-width: none; box-shadow: var(--shadow); border: 1px solid var(--line); }

.daily { background: var(--brand-soft); border-radius: calc(var(--radius) + 4px); padding: 18px; max-width: 860px; margin-inline: auto; }
.daily-label { margin: 0 0 10px; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-ink); }
.daily .msg-body { font-size: 1.2rem; }

.group { margin-bottom: 26px; }
.group-title { font-size: 1rem; color: var(--tint); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.cat-card {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  color: var(--text); transition: transform .15s, border-color .15s, box-shadow .15s;
}
.cat-card:hover { text-decoration: none; }
@media (hover: hover) {
  .cat-card:hover { border-color: var(--tint); transform: translateY(-2px); box-shadow: var(--shadow); }
}
.cat-icon { grid-row: span 2; font-size: 1.7rem; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--tint) 12%, transparent); }
.cat-name { font-weight: 650; line-height: 1.3; }
.cat-count { color: var(--muted); font-size: .85rem; }

/* ---------- Mesaj kartı ---------- */
.msg-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); }
.msg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.msg {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; scroll-margin-top: 130px;
}
.msg-cat { align-self: flex-start; font-size: .78rem; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); padding: 2px 10px; border-radius: 999px; margin-bottom: 10px; }
.msg-body { margin: 0 0 14px; font-size: 1.06rem; line-height: 1.65; flex: 1; overflow-wrap: anywhere; }
.msg-actions { display: flex; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; flex-wrap: wrap; }
.act {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--surface-2); color: var(--text);
  padding: 7px 13px; border-radius: 999px; cursor: pointer; font-size: .88rem; font-weight: 600;
}
.act:hover { text-decoration: none; }
.act-copy { background: var(--brand); color: #fff; }
.act-copy.done { background: var(--brand-ink); }
.act-wa { color: var(--wa); }
@media (hover: hover) {
  .act:hover { filter: brightness(.96); }
}
@media (prefers-color-scheme: dark) {
  .act-copy { color: #06231f; }
}
@media (prefers-color-scheme: dark) and (hover: hover) {
  .act:hover { filter: brightness(1.12); }
}
.single .msg-body { font-size: 1.3rem; }
.single { margin-bottom: 34px; }

/* ---------- Kategori sayfası ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--muted); padding: 18px 0 6px; }
.crumbs b { font-weight: 600; color: var(--text); }
.page-head { display: flex; align-items: center; gap: 16px; margin: 10px 0 14px; }
.page-icon { font-size: 2.2rem; width: 68px; height: 68px; flex: none; display: grid; place-items: center; border-radius: 18px; background: color-mix(in srgb, var(--tint) 14%, transparent); }
.page-head h1 { font-size: clamp(1.55rem, 4vw, 2.1rem); letter-spacing: -.02em; }
.page-head h1 small { font-size: .55em; font-weight: 500; color: var(--muted); }
.page-meta { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 760px; margin: 0 0 24px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
/* --side-top: sütun ekrandan uzunsa altı görünene kadar kayar, sonra sabitlenir (app.js) */
.side-col { display: grid; gap: 16px; position: sticky; top: var(--side-top, 124px); }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.side-list a { display: flex; gap: 8px; padding: 7px 0; color: var(--text); border-bottom: 1px dashed var(--line); }
.side-list li:last-child a { border: 0; }
.side-list em { margin-left: auto; font-style: normal; color: var(--muted); font-size: .85rem; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 26px 0; }
.pager a, .pager span { min-width: 40px; text-align: center; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.pager .current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.pager .gap { border: 0; background: none; }

.prose { margin-top: 36px; max-width: 760px; }
.prose h1 { font-size: 1.9rem; margin-bottom: 16px; }
.prose h2 { font-size: 1.25rem; margin: 26px 0 8px; }
.prose p { margin: 0 0 14px; }
.prose a { text-decoration: underline; }
.prose.page { margin-top: 8px; }

.faq { margin-top: 32px; max-width: 760px; }
.faq h2 { font-size: 1.25rem; margin-bottom: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 13px 16px; font-weight: 650; }
.faq details p { margin: 0; padding: 0 16px 14px; color: var(--muted); }

.btn { display: inline-block; background: var(--brand); color: #fff; padding: 10px 20px; border-radius: 999px; font-weight: 700; }
.btn:hover { text-decoration: none; background: var(--brand-ink); }
.more { text-align: center; margin: 22px 0; }
.not-found { text-align: center; padding-top: 50px; }
.nf-code { font-size: 5rem; font-weight: 800; margin: 0; color: var(--brand); line-height: 1; }

/* ---------- Reklam alanları ---------- */
/* Kopyala/Paylaş düğmelerine yapışmasın diye çevresinde boşluk bırakılır (yanlışlıkla tıklama kuralı) */
.ad { margin: 22px auto; text-align: center; overflow: hidden; max-width: 100%; min-height: 100px; clear: both; }
.ad-label { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad ins, .ad iframe, .ad img { max-width: 100%; }
.ad-top, .ad-bottom { width: 100%; max-width: 1140px; padding: 0 16px; min-height: 110px; }
.msg-list .ad { grid-column: 1 / -1; margin: 10px 0; width: 100%; min-height: 120px; }
.side-col .ad { margin: 0; min-height: 250px; }

/* ---------- Alt bölüm ---------- */
.site-footer { margin-top: 60px; background: var(--surface); border-top: 1px solid var(--line); font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 26px 32px; padding-top: 32px; padding-bottom: 28px; }
.footer-about { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.footer-about p { color: var(--muted); margin: 0; }
.footer-title { color: var(--text); }
.footer-grid a { display: block; padding: 3px 0; color: var(--muted); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 22px; color: var(--muted); }
.footer-bottom p { margin: 0; }
.footer-bottom a { margin-left: 16px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50;
  background: #18212f; color: #fff; padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: .93rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25); white-space: nowrap; max-width: calc(100% - 24px);
}
.to-top {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18); display: grid; place-items: center; cursor: pointer;
}
.to-top[hidden] { display: none; }

@media (max-width: 900px) {
  /* Yan sütun (ilgili kategoriler) mesajların hemen altına, uzun yazı ve SSS'nin üstüne gelir */
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .main-col { display: contents; }
  .main-col > * { order: 1; min-width: 0; }
  .side-col { position: static; order: 2; margin-top: 24px; }
  .main-col > .prose, .main-col > .faq { order: 3; }
  .side-col .ad { order: 9; }
}
@media (max-width: 640px) {
  .header-row { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .menu-toggle { margin-left: auto; min-height: 44px; }
  /* Aşağı kaydırınca gizlenir, yukarı kaydırınca geri gelir (app.js) */
  .site-header { transition: transform .22s ease; }
  .site-header.is-away:not(:focus-within) { transform: translateY(-100%); }
  .menu-open, .menu-open body { overflow: hidden; }
  .chips-bar { position: static; }
  .chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 5px 14px; }

  .menu-grid { display: block; padding-top: 0; padding-bottom: 16px; }
  .acc > summary {
    display: flex; align-items: center; justify-content: space-between; min-height: 50px; margin: 0;
    cursor: pointer; border-bottom: 1px solid var(--line);
  }
  .acc > summary::after {
    content: ""; width: 8px; height: 8px; margin-right: 6px; border-right: 2px solid; border-bottom: 2px solid;
    transform: rotate(45deg); transition: transform .15s;
  }
  .acc[open] > summary::after { transform: rotate(-135deg); }
  .acc > ul { padding: 6px 0 10px; }
  .menu a, .footer-grid a { padding: 10px 0; }

  .hero { padding: 34px 0 40px; }
  .hero-search button span { display: none; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cat-card { grid-template-columns: 1fr; row-gap: 6px; padding: 12px; }
  .cat-icon { grid-row: auto; }
  .msg-grid { grid-template-columns: 1fr; }
  .page-icon { width: 54px; height: 54px; font-size: 1.7rem; }

  /* Üç düğme tek satır: Kopyala ve WhatsApp yazılı, Paylaş yalnızca simge */
  .msg-actions { flex-wrap: nowrap; }
  .act { min-height: 44px; justify-content: center; white-space: nowrap; padding: 7px 10px; }
  .act-copy, .act-wa { flex: 1 1 0; min-width: 0; }
  .act-share { flex: none; width: 44px; padding: 0; }
  .act-share span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .msg-cat { padding: 5px 12px; }

  .crumbs { align-items: center; padding: 8px 0 0; }
  .crumbs a { padding: 11px 0; }
  .side-list a { padding: 10px 0; }
  .pager a, .pager span { min-width: 44px; padding: 10px 12px; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 24px; padding-bottom: 20px; }
  .footer-about { border-bottom: 0; padding-bottom: 12px; }
  .footer-bottom a { display: inline-block; margin: 0 16px 0 0; padding: 11px 0; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 359px) {
  .act-wa { flex: none; width: 44px; padding: 0; }
  .act-wa span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
