:root {
    --navy: #0b2545; --navy-2: #13315c; --gold: #f2c14e;
    --bg: #ffffff; --soft: #f4f6f9; --ink: #1b2430; --muted: #5f6b7a; --line: #dde3ea;
    --link: #1d4e89; --cheap: #1d4e89; --ok: #a0670b; --dear: #b3261e;
    --serif: Georgia, 'Times New Roman', serif; --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }

/* üst menü + lacivert bant */
.top { background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.08); }
.top .wrap { display: flex; justify-content: space-between; align-items: center; height: 56px; }
.logo { font: 700 1.25rem var(--serif); color: #fff; }
.logo:hover { text-decoration: none; }
.top nav a { margin-left: 22px; color: #c9d4e3; font-weight: 500; font-size: .95rem; }
.top nav a:hover { color: #fff; text-decoration: none; }
.band { color: #fff; padding: 22px 0 76px; background: radial-gradient(900px 300px at 85% -10%, rgba(242,193,78,.18), transparent 60%), linear-gradient(160deg, #0b2545, #13315c); background-size: 200% 200%; animation: drift 14s ease-in-out infinite alternate; }
.band .crumb, .band .crumb a { color: #9fb1c8; }
.band h1 { font: 700 clamp(1.9rem, 5vw, 2.9rem)/1.12 var(--serif); margin: 6px 0 12px; max-width: 760px; }
.band .lead { color: #d5deea; font-size: 1.1rem; max-width: 680px; margin: 0; }
.btn { display: inline-block; margin-top: 20px; background: var(--gold); color: var(--navy); padding: 11px 20px; border-radius: 6px; font-weight: 600; }
.btn:hover { text-decoration: none; filter: brightness(1.05); }
main { padding: 20px 16px 40px; }
main > :first-child { margin-top: 0; }
/* Sayfa bir kartla başlıyorsa kart bandın üstüne biner. */
main > :is(.verdict, .tool2, .tw):first-child { margin-top: -60px; position: relative; }

h2 { font: 700 1.3rem/1.25 var(--serif); margin: 28px 0 10px; }
.crumb { font-size: .85rem; margin: 0; }
.big { font-size: 1.12rem; }
.note { color: var(--muted); font-size: .88rem; margin-top: 20px; }

/* kutular */
.verdict, .card, .bars, .tw, .calc, .vs, .tool2, .grid a { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.verdict { padding: 18px 22px; margin-bottom: 12px; box-shadow: 0 8px 24px rgba(11,37,69,.08); border-top: 4px solid var(--muted); }
.verdict b { display: block; font: 700 clamp(1.8rem, 6vw, 2.4rem)/1.1 var(--serif); }
.verdict span { color: var(--muted); }
.verdict.good { border-top-color: var(--cheap); } .verdict.good b { color: var(--cheap); }
.verdict.mid { border-top-color: var(--ok); } .verdict.mid b { color: var(--ok); }
.verdict.bad { border-top-color: var(--dear); } .verdict.bad b { color: var(--dear); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.card { padding: 14px 16px; display: flex; flex-direction: column; }
.card span { color: var(--muted); font-size: .88rem; }
.card b { font-size: 1.7rem; font-weight: 700; letter-spacing: -.01em; }
.card small { color: var(--muted); }

.bars { padding: 10px 18px; }
.bar { display: grid; grid-template-columns: 160px 1fr 80px; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--soft); font-size: .95rem; }
.bar:last-child { border-bottom: 0; }
.bar-t { background: var(--soft); height: 10px; border-radius: 2px; overflow: hidden; }
.bar-t span { display: block; height: 100%; background: var(--navy-2); }
.bar:first-child .bar-t span { background: var(--gold); }
.bar-v { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* karşılaştırma sayfası */
.calc { padding: 18px 22px; margin: 14px 0; background: var(--soft); }
.calc label { display: block; margin: 4px 0; }
.calc p { margin: 10px 0 0; }
.calc output { font-size: 1.6rem; font-weight: 700; color: var(--navy); }
.money { display: inline-flex; align-items: center; }
.money::before { content: '$'; font-weight: 600; margin-right: 4px; color: var(--muted); }
.calc input { font: inherit; font-weight: 600; width: 130px; height: 40px; padding: 0 10px; border: 1px solid #c3ccd8; border-radius: 6px; background: #fff; }
.vs { display: grid; grid-template-columns: 1.3fr 1fr 1fr; overflow: hidden; }
.vs > div { padding: 12px 16px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.vs > div:nth-last-child(-n+3) { border-bottom: 0; }
.vs-h { font-weight: 700; background: var(--soft); }
.vs-l { color: var(--muted); }
.vs .win { font-weight: 700; color: var(--cheap); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { border: 1px solid var(--line); border-radius: 4px; padding: 6px 12px; font-size: .9rem; color: var(--ink); background: #fff; }
.chips a:hover { border-color: var(--link); color: var(--link); text-decoration: none; }

/* hesaplayıcı */
.tool2 { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; box-shadow: 0 8px 24px rgba(11,37,69,.08); }
.tf { padding: 22px; border-right: 1px solid var(--line); }
.f { margin-bottom: 16px; }
.f:last-child { margin-bottom: 0; }
.f label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.f select, .in { width: 100%; height: 44px; border: 1px solid #c3ccd8; border-radius: 6px; background: #fff; font: inherit; padding: 0 12px; color: var(--ink); }
.in { display: flex; align-items: center; gap: 6px; }
.in i { font-style: normal; color: var(--muted); }
.in input { border: 0; outline: 0; font: inherit; width: 100%; }
.f select:focus, .in:focus-within { outline: 2px solid var(--link); outline-offset: -1px; }
.tr { padding: 22px; background: var(--soft); }
.tr-h span { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); }
.tr-h b { display: block; font: 700 2.5rem/1.15 var(--serif); color: var(--navy); }
.tr-h em { font-style: normal; font-weight: 600; font-size: .9rem; }
.tr-h em.up { color: var(--dear); } .tr-h em.down { color: var(--cheap); }
.tr table { margin-top: 16px; font-size: .92rem; }
.tr td { padding: 8px 0; white-space: normal; border-color: var(--line); }

/* tablolar ve listeler */
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--soft); color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
tbody tr:hover { background: #fafbfd; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.grid a { padding: 14px 16px; display: flex; flex-direction: column; color: var(--ink); }
.grid a b { font-weight: 600; }
.grid a:hover { border-color: var(--link); text-decoration: none; }
.grid small { color: var(--muted); }
main > .grid:first-child { margin-top: 0; }

footer { max-width: 920px; margin: 0 auto; padding: 22px 16px 40px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
    .top nav a { margin-left: 14px; }
    .bar { grid-template-columns: 1fr 70px; } .bar-t { grid-column: 1 / -1; grid-row: 2; }
    .vs { font-size: .88rem; } .vs > div { padding: 10px; }
    .tool2 { grid-template-columns: 1fr; } .tf { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* --- animasyonlar --- */
@keyframes drift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* Bant yazıları görünmez başlamaz (yoksa Google 'en büyük içerik' süresini geç ölçer); yalnız hafifçe kayar. */
@keyframes slide { from { transform: translateY(10px); } to { transform: none; } }
.band .wrap > * { animation: slide .6s cubic-bezier(.2,.7,.2,1) both; }
.band .wrap > :nth-child(2) { animation-delay: .06s; } .band .wrap > :nth-child(3) { animation-delay: .12s; } .band .wrap > :nth-child(4) { animation-delay: .18s; }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
.js .reveal.shown { opacity: 1; transform: none; }
.js .bar-t span { transform: scaleX(0); transform-origin: left; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.js .bars.shown .bar-t span { transform: scaleX(1); }
.bars.shown .bar:nth-child(2) .bar-t span { transition-delay: .05s; } .bars.shown .bar:nth-child(3) .bar-t span { transition-delay: .1s; } .bars.shown .bar:nth-child(4) .bar-t span { transition-delay: .15s; } .bars.shown .bar:nth-child(5) .bar-t span { transition-delay: .2s; } .bars.shown .bar:nth-child(6) .bar-t span { transition-delay: .25s; } .bars.shown .bar:nth-child(7) .bar-t span { transition-delay: .3s; }
.card, .grid a, .chips a, .btn { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover, .grid a:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(11,37,69,.10); }
.chips a:hover, .btn:hover { transform: translateY(-1px); }
.tr-h b.pop { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.06); color: #1d4e89; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .js .reveal { opacity: 1; transform: none; } .js .bar-t span { transform: none; } }
.js .card.reveal.shown:hover, .js .grid a.reveal.shown:hover { transform: translateY(-3px); }

/* --- arama + alt menü --- */
.top .wrap { gap: 16px; }
.search { position: relative; flex: 1; max-width: 340px; }
.search input { width: 100%; height: 36px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; border-radius: 6px; padding: 0 12px; font: inherit; font-size: .92rem; transition: background .2s, border-color .2s; }
.search input::placeholder { color: #9fb1c8; }
.search input:focus { outline: 0; background: #fff; color: var(--ink); border-color: #fff; }
.search ul { position: absolute; top: 42px; left: 0; right: 0; z-index: 20; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(11,37,69,.18); animation: rise .18s ease both; }
.search li a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 5px; color: var(--ink); }
.search li a:hover, .search li a.on { background: var(--soft); text-decoration: none; }
.search li small { color: var(--muted); }
.search li.none { padding: 8px 10px; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 10px; }
.foot a { color: var(--ink); font-weight: 500; }
main > p { max-width: 720px; }
@media (max-width: 640px) { .top .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; } .search { order: 3; flex-basis: 100%; max-width: none; } }
.top { position: relative; z-index: 30; }

/* --- sıralama listeleri, SSS, tablo sıralama --- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; position: relative; margin-top: -60px; }
.rk-link { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 8px; color: var(--ink); box-shadow: 0 8px 24px rgba(11,37,69,.08); transition: transform .2s; }
.rk-link:hover { transform: translateY(-2px); text-decoration: none; }
.rk-link span { color: var(--muted); font-size: .9rem; }
.hint { color: var(--muted); font-size: .85rem; margin: -4px 0 8px; }
.rank { list-style: none; padding: 0; margin: -60px 0 16px; position: relative; display: grid; gap: 8px; }
.rank li { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 14px rgba(11,37,69,.05); }
.rk-n { font: 700 1.6rem var(--serif); color: var(--gold); text-align: center; }
.rank small { display: block; color: var(--muted); font-size: .85rem; }
.rk-v { text-align: right; }
.rk-v b { font-size: 1.2rem; } .rk-v small { display: inline; }
.tag { display: inline-block; margin-left: 8px; font-style: normal; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--soft); }
.tag.good { color: var(--cheap); } .tag.mid { color: var(--ok); } .tag.bad { color: var(--dear); }
.faq { border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-size: 1.2rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 18px 14px; color: var(--muted); animation: rise .25s ease both; }
table.sortable th { cursor: pointer; user-select: none; }
table.sortable th:hover { color: var(--ink); }
table.sortable th[data-dir]::after { content: ' ↑'; } table.sortable th[data-dir="desc"]::after { content: ' ↓'; }
@media (max-width: 640px) { .duo { grid-template-columns: 1fr; } .rank li { grid-template-columns: 32px 1fr; } .rk-v { grid-column: 2; text-align: left; } }

/* --- koyu tema: <html class="dark"> (sayfa başındaki betik kullanıcı seçimine ya da cihaz ayarına göre koyar) --- */
:root { --card: #fff; color-scheme: light; }
html.dark { --bg: #0d1520; --card: #141f2d; --soft: #1a2738; --ink: #e6ebf2; --muted: #93a1b3; --line: #253447; --link: #8fb8ea; --cheap: #8fb8ea; --ok: #e8b45a; --dear: #f08a80; color-scheme: dark; }
html.dark :is(.verdict, .card, .bars, .tw, .calc, .vs, .tool2, .grid a, .chips a, .f select, .in, .calc input, .search ul, .rk-link, .rank li, .faq) { background: var(--card); color: var(--ink); }
html.dark .in input { background: transparent; color: var(--ink); }
html.dark :is(.f select, .in, .calc input) { border-color: var(--line); }
html.dark :is(.tr, .calc) { background: var(--soft); }
html.dark :is(.tr-h b, .calc output) { color: var(--ink); }
html.dark .bar-t span { background: #4c78a8; }
html.dark .search input:focus { background: var(--card); color: var(--ink); border-color: var(--line); }
html.dark tbody tr:hover { background: var(--soft); }
html.dark :is(.verdict, .tool2, .rk-link, .rank li) { box-shadow: 0 8px 24px rgba(0,0,0,.35); }
body { transition: background .25s, color .25s; }

/* tema düğmesi */
.theme { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; font-size: 1rem; }
.theme:hover { background: rgba(255,255,255,.16); }
.theme .moon, html.dark .theme .sun { display: none; }
html.dark .theme .moon { display: inline; }

/* --- şehir karşılaştırma seçici, yaşam kartları --- */
.pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 0; padding: 12px 16px; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; }
.pick label { font-weight: 600; }
.pick select { flex: 1; min-width: 200px; height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; font: inherit; background: var(--card); color: var(--ink); }
.life { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.life .card b { font-size: 1.4rem; }
.life small.good { color: var(--cheap); } .life small.bad { color: var(--dear); }

/* --- şehir özeti, karşılaştırma sonucu --- */
.summary { font-size: 1.08rem; line-height: 1.7; margin: 16px 0 0; max-width: 760px; }
.bl { margin: 0; padding-left: 20px; font-size: 1.05rem; }
.bl li { margin: 6px 0; }

/* --- karşılaştırma merkezi --- */
.hub { columns: 3 240px; column-gap: 24px; }
.hub section { break-inside: avoid; margin-bottom: 18px; }
.hub h3 { font: 700 1rem var(--serif); margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.hub a { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: .92rem; }
.hub small { color: var(--muted); white-space: nowrap; }
.logo span { color: var(--gold); margin: 0 1px; font-style: italic; }

/* --- logo: ev simgesi + "salary vs rent" (kalın / mavi / ince) --- */
.logo { display: inline-flex; align-items: center; gap: 0; font: 400 1.3rem/1 var(--sans); letter-spacing: -.02em; }
.logo img { margin-right: 8px; }
.logo b { font-weight: 700; }
.logo span { color: #2f8fe8; font-weight: 700; font-style: normal; margin: 0; }
.logo i { font-style: normal; font-weight: 400; }

/* --- telefon: logo + linkler + tema tek satırda, arama altta; "Rankings" alt bilgide kalır --- */
@media (max-width: 640px) {
    .top .wrap { flex-wrap: wrap; height: auto; gap: 8px 10px; padding-top: 10px; padding-bottom: 10px; }
    .logo { order: 1; font-size: 1.1rem; }
    .logo img { width: 26px; height: 26px; margin-right: 6px; }
    .top nav { order: 2; margin-left: auto; }
    .top nav a { margin-left: 12px; font-size: .88rem; }
    .top nav .nav-wide { display: none; }
    .theme { order: 3; width: 32px; height: 32px; }
    .search { order: 4; flex-basis: 100%; max-width: none; }
    .band { padding: 16px 0 70px; }
    main { padding-top: 14px; }
    .card b { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; margin: 24px 0 8px; }
}
@media (max-width: 360px) { .top nav a { margin-left: 8px; font-size: .82rem; } }
/* telefon: kartlar ikişer yan yana, daha az kaydırma */
@media (max-width: 640px) {
    .cards { grid-template-columns: 1fr 1fr; gap: 8px; }
    .card { padding: 12px; }
    .card b { font-size: 1.25rem; }
    .card small { font-size: .75rem; line-height: 1.35; }
    .life .card b { font-size: 1.15rem; }
}
