:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --text: #1f2a24;
  --muted: #5d6b63;
  --line: #e2ded2;
  --green: #2f6f4f;
  --green-soft: #e3efe7;
  --orange: #c26a1b;
  --orange-soft: #f8e9da;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131a16;
    --surface: #1b241f;
    --text: #e7ece8;
    --muted: #9fb0a6;
    --line: #2c3a32;
    --green: #6cc093;
    --green-soft: #213a2c;
    --orange: #e8995a;
    --orange-soft: #3b2a1b;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--green); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: .4em 0 .3em; }
h2 { font-size: 1.4rem; margin: 2em 0 .8em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; color: var(--muted); }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.logo svg { width: 26px; height: 26px; fill: var(--green); }
.langs { display: flex; gap: 4px; }
.langs a, .langs span { padding: 4px 8px; border-radius: 6px; font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--muted); }
.langs span { background: var(--green-soft); color: var(--green); }
.langs a:hover { background: var(--green-soft); }

.hero { padding: 24px 0 8px; }
.crumbs { margin-top: 20px; font-size: .9rem; color: var(--muted); }

.country-table { width: 100%; border-collapse: collapse; margin-top: 28px; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.country-table th, .country-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.country-table th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.country-table tr:last-child td { border-bottom: 0; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }

.affiliate {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: 20px 0; padding: 16px 18px; border-radius: var(--radius); background: var(--orange-soft); border: 1px solid var(--line);
}
.affiliate p { margin: 2px 0 0; color: var(--muted); }
.btn {
  display: inline-block; padding: 10px 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--green); color: #fff; font: inherit; font-weight: 600; text-decoration: none;
}
.affiliate .btn { background: var(--orange); }
@media (prefers-color-scheme: dark) { .btn { color: #111; } }

.ad { margin: 20px 0; min-height: 90px; }

.explorer { margin-top: 24px; }
.map {
  height: min(60vh, 480px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--green-soft);
  display: flex; align-items: center; justify-content: center; overflow: hidden; z-index: 0;
}
.map-loading { color: var(--muted); }
.filters { display: grid; gap: 10px; margin: 16px 0 8px; }
.filters input[type="search"] {
  width: 100%; padding: 10px 14px; font: inherit; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
}
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seg label, .chip { cursor: pointer; }
.seg input, .chip input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .chip span {
  display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: .9rem; user-select: none;
}
.seg input:checked + span, .chip input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
@media (prefers-color-scheme: dark) { .seg input:checked + span, .chip input:checked + span { color: #111; } }
.seg input:focus-visible + span, .chip input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.count { color: var(--muted); font-size: .9rem; margin: 8px 0; }

.sites { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.site { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); cursor: pointer; }
.site:hover { border-color: var(--green); }
.site h3 { margin: 0 0 4px; font-size: 1.05rem; }
.site { overflow: hidden; }
.photo { margin: -14px -16px 10px; position: relative; background: var(--line); }
.photo img { display: block; width: 100%; height: 170px; object-fit: cover; }
.photo figcaption { position: absolute; right: 0; bottom: 0; left: 0; padding: 10px 8px 3px; font-size: .7rem; line-height: 1.3; text-align: right; background: linear-gradient(transparent, rgba(0,0,0,.6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo figcaption a { color: #fff; text-decoration: none; }
.photo figcaption a:hover { text-decoration: underline; }
.leaflet-popup-content .photo { margin: 0 0 8px; border-radius: 6px; overflow: hidden; }
.leaflet-popup-content .photo img { height: 130px; }
.meta { margin: 0; font-size: .88rem; color: var(--muted); }
.type { font-weight: 600; }
.type-c { color: var(--green); }
.type-m { color: var(--orange); }
.tags { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
.tags li { font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.links { margin: 10px 0 0; font-size: .88rem; }
.more { display: block; margin: 20px auto; }
.note { font-size: .85rem; margin-top: 20px; }

.others .other-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }

.site-footer { margin-top: 56px; padding: 24px 0; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }

.root-choose { padding-top: 15vh; text-align: center; }
.root-choose ul { list-style: none; padding: 0; display: flex; justify-content: center; gap: 16px; }

/* Leaflet popups in dark mode */
.leaflet-popup-content { font: 14px/1.5 system-ui, sans-serif; }
.leaflet-popup-content .tags li { background: #e3efe7; color: #2f6f4f; }
.leaflet-popup-content .meta { color: #5d6b63; }

@media (max-width: 600px) {
  .country-table th, .country-table td { padding: 7px 8px; font-size: .9rem; }
  .sites { grid-template-columns: 1fr; }
}

.prose { max-width: 72ch; }
.prose h2 { font-size: 1.2rem; margin: 1.8em 0 .5em; }
.footer-links a { color: var(--muted); }

.recent { margin-top: 32px; }
.added { margin: 8px 0 0; font-size: .82rem; color: var(--orange); font-weight: 600; }
.added a { color: inherit; }

.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; }
.btn.near { white-space: nowrap; background: var(--surface); color: var(--green); border: 1px solid var(--green); }
.btn.near.active { background: var(--green); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.near.active { color: #111; } }
.btn.near[disabled] { opacity: .6; cursor: progress; }
.dist { font-weight: 700; color: var(--text); }
.other-links a .muted { font-size: .85em; }

.header-right { display: flex; align-items: center; gap: 12px; }
.nav-link { font-weight: 600; font-size: .92rem; color: var(--text); text-decoration: none; padding: 4px 8px; border-radius: 6px; }
.nav-link:hover { background: var(--green-soft); }
@media (max-width: 480px) { .nav-link { font-size: .85rem; padding: 4px; } .logo { font-size: 1rem; } }

.route-form { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.route-form .place { position: relative; display: grid; gap: 4px; }
.route-form label { font-weight: 600; font-size: .9rem; }
.route-form input[type="text"], .route-form select {
  font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); width: 100%;
}
.route-form .opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.route-form .opts label { display: grid; gap: 4px; }
.route-form button[type="submit"] { justify-self: start; }
.suggest {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 10; list-style: none; margin: 4px 0 0; padding: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.suggest li { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.suggest li:hover, .suggest li.active { background: var(--green-soft); }
.route-status { margin: 0; color: var(--orange); font-weight: 600; min-height: 1.4em; }
.route-results { margin-top: 24px; }
.day { font-size: 1.1rem; margin: 1.6em 0 .6em; padding-top: .6em; border-top: 1px solid var(--line); }

.stars { color: var(--orange); letter-spacing: 1px; }

/* Language menu */
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; padding: 4px 10px; border-radius: 6px; font-size: .85rem; font-weight: 700;
  color: var(--green); background: var(--green-soft);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ' ▾'; font-weight: 400; }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 1000; list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14);
  columns: 2; column-gap: 4px; width: max-content; max-width: calc(100vw - 32px);
}
.lang-menu li { break-inside: avoid; }
.lang-menu a, .lang-menu span { display: block; padding: 6px 10px; border-radius: 6px; font-size: .9rem; text-decoration: none; color: var(--text); white-space: nowrap; }
.lang-menu a:hover { background: var(--green-soft); }
.lang-menu span[aria-current] { font-weight: 700; color: var(--green); }

/* Keep the header on one line on phones, whatever the language */
.logo, .lang-menu summary { white-space: nowrap; }
.header-inner { gap: 10px; }
.header-right { min-width: 0; gap: 8px; }
.nav-link { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 480px) {
  .logo { font-size: .95rem; }
  .logo svg { width: 22px; height: 22px; }
  .nav-link { max-width: 42vw; }
}

/* Europe map on the home page */
.europe-map { margin: 0 auto; max-width: min(900px, calc((100vh - 110px) * 0.962)); background: var(--map-sea); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.europe-map svg { display: block; width: 100%; height: auto; }
:root { --map-sea: #e6eef0; --map-ctx: #ecebe4; --map-edge: #ffffff; --q0: #d9ead9; --q1: #b7d8bf; --q2: #8cc09e; --q3: #5c9f78; --q4: #2f6f4f; --map-label: #13241a; --map-halo: rgba(255,255,255,.85); }
@media (prefers-color-scheme: dark) {
  :root { --map-sea: #0f1713; --map-ctx: #222b26; --map-edge: #0f1713; --q0: #23392c; --q1: #2b4a37; --q2: #356146; --q3: #3f7a56; --q4: #4d9468; --map-label: #f1f5f2; --map-halo: rgba(15,23,19,.85); }
}
.europe-map .land { fill: var(--map-ctx); stroke: var(--map-edge); stroke-width: .8; }
.europe-map .land.none { fill: var(--q0); opacity: .5; }
.europe-map .c path { stroke: var(--map-edge); stroke-width: .9; stroke-linejoin: round; transition: fill .15s; }
.europe-map .q0 path { fill: var(--q0); } .europe-map .q1 path { fill: var(--q1); } .europe-map .q2 path { fill: var(--q2); }
.europe-map .q3 path { fill: var(--q3); } .europe-map .q4 path { fill: var(--q4); }
.europe-map .c:hover path, .europe-map .c:focus-visible path { fill: var(--orange); }
.europe-map .c:focus-visible { outline: none; }
.europe-map .labels { pointer-events: none; }
.europe-map .lbl { fill: var(--map-label); text-anchor: middle; paint-order: stroke; stroke: var(--map-halo); stroke-width: 3px; stroke-linejoin: round; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.europe-map .lbl .name { font-size: 15px; font-weight: 700; }
.europe-map .lbl .cc { font-size: 12.5px; font-weight: 800; letter-spacing: .03em; }
.europe-map .lbl .n { font-size: 12.5px; font-weight: 500; }
.europe-map .callout { pointer-events: auto; }
.europe-map .callout line { stroke: var(--map-label); stroke-width: .8; }
.europe-map .callout circle { fill: var(--orange); stroke: var(--map-halo); stroke-width: 1; }
.europe-map .callout text { stroke-width: 3px; }
.europe-map .lbl.m { display: none; font-size: 30px; font-weight: 800; }
@media (max-width: 600px) {
  .europe-map .lbl.d { display: none; }
  .europe-map .lbl.m { display: inline; }
  .europe-map .callout { display: none; }
}

/* Hover summary on map points */
.leaflet-tooltip.site-tip { padding: 8px 10px; width: max-content; max-width: 250px; white-space: normal; border: 0; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.18); font: 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1f2a24; }
.site-tip img { display: block; height: 110px; object-fit: cover; margin: -8px -10px 6px; width: calc(100% + 20px); max-width: none; border-radius: 8px 8px 0 0; }
.site-tip strong { display: block; font-size: 14px; }
.site-tip .sub { display: block; color: #5d6b63; }
.site-tip .stars { color: #c26a1b; }
.site-tip .feats { display: block; margin-top: 3px; color: #2f6f4f; font-size: 12px; }

/* "Good to know" section on country pages */
.guide h2 { margin-bottom: .4em; }
.guide h3 { font-size: 1.05rem; margin: 1.2em 0 .25em; }
.guide p { margin: 0 0 .6em; }

/* Monthly climate table */
.climate { margin-top: 28px; }
.climate-pick { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 600; }
.climate-pick select { font: inherit; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); max-width: 70vw; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.climate-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.climate-table th, .climate-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.climate-table thead th { font-size: .82rem; color: var(--muted); font-weight: 600; }
.climate-table tbody th { font-weight: 500; text-transform: capitalize; }
.climate-table tr:last-child th, .climate-table tr:last-child td { border-bottom: 0; }
.climate-table td.x, .climate-table td.n { background: hsl(calc(210 - var(--t) * 7) 80% 87%); color: #1d2a22; }
@media (prefers-color-scheme: dark) {
  .climate-table td.x, .climate-table td.n { background: hsl(calc(210 - var(--t) * 7) 45% 27%); color: #eef3ef; }
}
.small { font-size: .82rem; }
.climate-table .m-short, .climate-table .h-short { display: none; }
@media (max-width: 600px) {
  .climate-table th, .climate-table td { padding: 6px 6px; font-size: .88rem; }
  .climate-table thead th { font-size: .72rem; white-space: normal; }
  .climate-table .m-long { display: none; }
  .climate-table .m-short, .climate-table .h-short { display: inline; }
  .climate-table .h-long { display: none; }
}

/* Shortcuts to the sections below the map */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.jump a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; }
.jump a::after { content: '↓'; color: var(--green); }
.jump a:hover { border-color: var(--green); }
.guide.prose { max-width: none; }
section[id] { scroll-margin-top: 16px; }
