/* static/styles.css */
:root {
    /* Renk — AÇIK tema (varsayılan)
       Rol ayrımı: --primary = metin/aksan (başlık, bağlantı, sayı); --band = bordo
       DOLGU yüzeyleri (nav/footer bandı, ikon çipi, rozet). Gece modunda --primary
       altına döner, --band koyu bordo kalır. Tüm bordo-tint'ler --primary-rgb'den türer. */
    --primary-rgb: 111, 29, 27;
    --primary: #6F1D1B;        /* Bordo - metin/aksan */
    --band: #6F1D1B;           /* Bordo - dolgu yüzeyi (bant/çip/rozet) */
    --primary-dark: #551614;   /* Bordo - koyu (derin dolgu / hover) */
    --primary-050: rgba(var(--primary-rgb), .06);
    --accent: #D4AF37;         /* Altın / Gold - parlak */
    --gold: #C9A227;           /* Altın - metin/okunurluk için koyu ton */
    --gold-soft: #F0E6C8;      /* Altın - yumuşak zemin */
    --bg-light: #FDFBF7;       /* Parşömen / sayfa zemini */
    --bg-paper: #ffffff;       /* Kart / yüzey */
    --ink: #2B2321;            /* Sıcak, kahve eğilimli siyah */
    --text-main: #2B2321;
    --text-muted: #6E635C;     /* Sıcak gri */
    --border: rgba(var(--primary-rgb), .14);
    --glass: rgba(253, 251, 247, .85);   /* Zaman çizelgesi (buzlu cam) zemini */
    --hero-grad: radial-gradient(130% 90% at 85% -10%, rgba(201, 162, 39, .16), transparent 55%),
                 linear-gradient(180deg, #FFFDF8, var(--bg-light));
    /* Gölge */
    --shadow-sm: 0 2px 8px rgba(43, 35, 33, .07);
    --shadow: 0 14px 34px rgba(43, 35, 33, .10);
    /* Boşluk ölçeği */
    --s1: .5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2rem; --s5: 3rem; --s6: 4.5rem;
    /* Köşe */
    --radius: 10px; --radius-lg: 18px;
    /* Tipografi */
    --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --body-font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --transition: 0.3s ease-in-out;
    --maxw: 1120px;
    color-scheme: light;
}

/* GECE (koyu) teması — bordo + altın kimliği korunur, zemin/metin terslenir.
   Varsayılan: işletim sistemini izle; header düğmesi data-theme ile ezer.
   Değerler iki blokta aynı tutulur (OS + düğme). */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-rgb: 230, 196, 87;
        --primary: #E6C457;       /* metin/aksan -> altın */
        --band: #5E1A18;          /* dolgu yüzeyi -> koyu bordo */
        --primary-dark: #1C1512;  /* derin dolgu (selbar/footer) */
        --accent: #E6C457;
        --gold: #E6C457;
        --gold-soft: #2E2519;
        --bg-light: #141210;
        --bg-paper: #221C19;
        --ink: #F1E8DF;
        --text-main: #F1E8DF;
        --text-muted: #B0A49A;
        --border: rgba(var(--primary-rgb), .20);
        --glass: rgba(20, 18, 16, .85);
        --hero-grad: radial-gradient(130% 90% at 85% -10%, rgba(230, 196, 87, .10), transparent 55%),
                     linear-gradient(180deg, #1B1613, var(--bg-light));
        --shadow-sm: 0 2px 10px rgba(0, 0, 0, .45);
        --shadow: 0 16px 40px rgba(0, 0, 0, .55);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --primary-rgb: 230, 196, 87;
    --primary: #E6C457;
    --band: #5E1A18;
    --primary-dark: #1C1512;
    --accent: #E6C457;
    --gold: #E6C457;
    --gold-soft: #2E2519;
    --bg-light: #141210;
    --bg-paper: #221C19;
    --ink: #F1E8DF;
    --text-main: #F1E8DF;
    --text-muted: #B0A49A;
    --border: rgba(var(--primary-rgb), .20);
    --glass: rgba(20, 18, 16, .85);
    --hero-grad: radial-gradient(130% 90% at 85% -10%, rgba(230, 196, 87, .10), transparent 55%),
                 linear-gradient(180deg, #1B1613, var(--bg-light));
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, .45);
    --shadow: 0 16px 40px rgba(0, 0, 0, .55);
    color-scheme: dark;
}
/* Harita popup'ındaki gömülü detay (embed) her zaman açık kalır (harita aydınlık). */
:root[data-theme="light"] { color-scheme: light; }

body {
    font-family: var(--body-font);
    margin: 0;
    padding: 0;
    font-size: 16px;
    background-color: var(--bg-light);
    color: var(--text-main);
}

h1, h2, h3, h4 {
    font-family: var(--display);
    color: var(--primary);
    margin-top: 0;
    line-height: 1.15;
    text-wrap: balance;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
p {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-main);
}

/* Erişilebilirlik: klavye odağı */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, select:focus-visible {
    outline: 3px solid rgba(201, 162, 39, .55);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Birleşik buton sistemi */
.btn {
    font: 600 .95rem/1 var(--body-font);
    border-radius: var(--radius);
    padding: .7rem 1.25rem;
    border: 1.5px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    text-decoration: none;
    transition: transform .15s, background .2s, box-shadow .2s, border-color .2s;
}
.btn-primary { background: var(--band); color: #fff; box-shadow: 0 4px 12px rgba(var(--primary-rgb), .22); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); color: #fff; }
.btn-gold { background: var(--accent); color: var(--ink); box-shadow: 0 4px 12px rgba(201, 162, 39, .3); }
.btn-gold:hover { background: var(--gold); transform: translateY(-2px); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--primary); border-color: rgba(var(--primary-rgb), .35); }
.btn-ghost:hover { border-color: var(--primary); background: var(--primary-050); color: var(--primary); }
.btn-sm { padding: .45rem .8rem; font-size: .85rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* Header & Bars */
header {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
}

.top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 1em;
    height: 35px;
    background-color: var(--bg-light);
    box-sizing: border-box;
}

/* Marka + Navigasyon barı (tek bordo şerit) */
.site-head {
    background-color: var(--band);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s2);
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: .75rem 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: #fff;
}
.brand .crest { width: 38px; height: 38px; flex: 0 0 auto; }
.brand-text strong {
    display: block;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    color: #fff;
    line-height: 1.1;
}
.brand-text small {
    display: block;
    color: var(--accent);
    font: 600 .6rem/1.2 var(--body-font);
    letter-spacing: .2em;
    text-transform: uppercase;
    margin-top: .25rem;
}

.nav-list {
    display: flex;
    gap: .25rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.nav-list a {
    color: #F5ECE5;
    text-decoration: none;
    padding: .5rem .9rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    font-size: .95rem;
    position: relative;
}

.nav-list a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
}

.nav-list a.active {
    color: #fff;
}
.nav-list a.active::after {
    content: '';
    position: absolute;
    left: .9rem;
    right: .9rem;
    bottom: .28rem;
    height: 2px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* Sections & Cards */
.whitebox, section {
    background-color: var(--bg-paper);
    padding: 2em;
    margin: 2em auto;
    max-width: 1100px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

/* İçerik kutusu: başlıklar ortalı, gövde metni sola yaslı ve okunur genişlikte.
   Kutu okuma genişliğine daraltıldı ki metin kartı dolduran dengeli bir blok olsun. */
.whitebox {
    text-align: left;
    max-width: 760px;
}
.whitebox > h2 {
    text-align: center;
}
.whitebox > h2::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
    margin: .7rem auto 0;
}
/* Kutu zaten okuma genişliğinde; metin kartı doldursun, son satırda tek kelime
   sarkmasını azaltmak için text-wrap: pretty. */
.whitebox p {
    text-wrap: pretty;
}

/* Floating Map Container styling hint */
#map {
    width: 100%;
    height: 500px; 
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 1.5em 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-paper);
}

.image-cell, .text-cell {
    padding: 15px;
    border: 1px solid var(--border);
    vertical-align: middle;
}

.image-cell img {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    max-width: 250px;
}

/* Tarihsel Olaylar — mobilde satırları tek sütun karta çevir: iki sütunlu
   tablo dar ekranda metni sağa taşırıp kırpıyordu; burada her satır resim
   üstte / metin altta tam genişlikte bir kart olur, yatay kaydırma kalkar. */
@media (max-width: 680px) {
    .table-container { overflow-x: visible; box-shadow: none; margin: 1em 0; border-radius: 0; }
    .responsive-table { display: block; background: transparent; }
    .responsive-table tbody { display: block; }
    tr.responsive-table-cell {
        display: block;
        background: var(--bg-paper);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
        overflow: hidden;
        margin-bottom: var(--s3);
    }
    tr.responsive-table-cell:last-child { margin-bottom: 0; }
    .image-cell, .text-cell { display: block; width: 100%; border: 0; box-sizing: border-box; }
    .image-cell { padding: var(--s3) var(--s3) 0; text-align: center; }
    .image-cell a { display: inline-block; }
    .image-cell img {
        max-width: 100%;
        max-height: 300px;
        width: auto;
        height: auto;
        margin: 0 auto;
        border-radius: 10px;
    }
    .text-cell { padding: var(--s3); text-align: left; }
    .text-cell h2 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 .5rem; }
    .text-cell p { margin: 0 0 .9rem; }
    .text-cell p:last-child { margin-bottom: 0; }
}

/* Marquee / Banner */
.marquee-container {
    background-color: rgba(var(--primary-rgb), 0.05);
    padding: 0.5em;
    overflow: hidden;
    width: 100%;
}
.marquee-text {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
}
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.banner {
    background-color: var(--band);
    padding: 15px;
    color: white;
    text-align: center;
    border-radius: 8px;
    transition: var(--transition);
}
.banner:hover {
    background-color: var(--primary-dark);
}

/* Utils */
.language-selector {
    display: flex;
    align-items: center;
}
.flag {
    width: 32px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.flag:hover {
    transform: scale(1.1);
}

.back-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-paper);
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}
.back-button:hover {
    transform: scale(1.1);
}
.back-button img {
    width: 35px;
    height: 35px;
    cursor: pointer;
}

/* Mobile Nav Menu */
.menu-icon {
    display: none;
    font-size: 2em;
    cursor: pointer;
    color: white;
}

@media (max-width: 768px) {
    .nav-list {
        flex-direction: column;
        display: none;
        width: 100%;
        background-color: var(--band);
        position: absolute;
        top: 100%;
        left: 0;
        /* Harita sayfasındaki kontrol barı (z-index 1400) ve harita katmanlarının
           üstünde kalması için yüksek değer. */
        z-index: 2000;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: .5rem 0;
    }
    .nav-list.show { display: flex; }
    .menu-icon { display: block; }
    .nav-list a { padding: 1em; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .nav-list a.active::after { display: none; }
    .nav-list a.active { background-color: rgba(255,255,255,0.08); }
    .whitebox, section { padding: 1.2em; margin: 1em; }
}

/* Timeline Component Modernized */
.timeline-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--glass); /* --bg-light'in yarı saydam karşılığı (temaya uyar) */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.08);
    z-index: 999;
    padding: 12px 0;
}

.timeline-scroll {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 0 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
    align-items: stretch;
}

.timeline-scroll::-webkit-scrollbar { height: 8px; }
.timeline-scroll::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 10px;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    max-width: 140px;
    flex-shrink: 0;
    background: var(--bg-paper);
    border: 2px solid transparent; /* Remove harsh border */
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

/* Üzerine gelince yalnızca hafif kalkma/gölge (kırmızı yok) */
.timeline-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
}

/* Bordo (kırmızı) vurgu YALNIZCA basılıyken (:active) ve ilgili pop-up
   açıkken (.is-active) uygulanır — sadece üzerine gelince değil. */
.timeline-item:active,
.timeline-item.is-active {
    transform: translateY(-8px);
    background: var(--band);
    box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.2);
}

.timeline-item:active .timeline-year,
.timeline-item:active .timeline-title,
.timeline-item.is-active .timeline-year,
.timeline-item.is-active .timeline-title {
    color: var(--accent);
}

.timeline-year {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 3px;
    font-family: 'Playfair Display', serif;
    transition: var(--transition);
}

.timeline-title {
    font-size: 0.75em;
    text-align: center;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

/* Harita sayfası üst çubuğu: seçili konular + Konuları değiştir */
.map-controls-bar {
    display: flex;
    justify-content: center;
    background-color: var(--bg-paper);
    padding: 8px 20px;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    position: relative;
    /* Leaflet kontrol katmanları ~1000 z-index kullanıyor; çubuk bunların üstünde kalmalı. */
    z-index: 1400;
}

/* Kaynaklar (İçerik Kaynakları) sayfası */
.sources {
    text-align: left;
}

.sources h2 {
    text-align: center;
}

.sources h3 {
    margin-block: 1.4em 0.5em;
    padding-bottom: 0.3em;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
    font-size: 1.15em;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.15);
}

.sources-intro {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.sources-list {
    list-style: none;
    padding: 0;
}

.sources-list li {
    position: relative;
    padding: 6px 0 6px 22px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95em;
    line-height: 1.5;
    border-bottom: 1px dashed rgba(var(--primary-rgb), 0.1);
}

.sources-list li:last-child {
    border-bottom: none;
}

.sources-list li::before {
    content: "\f02d"; /* Font Awesome kitap simgesi */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 7px;
    color: var(--primary);
    font-size: 0.8em;
}

.sources-list a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.sources-list a:hover {
    text-decoration: underline;
}

.sources-note {
    margin-top: 0.8em;
    font-family: 'Inter', sans-serif;
    font-size: 0.9em;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Birden fazla konu seçiliyse kronoloji kartında konu adı gösterilir */
.timeline-subject {
    margin-top: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.65em;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    border-radius: 999px;
    padding: 2px 8px;
    transition: var(--transition);
}

.timeline-item:active .timeline-subject,
.timeline-item.is-active .timeline-subject {
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent);
}

.year-input {
    width: 100%;
    background-color: var(--bg-paper);
    border: 1.5px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 8px;
    padding: 6px 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95em;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

.year-input:hover, .year-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Sonuç bulunamadığında gösterilen bilgi notu */
.map-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(var(--primary-rgb), 0.06);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9em;
    color: var(--primary);
    text-align: center;
}

/* ============================================================
   TASARIM SİSTEMİ EKLERİ (header birleştirme sonrası)
   ============================================================ */

/* Ortak sayfa sarmalayıcı */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 16px; }
.eyebrow {
    font: 600 .72rem/1 var(--body-font);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); display: inline-block; }

/* ---- Footer ---- */
.site-footer {
    background: var(--band);
    color: #F3E9E2;
    margin-top: var(--s6);
}
.footer-inner {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: var(--s5) 16px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--s4);
}
.footer-brand p { color: #E7D6CC; font-size: .92rem; max-width: 34ch; }
.footer-title { font-family: var(--display); font-size: 1.1rem; color: #fff; }
.footer-col h5 {
    font: 700 .72rem/1 var(--body-font);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 .8rem;
}
.footer-col a {
    display: block;
    color: #F3E9E2;
    text-decoration: none;
    padding: .2rem 0;
    font-size: .92rem;
    opacity: .9;
    transition: var(--transition);
}
.footer-col a:hover { color: #fff; opacity: 1; }
.footer-bar {
    border-top: 1px solid rgba(255, 255, 255, .14);
    max-width: var(--maxw);
    margin-inline: auto;
    padding: var(--s2) 16px;
    font-size: .82rem;
    color: #E7D6CC;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
}

/* ---- Ana sayfa: Hero ---- */
.hero {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    max-width: var(--maxw);
    padding: 0;
    background: var(--hero-grad);
}
.hero-inner {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: var(--s6) 16px;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: var(--s5);
    align-items: center;
}
.hero h2 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -.01em; text-align: left; }
.hero h2::after { display: none; }
.hero h2 .u { color: var(--gold); white-space: nowrap; }
.hero .lead { font-size: 1.1rem; color: var(--text-muted); margin-top: var(--s3); max-width: 46ch; }
.cta-row { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: var(--s4); }
.stat-row { display: flex; gap: var(--s4); margin-top: var(--s5); flex-wrap: wrap; }
.stat .n { font: 800 1.7rem/1 var(--display); color: var(--primary); font-variant-numeric: tabular-nums; }
.stat .l { font-size: .8rem; color: var(--text-muted); letter-spacing: .04em; }

.hero-card { background: var(--bg-paper); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--s2); }
.hero-card img { border-radius: 12px; display: block; width: 100%; }
.hero-card .cap { text-align: center; font-size: .82rem; color: var(--text-muted); margin-top: .6rem; }
.hero-card .credit { text-align: center; font-size: .7rem; color: var(--text-muted); opacity: .7; margin-top: .25rem; }

/* ---- Keşif kartları ---- */
.explore {
    box-sizing: border-box;
    max-width: var(--maxw);
    margin-inline: auto;
    padding: var(--s6) 16px;
}
.explore .head { max-width: 60ch; margin-bottom: var(--s4); }
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--s3);
}
.disc-card {
    background: var(--bg-paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--s3);
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    text-decoration: none;
    color: var(--ink);
}
.disc-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.disc-card .ic {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: var(--gold-soft);
    color: var(--primary);
}
.disc-card h4 { font-size: 1.2rem; font-family: var(--display); color: var(--primary); }
.disc-card p { color: var(--text-muted); font-size: .95rem; margin: 0; }
.disc-card .go { margin-top: auto; color: var(--primary); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: .4rem; }
.disc-card:hover .go { gap: .65rem; }

/* ---- Detay sayfası ---- */
.detail-main {
    max-width: 760px;
    margin: var(--s5) auto;
    padding: var(--s5);
    background: var(--bg-paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.detail-main h1 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    text-align: center;
}
.detail-rule { height: 3px; width: 64px; background: var(--accent); border-radius: 3px; margin: .8rem auto 1.4rem; }
.detail-body { font-size: 1.02rem; line-height: 1.75; }
.detail-body p { margin-bottom: 1rem; max-width: 68ch; }
.detail-body b { color: var(--primary); }
.detail-body h4 { font-family: var(--body-font); color: var(--ink); font-size: 1rem; margin: 1.2rem 0 .4rem; }
.detail-body ul { padding-left: 1.2rem; }
.detail-body li { margin-bottom: .4rem; }
.detail-image-container { display: flex; flex-direction: column; align-items: center; margin: 0 auto var(--s2); }
.detail-image { display: block; width: 120px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, .1); }
.detail-image-caption { font-size: .75rem; color: var(--text-muted); margin-top: 6px; font-style: italic; letter-spacing: .02em; }
.detail-summary { font-size: .95rem; color: var(--text-muted); margin-bottom: var(--s2); }
.detail-summary p { margin: 0; }

/* Harita popup'ı içindeki menüsüz detay görünümü (embed=1) */
body.embed { background: var(--bg-paper); }
body.embed .detail-main { margin: 0; padding: 14px 16px; border: 0; border-radius: 0; box-shadow: none; max-width: none; }
body.embed .detail-main h1 { font-size: 1.15rem; text-align: center; }
body.embed .detail-rule { margin: .5rem auto .8rem; width: 48px; }
body.embed .detail-summary { font-size: .85rem; }
body.embed .detail-body { font-size: .88rem; line-height: 1.55; }
body.embed .detail-body p { margin-bottom: .6rem; }
body.embed .detail-sources h2 { font-size: 1rem; }

/* Olay bazlı kaynaklar: detay metninin altında, resmî kaynak bağlantıları */
.detail-sources {
    margin-top: var(--s4);
    padding-top: var(--s3);
    border-top: 1px solid var(--border);
}
.detail-sources h2 {
    font-family: var(--body-font);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 .7rem;
}
.detail-sources ul { list-style: none; padding: 0; margin: 0; }
.detail-sources li { margin-bottom: .5rem; padding-left: 1.4rem; position: relative; font-size: .95rem; }
.detail-sources li::before {
    content: "\f0c1"; /* Font Awesome: link */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: .15rem;
    font-size: .8rem;
    color: var(--gold);
}
.detail-sources a { color: var(--primary); text-decoration: none; border-bottom: 1px solid var(--border); transition: var(--transition); }
.detail-sources a:hover { color: var(--primary); border-bottom-color: var(--primary); opacity: .82; }

@media (max-width: 820px) {
    .hero-inner { grid-template-columns: 1fr; gap: var(--s4); padding-block: var(--s5); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .footer-inner { grid-template-columns: 1fr; }
    .brand-text small { display: none; }
    .detail-main { padding: var(--s3); margin: var(--s3) 16px; }
}

/* --- Yönetici içerik giriş formu (dev-only) --- */
.admin-form { max-width: 820px; }
.admin-note { color: var(--ink); opacity: .8; font-size: .92rem; margin-bottom: var(--s3); }
.admin-note code { background: var(--gold-soft); padding: 1px 5px; border-radius: 4px; }
.admin-alert { padding: var(--s2) var(--s3); border-radius: var(--radius); margin-bottom: var(--s3); }
.admin-ok { background: #e7f5ec; border: 1px solid #9ad3b0; }
.admin-err { background: #fbeaea; border: 1px solid #e3a3a3; }
.admin-err ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.admin-wide { grid-column: 1 / -1; }
.admin-field { display: flex; flex-direction: column; gap: .35rem; }
.admin-field > span { font-weight: 600; font-size: .9rem; }
.admin-field input,
.admin-field select,
.admin-field textarea {
    font: inherit;
    padding: .55rem .65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-paper);
}
.admin-field textarea { resize: vertical; }
.admin-new-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--s3); }
.admin-map { height: 320px; border: 1px solid var(--border); border-radius: var(--radius); }
.admin-coords { display: flex; gap: var(--s2); margin-top: .5rem; }
.admin-coords input { flex: 1; font: inherit; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: var(--radius); }
@media (max-width: 640px) {
    .admin-grid { grid-template-columns: 1fr; }
    .admin-new-fields { grid-template-columns: 1fr; }
}

/* ============================================================
   KONULAR SAYFASI (/konular) — kategori → konu matrisi
   ============================================================ */
.topics { display: block; max-width: var(--maxw); margin: var(--s4) auto 120px; padding: 0 16px; }
.topics-head h2 { text-align: left; margin: .4rem 0 .3rem; }
.topics-head p { color: var(--text-muted); margin: 0; max-width: 60ch; }

.topics-filters { margin-top: var(--s3); display: grid; grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.4fr);
                  gap: var(--s2); align-items: stretch; }
.topic-search, .time-box { display: flex; align-items: center; gap: .6rem; background: var(--bg-paper);
                           border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem 1rem;
                           box-shadow: var(--shadow-sm); }
.topic-search input { border: 0; outline: 0; font: inherit; width: 100%; background: transparent; }
.topic-search i, .time-box > i { color: var(--text-muted); }
.time-box { gap: 1rem; flex-wrap: wrap; }
.time-box .tl { font-size: .82rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.time-box .tv { font-size: .85rem; color: var(--primary); font-weight: 600; white-space: nowrap; min-width: 92px; text-align: right; }
.time-box .topics-slider { display: none; flex: 1; min-width: 140px; margin: 0 8px; }
.time-box.slider-ready .topics-slider { display: block; }
.time-box.slider-ready .time-fallback { display: none; }
.time-box .time-fallback { display: inline-flex; align-items: center; gap: .35rem; }
.topics-slider.noUi-target { height: 6px; border: 0; box-shadow: none; background: var(--gold-soft); }
.topics-slider .noUi-connect { background: var(--band); }
.topics-slider.noUi-horizontal .noUi-handle { width: 18px; height: 18px; right: -9px; top: -7px; border-radius: 50%;
                              border: 2px solid var(--primary); background: var(--bg-paper); box-shadow: var(--shadow-sm); cursor: grab; }
.topics-slider .noUi-handle::before, .topics-slider .noUi-handle::after { display: none; }

.matrix-tools { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: var(--s3) 0 .5rem; font-size: .85rem; }
.matrix-tools .tools-right { display: flex; gap: 1rem; margin-left: auto; }
.clear-filters { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--primary); cursor: pointer; }
.clear-filters:hover { text-decoration: underline; }
.clear-filters[hidden] { display: none; }
.topics-empty .clear-filters { margin-left: .4rem; }
.matrix-tools button { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; font-weight: 600; padding: 0; }
.matrix-tools button:hover { text-decoration: underline; }

.matrix { background: var(--bg-paper); border: 1px solid var(--border); border-radius: var(--radius-lg);
          box-shadow: var(--shadow-sm); overflow: hidden; }
.matrix-row { border-top: 1px solid var(--border); }
.matrix-row:first-child { border-top: 0; }
.matrix-row.hidden { display: none; }
.cat { display: flex; align-items: center; gap: .9rem; padding: .9rem var(--s3); background: var(--primary-050); cursor: pointer; }
.cat:hover { background: rgba(var(--primary-rgb), .09); }
.cat-toggle { flex: 1; display: flex; align-items: center; gap: .9rem; background: none; border: 0; padding: 0;
              font: inherit; color: inherit; text-align: left; cursor: pointer; }
.cat-ic { flex: 0 0 38px; height: 38px; border-radius: 10px; background: var(--band); color: var(--accent);
          display: grid; place-items: center; }
.cat-title { display: flex; flex-direction: column; }
.cat-name { font-family: var(--display); font-size: 1.12rem; font-weight: 700; color: var(--primary); }
.cat-meta { font-size: .8rem; color: var(--text-muted); }
.sel-badge { font-family: var(--body-font); vertical-align: middle; margin-left: .4rem; font-size: .75rem; font-weight: 600;
             background: var(--band); color: var(--accent); border-radius: 999px; padding: 1px 8px; }
.sel-badge:empty { display: none; }
.cat-all { background: none; border: 0; font: inherit; font-size: .82rem; color: var(--primary); font-weight: 600;
           padding: .3rem .6rem; border-radius: 6px; cursor: pointer; }
.cat-all:hover { background: var(--bg-paper); }
.cat .chev { color: var(--primary); transition: transform .2s; width: 20px; text-align: center; }
.matrix-row.collapsed .chev { transform: rotate(-90deg); }
.matrix-row.collapsed .cards { display: none; }

.cards { padding: var(--s3); display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.tcard { position: relative; display: flex; gap: .7rem; align-items: flex-start; padding: .8rem .9rem;
         border: 1.5px solid var(--border); border-radius: 12px; background: var(--bg-paper); cursor: pointer;
         transition: border-color .15s, box-shadow .15s, transform .15s; user-select: none; }
.tcard:hover { border-color: rgba(var(--primary-rgb), .45); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tcard input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tcard:focus-within { outline: 3px solid rgba(201, 162, 39, .55); outline-offset: 2px; }
.tcard .av { flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--gold-soft); color: var(--primary);
             display: grid; place-items: center; font-family: var(--display); font-weight: 700; }
.tcard .t-name { display: block; font-weight: 600; color: var(--ink); line-height: 1.25; padding-right: 1.3rem; }
.tcard .t-meta { display: block; font-size: .8rem; color: var(--text-muted); margin-top: .2rem; }
.tcard .t-meta .k { color: var(--primary); }
.tcard .check { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%;
                border: 1.5px solid var(--border); display: grid; place-items: center; font-size: .65rem; color: transparent; }
.tcard.on, .tcard:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .10); }
.tcard.on .check, .tcard:has(input:checked) .check { background: var(--band); border-color: var(--band); color: var(--accent); }
.tcard.on .av, .tcard:has(input:checked) .av { background: var(--band); color: var(--accent); }
.tcard.hidden { display: none; }

.topics-empty { margin-top: var(--s2); padding: var(--s3); text-align: center; color: var(--text-muted);
                background: var(--bg-paper); border: 1px dashed var(--border); border-radius: var(--radius-lg); }

/* Alt seçim çubuğu */
.selbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--primary-dark); color: #fff; z-index: 1500;
          box-shadow: 0 -8px 24px rgba(43, 35, 33, .18); }
.selbar-inner { max-width: var(--maxw); margin: 0 auto; padding: .8rem 16px; display: flex; align-items: center;
                gap: 1rem; flex-wrap: wrap; }
.sel-label { font-size: .85rem; opacity: .85; white-space: nowrap; }
.sel-chips { display: flex; gap: .4rem; flex-wrap: wrap; flex: 1; min-width: 200px; }
.sel-chips .empty { opacity: .7; font-size: .85rem; font-style: italic; }
.sel-years { font-size: .85rem; opacity: .9; white-space: nowrap; }
.selbar-spacer { height: 72px; }
.selbar .btn-gold:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Konu etiketi (Konular alt çubuğu + harita çubuğu) */
.chip { display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; padding: .25rem .5rem .25rem .7rem;
        font-size: .85rem; background: rgba(255, 255, 255, .12); border: 1px solid rgba(212, 175, 55, .55); color: #fff; }
.chip button, .chip a { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: .8rem;
                        padding: 0 .2rem; text-decoration: none; }
.chip-out { opacity: .55; text-decoration: line-through; }

/* Harita sayfası: seçili konu etiketleri, yıl rozeti, Konuları değiştir */
.map-topics { display: flex; align-items: center; gap: .7rem; width: 100%; max-width: var(--maxw); }
.map-topics-label { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
                    color: var(--gold); white-space: nowrap; }
.map-topic-list { display: flex; align-items: center; gap: .5rem; flex: 1; min-width: 0; overflow-x: auto;
                  scrollbar-width: none; padding: 3px 2px; }
.map-topic-list::-webkit-scrollbar { display: none; }
.topic-pill { display: inline-flex; align-items: center; gap: .5rem; flex: 0 0 auto; padding: 3px 4px 3px 3px;
              background: var(--bg-paper); border: 1.5px solid rgba(var(--primary-rgb), .35); border-radius: 999px;
              box-shadow: var(--shadow-sm); }
.topic-pill .tp-av { width: 28px; height: 28px; border-radius: 50%; background: var(--band); color: var(--accent);
                     display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: .85rem; }
.topic-pill .tp-av i { font-size: .75rem; }
.topic-pill .tp-name { font-weight: 600; font-size: .88rem; color: var(--ink); white-space: nowrap; }
.topic-pill .tp-x { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem;
                    color: var(--primary); background: var(--primary-050); text-decoration: none; transition: var(--transition); }
.topic-pill .tp-x:hover { background: var(--band); color: #fff; }
.year-pill { display: inline-flex; align-items: center; gap: .4rem; flex: 0 0 auto; padding: .35rem .8rem;
             border-radius: 999px; background: var(--gold-soft); color: var(--primary); font-weight: 600; font-size: .85rem;
             text-decoration: none; white-space: nowrap; border: 1.5px dashed rgba(201, 162, 39, .7); transition: var(--transition); }
.year-pill:hover { border-style: solid; background: var(--bg-paper); }
.topics-change-btn { display: inline-flex; align-items: center; gap: .5rem; flex: 0 0 auto; padding: .55rem 1.1rem;
                     border-radius: 999px; background: var(--band); color: #fff; font-weight: 600; font-size: .88rem;
                     text-decoration: none; white-space: nowrap; box-shadow: 0 4px 12px rgba(var(--primary-rgb), .25);
                     transition: var(--transition); }
.topics-change-btn i { color: var(--accent); }
.topics-change-btn:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.map-cta { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; padding: 4px 0;
           color: var(--ink); font-size: .95rem; }
.map-cta i { color: var(--primary); margin-right: .3rem; }

/* Ana sayfa: tüm konular bağlantısı */
.explore-all { display: inline-block; margin-top: .4rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.explore-all:hover { text-decoration: underline; }

@media (max-width: 720px) {
    .topics-filters { grid-template-columns: 1fr; }
    .cat { padding: .8rem 16px; }
    .cat-all { display: none; }

    /* Harita üst çubuğu tek satır: etiketler yana kayar, buton yalnız ikon */
    .map-controls-bar { padding: 6px 12px; }
    .map-topics { gap: .5rem; }
    .map-topics-label { display: none; }
    .topics-change-btn { width: 38px; height: 38px; padding: 0; justify-content: center; }
    .topics-change-btn .tcb-text { display: none; }

    /* Zaman çizelgesi (alt banner) mobilde daha alçak */
    .timeline-container { padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
    .timeline-scroll { gap: 8px; padding: 0 12px; }
    .timeline-scroll::-webkit-scrollbar { height: 3px; }
    .timeline-item { min-width: 84px; max-width: 108px; padding: 5px 8px; border-radius: 8px;
                     box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
    .timeline-item:hover { transform: none; }
    .timeline-year { font-size: .9em; margin-bottom: 1px; }
    .timeline-title { font-size: .64em; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2;
                      -webkit-box-orient: vertical; overflow: hidden; }
    .timeline-subject { margin-top: 2px; font-size: .58em; padding: 1px 6px; }

    /* Mobilde alt çubuk sabit yükseklikte: seçim arttıkça büyüyüp ekranı kaplamasın.
       Üst satır sayı + buton, alt satır yana kaydırılan etiketler. */
    .selbar-inner { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label go" "chips chips";
                    gap: .5rem .8rem; padding: .6rem 16px calc(.6rem + env(safe-area-inset-bottom)); }
    .sel-label { grid-area: label; align-self: center; }
    #topicsGo { grid-area: go; padding: .55rem 1rem; }
    .sel-chips { grid-area: chips; flex-wrap: nowrap; overflow-x: auto; min-width: 0; padding-bottom: 2px; }
    .sel-chips .chip { flex: 0 0 auto; white-space: nowrap; }
    .sel-years { display: none; }
    .selbar-spacer { height: 110px; }
}

/* İletişim sayfası */
.contact {
    max-width: 720px;
    text-align: left;
}
.contact .eyebrow { margin-bottom: .4rem; }
.contact-title {
    font-family: var(--display);
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.12;
    margin: .2rem 0 .5rem;
    text-align: left;
    text-wrap: balance;
}
.contact-title .u { color: var(--primary); }
.contact-lead {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 56ch;
    margin: 0 0 var(--s4);
}
.contact-seal {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--band);
    color: var(--accent);
    display: grid; place-items: center;
    font-size: 1.25rem;
    margin-bottom: var(--s2);
}
.contact h3 {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.35rem;
    margin: 0 0 .3rem;
}
.contact-note { color: var(--text-muted); margin: 0 0 var(--s3); }
.contact-addr-row {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    background: var(--bg-light);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: .7rem .9rem;
    margin-bottom: var(--s3);
}
.contact-addr {
    font-weight: 600; font-size: 1.08rem; color: var(--primary);
    word-break: break-all; min-width: 0;
}
.contact-copy {
    margin-left: auto;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .4rem .7rem;
    font: inherit; font-size: .82rem;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex; align-items: center; gap: .4rem;
    white-space: nowrap;
    transition: var(--transition);
}
.contact-copy:hover { border-color: var(--gold); color: var(--primary); }
.contact-copy.ok { color: #1f7a3d; border-color: #1f7a3d; }
.contact-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.contact-sec {
    margin-top: var(--s4);
    display: flex; align-items: flex-start; gap: .55rem;
    color: var(--text-muted);
    font-size: .85rem;
    max-width: 54ch;
}
.contact-sec i { color: var(--gold); margin-top: 3px; }
@media (max-width: 560px) {
    .contact-actions .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   Soru Bankası (çoktan seçmeli test)
   Mevcut renk/boşluk değişkenleri yeniden kullanılır; yalnızca
   doğru/yanlış için anlamsal yeşil/kırmızı yerelde tanımlanır.
   ============================================================ */
.qb-wrap {
    --qb-ok: #2E7D4F;
    --qb-ok-bg: rgba(46, 125, 79, .08);
    --qb-no: #C1443B;
    --qb-no-bg: rgba(193, 68, 59, .08);
    padding-block: var(--s4) var(--s5);
}
.qb-head { text-align: center; margin-bottom: var(--s3); }
.qb-head h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; margin: .5rem 0 .4rem; }
.qb-head .eyebrow { justify-content: center; }
.qb-lead { color: var(--text-muted); max-width: 54ch; margin: 0 auto; }

/* Kart (section temel kutu stilini miras alır; burada genişlik/konum ayarlanır) */
.qb-card { max-width: 820px; }
.qb-card[hidden] { display: none; }

.qb-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.qb-counter { font-weight: 700; color: var(--primary); font-size: .95rem; letter-spacing: .02em; }
.qb-score { margin-left: auto; display: inline-flex; align-items: center; gap: .8rem;
            font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.qb-score b { font-variant-numeric: tabular-nums; }
.qb-ok { color: var(--qb-ok); }
.qb-no { color: var(--qb-no); }

.qb-track { height: 7px; border-radius: 999px; background: var(--gold-soft); overflow: hidden; margin: .4rem 0 1.4rem; }
.qb-track > span { display: block; height: 100%; width: 0;
                   background: linear-gradient(90deg, var(--gold), var(--accent)); border-radius: 999px;
                   transition: width .35s ease; }

.qb-tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
          color: var(--gold); background: var(--gold-soft); border: 1px solid var(--border);
          padding: .2rem .6rem; border-radius: 999px; margin-bottom: .8rem; }
.qb-q { font-family: var(--display); font-size: clamp(1.2rem, 3vw, 1.5rem); font-weight: 700;
        color: var(--ink); margin: 0 0 1.2rem; }

.qb-options { display: grid; gap: .65rem; }
.qb-opt { display: flex; align-items: flex-start; gap: .8rem; width: 100%; text-align: left;
          background: var(--bg-paper); border: 1.5px solid var(--border); border-radius: 12px;
          padding: .85rem 1rem; cursor: pointer; font: inherit; color: var(--ink);
          transition: border-color .15s, background .15s, transform .08s; }
.qb-opt:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); }
.qb-opt:disabled { cursor: default; }
.qb-key { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
          background: var(--primary-050); color: var(--primary); font-weight: 700; font-size: .85rem; }
.qb-opt-label { padding-top: .15rem; }
.qb-mark { margin-left: auto; font-size: 1.1rem; opacity: 0; flex: none; }
.qb-opt.is-correct { border-color: var(--qb-ok); background: var(--qb-ok-bg); }
.qb-opt.is-correct .qb-key { background: var(--qb-ok); color: #fff; }
.qb-opt.is-correct .qb-mark { opacity: 1; color: var(--qb-ok); }
.qb-opt.is-wrong { border-color: var(--qb-no); background: var(--qb-no-bg); }
.qb-opt.is-wrong .qb-key { background: var(--qb-no); color: #fff; }
.qb-opt.is-wrong .qb-mark { opacity: 1; color: var(--qb-no); }
.qb-opt.is-dim { opacity: .6; }

/* hidden özniteliği, display tanımlı öğelerde (.btn, .qb-multi-hint) ezilmesin */
.qb-wrap [hidden] { display: none !important; }

/* Çok seçmeli soru: ipucu, seçili (henüz kontrol edilmemiş) ve kaçırılan doğru şık */
.qb-multi-hint { display: flex; align-items: center; gap: .5rem; margin: 0 0 .9rem;
                 font-size: .85rem; color: var(--text-muted); background: var(--gold-soft);
                 border: 1px solid var(--border); border-radius: 10px; padding: .5rem .8rem; }
.qb-multi-hint i { color: var(--gold); }
.qb-opt-multi .qb-key { border-radius: 6px; }
.qb-opt.sel { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(var(--primary-rgb), .12); }
.qb-opt.sel .qb-key { background: var(--band); color: #fff; }
.qb-opt.is-missed { border-color: var(--qb-ok); border-style: dashed; background: var(--qb-ok-bg); }
.qb-opt.is-missed .qb-key { background: var(--qb-ok); color: #fff; }
.qb-opt.is-missed .qb-mark { opacity: 1; color: var(--qb-ok); }

.qb-feedback { margin-top: 1.1rem; border-radius: 12px; padding: .9rem 1.1rem; display: none; }
.qb-feedback.show { display: block; }
.qb-fb-head { font-weight: 700; margin-bottom: .25rem; }
.qb-feedback.ok { background: var(--qb-ok-bg); border: 1px solid rgba(46, 125, 79, .3); }
.qb-feedback.ok .qb-fb-head { color: var(--qb-ok); }
.qb-feedback.no { background: var(--qb-no-bg); border: 1px solid rgba(193, 68, 59, .3); }
.qb-feedback.no .qb-fb-head { color: var(--qb-no); }
.qb-feedback p { margin: 0; font-size: .95rem; }

.qb-actions { display: flex; justify-content: flex-end; margin-top: 1.3rem; }
.qb-actions-center { justify-content: center; }

/* Sonuç görünümü */
.qb-result { text-align: center; }
.qb-result-eyebrow { display: flex; justify-content: center; }
.qb-ring { width: 160px; height: 160px; border-radius: 50%; margin: .6rem auto 1.2rem; display: grid; place-items: center;
           background: conic-gradient(var(--accent) var(--deg, 0deg), var(--gold-soft) 0); }
.qb-ring-in { width: 124px; height: 124px; border-radius: 50%; background: var(--bg-paper); display: grid; place-items: center;
              box-shadow: inset 0 0 0 1px var(--border); }
.qb-pct { font-family: var(--display); font-size: 2.2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.qb-pct small { display: block; font-family: var(--body-font); font-size: .7rem; font-weight: 600; color: var(--text-muted);
                letter-spacing: .1em; text-transform: uppercase; margin-top: .25rem; }
.qb-result h2 { font-size: 1.7rem; margin-bottom: .4rem; }
.qb-msg { color: var(--text-muted); max-width: 46ch; margin: 0 auto 1.4rem; }
.qb-tally { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.qb-box { border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.6rem; min-width: 120px; background: var(--bg-paper); }
.qb-box .n { font-family: var(--display); font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1;
             color: var(--primary); }
.qb-box .l { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
             margin-top: .35rem; }
.qb-box-ok .n { color: var(--qb-ok); }
.qb-box-no .n { color: var(--qb-no); }

@media (max-width: 560px) {
    .qb-card { padding: 1.2em; }
    .qb-actions .btn { width: 100%; justify-content: center; }
    .qb-box { flex: 1 1 40%; min-width: 0; padding: .9rem; }
}

/* ============================================================
   GECE MODU — tema düğmesi + anlamsal kutu uyarlamaları
   ============================================================ */

/* Üst şeritteki tema (gece/gündüz) düğmesi */
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; margin-right: .6rem;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--bg-paper); color: var(--primary);
    cursor: pointer; font-size: .9rem; line-height: 1;
    transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--primary); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
/* Koyu temada güneş ikonu görünsün */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Gece modunda anlamsal (yeşil/kırmızı) durum kutuları okunur kalsın */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .admin-ok { background: rgba(46, 125, 79, .18); border-color: rgba(46, 125, 79, .5); }
    :root:not([data-theme="light"]) .admin-err { background: rgba(193, 68, 59, .18); border-color: rgba(193, 68, 59, .5); }
}
:root[data-theme="dark"] .admin-ok { background: rgba(46, 125, 79, .18); border-color: rgba(46, 125, 79, .5); }
:root[data-theme="dark"] .admin-err { background: rgba(193, 68, 59, .18); border-color: rgba(193, 68, 59, .5); }
