:root {
  --bg: #fff8ee;
  --card: #ffffff;
  --ink: #23313f;
  --muted: #5d6b78;
  --line: #efe3d2;
  /* from the logo: red roofs, blue door, yellow battlements */
  --coral: #ee1f2e;
  --coral-dark: #c41522;
  --teal: #0155a2;
  --sun: #fec001;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 'Nunito', system-ui, sans-serif; }
a { color: var(--coral-dark); }
h1, h2, h3 { font-family: 'Fredoka', 'Nunito', sans-serif; font-weight: 600; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
h2 { font-size: 1.35rem; margin-top: 1.6em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; max-width: 1400px; margin: 0 auto; }
.logo { display: block; line-height: 0; }
.logo img { height: 64px; width: auto; }
.top nav { display: flex; gap: 16px; font-weight: 700; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { color: var(--coral-dark); }
.lang { border: 2px solid var(--line); border-radius: 999px; padding: 2px 12px; }

/* intro above the map */
.intro { max-width: 1400px; margin: 0 auto; padding: 8px 16px 12px; }
.intro p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* map */
.mapwrap { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.toolbar::-webkit-scrollbar { display: none; }
.filters { display: flex; gap: 8px; }
.nearme, .fchip { flex: none; font: inherit; font-weight: 700; font-size: .92rem; border-radius: 999px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.nearme { background: var(--ink); color: #fff; border: 2px solid var(--ink); }
.fchip { background: var(--card); color: var(--ink); border: 2px solid var(--line); }
.fchip[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: #fff; }
#map { height: 68vh; min-height: 380px; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--line); background: #eef2f0; }
.mini #map { height: 340px; min-height: 0; }
.mini .toolbar, .mini .legend { display: none; }
.mini { padding: 0; }
.legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; margin-top: 8px; }
.dot { display: inline-block; border-radius: 50%; border: 2px solid #fff; margin-left: 10px; }
.dot:first-child { margin-left: 0; }
.dot.big { width: 14px; height: 14px; background: var(--coral); box-shadow: 0 0 0 1px var(--line); }
.dot.small { width: 9px; height: 9px; background: var(--teal); }
.pop strong { display: block; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.05rem; margin-bottom: 4px; color: var(--ink); }
.pop a { font-weight: 800; text-decoration: none; }
.maplibregl-popup-content { border-radius: 12px; padding: 12px 30px 12px 14px; font-family: 'Nunito', sans-serif; }
.focus-pin, .me-pin { width: 22px; height: 22px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.3); }
.focus-pin { background: var(--coral); }
.me-pin { background: #3478f6; width: 18px; height: 18px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--coral); transform: translateY(-2px); }
.card strong { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.1rem; line-height: 1.2; }
.where { color: var(--muted); font-size: .92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { background: #e8f0fa; color: var(--teal); border-radius: 999px; padding: 2px 10px; font-size: .82rem; font-weight: 700; }
.chips.big .chip { font-size: 1rem; padding: 6px 14px; }

.kommuner { list-style: none; padding: 0; margin: 0; columns: 3 200px; }
.kommuner li { padding: 3px 0; break-inside: avoid; }
.kommuner a, .plain a { font-weight: 700; text-decoration: none; }
.kommuner span, .plain span { color: var(--muted); font-size: .9rem; }
.plain { columns: 2 280px; padding-left: 18px; }
.plain li { padding: 2px 0; break-inside: avoid; }

/* playground page */
.pg { padding-top: 8px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.lead { color: var(--muted); font-size: 1.1rem; margin-top: 0; }
.pg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.pg-grid h2:first-child, .pg-grid section:first-child h2 { margin-top: .4em; }
.near { list-style: none; padding: 0; margin: 0; }
.near li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.near span { color: var(--muted); float: right; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 0; }
.facts div { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.facts dt { font-size: .8rem; color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; font-weight: 700; }
.btn { display: inline-block; background: var(--coral); color: #fff; font-weight: 800; text-decoration: none; border-radius: 999px; padding: 10px 20px; }
.btn:hover { background: var(--coral-dark); }
.actions { margin-top: 22px; }
.muted, .small { color: var(--muted); }
.small { font-size: .88rem; }
.small a { color: var(--muted); }
.minimap-wrap { position: sticky; top: 12px; }
.prose { max-width: 680px; padding-top: 16px; padding-bottom: 40px; font-size: 1.08rem; }

.foot { max-width: 1100px; margin: 48px auto 0; padding: 24px 16px 36px; border-top: 2px solid var(--line); color: var(--muted); font-size: .9rem; }
.foot p { margin: 4px 0; }
.foot a { color: var(--muted); }

@media (max-width: 760px) {
  .pg-grid { grid-template-columns: 1fr; }
  .minimap-wrap { position: static; order: -1; }
  #map { height: 62vh; }
  .top nav { gap: 10px; font-size: .95rem; }
  .logo img { height: 48px; }
}

/* feedback */
.fb { margin-top: 26px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.fb h2 { margin-top: 0; font-size: 1.15rem; }
.thumbs { display: flex; gap: 10px; }
.thumb, .cbtn { font: inherit; font-weight: 800; background: var(--bg); border: 2px solid var(--line); border-radius: 999px; padding: 8px 18px; cursor: pointer; color: var(--ink); }
.thumb { font-size: 1.1rem; }
.thumb[aria-pressed="true"], .cbtn[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: #fff; }
.ask { margin-top: 16px; padding-top: 14px; border-top: 2px dashed var(--line); }
.ask p { margin: 0 0 8px; }
.askbtns { display: flex; gap: 8px; }
.crowd { margin-top: 8px !important; }
.comments { margin-top: 10px; }
.clist { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.clist li { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.clist p { margin: 0 0 4px; }
.cform { display: grid; gap: 10px; max-width: 560px; }
.cform label { display: grid; gap: 4px; font-weight: 700; font-size: .95rem; }
.cform textarea, .cform input { font: inherit; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; color: var(--ink); }
.cform textarea:focus, .cform input:focus { outline: none; border-color: var(--coral); }
.cform .btn { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 800; }
.cform .btn:disabled { opacity: .6; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* near me + guides */
.btn.big { font-size: 1.15rem; padding: 14px 28px; border: 0; cursor: pointer; font-family: inherit; }
.nearcta { margin: 14px 0 6px; }
.nearmsg { background: #fff3d1; border-radius: 12px; padding: 10px 14px; }
#nearlist:not(:empty) { margin: 8px 0 20px; }
.faq details { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
.faq summary { font-weight: 800; cursor: pointer; }
.faq p { margin: 8px 0 2px; }
.article .prose { padding: 0; }
.article h2 .count { color: var(--muted); font-size: .9rem; font-family: 'Nunito', sans-serif; }
.ranked { padding-left: 0; list-style: none; counter-reset: r; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ranked li { counter-increment: r; position: relative; }
.ranked li::before { content: counter(r); position: absolute; top: -8px; left: -6px; z-index: 1; background: var(--sun); color: var(--ink); font-weight: 800; border-radius: 999px; min-width: 28px; height: 28px; display: grid; place-items: center; font-size: .9rem; }
.ranked .card { height: 100%; }
@media (max-width: 640px) { .top nav { gap: 10px; font-size: .92rem; } }

/* researched articles */
.article .prose { max-width: 720px; }
.article .prose ul { padding-left: 20px; }
.article .prose li { margin: 6px 0; }
.tablewrap { overflow-x: auto; margin: 10px 0; }
.article table { border-collapse: collapse; width: 100%; font-size: 1rem; background: var(--card); border-radius: 12px; overflow: hidden; }
.article th, .article td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.article thead th { background: #e8f0fa; color: var(--teal); font-size: .9rem; }
.article tbody th { white-space: nowrap; }
.sources { max-width: 720px; }
.sources ul { padding-left: 20px; font-size: .92rem; }
.sources a { color: var(--muted); }
