/* mrkunz.ch – Geschichte und Politik
   Farben aus dem Logo: Blau #003399, Rot #EC0F29, Schwarz */
:root {
  --blue: #003399;
  --blue-dark: #00256e;
  --blue-soft: #e8edf8;
  --red: #ec0f29;
  --ink: #1b1d22;
  --muted: #5d6470;
  --line: #e2e5ea;
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --black: #16171a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 14px rgba(16,24,40,.06);
  --wrap: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }

/* ---------- Kopf ---------- */
.site-header { background: #fff; border-top: 4px solid var(--red); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 64px; height: 64px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-size: 1.45rem; font-weight: 750; letter-spacing: -.01em; color: var(--black); }
.brand-sub { font-size: 1rem; color: var(--muted); }
.brand-sub b { color: var(--blue); }
.brand:hover .brand-title { color: var(--blue); }
.header-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.search { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--bg-soft); }
.search input { border: 0; background: transparent; padding: 7px 14px; font: inherit; font-size: .95rem; width: 220px; outline: none; }
.search button { border: 0; background: transparent; padding: 0 12px; color: var(--muted); cursor: pointer; }
.search:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-soft); }
.meta-nav { display: flex; gap: 16px; font-size: .9rem; }
.meta-nav a { color: var(--muted); text-decoration: none; }
.meta-nav a:hover { color: var(--blue); text-decoration: underline; }

/* Hauptnavigation – dunkler Balken wie bisher */
.main-nav { background: linear-gradient(#2b2d31, #121315); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.main-nav .wrap { display: flex; align-items: stretch; }
.nav-home { display: flex; align-items: center; padding: 0 14px; color: #fff; border-right: 1px solid rgba(255,255,255,.15); }
.nav-home:hover { background: var(--blue); color: #fff; }
.nav-root, .nav-root ul { list-style: none; margin: 0; padding: 0; }
.nav-root { display: flex; }
.nav-root > li { position: relative; display: flex; }
.nav-top { display: block; padding: 13px 18px; color: #fff; text-decoration: none; font-weight: 650; border-right: 1px solid rgba(255,255,255,.15); }
.nav-root > li.active > .nav-top { box-shadow: inset 0 -3px 0 var(--red); }
.nav-root > li:hover > .nav-top, .nav-root > li:focus-within > .nav-top { background: var(--blue); color: #fff; }
.sub-toggle { display: none; }
.nav-sub { position: absolute; top: 100%; left: 0; min-width: 240px; background: var(--blue); box-shadow: 0 8px 24px rgba(0,0,0,.25); border-radius: 0 0 8px 8px; padding: 6px 0;
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s; }
.nav-root > li:hover > .nav-sub, .nav-root > li:focus-within > .nav-sub { opacity: 1; visibility: visible; transform: none; }
.nav-sub li { position: relative; }
.nav-sub a { display: block; padding: 8px 18px; color: #fff; text-decoration: none; }
.nav-sub a:hover, .nav-sub a:focus { background: rgba(255,255,255,.14); color: #fff; }
.nav-sub2 { position: absolute; left: 100%; top: -6px; min-width: 260px; background: #1d4fb3; border-radius: 0 8px 8px 8px; padding: 6px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); opacity: 0; visibility: hidden; transition: opacity .15s, visibility .15s; }
.nav-sub li:hover > .nav-sub2, .nav-sub li:focus-within > .nav-sub2 { opacity: 1; visibility: visible; }
.nav-sub li:has(.nav-sub2) > a::after { content: "›"; float: right; opacity: .7; }
.nav-toggle { display: none; }

/* ---------- Seite ---------- */
.page { padding-top: 18px; padding-bottom: 56px; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); text-decoration: underline; }
.breadcrumb .sep { color: #b3b8c0; }
.breadcrumb [aria-current] { color: var(--ink); }
.layout { display: block; }
.layout.has-side { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 44px; }
.sidenav { font-size: .95rem; position: sticky; top: 16px; align-self: start; }
.side-title { display: block; font-weight: 750; color: var(--blue); text-decoration: none; padding: 6px 0 10px; border-bottom: 2px solid var(--blue); margin-bottom: 6px; font-size: 1.05rem; }
.sidenav ul { list-style: none; margin: 0; padding: 0; }
.sidenav ul ul { margin: 2px 0 6px 10px; padding-left: 10px; border-left: 2px solid var(--line); font-size: .9rem; }
.sidenav a { display: block; padding: 5px 8px; color: var(--ink); text-decoration: none; border-radius: 6px; }
.sidenav a:hover { background: var(--bg-soft); color: var(--blue); }
.sidenav a.cur { background: var(--blue-soft); color: var(--blue); font-weight: 650; }

/* ---------- Inhalt ---------- */
.content { min-width: 0; max-width: 820px; }
.content h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.8rem); line-height: 1.15; letter-spacing: -.02em; color: var(--black); margin: 0 0 18px; font-weight: 780; }
.content h1::after { content: ""; display: block; width: 56px; height: 4px; background: var(--red); border-radius: 2px; margin-top: 14px; }
.content h2 { font-size: 1.3rem; color: var(--blue); margin: 32px 0 10px; line-height: 1.3; }
.content h3 { font-size: 1.08rem; margin: 22px 0 6px; }
.content p { margin: 0 0 14px; }
.block { margin: 0 0 22px; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; clear: both; }
.clear { clear: both; }
.list-label { font-weight: 700; margin: 18px 0 6px !important; color: var(--black); }
.linklist { margin: 0 0 14px; padding-left: 0; list-style: none; }
.linklist li { position: relative; padding: 4px 0 4px 22px; }
.linklist li::before { content: ""; position: absolute; left: 4px; top: .95em; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.content ul:not(.linklist) li { margin: 4px 0; }
a[target="_blank"]:not(.zoom):not(.card-img)::after { content: "↗"; font-size: .75em; margin-left: 2px; vertical-align: super; opacity: .55; text-decoration: none; display: inline-block; }
.file-link { font-weight: 600; }
.file-link::before { content: "PDF"; font-size: .68rem; font-weight: 800; letter-spacing: .04em; color: #fff; background: var(--red); border-radius: 3px; padding: 1px 4px; margin-right: 6px; vertical-align: 2px; }

/* Bilder */
.side-figure { margin: 4px 0 18px; width: 176px; }
.side-figure.right { float: right; margin-left: 26px; }
.side-figure.left { float: left; margin-right: 26px; }
.side-figure img { display: block; border-radius: 8px; box-shadow: var(--shadow); }
.side-figure figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.side-figure figcaption strong { display: block; color: var(--ink); font-size: .95rem; }
.main-figure { margin: 6px 0 22px; }
.main-figure img { display: block; border-radius: 8px; box-shadow: var(--shadow); background: var(--bg-soft); }
.main-figure figcaption { margin-top: 12px; }
.main-figure figcaption strong { display: block; font-size: 1.08rem; margin-bottom: 6px; }
a.zoom { cursor: zoom-in; display: inline-block; }

/* Tabellen */
.table-wrap { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .97rem; }
table.data th, table.data td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.data thead th { background: var(--bg-soft); font-weight: 700; color: var(--black); white-space: nowrap; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: #fafbfd; }

/* Tabs */
.tabs { margin: 26px 0; clear: both; }
.tablist { display: flex; gap: 4px; border-bottom: 2px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.tablist button { font: inherit; font-size: .97rem; font-weight: 650; color: var(--muted); background: none; border: 0; padding: 10px 16px; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; border-radius: 6px 6px 0 0; }
.tablist button:hover { color: var(--blue); background: var(--bg-soft); }
.tablist button[aria-selected="true"] { color: var(--blue); border-bottom-color: var(--blue); }
.tabpanel { padding-top: 18px; }
.tabpanel::after { content: ""; display: block; clear: both; }

/* Zeitstrahl */
.tl-wrap { margin: 6px 0 22px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 62px; top: 6px; bottom: 6px; width: 3px; background: linear-gradient(var(--blue), var(--red)); border-radius: 2px; }
.timeline li { display: grid; grid-template-columns: 52px 1fr; gap: 26px; position: relative; padding: 8px 0; }
.timeline li::before { content: ""; position: absolute; left: 57px; top: 22px; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); }
.tl-year { font-weight: 800; color: var(--blue); text-align: right; padding-top: 14px; font-variant-numeric: tabular-nums; }
.tl-card { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.tl-img { width: 60px; height: 45px; object-fit: cover; border-radius: 4px; flex: none; margin-top: 4px; }
.tl-text { min-width: 0; }
.tl-date { font-size: .82rem; color: var(--muted); }
.timeline h3 { margin: 2px 0 2px !important; font-size: 1.02rem; }
.tl-sub { margin: 0 !important; font-size: .95rem; }
.timeline details { margin-top: 6px; font-size: .94rem; }
.timeline summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: .88rem; }
.timeline details p { margin: 6px 0 0 !important; color: #33373e; }

/* Karten (Karikaturen-Übersichten) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin: 10px 0 26px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(16,24,40,.12); }
.card-img { display: flex; align-items: center; justify-content: center; background: var(--bg-soft); height: 190px; padding: 12px; }
.card-img img { max-height: 100%; width: auto; object-fit: contain; }
.card-body { padding: 12px 16px 16px; font-size: .93rem; color: #3a3f47; }
.card-body h3 { margin: 0 0 6px !important; font-size: 1.02rem; }
.card-body h3 a { text-decoration: none; }
.card-body p { margin: 0 !important; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

/* Startseite */
.home-intro { display: flex; gap: 28px; align-items: flex-start; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 18px 0 8px; }
.tile { display: block; padding: 18px 18px 16px; border-radius: var(--radius); border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: #fff; box-shadow: var(--shadow); border-top: 4px solid var(--blue); transition: transform .15s, box-shadow .15s; }
.tile:nth-child(2) { border-top-color: var(--red); }
.tile:nth-child(3) { border-top-color: var(--black); }
.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(16,24,40,.12); color: var(--ink); }
.tile strong { display: block; font-size: 1.12rem; color: var(--blue); margin-bottom: 4px; }
.tile span { font-size: .93rem; color: var(--muted); }

/* Suche */
.search-page input { width: 100%; font: inherit; font-size: 1.1rem; padding: 12px 16px; border: 2px solid var(--line); border-radius: 10px; }
.search-page input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
.search-results { padding-left: 0; list-style: none; }
.search-results li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.search-results a { font-weight: 650; font-size: 1.05rem; }
.search-results p { margin: 4px 0 0 !important; font-size: .93rem; color: var(--muted); }
.search-results mark { background: #fff1a8; color: inherit; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10,12,16,.88); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #fff; }
.lightbox-close { position: absolute; top: 12px; right: 16px; font-size: 2.2rem; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }

/* Fuss */
.site-footer { background: var(--black); color: #c9ccd2; font-size: .92rem; border-top: 4px solid var(--blue); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 22px; padding-bottom: 22px; flex-wrap: wrap; }
.site-footer strong { color: #fff; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* ---------- Responsiv ---------- */
@media (max-width: 960px) {
  .layout.has-side { grid-template-columns: 1fr; gap: 0; }
  .sidenav { display: none; }
  .content { max-width: none; }
}
@media (max-width: 820px) {
  body { font-size: 1rem; }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .brand img { width: 52px; height: 52px; }
  .brand-title { font-size: 1.2rem; }
  .brand { min-width: 0; }
  .brand-text { min-width: 0; }
  .nav-toggle { order: 2; }
  .header-tools { order: 3; width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .meta-nav { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 650; background: var(--black); color: #fff; border: 0; border-radius: 8px; padding: 9px 14px; cursor: pointer; }
  .bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; position: relative; transition: transform .2s; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -6px; } .bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .main-nav .wrap { flex-direction: column; padding: 6px 0 10px; }
  .nav-home { display: none; }
  .nav-root { flex-direction: column; }
  .nav-root > li { flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav-top { flex: 1; border-right: 0; padding: 13px 20px; }
  .nav-root > li.active > .nav-top { box-shadow: inset 4px 0 0 var(--red); }
  .sub-toggle { display: block; width: 52px; background: none; border: 0; color: #fff; cursor: pointer; border-left: 1px solid rgba(255,255,255,.1); }
  .sub-toggle::before { content: "▾"; font-size: 1.1rem; display: inline-block; transition: transform .2s; }
  .sub-toggle[aria-expanded="true"]::before { transform: rotate(180deg); }
  .nav-sub, .nav-sub2 { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-radius: 0; min-width: 0; width: 100%; display: none; transition: none; }
  .nav-root > li:hover > .nav-sub, .nav-root > li:focus-within > .nav-sub { display: none; }
  .nav-root > li.open > .nav-sub { display: block; }
  .nav-sub { background: rgba(0,51,153,.55); padding: 4px 0; }
  .nav-sub a { padding: 10px 20px 10px 32px; }
  .nav-sub2 { display: block; background: transparent; padding: 0; }
  .nav-sub2 a { padding: 7px 20px 7px 48px; font-size: .93rem; opacity: .92; }
  .nav-sub li:has(.nav-sub2) > a::after { content: none; }
  .side-figure, .side-figure.right, .side-figure.left { width: 130px; }
  .side-figure.right { margin-left: 16px; } .side-figure.left { margin-right: 16px; }
  .home-intro { flex-direction: column; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 14px; }
  .brand { gap: 10px; }
  .brand img { width: 44px; height: 44px; }
  .brand-title { font-size: 1.05rem; }
  .brand-sub { font-size: .85rem; }
  .nav-toggle-label { display: none; }
  .nav-toggle { padding: 11px 12px; }
  .page { padding-top: 14px; }
  .side-figure, .side-figure.right, .side-figure.left { float: none; width: auto; max-width: 220px; margin: 0 0 16px; }
  .timeline::before { left: 8px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; padding-left: 30px; }
  .timeline li::before { left: 3px; top: 16px; }
  .tl-year { text-align: left; padding-top: 0; }
  .tl-img { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .card-img { height: 160px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .site-footer, .sidenav, .breadcrumb, .tablist, .lightbox { display: none !important; }
  .tabpanel[hidden] { display: block !important; }
  .layout.has-side { display: block; }
  a[target="_blank"]::after { content: none !important; }
  body { font-size: 11pt; }
}
