:root {
  --bg: #f4efe6;
  --ink: #1a241f;
  --muted: #5d6b64;
  --line: rgba(28, 61, 50, 0.12);
  --card: rgba(255, 252, 247, 0.86);
  --forest: #1c3d32;
  --forest2: #2a5748;
  --gold-soft: #efe3cc;
  --coral: #b85c38;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #f7f2ea 0%, var(--bg) 40%, #efe6d8 100%);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
}
a { color: var(--forest); }
img { max-width: 100%; height: auto; }

.wrap { width: min(1040px, 100%); margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 28px; padding-bottom: 64px; }
main.article, main.page { max-width: 780px; }
main.home { max-width: 1040px; }

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; color: var(--forest); line-height: 1.25; font-weight: 600; }
h1 { font-size: clamp(26px, 6vw, 42px); margin: 8px 0 10px; letter-spacing: -0.02em; }
h2 { font-size: 25px; margin: 40px 0 10px; }
h3 { font-size: 20px; margin: 26px 0 6px; }
p, li { color: var(--ink); }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(244, 239, 230, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: "Fraunces", serif; font-weight: 600; font-size: 20px; color: var(--forest); }
.brand img { border-radius: 9px; }
.site-nav { display: flex; gap: 18px; margin-left: auto; }
.site-nav a { text-decoration: none; color: var(--forest2); font-weight: 500; font-size: 15px; }
.site-nav a[aria-current] { color: var(--forest); text-decoration: underline; text-underline-offset: 6px; }
@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-header .button { margin-left: auto; }
}

/* Buttons */
.button {
  display: inline-block; background: var(--forest); color: #f8f3ea; text-decoration: none;
  padding: 14px 22px; border-radius: 14px; font-weight: 600; box-shadow: 0 10px 24px rgba(28, 61, 50, 0.2);
}
.button.small { padding: 9px 16px; border-radius: 11px; font-size: 15px; box-shadow: none; }
.button.ghost { background: transparent; color: var(--forest); border: 1.5px solid var(--forest); box-shadow: none; }

/* Hero */
.hero { padding: 8px 0 0; }
.hero p.lead { font-size: 17px; color: var(--muted); margin: 0 0 4px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
main.home .hero h1 { margin-top: 4px; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 14px 0 8px; }
.hero-links .button { padding: 12px 18px; border-radius: 12px; font-size: 15px; box-shadow: none; }
.hero-links a:not(.button) { font-size: 15px; font-weight: 500; }
@media (max-width: 640px) {
  .hero-links { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-links .button { text-align: center; }
  .hero-links a:not(.button) { text-align: center; }
}

/* Sections */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; }
.feature, .card-link, .box, .card, .cta {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px;
}
.feature h3 { margin-top: 0; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 48px; margin: 16px 0; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold-soft); color: var(--forest); font-weight: 600; display: grid; place-items: center;
}

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 16px 0; }
.card-link { text-decoration: none; display: flex; flex-direction: column; gap: 6px; transition: transform .15s ease; }
.card-link:hover { transform: translateY(-2px); }
.card-link h3 { margin: 0; font-size: 18px; }
.card-link p { margin: 0; color: var(--muted); font-size: 15px; }
.card-link .more { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--forest2); }

/* Tables */
table.data { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 16px; background: var(--card); border-radius: 14px; overflow: hidden; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--gold-soft); color: var(--forest); font-weight: 600; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tr.total td { font-weight: 600; }
.table-scroll { overflow-x: auto; }

.box, .card { margin: 20px 0; }
.updated { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
table:not(.data) { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
table:not(.data) th, table:not(.data) td { text-align: left; vertical-align: top; padding: 10px; border-bottom: 1px solid var(--line); }
.box.note { background: #fbf6ec; border-left: 4px solid #c9a46a; }
.cta { margin: 40px 0 16px; text-align: center; }
.cta h2 { margin-top: 0; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0; }
.crumbs a { color: var(--muted); }
.meta { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.disclaimer { font-size: 14px; color: var(--muted); }
.related h2 { font-size: 21px; }
.ad-slot { margin: 28px 0; min-height: 0; }

/* Hesaplama araçları — mobil önce: sonuç üstte, alanlar iki sütun */
.calc {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "hi" "body" "lo";
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 20px;
  margin: 16px 0 8px;
  box-shadow: 0 12px 32px rgba(28, 61, 50, 0.08);
}
.calc-highlight { grid-area: hi; background: linear-gradient(160deg, #1c3d32, #2a5748); color: #f8f3ea; padding: 14px 16px 12px; border-radius: 20px 20px 0 0; }
.calc-body { grid-area: body; padding: 16px 16px 12px; min-width: 0; }
.calc-breakdown { grid-area: lo; background: #1c3d32; color: #f8f3ea; padding: 4px 16px 12px; border-radius: 0 0 20px 20px; }
.calc h3 { margin: 0 0 4px; font-size: 19px; }
.calc-intro { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: end; }
.calc-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.calc-form label span { min-height: 1.3em; line-height: 1.3; }
.calc-form label.wide { grid-column: 1 / -1; }
.calc-form input, .calc-form select {
  font: inherit; font-size: 16px; color: var(--ink); padding: 11px 12px;
  border: 1px solid rgba(28, 61, 50, 0.22); border-radius: 12px; background: #fff; width: 100%; min-width: 0;
  height: 46px;
}
.calc-form select {
  appearance: none;
  -webkit-appearance: none;
  text-overflow: ellipsis;
  padding-right: 36px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231c3d32' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 12px center;
  background-size: 16px;
}
.calc-form input:focus, .calc-form select:focus { outline: 2px solid var(--forest2); outline-offset: 1px; }
.calc-results-title { margin: 0 0 4px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; }
.calc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(248, 243, 234, 0.14); font-size: 14px; color: rgba(248, 243, 234, 0.82); }
.calc-row:last-child { border-bottom: none; }
.calc-row output { font-weight: 600; color: #f8f3ea; font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; }
.calc-row.primary { flex-direction: column; gap: 1px; padding: 6px 0 8px; border-bottom: 1px solid rgba(248, 243, 234, 0.18); }
.calc-row.primary output { font-family: "Fraunces", Georgia, serif; font-size: 22px; color: #efe3cc; line-height: 1.15; text-align: left; }
.calc-note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
main.home .calc h3, main.home .calc-intro { display: none; }
main.home .calc-note { display: none; }

@media (max-width: 859px) {
  .calc-row.primary { flex-direction: row; align-items: baseline; }
  .calc-row.primary output { font-size: 18px; text-align: right; }
  .calc-highlight .calc-row.primary + .calc-row.primary { border-bottom: none; padding-bottom: 2px; }
  .calc-breakdown {
    background: transparent;
    color: var(--ink);
    padding: 4px 16px 14px;
    border-radius: 0 0 20px 20px;
    border-top: 1px dashed var(--line);
  }
  .calc-breakdown .calc-row { color: var(--muted); border-bottom-color: var(--line); font-size: 13.5px; }
  .calc-breakdown .calc-row output { color: var(--forest); font-size: 14.5px; }
}

@media (min-width: 860px) {
  .calc {
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas: "body hi" "body lo";
  }
  .calc-highlight { border-radius: 0 20px 0 0; padding: 22px 22px 10px; }
  .calc-breakdown { border-radius: 0 0 20px 0; padding: 0 22px 18px; }
  .calc-body { padding: 22px; }
  .calc-form { max-width: 560px; }
  .calc-row.primary output { font-size: 26px; }
  .calc:not(:has(.calc-breakdown)) .calc-highlight { border-radius: 0 20px 20px 0; }
}

.glossary dt { font-weight: 600; color: var(--forest); margin-top: 14px; }
.glossary dd { margin: 2px 0 0; color: var(--ink); }
.sources { font-size: 15px; color: var(--muted); }
.sources a { color: var(--forest2); }

.author-box { display: flex; gap: 16px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 20px 0; }
.author-box img { border-radius: 12px; flex: none; }
.author-box p { margin: 4px 0 0; font-size: 15px; }
.figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; }
@media (min-width: 720px) { .figures { grid-template-columns: repeat(4, 1fr); } }
.figure { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.figure strong { display: block; font-family: "Fraunces", Georgia, serif; font-size: 22px; color: var(--forest); }
.figure span { font-size: 14px; color: var(--muted); }

details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 10px 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--forest); }
details p { margin: 10px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #ece2d2; padding: 32px 0; font-size: 15px; }
.site-footer .wrap { display: grid; gap: 16px; }
.site-footer p { margin: 4px 0 0; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer nav a { color: var(--forest2); text-decoration: none; }
.site-footer .copy { font-size: 13px; }
