/* reader.css — v6 (Dark-only + Okuma Ayarları) */

/* Vars (Dark) */
:root{
  --bg:#0B0F14;
  --text:#E8E8E8;
  --muted:#9AA3AF;
  --accent:#B21E35;
  --link:#E04762;
  --surface:rgba(255,255,255,.05);
  --surface-2:rgba(255,255,255,.08);
  --border:rgba(255,255,255,.16);
  --quote:rgba(255,255,255,.14);
  --code-bg:#0F141B;

  /* Okuma ayarları (kullanıcı tarafından değişir) */
  --fs:18px;          /* font-size */
  --lh:1.7;           /* line-height */
  --mw:70ch;          /* max-width (60–72ch önerilir) */
  --indent:1.3em;     /* paragraf ilk satır girintisi */
}

/* Base */
html,body{
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
::selection{ color:#0B0F14; background:#F7D6DE; }

a{ color:var(--link); text-underline-offset:.18em; }
a:hover{ text-decoration:underline; }
.muted{ color:var(--muted); }

/* Okuma alanı */
.reading-wrap{
  max-width:var(--mw);
  margin:0 auto;
  padding:2rem 1.2rem;
  font-size:var(--fs);
  line-height:var(--lh);
}
.reading-wrap p{ margin:1rem 0; }
.reading-wrap p + p{ text-indent:var(--indent); }

/* Başlık / paragraf */
h1,h2,h3,h4{ color:var(--text); line-height:1.2; margin:1.2rem 0 .6rem; }
.lede{ font-size:1.125rem; opacity:.92; }

/* Dropcap (bölüm başı) */
.dropcap::first-letter{
  float:left; font-size:3.2em; line-height:.9; padding:.06em .12em 0 0;
  font-weight:700; color:var(--accent);
}

/* Alıntı, kod, hr */
blockquote{
  margin:1.2rem 0; padding:.6rem 1rem;
  border-left:3px solid var(--quote);
  background:var(--surface); color:var(--text);
}
hr{ border:0; height:1px; background:var(--border); margin:2rem 0; }
code,pre{ background:var(--code-bg); color:var(--text); }
pre{ padding:.8rem 1rem; border-radius:.6rem; overflow:auto; }

/* Görseller */
.figure{ display:block; margin:1.2rem auto; text-align:center; }
.figure img{ max-width:100%; height:auto; border-radius:8px; }
.figure figcaption{ color:var(--muted); font-size:.9rem; margin-top:.4rem; }

/* Odak */
:focus-visible{ outline:2px solid color-mix(in srgb, var(--accent), white 35%); outline-offset:2px; }

/* Okuma alt navigasyon (Prev / ToC / Next) */
.reader-nav{
  position:sticky; bottom:0; inset-inline:0;
  display:grid; grid-template-columns:1fr auto 1fr; gap:.5rem;
  background:rgba(11,15,20,.88);
  backdrop-filter:blur(8px);
  border-top:1px solid var(--border);
  padding:.6rem .8rem;
}
.reader-nav a{
  display:inline-flex; align-items:center; justify-content:center;
  padding:.5rem .8rem; border:1px solid var(--border);
  background:var(--surface); border-radius:.6rem; color:var(--text);
}
.reader-nav a:hover{ background:var(--surface-2); }

/* ✅ Okuma Ayarları barı (eski tema barının yerine) */
.reader-controls{
  position:sticky; top:0; z-index:20;
  display:flex; flex-wrap:wrap; gap:.5rem;
  background:rgba(11,15,20,.86); backdrop-filter:blur(8px);
  border-bottom:1px solid var(--border);
  padding:.5rem .75rem;
}
.reader-controls .ctl{
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.45rem .6rem; border:1px solid var(--border);
  background:var(--surface); color:var(--text);
  border-radius:.6rem; font-size:.95rem;
}
.reader-controls .ctl:hover{ background:var(--surface-2); }
.reader-controls .sep{ width:1px; height:32px; background:var(--border); margin:0 .25rem; }

.reader-controls .pill{
  border-radius:9999px; padding:.35rem .6rem; border:1px solid var(--border);
}
.reader-controls .is-active{ outline:2px solid color-mix(in srgb, var(--accent), white 35%); outline-offset:2px; }

/* Disleksi dostu mod */
body.dyslexia{
  font-family: "Atkinson Hyperlegible", ui-serif, Georgia, "Times New Roman", serif;
}
