/* bihesap.net — tek stil dosyası. Harici font/CDN yok. */
:root {
  --navy: #0f2a4a;
  --navy-2: #274564;
  --teal: #0b6b76;
  --teal-bright: #0e9aa7;
  --teal-soft: #e6f6f7;
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --line: #dde5ee;
  --muted: #52627a;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 42, 74, .06), 0 4px 14px rgba(15, 42, 74, .05);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--navy); font: 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
code { background: var(--bg-soft); padding: .1em .35em; border-radius: 4px; font-size: .9em; }

:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.1rem; color: var(--navy-2); max-width: 60ch; }
.eyebrow { font-size: .85rem; font-weight: 600; margin: 0 0 .25rem; }
.eyebrow a { text-decoration: none; }

/* ---------- Üst bar: logo + kategori menüsü + arama aynı satırda ---------- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: relative; z-index: 20; }
.site-header .header-row { display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--navy); flex: none; }
.logo__text { font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.logo__text span { color: var(--teal); }

.search { position: relative; display: flex; flex: 1 1 260px; min-width: 0; gap: 8px; }
.search input[type="search"] {
  flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: .65rem .9rem; color: var(--navy);
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; -webkit-appearance: none; appearance: none;
}
.search input[type="search"]:focus { border-color: var(--teal-bright); outline: none; box-shadow: 0 0 0 3px rgba(14, 154, 167, .25); }
.search__btn { border: 0; background: var(--navy); color: #fff; width: 44px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; flex: none; }
.search__btn:hover { background: var(--teal); }
.search__btn .icon { width: 20px; height: 20px; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 340px; overflow: auto;
}
.suggest li a { display: block; padding: .55rem .7rem; border-radius: 8px; text-decoration: none; color: var(--navy); }
.suggest li a small { display: block; color: var(--muted); font-size: .8rem; }
.suggest li[aria-selected="true"] a, .suggest li a:hover { background: var(--teal-soft); }

/* Kategori menüsü (JS yoksa sarılan düz liste; JS varsa sığmayanlar "Diğer" menüsüne taşınır) */
.nav { flex: 1 1 100%; min-width: 0; }
.nav__list { display: flex; flex-wrap: wrap; gap: 2px 4px; list-style: none; margin: 0; padding: 0; }
.nav__item a, .nav__more-btn {
  display: flex; align-items: center; gap: 6px; min-height: 40px; padding: .4rem .75rem; border-radius: 8px; white-space: nowrap;
  color: var(--navy-2); text-decoration: none; font: inherit; font-size: .94rem; font-weight: 500; background: none; border: 0; cursor: pointer;
}
.nav__item a:hover, .nav__more-btn:hover, .nav__more-btn[aria-expanded="true"] { background: var(--bg-soft); color: var(--teal); }
.nav__item a[aria-current="page"] { color: var(--teal); background: var(--teal-soft); font-weight: 600; }
.nav__item.is-folded { display: none; }
.nav__more { position: relative; flex: none; }
.nav__chev { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.nav__more-btn[aria-expanded="true"] .nav__chev { transform: translateY(1px) rotate(-135deg); }
.nav__panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 220px; margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.nav__panel a { display: flex; align-items: center; min-height: 42px; padding: .45rem .75rem; border-radius: 8px; color: var(--navy-2); text-decoration: none; font-size: .94rem; font-weight: 500; }
.nav__panel a:hover { background: var(--bg-soft); color: var(--teal); }
.nav__panel a[aria-current="page"] { color: var(--teal); background: var(--teal-soft); font-weight: 600; }

.nav-toggle {
  display: none; flex: none; width: 44px; height: 44px; margin-left: auto; padding: 0; place-items: center; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--navy);
}
.nav-toggle:hover { border-color: var(--teal-bright); color: var(--teal); }
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline-flex; }

/* Dar ekran (telefon/tablet): logo solda, menü düğmesi sağda; kategoriler açılır panelde */
@media (max-width: 859px) {
  .site-header .header-row { flex-wrap: wrap; row-gap: 10px; }
  .logo { order: 1; }
  .nav-toggle { order: 2; display: grid; }
  .nav-toggle[hidden] { display: none; }
  .nav { order: 3; flex-basis: 100%; }
  .search { order: 4; flex-basis: 100%; }
  .js .nav { display: none; }
  .js .nav.is-open { display: block; }
  .js .nav__list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 0 6px; }
  .js .nav__item a { min-height: 46px; padding: .55rem .85rem; background: var(--bg-soft); font-size: 1rem; border-radius: 10px; }
  .js .nav__item a[aria-current="page"] { background: var(--teal-soft); }
  .js .nav__more { display: none; }
}
@media (max-width: 380px) {
  .js .nav__list { grid-template-columns: 1fr; }
}

/* Geniş ekran: tek satır; logo | kategoriler | arama */
@media (min-width: 860px) {
  .nav { flex: 1 1 0; }
  .nav__list { flex-wrap: nowrap; }
  .nav-toggle { display: none !important; }
  .search:not(.search--hero) { flex: 0 0 210px; }
  .search:not(.search--hero) .suggest { left: auto; right: 0; width: min(380px, 92vw); }
  /* JS çalışmadan önce taşmayı önlemek için güvenli ilk görünüm (JS ölçüp kesinleştirir) */
  .js .nav:not([data-fit]) .nav__item:nth-child(n+4) { visibility: hidden; }
}
@media (min-width: 1100px) {
  .search:not(.search--hero) { flex-basis: 250px; }
}

/* ---------- Genel yerleşim ---------- */
.main { min-height: 60vh; padding-bottom: 3rem; }
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: .9rem 0 .4rem; gap: 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; padding: 0 .5rem; color: var(--line); }
.crumbs a { color: var(--muted); }
.page-head { padding: 1.5rem 0 1rem; }
.section { margin: 2.25rem 0; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.section__head a { font-size: .92rem; white-space: nowrap; }

.hero { background: linear-gradient(180deg, var(--teal-soft), #fff); padding: 2.5rem 0 2rem; text-align: center; }
.hero__inner { max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: clamp(1.75rem, 5.2vw, 2.6rem); line-height: 1.18; max-width: 22ch; margin: 0 auto .85rem; text-wrap: balance; }
.hero .lead { font-size: clamp(1rem, 2.4vw, 1.15rem); max-width: 54ch; margin: 0 auto 1.5rem; text-wrap: balance; }
.search--hero { max-width: 640px; margin: 0 auto; flex: none; width: 100%; text-align: left; }
.search--hero input[type="search"] { padding: .85rem 1rem; font-size: 1.05rem; }
.search--hero .btn { flex: none; }
.hero__meta { margin: 1rem 0 0; }

/* ---------- Kartlar ---------- */
.grid { display: grid; gap: 12px; list-style: none; padding: 0; margin: 1rem 0 0; grid-template-columns: 1fr; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--teal-bright); box-shadow: var(--shadow); }
.card__link { display: flex; gap: 12px; padding: 14px; text-decoration: none; color: inherit; height: 100%; }
.card__icon { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; }
.card__icon .icon { width: 22px; height: 22px; }
.card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card__title { font-weight: 650; line-height: 1.3; }
.card__text { font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { font-size: .8rem; color: var(--teal); font-weight: 600; margin-top: 4px; }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); vertical-align: middle; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 1rem 0; }
.chips a { display: inline-block; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--navy-2); }
.chips a:hover { border-color: var(--teal-bright); color: var(--teal); }

.trust { margin-top: 3rem; }
.trust h2 { text-align: center; margin-bottom: 1.25rem; }
.trust__grid { display: grid; grid-template-columns: 1fr; gap: 14px; list-style: none; padding: 0; margin: 0; }
.trust__card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.trust__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; margin-bottom: 6px; }
.trust__icon .icon { width: 24px; height: 24px; }
.trust__card h3 { font-size: 1.05rem; margin: 0; }
.trust__card p { margin: 0; color: var(--navy-2); font-size: .96rem; line-height: 1.55; }
.trust__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 4px; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.trust__links a { display: inline-block; padding: .45rem .9rem; border-radius: 999px; text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--navy-2); border: 1px solid transparent; }
.trust__links a:hover { border-color: var(--line); color: var(--teal); background: var(--bg-soft); }

/* ---------- Araç sayfası ---------- */
.tool { max-width: 860px; }
.tool__head { padding: .75rem 0 1rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.fields { display: grid; gap: 16px; grid-template-columns: 1fr; }
.field label, .field .check { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--muted); }
.field .check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.field .check input { width: 22px; height: 22px; accent-color: var(--teal); }
.field input[type="text"], .field input[type="date"], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; /* 16px: iOS yakınlaştırmayı önler */ color: var(--navy); background: #fff;
  border: 1.5px solid #c3cfdd; border-radius: 10px; padding: .7rem .85rem; min-height: 46px;
}
.field textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal-bright); box-shadow: 0 0 0 3px rgba(14, 154, 167, .25); }
.input { position: relative; }
.input input { padding-right: 4.2rem !important; }
.input__unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; pointer-events: none; max-width: 3.6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.error { color: var(--danger); font-size: .88rem; font-weight: 600; margin: 6px 0 0; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--danger); background: var(--danger-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.25rem 0 .75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 650; cursor: pointer;
  padding: .75rem 1.5rem; min-height: 46px; border-radius: 10px; border: 1.5px solid var(--teal); background: var(--teal); color: #fff; text-decoration: none;
}
.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--ghost { background: #fff; color: var(--teal); }
.btn--ghost:hover { background: var(--teal-soft); color: var(--navy); border-color: var(--teal); }
.btn--small { padding: .5rem 1rem; min-height: 40px; font-size: .92rem; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }

.result-area { margin-top: 1.25rem; scroll-margin-top: 12px; }
.result-area:focus { outline: none; }
.result { background: var(--teal-soft); border: 1px solid #bfe6ea; border-left: 6px solid var(--teal-bright); border-radius: var(--radius); padding: 18px; }
.res--primary { display: flex; flex-direction: column; margin-bottom: .75rem; }
.res__label { font-size: .92rem; color: var(--navy-2); font-weight: 600; }
.res__value { font-size: clamp(1.7rem, 6vw, 2.4rem); line-height: 1.15; font-variant-numeric: tabular-nums; word-break: break-word; }
.res-list { margin: 0; display: grid; gap: 0; }
.res-list .res { display: flex; justify-content: space-between; gap: 16px; padding: .55rem 0; border-top: 1px solid #cdeaee; }
.res-list dt { color: var(--navy-2); }
.res-list dd { margin: 0; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.notes { margin: 1rem 0 0; padding-left: 1.1rem; font-size: .88rem; color: var(--navy-2); }
.notes li + li { margin-top: .35rem; }
.alert { border-radius: var(--radius); padding: 14px 16px; border: 1px solid; margin: 1rem 0; }
.alert ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.alert__title { font-weight: 700; margin: 0; }
.alert--error { background: var(--danger-soft); border-color: #f2b8b2; color: #7a1710; }
.alert--info { background: var(--teal-soft); border-color: #bfe6ea; color: var(--navy); }
.disclaimer { margin: 1rem 0; padding: .75rem 1rem; background: var(--bg-soft); border-radius: 10px; font-size: .88rem; color: var(--muted); }

.table-box { margin-top: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.table-box summary { cursor: pointer; padding: .75rem 1rem; font-weight: 650; }
.table-wrap { overflow: auto; max-height: 460px; border-top: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
th, td { padding: .5rem .75rem; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { position: sticky; top: 0; background: var(--bg-soft); font-weight: 650; border-bottom: 1px solid var(--line); }
tbody tr:nth-child(even) { background: #fafcfe; }

.example-inputs, .example-results { padding-left: 1.1rem; }
.faq { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.faq summary { cursor: pointer; padding: .8rem 1rem; font-weight: 600; }
.faq p { padding: 0 1rem; margin: 0 0 1rem; color: var(--navy-2); }

/* ---------- Yazı sayfaları ---------- */
.prose-wrap { max-width: 780px; }
.prose h2 { margin-top: 2rem; }
.prose li + li { margin-top: .3rem; }

/* ---------- Reklam alanları: normal akışta, içerikten ayrı, tıklamayı kışkırtmayan ---------- */
.ad { margin: 2.5rem 0; padding: .5rem 0; text-align: center; clear: both; overflow: hidden; }
.ad__label { display: block; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad--dev { border: 1px dashed #aab7c6; border-radius: 10px; color: var(--muted); padding: 1.25rem; font-size: .85rem; background: repeating-linear-gradient(45deg, #fff, #fff 10px, #f7f9fb 10px, #f7f9fb 20px); }

/* ---------- Alt bilgi ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 2rem 0 1rem; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.footer-title { font-weight: 700; margin: 0 0 .5rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li + li { margin-top: .35rem; }
.plain a { text-decoration: none; }
.plain a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .75rem; }

/* ---------- Geniş ekranlar ---------- */
@media (min-width: 640px) {
  .container { padding: 0 24px; }
  .fields { grid-template-columns: 1fr 1fr; }
  .field--wide { grid-column: 1 / -1; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid--cats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1.4fr 1fr; }
  .panel { padding: 24px; }
}
@media (min-width: 720px) {
  .trust__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--cats { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 4rem 0 2.5rem; }
}
@media (max-width: 639px) {
  .grid--2 { grid-template-columns: 1fr; }
  .res-list .res { flex-direction: column; gap: 2px; }
  .res-list dd { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .site-header, .nav, .site-footer, .ad, .actions, .search { display: none !important; }
}
