/* ==========================================================================
   Kalkulator wyceny mieszkań — warstwa prezentacji
   Kierunek: narzędzie analityczne, nie landing sprzedażowy.
   Spokojna paleta atramentowa, jeden akcent (miedź) zarezerwowany dla wartości.
   ========================================================================== */

:root {
  --ink-900: #10151c;
  --ink-800: #1a2230;
  --ink-700: #273244;
  --ink-600: #3c4a5e;
  --ink-500: #5d6c81;
  --ink-400: #8593a6;
  --ink-300: #b3bdca;
  --ink-200: #d8dee6;
  --ink-100: #eceff3;
  --ink-050: #f6f8fa;
  --paper:   #ffffff;

  --copper-700: #8a4b18;
  --copper-600: #b06124;
  --copper-500: #c9762f;
  --copper-100: #f8ecdf;

  --teal-600: #10707a;
  --teal-100: #e0f2f3;

  --green-600: #1c7a4f;
  --amber-600: #a8730a;
  --red-600:   #b3372c;
  --red-100:   #fbe9e7;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(16, 21, 28, .06), 0 1px 3px rgba(16, 21, 28, .04);
  --shadow:    0 2px 6px rgba(16, 21, 28, .07), 0 8px 24px rgba(16, 21, 28, .06);
  --shadow-lg: 0 4px 12px rgba(16, 21, 28, .09), 0 20px 48px rgba(16, 21, 28, .1);

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --topbar-h: 60px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-800);
  background: var(--ink-050);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.012em; }
p { margin: 0; }
a { color: var(--teal-600); }

/* ---------------------------------------------------------------- topbar -- */

.topbar {
  position: sticky; top: 0; z-index: 900;
  height: var(--topbar-h);
  background: var(--ink-900);
  color: var(--ink-100);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.topbar__inner {
  max-width: 1560px; margin: 0 auto; height: 100%;
  padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }

.brand__mark {
  width: 26px; height: 26px; flex: none; border-radius: 7px;
  background: linear-gradient(140deg, var(--copper-500), var(--copper-700));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  position: relative;
}
.brand__mark::after {
  content: ""; position: absolute; inset: 7px 7px 6px;
  border-left: 2px solid rgba(255, 255, 255, .85);
  border-bottom: 2px solid rgba(255, 255, 255, .85);
}

.brand__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand__text strong { font-size: 15px; font-weight: 640; }
.brand__text em {
  font-style: normal; font-size: 11.5px; color: var(--ink-400);
  letter-spacing: .03em;
}

.topbar__meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.pill {
  font-size: 11.5px; font-weight: 550; letter-spacing: .015em;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  color: var(--ink-200);
  border: 1px solid rgba(255, 255, 255, .07);
  white-space: nowrap;
}
.pill--muted { opacity: .72; }
.pill--ok { background: rgba(28, 122, 79, .22); color: #8ee0b4; border-color: rgba(28,122,79,.4); }
.pill--warn { background: rgba(168, 115, 10, .22); color: #f0c86a; border-color: rgba(168,115,10,.4); }

/* ---------------------------------------------------------------- layout -- */

.layout {
  max-width: 1560px; margin: 0 auto; padding: 20px;
  display: grid; gap: 20px;
  grid-template-columns: minmax(360px, 420px) 1fr;
  align-items: start;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel--form { padding: 24px; }

.panel__title { font-size: 22px; margin-bottom: 6px; color: var(--ink-900); }
.panel__lead { font-size: 13.5px; color: var(--ink-500); margin-bottom: 20px; }

.panel--map {
  padding: 0; overflow: hidden; position: relative;
  height: calc(100vh - var(--topbar-h) - 40px);
  min-height: 520px;
  position: sticky; top: calc(var(--topbar-h) + 20px);
}

#map { width: 100%; height: 100%; background: var(--ink-100); }

/* ------------------------------------------------------------- formularz -- */

.field-group { border: 0; padding: 0; margin: 0 0 22px; }

.field-group legend {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: var(--ink-400);
  padding: 0 0 10px; margin: 0; width: 100%;
  border-bottom: 1px solid var(--ink-100);
  margin-bottom: 14px;
}

.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--ink-600); margin-bottom: 5px;
}
.req { color: var(--copper-600); }

.grid { display: grid; gap: 12px; }
.grid--2 { grid-template-columns: 1fr 1fr; }

input[type="text"], input[type="number"], input[type="password"],
input[type="email"], input[type="search"], select {
  width: 100%; padding: 9px 11px;
  font: inherit; font-size: 14px; color: var(--ink-800);
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  transition: border-color .14s, box-shadow .14s;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(16, 112, 122, .13);
}
/* :user-invalid, nie :invalid — puste pole wymagane nie może świecić na
   czerwono, zanim użytkownik w ogóle spróbuje coś wpisać. */
input:user-invalid { border-color: var(--red-600); }

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235d6c81' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 30px;
}

.input-suffix { position: relative; }
.input-suffix span {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  font-size: 12.5px; color: var(--ink-400); pointer-events: none;
}
.input-suffix input { padding-right: 38px; }

.hint { display: block; font-size: 11.5px; color: var(--ink-400); margin-top: 5px; }

/* wyszukiwarka adresu */
.search-wrap { position: relative; display: flex; gap: 8px; }
.search-wrap input { flex: 1; }

.suggestions {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 800;
  margin: 0; padding: 4px; list-style: none;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 260px; overflow-y: auto;
}
.suggestions li {
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 13px; cursor: pointer; line-height: 1.35;
}
.suggestions li:hover, .suggestions li[aria-selected="true"] { background: var(--ink-050); }
.suggestions li strong { display: block; color: var(--ink-800); font-weight: 600; }
.suggestions li span { color: var(--ink-400); font-size: 11.5px; }
.suggestions li.is-empty { color: var(--ink-400); cursor: default; }

.coords {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 11px; margin-top: 4px;
  background: var(--teal-100);
  border: 1px solid rgba(16, 112, 122, .2);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}
.coords__label { color: var(--teal-600); font-weight: 650; }
.coords__value { font-family: var(--mono); font-size: 11.5px; color: var(--ink-600); }

.badge {
  padding: 2px 8px; border-radius: 999px;
  background: var(--ink-900); color: #fff;
  font-size: 11px; font-weight: 600;
}

/* przełącznik: dokładny rok / przedział */
.field__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 5px;
}
.field__head label { margin-bottom: 0; }

.switch {
  display: inline-flex; padding: 2px; gap: 2px;
  background: var(--ink-100); border-radius: 999px;
}
.switch__btn {
  font: inherit; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-500); cursor: pointer;
  transition: background .14s, color .14s;
}
.switch__btn.is-active { background: var(--paper); color: var(--ink-800); box-shadow: var(--shadow-sm); }
.switch__btn:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 1px; }

.checks { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--teal-600); cursor: pointer; }

/* przyciski */
.btn {
  font: inherit; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 9px 14px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .14s, border-color .14s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 2px; }

.btn--primary {
  background: var(--ink-900); color: #fff;
  padding: 12px 18px; font-size: 15px;
}
.btn--primary:hover { background: var(--ink-700); }
.btn--primary:disabled { background: var(--ink-300); cursor: progress; }

.btn--block { width: 100%; }
.btn--icon { padding: 9px 11px; background: var(--ink-100); color: var(--ink-600); }
.btn--icon:hover { background: var(--ink-200); }
.btn--ghost { background: transparent; border-color: var(--ink-200); color: var(--ink-600); }
.btn--ghost:hover { background: var(--ink-050); }
.btn--sm { padding: 4px 10px; font-size: 12px; }

.spinner {
  width: 15px; height: 15px; flex: none; display: none;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
.is-loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.alert {
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 14px;
}
.alert--error {
  background: var(--red-100); color: var(--red-600);
  border: 1px solid rgba(179, 55, 44, .25);
}

.legal {
  margin-top: 14px; font-size: 11px; line-height: 1.45;
  color: var(--ink-400); text-align: center;
}

/* ------------------------------------------------------------- legenda -- */

.map-legend {
  position: absolute; left: 14px; bottom: 22px; z-index: 500;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 11px 13px;
  font-size: 11.5px;
  max-width: 250px;
}
.map-legend__title { font-weight: 700; color: var(--ink-700); margin-bottom: 7px; }
.map-legend__title span { font-weight: 500; color: var(--ink-400); }
.map-legend__scale { display: flex; flex-direction: column; gap: 3px; margin-bottom: 9px; }
.legend-row { display: flex; align-items: center; gap: 7px; }
.legend-swatch { width: 22px; height: 11px; border-radius: 2px; flex: none; border: 1px solid rgba(0,0,0,.12); }
.map-legend__toggle {
  display: flex; align-items: center; gap: 7px;
  padding-top: 8px; border-top: 1px solid var(--ink-100);
  cursor: pointer; color: var(--ink-600);
}
.map-legend__toggle input { accent-color: var(--teal-600); }

/* popupy Leaflet */
.leaflet-popup-content-wrapper { border-radius: var(--radius); box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 11px 13px; font-family: var(--font); font-size: 12.5px; line-height: 1.45; }
.popup__title { font-weight: 700; color: var(--ink-900); margin-bottom: 4px; }
.popup__row { display: flex; justify-content: space-between; gap: 14px; }
.popup__row span:last-child { font-weight: 600; }

/* --------------------------------------------------------------- wynik -- */

.result {
  border-top: 1px solid var(--ink-200);
  background: var(--paper);
  padding: 34px 20px 48px;
  animation: fade-up .4s ease both;
  /* przyklejony pasek nie może zasłonić nagłówka po scrollIntoView */
  scroll-margin-top: calc(var(--topbar-h) + 12px);
}
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } }

.result__inner { max-width: 1560px; margin: 0 auto; }

.result__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
  padding-bottom: 24px; margin-bottom: 24px;
  border-bottom: 1px solid var(--ink-100);
}

.result__eyebrow {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-400); margin-bottom: 6px;
}
.result__price {
  font-size: clamp(30px, 5vw, 46px); line-height: 1.05;
  color: var(--copper-700); letter-spacing: -.028em;
  font-variant-numeric: tabular-nums;
}
.result__range { font-size: 14px; color: var(--ink-500); margin-top: 8px; }
.result__range strong { color: var(--ink-700); font-variant-numeric: tabular-nums; }

/* wskaźnik wiarygodności */
.confidence { display: flex; align-items: center; gap: 14px; }
.confidence__gauge { position: relative; width: 84px; height: 84px; flex: none; }
.confidence__gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.confidence__track { fill: none; stroke: var(--ink-100); stroke-width: 9; }
.confidence__value {
  fill: none; stroke: var(--teal-600); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 327;
  transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1), stroke .3s;
}
.confidence__num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 20px; font-weight: 700; color: var(--ink-800);
  font-variant-numeric: tabular-nums;
}
.confidence__meta { display: flex; flex-direction: column; line-height: 1.25; }
.confidence__meta strong { font-size: 16px; text-transform: capitalize; }
.confidence__meta span { font-size: 11.5px; color: var(--ink-400); text-transform: uppercase; letter-spacing: .07em; }

/* siatka kart */
.result__grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

.card {
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
}
.card--narrative { grid-column: span 2; background: linear-gradient(180deg, #fffdfa, var(--paper) 120px); }
.card--wide { grid-column: 1 / -1; }

.card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink-100);
  background: var(--ink-050);
}
.card__head h3 { font-size: 14px; color: var(--ink-700); }

.tag {
  font-size: 11px; font-weight: 650; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 999px;
  background: var(--ink-100); color: var(--ink-500);
}
.tag--ai { background: var(--copper-100); color: var(--copper-700); }

/* narracja */
.narrative { padding: 18px; }
.narrative__headline {
  font-size: 17px; font-weight: 650; color: var(--ink-900);
  line-height: 1.4; margin-bottom: 14px;
}
.narrative__section { margin-bottom: 13px; }
.narrative__section h4 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-400); margin: 0 0 4px;
}
.narrative__section p { font-size: 13.5px; color: var(--ink-600); line-height: 1.6; }

.factors { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.factor {
  font-size: 12px; font-weight: 550;
  padding: 4px 11px; border-radius: 999px;
  background: var(--teal-100); color: var(--teal-600);
  border: 1px solid rgba(16, 112, 122, .18);
}
.narrative__disclaimer {
  margin-top: 16px; padding-top: 13px;
  border-top: 1px solid var(--ink-100);
  font-size: 11.5px; color: var(--ink-400); line-height: 1.5;
}

/* rozbicie ceny */
.breakdown { padding: 8px 0; }
.bd-row {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 12px;
  padding: 9px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--ink-050);
}
.bd-row:last-child { border-bottom: 0; }
.bd-row--base { background: var(--ink-050); font-weight: 600; }
.bd-row--total {
  background: var(--copper-100); font-weight: 700;
  border-top: 1px solid rgba(176, 97, 36, .25);
}
.bd-row__label { color: var(--ink-700); }
.bd-row__hint {
  display: block; font-size: 11px; color: var(--ink-400);
  font-weight: 400; line-height: 1.4; margin-top: 2px;
}
.bd-row--neutral { opacity: .62; }
.bd-row--reconcile { background: var(--ink-050); font-style: italic; }
.bd-row__delta {
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  padding: 2px 7px; border-radius: 4px; white-space: nowrap;
}
.bd-row__delta--pos { background: rgba(28, 122, 79, .1); color: var(--green-600); }
.bd-row__delta--neg { background: var(--red-100); color: var(--red-600); }
.bd-row__delta--zero { background: var(--ink-100); color: var(--ink-400); }
.bd-row__value {
  font-variant-numeric: tabular-nums; font-weight: 600;
  color: var(--ink-800); min-width: 84px; text-align: right;
}

/* opis metody pod nagłówkiem wyniku */
.result__method {
  font-size: 13px; color: var(--ink-500); line-height: 1.55;
  margin: -8px 0 22px; max-width: 900px;
}
.result__method--warn {
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: #fff8e6; border: 1px solid rgba(168, 115, 10, .28);
  color: #6d4a06; margin-top: 0;
}

/* podsumowanie porównań: percentyle */
.comps-summary { padding: 14px 18px 0; }

.comps-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--ink-100);
  border: 1px solid var(--ink-100); border-radius: var(--radius-sm);
  overflow: hidden; margin-bottom: 10px;
}
.comps-stats div {
  background: var(--paper); padding: 9px 10px; text-align: center;
}
.comps-stats span {
  display: block; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-400); margin-bottom: 2px;
}
.comps-stats strong {
  font-size: 16px; font-variant-numeric: tabular-nums; color: var(--ink-700);
}
.comps-stats .is-median { background: var(--copper-100); }
.comps-stats .is-median strong { color: var(--copper-700); font-size: 18px; }

.comps-note { font-size: 12px; color: var(--ink-500); line-height: 1.5; margin-bottom: 10px; }
.comps-note strong { color: var(--ink-700); }

.comps-empty { padding: 18px; color: var(--ink-400); font-size: 13px; line-height: 1.55; }

.notice--sm { font-size: 12px; padding: 8px 10px; margin-bottom: 10px; }

/* ceny ofertowe */
.offers { padding: 16px 18px; }
.offers-note {
  font-size: 12.5px; color: var(--ink-600); line-height: 1.55;
  padding: 9px 11px; background: var(--teal-100);
  border-radius: var(--radius-sm); margin-top: 4px;
}
.offers-disclaimer {
  font-size: 11.5px; color: var(--ink-400); line-height: 1.5; margin-top: 10px;
}

.popup__note {
  margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--ink-100);
  font-size: 10.5px; color: var(--ink-400);
}

/* porównania */
.comps { max-height: 400px; overflow-y: auto; }
.comp {
  padding: 11px 18px; border-bottom: 1px solid var(--ink-050);
  cursor: pointer; transition: background .12s;
}
.comp:hover { background: var(--ink-050); }
.comp:last-child { border-bottom: 0; }
.comp__top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.comp__price { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-900); }
.comp__adj { font-size: 11px; color: var(--ink-400); text-align: right; }
.comp__adj em { display: block; font-style: normal; font-size: 10px; color: var(--ink-300); }
.comp__meta { font-size: 12px; color: var(--ink-500); margin-top: 3px; }
.comp__bar { height: 3px; border-radius: 2px; background: var(--ink-100); margin-top: 7px; overflow: hidden; }
.comp__bar i { display: block; height: 100%; background: var(--teal-600); }

/* rynek */
.market { padding: 16px 18px; }
.market__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.stat { }
.stat__label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-400); }
.stat__value { font-size: 19px; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat__value small { font-size: 12px; font-weight: 500; color: var(--ink-400); }
.stat__value.is-up { color: var(--green-600); }
.stat__value.is-down { color: var(--red-600); }

.sparkline { width: 100%; height: 78px; display: block; margin-top: 4px; }
.sparkline__caption { font-size: 11px; color: var(--ink-400); text-align: center; margin-top: 4px; }

/* metodyka */
.method { padding: 16px 18px; font-size: 13px; color: var(--ink-600); }
.method h4 { font-size: 12.5px; color: var(--ink-700); margin: 14px 0 6px; }
.method h4:first-child { margin-top: 0; }
.method ul { margin: 0; padding-left: 18px; }
.method li { margin-bottom: 4px; line-height: 1.55; }
.method table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.method th, .method td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--ink-100); }
.method th { color: var(--ink-400); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.method td:last-child, .method th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

.notice {
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: #fff8e6; border: 1px solid rgba(168, 115, 10, .28);
  color: #6d4a06; font-size: 12.5px; line-height: 1.5;
  margin-bottom: 14px;
}

/* --------------------------------------------------------------- stopka -- */

.footer {
  padding: 26px 20px 40px; text-align: center;
  font-size: 12px; color: var(--ink-400); line-height: 1.6;
  border-top: 1px solid var(--ink-200);
  background: var(--ink-050);
}
.footer p { max-width: 780px; margin: 0 auto; }
.footer strong { color: var(--ink-600); font-weight: 600; }
.footer__links { margin-top: 8px; }
.footer__credit {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--ink-200);
  font-size: 11.5px; color: var(--ink-400);
}
.footer__credit a {
  color: var(--copper-600); text-decoration: none; font-weight: 600;
}
.footer__credit a:hover { text-decoration: underline; }

/* --------------------------------------------------------------- mobile -- */

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .panel--map { position: static; height: 440px; min-height: 0; order: -1; }
  .card--narrative { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .layout { padding: 14px; gap: 14px; }
  .panel--form { padding: 18px; }
  .grid--2 { grid-template-columns: 1fr; }
  .result { padding: 24px 14px 36px; }
  .result__head { gap: 18px; }
  .topbar__meta .pill:nth-child(n+2) { display: none; }
  .market__stats { grid-template-columns: 1fr; }
  .bd-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .bd-row__value { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
