:root {
  font-family:'DM Sans',system-ui,sans-serif;
  color:#1c332b;
  background:#edf1e8;
  font-synthesis:none;
  --green:#163f32;
  --muted:#6c7a71;
  --line:#e0e7df;
  --cream:#f9faf5;
  --accent:#d4e9a8
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
button,input,select {
  font:inherit
}
button,a,input,select,summary {
  touch-action:manipulation
}
button {
  cursor:pointer
}
button:disabled {
  cursor:wait;
  opacity:.5
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible {
  outline:3px solid #8ca94c;
  outline-offset:3px
}
button {
  color:inherit
}
button:active {
  transform:translateY(1px)
}
[hidden] {
  display:none!important
}
#map {
  position:fixed;
  inset:0;
  z-index:0;
  background:#dce6da
}
.leaflet-control-attribution {
  font-size:10px!important
}
.leaflet-top.leaflet-right {
  top:78px;
  right:16px
}
.leaflet-control-zoom {
  border:0!important;
  box-shadow:0 3px 18px #253c251a!important
}
.leaflet-control-zoom a {
  color:var(--green)!important
}
.sidebar {
  position:fixed;
  z-index:500;
  left:24px;
  top:24px;
  bottom:24px;
  width:365px;
  background:var(--cream);
  border-radius:22px;
  box-shadow:0 12px 55px #1b322224;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid #fff9
}
.app-header {
  padding:22px 23px 20px;
  display:flex;
  align-items:center;
  gap:17px;
  border-bottom:1px solid var(--line)
}
.brand {
  font-family:Manrope,system-ui,sans-serif;
  font-size:37px;
  line-height:1;
  font-weight:800;
  text-decoration:none;
  color:var(--green);
  letter-spacing:-3px
}
.brand-dot {
  color:#8cab47
}
.app-title {
  flex:1;
  min-width:0;
  font-size:13px;
  line-height:1.5;
  font-weight:700
}
.app-title span {
  display:block;
  font-size:10px;
  font-weight:400;
  color:var(--muted)
}
.app-title .beta-badge {
  display:inline-block;
  margin-left:4px;
  padding:1px 6px;
  border-radius:999px;
  background:#b7791f;
  color:#fff;
  font-size:9px;
  font-style:normal;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  vertical-align:2px;
  line-height:1.5
}
.icon-button {
  border:1px solid #dce4db;
  background:transparent;
  width:29px;
  height:29px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  font-family:Georgia,serif;
  font-size:18px
}
.app-header .icon-button {
  margin-left:auto
}
.about-button {
  margin-left:auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  width:45px;
  flex-shrink:0;
  border:0;
  background:transparent;
  padding:3px 0;
  color:var(--green);
  font-size:9px;
  white-space:nowrap;
}
.about-icon {
  display:flex;
  align-items:center;
  justify-content:center;
  width:27px;
  height:27px;
  border:1px solid #c7d5c5;
  border-radius:50%;
  font-family:Georgia,serif;
  font-size:18px;
}
.about-button:hover .about-icon {
  background:#e9efdf;
}
.sidebar-scroll {
  padding:24px;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin
}
h1,h2,h3,p {
  margin:0
}
h1 {
  font-family:Manrope,sans-serif;
  font-size:25px;
  font-weight:700;
  letter-spacing:-1px;
  line-height:1.22
}
.intro {
  font-size:14px;
  line-height:1.65;
  color:var(--muted);
  margin:10px 0 23px
}
.field-label {
  display:block;
  font-size:13px;
  font-weight:700;
  margin-bottom:8px
}
.search-wrap {
  display:flex;
  align-items:center;
  gap:9px;
  border:1px solid #d8e0d6;
  background:white;
  border-radius:9px;
  padding:0 12px;
  height:42px
}
.search-wrap span {
  font-size:24px;
  line-height:1;
  transform:rotate(-20deg);
  color:var(--muted)
}
input[type=search] {
  border:0;
  background:transparent;
  outline:none;
  font-size:14px;
  width:100%;
  min-width:0
}
.search-wrap:focus-within {
  border-color:#63875e;
  box-shadow:0 0 0 2px #62865f15
}
select {
  background:white;
  border:1px solid #d8e0d6;
  border-radius:8px;
  min-height:38px;
  width:100%;
  padding:8px;
  font-size:14px;
  color:#284437
}
#denomination-select {
  margin-top:8px
}
.origin-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:9px;
  gap:8px
}
.muted {
  color:var(--muted);
  font-size:12px
}
.text-button {
  background:transparent;
  border:0;
  padding:3px 0;
  font-size:13px;
  font-weight:600;
  text-decoration:underline;
  text-decoration-color:#9daf9b;
  text-underline-offset:3px
}
.mode-toggle {
  display:flex;
  gap:9px;
  align-items:center;
  justify-content:flex-end;
  position:relative;
  margin-top:20px;
  font-size:13px;
  cursor:pointer
}
.mode-toggle input {
  position:absolute;
  right:0;
  width:34px;
  height:20px;
  opacity:0
}
.switch-track {
  width:34px;
  height:20px;
  background:#ced8ca;
  border-radius:14px;
  transition:background .2s
}
.switch-track:after {
  content:'';
  display:block;
  width:14px;
  height:14px;
  margin:3px;
  background:white;
  border-radius:50%;
  transition:transform .2s
}
.mode-toggle input:checked+.switch-track {
  background:var(--green)
}
.mode-toggle input:checked+.switch-track:after {
  transform:translateX(14px)
}
.mode-toggle input:focus-visible+.switch-track {
  outline:3px solid #8ca94c
}
.indicators-section {
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  margin-top:15px;
  padding:13px 0
}
.indicators-section summary {
  cursor:pointer;
  font-size:14px;
  font-weight:600
}
.indicators-section summary span {
  font-size:12px;
  font-weight:400;
  color:var(--muted);
  float:right
}
.indicator-group {
  font-size:12px;
  letter-spacing:1px;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:600;
  margin:17px 0 7px
}
.indicator-option {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:14px;
  padding:7px 0;
  cursor:pointer
}
.indicator-option input {
  width:15px;
  height:15px;
  accent-color:var(--green)
}
.indicator-option .unit {
  margin-left:auto;
  color:var(--muted);
  font-size:12px
}
.range-label {
  display:flex;
  justify-content:space-between;
  font-size:13px;
  font-weight:600;
  margin-top:15px
}
.range-label output {
  font-size:14px;
  font-weight:700
}
input[type=range] {
  width:100%;
  accent-color:var(--green);
  cursor:pointer
}
#candidate-count {
  margin:10px 0 14px
}
#spacing {
  margin-bottom:10px
}
.point-message {
  font-size:12px;
  line-height:1.6;
  background:#e9efd9;
  padding:10px;
  border-radius:7px;
  margin-top:12px
}
.status {
  font-size:12px;
  line-height:1.6;
  color:var(--muted);
  padding:23px 0 4px
}
.status.error {
  color:#a74b36;
  background:#fff1e9;
  padding:12px;
  border-radius:8px;
  margin-top:18px
}
.status.loading:before {
  content:'';
  display:inline-block;
  width:10px;
  height:10px;
  border:2px solid #cbd8c5;
  border-top-color:#28513a;
  border-radius:50%;
  margin-right:8px;
  animation:spin 1s linear infinite
}
@keyframes spin {
  to {
    transform:rotate(360deg)
  }
}
.eyebrow {
  display:block;
  font-size:9px;
  font-weight:600;
  letter-spacing:1.5px;
  color:var(--muted);
  text-transform:uppercase;
  margin-bottom:6px
}
.result-heading-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:24px
}
h2 {
  font-family:Manrope,sans-serif;
  font-size:22px;
  line-height:1.2;
  letter-spacing:-.7px;
  font-weight:700
}
.origin-summary {
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px
}
.metric-card {
  background:#eef2e6;
  border-radius:8px;
  padding:11px 8px
}
.metric-card span {
  display:block;
  font-size:9px;
  line-height:1.4;
  color:var(--muted)
}
.metric-card strong {
  display:block;
  font-family:Manrope,sans-serif;
  font-size:18px;
  letter-spacing:-.5px;
  margin:6px 0 3px
}
.metric-card small {
  font-size:9px;
  color:#58734f
}
.summary-description {
  grid-column:1/-1;
  font-size:10px;
  color:var(--muted);
  line-height:1.6
}
.candidates-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin:24px 0 9px
}
.result-actions {
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}
h3 {
  font-size:12px;
  font-weight:700
}
.candidate-list {
  list-style:none;
  padding:0;
  margin:0
}
.candidate-card {
  width:100%;
  display:grid;
  grid-template-columns:30px minmax(0,1fr) 48px;
  align-items:center;
  gap:9px;
  text-align:left;
  background:transparent;
  border:0;
  border-top:1px solid var(--line);
  padding:13px 0
}
.candidate-card:hover,.candidate-card.active {
  background:#edf2e6
}
.rank {
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  width:27px;
  height:27px;
  font-size:11px;
  font-weight:700;
  color:#173d2a;
  background:#b3d570;
  border:1px solid #36563d55
}
.candidate-name {
  font-size:15px;
  font-weight:600;
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.candidate-region {
  font-size:12px;
  line-height:1.45;
  color:var(--muted);
  display:block;
  margin-top:4px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.score {
  text-align:right;
  font-size:14px;
  font-weight:700
}
.score small {
  display:block;
  font-size:12px;
  font-weight:400;
  color:var(--muted);
  margin-top:2px
}
.map-top {
  position:fixed;
  z-index:450;
  top:25px;
  left:415px;
  right:25px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px
}
.map-tag {
  font-size:10px;
  font-weight:600;
  letter-spacing:2px;
  color:#314e3c;
  background:#fafcf3dd;
  border:1px solid #fff9;
  border-radius:100px;
  padding:10px 17px;
  box-shadow:0 3px 16px #2b462211
}
.map-button {
  border:1px solid #fff8;
  background:#fafcf3ee;
  border-radius:8px;
  padding:11px 15px;
  font-size:11px;
  box-shadow:0 3px 15px #2b462211
}
.map-button span {
  margin-left:16px
}
.map-legend {
  position:fixed;
  z-index:400;
  bottom:34px;
  left:415px;
  display:flex;
  gap:7px;
  align-items:center;
  font-size:10px;
  color:#35513e;
  padding:10px 13px;
  background:#fafcf3e8;
  border-radius:7px
}
.map-legend>span:not(:first-child) {
  margin-left:9px
}
.legend-origin {
  width:10px;
  height:10px;
  background:#2472a4;
  border:2px solid white;
  box-shadow:0 0 0 1px #2472a4
}
.legend-candidate {
  width:10px;
  height:10px;
  background:#b4d86e;
  border:1px solid #36583b;
  border-radius:50%
}
.legend-area {
  width:12px;
  height:10px;
  border:1px solid #77966d;
  background:#d1dfbf88
}
.timeline {
  position:fixed;
  z-index:450;
  bottom:92px;
  left:calc(50% + 170px);
  transform:translateX(-50%);
  width:min(540px,calc(100vw - 465px));
  background:#fafcf3f2;
  border:1px solid #fff;
  border-radius:14px;
  padding:17px 25px 13px;
  box-shadow:0 5px 25px #2742291c;
  backdrop-filter:blur(10px)
}
.timeline-label {
  display:flex;
  align-items:center;
  gap:14px;
  font-size:11px
}
.timeline-label strong {
  font-family:Manrope,sans-serif;
  font-size:27px;
  letter-spacing:-1px;
  line-height:1
}
.timeline-label>span:last-child {
  margin-left:auto;
  font-size:9px;
  color:var(--muted);
  max-width:150px;
  text-align:right;
  line-height:1.4
}
.timeline input {
  margin:13px 0 4px;
  height:16px
}
.year-ticks {
  display:flex;
  justify-content:space-between;
  font-size:9px;
  color:var(--muted)
}
.vineyard-marker {
  background:none!important;
  border:none!important
}
.candidate-marker {
  border:2px solid #fff;
  background:#a6cf63;
  box-shadow:0 1px 9px #20332055;
  width:29px;
  height:29px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:700;
  color:#153726
}
.origin-marker {
  width:21px;
  height:21px;
  border-radius:4px;
  background:#2877a8;
  border:3px solid #fff;
  box-shadow:0 1px 10px #15394a66;
  transform:rotate(45deg)
}
.leaflet-popup-content-wrapper {
  background:#fafcf5!important;
  border-radius:12px!important
}
.leaflet-popup-content {
  font-family:'DM Sans',system-ui,sans-serif;
  line-height:1.6!important;
  font-size:15px!important
}
.popup-name {
  font-family:Manrope,sans-serif;
  font-size:20px;
  font-weight:700;
  line-height:1.3;
  overflow-wrap:anywhere;
  margin-bottom:6px
}
.popup-caption {
  font-size:13px;
  color:#61735f
}
.popup-link {
  display:block;
  border:0;
  background:transparent;
  padding:8px 0 0;
  font-size:11px;
  text-decoration:underline;
  color:#1e513b
}
.popup-actions {
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:12px;
}
.popup-icon-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  padding:0;
  border:1px solid #bdcdb7;
  border-radius:8px;
  background:#edf3e5;
  color:#214f39;
  flex-shrink:0;
}
.popup-icon-button:hover {
  background:#e2edd7;
}
.popup-actions .popup-link {
  padding:0;
  text-align:left;
}
.ai-zone-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:0;
  border:1px solid #bdcdb7;
  border-radius:8px;
  background:#edf3e5;
  color:#214f39;
  font-size:11px;
  font-weight:600;
  flex-shrink:0;
}
.ai-zone-button:hover {
  background:#e2edd7;
}
.ai-zone-icon {
  font-family:Georgia,serif;
  font-size:24px;
  font-weight:700;
  line-height:1;
}
.leaflet-popup-tip {
  background:#fafcf5!important
}
dialog {
  border:1px solid #dde4d8;
  border-radius:20px;
  padding:34px;
  box-shadow:0 16px 80px #1c352e44;
  color:#1c332b;
  background:var(--cream);
  max-height:90vh;
  overflow:auto
}
dialog::backdrop {
  background:#183b2c55;
  backdrop-filter:blur(4px)
}
.detail-dialog {
  width:min(660px,calc(100% - 30px))
}
.info-dialog {
  width:min(600px,calc(100% - 30px))
}
.insight-dialog {
  width:min(520px,calc(100% - 30px));
}
.insight-dialog h2 {
  padding-right:22px;
  margin-bottom:9px;
  font-size:26px;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.insight-context {
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
  margin:0 0 18px;
  overflow-wrap:anywhere;
}
.insight-context:empty {
  display:none;
}
.insight-content {
  font-size:17px;
  line-height:1.7;
}
.insight-description {
  white-space:pre-line;
  margin:0 0 14px;
}
.insight-description:last-child {
  margin-bottom:0;
}
.insight-description strong {
  color:var(--green);
  font-weight:750;
}
.insight-loading {
  color:#596c57;
}
.insight-error {
  color:#8b3528;
}
.insight-sources a {
  color:#1e513b;
  overflow-wrap:anywhere;
}
.insight-dialog #insight-retry {
  margin-bottom:12px;
}
.dialog-close {
  position:absolute;
  top:16px;
  right:16px;
  font-family:system-ui,sans-serif
}
.info-dialog p {
  font-size:14px;
  line-height:1.7;
  margin-top:18px
}
.info-dialog h3 {
  font-size:13px;
  margin-top:22px
}
.research-credit {
  margin-top:18px;
  padding:16px;
  border-left:4px solid #38634e;
  border-radius:9px;
  background:#eaf0df;
}
.info-dialog .research-credit h3 {
  margin:0;
  font-size:16px;
  line-height:1.4;
}
.info-dialog .research-credit p {
  margin-top:9px;
}
.research-credit a {
  display:block;
  width:fit-content;
  margin-top:12px;
  color:#1b533b;
  font-size:12px;
  line-height:1.6;
  font-weight:600;
}
.model-limits {
  margin-top:18px;
  padding:16px;
  border-left:4px solid #b7791f;
  border-radius:9px;
  background:#fbf3e2;
}
.info-dialog .model-limits h3 {
  margin:0;
  font-size:16px;
  line-height:1.4;
}
.info-dialog .model-limits p {
  margin-top:9px;
}
.source-note {
  color:var(--muted);
  font-size:13px!important
}
.source-list {
  padding-left:18px;
  font-size:14px;
  line-height:1.7
}
.source-list li {
  margin-top:8px
}
.source-list a {
  color:#245b3f
}
.detail-intro {
  font-size:14px;
  line-height:1.7;
  color:var(--muted);
  margin:12px 0 20px
}
.detail-table {
  width:100%;
  border-collapse:collapse;
  font-size:14px
}
.detail-table th {
  font-size:12px;
  color:var(--muted);
  font-weight:500;
  text-align:right;
  padding:10px 7px;
  border-bottom:1px solid var(--line)
}
.detail-table th:first-child {
  text-align:left
}
.detail-table td {
  text-align:right;
  padding:12px 7px;
  border-bottom:1px solid var(--line)
}
.detail-table td:first-child {
  text-align:left
}
.detail-table small {
  font-size:11px;
  color:var(--muted)
}
.mobile-toggle {
  display:none
}
body.picking #map {
  cursor:crosshair
}
.no-results {
  font-size:12px;
  line-height:1.7;
  margin:15px 0;
  color:var(--muted)
}
@media(min-width:1500px) {
  .sidebar {
    width:390px
  }
  .map-top,.map-legend {
    left:440px
  }
  .timeline {
    left:calc(50% + 195px)
  }
}
@media(max-width:850px) {
  .sidebar {
    left:14px;
    top:14px;
    bottom:14px;
    width:315px;
    border-radius:17px
  }
  .sidebar-scroll {
    padding:20px
  }
  .app-header {
    padding:18px 20px;
    gap:12px
  }
  .brand {
    font-size:31px
  }
  .app-title {
    font-size:11px
  }
  .app-title span {
    font-size:9px
  }
  .map-top {
    left:345px;
    right:14px;
    top:15px
  }
  .map-tag {
    display:none
  }
  .map-button {
    margin-left:auto
  }
  .timeline {
    left:calc(50% + 160px);
    width:calc(100vw - 365px);
    padding:16px
  }
  .timeline-label {
    flex-wrap:wrap;
    gap:8px
  }
  .timeline-label>span:last-child {
    display:none
  }
  .map-legend {
    left:345px;
    bottom:28px;
    font-size:9px;
    gap:5px
  }
  .map-legend>span:not(:first-child) {
    margin-left:4px
  }
  .metric-card strong {
    font-size:16px
  }
  h1 {
    font-size:23px
  }
}
@media(max-width:600px) {
  .sidebar {
    left:0;
    right:0;
    width:100%;
    top:auto;
    bottom:0;
    max-height:53vh;
    border-radius:20px 20px 0 0;
    border:0;
    transition:transform .25s ease
  }
  .app-header {
    padding:13px 19px
  }
  .brand {
    font-size:29px
  }
  .app-title {
    font-size:12px
  }
  .app-title span {
    display:none
  }
  .sidebar-scroll {
    padding:17px 20px 24px
  }
  .intro {
    margin:6px 0 15px
  }
  .origin-controls h1 {
    font-size:22px
  }
  .map-top {
    left:15px;
    right:15px;
    top:15px
  }
  .map-tag {
    display:inline-block;
    font-size:8px;
    padding:9px 12px;
    letter-spacing:1.2px
  }
  .map-button {
    font-size:10px;
    padding:9px 11px
  }
  .map-button span {
    margin-left:6px
  }
  .leaflet-top.leaflet-right {
    top:62px;
    right:8px
  }
  .timeline {
    left:15px;
    right:15px;
    bottom:calc(53vh + 42px);
    transform:none;
    width:auto;
    padding:10px 17px 9px;
    border-radius:11px;
    transition:bottom .25s ease
  }
  .timeline-label {
    flex-wrap:nowrap;
    font-size:10px;
    gap:10px
  }
  .timeline-label strong {
    font-size:24px
  }
  .timeline-label>span:last-child {
    display:block;
    font-size:8px;
    max-width:130px
  }
  .timeline input {
    margin:8px 0 2px
  }
  .map-legend {
    display:none
  }
  .mobile-toggle {
    position:fixed;
    z-index:550;
    display:block;
    bottom:calc(53vh + 7px);
    right:16px;
    padding:6px 13px;
    border-radius:30px;
    border:1px solid #fff;
    background:#fafcf3f5;
    box-shadow:0 2px 12px #1b3b2422;
    font-size:10px;
    transition:bottom .25s ease
  }
  .mobile-toggle span {
    margin-left:8px
  }
  .sidebar-collapsed .sidebar {
    transform:translateY(calc(100% - 53px))
  }
  .sidebar-collapsed .mobile-toggle {
    bottom:65px
  }
  .sidebar-collapsed .timeline {
    bottom:100px
  }
  .origin-summary {
    gap:7px
  }
  .metric-card {
    padding:10px
  }
  .metric-card strong {
    font-size:20px
  }
  .result-heading-row {
    margin-top:18px
  }
  dialog {
    padding:30px 19px
  }
  .detail-table {
    font-size:13px
  }
  .detail-table td,.detail-table th {
    padding:10px 3px
  }
  .leaflet-control-attribution {
    font-size:8px!important;
    max-width:100vw
  }
  .leaflet-bottom.leaflet-right {
    bottom:53vh;
    transition:bottom .25s ease
  }
  .sidebar-collapsed .leaflet-bottom.leaflet-right {
    bottom:53px
  }
}
.indicator-option.unavailable {
  opacity:.5;
  cursor:help
}
.data-notice {
  margin:16px 0 0;
  padding:11px 12px;
  border:1px solid #dce4cb;
  border-radius:8px;
  background:#eef2e4;
  color:#526347;
  font-size:10px;
  line-height:1.6;
}
.location-notice {
  padding:9px 11px;
  border-radius:7px;
  background:#e5edf2;
  color:#365a6b;
  font-size:11px;
  line-height:1.5;
}
.indicator-unavailable {
  display:block;
  font-size:10px;
  line-height:1.5;
  color:var(--muted);
  margin:0 0 8px 23px
}
@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation:none!important;
    transition:none!important
  }
}

.brand {
  display: block;
  width: 94px;
  flex-shrink: 0;
  overflow: hidden;
}
.brand img {
  display: block;
  width: 148px;
  height: 74px;
  max-width: none;
  margin-left: -27px;
  object-fit: contain;
}
.app-header {
  padding: 12px 20px;
  gap: 12px;
}
.place-search-row {
  display: flex;
  gap: 6px;
}
.coordinate-controls { margin: 12px 0 20px; padding: 10px 0; border-bottom: 1px solid var(--line, #d8ded2); font-size: 12px; }
.coordinate-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.coordinate-row label { display: grid; gap: 5px; }
.coordinate-row input { width: 100%; padding: 8px; border: 1px solid #c7d2c3; border-radius: 7px; background: white; font-size: 14px; }
.place-search-row input {
  border: 1px solid #c7d2c3;
  border-radius: 8px;
  background: white;
  padding: 10px;
  font-size: 13px;
}
.place-search-row button {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--green);
  color: white;
  font-size: 12px;
}
.search-status, .point-hint {
  margin: 9px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.place-search-results {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.place-search-results button {
  display: block;
  width: 100%;
  padding: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: white;
  font-size: 12px;
  line-height: 1.45;
}
.place-search-results button:hover {
  background: #e8f0df;
}
.denomination-explorer {
  margin: 16px 0 10px;
  font-size: 12px;
}
.denomination-explorer summary {
  cursor: pointer;
  margin-bottom: 10px;
}
.basemap-control {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 9px;
  background: #fafcf3f2;
  border-radius: 8px;
  font-size: 12px;
}
.basemap-control select {
  width: auto;
  margin: 0;
  border: 1px solid #c5d2bf;
  border-radius: 5px;
  padding: 5px 8px;
  background: white;
  font-size: 12px;
}
.map-explanation {
  position: fixed;
  z-index: 440;
  top: 85px;
  left: 415px;
  width: min(380px, calc(100vw - 490px));
  padding: 14px 16px;
  border-radius: 12px;
  background: #fafcf3f5;
  box-shadow: 0 3px 15px #243a2420;
  color: #203b30;
}
.map-explanation strong {
  font-size: 14px;
}
.map-explanation p {
  margin: 7px 0;
  font-size: 14px;
  line-height: 1.5;
}
.map-explanation small {
  display: block;
  font-size: 10px;
  line-height: 1.5;
  color: #596b5e;
}
.vineyard-status {
  position: fixed;
  z-index: 400;
  bottom: 73px;
  left: 415px;
  padding: 5px 9px;
  border-radius: 6px;
  background: #fafcf3ed;
  font-size: 10px;
  max-width: calc(100vw - 450px);
}
.legend-area {
  border: 2px solid #e82222;
  background: #fff00030;
}
.legend-vineyard {
  width: 12px;
  height: 10px;
  border: 2px solid #d50074;
  background: #ed67b230;
}
@media(min-width:1500px) {
  .map-explanation, .vineyard-status { left: 440px; }
}
@media(max-width:850px) {
  .map-explanation { left: 345px; width: calc(100vw - 405px); }
  .vineyard-status { left: 345px; max-width: calc(100vw - 380px); }
  .app-header { padding: 8px 15px; gap: 8px; }
}
@media(max-width:600px) {
  .app-header { min-height: 72px; padding: 4px 15px; }
  .brand { width: 82px; }
  .brand img { width: 132px; height: 66px; margin-left: -25px; }
  .map-top { gap: 8px; }
  .basemap-control { padding: 4px 6px; gap: 4px; font-size: 10px; }
  .basemap-control select { padding: 4px; font-size: 11px; }
  .map-button { font-size: 9px; padding: 7px 9px; }
  .map-explanation { top: 65px; left: 12px; width: calc(100vw - 65px); padding: 10px 12px; }
  .map-explanation strong { font-size: 12px; }
  .map-explanation p { font-size: 10px; line-height: 1.4; margin: 4px 0; }
  .map-explanation small { font-size: 9px; line-height: 1.4; }
  .vineyard-status { left: 12px; bottom: calc(53vh + 142px); max-width: calc(100vw - 65px); font-size: 9px; }
  .sidebar-collapsed .sidebar { transform: translateY(calc(100% - 74px)); }
  .sidebar-collapsed .mobile-toggle { bottom: 83px; }
  .sidebar-collapsed .timeline { bottom: 118px; }
  .timeline { transition: none; }
  .sidebar-collapsed .vineyard-status { bottom: 207px; }
  .sidebar-collapsed .leaflet-bottom.leaflet-right { bottom: 74px; }
}

/* Comparación de calor (28-11-2026): tarjeta con dos barras de Huglin y la marca del calor previsto para el origen. */
.warmth-card {
  margin:0 0 18px;
  padding:14px 16px 12px;
  border-radius:16px;
  border:1px solid #f2d3b8;
  background:linear-gradient(135deg,#fff7ef 0%,#fdf1e4 100%);
  box-shadow:0 6px 18px #b4642014;
}
.warmth-card.warmth-cooler {
  border-color:#cfe0f2;
  background:linear-gradient(135deg,#f3f8fd 0%,#eaf2fb 100%);
}
.warmth-card.warmth-similar {
  border-color:var(--line);
  background:var(--cream);
}
.warmth-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.warmth-title {
  margin:0;
  display:flex;
  align-items:center;
  gap:8px;
  font-size:17px;
  line-height:1.3;
}
.warmth-title strong {
  color:#7a2e0e;
}
.warmth-cooler .warmth-title strong {
  color:#1d4a74;
}
.warmth-arrow {
  display:inline-grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:50%;
  background:#e8590c;
  color:white;
  font-size:11px;
  flex:0 0 auto;
}
.warmth-cooler .warmth-arrow {
  background:#2f74b5;
}
.warmth-similar .warmth-arrow {
  background:#6c7a71;
}
.warmth-badge {
  padding:4px 10px;
  border-radius:999px;
  background:#e8590c;
  color:white;
  font-weight:750;
  font-size:14px;
  white-space:nowrap;
}
.warmth-cooler .warmth-badge {
  background:#2f74b5;
}
.warmth-similar .warmth-badge {
  background:#6c7a71;
}
.warmth-caption {
  margin:6px 0 12px;
  color:var(--muted);
  font-size:12.5px;
  line-height:1.45;
}
.warmth-chart {
  position:relative;
  display:grid;
  gap:9px;
  padding:4px 0 2px;
}
.warmth-row {
  display:grid;
  grid-template-columns:minmax(90px,30%) 1fr auto;
  align-items:center;
  gap:10px;
  font-size:13.5px;
}
.warmth-label {
  color:#33473e;
  font-weight:600;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.warmth-track {
  height:16px;
  border-radius:999px;
  background:#ffffffb3;
  box-shadow:inset 0 0 0 1px #00000010;
  overflow:hidden;
}
.warmth-fill {
  height:100%;
  border-radius:999px;
}
.warmth-fill.is-origin {
  background:linear-gradient(90deg,#4f8a3c,#7db35d);
}
.warmth-fill.is-zone {
  background:linear-gradient(90deg,#f59f00,#e8590c);
}
.warmth-cooler .warmth-fill.is-zone {
  background:linear-gradient(90deg,#5ea3e0,#2f74b5);
}
.warmth-value {
  font-variant-numeric:tabular-nums;
  font-weight:750;
  color:#1c332b;
  min-width:44px;
  text-align:right;
}
.warmth-track {
  position:relative;
}
.warmth-tick {
  position:absolute;
  top:-3px;
  bottom:-3px;
  left:var(--at);
  border-left:2px dashed #7a2e0e;
}
.warmth-cooler .warmth-tick {
  border-left-color:#1d4a74;
}
.warmth-marker-row {
  margin-top:-4px;
}
.warmth-marker {
  position:relative;
  height:16px;
}
.warmth-marker-label {
  position:absolute;
  left:var(--at);
  top:0;
  transform:translateX(-50%);
  white-space:nowrap;
  font-size:11.5px;
  font-weight:700;
  color:#7a2e0e;
}
.warmth-cooler .warmth-marker-label {
  color:#1d4a74;
}
.warmth-explain {
  margin:4px 0 8px;
  font-size:14px;
  line-height:1.5;
  color:#33473e;
}
.warmth-chip {
  display:flex;
  flex-wrap:wrap;
  gap:4px 8px;
  margin:0;
  padding:6px 10px;
  border-radius:10px;
  background:#ffffffa6;
  font-size:13px;
  color:var(--muted);
}
.warmth-chip strong {
  color:#1c332b;
}
.warmth-line {
  display:flex;
  align-items:center;
  gap:7px;
  margin:6px 0 2px;
  font-size:12.5px;
  font-weight:650;
  color:#7a2e0e;
}
.warmth-line .warmth-arrow {
  width:18px;
  height:18px;
  font-size:9px;
}
.warmth-line.warmth-cooler {
  color:#1d4a74;
}
.warmth-line.warmth-similar {
  color:var(--muted);
}
/* Texto de la IA más legible: primer párrafo como entradilla y conceptos destacados como etiquetas. */
.insight-content .insight-description:first-of-type {
  font-size:18.5px;
  line-height:1.6;
  color:#163f32;
}
.insight-description strong {
  padding:1px 7px;
  border-radius:7px;
  background:#e7f2d2;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
}
.insight-content {
  padding-left:14px;
  border-left:4px solid var(--accent);
}

/* Ajustes del 28-11-2026: unidades en las barras, clasificación de Huglin y, en móvil, nombre encima de la barra. */
.warmth-row {
  grid-template-columns:minmax(90px,28%) 1fr auto;
}
.warmth-value {
  min-width:96px;
  white-space:nowrap;
}
.warmth-classes {
  display:grid;
  gap:2px;
  margin:2px 0 8px;
  font-size:13px;
  color:var(--muted);
}
.warmth-classes strong {
  color:#1c332b;
  font-weight:650;
}

@media (max-width:600px) {
  .warmth-row {
    grid-template-columns:1fr auto;
    grid-template-areas:"label label" "track value";
    gap:3px 10px;
  }
  .warmth-row > .warmth-label {
    grid-area:label;
    white-space:normal;
  }
  .warmth-row > .warmth-track,
  .warmth-row > .warmth-marker {
    grid-area:track;
  }
  .warmth-row > .warmth-value {
    grid-area:value;
    min-width:0;
  }
  .warmth-marker-row > span:first-child {
    display:none;
  }
  .warmth-marker-row > span:last-child {
    grid-area:value;
  }
  .warmth-marker-label {
    white-space:normal;
    width:max-content;
    max-width:70vw;
  }
}
