/* villmergerkriege.ch — parchment, ink, Zürich blue.
   One ordered stylesheet: 1 tokens · 2 base · 3 header and footer · 4 page layout · 5 running text
   6 components (cards, lists, gallery, lightbox, badges, tables) · 7 pages (home, sites, map, zoom,
   transcriptions, timeline, search) · 8 link marks. Breakpoints: 1060 (menu), 900, 760, 600, 520 px. */

/* 1 ---------------------------------------------------------------- tokens */
:root {
  --paper: #f5f0e3;
  --paper-2: #ebe3cf;      /* original #E2DCC7, lightened */
  --card: #fffdf7;
  --ink: #2a251e;
  --ink-soft: #5d554a;
  --rule: #d8cdb3;
  --blue: #1f3d6b;         /* Zürich blue instead of #0000FF */
  --blue-hover: #13294a;
  --red: #8c2f22;          /* uniform red, used sparingly */
  --radius: 10px;
  --radius-s: 6px;
  --pill: 999px;
  --shadow: 0 1px 2px rgb(42 37 30 / .08), 0 6px 18px rgb(42 37 30 / .07);
  --shadow-lift: 0 2px 4px rgb(42 37 30 / .1), 0 12px 28px rgb(42 37 30 / .12);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 70ch;
  --page: 1200px;
  --gutter: 1.25rem;
  color-scheme: light;
}

/* 2 ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.65 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.5vw, 2.6rem); margin: .2em 0 .5em; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); margin: 1.6em 0 .5em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 .4em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--card); padding: .5rem 1rem; z-index: 10; }

/* 3 ---------------------------------------------------------------- header and footer */
.site-header { background: var(--paper-2); border-bottom: 1px solid var(--rule); position: relative; z-index: 5; }
.site-header .inner { max-width: var(--page); margin: 0 auto; padding: .7rem var(--gutter); display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.15; margin-right: auto; }
.brand b { font-family: var(--serif); font-size: 1.25rem; }
.brand small { color: var(--ink-soft); font-size: .8rem; letter-spacing: .02em; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1rem .3rem; }
.nav a { display: block; padding: .4rem .6rem; border-radius: var(--radius-s); text-decoration: none; color: var(--ink); font-size: .95rem; }
.nav a:hover, .nav a[aria-current] { background: var(--card); color: var(--blue); }
.nav details, .nav summary { display: none; }
.nav details:not([open]) > ul { display: none; }
@media (max-width: 1180px) and (min-width: 861px) { .nav a { padding: .4rem .45rem; font-size: .9rem; } }
@media (max-width: 1060px) {          /* the menu collapses into a "Menü" button */
  .site-header .inner { position: relative; }
  .brand { padding-right: 6.5rem; }
  .nav .wide { display: none; }
  .nav details { display: block; position: absolute; right: var(--gutter); top: .9rem; }
  .nav summary { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; list-style: none; padding: .45rem .8rem; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--card); font-size: .95rem; }
  .nav summary::-webkit-details-marker { display: none; }
  .nav summary::before { content: "☰"; }
  .nav details[open] ul { position: absolute; right: 0; top: 2.8rem; width: min(80vw, 300px); flex-direction: column; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: .4rem; box-shadow: var(--shadow); display: flex; z-index: 60; }
}
@media (max-width: 860px) {
  .site-header { position: relative; z-index: 50; }
  .brand b { font-size: 1.1rem; }
  .nav details[open] a { padding: .65rem .8rem; }
}
.site-footer { background: var(--paper-2); border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: .92rem; }
.site-footer .inner { max-width: var(--page); margin: 0 auto; padding: 1.5rem var(--gutter); display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }

/* 4 ---------------------------------------------------------------- page layout */
main { max-width: var(--page); margin: 0 auto; padding: 1.5rem var(--gutter) 3rem; overflow-wrap: break-word; }
main a { overflow-wrap: anywhere; }
.crumbs { font-size: .9rem; color: var(--ink-soft); margin-bottom: .5rem; }
.crumbs a { color: var(--ink-soft); }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: var(--measure); }
.pagenav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.pagenav a { max-width: 45%; }
.columns { display: grid; gap: 0 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); max-width: none; }
.columns h2 { font-size: 1.25rem; border-bottom: 2px solid var(--rule); padding-bottom: .3rem; }
@media (max-width: 520px) { main { padding-top: 1rem; } }

/* 5 ---------------------------------------------------------------- running text */
.prose { max-width: var(--measure); }
.prose p, .prose li { hyphens: auto; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure { margin: 0 0 1em; }
.prose h2 { margin: 1.8em 0 .5em; }
.prose h3 { margin: 1.5em 0 .4em; }
.prose > :first-child, .site-text > :first-child, .site-text > .prose > :first-child { margin-top: 0; }
.prose img { display: block; max-width: min(100%, 560px); border-radius: var(--radius-s); box-shadow: var(--shadow); margin: 1.2em 0; }
.prose a:has(> img) { display: inline-block; }
.prose figcaption { color: var(--ink-soft); font-size: .9rem; margin-top: .3rem; }
.figrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; max-width: 60rem; align-items: start; }
.figrow img { margin: 0 0 .4rem; max-width: 100%; }
.figrow > div > p:first-child { margin-top: 0; }
.table-wrap { overflow-x: auto; margin: 1rem 0; }
.table-wrap table { border-collapse: collapse; min-width: 100%; font-size: .95rem; background: var(--card); }
.table-wrap td, .table-wrap th { border: 1px solid var(--rule); padding: .4rem .6rem; vertical-align: top; }
/* transcription PDFs shown as text */
details.pdftext { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: .5rem .9rem; max-width: 70ch; }
details.pdftext summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.pdftext { margin: .6rem 0 1.2rem; }
.pdftext h3 { font-size: 1rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin: 1rem 0 .4rem; }
.pdftext p { font-family: var(--serif); margin: .5rem 0; overflow-wrap: anywhere; }
.prose .pdftext p { margin: 0 0 1em; }
.docpair { margin: 2rem 0; padding-top: 1rem; border-top: 1px solid var(--rule); }
.docpair h2 { font-size: 1.25rem; margin: 0 0 .6rem; }
.docpair-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 760px) { .docpair-cols { grid-template-columns: minmax(0, 1fr); } }

/* 6 ---------------------------------------------------------------- components */
/* cards (hub pages, home) */
.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); padding: 0; margin: 1rem 0 2rem; list-style: none; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card img { aspect-ratio: 3/2; object-fit: cover; width: 100%; background: var(--paper-2); display: block; }
.card .body { padding: .85rem 1rem 1rem; }
.card.noimg .body { padding-top: 1rem; }
.card h3 { margin: 0 0 .25rem; font-size: 1.15rem; }
.card h3 a { text-decoration: none; color: var(--ink); }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.5; }
@media (max-width: 520px) { .cards { gap: .8rem; } .card img { aspect-ratio: 16/9; } }

/* news */
.news { list-style: none; padding: 0; max-width: 60rem; }
.news li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.news time { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-size: .95rem; }
.news small { display: block; color: var(--ink-soft); }
@media (max-width: 520px) { .news li { grid-template-columns: 1fr; gap: 0; } }

/* lists of links (after news: an entry list inside a news item keeps its own spacing) */
.linklist { columns: 2 280px; column-gap: 2rem; padding: 0; list-style: none; }
.linklist li { break-inside: avoid; padding: .35rem 0; border-bottom: 1px solid var(--rule); }
.linklist .num { display: inline-block; min-width: 2.2em; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.entries { list-style: none; padding: 0; max-width: 46rem; margin: .3rem 0 1.4rem; }
.columns .entries { max-width: none; }
.entries li { padding: .5rem 0; border-bottom: 1px solid var(--rule); line-height: 1.4; }
.entries small, .entries .meta { display: block; color: var(--ink-soft); font-weight: 400; font-size: .86rem; margin-top: .15rem; }
.entries .kind { display: inline-block; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--red); margin-right: .35rem; font-weight: 600; }
h3.entries-label { font-family: var(--sans); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin: 1.2rem 0 .2rem; }
.prose h3.entries-label, .prose .pdftext h3 { margin: 1.5em 0 .4em; }

/* gallery and lightbox */
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(46%, 200px), 1fr)); padding: 0; list-style: none; }
.gallery figure { margin: 0; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.gallery a { display: block; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.gallery figcaption { padding: .45rem .6rem; font-size: .85rem; color: var(--ink-soft); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
dialog.lightbox { border: 0; padding: 0; margin: 0; inset: 0; position: fixed; background: rgb(20 17 13 / .96); width: 100vw; height: 100vh; height: 100dvh; max-width: 100vw; max-height: none; overflow: hidden; touch-action: none; }
html.lb-open, html.lb-open body { overflow: hidden; overscroll-behavior: none; }
dialog.lightbox .lb-stage { position: absolute; inset: 3.5rem 3.5rem 7.5rem; }
dialog.lightbox .lb-stage > img { width: 100%; height: 100%; object-fit: contain; max-width: none; max-height: none; min-width: 0; }
dialog.lightbox .lb-stage.osd > img { display: none; }
dialog.lightbox .lb-zoom { position: fixed; top: .6rem; left: 50%; transform: translateX(-50%); display: flex; gap: .4rem; }
dialog.lightbox .lb-zoom button { background: rgb(255 255 255 / .15); color: #fff; border: 0; width: 2.6rem; height: 2.6rem; border-radius: var(--radius-s); font-size: 1.4rem; cursor: pointer; }
dialog.lightbox p { position: fixed; left: 50%; transform: translateX(-50%); bottom: .6rem; width: min(96vw, 900px); margin: 0 !important; }
@media (max-width: 760px) { dialog.lightbox .lb-stage { inset: 3.6rem .3rem 7rem; } dialog.lightbox .ctl.prev, dialog.lightbox .ctl.next { top: auto; bottom: 7.5rem; transform: none; height: 3rem; } }
dialog.lightbox::backdrop { background: rgb(20 17 13 / .88); }

dialog.lightbox p { color: #eee; text-align: left; font-size: .92rem; line-height: 1.45; max-width: min(96vw, 900px); max-height: 22vh; overflow: auto; margin: .6rem auto 0; padding: .6rem .8rem; background: rgb(0 0 0 / .35); border-radius: var(--radius-s); }
dialog.lightbox .ctl { position: fixed; top: 50%; transform: translateY(-50%); background: rgb(255 255 255 / .15); color: #fff; border: 0; font-size: 2rem; width: 3rem; height: 4rem; border-radius: var(--radius-s); cursor: pointer; }
dialog.lightbox .prev { left: .5rem; }
dialog.lightbox .next { right: .5rem; }
dialog.lightbox .close { top: 1.6rem; right: .5rem; transform: none; height: 3rem; font-size: 1.6rem; }
dialog.lightbox .full { color: #ddd; }

/* badges and chips */
.badge { --c: var(--ink-soft); display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .02em; padding: .15rem .55rem; border-radius: var(--pill); color: var(--c); border: 1px solid currentColor; background: var(--card); text-decoration: none; }
.badge.nr { --c: var(--blue); font-variant-numeric: tabular-nums; }
a.badge:hover { background: var(--c); color: #fff; }
.chips { border: 0; padding: 0; margin: 0 0 .8rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.chips legend { font-weight: 600; font-size: .85rem; margin-bottom: .3rem; }
.chip { --c: var(--ink-soft); display: inline-flex; gap: .3rem; align-items: center; font-size: .82rem; padding: .2rem .55rem; border-radius: var(--pill); border: 1px solid var(--c); background: var(--card); cursor: pointer; }
.chip input { accent-color: var(--c); margin: 0; }

/* 7 ---------------------------------------------------------------- pages */
/* home */
.heroband { position: relative; margin: 0 0 2rem; min-height: 340px; display: flex; align-items: center; overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.heroband-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.heroband::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(245 240 227 / .97) 0%, rgb(245 240 227 / .92) 42%, rgb(245 240 227 / .35) 68%, rgb(245 240 227 / 0) 88%); z-index: 1; }
.heroband-inner { position: relative; z-index: 2; max-width: var(--page); width: 100%; margin: 0; padding: 2rem 2.2rem; }
.heroband-inner > * { max-width: 36rem; }
.heroband h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); margin: .2rem 0 .6rem; }
.heroband .kicker { color: var(--red); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin: 0; }
.heroband .lead { color: var(--ink); font-size: 1.15rem; }
.heroband-credit { position: absolute; right: 1rem; bottom: .7rem; z-index: 2; font-size: .8rem; background: rgb(255 253 247 / .85); padding: .2rem .55rem; border-radius: 4px; color: var(--ink-soft); text-decoration: none; }
.heroband-credit:hover { color: var(--blue); }
.cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.btn { display: inline-block; padding: .6rem 1.1rem; border-radius: 8px; border: 1px solid var(--blue); color: var(--blue); background: rgb(255 253 247 / .85); text-decoration: none; font-weight: 600; }
.btn:hover { background: var(--card); text-decoration: none; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-hover); color: #fff; }
.wars2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 0 0 1rem; }
.wars2 article { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.2rem 1.4rem 1rem; position: relative; }
.wars2 .year { font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: var(--red); margin: 0; font-weight: 600; }
.wars2 h2 { margin: .3rem 0 .5rem; font-size: 1.35rem; }
.wars2 h2 a { color: var(--ink); text-decoration: none; }
.wars2 h2 a:hover { color: var(--blue); }
.wars2 p { font-size: .97rem; }
.wars2 .more { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-weight: 600; font-size: .92rem; margin-bottom: 0; }
.also { color: var(--ink-soft); font-size: .95rem; margin: 0 0 2rem; }
.map-teaser { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: 0 0 2rem; text-decoration: none; color: var(--ink); }
.map-teaser img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/9; display: block; }
.map-teaser div { padding: 1.2rem 1.4rem; align-self: center; }
.map-teaser h2 { margin: 0 0 .4rem; }
.map-teaser span.go { color: var(--blue); font-weight: 600; }
@media (max-width: 760px) {
  .heroband { flex-direction: column; align-items: stretch; min-height: 0; margin: 0 0 1.5rem; }
  .heroband-img { position: relative; height: 150px; }
  .heroband::before { display: none; }
  .heroband-inner { padding: 1.1rem 1.1rem 1.3rem; }
  .heroband-credit { top: 112px; bottom: auto; }
  .wars2, .map-teaser { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { .heroband-credit { font-size: .7rem; max-width: calc(100% - 2rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }

/* numbered sites */
.site-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.2rem 0 1rem; }
.site-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; margin-bottom: 1.5rem; }
.site-layout .prose { max-width: 68ch; }
.site-aside { position: sticky; top: 1rem; display: grid; gap: 1rem; }
.minimap { height: 260px; border-radius: var(--radius); border: 1px solid var(--rule); margin: .5rem 0 .3rem; max-width: 760px; z-index: 0; }
.site-aside .minimap { height: 300px; margin: 0; }
.facts { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: .8rem 1rem; font-size: .92rem; margin: 0; }
.facts div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; padding: .2rem 0; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; }
.docs { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: .8rem 1rem; font-size: .92rem; }
.docs h2 { font-size: 1rem; margin: 0 0 .4rem; }
.docs ul { list-style: none; margin: 0; padding: 0; }
.docs li { padding: .25rem 0; }
.site-photos h2 { margin-top: .5rem; }
.nearby ul { list-style: none; padding: 0; display: grid; gap: .3rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.nearby li { border-bottom: 1px solid var(--rule); padding: .35rem 0; }
.nearby small { color: var(--ink-soft); }
.nearby .num, .sitelist .num { display: inline-block; min-width: 1.8em; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.nearby .num { margin-right: .45rem; }
@media (max-width: 900px) { .site-layout { grid-template-columns: 1fr; } .site-aside { position: static; order: -1; } .site-aside .minimap { height: 240px; } }

/* Standorte overview */
.typefilter { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 .2rem; }
.typefilter .chip { text-decoration: none; color: var(--c); font-weight: 600; }
.typefilter .chip:not([style]) { --c: var(--ink-soft); }
.typefilter .chip[aria-current] { background: var(--c); color: #fff; }
.sitegrid { list-style: none; padding: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); margin: 1rem 0 2rem; }
.sitegrid li { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; position: relative; display: flex; flex-direction: column; }
.sitegrid li:hover { box-shadow: var(--shadow); }
.sitegrid li[hidden] { display: none; }
.sitegrid img, .sitegrid .noimg { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; background: var(--paper-2); }
.sitegrid .body { padding: .55rem .75rem .7rem; }
.sitegrid a { text-decoration: none; color: var(--ink); font-weight: 600; line-height: 1.3; }
.sitegrid a::after { content: ""; position: absolute; inset: 0; }
.sitegrid .num { font-variant-numeric: tabular-nums; color: var(--blue); margin-right: .3rem; }
.sitegrid small { display: block; color: var(--ink-soft); font-size: .8rem; margin-top: .15rem; }
@media (max-width: 600px) {
  .sitegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .sitegrid .body { padding: .45rem .55rem .55rem; }
  .sitegrid a { font-size: .9rem; }
}

/* map page and map pins (assets/map.js) */
.mapwrap { display: grid; grid-template-columns: 1fr 300px; gap: 1rem; }
.bigmap { height: min(78vh, 760px); border-radius: var(--radius); border: 1px solid var(--rule); z-index: 0; }
.mappanel { max-height: min(78vh, 760px); overflow-y: auto; overflow-x: hidden; }
.map-note { font-size: .88rem; color: var(--ink-soft); margin: .2rem 0 1.2rem; }
.sitelist { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.sitelist button { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; padding: .3rem .2rem; border-bottom: 1px solid var(--rule); }
.sitelist button:hover, .sitelist button:focus-visible { color: var(--blue); }
.pin span { --c: #777; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--c); color: #fff; font: 700 11px/1 var(--sans); border: 2px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .45); }
.pin.approx span { border: 2px dashed #fff; opacity: .9; }
.pin.big span { font-size: 13px; outline: 3px solid rgb(255 255 255 / .7); }
.pop { min-width: 160px; font-family: var(--sans); }
.pop img { width: 100%; max-width: 220px; aspect-ratio: 3/2; object-fit: cover; border-radius: 4px; display: block; margin-bottom: .4rem; }
.opacity-ctl { background: rgb(255 255 255 / .92); padding: .35rem .6rem; border-radius: var(--radius-s); font: .8rem var(--sans); box-shadow: 0 1px 4px rgb(0 0 0 / .3); }
.opacity-ctl input { vertical-align: middle; width: 110px; }
@media (max-width: 900px) { .mapwrap { grid-template-columns: 1fr; } .bigmap { height: 68vh; } .mappanel { max-height: none; } }

/* zoom viewer */
.zoomhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; }
.zoomhead h1 { font-size: clamp(1.3rem, 1rem + 1.5vw, 1.9rem); margin: 0; }
.zoomview { height: calc(100vh - 13rem); min-height: 360px; background: #1c1915; border-radius: var(--radius); margin-top: .8rem; }
a.zoomable { cursor: zoom-in; }
.prose a.zoomable { position: relative; display: inline-block; }
.gallery a[data-zoom] { position: relative; }
.prose a.zoomable::after, .gallery a[data-zoom]::after { content: "⤢"; position: absolute; background: rgb(0 0 0 / .55); color: #fff; border-radius: 4px; }
.prose a.zoomable::after { right: .5rem; bottom: 1.5rem; padding: .1rem .4rem; }
.gallery a[data-zoom]::after { right: .35rem; bottom: .35rem; padding: 0 .3rem; font-size: .85rem; }

/* transcriptions: side-by-side reader */
.tmode { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; margin: .5rem 0 1rem; position: sticky; top: .6rem; z-index: 3; background: var(--card); }
.tmode button { all: unset; cursor: pointer; padding: .4rem .8rem; font-size: .9rem; }
.tmode button[aria-pressed=true] { background: var(--blue); color: #fff; }
.transcript { max-width: none; width: min(1160px, calc(100vw - 2.5rem)); }
.transcript .trow { padding: .8rem 0; border-bottom: 1px solid var(--rule); max-width: 70ch; }
.tpage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; padding: 1.2rem 0; border-bottom: 1px solid var(--rule); align-items: start; }
.tpage .orig { margin: 0; position: sticky; top: 3.6rem; }
.tpage .orig img { width: 100%; border-radius: 4px; box-shadow: var(--shadow); margin: 0; }
.tpage .ttext { font-family: var(--serif); font-size: 1.05rem; line-height: 1.7; max-width: 60ch; }
.tpage .ttext p { margin: 0 0 .2em; }
.tpage .tcol + .tcol { margin-top: .8rem; padding-top: .6rem; border-top: 1px dashed var(--rule); font-size: .95rem; }
.transcript[data-mode=orig] .ttext, .transcript[data-mode=text] .orig { display: none; }
.transcript[data-mode=orig] .tpage, .transcript[data-mode=text] .tpage { grid-template-columns: 1fr; }
.transcript[data-mode=orig] .orig img { max-width: 900px; }
@media (max-width: 760px) { .tpage { grid-template-columns: 1fr; } .tpage .orig { position: static; } .tmode { top: .5rem; } }

/* timeline */
.tl-jump { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.tl-jump a { font-size: .85rem; padding: .25rem .65rem; border: 1px solid var(--rule); border-radius: var(--pill); background: var(--card); text-decoration: none; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--rule); max-width: 60rem; }
.timeline li { position: relative; display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .9rem 0 .9rem 1.2rem; }
.timeline li::before { content: ""; position: absolute; left: -.5rem; top: 1.25rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--red); border: 2px solid var(--paper); }
.timeline li:target, .timeline li:has(.yanchor:target) { background: rgb(140 47 34 / .08); border-radius: var(--radius-s); }
.timeline time { font-weight: 600; color: var(--blue); font-variant-numeric: tabular-nums; }
.timeline h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.timeline blockquote { margin: 0; padding: .4rem .8rem; border-left: 3px solid var(--paper-2); background: var(--card); font-family: var(--serif); color: var(--ink); border-radius: 0 6px 6px 0; }
.tl-src { font-size: .88rem; color: var(--ink-soft); margin: .35rem 0 0; }
.tl-note { color: var(--ink-soft); display: block; margin-top: .2rem; }
.yanchor { position: absolute; top: -1rem; left: 0; width: 0; height: 0; }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; gap: .2rem; } }

/* search (Pagefind UI) */
#search { --pagefind-ui-primary: var(--blue); --pagefind-ui-text: var(--ink); --pagefind-ui-background: var(--card); --pagefind-ui-border: var(--rule); --pagefind-ui-tag: var(--paper-2); --pagefind-ui-font: var(--sans); max-width: 50rem; }

/* 8 ---------------------------------------------------------------- link marks */
a.sitelink { text-decoration-style: solid; }
a.datelink { text-decoration-style: dotted; }
a.yearlink { color: inherit; text-decoration: underline dotted rgb(31 61 107 / .55); text-underline-offset: .2em; font-variant-numeric: tabular-nums; }
a.yearlink:hover, a.datelink:hover { color: var(--blue); text-decoration-style: solid; }
a.archived::after { content: " (Archiv)"; font-size: .8em; color: var(--ink-soft); }
a.deadlink { color: var(--ink-soft); text-decoration-style: dotted; }
a.imgref { display: inline-flex; align-items: center; gap: .35rem; padding: .05rem .45rem .05rem .1rem; margin: 0 .1rem; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--card); text-decoration: none; vertical-align: middle; line-height: 1.3; white-space: nowrap; }
a.imgref img, .prose a.imgref img { width: 2.4rem; height: 1.7rem; max-width: none; object-fit: cover; border-radius: 3px; margin: 0; box-shadow: none; display: block; }
a.imgref:hover { border-color: var(--blue); }
/* documents get a page icon, outside links an arrow */
main a[href$=".pdf" i]::after, main a[href$=".docx" i]::after, main a[href$=".mp3" i]::after {
  content: ""; display: inline-block; width: .8em; height: .9em; margin-left: .25em; vertical-align: -.05em; opacity: .65; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14'%3E%3Cpath d='M1 0h7l3 3v11H1z M7.5 0v3.5H11' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14'%3E%3Cpath d='M1 0h7l3 3v11H1z M7.5 0v3.5H11' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center/contain no-repeat; }
main a[href^="http"]:not([href*="villmergerkriege.ch"])::after { content: "↗"; font-size: .8em; margin-left: .15em; opacity: .6; text-decoration: none; display: inline-block; }
main .leaflet-container a::after, main .gallery a::after, main .pop a::after { content: none !important; }
dialog.lightbox button:focus:not(:focus-visible) { outline: none; }
