/* ==================== THEME TOKENS (MOBİL ÖNCE) ==================== */
:root{
  --bg: #0b0f10;
  --fg: #f5f7fa;
  --muted:#b8c3cf;
  --card:#111417;
  --accent:#0E7A57;     /* CTA yeşili */
  --gold:#E7D48B;       /* motif */
  --ring: rgba(14,122,87,.5);
  --shadow: 0 10px 28px rgba(0,0,0,.25);

  /* Global intro (ilk yükleme) */
  --introDur: 900ms;
  --introEase: cubic-bezier(.22,.61,.36,1);
  --introBlur: 3px;

  /* Tema geçişi – overlay + içerik renkleri için tek timeline */
  --themeDur: 520ms;
  --themeEase: cubic-bezier(.22,.61,.36,1);

  /* Sayfalar arası geçiş (welcome <-> how-it) */
  --routeDur: 360ms;
  --routeEase: cubic-bezier(.22,.61,.36,1);
}
html[data-theme="light"]{
  --bg:#ffffff;
  --fg:#111419;
  --muted:#586273;
  --card:#ffffff;
  --accent:#198754;
  --ring: rgba(25,135,84,.35);
  --shadow: 0 10px 24px rgba(0,0,0,.12);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Poppins, Arial, sans-serif;
  color:var(--fg);
  background:var(--bg);
  -webkit-tap-highlight-color: transparent;
}

/* Tema değişiminde içerik renk geçişi (JS, html'e ekler) */
.theme-transition, .theme-transition *{
  transition:
    background-color var(--themeDur) var(--themeEase),
    color            var(--themeDur) var(--themeEase),
    border-color     var(--themeDur) var(--themeEase),
    box-shadow       var(--themeDur) var(--themeEase),
    filter           var(--themeDur) var(--themeEase);
}

/* ==================== GLOBAL INTRO (ilk yükleme) ==================== */
/* Intro etkisini bireysel öğelere uygula (sadece opacity+filter ile, mevcut transform geçişlerini bozmaz) */
.welcome-top > *,
.motif-strip,
#welcome-overline,
.title-stack,
.cta-btn,
.welcome-social .s-link,
.social-handle{
  transition:
    opacity var(--introDur) var(--introEase) var(--d,0ms),
    filter  var(--introDur) var(--introEase) var(--d,0ms);
}

/* Başlangıç hali: görünmez + hafif blur; motifler pause */
html.intro-on .welcome-top > *,
html.intro-on .motif-strip,
html.intro-on #welcome-overline,
html.intro-on .title-stack,
html.intro-on .cta-btn,
html.intro-on .welcome-social .s-link,
html.intro-on .social-handle{
  opacity: 0;
  filter: blur(var(--introBlur));
}
html.intro-on .motif-strip{ animation-play-state: paused; }
/* ilk anda tıklama olmasın */
html.intro-on .welcome{ pointer-events: none; }

/* Stagger (gecikmeler) */
.welcome-top > * { --d: 0ms; }
.motif-top        { --d: 80ms; }
#welcome-overline { --d: 140ms; }
.title-stack      { --d: 180ms; }
.cta-btn          { --d: 240ms; }
.motif-bottom     { --d: 320ms; }
.welcome-social .s-link:nth-child(1){ --d: 420ms; }
.welcome-social .s-link:nth-child(2){ --d: 500ms; }
.welcome-social .s-link:nth-child(3){ --d: 580ms; }
.social-handle    { --d: 700ms; }

/* Hareketi azalt tercihine saygı */
@media (prefers-reduced-motion: reduce){
  :root{
    --introDur: 1ms; --introBlur: 0px;
    --themeDur: 1ms;
    --routeDur: 1ms;
  }
}

/* ==================== WELCOME SCREEN ==================== */
.welcome{
  min-height:100svh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  padding:16px 14px 20px;
  gap:14px;
}

/* top controls */
.welcome-top{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  max-width:600px;
  margin-top:2px;
  margin-bottom: clamp(20px, 8vh, 72px);
}

/* Theme toggle (siyah/beyaz buton) */
.theme-toggle{
  width:42px; height:42px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: #111;          /* dark modda siyah */
  color:#fff;
  display:grid; place-items:center;
  box-shadow: var(--shadow);
  transition: transform .12s ease, background .2s ease, border-color .2s ease;
}
html[data-theme="light"] .theme-toggle{
  background: #fff; color:#111;
  border-color: rgba(17,20,25,.12);
}
.theme-toggle:active{ transform: scale(.96); }
.theme-toggle:focus-visible{ outline:2px solid var(--ring); outline-offset:2px; }
.theme-toggle .icon-sun{ display:none; }
html[data-theme="light"] .theme-toggle .icon-moon{ display:none; }
html[data-theme="light"] .theme-toggle .icon-sun{ display:block; }

/* Lang: dairesel bayrak butonları */
.lang-group{ display:flex; gap:8px; align-items:center; }

/* Dairesel bayrak butonları — TAM dolum + taşma (bleed) ayarlı */
.flag-btn{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  padding: 0;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.14);
  transition: transform .12s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

/* Gerekirse bayrak bazında ince ayar */
#btn-lang-tr{ --bleed: 50px; }
#btn-lang-en{ --bleed: 50px; }

.flag-btn img{
  position: absolute;
  left:   calc(var(--bleed) * -1);
  top:    calc(var(--bleed) * -1);
  width:  calc(100% + var(--bleed) * 2) !important;   /* HTML width/height'i ezer */
  height: calc(100% + var(--bleed) * 2) !important;
  object-fit: cover;                                  /* daireyi tamamen doldur */
  object-position: center;
  border-radius: 50%;
  display: block;
}

.flag-btn:active{ transform: scale(.96); }
.flag-btn.is-active{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 40%, transparent);
}
html[data-theme="light"] .flag-btn{ border-color: rgba(17,20,25,.12); }

/* Motif şeritleri */
.motif-strip{
  width:100%;
  height:44px;
  background-image: url("/img/pattern.svg");
  background-repeat: repeat-x;
  background-size: auto 100%;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.25));
  /* mask ile kenarlarını yumuşat (destek varsa) */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}
.motif-top{margin-bottom: clamp(10px, 2.8vh, 22px); animation: motif-left 16s linear infinite; }
.motif-bottom{margin-top:    clamp(10px, 2.8vh, 22px); animation: motif-right 16s linear infinite; }
@keyframes motif-left{ from{background-position:0 0} to{background-position:-100% 0} }
@keyframes motif-right{ from{background-position:0 0} to{background-position:100% 0} }

/* Hero */
.welcome-hero{
  width:100%; max-width:600px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--card) 88%, transparent), transparent);
  border:1px solid color-mix(in oklab, var(--fg) 8%, transparent);
  border-radius:16px;
  padding:18px 16px 20px;
  box-shadow: var(--shadow);
  text-align:center;
}
.overline{
  font-size:12px; letter-spacing:.06em; opacity:.75; margin-bottom:6px;
}
.welcome-hero h1{
  font-size:26px; line-height:1.2; margin:6px 0 8px; font-weight:800;
}
.welcome-hero p{
  font-size:15px; color:var(--muted); margin:0 6px 14px;
}

/* CTA */
.cta-btn{
  --h:52px;
  padding: 0 20px;
  font-size: 17px;
  display:inline-flex; align-items:center; gap:10px;
  height:var(--h); padding:0 18px;
  background: var(--accent); color:#fff;
  border:none; border-radius:999px; font-weight:700; font-size:16px;
  box-shadow: 0 10px 22px rgba(14,122,87,.28);
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.cta-btn:focus-visible{ outline:2px solid var(--ring); outline-offset:3px; }
.cta-btn:active{ transform: scale(.98); }
.cta-btn:hover{ filter: brightness(1.03) }
.cta-btn i{ transition: transform .18s ease; }
.cta-btn:active i{ transform: translateX(2px); }

/* Sosyal */
.welcome-social{
  display:flex; gap:14px; align-items:center; justify-content:center;
  width:100%; max-width:600px; margin-top:auto; margin-bottom: 0px;
}
.s-link{
  width:42px; height:42px; border-radius:999px;
  display:grid; place-items:center;
  border:1px solid color-mix(in oklab, var(--fg) 12%, transparent);
  color:var(--fg);
  transition: transform .12s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.s-link:hover{ transform: translateY(-1px); background: color-mix(in oklab, var(--fg) 6%, transparent); }
.s-link:active{ transform: scale(.94); }
html[data-theme="light"] .s-link{ border-color: rgba(17,20,25,.12); }
.icon-x{ display:block; }

.social-handle{
  margin-top:0px;
  font-weight:400; letter-spacing:.2px;
  margin-bottom: calc(env(safe-area-inset-bottom) + 16px);
}
.handle-link{
  color:var(--fg); text-decoration:none;
  border-bottom:1px dashed color-mix(in oklab, var(--fg) 35%, transparent);
}
.handle-link:hover{ opacity:.9 }

/* WELCOME giriş animasyonları (mevcut mikro animasyonlar) */
.wipe-in{ animation: heroIn .22s ease-out both; }
.wipe-in-delayed{ animation: heroIn .22s ease-out .06s both; }
@keyframes heroIn{
  from{ opacity:0; transform: translateY(6px) scale(.985); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}

/* Dil değiştirme için maskeleme (soldan sağa sil/yaz) */
.text-wipe-out{ animation: twOut .18s ease-in forwards; }
.text-wipe-in{ animation: twIn .18s ease-out forwards; }
@keyframes twOut{
  from{ clip-path: inset(0 0 0 0); opacity:1; }
  to{ clip-path: inset(0 0 0 100%); opacity:.2; }
}
@keyframes twIn{
  from{ clip-path: inset(0 100% 0 0); opacity:.2; }
  to{ clip-path: inset(0 0 0 0); opacity:1; }
}

/* Tema geçiş overlay (alttan üste wipe, içerik görünür kalır) */
#theme-wipe{
  position: fixed; inset: 0; transform-origin: bottom center;
  transform: scaleY(0);
  /* Daha rafine, dikişsiz bir film: altta yoğun → üstte şeffafa açılır */
  background:
    linear-gradient(0deg,
      color-mix(in oklab, var(--bg) 96%, transparent) 0%,
      color-mix(in oklab, var(--bg) 88%, transparent) 52%,
      color-mix(in oklab, var(--bg) 62%, transparent) 76%,
      transparent 100%);
  opacity: .40;
  z-index:9999; pointer-events:none;
  will-change: transform, opacity; /* performans için opacity de eklendi */
}
.theme-wipe-anim{
  animation-name: wipeUp;
  animation-duration: var(--themeDur);
  animation-timing-function: var(--themeEase);
  animation-fill-mode: forwards;
}
@keyframes wipeUp{
  from{ transform: scaleY(0); }
  to{ transform: scaleY(1); }
}

/* ==================== AŞAĞIDAKİLER: UYGULAMA (AR vb.) ==================== */

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 2rem 1rem;
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow);
  position: relative;
  margin: 0 auto 24px;
}
.title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
  text-align: center;
  color: var(--fg);
}

.title-stack{
  font-size: clamp(32px, 9.5vw, 46px); line-height:1.06; letter-spacing: -0.2px; margin:8px 0 0; font-weight:800;
}
.title-stack + .cta-btn{ margin-top: 18px; }
.title-stack span{ display:block; }

.info { margin: 0.5rem 0; font-size: 1.05rem; color: var(--fg); }
.qibla {
  margin-top: 1.5rem;
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--fg);
  text-align: center;
}
#map {
  height: 400px;
  margin-top: 1.5rem;
  border-radius: 10px;
  overflow: hidden;
}
.btn {
  padding: 0.6rem 1rem;
  margin: 0.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background-color: #3498db; color: white; }
.btn-secondary { background-color: #2ecc71; color: white; }
.center-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.top-right { position: absolute; top: 1rem; right: 1rem; cursor: pointer; font-size: 1.2rem; }

.ar-mode .leaflet-control-container { display: none !important; }
.hidden { display: none !important; }

/* ---------- Android notice ---------- */
.notice{
  background: #fff6d9; border: 1px solid #fde6a8; color: #7a5b00;
  border-radius: 10px; padding: .5rem .75rem; margin: 0 0 .5rem 0;
  line-height: 1.35; font-size: .9rem;
}

/* ---------- Calibration modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: grid; place-items: center; z-index: 2000; }
.modal .modal-content {
  width: min(92vw, 520px); max-height: 92vh; overflow: auto;
  background: #fff; color: #2c3e50; border-radius: 12px;
  padding: 1.1rem 1rem .85rem; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  display: flex; flex-direction: column;
}
.modal .modal-content h2 { margin: 0 0 .45rem 0; font-size: 1.2rem; }
.modal .modal-content p  { margin: .25rem 0 .8rem 0; line-height: 1.42; }

.calib-steps{ display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .4rem 0 .7rem 0; }
.calib-step{ background: #f7f9fc; border: 1px solid #e7eef7; border-radius: 10px; padding: .55rem .45rem; display: grid; place-items: center; row-gap: .35rem; transition: border-color .2s, box-shadow .2s, background .2s; }
.calib-step .calib-label { font-size: .82rem; color: #3a4a5a; text-align: center; }
.calib-step.done { border-color: #2ecc71; box-shadow: 0 0 0 2px rgba(46,204,113,.15) inset; background: #f4fff8; }

.calib-anim { width: 34px; height: 52px; border-radius: 8px; border: 2px solid #8aa1b5; position: relative; background: linear-gradient(180deg,#fff,#f3f7fb); box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.calib-anim::after { content: ''; position: absolute; left: 50%; top: 6px; transform: translateX(-50%); width: 12px; height: 4px; border-radius: 3px; background: #c7d4e0; }
@keyframes yawSpin { from { transform: rotate(0deg);} to { transform: rotate(360deg);} }
.yaw-spin { animation: yawSpin 2.2s linear infinite; }
@keyframes pitchTilt { 0%{transform: rotateX(0) rotateZ(0);} 50%{transform: rotateX(25deg)} 100%{transform: rotateX(0) rotateZ(0);} }
.pitch-tilt { animation: pitchTilt 1.6s ease-in-out infinite; }
@keyframes rollTilt { 0%{transform: rotateZ(0);} 50%{transform: rotateZ(18deg);} 100%{transform: rotateZ(0);} }
.roll-tilt { animation: rollTilt 1.6s ease-in-out infinite; }

.calib-progress { width: 100%; height: 9px; background: #e9eff5; border-radius: 999px; overflow: hidden; margin-bottom: .45rem; }
.calib-bar { height: 100%; width: 0%; background: linear-gradient(90deg, #e74c3c 0%, #e67e22 20%, #f1c40f 33%, #f1c40f 66%, #2ecc71 100%); transition: width .2s ease-out, filter .2s ease-out; }
.quality-line { display:flex; align-items:center; gap:.5rem; margin-bottom:.5rem; }
.quality-badge { font-size:.83rem; padding:.22rem .45rem; border-radius:999px; border:1px solid transparent; }
.quality-badge.bad{ background:#ffe9e7; color:#c0392b; border-color:#ffcfc9; }
.quality-badge.ok { background:#fff6df; color:#a37b00; border-color:#ffe9a5; }
.quality-badge.good{ background:#e9fff2; color:#1e8e57; border-color:#c8f1d9; }
.quality-hint{ font-size:.88rem; color:#51606e; }

/* ---------- AR view ---------- */
#ar-container { position: fixed; inset: 0; background:#000; z-index:1500; }
#ar-video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
#ar-overlay{ position:absolute; inset:0; pointer-events:none; }
#ar-mat { position: absolute; left: 50%; top: 65%; width: 42vw; max-width: 420px; height: auto; transform: translate(-50%, -50%) perspective(800px) rotateX(58deg); transform-origin: 50% 85%; filter: drop-shadow(0 14px 30px rgba(0,0,0,.35)); opacity: 0.9; pointer-events: none; z-index: 0; }
#ar-arrow{ position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-50%, -50%) rotate(0deg); border-left: 22px solid transparent; border-right: 22px solid transparent; border-bottom: 48px solid red; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.arrow-red   { border-bottom-color: #e74c3c !important; }
.arrow-yellow{ border-bottom-color: #f1c40f !important; }
.arrow-green { border-bottom-color: #2ecc71 !important; }
#ar-hud{ position: absolute; top: .75rem; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.45); color:#fff; padding:.4rem .7rem; border-radius: 10px; font-size:.95rem; display:flex; gap:.75rem; backdrop-filter: blur(2px); }
.ar-exit{ position: absolute; right: .75rem; top: .75rem; pointer-events: auto; }

/* Küçük ekranlar */
@media (max-width: 420px) {
  #ar-mat { width: 54vw; top: 68%; }
  #ar-arrow { border-left-width: 18px; border-right-width: 18px; border-bottom-width: 40px; }
  #ar-hud { font-size: .9rem; }
}

/* ==================== YENİ: SAYFA GEÇİŞLERİ (WELCOME ↔ HOW-IT) ==================== */
.page-enter{
  animation: routeIn var(--routeDur) var(--routeEase) both;
  will-change: transform, opacity;
}
.page-leave{
  animation: routeOut var(--routeDur) var(--routeEase) both;
  will-change: transform, opacity;
}
@keyframes routeIn{
  from{ opacity:0; transform: translateY(8px); }
  to  { opacity:1; transform: translateY(0); }
}
@keyframes routeOut{
  from{ opacity:1; transform: translateY(0); }
  to  { opacity:0; transform: translateY(-8px); }
}

/* ==================== YENİ: HOW-IT SCREEN BİLEŞENLERİ ==================== */

/* (EKLENDİ) Kartı biraz yukarı al */
#howit-screen{ padding-top: 6px; }
#howit-screen .welcome-top{ margin-bottom: clamp(8px, 2.2vh, 18px); }
#howit-screen .welcome-hero{ margin-top: 0; }

/* Uyarı listesi */
#howit-warnings{
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
#howit-warnings li{
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;

  /* (DEĞİŞTİ) AMBER varsayılan (ilk iki uyarı) */
  border: 1px solid rgba(241,196,15,.35);   /* #f1c40f */
  background: rgba(241,196,15,.12);
  box-shadow: 0 0 0 2px rgba(241,196,15,.06) inset;
}
#howit-warnings li > span[aria-hidden="true"]{
  line-height: 1;
  filter: saturate(1.1);
  color:#f1c40f; /* (DEĞİŞTİ) ikon sarı */
}
html[data-theme="light"] #howit-warnings li{
  border-color: rgba(241,196,15,.28); /* (DEĞİŞTİ) light uyumu */
}

/* (DEĞİŞTİ) Kırmızı vurgulu kritik uyarı (3. madde) – daha soft */
#howit-warnings li.is-critical{
  border-color: rgba(231,76,60,.32);
  background:   rgba(231,76,60,.12);
  box-shadow:   0 0 0 2px rgba(231,76,60,.05) inset;
}
#howit-warnings li.is-critical > span[aria-hidden="true"]{
  color:#e74c3c;
}
html[data-theme="light"] #howit-warnings li.is-critical{
  border-color: rgba(231,76,60,.28);
}
 
/* Sticky CTA bar – sadece how-it için */
#howit-cta{
  position: sticky;
  bottom: calc(env(safe-area-inset-bottom) + 8px);
  padding-bottom: env(safe-area-inset-bottom);
  gap: 10px;
  z-index: 5;
}
#howit-tech, #howit-continue{
  height: 48px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 700;
  font-size: 16px;
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
#howit-tech{
  background: transparent;
  color: var(--fg);
  border: 1px solid color-mix(in oklab, var(--fg) 16%, transparent);
}
#howit-tech:hover{
  background: color-mix(in oklab, var(--fg) 6%, transparent);
}
html[data-theme="light"] #howit-tech{
  border-color: rgba(17,20,25,.12);
}
#howit-continue{
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(14,122,87,.28);
}
#howit-continue:hover{ filter: brightness(1.03) }
#howit-tech:active, #howit-continue:active{ transform: scale(.98); }
#howit-tech:focus-visible, #howit-continue:focus-visible{ outline: 2px solid var(--ring); outline-offset: 3px; }

/* ==================== YENİ: TECH SCREEN (TEKNİK DETAYLAR) ==================== */

#tech-screen{ padding-top: 6px; }
#tech-screen .welcome-top{ margin-bottom: clamp(8px, 1.8vh, 16px); }

/* TOC: yatay kaydırılan chip bar */
.tech-toc{
  position: sticky;
  top: 8px;
  z-index: 4;
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 600px;
  padding: 6px 6px;
  margin-bottom: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;

  background: linear-gradient(180deg,
      color-mix(in oklab, var(--card) 86%, transparent),
      transparent 100%);
  border: 1px solid color-mix(in oklab, var(--fg) 8%, transparent);
  border-radius: 999px;
}
.tech-toc::-webkit-scrollbar{ height: 0px; }
.tech-toc{ scrollbar-width: none; }

/* Chip butonlar */
.toc-chip{
  appearance: none;
  border: 1px solid color-mix(in oklab, var(--fg) 16%, transparent);
  background: transparent;
  color: var(--fg);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .12s ease, box-shadow .2s ease;
}
.toc-chip:hover{ background: color-mix(in oklab, var(--fg) 6%, transparent); }
.toc-chip:active{ transform: scale(.97); }
.toc-chip.is-active{
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(14,122,87,.25);
}
html[data-theme="light"] .toc-chip{ border-color: rgba(17,20,25,.12); }

/* İçerik alanı ve kartlar */
.tech-content{
  width: 100%;
  max-width: 600px;
  display: grid;
  gap: 12px;
}
.tech-card{
  background: linear-gradient(180deg, color-mix(in oklab, var(--card) 88%, transparent), transparent);
  border:1px solid color-mix(in oklab, var(--fg) 8%, transparent);
  border-radius: 16px;
  padding: 14px 14px 16px;
  box-shadow: var(--shadow);
  will-change: transform,opacity;
  scroll-margin-top: 70px;   /* sticky TOC altında düzgün dursun */
}
.tech-card h2{
  margin: 2px 0 8px;
  font-size: 1.06rem;
  line-height: 1.2;
  font-weight: 800;
}
.tech-card p, .tech-card li{
  color: var(--fg);
  line-height: 1.55;
  font-size: 0.98rem;
}
.tech-card code{
  background: color-mix(in oklab, var(--fg) 10%, transparent);
  padding: 0 .35rem;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .92em;
}

/* Callout kutuları (opsiyonel içerikler için) */
.callout{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid;
  margin: 8px 0;
}
.callout.info{
  border-color: color-mix(in oklab, var(--fg) 18%, transparent);
  background: color-mix(in oklab, var(--fg) 8%, transparent);
}
.callout.tip{
  border-color: rgba(46,204,113,.35);
  background: rgba(46,204,113,.12);
}
.callout.warn{
  border-color: rgba(241,196,15,.35);
  background: rgba(241,196,15,.12);
}
.callout.crit{
  border-color: rgba(231,76,60,.32);
  background: rgba(231,76,60,.12);
}

/* MathJax blok aralıkları */
.tech-card .MathJax, .tech-card mjx-container{
  margin: 6px 0;
  font-size: 1rem;
}

/* Erişilebilir odak */
.toc-chip:focus-visible{ outline: 2px solid var(--ring); outline-offset: 2px; }
#tech-screen .theme-toggle:focus-visible{ outline: 2px solid var(--ring); outline-offset: 2px; }

/* Hareketi azalt tercihi */
@media (prefers-reduced-motion: reduce){
  .tech-toc{ position: static; }
  .tech-card{ scroll-margin-top: 0; }
}