/* KIDEMHESAPLAMA — Legal-Mente-style deep-blue professional trust */
:root {
  --navy: #1B2A4A;
  --navy-deep: #0F1D33;
  --navy-card: #16263F;
  --blue: #2563EB;
  --blue-light: #60A5FA;
  --gold: #C9A227;
  --gold-soft: rgba(201, 162, 39, .14);
  --ink: #1A1A2E;
  --paper: #FFFFFF;
  --paper-warm: #F8F7F4;
  --muted: #64748B;
  --muted-light: #94A3B8;
  --green: #059669;
  --red: #DC2626;
  --line: rgba(255, 255, 255, .1);
  --radius: 14px;
  --shadow: 0 18px 50px rgba(2, 8, 23, .45);
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--navy-deep);
  color: #E8EDF5;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.num, .big-amount, .tavan-period, .formula { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.25; letter-spacing: -.01em; }
a { color: var(--blue-light); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 29, 51, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: #fff; text-decoration: none; }
.logo span { color: var(--gold); }
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: #CBD5E1; text-decoration: none; font-size: .92rem; font-weight: 500; }
.site-nav a:hover { color: #fff; }

/* ---------- Tavan banner ---------- */
.tavan-banner {
  background: linear-gradient(90deg, rgba(201,162,39,.16), rgba(201,162,39,.06));
  border-bottom: 1px solid rgba(201, 162, 39, .35);
}
.tavan-inner { display: flex; align-items: center; gap: 10px; padding: 10px 20px; }
.tavan-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); flex: none; }
.tavan-banner p { font-size: .88rem; color: #E8EDF5; }
.tavan-banner .num { font-weight: 700; color: var(--gold); font-size: 1rem; }
.tavan-period { color: var(--muted-light); margin-left: 6px; }
.tavan-src { display: block; font-size: .76rem; color: var(--muted-light); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 8px; text-align: center; }
.kicker {
  display: inline-block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(201,162,39,.4); border-radius: 999px;
  padding: 6px 16px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); color: #fff; margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--blue-light); }
.lede { max-width: 640px; margin: 0 auto 30px; color: var(--muted-light); font-size: 1.05rem; }

/* ---------- Tabs ---------- */
.tool-tabs { display: inline-flex; gap: 8px; background: rgba(255,255,255,.05); padding: 6px; border-radius: 999px; border: 1px solid var(--line); }
.tool-tab {
  border: 0; background: transparent; color: #CBD5E1; font: 600 .95rem var(--font-body);
  padding: 10px 26px; border-radius: 999px; cursor: pointer; transition: all .2s;
}
.tool-tab.active { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, .45); }
.tool-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Calculator ---------- */
.calculator { padding: 30px 0 10px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.calc-form {
  background: var(--navy-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.calc-form h2 { font-size: 1.4rem; color: #fff; margin-bottom: 8px; }
.form-hint { font-size: .9rem; color: var(--muted-light); margin-bottom: 20px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: .85rem; font-weight: 600; color: #CBD5E1; margin-bottom: 6px; }
.field > span b { color: var(--gold); }
.field input {
  width: 100%; padding: 13px 14px; font: 600 1.05rem var(--font-body); font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 10px; color: #fff;
}
.field input:focus { outline: none; border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(96,165,250,.25); }
.field input::placeholder { color: #475569; font-weight: 400; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.advanced { margin-bottom: 16px; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; }
.advanced summary { cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--blue-light); }
.advanced .field { margin: 12px 0 4px; }
.micro { font-size: .8rem; color: var(--muted-light); margin-top: 10px; }
.btn-primary {
  width: 100%; padding: 15px; font: 700 1.05rem var(--font-body); color: #fff;
  background: linear-gradient(135deg, var(--blue), #1D4ED8); border: 0; border-radius: 12px;
  cursor: pointer; transition: transform .15s, box-shadow .15s; margin-top: 6px;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(37,99,235,.4); }
.btn-primary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.error-box {
  background: rgba(220,38,38,.12); border: 1px solid rgba(220,38,38,.5); color: #FCA5A5;
  border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-size: .92rem;
}

/* ---------- Results ---------- */
.result-card {
  background: linear-gradient(160deg, #1B2A4A, #12203A);
  border: 1px solid rgba(201,162,39,.35); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); position: sticky; top: 140px;
}
.result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.result-head h3 { font-size: 1.25rem; color: #fff; }
.badge {
  font: 700 .72rem var(--font-body); letter-spacing: .08em; padding: 5px 12px; border-radius: 999px;
}
.badge.estimate { background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(201,162,39,.5); }
.badge.warn { background: rgba(220,38,38,.14); color: #FCA5A5; border: 1px solid rgba(220,38,38,.5); }
.big-amount { font-size: clamp(2rem, 4.5vw, 2.7rem); font-weight: 800; color: #fff; margin: 8px 0 16px; font-family: var(--font-body); }
.tavan-note {
  background: rgba(201,162,39,.1); border: 1px solid rgba(201,162,39,.4); border-radius: 10px;
  padding: 10px 14px; font-size: .88rem; margin-bottom: 16px; color: #FDE68A;
}
.tavan-ok {
  background: rgba(5,150,105,.1); border: 1px solid rgba(5,150,105,.4); border-radius: 10px;
  padding: 10px 14px; font-size: .88rem; margin-bottom: 16px; color: #6EE7B7;
}
.breakdown { border-top: 1px solid var(--line); margin-top: 6px; }
.bd-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.bd-row span:first-child { color: var(--muted-light); }
.bd-row .num { color: #E8EDF5; font-weight: 600; white-space: nowrap; }
.bd-row.bd-strong { border-bottom: 0; padding-top: 14px; }
.bd-row.bd-strong .num { color: var(--gold); font-size: 1.15rem; font-weight: 800; }
.band-note { background: rgba(37,99,235,.1); border: 1px solid rgba(37,99,235,.4); border-radius: 10px; padding: 10px 14px; font-size: .9rem; margin-bottom: 14px; }
.bands { margin-top: 16px; }
.bands h4 { font-family: var(--font-body); font-size: .85rem; color: var(--muted-light); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; }
.band-row { display: flex; justify-content: space-between; padding: 7px 12px; border-radius: 8px; font-size: .88rem; color: var(--muted-light); }
.band-row.band-active { background: rgba(37,99,235,.16); color: #fff; font-weight: 600; }
.legal-note { font-size: .82rem; color: var(--muted-light); margin-top: 14px; }
.disclaimer { font-size: .8rem; color: var(--muted-light); margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 10px; }

/* ---------- Tavan tracker ---------- */
.tavan-section { padding: 60px 0; }
.tavan-section h2, .method h2, .faq h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); color: #fff; margin-bottom: 10px; }
.section-lede { color: var(--muted-light); max-width: 680px; margin-bottom: 26px; }
.log-timeline { display: grid; gap: 12px; max-width: 680px; }
.log-row { display: flex; gap: 14px; background: var(--navy-card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.log-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); margin-top: 7px; flex: none; box-shadow: 0 0 8px var(--gold); }
.log-row strong { color: #fff; display: block; font-size: .95rem; }
.log-row .num { color: var(--gold); font-weight: 700; font-size: 1.05rem; margin-left: 10px; }
.log-row small { display: block; color: var(--muted-light); font-size: .78rem; margin-top: 2px; }

/* ---------- Methodology ---------- */
.method { padding: 20px 0 60px; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.method-card { background: var(--paper-warm); color: var(--ink); border-radius: var(--radius); padding: 26px; }
.method-card h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--navy); }
.formula { background: var(--navy-deep); color: var(--gold); border-radius: 8px; padding: 12px 16px; font-size: 1rem; margin-bottom: 14px; overflow-x: auto; }
.method-card ul { margin: 0 0 14px 18px; font-size: .92rem; }
.method-card li { margin-bottom: 6px; }
.example { font-size: .88rem; background: rgba(27,42,74,.06); border-radius: 8px; padding: 10px 14px; }
.disclaimer-box {
  margin-top: 22px; background: rgba(201,162,39,.08); border: 1px solid rgba(201,162,39,.35);
  border-radius: 12px; padding: 16px 20px; font-size: .9rem; color: #E8EDF5;
}

/* ---------- FAQ ---------- */
.faq { padding: 10px 0 70px; }
.faq-item { background: var(--navy-card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; color: #fff; cursor: pointer;
  font: 600 1rem var(--font-body); padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-q::after { content: '+'; color: var(--gold); font-size: 1.4rem; flex: none; }
.faq-item.open .faq-q::after { content: '−'; }
.faq-q:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a p { padding: 0 20px 18px; color: var(--muted-light); font-size: .93rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0; background: rgba(0,0,0,.25); }
.site-footer p { font-size: .9rem; color: #CBD5E1; }
.site-footer .micro { margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .calc-grid, .method-grid { grid-template-columns: 1fr; }
  .result-card { position: static; }
  .site-nav { display: none; }
  .hero { padding: 40px 0 4px; }
  .tool-tab { padding: 10px 18px; font-size: .88rem; }
  .tavan-src { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn-primary:hover { transform: none; }
}
