/* parish-map.css: the Hessian parish map (germany/parish-map.html, written by scripts/build-parish-map.py). 18 Nov 2026.
   All rules are .pm-. The page's frame (header, row of section buttons, sections) is assets/start-page.css.
   The marks: one shape for each result, the ring as the number inside. Every mark has the same dark outline and
   stands on a light ground (the map, or a light tile in the legend and the list), in the light and the dark theme. */
.pm-main { --pm-ink: #1c2a3f; --pm-amber: #e8ad2e; --pm-paper: #fbf7ee; }
.pm-mark, .pm-still g { overflow: visible; }
.pm-mark :is(circle, rect, path), .pm-still :is(circle, rect, path) { stroke: #1c2a3f; stroke-width: 1.7; stroke-linejoin: round; }
.pm-open :is(circle, rect, path) { fill: #e8ad2e; }
.pm-out :is(circle, rect, path) { fill: #1c2a3f; }
.pm-gaps :is(circle, rect, path) { fill: #ffffff; }
.pm-other :is(circle, rect, path) { fill: #c9d3e3; }
.pm-mark text, .pm-still .pm-still-n { font: 700 13px/1 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; fill: #1c2a3f; stroke: none; }
.pm-out text, .pm-still .pm-out .pm-still-n { fill: #ffffff; }
.pm-still .pm-still-n { font-size: 13px; }
.pm-still .pm-still-name { font: 600 14px/1 "Source Serif 4", Georgia, serif; fill: #1c2a3f; paint-order: stroke; stroke: #fbf7ee; stroke-width: 4px; stroke-linejoin: round; }

/* legend */
/* r3 (19 Nov 2026): the simpler layout. One sentence above the map, the key in one line under it. */
.pm-sum { margin: 0 0 0.9rem; max-width: 52rem; font-size: 1.06rem; line-height: 1.5; }
.pm-legend { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem 1.6rem; }
.pm-legend li { display: flex; gap: 0.55rem; align-items: center; margin: 0; padding: 0; font-size: 0.95rem; line-height: 1.4; color: #4a3f30; }
.pm-legend li > svg, .pm-st > svg { flex: none; box-sizing: content-box; padding: 4px; background: #fbf7ee; border: 1px solid rgba(28, 42, 63, 0.25); border-radius: 5px; }
.pm-legend b { color: #1c2a3f; font-size: 1rem; }
.pm-n { display: inline-block; min-width: 1.5em; padding: 0 0.4em; margin-left: 0.2em; border-radius: 999px; background: #1c2a3f; color: #ffffff; font: 700 0.8125rem/1.5 -apple-system, "Segoe UI", Roboto, sans-serif; text-align: center; font-variant-numeric: tabular-nums; vertical-align: 0.08em; }

/* ring buttons */
.pm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin: 0 0 0.7rem; }
.pm-tools-l { font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: #6b5220; margin-right: 0.2rem; }
.pm-rbtn { font: 600 0.92rem/1.2 "Source Serif 4", Georgia, serif; padding: 0.42rem 0.85rem; min-height: 2.5rem; border: 1px solid rgba(28, 42, 63, 0.45); border-radius: 999px; background: #fffaf0; color: #1c2a3f; cursor: pointer; }
.pm-rbtn:hover { border-color: #1c2a3f; }
.pm-rbtn[aria-pressed="true"] { background: #1c2a3f; border-color: #1c2a3f; color: #ffffff; }
.pm-rbtn[aria-pressed="true"] .pm-n { background: #ffffff; color: #1c2a3f; }
.pm-rbtn:focus-visible, .pm-go:focus-visible { outline: 3px solid #b8741a; outline-offset: 2px; }

/* the map */
.pm-frame { border: 1px solid rgba(190, 150, 70, 0.8); border-radius: 6px; overflow: hidden; background: #eef0e6; }
.pm-map { position: relative; height: clamp(380px, 64vh, 640px); background: #eef0e6; z-index: 0; }
.pm-map > .pm-still { display: block; width: 100%; height: 100%; }
.pm-map.pm-live > .pm-still { display: none; }
.pm-print { display: none; }
.pm-when-live, .pm-when-still, .pm-when-drawn, .pm-h-short { display: none; }
.pm-frame.pm-has-map ~ .pm-how .pm-when-live, .pm-frame.pm-no-map ~ .pm-how .pm-when-still, .pm-frame.pm-no-map ~ .pm-how .pm-when-drawn { display: inline; }
/* r4 (20 Nov 2026): at a zoom between two whole steps the browser can draw a thin light line along the edges of the
   tiles of the ground (seen as a faint rectangle on the relief). A clear outline on each tile closes it. */
.pm-map .leaflet-tile { outline: 1px solid transparent; }
.pm-icon { background: none; border: 0; }
.pm-icon svg { display: block; filter: drop-shadow(0 0 1.2px #fff) drop-shadow(0 0 1.2px #fff) drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35)); }
.pm-icon.pm-dim { opacity: 0.22; }
/* r2 (19 Nov 2026): every mark has a name; assets/parish-map.js puts each where it covers nothing and marks the
   others pm-off. A name that is off shows while a pointer or the keyboard is on its mark (pm-over). */
.pm-map .leaflet-tooltip.pm-name { font: 500 0.82rem/1.2 "Source Serif 4", Georgia, serif; color: #1c2a3f; background: rgba(255, 252, 244, 0.94); border: 1px solid rgba(28, 42, 63, 0.35); box-shadow: none; padding: 1px 5px; margin: 0; white-space: nowrap; pointer-events: none; }
.pm-map .leaflet-tooltip.pm-name.pm-home { font-weight: 700; font-size: 0.88rem; padding: 2px 7px; }
.pm-map .leaflet-tooltip.pm-name.pm-off { visibility: hidden; }
.pm-map .leaflet-tooltip.pm-name.pm-off.pm-over { visibility: visible; z-index: 5; background: #fffcf4; }
.pm-map .leaflet-tooltip.pm-name::before { display: none; }
.pm-map .leaflet-tooltip.pm-name.pm-dim { opacity: 0.3 !important; }   /* Leaflet writes the opacity of a name into its style attribute */
.pm-map .leaflet-popup-content { margin: 0.8rem 1rem; font: 400 0.95rem/1.45 "Source Serif 4", Georgia, serif; color: #2c2620; }
.pm-map .leaflet-popup-content b { display: block; font-size: 1.08rem; color: #1c2a3f; margin-bottom: 0.15rem; }
.pm-map .leaflet-popup-content a { color: #7a5514; font-weight: 600; }
.pm-map .leaflet-popup-content .pm-pop-st { display: flex; align-items: center; gap: 0.45rem; margin: 0.3rem 0; }
/* the ground map is light in both themes, so its credit line stays dark on light in both */
html .pm-map .leaflet-control-attribution:not(#_) { background: rgba(255, 255, 255, 0.92); color: #2c2620; font-size: 13px; line-height: 1.5; padding: 1px 7px; }
html:not(#_):not(#__) .pm-map .leaflet-control-attribution a { color: #0b4f6c !important; -webkit-text-fill-color: #0b4f6c !important; text-decoration: underline; }
.pm-tools[hidden] { display: none; }
.pm-reset { font: 600 0.86rem/1 "Source Serif 4", Georgia, serif; padding: 0.5rem 0.7rem; background: #ffffff; color: #1c2a3f; border: 0; cursor: pointer; white-space: nowrap; }
.pm-reset:hover { background: #f4f4f4; }
.pm-how { margin: 0.9rem 0 0; padding-top: 0.8rem; border-top: 1px solid rgba(190, 150, 70, 0.5); max-width: 56rem; scroll-margin-top: calc(var(--stx-navh, 3.5rem) + 4.4rem); }
.pm-how h3 { margin: 0 0 0.4rem; font: 700 0.8125rem/1.3 -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: #6b5220; }
.pm-how p { margin: 0 0 0.4rem; font-size: 0.93rem; line-height: 1.5; color: #4a3f30; }
.pm-how p b { color: #1c2a3f; }

/* ring by ring */
.pm-lead { margin: 0 0 1rem; max-width: 46rem; }
.pm-ring-k { font: 700 0.8125rem/1 -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: #6b5220; }
/* r3: the book's words on a ring, above its list */
.pm-ring-dl { margin: 0 0 0.8rem; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.3rem 1rem; max-width: 56rem; }
.pm-ring-dl dt { margin: 0; font: 700 0.8125rem/1.8 -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: #6b5220; }
.pm-ring-dl dd { margin: 0; font-size: 0.96rem; line-height: 1.5; }
/* r3: the button that opens and shuts the list of an outer ring (assets/parish-map.js shows it) */
.pm-fold-btn { font: 600 0.95rem/1.2 "Source Serif 4", Georgia, serif; padding: 0.55rem 1.1rem; min-height: 2.75rem; margin: 0 0 0.6rem; border: 1px solid rgba(28, 42, 63, 0.55); border-radius: 999px; background: #fffaf0; color: #1c2a3f; cursor: pointer; }
.pm-fold-btn[hidden] { display: none; }
.pm-fold-btn:hover { border-color: #1c2a3f; }
.pm-fold-btn:focus-visible { outline: 3px solid #b8741a; outline-offset: 2px; }
.pm-fold-body.pm-shut { display: none; }
.pm-more { margin: 1.1rem 0 0; font-size: 0.98rem; }
.pm-more a { font-weight: 600; }

/* every place */
.pm-list { margin: 1.9rem 0 0; scroll-margin-top: calc(var(--stx-navh, 3.5rem) + 4.4rem); }
.pm-list h3 { margin: 0 0 0.5rem; font-size: 1.2rem; line-height: 1.3; color: #1c2a3f; }
.pm-list h3 .pm-ring-k { margin-right: 0.45rem; vertical-align: 0.15em; }
.pm-list h3 small { font-weight: 400; font-size: 0.9rem; color: #5a4c38; margin-left: 0.4rem; }
.pm-scroll { overflow-x: auto; border: 1px solid rgba(190, 150, 70, 0.6); border-radius: 5px; background: #fffaf0; }
.pm-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.97rem; line-height: 1.4; margin: 0; }
.pm-table th, .pm-table td { padding: 0.5rem 0.8rem; text-align: left; vertical-align: middle; border: 0; border-top: 1px solid rgba(190, 150, 70, 0.35); background: none; color: inherit; }
/* the site sets the heads of every table in a page to 0.76rem with !important (assets/site-improve.css); here they are 13px */
html:not(#_):not(#__) .pm-table thead th { font-size: 0.8125rem !important; }
.pm-table thead th { border-top: 0; font-weight: 700; line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase; color: #6b5220; background: rgba(216, 179, 102, 0.14); }
.pm-table tbody th { font-weight: 600; color: #1c2a3f; }
.pm-table .pm-km { font-variant-numeric: tabular-nums; color: #4a3f30; }
.pm-table .pm-c-km { width: 11rem; } .pm-table .pm-c-st { width: 15.5rem; }
.pm-table tbody th { overflow-wrap: break-word; }
.pm-st { white-space: nowrap; }
.pm-st > svg { vertical-align: middle; margin-right: 0.55rem; padding: 2px; }
.pm-st > span { vertical-align: middle; }
.pm-go { font: inherit; font-weight: 600; color: #1c2a3f; background: none; border: 0; padding: 0; margin: 0; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(122, 85, 20, 0.55); text-underline-offset: 0.18em; }
.pm-go:hover { text-decoration-color: #7a5514; }
.pm-table tr.pm-hit > * { background: rgba(232, 173, 46, 0.22); }
.pm-main [id^="p-"] { scroll-margin-top: calc(var(--stx-navh, 3.5rem) + 5rem); }

/* dark theme: the cards and the list go dark; the marks keep their light tiles and the map keeps its own ground */
html.theme-dark .pm-scroll { background: #1f2e45; border-color: rgba(216, 179, 102, 0.45); color: #d9cfb8; }
html.theme-dark .pm-legend li, html.theme-dark .pm-how p, html.theme-dark .pm-ring-dl dd { color: #d9cfb8; }
html.theme-dark .pm-how { border-top-color: rgba(216, 179, 102, 0.4); }
html.theme-dark .pm-fold-btn { background: #1f2e45; border-color: rgba(216, 179, 102, 0.55); color: #f6f1e7; }
html.theme-dark .pm-legend b, html.theme-dark .pm-how p b, html.theme-dark .pm-list h3, html.theme-dark .pm-table tbody th, html.theme-dark .pm-go { color: #f6f1e7; }
html.theme-dark .pm-tools-l, html.theme-dark .pm-ring-k, html.theme-dark .pm-ring-dl dt, html.theme-dark .pm-how h3, html.theme-dark .pm-table thead th { color: #d8b366; }
html.theme-dark .pm-list h3 small, html.theme-dark .pm-table .pm-km { color: #c8b896; }
html.theme-dark .pm-n { background: #e8cd8a; color: #141f30; }
html.theme-dark .pm-rbtn { background: #1f2e45; border-color: rgba(216, 179, 102, 0.55); color: #f6f1e7; }
html.theme-dark .pm-rbtn[aria-pressed="true"] { background: #e8cd8a; border-color: #e8cd8a; color: #141f30; }
html.theme-dark .pm-rbtn[aria-pressed="true"] .pm-n { background: #141f30; color: #f6f1e7; }
html.theme-dark .pm-table th, html.theme-dark .pm-table td { border-top-color: rgba(216, 179, 102, 0.25); }
html.theme-dark .pm-table thead th { background: rgba(216, 179, 102, 0.1); }
html.theme-dark .pm-go { text-decoration-color: rgba(232, 205, 138, 0.6); }
html.theme-dark .pm-table tr.pm-hit > * { background: rgba(232, 173, 46, 0.2); }
html.theme-dark .pm-frame { border-color: rgba(216, 179, 102, 0.6); }
html.theme-dark .pm-rbtn:focus-visible, html.theme-dark .pm-go:focus-visible { outline-color: #e8cd8a; }

@media (max-width: 860px) {
  .pm-map { height: clamp(340px, 58vh, 520px); }
  .pm-table .pm-c-km { width: 9.5rem; } .pm-table .pm-c-st { width: 14rem; }
}
@media (max-width: 560px) {
  .pm-table th, .pm-table td { padding: 0.5rem 0.55rem; }
  .pm-h-long { display: none; } .pm-h-short { display: inline; }
  .pm-table thead th { letter-spacing: 0.06em; }
  .pm-table .pm-c-km { width: 5.4rem; } .pm-table .pm-c-st { width: 46%; }
  .pm-st { white-space: normal; }
  .pm-st > span { display: inline; }
  .pm-rbtn { padding: 0.42rem 0.7rem; }
  .pm-ring-dl { grid-template-columns: 1fr; gap: 0; } .pm-ring-dl dd { margin-bottom: 0.45rem; }
  .pm-legend { gap: 0.4rem 1.1rem; }
}
@media print {
  .pm-tools, .pm-map.pm-live, .pm-reset, .pm-fold-btn { display: none !important; }
  .pm-fold-body.pm-shut { display: block !important; }
  .pm-print { display: block; }
  .pm-print .pm-still { width: 100%; height: auto; max-height: 150mm; }
  .pm-frame { border-color: #999; background: none; }
  .pm-go { display: inline !important; text-decoration: none; color: #000 !important; }
  .pm-when-live, .pm-when-still { display: none !important; }
  .pm-when-drawn { display: inline !important; }   /* r4: paper shows the drawing, so its sentence stands */
  .pm-legend li, .pm-ring-dl { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { .pm-icon, .pm-map .leaflet-tooltip { transition: none !important; } }
