/* Beyin Atlası: anatomi levhası dili. Tek yarıçap (2px), çizgi ve boşlukla ayırma, kart kutusu yok. */
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap;
  src: url(../fonts/cormorant-garamond-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap;
  src: url(../fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap;
  src: url(../fonts/cormorant-garamond-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap;
  src: url(../fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: italic; font-display: swap;
  src: url(../fonts/cormorant-garamond-latin-ext-600-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: italic; font-display: swap;
  src: url(../fonts/cormorant-garamond-latin-600-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-weight: 100 900; font-display: swap;
  src: url(../fonts/geist-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-weight: 100 900; font-display: swap;
  src: url(../fonts/geist-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-weight: 100 900; font-display: swap;
  src: url(../fonts/geist-mono-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-weight: 100 900; font-display: swap;
  src: url(../fonts/geist-mono-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --kagit: #e9eef3; --kagit-2: #f4f7fa; --murekkep: #14233b; --soluk: #4a5b73; --cizgi: #b9c4d1;
  --vurgu: #b4472f; --odak: #b4472f;
  --yaricap: 2px;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --alan: #2f62a0; /* seçili bozukluğun alan rengi, JS ayarlar */
  --dolgu: 0;      /* alan renginin açık/koyu seçimi: 0 açık, 1 koyu (JS) */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="acik"]) {
    --kagit: #0e1726; --kagit-2: #152238; --murekkep: #d4dce8; --soluk: #9aa9bd; --cizgi: #2b3b55;
    --vurgu: #e0795f; --odak: #e0795f;
  }
}
:root[data-tema="koyu"] {
  --kagit: #0e1726; --kagit-2: #152238; --murekkep: #d4dce8; --soluk: #9aa9bd; --cizgi: #2b3b55;
  --vurgu: #e0795f; --odak: #e0795f;
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }
:root[data-tema="acik"] { color-scheme: light; }
:root[data-tema="koyu"] { color-scheme: dark; }
body { margin: 0; background: var(--kagit); color: var(--murekkep); font: 400 15px/1.55 var(--sans); min-height: 100dvh; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--odak); outline-offset: 2px; border-radius: var(--yaricap); }
.ara-durum { position: absolute; right: clamp(16px, 3vw, 40px); top: 100%; margin: -2px 0 0; font-size: 12.5px; color: var(--soluk); text-align: right; z-index: 3; }
.gorunmez { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.atla { position: absolute; left: 8px; top: -60px; background: var(--murekkep); color: var(--kagit); padding: 8px 12px; border-radius: var(--yaricap); z-index: 20; }
.atla:focus { top: 8px; }

/* üst bant */
.ust { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 20px clamp(16px, 3vw, 40px) 8px; flex-wrap: wrap; }
.baslik h1 { margin: 0; font: 600 clamp(32px, 4vw, 52px)/1 var(--serif); letter-spacing: -.01em; }
.baslik p { margin: 4px 0 0; color: var(--soluk); font-size: 14px; }
.araclar { display: flex; gap: 8px; align-items: center; }
.ara { display: flex; align-items: center; gap: 8px; border: 1px solid var(--cizgi); border-radius: var(--yaricap); padding: 0 10px; background: var(--kagit-2); min-width: min(320px, 70vw); }
.ara input { border: 0; background: none; padding: 10px 0; width: 100%; outline: none; }
.ara input::placeholder { color: var(--soluk); }
.ara:focus-within { outline: 2px solid var(--odak); outline-offset: 2px; }
.simge-dugme { border: 1px solid var(--cizgi); background: var(--kagit-2); border-radius: var(--yaricap); width: 40px; height: 40px; display: grid; place-items: center; }
.simge-dugme:hover { border-color: var(--murekkep); }

/* alan çubuğu */
.alan-cubugu { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px clamp(16px, 3vw, 40px) 12px; border-bottom: 1px solid var(--cizgi); }
.alan-dugme { background: none; border: 0; padding: 4px 0; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--soluk); border-bottom: 2px solid transparent; }
.alan-dugme i { width: 10px; height: 10px; background: var(--r); display: inline-block; border-radius: 1px; }
.alan-dugme:hover { color: var(--murekkep); }
.alan-dugme[aria-pressed="true"] { color: var(--murekkep); border-bottom-color: var(--r); font-weight: 600; }

/* sahne: çark + panel */
.sahne { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 0; align-items: start; max-width: 1560px; margin: 0 auto; }
.cark-kutu { position: relative; aspect-ratio: 1; width: min(100%, 1060px); margin: 0 auto; }
#cark, #cizgiler { position: absolute; inset: 0; width: 100%; height: 100%; }
#cark { touch-action: none; cursor: grab; }
#cark.suruklenior { cursor: grabbing; }
#cark.suruklenior .etiket { pointer-events: none; }
.iliski-yay { fill: none; stroke: var(--alan); stroke-width: 1.7; opacity: .6; pointer-events: none; animation: ciz .45s ease-out; }
.etiket.iliskili text { font-weight: 700; text-decoration: underline; text-decoration-color: var(--alan); text-underline-offset: 3px; }
#cizgiler { pointer-events: none; }
.merkez { position: absolute; left: 50%; top: 50%; width: 47%; transform: translate(-50%, -50%); display: grid; gap: 6px; justify-items: center; }
.beyin-kok { width: 100%; }
.beyin-kok svg { width: 100%; height: auto; display: block; }
.kontur { fill: none; stroke: var(--murekkep); stroke-width: 2; }
.kontur.dolgu { fill: var(--kagit-2); }
.kivrim { fill: none; stroke: var(--murekkep); stroke-width: 1; opacity: .17; pointer-events: none; }
.sulkus { fill: none; stroke: var(--murekkep); stroke-width: 1.7; opacity: .5; stroke-linecap: round; pointer-events: none; }
.ince-dolgu { fill: var(--kagit-2); }
.kontur-ince { fill: none; stroke: var(--murekkep); stroke-width: 1; opacity: .45; }
.bolge { fill: var(--soluk); fill-opacity: .14; stroke: var(--murekkep); stroke-opacity: .35; stroke-width: .8; cursor: pointer;
  transition: fill-opacity .25s, stroke-opacity .25s; }
.bolge.dis { stroke-opacity: .8; }
.bolge:hover, .bolge:focus-visible { fill-opacity: .4; stroke-opacity: .9; }
.bolge.onizle { fill: var(--onizle-renk, var(--soluk)); fill-opacity: .42; stroke-opacity: .9; }
.bolge.yanik { fill: var(--alan); fill-opacity: .72; stroke: var(--alan); stroke-opacity: 1; stroke-width: 1.4; }
.bolge.secili-bolge { stroke: var(--vurgu); stroke-width: 2; stroke-opacity: 1; fill: var(--vurgu); fill-opacity: .5; }
.beyin-araclar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; font-size: 12px; color: var(--soluk); }
.beyin-araclar input[type=range] { width: 96px; vertical-align: middle; accent-color: var(--vurgu); }
.beyin3d-tuval { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; border-radius: var(--yaricap); }
.beyin-kok[data-tur="3b"] { aspect-ratio: 600 / 470; }
.etiket.parla text { fill: var(--vurgu); font-weight: 700; }
.sekmeler { display: inline-flex; border: 1px solid var(--cizgi); border-radius: var(--yaricap); overflow: hidden; background: var(--kagit-2); }
.sekmeler button { border: 0; background: none; padding: 5px 12px; font-size: 12px; color: var(--soluk); }
.sekmeler button + button { border-left: 1px solid var(--cizgi); }
.sekmeler button[aria-selected="true"] { background: var(--murekkep); color: var(--kagit); }

/* çark öğeleri */
.yay { fill: var(--r); opacity: .92; }
.yay-ad { font: 600 11.5px var(--sans); fill: var(--kagit); letter-spacing: .02em; pointer-events: none; }
.etiket { font: 400 12.8px var(--sans); fill: var(--murekkep); cursor: pointer; transition: opacity .2s; }
.etiket text { dominant-baseline: central; }
.etiket .nokta { fill: var(--r); }
.etiket:hover text, .etiket:focus-visible text { font-weight: 600; }
.etiket.secili text { font-weight: 700; fill: var(--vurgu); }
.etiket.bagli text { font-weight: 600; }
.etiket.sonuk { opacity: .34; }
.etiket.eslesen text { text-decoration: underline; text-decoration-color: var(--vurgu); text-underline-offset: 3px; }
.etiket .vurgu-bandi { fill: none; }
.etiket:focus-visible { outline: none; }
.etiket:focus-visible text { fill: var(--vurgu); font-weight: 700; }
.cizgi { fill: none; stroke: var(--alan); stroke-width: 2.2; opacity: .85; animation: ciz .45s ease-out; }
@keyframes ciz { from { opacity: 0; } to { opacity: .85; } }

/* panel */
.panel { position: sticky; top: 0; align-self: start; max-height: 100dvh; overflow: auto; padding: 24px clamp(16px, 2vw, 28px) 32px; border-left: 1px solid var(--cizgi); outline: none; min-height: 60dvh; }
.panel h2 { margin: 6px 0 2px; font: 600 clamp(28px, 2.6vw, 36px)/1.05 var(--serif); }
.panel .en { font: 400 12.5px var(--mono); color: var(--soluk); margin: 0 0 14px; }
.panel .alan-etiket { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--soluk); }
.panel .alan-etiket i { width: 10px; height: 10px; background: var(--r); border-radius: 1px; }
.panel h3 { margin: 18px 0 4px; font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--soluk); }
.panel p { margin: 0 0 6px; }
.panel .liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.panel .liste a, .panel .liste button { border: 1px solid var(--cizgi); background: var(--kagit-2); border-radius: var(--yaricap); padding: 4px 10px; font-size: 13px; text-decoration: none; display: inline-block; }
.panel .liste a:hover { border-color: var(--murekkep); }
.panel .dolu-liste { list-style: none; margin: 0; padding: 0; columns: 1; }
.panel .dolu-liste li { border-top: 1px solid var(--cizgi); }
.panel .dolu-liste li:first-child { border-top: 0; }
.panel .dolu-liste a { display: flex; gap: 8px; align-items: baseline; padding: 7px 0; text-decoration: none; }
.panel .dolu-liste a:hover { color: var(--vurgu); }
.panel .dolu-liste small { color: var(--soluk); font-family: var(--mono); font-size: 11px; }
.panel .uyari { font-size: 12.5px; color: var(--soluk); border-top: 1px solid var(--cizgi); margin-top: 20px; padding-top: 10px; }
.panel .tartismali { font-size: 12.5px; color: var(--soluk); font-style: italic; }
.panel .kapat { float: right; border: 1px solid var(--cizgi); background: var(--kagit-2); border-radius: var(--yaricap); padding: 3px 10px; font-size: 12.5px; }
.panel .bos { color: var(--soluk); }
.panel .bos h2 { color: var(--murekkep); }
.hata-kutusu { padding: 24px; }
.hata-kutusu button { margin-top: 8px; border: 1px solid var(--murekkep); background: none; padding: 6px 14px; border-radius: var(--yaricap); }

/* yükleme iskeleti */
.iskelet { position: absolute; inset: 6%; border-radius: 50%; border: 1px dashed var(--cizgi); opacity: 0; pointer-events: none; }
.yukleniyor .iskelet { opacity: 1; animation: nefes 1.4s ease-in-out infinite alternate; }
@keyframes nefes { to { opacity: .35; } }

/* alt bilgi */
.alt { max-width: 900px; margin: 0 auto; padding: 24px clamp(16px, 3vw, 40px) 40px; color: var(--soluk); font-size: 13px; }
.alt p { margin: 0 0 6px; }
.alt strong { color: var(--murekkep); }

/* telefon ve tablet: çark yerine dikey akış */
.mobil-liste { display: none; }
@media (max-width: 1099px) {
  .sahne { display: block; }
  .cark-kutu { aspect-ratio: auto; max-height: none; position: sticky; top: 0; z-index: 4; background: var(--kagit); border-bottom: 1px solid var(--cizgi); padding: 10px 16px 8px; }
  #cark, #cizgiler, .iskelet { display: none; }
  .merkez { position: static; transform: none; width: min(100%, 460px); margin: 0 auto; }
  .beyin-kok svg { max-height: 30dvh; }
  .beyin-kok[data-tur="3b"] { aspect-ratio: auto; height: 30dvh; }
  .beyin-araclar { display: none; }   /* telefonda yer kazanmak için: derin yapı seçilince korteks zaten saydamlaşır */
  .panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: 48dvh; min-height: 0; border-left: 0; border-top: 1px solid var(--cizgi); background: var(--kagit); z-index: 8; transform: translateY(0); transition: transform .3s; padding-bottom: 28px; }
  .panel.bos-durum { transform: translateY(100%); pointer-events: none; visibility: hidden; transition: transform .3s, visibility 0s .3s; }
  .mobil-liste { display: block; padding: 8px 16px 56dvh; }
  .mobil-liste details { border-bottom: 1px solid var(--cizgi); }
  .mobil-liste summary { padding: 12px 0; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; list-style: none; }
  .mobil-liste summary::-webkit-details-marker { display: none; }
  .mobil-liste summary i { width: 12px; height: 12px; background: var(--r); border-radius: 1px; }
  .mobil-liste summary span { margin-left: auto; font: 400 12px var(--mono); color: var(--soluk); }
  .mobil-liste ul { list-style: none; margin: 0 0 10px; padding: 0; }
  .mobil-liste li a { display: block; padding: 9px 0 9px 22px; text-decoration: none; border-top: 1px solid var(--cizgi); font-size: 14.5px; }
  .mobil-liste li a[aria-current="true"] { color: var(--vurgu); font-weight: 600; }
  .mobil-liste li.sonuk { display: none; }
  .alan-cubugu { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .alan-dugme { white-space: nowrap; }
}

@media (max-width: 1099px) and (max-height: 640px) {
  .beyin-kok svg { max-height: 20dvh; }
  .panel { max-height: 46dvh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
