:root {
  --navy: #0b2a5b;
  --navy-2: #12397a;
  --yellow: #ffc20e;
  --yellow-2: #ffd34d;
  --blue: #2b6fd6;
  --red: #d7263d;
  --ink: #0b2a5b;
  --muted: #5b6b86;
  --line: #dfe6f1;
  --panel: #f3f6fb;
  --card: #ffffff;
  --radius: 22px;
  --shadow: 0 20px 50px -24px rgba(11, 42, 91, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Figtree, ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--navy);
  padding: 18px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .count, .brand { font-family: Outfit, Arial, sans-serif; }
svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
button, input, select { font: inherit; color: inherit; }

.frame {
  max-width: 1280px;
  margin: 0 auto;
  background: radial-gradient(1200px 500px at 85% -10%, #e4ecf9 0%, transparent 60%), var(--panel);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}

/* top bar */
.topbar {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  padding: 10px 18px; position: relative; z-index: 1000; border-bottom: 1px solid var(--line);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 9999px; padding: 8px 14px;
  background: rgba(255,255,255,.85); border: 1px solid var(--line);
  color: var(--navy); text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 14px -8px rgba(11,42,91,.3);
}
.brand { font-weight: 700; font-size: 15px; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 2px solid var(--yellow); padding: 1px; }
.lang { position: relative; }
.lang-btn { font-weight: 600; font-size: 14px; }
.lang-btn .chev { fill: none; stroke: currentColor; stroke-width: 2; width: 14px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); min-width: 170px;
}
.lang-menu li { padding: 9px 12px; border-radius: 10px; cursor: pointer; display: flex; justify-content: space-between; font-weight: 500; }
.lang-menu li:hover, .lang-menu li[aria-selected="true"] { background: var(--panel); }
.lang-menu li small { color: var(--muted); font-weight: 700; }

.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--blue); margin: 0; }
h1 { font-size: 20px; line-height: 1.2; margin: 0; font-weight: 700; text-align: center; }
.lead { font-size: 15px; line-height: 1.5; color: var(--muted); margin: 0; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.perch { position: absolute; width: 128px; right: 14px; top: -10px; filter: drop-shadow(0 10px 14px rgba(11,42,91,.25)); pointer-events: none; }
.search-card { position: relative; padding: 22px; display: grid; gap: 12px; align-content: start; }
.search-card { padding-top: 112px; }
.intro { display: flex; gap: 6px 18px; align-items: baseline; flex-wrap: wrap; padding: 16px 24px 0; }
.steps { list-style: none; margin: 0 0 4px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.steps li { background: var(--panel); border-radius: 12px; padding: 10px 12px; font-size: 13px; display: grid; gap: 2px; }
.steps span { color: var(--blue); font-weight: 700; font-size: 11px; }
.steps b { font-weight: 600; }
.search { display: flex; gap: 8px; }
.search input {
  flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; outline: none;
}
.search input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(43,111,214,.12); }
.btn {
  border: 0; border-radius: 14px; padding: 14px 18px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .08s, filter .15s;
}
.btn:active { transform: translateY(1px); }
.btn-yellow { background: var(--yellow); color: var(--navy); }
.btn-yellow:hover { filter: brightness(1.05); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.status { margin: 0; min-height: 20px; font-size: 14px; color: var(--muted); }
.status.err { color: var(--red); }

/* finder */
.finder { padding: 20px 24px 36px; }
.finder-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: stretch; margin-bottom: 28px; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-left: auto; }
select {
  border: 1.5px solid var(--line); border-radius: 9999px; padding: 10px 36px 10px 16px; background: #fff;
  appearance: none; font-weight: 600; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%230b2a5b' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.seg { display: inline-flex; background: var(--panel); border-radius: 9999px; padding: 4px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9999px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--navy); color: #fff; }
.list-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.count { margin: 0; font-weight: 700; font-size: 22px; }
.sample { margin: 0 0 14px; font-size: 13px; background: #fff7dc; border: 1px solid #ffe08a; color: #7a5a00; padding: 8px 12px; border-radius: 10px; }

.map-wrap { position: relative; display: flex; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
#map { flex: 1; min-height: 340px; background: #dfe9f5; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); align-items: start; }
.empty { padding: 30px; text-align: center; color: var(--muted); background: var(--panel); border-radius: var(--radius); }

.spot { padding: 18px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.spot:hover { border-color: #b9c9e3; }
.spot.active { border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255,194,14,.25); }
.spot-head { display: flex; gap: 10px; align-items: center; }
.num { width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); color: var(--navy); font-weight: 800; display: grid; place-items: center; flex: none; font-size: 13px; border: 2px solid var(--navy); }
.spot h3 { margin: 0; font-size: 17px; line-height: 1.2; flex: 1; }
.share { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.share:hover { color: var(--navy); border-color: #b9c9e3; }
.share svg { width: 15px; height: 15px; }
.line { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; font-size: 14px; line-height: 1.45; }
.line svg { width: 16px; height: 16px; margin-top: 2px; color: var(--blue); }
.line b { color: var(--ink); }
.dist { color: var(--muted); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions a {
  font-size: 13px; padding: 9px 14px; border-radius: 9999px; font-weight: 700; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: #fff; color: var(--navy);
}
.actions svg { width: 15px; height: 15px; }
.actions .primary { background: var(--yellow); border-color: var(--yellow); }
.actions .wa { background: #e8f8ee; border-color: #c4ecd2; color: #11663a; }

/* fly-by over the map on a new search */
.flyby { position: absolute; left: 0; top: 0; z-index: 900; pointer-events: none; filter: drop-shadow(0 18px 18px rgba(11,42,91,.35)); }

/* map markers */
.pin { background: none; border: 0; }
.pin div {
  position: relative; width: 44px; height: 44px; border-radius: 50%; background: #fff;
  border: 3px solid var(--yellow); box-shadow: 0 6px 14px -4px rgba(11,42,91,.55); overflow: hidden;
  transition: transform .15s;
}
.pin::after {
  content: ''; position: absolute; left: 50%; top: 41px; transform: translateX(-50%);
  border: 7px solid transparent; border-top: 9px solid var(--yellow); border-bottom: 0;
}
.pin img { width: 100%; height: 100%; display: block; object-fit: contain; transform: scale(1.15); }
.pin span {
  position: absolute; right: -4px; top: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--navy); color: #fff; font: 800 10px/18px Figtree, sans-serif; text-align: center; border: 2px solid #fff;
}
.pin.on div { border-color: var(--navy); transform: scale(1.15); }
.pin.on::after { border-top-color: var(--navy); }
.pin.on span { background: var(--yellow); color: var(--navy); }
.me { width: 18px; height: 18px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(43,111,214,.25); }
.leaflet-popup-content-wrapper { border-radius: 14px; font-family: Figtree, sans-serif; }
.leaflet-popup-content { margin: 12px 14px; color: var(--navy); }
.leaflet-popup-content b { font-family: Outfit, sans-serif; font-size: 15px; }

/* faq */
.faq { padding: 36px 48px 20px; }
.faq h2 { margin: 0 0 16px; font-size: 26px; }
#faq { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; }
summary { font-weight: 700; cursor: pointer; }
details p { margin: 10px 0 0; color: var(--muted); line-height: 1.5; }
.foot { padding: 20px 48px 32px; font-size: 13px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 9999px; font-weight: 600; z-index: 2000; }

@media (max-width: 900px) {
  body { padding: 8px; }
  .frame { border-radius: 20px; }
  .topbar { grid-template-columns: 1fr auto; padding: 10px 12px; gap: 10px; }
  .topbar h1 { grid-column: 1 / -1; grid-row: 2; font-size: 18px; text-align: left; }
  .perch { width: 100px; right: 8px; top: -4px; }
  .search-card { padding-top: 104px; }
  .intro { padding: 12px 12px 0; }
  .filters { margin-left: 0; width: 100%; }
  .finder-top { grid-template-columns: 1fr; }
  .search-card { order: -1; }
  .finder { padding: 14px 12px 24px; }
  #map { min-height: 360px; }
  .list { grid-template-columns: 1fr; }
  .faq { padding: 28px 16px 10px; }
  #faq { grid-template-columns: 1fr; }
  .foot { padding: 16px 16px 24px; }
}
@media (max-width: 420px) {
  .steps b { font-size: 12px; }
  .search { flex-direction: column; }
}
