/* ===========================================================================
   Stadtplan NRW – modernes, freundliches Design
   Helles Vollton-Design mit klaren Farbflächen. Keine externen CSS-Abhaengigkeiten.
   =========================================================================== */

:root {
  --green: #138a67;
  --green-2: #22a879;
  --green-ink: #244f3f;
  --red: #e65370;
  --red-soft: #fff0f2;
  --sun: #ffc857;
  --mint: #e9f8f0;
  --rose: #fff1f4;
  --sky: #eef4ff;
  --blue: #496fe5;
  --blue-soft: #edf2ff;
  --violet: #8254c7;
  --violet-soft: #f4efff;
  --teal: #168d91;
  --teal-soft: #e8f8f7;
  --orange: #db792a;
  --orange-soft: #fff3e7;
  --ink: #20283a;
  --muted: #626d80;
  --paper: #ffffff;
  --paper-2: #f8f8f5;
  --line: #e9e9e3;
  --line-2: #d7ddd6;
  --radius: 24px;
  --radius-sm: 14px;
  --pill: 999px;
  --hero-surface: #fffaf1;
  --shadow-1: 0 8px 24px rgba(46, 61, 53, .08);
  --shadow-2: 0 22px 48px rgba(46, 61, 53, .15);
  --max: 1140px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16.5px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, figure, dl, dt, dd { margin: 0; }
img, svg { max-width: 100%; }
ol, ul { list-style: none; padding: 0; }
::selection { background: var(--violet); color: #fff; }
:focus-visible { outline: 3px solid #f0a500; outline-offset: 4px; }

/* --- top accents -------------------------------------------------------- */
.flagbar { display: none; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 10px 16px; background: var(--orange); color: #fff; border-radius: 0 0 14px 0; font-weight: 700; }
.skip:focus { left: 0; }

/* --- header ------------------------------------------------------------- */
.header { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 1px solid var(--line); }
.header-in { width: 100%; margin: 0; display: flex; align-items: center; gap: 18px; min-height: 82px; padding: 0 clamp(20px, 4vw, 64px); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand .mark { width: 58px; height: 58px; flex: 0 0 58px; filter: drop-shadow(0 5px 8px rgba(46, 61, 53, .12)); }
.brand b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.brand span { display: block; margin-top: 1px; font-weight: 700; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { padding: 10px 15px; border-radius: var(--pill); font-size: 14px; font-weight: 700; color: var(--muted); transition: color .18s, background .18s, transform .18s; }
.nav a:hover { color: var(--green); background: var(--mint); }
.nav a[aria-current="page"] { color: #fff; background: var(--green); box-shadow: 0 8px 18px rgba(19, 138, 103, .2); }

/* --- breadcrumb --------------------------------------------------------- */
.crumbs { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.crumbs ol { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; padding: 10px 22px; font-size: 12.5px; color: var(--muted); }
.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: "›"; margin: 0 9px; color: var(--line-2); }
.crumbs a:hover { color: var(--violet); }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* --- layout ------------------------------------------------------------- */
.main { width: 100%; margin: 0; padding: 0; }

.hero { display: grid; grid-template-columns: minmax(360px, 40%) minmax(0, 1fr); align-items: stretch; min-height: calc(100vh - 82px); background: var(--hero-surface); }
@supports (height: 100svh) {
  .hero { min-height: calc(100svh - 82px); }
}
.hero > div:first-child { align-self: center; width: min(100%, 650px); justify-self: end; padding: clamp(28px, 5vw, 76px); }
.kicker { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: var(--pill); background: var(--violet-soft); font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--violet); }
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
h1 { position: relative; margin: 18px 0 14px; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.03; letter-spacing: -.035em; font-weight: 800; }
h1 em { font-style: normal; color: var(--blue); }
.lede { position: relative; color: var(--muted); max-width: 60ch; }
.lede + .lede { margin-top: 10px; }
.actions { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: var(--pill); background: var(--red); color: #fff; font-size: 14.5px; font-weight: 800; box-shadow: 0 12px 26px rgba(230, 83, 112, .22); transition: transform .18s, box-shadow .18s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(230, 83, 112, .32); }
.btn span { color: rgba(255, 255, 255, .8); }
.link { font-size: 13.5px; font-weight: 800; color: var(--violet); }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.search { position: relative; display: flex; gap: 8px; margin-top: 24px; max-width: 540px; padding: 8px; background: #fff; border: 1px solid #dce2f4; border-radius: var(--pill); box-shadow: 0 10px 26px rgba(48, 64, 112, .08); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; padding: 10px 16px; color: var(--ink); }
.search input::placeholder { color: #9aa8a0; }
.search button { border: 0; border-radius: var(--pill); padding: 12px 22px; background: var(--orange); color: #fff; font-weight: 800; font-size: 14px; cursor: pointer; transition: filter .18s, transform .18s; }
.search button:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* --- map figure --------------------------------------------------------- */
.mapcard { display: flex; flex-direction: column; min-width: 0; min-height: 480px; overflow: hidden; background: #fff; }
.mapcard-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.mapcard-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.mapswitch { display: flex; gap: 3px; padding: 3px; border-radius: var(--pill); background: var(--paper-2); }
.mapswitch button { border: 0; background: transparent; border-radius: var(--pill); padding: 6px 13px; font-size: 11.5px; font-weight: 800; color: var(--muted); cursor: pointer; }
.mapswitch button.on { background: #fff; color: var(--violet); box-shadow: var(--shadow-1); }
.mapcanvas { flex: 1; min-height: 420px; height: auto; background: #e7f1e9; }
.mapcanvas::after { content: "Karte wird geladen \2026"; display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 12px; }
.mapcanvas.leaflet-container::after { content: none; }
.mapcard-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 10px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--muted); }
.leaflet-container { font: 12px var(--sans); z-index: 0; }
.leaflet-popup-content { font: 13px/1.5 var(--sans); }
.leaflet-popup-content b { color: var(--violet); }
.leaflet-popup-content a { color: var(--blue); text-decoration: underline; }
.nrw-pin svg { display: block; filter: drop-shadow(0 2px 2px rgba(24, 37, 32, .65)) drop-shadow(0 0 2px #fff); }
.leaflet-control-attribution { font-size: 9px !important; }
.leaflet-bar a { border-radius: 8px !important; }

/* --- sections ----------------------------------------------------------- */
.main > .section { width: min(var(--max), calc(100% - 44px)); margin-inline: auto; padding: 54px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-kicker { display: inline-flex; align-items: center; gap: 8px; font: 800 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.section-kicker::before { content: ""; width: 20px; height: 3px; border-radius: 2px; background: var(--orange); }
h2 { margin: 9px 0 0; font-size: clamp(23px, 2.9vw, 34px); letter-spacing: -.03em; font-weight: 800; }
h3 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.section-note { font-size: 12.5px; color: var(--muted); }
.prose { max-width: 74ch; color: var(--muted); }
.prose p + p { margin-top: 10px; }
.prose h3 { margin-top: 18px; color: var(--ink); }
.prose a { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* --- tiles (hub) -------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile { --tile-accent: var(--green); --tile-tint: var(--mint); position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 218px; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--tile-tint); box-shadow: var(--shadow-1); transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden; }
.tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--tile-accent); }
.tile:nth-child(6n+2) { --tile-accent: var(--blue); --tile-tint: var(--blue-soft); }
.tile:nth-child(6n+3) { --tile-accent: var(--red); --tile-tint: var(--rose); }
.tile:nth-child(6n+4) { --tile-accent: var(--orange); --tile-tint: var(--orange-soft); }
.tile:nth-child(6n+5) { --tile-accent: var(--violet); --tile-tint: var(--violet-soft); }
.tile:nth-child(6n) { --tile-accent: var(--teal); --tile-tint: var(--teal-soft); }
.tile:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.tile-kicker { display: inline-flex; align-self: flex-start; padding: 5px 11px; border-radius: var(--pill); background: var(--mint); color: var(--green); font: 800 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.tile .tile-kicker { background: var(--tile-tint); color: var(--tile-accent); }
.tile h3 { font-size: 21px; letter-spacing: -.02em; }
.tile p { font-size: 13.5px; color: var(--muted); }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11.5px; font-weight: 800; color: var(--tile-accent); }
.tile-foot .n { font-size: 16px; color: var(--ink); }
.tile-foot .host { font: 10.5px var(--mono); color: var(--muted); }

/* --- entry list --------------------------------------------------------- */
.entries { display: grid; gap: 10px; }
.entry { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 30px; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-1); transition: transform .18s, border-color .18s, box-shadow .18s; }
a.entry:hover { transform: translateX(3px); border-color: var(--line-2); box-shadow: var(--shadow-2); }
.entry-no { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font: 800 13px var(--mono); }
.entry:nth-child(4n+2) .entry-no { background: var(--rose); color: var(--red); }
.entry:nth-child(4n+3) .entry-no { background: var(--orange-soft); color: var(--orange); }
.entry:nth-child(4n) .entry-no { background: var(--violet-soft); color: var(--violet); }
.entry-tx b { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; }
.entry-tx span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.entry-meta { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.entry-go { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 800; }

/* --- tags + credit ------------------------------------------------------ */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag { padding: 7px 13px; border-radius: var(--pill); background: var(--blue-soft); color: var(--blue); font-size: 12.5px; font-weight: 800; }
.tag.good { background: var(--mint); color: var(--green); }
.tag.ok { background: #fff6df; color: #93610b; }
.credit { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.6; color: var(--muted); }
.credit b { color: var(--ink); font-weight: 700; }
.credit a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.credit a:hover { color: var(--violet); }

/* --- share -------------------------------------------------------------- */
.share { display: inline-flex; align-items: center; gap: 9px; margin-top: 18px; padding: 12px 18px; border: 0; border-radius: var(--pill); background: var(--violet); color: #fff; font-size: 13.5px; font-weight: 800; cursor: pointer; box-shadow: 0 10px 22px rgba(130, 84, 199, .22); }
.share:hover { transform: translateY(-2px); }
.share-out { display: block; min-height: 17px; margin-top: 8px; font-size: 12px; color: var(--muted); }

/* --- facts -------------------------------------------------------------- */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-2); font-size: 14px; }
.facts span { color: var(--muted); }
.facts b { text-align: right; font-weight: 800; }

/* --- related ------------------------------------------------------------ */
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related a { display: block; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-1); transition: .18s; }
.related a:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.related b { display: block; font-size: 15px; font-weight: 800; color: var(--blue); }
.related a:nth-child(3n+2) b { color: var(--red); }
.related a:nth-child(3n) b { color: var(--teal); }
.related span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }

/* --- footer ------------------------------------------------------------- */
.foot { margin-top: 40px; background: #f7f8fc; border-top: 1px solid var(--line); }
.foot-in { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 34px; padding: 40px 22px 30px; }
.foot .brand b { color: var(--ink); }
.foot .brand span { color: var(--muted); }
.foot h3 { font: 800 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.foot ul { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.foot a { color: var(--muted); font-weight: 600; }
.foot a:hover { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.foot-legal { background: var(--green-ink); color: #e7f2ec; padding: 18px max(22px, calc((100vw - var(--max)) / 2)); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 11.5px; }

/* --- responsive --------------------------------------------------------- */
@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero > div:first-child { width: 100%; max-width: 760px; justify-self: center; padding: 48px 28px; }
  .mapcard { min-height: 56svh; }
  .mapcanvas { min-height: 48svh; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .related { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .header-in { min-height: 72px; padding-inline: 16px; }
  .brand .mark { width: 48px; height: 48px; flex-basis: 48px; }
  .brand b { font-size: 17px; }
  .brand span { font-size: 9px; }
  .hero { min-height: calc(100vh - 72px); }
  @supports (height: 100svh) {
    .hero { min-height: calc(100svh - 72px); }
  }
  .hero > div:first-child { padding: 36px 22px; }
  .mapcard { min-height: 390px; }
  .mapcanvas { min-height: 330px; }
  .nav { display: none; }
  .facts { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 40px minmax(0, 1fr) 28px; padding: 12px; }
  .entry-meta { display: none; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .search { flex-wrap: wrap; border-radius: var(--radius-sm); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Consent: Footer-Link zum erneuten Oeffnen der Einstellungen */
.nrw-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* Region-/Entity-Seiten: Pagination + Faktenliste */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 15px; }
.pager a { color: #138a67; font-weight: 600; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.facts li { padding: 8px 0; border-bottom: 1px solid #eef2f7; }
