:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #14221d;
  background: #eef3f0;
  line-height: 1.4;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
header {
  background: #10231c; color: white; padding: 1rem clamp(1rem, 3vw, 2.5rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
h1 { margin: 0; font-size: clamp(1.35rem, 3vw, 2rem); }
header p { margin: .25rem 0 0; opacity: .8; }
main {
  display: grid; grid-template-columns: minmax(280px, 360px) 1fr;
  grid-template-areas: "intro intro" "controls map" "results results";
  gap: 1rem; padding: 1rem; max-width: 1500px; margin: auto;
}
.panel { background: white; border-radius: 16px; box-shadow: 0 3px 16px rgba(20, 40, 32, .08); overflow: hidden; }
.intro-panel { grid-area: intro; padding: 1.1rem; }
.controls { grid-area: controls; padding: 1rem; }
.map-panel { grid-area: map; min-height: 500px; }
.results-panel { grid-area: results; padding: 1rem; }
#map { width: 100%; height: 100%; min-height: 500px; }
.map-fallback { padding: 2rem; }
h2 { margin: 0 0 .8rem; }
label { display: flex; flex-direction: column; gap: .35rem; font-weight: 650; font-size: .92rem; margin: .7rem 0; }
input, select, button { font: inherit; }
input, select { border: 1px solid #c7d2cc; border-radius: 10px; padding: .7rem .75rem; background: white; min-width: 0; }
button { border: 0; border-radius: 10px; padding: .7rem .9rem; cursor: pointer; font-weight: 700; }
button:disabled { opacity: .55; cursor: not-allowed; }
.primary { width: 100%; margin-top: .8rem; background: #176b4e; color: white; padding: .9rem; }
.secondary, #gpsBtn { background: #e3efe9; color: #144c38; }
.ghost { background: rgba(255,255,255,.12); color: white; }
.inline, .location-row { display: flex; gap: .5rem; align-items: center; }
.inline input { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.check { flex-direction: row; align-items: center; font-weight: 600; }
.check input { width: auto; }
.hidden { display: none !important; }
.muted { color: #66766e; }
.fineprint { color: #68766f; font-size: .8rem; }
.warning { background: #fff4d6; border: 1px solid #e9ca71; border-radius: 10px; padding: .8rem; margin: .8rem 0; }
.results-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.status-chip { border-radius: 999px; background: #edf2ef; padding: .4rem .65rem; font-size: .82rem; white-space: nowrap; }
.best-card { border: 2px solid #2d8a64; background: #f1faf6; border-radius: 14px; padding: 1rem; margin: .7rem 0 1rem; }
.best-title { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.best-card h3 { margin: 0; }
.big-price { font-size: 1.5rem; font-weight: 850; white-space: nowrap; }
.metrics { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .7rem; }
.metric strong { display: block; }
.results { display: grid; gap: .7rem; }
.station { border: 1px solid #dce5e0; border-radius: 12px; padding: .8rem; display: grid; grid-template-columns: 1.6fr .7fr .8fr .8fr .8fr auto; gap: .6rem; align-items: center; }
.station.best { border-color: #2d8a64; background: #f5fbf8; }
.station-name strong { display: block; }
.station-name small, .station small { color: #66766e; }
.no-price { color: #925500; font-weight: 700; }
.money { font-variant-numeric: tabular-nums; font-weight: 750; }
.navlink { text-decoration: none; background: #edf2ef; color: #173b2e; border-radius: 9px; padding: .55rem .7rem; font-weight: 700; white-space: nowrap; }
.geocode-results { display: grid; gap: .35rem; margin-top: .4rem; }
.geocode-results button { text-align: left; background: #f1f5f3; font-weight: 550; }
details { margin-top: .7rem; }
summary { cursor: pointer; color: #52645b; }
footer { text-align: center; color: #718078; padding: 1rem 1rem 2rem; font-size: .85rem; }
footer p { margin: 0 0 .55rem; }
footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: .9rem; }
footer a { color: #176b4e; font-weight: 700; }
@media (max-width: 900px) {
  main { grid-template-columns: 1fr; grid-template-areas: "intro" "controls" "map" "results"; }
  .map-panel, #map { min-height: 360px; }
  .station { grid-template-columns: 1.5fr 1fr 1fr; }
  .station > :nth-child(4), .station > :nth-child(5) { display: none; }
}
@media (max-width: 560px) {
  header { align-items: flex-start; flex-direction: column; }
  .grid2 { grid-template-columns: 1fr; }
  .station { grid-template-columns: 1fr auto; }
  .station > :not(.station-name):not(.station-price):not(.navlink) { display: none; }
  .navlink { grid-column: 1 / -1; text-align: center; }
}

/* Cost-based station colors */
.map-legend {
  display: grid;
  gap: .28rem;
  min-width: 150px;
  padding: .65rem .75rem;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 2px 10px rgba(15, 23, 42, .12);
  color: #1f2937;
  font-size: .75rem;
  line-height: 1.2;
}
.map-legend strong { margin-bottom: .12rem; }
.map-legend span { display: flex; align-items: center; gap: .4rem; }
.map-legend i {
  width: .72rem;
  height: .72rem;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, .18);
  flex: 0 0 auto;
}
.station { border-left: 5px solid var(--station-cost-color, #64748b); }
.cost-dot {
  display: inline-block;
  width: .68rem;
  height: .68rem;
  margin-right: .42rem;
  border-radius: 50%;
  background: var(--station-cost-color, #64748b);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .15);
  vertical-align: .02rem;
}

/* The winner uses a separate accent from the cost scale. */
.best-card { border-color: #7c3aed; background: #f5f3ff; }
.station.best { border-color: #7c3aed; background: #f5f3ff; }


/* Advertising: visually separated from ranking and map controls. */
.ad-panel {
  position: relative;
  padding: .65rem;
  background: #fafcfb;
  border: 1px solid #e3e9e6;
  border-radius: 14px;
  text-align: center;
}
.ad-top { margin: .8rem 0 1rem; min-height: 110px; }
.ad-results { margin-top: 1rem; min-height: 110px; }
.ad-label {
  margin-bottom: .35rem;
  color: #7b8982;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ad-slot { min-height: 80px; display: grid; place-items: center; }
.ad-placeholder {
  width: 100%;
  min-height: 80px;
  display: grid;
  place-items: center;
  border: 1px dashed #bac6c0;
  border-radius: 10px;
  color: #718078;
  background: #f4f7f5;
  font-size: .86rem;
}



/* Crawlable publisher content: useful even before the interactive search runs. */
.publisher-content { color: #24372f; }
.intro-panel { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, .7fr); gap: 1rem; align-items: center; }
.intro-panel h2 { font-size: clamp(1.25rem, 2.4vw, 1.8rem); margin-bottom: .5rem; }
.intro-panel p { margin: .45rem 0; }
.eyebrow { margin: 0 0 .35rem !important; color: #176b4e; font-size: .78rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.intro-points { display: grid; gap: .55rem; padding: .9rem; background: #f1faf6; border: 1px solid #d5ebe1; border-radius: 12px; font-weight: 700; font-size: .9rem; }
.section-lead { margin: -.35rem 0 .7rem; color: #66766e; font-size: .88rem; }
.content-panel { grid-column: 1 / -1; padding: 1.15rem; }
.content-panel + .content-panel { margin-top: 0; }
.content-panel h2 { margin-bottom: .55rem; }
.content-panel h3 { margin: 0 0 .3rem; font-size: 1rem; }
.content-panel p { margin: .45rem 0 .8rem; max-width: 95ch; }
.content-panel a { color: #176b4e; font-weight: 750; }
.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.content-grid article { padding: .85rem; border: 1px solid #e0e8e4; border-radius: 12px; background: #fbfdfc; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin: .8rem 0; }
.principles div { display: grid; gap: .2rem; padding: .75rem; border-radius: 10px; background: #f1f5f3; }
.principles span { color: #607169; font-size: .88rem; }
.faq details { padding: .7rem 0; border-top: 1px solid #e1e8e4; }
.faq details:first-of-type { border-top: 0; }
.faq summary { font-weight: 750; color: #203d31; }
.faq details p { padding-left: 0; color: #52645b; }
@media (max-width: 900px) {
  .intro-panel { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
}
