/* ==========================================================================
   Matematik Otağı — Ortaokul Matematik Portalı
   Tasarım sistemi / ortak stil dosyası
   ========================================================================== */

/* ---------- 1. Değişkenler ---------- */
:root {
  /* Marka */
  --ink:        #0f1c2e;
  --ink-2:      #33465e;
  --ink-3:      #6b7f96;
  --line:       #e3e9f0;
  --line-2:     #eef2f7;
  --bg:         #ffffff;
  --bg-soft:    #f6f8fb;
  --bg-deep:    #122b2e;

  --primary:      #1c6b6f;
  --primary-600:  #144e51;
  --primary-100:  #e3f2f1;
  --accent:       #e3b93c;
  --accent-100:   #fbf2d8;

  /* Sınıf renkleri */
  --c5:  #17a673;  --c5-soft:  #e6f6f0;
  --c6:  #e07b39;  --c6-soft:  #fbeee4;
  --c7:  #2f6fd0;  --c7-soft:  #e7effb;
  --c8:  #7d4bc9;  --c8-soft:  #f0e9fa;

  --ok:      #17a673;
  --warn:    #e07b39;
  --danger:  #d64545;

  /* Ölçüler */
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --shadow-1: 0 1px 2px rgba(15,28,46,.06), 0 2px 8px rgba(15,28,46,.05);
  --shadow-2: 0 4px 12px rgba(15,28,46,.08), 0 12px 32px rgba(15,28,46,.07);
  --wrap: 1160px;

  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 2. Temel ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }
a  { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.muted { color: var(--ink-3); }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

section { padding: 64px 0; }
section.tight { padding: 40px 0; }
section.soft { background: var(--bg-soft); }

.sec-head { margin-bottom: 32px; }
.sec-head p { max-width: 62ch; color: var(--ink-3); margin-bottom: 0; }
.sec-head.center p { margin-inline: auto; }

.old8-units { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.old8-unit { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-1); }
.old8-unit h3 { font-size: 1rem; margin-bottom: 14px; }
.old8-links { display: grid; gap: 8px; }
.old8-links a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-soft); color: var(--ink); font-weight: 600; font-size: .9rem; }
.old8-links a:hover, .old8-links a:focus-visible { background: var(--primary-100); color: var(--primary); text-decoration: none; }
.old8-links span { flex: none; color: var(--primary); font-size: .75rem; }
.old8-topic { padding: 10px 0; border-bottom: 1px solid var(--line); }
.old8-topic:first-child { padding-top: 0; }
.old8-topic:last-child { padding-bottom: 0; border-bottom: 0; }
.old8-topic b { display: block; font-size: .88rem; margin-bottom: 7px; }
.old8-topic-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.old8-topic-actions a { flex: 1 1 132px; padding: 7px 9px; font-size: .78rem; }
@media (max-width: 900px) { .old8-units { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .old8-units { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-100);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 12px;
}

/* ---------- 3. Üst menü ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 20px; min-height: 68px; padding-block: 10px; flex-wrap: wrap; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { height: 42px; width: auto; flex: none; object-fit: contain; }
.brand small { display: block; font-size: .7rem; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; }

.nav-links { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 2px 4px; margin-inline-start: auto; }
.nav-links a {
  padding: 8px 12px; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav-links a.active { background: var(--primary-100); color: var(--primary); }

.nav-toggle {
  display: none; margin-inline-start: auto;
  background: none; border: 1px solid var(--line); border-radius: var(--r-sm);
  width: 42px; height: 40px; cursor: pointer; font-size: 1.2rem; color: var(--ink);
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { gap: 14px; }
  .nav-links {
    position: absolute; inset: 68px 0 auto; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 12px 24px 20px; gap: 2px;
    box-shadow: var(--shadow-2); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
}

/* ---------- 4. Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--primary-600); box-shadow: var(--shadow-2); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-accent { background: var(--accent); color: #40300a; }
.btn-sm { padding: 8px 16px; font-size: .87rem; }
.btn-block { width: 100%; }

/* ---------- 5. Kart & ızgara ---------- */
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g-3, .g-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-1);
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: transparent; text-decoration: none; }

.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.35rem; margin-bottom: 16px; background: var(--primary-100);
}

/* Sınıf kartı */
.class-card { position: relative; overflow: hidden; display: block; color: inherit; }
.class-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--tone, var(--primary)); z-index: 2;
}
.class-card::after {
  content: attr(data-no);
  position: absolute; right: -14px; bottom: -42px;
  font-size: 9rem; font-weight: 800; line-height: 1; letter-spacing: -.05em;
  color: var(--tone); opacity: .08;
  pointer-events: none; z-index: 0;
}
.class-card .cc-body { position: relative; z-index: 1; }
.class-card .num-circle {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tone-soft); border: 2px solid var(--tone);
}
.class-card .num {
  font-size: 1.7rem; font-weight: 800; line-height: 1; color: var(--tone);
  letter-spacing: -.04em;
}
.class-card .focus {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--tone-soft); color: var(--tone); margin-top: 12px;
}
.class-card ul { margin: 14px 0 0; padding-inline-start: 18px; color: var(--ink-3); font-size: .9rem; }
.class-card li { margin-bottom: 2px; }

/* ---------- 6. Hero ---------- */
.hero {
  background:
    radial-gradient(900px 420px at 88% -12%, rgba(227,185,60,.16), transparent 60%),
    radial-gradient(760px 400px at 4% 0%, rgba(28,107,111,.14), transparent 62%),
    var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 76px;
}
.hero h1 { margin-bottom: .35em; }
.hero .lead { font-size: 1.1rem; color: var(--ink-2); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.hero-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--shadow-2);
}
.hero-panel h3 { font-size: 1rem; margin-bottom: 14px; }

@media (max-width: 560px) {
  .brand small { display: none; }
}

/* Fotoğraflı hero (ana sayfa) */
.hero.hero-photo {
  background: #fff;
  padding: 92px 0 84px;
  text-align: center;
}
.hero-center { display: flex; flex-direction: column; align-items: center; }
.hero-brand {
  font-size: clamp(2.6rem, 1.5rem + 5.2vw, 5.2rem);
  font-weight: 800; letter-spacing: -.03em; color: var(--ink); margin-bottom: .12em;
}
.hero-tagline {
  font-style: italic; font-weight: 600; color: var(--primary);
  font-size: 1.15rem; margin-bottom: 18px; max-width: 680px;
}
.hero-audience-actions { display:flex; justify-content:center; gap:10px; flex-wrap:wrap; margin-top:24px; }
.grade-row { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 30px; width: 100%; max-width: 760px; }
.grade-btn {
  position: relative; flex: 1 1 150px; max-width: 190px;
  background: var(--tone); color: #fff; font-weight: 800; font-size: 1.05rem;
  padding: 32px 18px; border-radius: var(--r-lg); box-shadow: var(--shadow-2);
  transition: transform .15s ease, box-shadow .2s ease;
}
.grade-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(15,28,46,.2); text-decoration: none; color: #fff; }
.grade-btn .symbol { position: absolute; top: 12px; right: 14px; font-size: 1rem; font-weight: 700; opacity: .8; }
.hero-stats { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.hstat {
  background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 22px; min-width: 128px; box-shadow: var(--shadow-1);
}
.hstat-icon { display: block; font-size: 1.3rem; margin-bottom: 6px; }
.hstat b { display: block; font-size: 1.3rem; letter-spacing: -.02em; }
.hstat-label { font-size: .8rem; color: var(--ink-3); }
.hero-ai-link { margin-top: 24px; }

.stat-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 18px; box-shadow: var(--shadow-1);
}
.stat b { display: block; font-size: 1.3rem; letter-spacing: -.02em; }
.stat span { font-size: .8rem; color: var(--ink-3); }

/* ---------- 7. Sınıf sayfası ---------- */
.page-head { position: relative; overflow: hidden; padding: 48px 0 40px; border-bottom: 1px solid var(--line); background: var(--tone-soft, var(--bg-soft)); }
.page-head::after {
  content: attr(data-no);
  position: absolute; right: 2%; top: 50%; transform: translateY(-50%);
  font-size: 14rem; font-weight: 800; line-height: 1; letter-spacing: -.05em;
  color: var(--tone); opacity: .08;
  pointer-events: none; z-index: 0;
}
.page-head .wrap { position: relative; z-index: 1; }
.page-head .badge-lg {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 16px 6px 6px; font-weight: 700; font-size: .9rem; box-shadow: var(--shadow-1);
}
.page-head .badge-lg i {
  width: 30px; height: 30px; border-radius: 50%; background: var(--tone); color: #fff;
  display: grid; place-items: center; font-style: normal; font-size: .9rem;
}

.crumb { font-size: .86rem; color: var(--ink-3); margin-bottom: 14px; }
.crumb a { color: var(--ink-3); }

/* Araç çubuğu */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-bottom: 26px;
}
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px;
  box-shadow: var(--shadow-1);
}
.search input { border: 0; outline: 0; font: inherit; flex: 1; background: none; color: var(--ink); }

.konu-filtre-rozet {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: var(--primary-100); color: var(--primary-600); border-radius: var(--r);
  padding: 14px 20px; margin: 22px 0 -6px; font-weight: 600; font-size: .95rem;
}
.konu-filtre-rozet a { color: var(--primary); font-weight: 700; margin-inline-start: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 8px 16px; border-radius: 999px; font: inherit; font-size: .87rem; font-weight: 600; cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--ink-3); }
.chip.on { background: var(--tone, var(--primary)); border-color: transparent; color: #fff; }

/* Tema akordiyonu */
.theme {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow-1);
}
.theme-head {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 20px 24px; background: none; border: 0; font: inherit; text-align: start; cursor: pointer;
}
.theme-head:hover { background: var(--bg-soft); }
.theme-head, .topic { color: inherit; }
.theme-head:hover, .topic:hover { text-decoration: none; }
.theme-no {
  width: 38px; height: 38px; flex: none; border-radius: 50%;
  background: var(--tone-soft); color: var(--tone); display: grid; place-items: center; font-weight: 800;
}
.theme-title { flex: 1; }
.theme-title b { display: block; font-size: 1.02rem; letter-spacing: -.01em; }
.theme-title span { font-size: .84rem; color: var(--ink-3); }
.theme-arrow { transition: transform .2s ease; color: var(--ink-3); }
.theme.open .theme-arrow { transform: rotate(180deg); }
.theme-body { display: none; border-top: 1px solid var(--line-2); padding: 6px 0; }
.theme.open .theme-body { display: block; }

/* Konu satırı */
.topic {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 14px 24px; border-bottom: 1px solid var(--line-2);
}
.topic:last-child { border-bottom: 0; }
.topic:hover { background: var(--bg-soft); }
.topic-name { flex: 1 1 240px; font-weight: 600; font-size: .96rem; }
.topic-name small { display: block; font-weight: 500; color: var(--ink-3); font-size: .8rem; }

.res-links { display: flex; flex-wrap: wrap; gap: 6px; }
.res {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer;
  font-family: inherit; transition: all .15s ease;
}
.res:hover { border-color: var(--tone); color: var(--tone); background: var(--tone-soft); text-decoration: none; }
.res.res-start { border-color: var(--tone); background: var(--tone); color: #fff; box-shadow: 0 5px 12px color-mix(in srgb, var(--tone) 25%, transparent); }
.res.res-start:hover { border-color: var(--tone); background: var(--tone); color: #fff; filter: brightness(.94); }
.res.soon { opacity: .5; cursor: default; }
.res.soon:hover { border-color: var(--line); color: var(--ink-2); background: #fff; }

/* ---------- Konu anlatımı görüntüleyici ---------- */
.ders-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 16px; margin-bottom: 22px; box-shadow: var(--shadow-1);
  position: sticky; top: 68px; z-index: 20;
}
.ders-gez { display: flex; gap: 8px; flex-wrap: wrap; }

.ders-sayfalar { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.ders-sayfa {
  margin: 0; width: 100%; max-width: 900px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow-2);
}
.ders-sayfa img { width: 100%; height: auto; display: block; }
.ders-sayfa figcaption {
  text-align: center; font-size: .78rem; color: var(--ink-3);
  padding: 8px; border-top: 1px solid var(--line-2); background: var(--bg-soft);
}
.ders-alt { margin-top: 32px; }

.ders-pdf-bar {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin-bottom: 12px;
}
.ders-pdf-frame {
  width: 100%; height: 85vh; min-height: 520px; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-2); background: var(--bg-soft);
}

/* Ders kartı */
.ders-kart { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.dk-kapak { height: 190px; overflow: hidden; background: var(--bg-soft); border-bottom: 1px solid var(--line-2); }
.dk-kapak img { width: 100%; object-fit: cover; object-position: top center; }
.dk-govde { padding: 18px 22px 22px; }
.dk-govde h3 { font-size: 1.05rem; margin: 10px 0 .35em; }
.dk-govde p { font-size: .88rem; }

@media print {
  .ders-bar, .ders-alt, .page-head, .crumb, .ders-pdf-bar { display: none !important; }
  .ders-sayfa { border: 0; box-shadow: none; page-break-after: always; max-width: 100%; }
  .ders-sayfa figcaption { display: none; }
  .ders-sayfalar { gap: 0; }
}

/* Yüklenmiş içerik rozeti */
.res.var {
  border-color: transparent; background: var(--tone, var(--primary)); color: #fff; font-weight: 700;
}
.res.var:hover { filter: brightness(1.1); color: #fff; }
.res.var b { background: rgba(255,255,255,.25); border-radius: 999px; padding: 0 6px; margin-inline-start: 2px; }

.anlatim-satir { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.anlatim-rozet {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; color: var(--ink-2);
  background: #fff; border: 1px solid var(--tone, var(--primary)); border-radius: 999px;
  padding: 6px 14px; transition: all .15s ease;
}
.anlatim-rozet:hover { background: var(--tone, var(--primary)); color: #fff; text-decoration: none; }
.anlatim-rozet b { font-weight: 500; opacity: .7; font-size: .76rem; }

/* ---------- İnteraktif anlatım (video + soru-cevap) ---------- */
.ivid-wrap { position: relative; background: #000; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-2); }
.ivid-wrap video { width: 100%; max-height: 72vh; display: block; background: #000; }

/* Video bittiğinde açılan, videonun ORTASINDA duran diyalog kutusu —
   alta değil ortaya konumlandırılıyor ki native video kontrol çubuğuyla
   çakışmasın. */
.ivid-backdrop { position: absolute; inset: 0; background: rgba(15,28,46,.55); z-index: 4; }
.ivid-dialog {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(90%, 460px); z-index: 5;
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-2);
  padding: 22px 24px;
}
.ivid-dialog-metin { font-size: 1.05rem; font-weight: 700; margin-bottom: 16px; color: var(--ink); }
.ivid-cevap-row { margin-bottom: 14px; }
.ivid-cevap-row input {
  width: 100%; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--ink); padding: 10px 18px; font: inherit; outline: 0;
}
.ivid-cevap-row input:focus { border-color: var(--primary); background: #fff; }
.ivid-dialog-alt { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.ivid-geri-bildirim { flex: 1; margin: 0; font-weight: 700; min-height: 1.2em; font-size: .92rem; }
.ivid-geri-bildirim.dogru { color: var(--ok); }
.ivid-geri-bildirim.yanlis { color: var(--danger); }

/* ---------- Ders kitabı eşleşmesi ---------- */
.res.kitapta {
  border-color: var(--tone, var(--primary));
  color: var(--tone, var(--primary));
  background: var(--tone-soft, var(--primary-100));
  opacity: 1; cursor: help;
}

.kitap-satir {
  flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 6px;
  margin: 4px 0 2px; padding-inline-start: 2px;
}
.kitap-parca {
  display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  font-size: .79rem; color: var(--ink-3);
  background: var(--bg-soft); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: 5px 10px;
}
.kitap-parca b { color: var(--tone, var(--primary)); font-weight: 700; }
.kitap-parca i {
  flex-basis: 100%; font-style: normal; color: var(--ink-3);
  font-size: .75rem; opacity: .85; margin-top: 2px;
}

.tema-kitap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px 24px; background: var(--tone-soft, var(--bg-soft));
  border-bottom: 1px solid var(--line-2); font-size: .8rem;
}
.tk-ad { font-weight: 700; color: var(--tone, var(--primary)); }
.tk-parca {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; color: var(--ink-2);
}
.tk-parca b { color: var(--tone, var(--primary)); }

/* Öğrenme çıktıları kutusu */
.cikti-box { margin: 8px 24px 18px; border-top: 1px dashed var(--line); padding-top: 12px; }
.cikti-box summary {
  cursor: pointer; font-size: .86rem; font-weight: 700; color: var(--tone, var(--primary));
  list-style: none; padding: 4px 0;
}
.cikti-box summary::-webkit-details-marker { display: none; }
.cikti-box summary::before { content: "▸ "; }
.cikti-box[open] summary::before { content: "▾ "; }
.cikti-box ul { margin: 10px 0 0; padding-inline-start: 20px; font-size: .87rem; color: var(--ink-2); }
.cikti-box li { margin-bottom: 6px; }
.cikti-box li b { color: var(--ink-3); font-weight: 700; font-size: .8rem; margin-inline-end: 4px; }

/* ---------- 8. Rozetler ---------- */
.badge {
  display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-3); border: 1px solid var(--line);
}
.badge.lgs   { background: var(--c8-soft); color: var(--c8); border-color: transparent; }
.badge.oyun  { background: var(--c5-soft); color: var(--c5); border-color: transparent; }
.badge.yeni  { background: var(--accent-100); color: #8a5c00; border-color: transparent; }

/* ---------- 9. Yapay zeka bölümü ---------- */
.ai-band {
  background:
    radial-gradient(700px 340px at 84% 8%, rgba(227,185,60,.18), transparent 60%),
    linear-gradient(160deg, #163f42, var(--bg-deep));
  color: #e9eff6;
}
.ai-band h2 { color: #fff; }
.ai-band p { color: #b3c3d4; }
.ai-band .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #e9eff6; box-shadow: none; }
.ai-band .card h3 { color: #fff; }
.ai-band .card-icon { background: rgba(255,255,255,.1); }

.ai-box {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--shadow-1);
}
.ai-box textarea, .ai-box select, .ai-box input[type="text"], .ai-box input[type="number"] {
  width: 100%; font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: #fff;
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.ai-box textarea:focus, .ai-box select:focus, .ai-box input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100);
}
.ai-box textarea { min-height: 108px; resize: vertical; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .86rem; font-weight: 700; margin-bottom: 6px; color: var(--ink-2); }
.field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 700px) { .field-row { grid-template-columns: 1fr; } }

.ai-output {
  margin-top: 20px; border: 1px dashed var(--line); border-radius: var(--r);
  padding: 20px; background: var(--bg-soft); font-size: .94rem;
}
.ai-output:empty { display: none; }
.ai-output h4 { margin: 0 0 10px; font-size: .95rem; }
.ai-output table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ai-output th, .ai-output td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ai-output th { color: var(--ink-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }

.demo-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--accent-100); border: 1px solid #f3dfae; border-radius: var(--r);
  padding: 12px 16px; font-size: .86rem; color: #6b4c05; margin-top: 16px;
}

/* Sekmeler */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 26px; flex-wrap: wrap; }
.tab {
  border: 0; background: none; font: inherit; font-weight: 700; font-size: .94rem; color: var(--ink-3);
  padding: 12px 18px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.on { display: block; }

/* ---------- 10. LGS geri sayım ---------- */
.countdown { display: flex; gap: 10px; }
.cd-cell {
  flex: 1; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 6px; text-align: center;
}
.cd-cell b { display: block; font-size: 1.5rem; letter-spacing: -.02em; }
.cd-cell span { font-size: .74rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- 11. Oyun kartı ---------- */
.game-card { text-align: center; }
.game-card .emoji { font-size: 2.2rem; margin-bottom: 10px; }
.game-card .meta { font-size: .8rem; color: var(--ink-3); margin-top: 8px; }

/* ---------- 12. Alt bilgi ---------- */
.site-footer {
  background: var(--bg-deep); color: #a9bacb; padding: 54px 0 28px; margin-top: 0;
}
.site-footer h4 { color: #fff; font-size: .92rem; margin-bottom: 12px; }
.site-footer a { color: #a9bacb; font-size: .9rem; display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 36px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; } }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 20px;
  font-size: .82rem; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}

/* ---------- 13. LGS soru arşivi ---------- */
.soru-kart {
  margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-1); display: flex; flex-direction: column;
}
.soru-ust { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 16px 10px; }
.soru-kart img {
  width: 100%; height: auto; cursor: zoom-in; background: #fff;
  border-block: 1px solid var(--line-2); padding: 8px 12px;
}
.soru-kart figcaption { padding: 14px 16px 16px; font-size: .86rem; }
.soru-kart figcaption b { display: block; }
.soru-kart figcaption > span { display: block; color: var(--ink-3); font-size: .8rem; margin-bottom: 10px; }
.soru-kart figcaption i { color: var(--warn); font-style: normal; }
.cevap { font-size: .9rem; margin-inline-start: 10px; }
.cevap b { color: var(--ok); font-size: 1.05rem; }

.badge.z-kolay { background: var(--c5-soft); color: var(--c5); border-color: transparent; }
.badge.z-orta  { background: var(--c6-soft); color: var(--c6); border-color: transparent; }
.badge.z-zor   { background: #fbe6e6;        color: var(--danger); border-color: transparent; }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(15,28,46,.86);
  display: grid; place-items: center; padding: 24px; cursor: zoom-out;
}
.lightbox img { max-width: 96vw; max-height: 92vh; background: #fff; border-radius: 10px; padding: 12px; }
.lightbox .kapat {
  position: absolute; top: 18px; inset-inline-end: 22px; width: 44px; height: 44px;
  border-radius: 50%; border: 0; background: #fff; font-size: 1.6rem; cursor: pointer; line-height: 1;
}

/* Konu dağılım grafiği */
.bar-satir { display: grid; grid-template-columns: minmax(140px, 2fr) 5fr 40px; gap: 12px; align-items: center; margin-bottom: 8px; }
.bar-ad { font-size: .84rem; color: var(--ink-2); }
.bar-yol { background: var(--line-2); border-radius: 999px; height: 10px; overflow: hidden; }
.bar { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #4fc3bd); border-radius: 999px; }
.bar-sayi { font-size: .82rem; font-weight: 700; color: var(--ink-3); text-align: end; }

/* ---------- 14. Deneme sınavı ---------- */
.sinav-bar {
  position: sticky; top: 68px; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 18px; margin-bottom: 20px; box-shadow: var(--shadow-1);
}
.sure-kutu { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.sure-kutu b { color: var(--primary); }

.sinav-soru {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  margin-bottom: 18px; overflow: hidden; box-shadow: var(--shadow-1);
}
.sinav-soru img { width: 100%; height: auto; padding: 6px 16px; cursor: zoom-in; }
.secenekler { display: flex; gap: 10px; padding: 14px 18px 20px; flex-wrap: wrap; }
.secenek {
  width: 52px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; font: inherit; font-weight: 700; cursor: pointer; transition: all .15s ease;
}
.secenek:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.secenek.secili { background: var(--primary); border-color: transparent; color: #fff; }
.secenek.dogru  { background: var(--ok); border-color: transparent; color: #fff; }
.secenek.yanlis { background: var(--danger); border-color: transparent; color: #fff; }
.secenek:disabled { cursor: default; }

.sonuc-kart { border-top: 5px solid var(--primary); margin-bottom: 24px; }
.sonuc-tablo { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 18px; }
.sonuc-tablo th, .sonuc-tablo td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.sonuc-tablo th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.sonuc-tablo td:not(:first-child) { text-align: center; width: 60px; }

/* ---------- 15. Yardımcılar ---------- */
.flex { display: flex; }
.between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---------- 16. Ders içeriği (konu anlatımı metni) ---------- */
.ders-govde { max-width: 780px; margin: 0 auto; }
.ders-govde h2 {
  font-size: 1.3rem; margin: 40px 0 14px; padding-top: 20px; border-top: 1px solid var(--line);
  color: var(--tone, var(--primary));
}
.ders-govde h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.ders-govde h3 { font-size: 1.05rem; margin: 22px 0 10px; }
.ders-govde p { color: var(--ink-2); }
.ders-govde figure { margin: 16px 0; text-align: center; }
.ders-govde figcaption { font-size: .82rem; color: var(--ink-3); margin-top: 6px; }

.etkinlik-basligi {
  display: flex; align-items: center; gap: 12px; margin: 30px 0 14px;
}
.etkinlik-no {
  flex: none; background: var(--tone, var(--primary)); color: #fff; font-weight: 800;
  font-size: .8rem; padding: 5px 12px; border-radius: 8px;
}
.etkinlik-basligi h2 { margin: 0; padding: 0; border: 0; }

.mad-baslik {
  font-weight: 800; font-size: 1.02rem; margin: 24px 0 10px; color: var(--ink);
}

.ornek-kutu {
  background: var(--bg-soft); border-inline-start: 4px solid var(--tone, var(--primary));
  border-radius: var(--r-sm); padding: 12px 16px; margin: 14px 0; font-size: .92rem; color: var(--ink-2);
}
.ornek-kutu b { color: var(--ink); }

.sembol-kutu {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 18px; margin: 14px 0; display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  font-size: .95rem;
}
.sembol-kutu b { font-family: Georgia, serif; font-size: 1.1rem; color: var(--tone, var(--primary)); }
.sembol-kutu .okunus { color: var(--ink-3); font-size: .86rem; }

.diyalog {
  display: flex; gap: 14px; align-items: flex-start; margin: 20px 0;
}
.diyalog .avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--tone-soft, var(--primary-100));
  display: grid; place-items: center; font-size: 1.4rem;
}
.diyalog .balon {
  background: var(--bg-soft); border-radius: var(--r); padding: 12px 16px; font-weight: 600; font-size: .94rem;
}
.diyalog.cevap .balon { background: var(--tone-soft, var(--primary-100)); }

.bilgi-kart { border-radius: var(--r); overflow: hidden; margin: 22px 0; border: 1px solid var(--line); }
.bilgi-kart .bilgi-basligi {
  background: var(--bg-deep); color: #fff; font-weight: 800; font-size: .84rem;
  letter-spacing: .03em; text-transform: uppercase; padding: 10px 18px;
}
.bilgi-kart .bilgi-govde { padding: 16px 18px; font-size: .93rem; color: var(--ink-2); background: #fdf9f0; }
.bilgi-kart.tarih .bilgi-govde { background: #fdf9f0; }
.bilgi-kart.biliyor-muydun .bilgi-govde { background: #fdf9f0; }
.bilgi-kart.deger .bilgi-basligi { background: var(--warn); }
.bilgi-kart.deger .bilgi-govde { background: #fdf1e7; }

.ipucu-kutu {
  background: var(--primary-100); border-radius: var(--r); padding: 16px 20px; margin: 22px 0;
}
.ipucu-kutu .ipucu-basligi { font-weight: 800; color: var(--primary); margin-bottom: 8px; font-size: .9rem; }
.ipucu-kutu ul { margin: 0; padding-inline-start: 20px; font-size: .9rem; color: var(--ink-2); }
.ipucu-kutu li { margin-bottom: 4px; }

.sen-de-dene { margin-top: 40px; padding-top: 24px; border-top: 2px dashed var(--line); }
.sen-de-dene > h2 { border: 0; padding: 0; margin-top: 0; }
.soru-blok { margin-bottom: 26px; }
.soru-blok .soru-tip {
  display: inline-block; font-size: .74rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--tone, var(--primary)); background: var(--tone-soft, var(--primary-100));
  padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
}
.soru-blok ol, .soru-blok ul.soru-liste { margin: 8px 0 0; padding-inline-start: 22px; }
.soru-blok li { margin-bottom: 8px; font-size: .95rem; color: var(--ink-2); }
.soru-blok table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .9rem; }
.soru-blok th, .soru-blok td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; }

@media print { .site-header, .site-footer, .toolbar { display: none; } }

/* Sadeleştirilmiş, gruplu ana menü */
.nav-group { position: relative; }
.nav-group > summary {
  list-style: none; cursor: pointer; padding: 8px 12px; border-radius: 999px;
  font-size: .9rem; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: " ▾"; font-size: .72em; }
.nav-group > summary:hover, .nav-group[open] > summary, .nav-group.active-group > summary { background: var(--primary-100); color: var(--primary); }
.nav-sub {
  position: absolute; z-index: 70; top: calc(100% + 8px); min-width: 230px; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-2);
}
.nav-sub a { display: block; border-radius: 8px; }
@media (max-width: 900px) {
  .nav-links { max-height: calc(100vh - 68px); overflow-y: auto; }
  .nav-group > summary { padding: 12px 14px; }
  .nav-sub { position: static; min-width: 0; margin: 2px 0 6px 12px; padding: 2px 0 2px 10px; border: 0; border-left: 2px solid var(--line); border-radius: 0; box-shadow: none; }
}
