/* Ek bileşenler: erişilebilirlik, çevrimdışı çubuğu, ölçer, yeni modüllerin küçük stilleri */

.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; padding: 8px 14px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
#main:focus { outline: none; }

.offline-bar { background: var(--warn-soft); color: var(--warn); text-align: center; padding: 8px 12px; font-size: .9rem; font-weight: 600; }
.offline-bar[hidden] { display: none; }

/* İlerleme ölçeri (devamsızlık, görevler, seçim sonucu) */
.meter { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.meter > i { display: block; height: 100%; width: var(--w, 0%); background: var(--brand); border-radius: inherit; transition: width .4s ease; }
.meter.ok > i { background: var(--ok); }
.meter.warn > i { background: var(--warn); }
.meter.bad > i { background: var(--bad); }

.overdue { color: var(--bad); font-weight: 700; }
.tl-i.k-todo .tl-body { border-left-color: var(--ok); }
.tile-todo a { font-weight: 600; }

/* Dil düğmesi ve erişilebilirlik paneli */
.iconbtn.lang { font-weight: 800; font-size: .78rem; text-decoration: none; display: inline-grid; place-items: center; }
.iconbtn[data-a11y-toggle] { font-weight: 800; font-size: .9rem; }
.a11y { position: relative; }
.a11y-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 270px; display: grid; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgba(0, 0, 0, .22); z-index: 80; }
.a11y-panel[hidden] { display: none; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .92rem; }
.a11y-btns { display: inline-flex; gap: 6px; }
.a11y-btns button { min-width: 36px; min-height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; font-weight: 700; }
.a11y-btns button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
@media (max-width: 640px) { .a11y-panel { position: fixed; left: 12px; right: 12px; top: 60px; width: auto; } }

/* Yazı boyutu */
html[data-fs="l"] { font-size: 112.5%; }
html[data-fs="xl"] { font-size: 125%; }

/* Okunaklı yazı tipi: geniş harf ve satır aralığı */
html[data-font="dys"] body { font-family: "Atkinson Hyperlegible", Verdana, "Trebuchet MS", sans-serif; letter-spacing: .02em; word-spacing: .08em; line-height: 1.7; }

/* Hareketi azalt */
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

/* Yüksek kontrast */
html[data-contrast="high"] {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #ececec; --line: #000000; --ink: #000000; --ink-2: #1a1a1a;
  --brand: #0a0acc; --brand-ink: #ffffff; --brand-soft: #e3e3ff; --ok: #005a00; --ok-soft: #dff5df;
  --warn: #6b3200; --warn-soft: #ffe9c7; --bad: #9a0000; --bad-soft: #ffdcdc;
}
html[data-contrast="high"][data-theme="dark"] {
  --bg: #000000; --surface: #000000; --surface-2: #151515; --line: #ffffff; --ink: #ffffff; --ink-2: #f0f0f0;
  --brand: #ffe600; --brand-ink: #000000; --brand-soft: #2a2600; --ok: #6dff9a; --ok-soft: #04240f;
  --warn: #ffc266; --warn-soft: #2a1a00; --bad: #ff8a8a; --bad-soft: #2d0000;
}
@media (prefers-color-scheme: dark) {
  html[data-contrast="high"]:not([data-theme="light"]) {
    --bg: #000000; --surface: #000000; --surface-2: #151515; --line: #ffffff; --ink: #ffffff; --ink-2: #f0f0f0;
    --brand: #ffe600; --brand-ink: #000000; --brand-soft: #2a2600; --ok: #6dff9a; --ok-soft: #04240f;
    --warn: #ffc266; --warn-soft: #2a1a00; --bad: #ff8a8a; --bad-soft: #2d0000;
  }
}
html[data-contrast="high"] a { text-decoration: underline; }
html[data-contrast="high"] .panel, html[data-contrast="high"] .stat, html[data-contrast="high"] .btn, html[data-contrast="high"] .table-wrap, html[data-contrast="high"] input, html[data-contrast="high"] select, html[data-contrast="high"] textarea { border-color: var(--ink); border-width: 2px; }
html[data-contrast="high"] body, html[data-contrast="high"] .main { background-image: none; }

/* Topluluk sohbeti */
.chatlog { max-height: 55vh; min-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px; }
.chatmsg { padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 6%, transparent); max-width: 92%; align-self: flex-start; }
.chatmsg.mine { align-self: flex-end; background: color-mix(in srgb, var(--brand) 14%, transparent); }
.chatmsg p { margin: 2px 0; }

/* Gönüllülük belgesi yazdırma */
@media print { .skip, .offline-bar, .a11y, .iconbtn.lang { display: none !important; } }

/* Aşama 4: resmî topluluk rozetleri ve tanıtım kartı */
.badge-official { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.badge-official.blue { background: #dbeafe; color: #1e40af; }
.badge-official.gold { background: #fef3c7; color: #92400e; }
.badge-official svg { width: 14px; height: 14px; }
.badge.ambassador { background: #ede9fe; color: #5b21b6; }
.badge.verified { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; background: #dcfce7; color: #166534; }
.badge.verified svg { width: 14px; height: 14px; }
.promo-card { max-width: 360px; border: 2px solid var(--line, #d0d5dd); border-radius: 16px; padding: 22px; text-align: center; background: #fff; color: #111; }
.promo-card h2 { margin: 8px 0 4px; }
.promo-card .qr svg { width: 100%; max-width: 240px; height: auto; }
.promo-card .url { font-size: .8rem; overflow-wrap: anywhere; }
@media print { header, nav, footer, .no-print, .skip-link { display: none !important; } .promo-card { border-color: #000; box-shadow: none; } }

/* CV şablonları (Aşama 6): ekranda kâğıt gibi, yazdırırken yalnızca CV */
.cv { background: #fff; color: #111; max-width: 794px; margin: 0 auto 24px; padding: 36px 40px; box-shadow: 0 1px 8px rgba(0,0,0,.15); display: block; font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; line-height: 1.45; }
.cv h1 { margin: 0 0 4px; font-size: 26px; }
.cv h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 18px 0 8px; border-bottom: 1px solid #bbb; padding-bottom: 3px; }
.cv p { margin: 4px 0; }
.cv ul { list-style: none; margin: 0; padding: 0; }
.cv-headline { font-size: 15px; margin: 0 0 8px; }
.cv-contact li { font-size: 13px; overflow-wrap: anywhere; }
.cv-tags { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.cv-tags li { font-size: 13px; }
.cv-item { margin-bottom: 10px; break-inside: avoid; }
.cv-row { display: flex; justify-content: space-between; gap: 12px; }
.cv-period { font-size: 13px; color: #444; white-space: nowrap; }
.cv-org { font-size: 13px; color: #333; }
.cv-klasik { font-family: Georgia, "Times New Roman", serif; }
.cv-klasik .cv-side { text-align: center; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 6px; }
.cv-klasik .cv-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; }
.cv-klasik .cv-tags { justify-content: center; }
.cv-modern { display: grid; grid-template-columns: 230px 1fr; gap: 0 28px; padding: 0; overflow: hidden; }
.cv-modern .cv-side { background: #1e3a5f; color: #fff; padding: 36px 22px; }
.cv-modern .cv-side h2 { border-color: rgba(255,255,255,.5); }
.cv-modern .cv-main { padding: 36px 36px 36px 0; }
.cv-modern .cv-tags { flex-direction: column; }
.cv-sade { padding: 48px 56px; }
.cv-sade h2 { border: 0; font-size: 12px; color: #555; }
.cv-sade .cv-side { margin-bottom: 8px; }
.cv-kompakt { padding: 24px 28px; font-size: 12px; }
.cv-kompakt h1 { font-size: 20px; }
.cv-kompakt h2 { margin: 10px 0 5px; font-size: 11px; }
.cv-kompakt .cv-contact { display: flex; flex-wrap: wrap; gap: 0 12px; }
.cv-kompakt .cv-contact li, .cv-kompakt .cv-tags li, .cv-kompakt .cv-org, .cv-kompakt .cv-period { font-size: 11px; }
@media (max-width: 700px) { .cv { padding: 20px; } .cv-modern { display: block; } .cv-modern .cv-main { padding: 20px; } }
@media print {
  .cv { box-shadow: none; margin: 0; max-width: none; padding: 0; }
  .cv-modern, .cv-modern .cv-side { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cv-modern { padding: 0; }
  .cv-sade { padding: 0; }
}
