@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(/fonts/barlow-semi-condensed-500.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 700; font-display: swap; src: url(/fonts/barlow-semi-condensed-700.woff2) format("woff2"); }

/* Farben der Verkehrszeichen: Autobahnblau, Ortstafelgelb */
:root { --blue: #1f4fa0; --yellow: #f7c600; --ink: #111; --white: #fff; color-scheme: light; }

* { box-sizing: border-box; margin: 0; }
body { font: 500 17px/1.4 Barlow, "DIN Alternate", Bahnschrift, system-ui, sans-serif; background: var(--white); color: var(--ink);
  font-variant-numeric: tabular-nums; min-height: 100vh; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.tafel :focus-visible { outline-color: var(--blue); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Kopf: blaues Schild mit weißer Innenkante */
.head { background: var(--blue); color: var(--white); padding: 18px 0; box-shadow: inset 0 -4px 0 var(--white), 0 3px 0 var(--blue); }
.head h1 { font-size: 28px; line-height: 1.1; }
.head h1 a { text-decoration: none; }
.search { margin-top: 12px; display: flex; background: var(--white); border-radius: 6px; overflow: hidden; max-width: 560px; }
.search input { flex: 1; min-width: 0; border: 0; font: 700 26px/1.2 Barlow, sans-serif; padding: 10px 12px; color: var(--ink);
  caret-color: var(--blue); appearance: none; }
.search input::placeholder { color: #555; font-weight: 500; }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { outline: none; }
.search:focus-within { box-shadow: 0 0 0 3px var(--yellow); }
.search button { border: 0; background: var(--yellow); color: var(--ink); font-weight: 700; padding: 0 20px; }

.main { padding-top: 16px; padding-bottom: 32px; display: grid; gap: 16px; }
@media (min-width: 820px) {
  .main { grid-template-columns: 280px 1fr; align-items: start; }
  .map { position: sticky; top: 16px; }
}

/* Karte */
.map svg { display: block; width: 100%; max-height: 220px; }
@media (min-width: 820px) { .map svg { max-height: none; } }
.map path { fill: var(--white); stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map path.hit { fill: var(--yellow); cursor: pointer; }
.map path.pick { cursor: pointer; }
.map path.pick:hover { fill: var(--yellow); }
.map path.hit:hover { fill: #e0b400; }
.map path.on, .map path.on:hover { fill: var(--blue); }
.map svg { -webkit-tap-highlight-color: transparent; }
.map path:focus { outline: none; }
.map .ring { fill: none; stroke: var(--ink); stroke-width: 3.5; pointer-events: none; }

.results { display: grid; gap: 14px; align-content: start; }
.hint, .count, .filter { font-size: 16px; }
.count { font-weight: 700; margin-top: 4px; }
.filter button { border: 0; background: none; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* Bundesland als blaues Autobahnschild um die Ortstafeln */
.land { background: var(--blue); color: var(--white); border: 2px solid var(--blue); border-radius: 10px; padding: 4px;
  box-shadow: inset 0 0 0 2px var(--white); }
.land h2 { display: flex; justify-content: space-between; gap: 12px; font-size: 18px; line-height: 1.2; padding: 6px 10px 8px; }
.land .n { font-size: 16px; }
.tafeln { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; padding: 0 6px 6px; }
.tafeln.one { grid-template-columns: 1fr; }

/* Ortstafel: gelb mit schwarzem Innenrand */
.tafel { background: var(--yellow); color: var(--ink); border-radius: 6px; padding: 12px 10px;
  box-shadow: inset 0 0 0 2px var(--yellow), inset 0 0 0 4px var(--ink);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-width: 0; }
.sign { background: var(--white); border: 2px solid var(--ink); border-radius: 3px; font-weight: 700; font-size: 18px; line-height: 1;
  padding: 5px 9px; margin-bottom: 4px; letter-spacing: .04em; }
.town { font-weight: 700; font-size: 19px; line-height: 1.15; text-decoration: none; overflow-wrap: anywhere; }
.town:hover { text-decoration: underline; }
.district { font-size: 14px; line-height: 1.25; }
.wiki { font-size: 13px; margin-top: 6px; }
.tafel.big { padding: 20px 16px; }
.tafel.big .sign { font-size: 28px; padding: 6px 14px; }
.tafel.big .town { font-size: 34px; }
.tafel.big .district { font-size: 17px; }
.tafel.big .wiki { font-size: 15px; }
