:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #17212b;
  --muted: #5b6875;
  --border: #d8dfe7;
  --primary: #1f4e79;
  --primary-hover: #183e61;
  --primary-soft: #e5eef7;
  --on-primary: #ffffff;
  --accent: #0f766e;
  --accent-soft: #e2f3f1;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn-soft: #fff6e0;
  --warn-border: #f0d48a;
  --focus: #2f80d1;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 4px 16px rgb(16 24 40 / 6%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --surface: #171e26;
    --surface-2: #1e2731;
    --text: #e6ebf0;
    --muted: #9aa7b4;
    --border: #2c3946;
    --primary: #5b9bd5;
    --primary-hover: #7ab0e0;
    --primary-soft: #1b2b3c;
    --on-primary: #0b1520;
    --accent: #3fbfb3;
    --accent-soft: #15302e;
    --danger: #f08479;
    --danger-soft: #3a1d1b;
    --warn-soft: #2f2716;
    --warn-border: #6b5520;
    --focus: #7ab0e0;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; outline: none; padding-top: 28px; padding-bottom: 48px; }
a { color: var(--primary); }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
h3 { font-size: 1.05rem; margin: 0 0 .35rem; }
p { margin: 0 0 .9rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.container { width: 100%; max-width: 920px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.narrow { max-width: 560px; }

/* Üst çubuk */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--primary); text-decoration: none; }
.brand svg { flex: none; }
/* Logonun yanındaki ibare (site adı yazılmaz). Dar ekranda iki satıra kayar, KVKK düğmesine yer kalır. */
.brand-tag { font-size: .95rem; font-weight: 600; line-height: 1.25; color: var(--text); }
@media (max-width: 560px) { .brand-tag { font-size: .78rem; } }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a, .nav button { font-size: .925rem; }

.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 20px 0; font-size: .875rem; color: var(--muted); }
.footer p { margin: 0 0 .5rem; }

/* Kartlar */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
@media (max-width: 560px) { .card { padding: 18px; } }

/* Düğmeler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--primary); color: var(--on-primary); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--primary-hover); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--primary); padding: 0 10px; min-height: 38px; }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .875rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn-row.between { justify-content: space-between; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Ana sayfa */
.hero { text-align: center; padding: 16px 0 28px; }
.hero p { color: var(--muted); max-width: 620px; margin: 0 auto; font-size: 1.05rem; }
/* Reklam (RevIQ): alt yuva içeriğin altında ortalı; yan sütunlar yalnız geniş ekranda, içeriğin dışındaki boşlukta */
.reklam-alt { display: flex; justify-content: center; max-width: 100%; overflow: hidden; margin: 24px 0 8px; }
.reklam-yan { position: fixed; z-index: 1; display: flex; flex-direction: column; }
/* Reklam engelleyici kapısı (public/adblock.js) */
.adblock-kapi { position: fixed; inset: 0; z-index: 2147483600; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); }
.adblock-kutu { width: 100%; max-width: 440px; padding: 24px; text-align: center; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow); }
.adblock-simge { font-size: 2.2rem; }
.adblock-kutu h2 { margin: .5rem 0; }
.adblock-kutu .btn { width: 100%; margin-top: 12px; }
/* Çerez bildirimi */
.cerez { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 720px; margin: 0 auto; display: flex; gap: 12px; align-items: center;
  padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); font-size: .9rem; }
.cerez p { margin: 0; flex: 1; }
.cerez button { flex: none; padding: 8px 14px; border: 0; border-radius: 8px; background: var(--primary); color: #fff; font: inherit; cursor: pointer; }
@media (max-width: 640px) { .cerez { flex-direction: column; align-items: stretch; } }
.side-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .side-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .side-grid { grid-template-columns: 1fr; } }
.side-card {
  text-align: left; cursor: pointer; font: inherit; color: inherit;
  /* Buton içeriği varsayılan olarak dikeyde ortalanır; kartlar farklı uzunlukta metinle de üstten hizalansın */
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.side-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.side-card .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 12px; }
.side-card h2 { margin-bottom: .35rem; }
.side-card p { color: var(--muted); margin: 0; }
.steps-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
@media (max-width: 640px) { .steps-strip { grid-template-columns: 1fr; } }
.steps-strip div { padding: 16px; border-radius: var(--radius); background: var(--surface-2); }
.steps-strip b { display: block; margin-bottom: 4px; }

/* Soru ağacı */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .875rem; color: var(--muted); margin-bottom: 14px; }
.crumbs span:not(:last-child)::after { content: "›"; margin-left: 6px; }
.options { display: grid; gap: 10px; margin-top: 16px; }
.option {
  display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; padding: 14px 16px;
}
.option:hover { border-color: var(--primary); background: var(--primary-soft); }
.option b { display: block; }
.option span { color: var(--muted); font-size: .925rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--warn-soft); border: 1px solid var(--warn-border); margin-left: 6px; vertical-align: middle; }

/* Bilgi kutuları */
.note { border-radius: 10px; padding: 12px 14px; background: var(--primary-soft); font-size: .925rem; margin: 12px 0; }
.note ul { margin: 0; padding-left: 18px; }
.note li + li { margin-top: 4px; }
.note.warn { background: var(--warn-soft); border: 1px solid var(--warn-border); }
.note.ok { background: var(--accent-soft); }
.note.error { background: var(--danger-soft); color: var(--danger); }

/* İlerleme */
.progress { display: flex; gap: 4px; margin: 14px 0 6px; }
.progress i { flex: 1; height: 5px; border-radius: 3px; background: var(--border); }
.progress i.done { background: var(--primary); }
.step-label { font-size: .85rem; color: var(--muted); }

/* Form */
.field { margin-top: 16px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .help { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.field .err { font-size: .85rem; color: var(--danger); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.invalid input, .invalid select, .invalid textarea { border-color: var(--danger); }
.checks { display: grid; gap: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--primary); }

/* Özet */
.summary { width: 100%; border-collapse: collapse; font-size: .925rem; }
.summary th, .summary td { text-align: left; vertical-align: top; padding: 8px 0; border-bottom: 1px solid var(--border); }
.summary th { width: 42%; color: var(--muted); font-weight: 500; padding-right: 12px; }
.summary td { white-space: pre-wrap; word-break: break-word; }
.summary tr.group th { color: var(--text); font-weight: 700; padding-top: 16px; }

/* Sonuç */

/* Geçmiş listesi */

/* Ödeme penceresi */
.modal { position: fixed; inset: 0; background: rgb(0 0 0 / 55%); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-box { background: var(--surface); border-radius: var(--radius); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; padding: 16px; }
.modal-box iframe { width: 100%; height: 620px; border: 0; }

.spinner { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { text-align: center; }
.hidden { display: none !important; }

/* Tekrarlanabilir kalemler (ör. alacak kalemleri) */
.item { position: relative; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 16px 16px; margin: 12px 0 0; }
.item legend { font-weight: 600; padding: 0 6px; }
.item .field:first-of-type { margin-top: 8px; }
.item-del { position: absolute; top: -4px; right: 12px; background: var(--surface); border: 0; padding: 2px 6px; color: var(--danger); cursor: pointer; font: inherit; font-size: .875rem; }
.item-del:hover { text-decoration: underline; }

/* İcra dairesi öneri listesi */
.combo { position: relative; }
.suggest { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); max-height: 320px; overflow-y: auto; }
.suggest[hidden] { display: none; }
.suggest li { padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.suggest li small { color: var(--muted); font-size: .8rem; }
.suggest li:hover, .suggest li.active { background: var(--surface-2); }

/* İşlemiş faiz hesaplayıcısı (kalem içinde) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.faiz-calc { margin-top: 14px; padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface-2); }
.faiz-calc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.faiz-calc-row select { flex: 1 1 220px; }
.faiz-calc-row .faiz-oran { width: 110px; flex: 0 0 auto; }
.faiz-sonuc:empty { display: none; }
.faiz-sonuc { margin-top: 10px; }
.faiz-dokum ul { margin: 6px 0; padding-left: 18px; font-size: .875rem; }
.faiz-dokum .small { margin-top: 4px; }

/* Yasal bilgilendirme penceresi (açılışta, oturum bazlı) */
.onay-modal { z-index: 100; }
.onay-box { max-width: 640px; padding: 24px; }
.onay-box h2 { margin-top: 0; }
.onay-box p { line-height: 1.6; text-align: justify; }
.onay-check { margin: 16px 0 4px; font-weight: 600; }
.onay-box .small { margin-top: 10px; }
.onay-ozet { font-size: .9rem; }
