:root {
  --accent: #ff7a3d;
  --accent-strong: #e85f22;
  --accent-soft: #ffe5d7;
  --ink: #181614;
  --ink-2: #342f2a;
  --muted: #70675f;
  --line: #ded7ce;
  --paper: #fffaf2;
  --paper-2: #f4eee5;
  --surface: #ffffff;
  --green: #1f8f63;
  --steel: #386481;
  --warning: #a66a00;
  --danger: #9f3b24;
  --shadow: 0 16px 34px rgba(43, 34, 27, 0.14);
  --shadow-tight: 0 8px 18px rgba(43, 34, 27, 0.12);
  --radius: 8px;
  --radius-small: 5px;
  --max: 1180px;
  --display: "Bahnschrift", "DIN Condensed", "Arial Narrow", sans-serif;
  --body: "Atkinson Hyperlegible", "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 122, 61, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(24, 22, 20, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px, 34px 34px, auto;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(24, 22, 20, 0.08) 1px, transparent 1px);
  background-size: 9px 9px;
  opacity: 0.18;
  mask-image: linear-gradient(to bottom, #000, transparent 64%);
  z-index: -1;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-140%);
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-small);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand img {
  width: 154px;
  height: auto;
  display: block;
  margin: -36px -14px -36px -20px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link,
.nav-badge {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.9rem;
  text-decoration: none;
}

.nav-badge {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 18px auto 34px;
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.98fr);
  align-items: center;
  gap: 34px;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  left: -14px;
  top: 34px;
  width: 148px;
  height: 24px;
  background: repeating-linear-gradient(135deg, var(--accent), var(--accent) 8px, transparent 8px, transparent 16px);
  transform: rotate(-6deg);
  opacity: 0.88;
  z-index: -1;
}

.brand-line,
.section-kicker {
  margin: 0 0 10px;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 800;
  color: var(--accent-strong);
}

.hero h1,
.tool-heading h2,
.program-band h2,
.faq-intro h2,
.trust-band h2 {
  margin: 0;
  font-family: var(--display);
  line-height: 0.96;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  font-size: 4.9rem;
}

.hero-text {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--ink-2);
  font-size: 1.2rem;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-small);
  padding: 11px 16px;
  text-decoration: none;
  font-weight: 900;
  line-height: 1.1;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(255, 122, 61, 0.36);
  outline-offset: 3px;
}

.button-primary {
  background: var(--accent);
  color: var(--ink);
}

.button-secondary {
  background: #fff;
}

.button-dark {
  background: var(--ink);
  color: #fff;
  box-shadow: none;
}

.button-dark:hover,
.button-dark:focus-visible {
  box-shadow: 4px 4px 0 var(--accent);
}

.button-ghost {
  background: transparent;
  box-shadow: none;
}

.hero-visual {
  min-height: 430px;
  position: relative;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 52% 50%;
}

.tool-shell,
.faq-section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 34px;
}

.tool-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.tool-heading h2,
.program-band h2,
.faq-intro h2,
.trust-band h2 {
  font-size: 2.45rem;
}

.data-notice {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: right;
}

.tool-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  grid-template-areas:
    "controls map"
    "results results";
  gap: 16px;
}

.control-panel,
.map-panel,
.results-panel {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-tight);
}

.control-panel {
  grid-area: controls;
  padding: 16px;
}

.filters-form {
  display: grid;
  gap: 15px;
}

.search-label,
.select-label,
fieldset legend {
  display: block;
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--ink);
}

.search-box input,
select {
  width: 100%;
  min-height: 46px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-small);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

.filter-toggle {
  display: none;
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-small);
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 900;
}

.filter-body {
  display: grid;
  gap: 14px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.check-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

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

.status-panel {
  margin-top: 16px;
  border-top: 2px dashed var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.status-panel p {
  margin: 0;
}

.map-panel {
  grid-area: map;
  overflow: hidden;
  min-height: 650px;
  height: 100%;
  position: relative;
  display: flex;
}

.map-canvas {
  width: 100%;
  flex: 1 1 auto;
  min-height: 650px;
  height: auto;
  background: #e7efe6;
}

.map-summary {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 500;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(24, 22, 20, 0.18);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-2);
  font-size: 0.82rem;
}

.results-panel {
  grid-area: results;
  padding: 18px;
}

.results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.results-header h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.65rem;
  text-transform: uppercase;
}

.results-header p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.results-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.spot-card {
  min-height: 190px;
  display: grid;
  gap: 10px;
  align-content: start;
  border: 2px solid var(--ink);
  border-radius: var(--radius-small);
  background: #fff;
  padding: 14px;
  text-align: left;
  box-shadow: 4px 4px 0 rgba(24, 22, 20, 0.16);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.spot-card:hover,
.spot-card:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(24, 22, 20, 0.2);
}

.spot-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.spot-meta,
.spot-distance {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.equipment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.equipment-list li,
.quality-badge,
.source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 4px 8px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 0.8rem;
  font-weight: 800;
}

.quality-badge {
  width: fit-content;
  border-color: transparent;
  color: #fff;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.source-badge {
  border-color: rgba(24, 22, 20, 0.16);
  background: #fff4dc;
  color: var(--ink);
}

.source-line {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.quality-tres-fiable {
  background: #176b45;
}

.quality-fiable {
  background: var(--green);
}

.quality-probable {
  background: var(--steel);
}

.quality-a-verifier,
.quality-a-confirmer {
  background: var(--warning);
}

.osm-link {
  width: fit-content;
  color: var(--ink);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.empty-state {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--paper);
}

.empty-state h3,
.empty-state p {
  margin-top: 0;
}

.guide-stack {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 34px;
  display: grid;
  gap: 16px;
}

.guide-card {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-tight);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.guide-card::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -34px;
  width: 150px;
  height: 150px;
  border: 16px solid rgba(255, 122, 61, 0.22);
  transform: rotate(18deg);
  pointer-events: none;
}

.guide-card .section-kicker {
  position: relative;
  z-index: 1;
}

.guide-card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 2.25rem;
  line-height: 0.96;
  letter-spacing: 0;
  text-transform: uppercase;
}

.guide-card p {
  position: relative;
  z-index: 1;
  max-width: 940px;
  margin: 0 0 12px;
  color: var(--ink-2);
}

.guide-card p:last-child {
  margin-bottom: 0;
}

.guide-card ul {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.guide-card li {
  position: relative;
  padding: 12px 12px 12px 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper);
  color: var(--ink-2);
}

.guide-card li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 19px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.guide-card strong {
  color: var(--ink);
  font-weight: 900;
}

.guide-card-dark {
  background: var(--ink);
  color: #fff;
}

.guide-card-dark::after {
  border-color: rgba(255, 122, 61, 0.44);
}

.guide-card-dark h2,
.guide-card-dark strong {
  color: #fff;
}

.guide-card-dark p,
.guide-card-dark li {
  color: rgba(255, 255, 255, 0.84);
}

.guide-card-dark li {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.guide-card-dark .section-kicker {
  color: var(--accent);
}

@media (max-width: 680px) {
  .guide-stack {
    width: calc(100% - 20px);
  }

  .guide-card {
    padding: 18px;
  }

  .guide-card h2 {
    font-size: 2.05rem;
  }

  .guide-card li {
    padding: 11px 11px 11px 34px;
  }

  .guide-card li::before {
    left: 12px;
  }
}

.trust-band,
.program-band {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 34px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.trust-band::after,
.program-band::after {
  content: "";
  position: absolute;
  right: -44px;
  top: -24px;
  width: 170px;
  height: 170px;
  border: 18px solid rgba(255, 122, 61, 0.44);
  transform: rotate(18deg);
}

.trust-band p,
.program-band p {
  max-width: 820px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.84);
}

.program-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: #fff;
  color: var(--ink);
}

.program-band p {
  color: var(--ink-2);
}

.program-band .button {
  flex: 0 0 auto;
  max-width: 360px;
}

.faq-section {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 2px solid var(--ink);
  border-radius: var(--radius-small);
  background: #fff;
  padding: 0;
  box-shadow: 4px 4px 0 rgba(24, 22, 20, 0.12);
}

summary {
  cursor: pointer;
  padding: 16px;
  font-weight: 900;
}

details p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--ink-2);
}

.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 36px auto 0;
  padding: 22px 0 34px;
  color: var(--muted);
  border-top: 2px solid var(--line);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0 0 8px;
}

.spot-marker {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--warning);
  box-shadow: 0 5px 0 rgba(24, 22, 20, 0.18);
}

.spot-marker::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
}

.spot-marker-fiable {
  background: var(--green);
}

.spot-marker-tres-fiable {
  background: #176b45;
}

.spot-marker-probable {
  background: var(--steel);
}

.spot-marker-a-verifier,
.spot-marker-a-confirmer {
  background: var(--warning);
}

.marker-cluster {
  background: transparent;
}

.marker-cluster div {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: 0 6px 0 rgba(24, 22, 20, 0.22);
}

.leaflet-popup-content-wrapper {
  border: 2px solid var(--ink);
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-tight);
}

.leaflet-popup-content {
  margin: 14px;
  font-family: var(--body);
}

.popup-title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1;
  text-transform: uppercase;
}

.popup-meta,
.popup-note,
.popup .source-line {
  margin: 0 0 8px;
  color: var(--muted);
}

.popup-equipments {
  margin: 0 0 8px;
  padding-left: 18px;
}

.popup-link {
  display: block;
  width: fit-content;
  margin-top: 6px;
  font-weight: 900;
}

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero h1 {
    font-size: 3.85rem;
  }

  .hero-visual {
    min-height: 340px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "controls"
      "map"
      "results";
  }

  .control-actions {
    grid-template-columns: 1fr 1fr;
  }

  .results-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .faq-section,
  .program-band {
    grid-template-columns: 1fr;
  }

  .program-band {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 15px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header nav {
    justify-content: flex-start;
  }

  .hero {
    width: min(var(--max), calc(100% - 20px));
    margin-top: 8px;
    gap: 22px;
  }

  .hero::after {
    width: 100px;
  }

  .hero h1 {
    font-size: 3.05rem;
  }

  .hero-text {
    font-size: 1.04rem;
  }

  .hero-actions,
  .control-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .hero-visual {
    min-height: 250px;
  }

  .tool-shell,
  .trust-band,
  .program-band,
  .faq-section,
  .site-footer {
    width: calc(100% - 20px);
  }

  .tool-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-heading h2,
  .program-band h2,
  .faq-intro h2,
  .trust-band h2 {
    font-size: 2.05rem;
  }

  .data-notice {
    text-align: left;
  }

  .filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .filter-body {
    display: none;
  }

  .filters-open .filter-body {
    display: grid;
  }

.map-panel {
  min-height: 430px;
}

.map-canvas {
  min-height: 430px;
}
  .results-list {
    grid-template-columns: 1fr;
  }

  .results-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .faq-section {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
