/* EmlakHesapla — ortak stil
   Layout: tek sütunlu mobil öncelik; masaüstünde araç sayfası "form | sonuç" iki sütun.
   Konu detayı: mimari plan ızgarası ve ölçü çizgisi (ölçü oku) motifleri. */
:root {
  --paper: #F4F6F3;
  --surface: #FFFFFF;
  --ink: #13211F;
  --muted: #586663;
  --line: #D9E0DB;
  --brand: #0E5B57;
  --brand-ink: #FFFFFF;
  --brand-soft: #E3EEEA;
  --accent: #F2B134;
  --accent-ink: #2B1E00;
  --grid: rgba(14, 91, 87, .07);
  --wa: #1F8F4E;
  --shadow: 0 1px 2px rgba(19, 33, 31, .06), 0 8px 24px rgba(19, 33, 31, .06);

  --f-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r: 14px;
  --gut-l: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0D1513; --surface: #14201D; --ink: #E6EEEA; --muted: #9AABA6; --line: #263531;
    --brand: #5CC2B4; --brand-ink: #06221E; --brand-soft: #18302B; --accent: #F2B134; --accent-ink: #2B1E00;
    --grid: rgba(92, 194, 180, .06); --wa: #3DBA72; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0D1513; --surface: #14201D; --ink: #E6EEEA; --muted: #9AABA6; --line: #263531;
  --brand: #5CC2B4; --brand-ink: #06221E; --brand-soft: #18302B; --accent: #F2B134; --accent-ink: #2B1E00;
  --grid: rgba(92, 194, 180, .06); --wa: #3DBA72; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 6vw, 48px); font-weight: 800; }
h2 { font-size: clamp(22px, 3.6vw, 28px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding-left: var(--gut-l); padding-right: var(--gut-r); }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 20px/1 var(--f-display); letter-spacing: -.02em; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font: 800 15px/1 var(--f-display); }
.logo-mark sup { font-size: 9px; margin-left: 1px; }
.logo b { color: var(--brand); font-weight: 800; }
.top-link { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.top-link:hover { color: var(--brand); }

/* Hero / page head with plan grid */
.plan {
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  border-bottom: 1px solid var(--line);
}
.head { padding-block: 28px 32px; display: flex; flex-direction: column; gap: 12px; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.lede { color: var(--muted); font-size: 17px; max-width: 62ch; }
.lede strong { color: var(--ink); }

/* Ölçü çizgisi: |<———————>| */
.dim { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.dim::before, .dim::after { content: ""; height: 10px; border-left: 1.5px solid currentColor; }
.dim span { flex: 1; height: 1.5px; background: currentColor; opacity: .5; }
.dim em { font-style: normal; }

/* Tool layout */
.tool { display: grid; gap: 20px; padding-block: 24px; }
@media (min-width: 860px) { .tool { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .result { position: sticky; top: 16px; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .lbl { font-size: 14px; font-weight: 600; }
.hint { font-size: 13px; color: var(--muted); }
.input-wrap { position: relative; }
.input, select.input {
  width: 100%; font: 600 20px/1.2 var(--f-body); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 14px 52px 14px 14px; appearance: none; -webkit-appearance: none;
  font-variant-numeric: tabular-nums;
}
select.input { font-size: 17px; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
.input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); pointer-events: none; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: 4px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { text-align: center; padding: 10px 8px; border-radius: 7px; font-weight: 600; font-size: 15px; cursor: pointer; color: var(--muted); }
.seg input:checked + label { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + label { outline: 3px solid var(--accent); }
details.more summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--brand); }
details.more[open] summary { margin-bottom: 10px; }

/* Result */
.result { background: var(--brand); color: var(--brand-ink); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
.result .k { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.big { font: 800 clamp(44px, 10vw, 64px)/1 var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rows { display: grid; gap: 0; border-top: 1px solid color-mix(in srgb, var(--brand-ink) 22%, transparent); }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--brand-ink) 22%, transparent); font-variant-numeric: tabular-nums; }
.row span:first-child { opacity: .85; }
.row strong { font-weight: 700; text-align: right; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; padding: 5px 10px; border-radius: 999px; width: fit-content; }
.note { font-size: 13px; opacity: .85; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 16px/1 var(--f-body); padding: 15px 18px; border-radius: 11px; border: 0; cursor: pointer; text-decoration: none; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Story promo */
.promo { display: grid; gap: 14px; align-items: center; border: 1.5px dashed var(--brand); background: var(--brand-soft); border-radius: var(--r); padding: 18px; }
@media (min-width: 640px) { .promo { grid-template-columns: auto minmax(0, 1fr) auto; } }
.promo-phone { width: 54px; height: 92px; border-radius: 10px; border: 3px solid var(--brand); background: var(--surface); display: grid; place-items: center; font: 800 14px/1 var(--f-display); color: var(--brand); }
.promo p { color: var(--muted); font-size: 15px; }
.promo h3 { margin-bottom: 4px; }

/* Lead */
.lead { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
@media (min-width: 640px) { .lead { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.lead p { color: var(--muted); font-size: 15px; }
.lead small { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }

/* Content */
.content { display: grid; gap: 36px; padding-block: 12px 48px; }
.content > *, .tool > *, .cats > *, .hero > * { min-width: 0; }
.prose { display: flex; flex-direction: column; gap: 12px; max-width: 70ch; }
.prose p, .prose li { color: var(--ink); }
.formula { font: 600 15px/1.5 var(--f-body); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 14px; font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; font-weight: 700; }
tr.now td { background: var(--brand-soft); }
.faq { display: flex; flex-direction: column; gap: 8px; max-width: 70ch; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin-top: 8px; color: var(--muted); }
.disclaimer { font-size: 13px; color: var(--muted); max-width: 70ch; }

/* Tool grid (home) */
.cats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.cat h3 { display: flex; align-items: center; gap: 8px; }
.cat ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cat li { border-top: 1px solid var(--line); }
.cat li > a, .cat li > span { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.cat li a:hover { color: var(--brand); }
.cat li > span { color: var(--muted); font-weight: 500; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: var(--paper); color: var(--muted); white-space: nowrap; }
.tag.live { background: var(--accent); color: var(--accent-ink); }

.feature { display: grid; gap: 18px; background: var(--brand); color: var(--brand-ink); border-radius: calc(var(--r) + 4px); padding: 22px; text-decoration: none; }
@media (min-width: 720px) { .feature { grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding: 28px; } }
.feature .k { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.feature h2 { color: inherit; }
.feature .big { color: var(--accent); }

.section-title { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.section-title p { color: var(--muted); }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot .wrap { padding-block: 24px 32px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--muted); }
.foot a { color: var(--muted); }

/* Story dialog */
.sheet { border: 0; padding: 0; background: var(--surface); color: var(--ink); width: min(980px, 100vw); max-width: 100vw; max-height: 100dvh; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.sheet::backdrop { background: rgba(8, 18, 16, .6); }
@media (max-width: 720px) { .sheet { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; } }
.sheet-in { display: flex; flex-direction: column; height: 100%; max-height: inherit; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px var(--gut-r) 14px var(--gut-l); padding-top: max(14px, env(safe-area-inset-top, 0px)); border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 20px; }
.x { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 22px; cursor: pointer; line-height: 1; }
.sheet-body { overflow: auto; display: grid; gap: 20px; padding: 18px var(--gut-r) max(24px, env(safe-area-inset-bottom, 0px)) var(--gut-l); }
@media (min-width: 760px) { .sheet-body { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.story-preview { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.story-preview img { width: 100%; max-width: 300px; aspect-ratio: 9 / 16; border-radius: 14px; box-shadow: var(--shadow); background: var(--paper); object-fit: contain; }
@media (min-width: 760px) { .story-preview { order: 2; position: sticky; top: 0; } }
.story-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; max-width: 300px; }
.story-actions .hint { grid-column: 1 / -1; text-align: center; }
.opts { display: flex; flex-direction: column; gap: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 9px 14px; font: 600 14px/1 var(--f-body); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.swatch { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { outline: 3px solid var(--brand); outline-offset: 2px; }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.txt { width: 100%; font: 500 16px/1.2 var(--f-body); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; }
.txt:focus { border-color: var(--brand); outline: none; }
.file { display: flex; align-items: center; gap: 10px; }
.file-thumb { width: 52px; height: 52px; border-radius: 10px; border: 1.5px dashed var(--line); background: var(--paper) center / contain no-repeat; flex: none; }
.file-thumb.round { border-radius: 50%; background-size: cover; }
.file label.btn { padding: 11px 14px; font-size: 14px; }
.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: 600 13px var(--f-body); text-decoration: underline; cursor: pointer; width: fit-content; }
.privacy { font-size: 13px; color: var(--muted); background: var(--paper); border-radius: 10px; padding: 10px 12px; }

/* Hesaplayıcı ek parçalar */
.two { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 480px) { .two { grid-template-columns: 1fr 1fr; } }
.two > * { min-width: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.seg.three { grid-template-columns: repeat(3, 1fr); }
.seg.four { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 480px) { .seg.four { grid-template-columns: repeat(4, 1fr); } }
.row.total { border-bottom-width: 2px; font-size: 17px; }
.row.total span:first-child { opacity: 1; font-weight: 700; }
.row.sub span:first-child { padding-left: 12px; }
.callout { border-radius: 10px; padding: 12px 14px; font-size: 14px; background: color-mix(in srgb, var(--brand-ink) 12%, transparent); }
.warnbox { border-radius: 10px; padding: 12px 14px; font-size: 14px; background: var(--brand-soft); color: var(--ink); border-left: 4px solid var(--accent); }
.related ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.related a { display: inline-block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; }
.related a:hover { border-color: var(--brand); color: var(--brand); }
.subhead { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

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