/* Sınava Çalışma. Yerleşim: tek sütun, telefon öncelikli; soru ekranında altta sabit "Sonraki" butonu. Seçenekler optik form harf daireleriyle. */
:root {
  --bg: #eff2ee;
  --yuzey: #ffffff;
  --yuzey-2: #e5eae4;
  --murekkep: #16201b;
  --soluk: #56635c;
  --cizgi: #d4dcd5;
  --vurgu: #1d5a49;
  --vurgu-yazi: #ffffff;
  --dogru: #1c7a45;
  --dogru-zemin: #e3f3e8;
  --yanlis: #b23a2e;
  --yanlis-zemin: #fbe8e5;
  --dikkat: #8a5c00;
  --dikkat-zemin: #fff2d1;
  --renk-1: #a3332c;
  --renk-2: #255f8c;
  --renk-3: #6a4c9c;
  --renk-4: #0e7471;
  --renk-5: #9a5a12;
  --renk-6: #4d6a1c;
  --golge: 0 1px 2px rgba(22, 32, 27, .06), 0 4px 14px rgba(22, 32, 27, .06);
  --font-baslik: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --font-govde: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111613; --yuzey: #1a211d; --yuzey-2: #222b26; --murekkep: #e7ece8; --soluk: #9aa8a0; --cizgi: #2f3a34;
    --vurgu: #6cc4a5; --vurgu-yazi: #0d1a15;
    --dogru: #5fcf8c; --dogru-zemin: #173324; --yanlis: #f08a7e; --yanlis-zemin: #3a1d1a; --dikkat: #f0c25e; --dikkat-zemin: #33290f;
    --renk-1: #e5867e; --renk-2: #7fb5e0; --renk-3: #b9a1e6; --renk-4: #62c9c4; --renk-5: #e8ad63; --renk-6: #a9cf6a;
    --golge: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111613; --yuzey: #1a211d; --yuzey-2: #222b26; --murekkep: #e7ece8; --soluk: #9aa8a0; --cizgi: #2f3a34;
  --vurgu: #6cc4a5; --vurgu-yazi: #0d1a15;
  --dogru: #5fcf8c; --dogru-zemin: #173324; --yanlis: #f08a7e; --yanlis-zemin: #3a1d1a; --dikkat: #f0c25e; --dikkat-zemin: #33290f;
  --renk-1: #e5867e; --renk-2: #7fb5e0; --renk-3: #b9a1e6; --renk-4: #62c9c4; --renk-5: #e8ad63; --renk-6: #a9cf6a;
  --golge: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--murekkep);
  font-family: var(--font-govde);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid var(--vurgu); outline-offset: 2px; }
p, h1, h2, ol { margin: 0; }

.app {
  max-width: 640px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 20px 40px;
}
.ekran { display: flex; flex-direction: column; gap: 18px; }

/* Ana sayfa */
.ana-bas { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.ust-etiket { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--soluk); }
.ana-baslik { font-family: var(--font-baslik); font-weight: 800; font-size: clamp(32px, 9vw, 44px); line-height: 1.02; letter-spacing: -.02em; text-wrap: balance; }
.geri-sayim { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.gun-sayi { font-family: var(--font-baslik); font-weight: 800; font-size: 48px; line-height: 1; color: var(--vurgu); font-variant-numeric: tabular-nums; }
.gun-yazi { font-size: 14px; color: var(--soluk); line-height: 1.35; }
.gun-yazi strong { color: var(--murekkep); font-size: 16px; }
.bugun { font-size: 14px; color: var(--soluk); }

.devam-kart {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  border: 0; border-radius: var(--r); padding: 16px 18px;
  background: var(--vurgu); color: var(--vurgu-yazi);
}
.devam-ust { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.devam-baslik { font-family: var(--font-baslik); font-weight: 700; font-size: 20px; line-height: 1.2; }
.devam-alt { font-size: 14px; opacity: .9; }

.bolum-baslik { font-family: var(--font-baslik); font-weight: 700; font-size: 20px; margin-top: 6px; }
.ders-listesi { display: flex; flex-direction: column; gap: 10px; }
.ders-kart {
  display: grid; grid-template-columns: 6px 1fr auto; gap: 0 14px; align-items: center;
  text-align: left; border: 1px solid var(--cizgi); border-radius: var(--r);
  background: var(--yuzey); padding: 14px 16px 14px 0; box-shadow: var(--golge); overflow: hidden;
}
.ders-serit { align-self: stretch; margin-block: -14px; background: var(--ders-renk); }
.ders-bilgi { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ders-ad { font-weight: 700; font-size: 17px; line-height: 1.25; }
.ders-sayi { font-size: 13px; color: var(--soluk); font-variant-numeric: tabular-nums; }
.ders-yuzde { font-family: var(--font-baslik); font-weight: 800; font-size: 26px; color: var(--ders-renk); font-variant-numeric: tabular-nums; }
.ders-yuzde small { font-size: 14px; font-weight: 600; }

.cubuk { height: 6px; border-radius: 3px; background: var(--yuzey-2); overflow: hidden; display: flex; }
.cubuk-dogru { background: var(--dogru); }
.cubuk-yanlis { background: var(--yanlis); }

.ana-alt { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--cizgi); }
.kayit-durum { font-size: 13px; color: var(--soluk); }
.metin-buton { border: 0; background: none; padding: 4px 0; font-size: 14px; color: var(--soluk); text-decoration: underline; text-underline-offset: 3px; }
.onay-kutu { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--yanlis-zemin); width: 100%; }
.onay-butonlar { display: flex; flex-wrap: wrap; gap: 8px; }

/* Butonlar */
.buton { border: 0; border-radius: 12px; padding: 13px 18px; font-weight: 700; font-size: 16px; min-height: 48px; }
.buton.birincil { background: var(--vurgu); color: var(--vurgu-yazi); }
.buton.ikincil { background: var(--yuzey-2); color: var(--murekkep); }
.buton.tehlike { background: var(--yanlis); color: var(--yuzey); }
.buton.genis { width: 100%; }
.ikon-buton { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--yuzey-2); }
.ikon-buton svg { width: 22px; height: 22px; }

/* Ders sayfası */
.ust-cubuk { display: flex; align-items: center; gap: 12px; }
.ust-baslik { font-family: var(--font-baslik); font-weight: 800; font-size: 24px; line-height: 1.15; text-wrap: balance; min-width: 0; }
.ders-ozet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ozet-kutu { background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.ozet-sayi { font-family: var(--font-baslik); font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.ozet-ad { font-size: 12px; color: var(--soluk); line-height: 1.3; }
.ozet-kutu.dogru .ozet-sayi { color: var(--dogru); }
.ozet-kutu.yanlis .ozet-sayi { color: var(--yanlis); }

.hizli-modlar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mod-buton { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 1px solid var(--cizgi); border-radius: var(--r); background: var(--yuzey); padding: 14px; box-shadow: var(--golge); }
.mod-buton:disabled { opacity: .5; cursor: default; }
.mod-ad { font-weight: 700; line-height: 1.25; }
.mod-alt { font-size: 13px; color: var(--soluk); line-height: 1.3; }
.aciklama-kucuk { font-size: 14px; color: var(--soluk); margin-top: -8px; }

.unite-listesi { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.unite { background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: var(--r); padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.unite-bas { display: flex; gap: 12px; align-items: baseline; }
.unite-no { font-family: var(--font-baslik); font-weight: 800; font-size: 18px; color: var(--ders-renk); font-variant-numeric: tabular-nums; min-width: 26px; }
.unite-ad { font-weight: 600; line-height: 1.3; min-width: 0; }
.unite-butonlar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.unite-buton { display: flex; flex-direction: column; gap: 6px; text-align: left; border: 1px solid var(--cizgi); border-radius: 10px; background: var(--bg); padding: 10px 12px; }
.unite-buton-ad { font-size: 14px; font-weight: 700; }
.unite-buton-sayi { font-size: 12px; color: var(--soluk); font-variant-numeric: tabular-nums; }
.tamam-isaret { color: var(--dogru); font-weight: 700; }

/* Soru ekranı */
.ekran-soru { gap: 0; min-height: calc(100vh - 60px); min-height: calc(100dvh - 60px); }
.soru-bas {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: var(--bg); padding-block: 4px 12px; display: flex; flex-direction: column; gap: 10px;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.soru-bas-satir { display: flex; align-items: center; gap: 12px; }
.soru-etiket { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--soluk); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soru-sayac { font-weight: 700; font-variant-numeric: tabular-nums; }
.ilerleme { height: 6px; border-radius: 3px; background: var(--yuzey-2); overflow: hidden; }
.ilerleme-dolu { height: 100%; width: 0; background: var(--vurgu); transition: width .25s ease; }

.soru-govde { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; flex: 1; }
.soru-kaynak { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ders-renk); }
.soru-metin { font-size: 18px; line-height: 1.5; font-weight: 500; white-space: pre-line; overflow-wrap: anywhere; }
.secenekler { display: flex; flex-direction: column; gap: 10px; }
.secenek {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left;
  border: 1.5px solid var(--cizgi); border-radius: 12px; background: var(--yuzey);
  padding: 12px 14px; min-height: 52px; line-height: 1.4; transition: border-color .15s, background-color .15s;
}
.secenek:not(:disabled):hover { border-color: var(--vurgu); }
.secenek:disabled { cursor: default; }
.harf {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--soluk); font-size: 13px; font-weight: 700; color: var(--soluk); margin-top: -1px;
}
.secenek-yazi { min-width: 0; overflow-wrap: anywhere; padding-top: 2px; }
.secenek.dogru { border-color: var(--dogru); background: var(--dogru-zemin); }
.secenek.dogru .harf { background: var(--dogru); border-color: var(--dogru); color: var(--yuzey); }
.secenek.yanlis { border-color: var(--yanlis); background: var(--yanlis-zemin); }
.secenek.yanlis .harf { background: var(--yanlis); border-color: var(--yanlis); color: var(--yuzey); }
.secenek.soluk { opacity: .55; }

.geri-bildirim { display: flex; flex-direction: column; gap: 12px; }
.sonuc-yazi { font-family: var(--font-baslik); font-weight: 800; font-size: 22px; }
.sonuc-yazi.dogru { color: var(--dogru); }
.sonuc-yazi.yanlis { color: var(--yanlis); }
.neden, .dikkat { border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.neden { background: var(--yuzey); border: 1px solid var(--cizgi); }
.dikkat { background: var(--dikkat-zemin); }
.dikkat .kutu-etiket { color: var(--dikkat); }
.kutu-etiket { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--soluk); }
.aciklama { white-space: pre-line; overflow-wrap: anywhere; }

.soru-alt {
  position: sticky; bottom: 0; z-index: 5; margin-top: 16px;
  padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, transparent, var(--bg) 30%);
}

/* Sonuç */
.sonuc-kart { background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: var(--r); padding: 22px 18px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--golge); }
.sonuc-puan { font-family: var(--font-baslik); font-weight: 800; font-size: 64px; line-height: 1; color: var(--vurgu); font-variant-numeric: tabular-nums; }
.sonuc-bolu { font-size: 28px; color: var(--soluk); }
.sonuc-mesaj { color: var(--soluk); }
.sonuc-butonlar { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.sonuc-liste { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sonuc-oge { background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.sonuc-oge-kaynak { font-size: 12px; font-weight: 700; color: var(--soluk); letter-spacing: .06em; text-transform: uppercase; }
.sonuc-oge-soru { white-space: pre-line; overflow-wrap: anywhere; }
.sonuc-oge-cevap { font-size: 14px; color: var(--dogru); font-weight: 600; overflow-wrap: anywhere; }
.sonuc-oge-senin { font-size: 14px; color: var(--yanlis); overflow-wrap: anywhere; }

@media (min-width: 560px) {
  .ders-ozet { gap: 10px; }
}
@media (max-width: 380px) {
  .hizli-modlar, .unite-butonlar { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Yükleniyor */
.durum-ekran { min-height: 60vh; align-items: center; justify-content: center; text-align: center; }
.durum-yazi { color: var(--soluk); max-width: 32ch; }

/* Ana sayfa üst satırı ve çıkış */
.ana-ust-satir { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cikis-form { margin: 0; }

/* Görseller */
.soru-gorsel { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--cizgi); background: #fff; }
.secenek-gorsel { display: block; max-width: min(100%, 260px); height: auto; border-radius: 8px; background: #fff; }

/* Claude raporu */
.rapor-kutu { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--yuzey); border: 1px solid var(--cizgi); }
.rapor-bas { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.rapor-bas > div { min-width: 0; flex: 1 1 220px; }
.rapor-baslik { font-weight: 700; }
.rapor-alt { font-size: 14px; color: var(--soluk); }
#rapor-alan { display: flex; flex-direction: column; gap: 10px; }
.rapor-metin { width: 100%; font: 13px/1.45 ui-monospace, Consolas, monospace; color: var(--murekkep); background: var(--bg); border: 1px solid var(--cizgi); border-radius: 10px; padding: 10px; resize: vertical; }
.rapor-butonlar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.rapor-bilgi { font-size: 14px; color: var(--soluk); }
.gizli-etiket { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Giriş */
.giris-sayfa { display: flex; flex-direction: column; gap: 24px; padding-block: 48px 40px; max-width: 440px; }
.giris-bas { display: flex; flex-direction: column; gap: 6px; }
.giris-alt { color: var(--soluk); }
.giris-form { display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: var(--r); background: var(--yuzey); border: 1px solid var(--cizgi); box-shadow: var(--golge); }
.alan { display: flex; flex-direction: column; gap: 6px; }
.alan label { font-weight: 600; font-size: 15px; }
.alan input { font: inherit; font-size: 16px; color: var(--murekkep); background: var(--bg); border: 1.5px solid var(--cizgi); border-radius: 10px; padding: 12px 14px; min-height: 48px; width: 100%; }
.alan input:focus { outline: none; border-color: var(--vurgu); box-shadow: 0 0 0 3px color-mix(in srgb, var(--vurgu) 25%, transparent); }
.kutucuk { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--soluk); }
.kutucuk input { width: 20px; height: 20px; accent-color: var(--vurgu); }
.form-hata { padding: 10px 12px; border-radius: 10px; background: var(--yanlis-zemin); color: var(--yanlis); font-weight: 600; }
a.buton { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; align-self: flex-start; }
