:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Neutral graphite surfaces — analytical dashboard, not a green demo form. */
  --bg: #0a0d0f;
  --panel: rgba(15, 18, 21, .96);
  --panel2: rgba(20, 24, 27, .92);
  --surface: rgba(255, 255, 255, .03);
  --surface-hover: rgba(255, 255, 255, .06);
  --border: rgba(180, 190, 196, .14);
  --border-strong: rgba(180, 190, 196, .24);
  --text: #eef1f2;
  --text-dim: #c3cbcd;
  --muted: #8e9a9c;
  --muted-2: #6c7678;

  /* Status colors — each carries a distinct meaning, text always backs them up. */
  --climate: #6fd67f;
  --climate-strong: #3fae57;
  --risk: #f0ad4e;
  --risk-strong: #d68f2e;
  --danger: #ea6a63;
  --evidence: #52b4c9;
  --evidence-strong: #2f8a9c;
  --water: #6f9fd6;
  --economic: #c9a24b;
  --economic-strong: #a8842f;

  /* Karar kümesi (A-E) renkleri — yalnızca görsel kimlik, hiçbiri diğerinin
     "altında" değildir; bkz. src/engine/decision-buckets.mjs */
  --bucket-a: #3fae57;
  --bucket-b: #c9a24b;
  --bucket-c: #52b4c9;
  --bucket-d: #6f9fd6;
  --bucket-e: #9098a0;

  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 9px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 28px;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; background: var(--bg); overflow: hidden; color: var(--text); }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { font-family: inherit; font-weight: 650; letter-spacing: -.01em; margin: 0; }
p { margin: 0; }

#map { position: fixed; inset: 0; z-index: 0; }

.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,.38);
  backdrop-filter: blur(16px);
}

/* ---------- Topbar ---------- */
.topbar {
  position: fixed; z-index: 600; left: 14px; right: 452px; top: 14px; height: 60px;
  padding: 8px 10px; border-radius: var(--radius-lg);
  display: flex; gap: 12px; align-items: center;
}
.brand { min-width: 178px; display: flex; align-items: center; gap: 10px; }
.brandMark {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  color: var(--climate); background: rgba(111,214,127,.09); font-size: 16px; flex: none;
}
.brandText { display: flex; flex-direction: column; line-height: 1.15; }
.brandText strong { font-size: 15px; font-weight: 700; }
.brandSub { font-size: 10px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

.searchWrap { position: relative; flex: 1; min-width: 200px; }
.searchBox {
  width: 100%; height: 42px; border: 1px solid var(--border); outline: 0;
  background: var(--surface); border-radius: var(--radius-sm); color: var(--text);
  padding: 0 14px; font-size: 13px;
}
.searchBox::placeholder { color: var(--muted); }
.searchBox:focus { border-color: rgba(111,214,127,.5); box-shadow: 0 0 0 3px rgba(111,214,127,.10); }
.searchResults {
  position: absolute; z-index: 999; top: 49px; left: 0; right: 0; padding: 6px;
  max-height: 340px; overflow: auto; border: 1px solid var(--border);
  background: rgba(12,15,17,.98); border-radius: var(--radius-md);
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.searchResult {
  width: 100%; text-align: left; cursor: pointer; padding: 10px 11px; border: 0;
  border-radius: var(--radius-sm); background: transparent; color: var(--text);
}
.searchResult:hover { background: var(--surface-hover); }
.searchResult strong, .searchResult span { display: block; }
.searchResult strong { font-size: 12px; margin-bottom: 3px; font-weight: 600; }
.searchResult span { color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.searchStatus { padding: 11px; font-size: 11px; color: var(--muted); }

.topActions { display: flex; align-items: center; gap: 8px; flex: none; }
.topButton, .iconButton {
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm);
  height: 42px; padding: 0 13px; cursor: pointer; font-size: 12px; white-space: nowrap;
}
.topButton:hover, .iconButton:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.topButtonIcon { padding: 0 12px; font-weight: 700; letter-spacing: .04em; }

/* ---------- Result panel (dashboard column) ---------- */
.panel {
  position: fixed; z-index: 650; top: 14px; right: 14px; bottom: 14px; width: 430px;
  border-radius: var(--radius-lg); display: flex; flex-direction: column; overflow: hidden;
}
.panelScroll { flex: 1; overflow: auto; padding: 16px 15px 20px; }
.panelHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.panelMenuWrap { position: relative; }
.panelMenu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 210px;
  background: var(--panel2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 8px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.panelMenu[hidden] { display: none; }
.panelMenuStatus { font-size: 10px; color: var(--muted); padding: 4px 6px; }
.panelMenuItem {
  text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: 11.5px; cursor: pointer;
}
.panelMenuItem:hover { background: var(--surface-hover); }
.statusPill {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--climate); background: rgba(111,214,127,.08); border: 1px solid rgba(111,214,127,.22);
  border-radius: 999px; padding: 5px 10px;
}
.locationBlock { margin-bottom: 12px; }
h1#locationTitle { font-size: 19px; line-height: 1.2; margin-bottom: 5px; }
.meta, .panelIntro { color: var(--muted); font-size: 12px; }
.panelIntro { margin: 0 0 12px; line-height: 1.5; }

.climateSummary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 12px 0 9px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden;
}
.climateStat { background: var(--panel2); padding: 9px 11px; }
.climateStat .csLabel { display: block; font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.climateStat .csValue { display: block; font-size: 14px; font-weight: 650; color: var(--text); }
.climateStat .csSub { display: block; font-size: 9.5px; color: var(--muted-2); margin-top: 2px; }

.coverageWarning {
  padding: 9px 11px; margin: 0 0 11px; border-radius: var(--radius-sm);
  border: 1px solid rgba(240,173,78,.3); background: rgba(240,173,78,.08);
  color: #f2c583; font-size: 10.5px; line-height: 1.5;
}

.disclaimer {
  padding: 8px 11px; margin: 0 0 12px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.025);
  color: var(--text-dim); font-size: 10px; line-height: 1.5;
}

/* ---------- Karar lensi sekmeleri (yalnızca 3 backend lensi; 198 ürünlük
   katalog ana navigasyonda YOKTUR — bkz. .catalogueView) ---------- */
.lensTabs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px;
  margin: 0 0 10px;
}
.lensTab {
  min-height: 45px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); border-radius: var(--radius-sm); padding: 7px 6px;
  cursor: pointer; font-size: 9.5px; line-height: 1.2; text-align: left;
}
.lensTab:hover { background: var(--surface-hover); }
.lensTab.active { color: #0a0d0f; background: var(--climate); border-color: var(--climate); font-weight: 700; }
.lensTabCount { display: inline-block; margin-left: 3px; font-variant-numeric: tabular-nums; }
.activeLensHead { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 8px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel2); }
.activeLensHeadText { flex: 1; min-width: 0; }
.activeLensHead h2 { font-size: 12px; font-weight: 700; color: var(--text-dim); }
.activeLensHead p { font-size: 10px; color: var(--muted); line-height: 1.4; margin-top: 2px; }

/* ---------- Grup filtresi (userFacingGroups: Tümü + 5 sabit grup) ---------- */
.segmentTabs {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0 0 12px;
  border-bottom: 1px solid var(--border);
}
.segmentChip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim);
  border-radius: 999px; padding: 6px 11px; font-size: 10.5px; cursor: pointer; display: inline-flex;
  align-items: center; gap: 6px; line-height: 1;
}
.segmentChip:hover { background: var(--surface-hover); }
.segmentChip.active { color: #0a0d0f; background: var(--climate); border-color: var(--climate); font-weight: 650; }
.segmentChipCount {
  font-size: 9px; background: rgba(255,255,255,.12); border-radius: 999px; padding: 2px 6px;
}
.segmentChip.active .segmentChipCount { background: rgba(0,0,0,.18); }

/* ---------- Ürün Kataloğu (ikincil görünüm — "•••" menüsünden açılır) ---------- */
.catalogueHead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.catalogueHeadText h2 { font-size: 15px; font-weight: 700; }
.catalogueHeadText p { font-size: 10.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.catalogueSearch {
  width: 100%; height: 38px; border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-sm); padding: 0 12px; font-size: 12px; color: var(--text); margin-bottom: 12px;
}

.recommendations { display: flex; flex-direction: column; gap: 7px; }
.emptyState {
  padding: 26px 16px; border: 1px dashed var(--border); border-radius: var(--radius-md);
  color: var(--muted); font-size: 11px; text-align: center; line-height: 1.6;
}

/* ---------- Crop card ---------- */
.cropCard {
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-md);
  overflow: hidden; transition: border-color .12s ease;
}
.cropCard.selected {
  border-color: rgba(111,214,127,.5);
  background: linear-gradient(180deg, rgba(63,174,87,.14), var(--surface) 60%);
}
.cropMain {
  display: grid; grid-template-columns: 20px 36px 1fr auto; gap: 9px; align-items: center;
  padding: 10px 11px; cursor: pointer;
}
.rank { color: var(--muted-2); text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; }
.cropIcon {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius-sm);
  font-size: 18px; background: rgba(255,255,255,.05); flex: none;
}
.cropTitleRow { min-width: 0; }
.cropNameRow { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.cropName { font-size: 13.5px; font-weight: 650; line-height: 1.25; }
.scientific { font-size: 10px; color: var(--muted-2); font-style: italic; margin-top: 2px; }
.cropSummaryLine { font-size: 10px; color: var(--muted); margin-top: 4px; }

.statusPillMini {
  font-size: 8.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px; white-space: nowrap;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis;
}
.statusPillMini.strong { background: rgba(63,174,87,.16); color: #8fe39d; }
.statusPillMini.ok { background: rgba(111,214,127,.14); color: #b3ecba; }
.statusPillMini.moderate { background: rgba(240,173,78,.15); color: #f2c583; }
.statusPillMini.weak { background: rgba(234,106,99,.13); color: #f3b0ab; }
.statusPillMini.muted { background: rgba(82,180,201,.14); color: #a9dbe6; }
.statusPillMini.conflict { background: rgba(240,173,78,.18); color: #f2c583; }

.score { font-size: 16px; color: var(--climate); white-space: nowrap; font-weight: 650; text-align: right; }
.score small { color: var(--muted); font-size: 9.5px; font-weight: 500; }
.scoreBlock { text-align: right; }
/* İklim puanı olmayan ürünlerde (climateSuitability=null) skor yerine kısa bir
   sayı yerine tam, açıklayıcı bir durum metni gösterilir — ASLA 0 değil. */
.scoreStatusText {
  display: inline-block; max-width: 108px; font-size: 9.5px; line-height: 1.35;
  color: var(--evidence); font-weight: 600; text-align: right;
}

/* ---------- Expanded card ---------- */
.details { border-top: 1px solid var(--border); padding: 4px 13px 15px 65px; }
.details h3 {
  color: var(--text); font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; margin: 15px 0 8px; display: flex; align-items: center; gap: 7px;
}
.details h3:first-child { margin-top: 13px; }
.details h3 .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--muted-2); flex: none; }
.details h3.climate .dot { background: var(--climate); }
.details h3.water .dot { background: var(--water); }
.details h3.evidence .dot { background: var(--evidence); }
.details h3.economic .dot { background: var(--economic); }
.details h3.warn .dot { background: var(--risk); }
.details h4 {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--evidence); margin: 12px 0 6px;
}
.details h4 small { text-transform: none; font-weight: 500; letter-spacing: 0; color: var(--muted); font-size: 9.5px; }

.factor { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; padding: 4.5px 0; color: var(--text-dim); }
.factor strong { color: var(--text); text-align: right; font-weight: 600; }

.decisionSummary {
  display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 6px;
}
.decisionRow { background: var(--panel2); padding: 9px 11px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.decisionRow .drLabel { font-size: 10.5px; color: var(--muted); }
.decisionRow .drValue { font-size: 12.5px; font-weight: 650; color: var(--text); text-align: right; }

.warning {
  margin-top: 10px; border-radius: var(--radius-sm); padding: 9px 11px;
  background: rgba(240,173,78,.08); color: #f2c583; border: 1px solid rgba(240,173,78,.28);
  font-size: 10.5px; line-height: 1.5;
}
.warning.danger { background: rgba(234,106,99,.09); color: #f3b0ab; border-color: rgba(234,106,99,.3); }
.warning.info { background: rgba(82,180,201,.08); color: #a9dbe6; border-color: rgba(82,180,201,.26); }

.techDetails { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 4px; }
.techDetails summary {
  cursor: pointer; font-size: 10.5px; font-weight: 650; color: var(--muted); padding: 9px 2px;
  text-transform: uppercase; letter-spacing: .05em; list-style: none;
}
.techDetails summary::-webkit-details-marker { display: none; }
.techDetails summary::before { content: '▸ '; color: var(--muted-2); }
.techDetails[open] summary::before { content: '▾ '; }
.techDetails .factor { font-size: 10.5px; }

/* ---------- Bottom decision bar ---------- */
.summary {
  position: fixed; z-index: 620; left: 50%; bottom: 20px; transform: translateX(calc(-50% - 222px));
  min-width: 560px; height: 72px; padding: 10px 12px 10px 22px; border-radius: var(--radius-lg);
  display: flex; align-items: center; gap: 20px;
}
.summaryBlock { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.summaryLabel { color: var(--muted); font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; }
#summaryScore { color: var(--climate); font-size: 22px; font-weight: 700; }
#summaryCrop { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
#summaryArea { font-size: 12px; color: var(--text-dim); }
.separator { width: 1px; height: 36px; background: var(--border); flex: none; }
.primaryButton {
  margin-left: auto; height: 48px; border: 1px solid rgba(111,214,127,.4); padding: 0 20px;
  background: linear-gradient(180deg, #3fae57, #2c7d40); border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 650; font-size: 12.5px; color: #071008; flex: none;
}
.primaryButton.full { width: 100%; margin: 16px 0 0; color: var(--text); background: linear-gradient(180deg, #318547, #286d3b); }

.toast {
  position: fixed; z-index: 900; left: 50%; top: 84px; transform: translateX(-50%);
  max-width: 520px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: rgba(10,13,15,.98); color: var(--text-dim); font-size: 11px; box-shadow: 0 18px 50px rgba(0,0,0,.4);
}

.modal {
  position: fixed; z-index: 850; top: 90px; left: 50%; transform: translateX(-50%);
  width: min(460px, calc(100vw - 30px)); border-radius: var(--radius-lg); padding: 20px;
}
.modalHead { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.modal h2 { font-size: 18px; }
.modal p { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 10px 0; }
.eyebrow { color: var(--climate); font-size: 9px; letter-spacing: .12em; font-weight: 700; }

.sectionDivider {
  display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; color: var(--muted);
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.sectionDivider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.leaflet-control-zoom { margin-top: 90px !important; }

/* ---------- Rapor / yazdırma görünümü ---------- */
/* Ekranda "rapor modu": harita/topbar/panel/summary/toast/modal tamamen
   gizlenir, #reportView temiz, aydınlık, kaydırılabilir bir doküman olarak
   gösterilir. Uygulama kromu (filtreler, butonlar, harita kontrolleri)
   rapora ASLA girmez. */
body.reportMode #map,
body.reportMode .topbar,
body.reportMode .panel,
body.reportMode .summary,
body.reportMode .toast,
body.reportMode #landFinder,
body.reportMode .leaflet-control-container {
  display: none !important;
}

.reportView {
  position: fixed; inset: 0; z-index: 950; overflow: auto;
  background: #f4f5f2; color: #1b1e1c;
}
.reportToolbar {
  position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  gap: 10px; padding: 12px 24px; background: rgba(244,245,242,.96); border-bottom: 1px solid rgba(0,0,0,.1);
  backdrop-filter: blur(6px);
}
.reportToolbar .topButton { border-color: rgba(0,0,0,.16); background: rgba(0,0,0,.03); color: #1b1e1c; }
.reportToolbar .topButton:hover { background: rgba(0,0,0,.07); }
.reportToolbar .primaryButton { margin-left: 0; }

.reportContent {
  max-width: 780px; margin: 0 auto; padding: 34px 40px 60px; font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
.reportHead { border-bottom: 2px solid #1b1e1c; padding-bottom: 16px; margin-bottom: 20px; }
.reportBrand { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #4a7a55; }
.reportHead h1 { font-size: 24px; margin: 8px 0 12px; color: #101211; }
.reportMetaGrid { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 10px; }
.reportMetaGrid div { display: flex; flex-direction: column; gap: 2px; }
.reportMetaGrid span { font-size: 9px; text-transform: uppercase; letter-spacing: .04em; color: #7a827d; }
.reportMetaGrid strong { font-size: 12.5px; color: #101211; font-weight: 650; }
.reportLead { font-size: 11.5px; color: #4a534d; line-height: 1.6; }

.reportSection { margin: 20px 0; }
.reportSection h2 {
  font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: #101211;
  padding-bottom: 7px; margin-bottom: 12px; border-bottom: 1px solid rgba(0,0,0,.14);
  break-after: avoid;
}
.reportIntro { font-size: 11.5px; color: #55605a; margin-bottom: 14px; line-height: 1.6; }

.reportHighlight { background: #eef3ea; border: 1px solid #cfe0ce; border-radius: 8px; padding: 14px 18px; }
.reportHighlight h2 { border-bottom: none; margin-bottom: 8px; padding-bottom: 0; }
.reportHighlightList { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 20px; }
.reportHighlightList li { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: #2c322e; }
.reportHighlightList strong { font-size: 18px; color: #2f6b3c; font-weight: 750; min-width: 22px; }

.reportGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(0,0,0,.1); border: 1px solid rgba(0,0,0,.1); break-inside: avoid; }
.reportGrid > div { background: #fff; padding: 10px 12px; }
.reportGrid span { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; color: #7a827d; margin-bottom: 3px; }
.reportGrid strong { font-size: 13px; color: #101211; }
.reportWarning { margin-top: 10px; font-size: 11px; color: #8a5a1a; background: #fbf0dc; border: 1px solid #eccf9c; border-radius: 6px; padding: 8px 10px; }

.reportLens { margin: 0 0 18px; break-inside: auto; }
.reportLens h3 { font-size: 12.5px; display: flex; align-items: center; gap: 8px; color: #101211; margin-bottom: 3px; break-after: avoid; }
.reportLensCount { font-weight: 500; color: #7a827d; font-size: 11px; }
.reportLensDesc { font-size: 10.5px; color: #55605a; margin: 3px 0 9px; line-height: 1.5; }
.reportEmptyNote {
  font-size: 10.5px; color: #7a827d; font-style: italic; margin: 0; padding: 8px 10px;
  background: #f4f5f2; border: 1px dashed #d5d9d2; border-radius: 6px;
}
.reportTable { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.reportTable thead { display: table-header-group; }
.reportTable tr { break-inside: avoid; }
.reportTable th, .reportTable td { text-align: left; padding: 5px 8px; border-bottom: 1px solid rgba(0,0,0,.08); }
.reportTable th { font-size: 9px; text-transform: uppercase; letter-spacing: .04em; color: #7a827d; font-weight: 600; }
.reportNote { font-size: 10px; color: #7a827d; margin-top: 6px; }

.reportList { margin: 0; padding-left: 18px; font-size: 11.5px; color: #2c322e; line-height: 1.7; }
.reportSourcesLabel { font-size: 11px; font-weight: 650; color: #101211; margin: 12px 0 4px; }
.reportSourcesList { margin: 0; padding-left: 18px; font-size: 11.5px; color: #2c322e; line-height: 1.7; }
.reportFooter { margin-top: 24px; padding-top: 14px; border-top: 1px solid rgba(0,0,0,.12); font-size: 10px; color: #7a827d; text-align: center; break-before: avoid; }

@media print {
  @page { margin: 14mm; }
  body * { visibility: hidden; }
  #reportView, #reportView * { visibility: visible; }
  #reportView { position: absolute; inset: 0; overflow: visible; background: #fff; }
  .noPrint { display: none !important; }
  .reportContent { max-width: none; padding: 0; }
  /* Yalnız KÜÇÜK, sınırlı bloklar bölünmeden tutulur — büyük .reportSection
     kapsayıcısına break-inside:avoid uygulanmaz; aksi halde sayfaya sığmayan
     tüm bölüm bir sonraki sayfaya atlar ve önceki sayfada büyük boş alan
     kalır (önceki sürümdeki büyük boşluk hatasının kök nedeni buydu). */
  .reportGrid, .reportHighlight { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
}

@media (max-width: 1180px) {
  .panel { width: 400px; }
  .topbar { right: 414px; }
  .summary { transform: translateX(calc(-50% - 207px)); }
}

@media (max-width: 900px) {
  .topbar { right: 14px; }
  .brand { min-width: 0; }
  .brandSub { display: none; }
  .topbar > .topActions > .topButton:not(#drawButton):not(#landFinderButton):not(#importButton) { display: none; }
  .panel { top: auto; width: calc(100% - 20px); left: 10px; right: 10px; height: 50vh; }
  .summary { display: none; }
  .searchResults { min-width: 280px; }
  .details { padding-left: 14px; }
  .reportContent { padding: 24px 18px 40px; }
  .reportGrid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .topbar { padding: 8px; gap: 8px; height: 54px; }
  .brandText { display: none; }
  .brandMark { width: 30px; height: 30px; }
  .searchWrap { min-width: 0; }
  .searchBox { height: 38px; padding: 0 10px; font-size: 12px; }
  .topActions { gap: 6px; }
  .topButton { height: 38px; padding: 0 10px; font-size: 11px; }
}


/* TURKEY HEATMAP V1 */

.turkeyHeatmapCanvas {
  image-rendering: auto;
}

body.heatmapMode .panel,
body.heatmapMode .summary {
  display: none !important;
}

body.heatmapMode .leaflet-draw {
  display: none !important;
}

.heatmapControl {
  width: min(370px, calc(100vw - 32px));
  padding: 15px 16px;
  margin: 0 0 18px 18px !important;
  color: #f5f7f5;
  border-radius: 16px;
  background: rgba(16, 23, 19, 0.91);
  border: 1px solid rgba(255,255,255,0.13);
  box-shadow: 0 16px 46px rgba(0,0,0,0.32);
  backdrop-filter: blur(18px);
}

.heatmapControlHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.heatmapControlHead strong {
  display: block;
  margin-top: 3px;
  font-size: 19px;
  line-height: 1.2;
}

.heatmapEyebrow {
  color: rgba(255,255,255,0.58);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}

.heatmapClose {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: rgba(255,255,255,0.08);
  color: white;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.heatmapLegend {
  margin-top: 14px;
}

.heatmapLegendBar {
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      hsl(0 78% 45%),
      hsl(60 78% 45%),
      hsl(120 78% 45%)
    );
}

.heatmapLegendScale {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: rgba(255,255,255,0.62);
  font-size: 10px;
}

.heatmapControlStatus {
  margin: 11px 0 0;
  color: rgba(255,255,255,0.82);
  font-size: 12px;
  line-height: 1.4;
}

.heatmapControlNote {
  margin: 9px 0 0;
  color: rgba(255,255,255,0.58);
  font-size: 11px;
  line-height: 1.45;
}

.heatmapReturn {
  width: 100%;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
  color: white;
  cursor: pointer;
  font: inherit;
}

.heatmapReturn:hover,
.heatmapClose:hover {
  background: rgba(255,255,255,0.13);
}

.heatmapPopup {
  min-width: 210px;
  color: #18211b;
}

.heatmapPopup p {
  margin: 8px 0 0;
  line-height: 1.45;
}

.heatmapPopupHead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 15px;
}

.heatmapPopupHead b {
  font-size: 18px;
}

.heatmapPopupGrade,
.heatmapPopupState {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
}

.heatmapPopupFactors {
  display: grid;
  gap: 4px;
  margin-top: 9px;
}

.heatmapPopupFactors > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
}

@media (max-width: 720px) {
  .heatmapControl {
    width: calc(100vw - 24px);
    margin: 0 0 12px 12px !important;
  }
}


.heatmapPopupLocation {
  margin: 6px 0 7px;
  padding: 6px 0 7px;
  border-top: 1px solid rgba(0,0,0,0.08);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  line-height: 1.3;
}

.heatmapPopupLocation strong {
  display: block;
  font-size: 12px;
}

.heatmapPopupLocation small {
  display: block;
  margin-top: 2px;
  color: rgba(24,33,27,0.58);
  font-size: 10px;
  font-weight: 500;
}


/* FINAL V1 INVESTMENT REPORT */

.reportScopeWarning {
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid #e3d09e;
  border-radius: 7px;
  background: #fff7e3;
  color: #71541c;
  font-size: 10.5px;
  line-height: 1.5;
}

.reportEvidenceGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reportEvidenceCard {
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  break-inside: avoid;
}

.reportEvidenceHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.reportEvidenceHead h3 {
  margin: 0;
  font-size: 11.5px;
  color: #101211;
}

.reportEvidenceHead > span {
  max-width: 55%;
  text-align: right;
  font-size: 9px;
  color: #66706a;
}

.reportEvidenceCard p {
  margin: 8px 0 0;
  color: #58615b;
  font-size: 9.7px;
  line-height: 1.5;
}

.reportMiniGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.08);
}

.reportMiniGrid > div {
  background: #f8f9f7;
  padding: 7px 8px;
}

.reportMiniGrid span {
  display: block;
  margin-bottom: 2px;
  color: #7a827d;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.reportMiniGrid strong {
  display: block;
  color: #151816;
  font-size: 10px;
  line-height: 1.3;
}

.reportDecisionTable td:first-child strong {
  display: block;
}

.reportDecisionTable td:first-child small {
  display: block;
  margin-top: 2px;
  color: #747b76;
}

.reportTableWrap {
  width: 100%;
  overflow-x: auto;
}

.reportChecklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.reportChecklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #d9ddd8;
  background: #fff;
  break-inside: avoid;
}

.reportChecklist li > span {
  color: #4a7a55;
  font-size: 14px;
  line-height: 1.1;
}

.reportChecklist p {
  margin: 0;
  color: #303632;
  font-size: 10.5px;
  line-height: 1.5;
}

.reportPreparing {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #1b1e1c;
  text-align: center;
}

.reportPreparing strong {
  font-size: 16px;
}

.reportPreparing span {
  color: #69716c;
  font-size: 11px;
}

@media print {
  .reportEvidenceCard,
  .reportChecklist li {
    break-inside: avoid;
  }

  .reportTableWrap {
    overflow: visible;
  }
}

@media (max-width: 700px) {
  .reportEvidenceGrid {
    grid-template-columns: 1fr;
  }

  .reportMiniGrid {
    grid-template-columns: 1fr 1fr;
  }
}


/* === UI CLEANUP V1: MOBILE START === */

/*
  Uygulama ekranı için son responsive katman.
  Print/rapor düzenine uygulanmaz.
*/
@media screen and (max-width: 900px) {
  .panel {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: calc(100% - 20px);
    height: min(56dvh, 560px);
    max-height: calc(100dvh - 104px);
    border-radius: 16px;
  }

  .panelScroll {
    padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
  }

  .lensTabs {
    gap: 4px;
  }

  .lensTab {
    min-height: 48px;
  }

  .toast {
    width: auto;
    max-width: calc(100vw - 28px);
  }
}

@media screen and (max-width: 560px) {
  /*
    Telefonda üst bar iki satır:
    marka ve işlemler üstte, arama tüm genişlikte altta.
  */
  .topbar {
    left: 8px;
    right: 8px;
    top: 8px;
    height: auto;
    min-height: 92px;
    padding: 8px;
    gap: 7px 8px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "brand actions"
      "search search";
    align-items: center;
    border-radius: 14px;
  }

  .brand {
    grid-area: brand;
    min-width: 0;
  }

  .brandText {
    display: none;
  }

  .brandMark {
    width: 30px;
    height: 30px;
  }

  .searchWrap {
    grid-area: search;
    width: 100%;
    min-width: 0;
  }

  .searchBox {
    height: 38px;
    padding: 0 11px;
    font-size: 12px;
  }

  /*
    Arama dropdown'u dar searchWrap genişliğine hapsolmaz.
  */
  .searchResults {
    position: fixed;
    top: 108px;
    left: 8px;
    right: 8px;
    width: auto;
    min-width: 0;
    max-height: min(42dvh, 320px);
  }

  .topActions {
    grid-area: actions;
    justify-self: end;
    gap: 5px;
  }

  .topButton,
  .iconButton {
    height: 34px;
    padding: 0 9px;
    font-size: 10.5px;
  }

  /*
    Sonuç paneli haritayı tamamen kapatmaz ama içerik için
    masaüstündeki 50vh'den biraz daha kullanışlı alan sağlar.
  */
  .panel {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: calc(100% - 16px);
    height: min(57dvh, 560px);
    max-height: calc(100dvh - 122px);
    border-radius: 14px;
  }

  .panelScroll {
    padding: 12px 10px calc(16px + env(safe-area-inset-bottom));
  }

  .panelHead {
    margin-bottom: 8px;
  }

  .locationBlock {
    margin-bottom: 9px;
  }

  h1#locationTitle {
    font-size: 17px;
  }

  .meta,
  .panelIntro {
    font-size: 10.5px;
  }

  .panelIntro {
    margin-bottom: 9px;
  }

  .climateSummary {
    margin: 9px 0 8px;
  }

  .climateStat {
    padding: 8px 9px;
  }

  /*
    Üç karar görünümü ekrana birlikte sığmaya devam eder.
    Dikey üç buton yapıp ürün listesini aşağı itmiyoruz.
  */
  .lensTabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 8px;
  }

  .lensTab {
    min-height: 52px;
    padding: 6px 4px;
    font-size: 8.8px;
    line-height: 1.25;
    text-align: center;
  }

  .activeLensHead {
    padding: 8px;
    gap: 7px;
  }

  .activeLensHead h2 {
    font-size: 11px;
  }

  .activeLensHead p {
    font-size: 9.5px;
  }

  /*
    Ürün grupları telefonda birkaç satır kaplamak yerine
    yatay kaydırılabilir tek sıra olur.
  */
  .segmentTabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 5px;
    margin-bottom: 9px;
    padding-bottom: 9px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .segmentTabs::-webkit-scrollbar {
    display: none;
  }

  .segmentChip {
    flex: 0 0 auto;
    padding: 6px 9px;
    font-size: 9.8px;
  }

  .recommendations {
    gap: 6px;
  }

  .emptyState {
    padding: 20px 12px;
  }

  /*
    Ürün kartı: sıra, ikon, başlık ve skor mobil genişlikte
    birbirinin alanını yemeyecek şekilde sıkıştırılır.
  */
  .cropMain {
    grid-template-columns: 16px 32px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 9px 8px;
  }

  .rank {
    font-size: 10px;
  }

  .cropIcon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .cropNameRow {
    gap: 5px;
  }

  .cropName {
    font-size: 12.5px;
  }

  .scientific {
    font-size: 9px;
  }

  .cropSummaryLine {
    font-size: 9.5px;
    line-height: 1.35;
  }

  .statusPillMini {
    max-width: 108px;
    padding: 2px 5px;
    font-size: 7.8px;
  }

  .score {
    font-size: 14px;
  }

  .score small {
    font-size: 8.5px;
  }

  .scoreStatusText {
    max-width: 76px;
    font-size: 8.8px;
  }

  /*
    Masaüstündeki 65px iç girinti telefonda gereksiz alan tüketiyordu.
  */
  .details {
    padding: 4px 10px 14px;
  }

  .details h3 {
    margin-top: 13px;
  }

  .factor {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 3px 8px;
  }

  .factor strong {
    max-width: 62%;
    overflow-wrap: anywhere;
  }

  .decisionRow {
    align-items: flex-start;
    padding: 8px 9px;
  }

  .decisionRow .drLabel {
    min-width: 0;
  }

  .decisionRow .drValue {
    max-width: 60%;
    overflow-wrap: anywhere;
  }

  .warning {
    padding: 8px 9px;
  }

  .techDetails {
    margin-top: 11px;
  }

  .catalogueHeadText h2 {
    font-size: 14px;
  }

  .catalogueHeadText p {
    font-size: 9.8px;
  }

  .catalogueSearch {
    margin-bottom: 9px;
  }

  /*
    İki satırlı topbar nedeniyle Leaflet kontrollerini aşağı al.
  */
  .leaflet-control-zoom {
    margin-top: 116px !important;
  }

  .toast {
    top: 110px;
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
    transform: none;
  }

  .modal {
    top: 110px;
    width: calc(100vw - 16px);
    padding: 16px;
  }

  /*
    Heatmap kontrolü telefonda kenarlardan taşmaz.
  */
  .heatmapControl {
    width: calc(100vw - 16px);
    margin: 0 0 8px 8px !important;
    padding: 10px 12px;
    border-radius: 14px;
    max-height: none;
    overflow: visible;
  }

  .heatmapControlHead {
    gap: 10px;
  }

  .heatmapControlHead strong {
    font-size: 17px;
  }

  .heatmapEyebrow {
    font-size: 9px;
  }

  .heatmapControlStatus {
    font-size: 11px;
  }

  .heatmapControlNote {
    font-size: 9.5px;
    line-height: 1.35;
    margin-top: 6px;
  }

  .heatmapLegend {
    margin-top: 9px;
  }

  .heatmapControlStatus {
    margin-top: 7px;
  }

  .heatmapReturn {
    margin-top: 8px;
    padding: 8px 10px;
  }

  .heatmapPopup {
    min-width: 170px;
  }

  .heatmapPopupHead {
    gap: 10px;
    font-size: 14px;
  }

  .heatmapPopupFactors > div {
    gap: 10px;
    font-size: 11px;
  }
}

/* === UI CLEANUP V1: MOBILE END === */


/* === UI CLEANUP V1: FILTER BUTTON STANDARD === */

/* Ana 3 karar görünümü */
.lensTabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
}

.lensTab {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lensTabCount {
  margin-left: auto;
  flex: none;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.lensTab.active {
  color: #071008;
  background: var(--climate);
  border-color: var(--climate);
  font-weight: 700;
}


/* Ürün grubu filtreleri */
.segmentTabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 12px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--border);
  overflow: visible;
}

.segmentChip {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
}

.segmentChipLabel {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.segmentChipCount {
  flex: none;
  margin-left: auto;
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  font-size: 9.5px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.segmentChip.active {
  color: #071008;
  background: var(--climate);
  border-color: var(--climate);
  font-weight: 700;
}

.segmentChip.active .segmentChipCount {
  background: rgba(0,0,0,.15);
}


/* Mobilde de aynı düzen korunur */
@media screen and (max-width: 560px) {
  .lensTabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .lensTab {
    min-height: 50px;
    padding: 7px 6px;
    font-size: 9px;
    text-align: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3px 6px;
  }

  .lensTabCount {
    margin-left: 0;
  }

  .segmentTabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    overflow: visible;
  }

  .segmentChip {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 9.5px;
  }
}

/* === UI CLEANUP V1: FILTER BUTTON STANDARD END === */

/* === UI CLEANUP V1: DECISION LENS HIERARCHY === */

.lensTab {
  background: rgba(82, 180, 201, 0.08);
  border-color: rgba(82, 180, 201, 0.24);
  color: #b8dce4;
}

.lensTab:hover {
  background: rgba(82, 180, 201, 0.14);
  border-color: rgba(82, 180, 201, 0.38);
}

.lensTabCount {
  color: #c9e6ec;
}

.lensTab.active {
  background: #8fd8e7;
  border-color: #8fd8e7;
  color: #071013;
}

.lensTab.active .lensTabCount {
  color: #071013;
}

/* Alt ürün grupları yeşil filtre sistemi olarak kalır */
.segmentChip.active {
  background: var(--climate);
  border-color: var(--climate);
  color: #071008;
}

/* === UI CLEANUP V1: DECISION LENS HIERARCHY END === */
