/* Archiv Netzwerk Bildung und Familie
   Farben aus dem Logo; Gestaltung angelehnt an fam-i.ch, bewusst vereinfacht. */

@font-face { font-family: 'Fira Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/fira-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-weight: 400; font-style: italic; font-display: swap; src: url('fonts/fira-sans-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/fira-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'Quicksand'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/quicksand-700.woff2') format('woff2'); }

:root {
  /* Logofarben */
  --blue: #004f9f;
  --red: #d51224;
  --yellow: #ffcc00;
  --orange: #f39200;
  --magenta: #c7007e;
  --teal: #009982;
  --green: #95c11f;
  --grey: #9c9c9c;
  /* Funktionsfarben (kontraststark) */
  --text: #1f1d1c;
  --muted: #5c5957;
  --accent: #b0006f;       /* Magenta, abgedunkelt für Text/Links (AA-Kontrast) */
  --accent-dark: #86005a;
  --link: #004f9f;
  --bg: #ffffff;
  --bg-soft: #f6f4f2;
  --border: #e3dfdb;
  --notice-bg: #fbeef6;
  --radius: 16px;
  --radius-small: 10px;
  --wide: 68rem;
  --narrow: 44rem;
  --font: 'Fira Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Quicksand', 'Fira Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--text); color: #fff; padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: var(--narrow); }

/* Kopfbereich */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding-top: 1rem; padding-bottom: 1rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text); }
.brand img { width: 13.5rem; height: auto; display: block; }
.brand span { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: var(--accent); border-left: 2px solid var(--border); padding-left: 0.75rem; line-height: 1.2; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.site-nav a { display: block; padding: 0.35rem 0.8rem; border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { background: var(--bg-soft); color: var(--accent); }
.site-nav a[aria-current='page'] { background: var(--accent); color: #fff; }

/* Farbband aus den Logofarben */
.dots { height: 6px; background: linear-gradient(90deg, var(--blue) 0 14%, var(--red) 14% 28%, var(--yellow) 28% 42%, var(--orange) 42% 57%, var(--magenta) 57% 71%, var(--teal) 71% 85%, var(--green) 85% 100%); }

/* Hinweis zur Auflösung des Vereins */
.notice { background: var(--notice-bg); border-bottom: 1px solid #f1d3e5; }
.notice p { margin: 0; padding: 0.75rem 0; font-size: 0.95rem; }
.notice strong { color: var(--accent-dark); }

main { padding: 2rem 0 3rem; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; color: var(--text); }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 0 0 0.75rem; }
h2 { font-size: 1.45rem; margin: 2.2rem 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 1.8rem 0 0.5rem; }
h4, h5, h6 { font-size: 1.05rem; margin: 1.5rem 0 0.4rem; }
.lead { font-size: 1.15rem; color: var(--muted); margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* Suche */
.searchbox { display: flex; gap: 0.5rem; margin: 1.25rem 0; }
.searchbox input[type='search'] {
  flex: 1; min-width: 0; font: inherit; font-size: 1.1rem;
  padding: 0.75rem 1rem; border: 2px solid var(--border); border-radius: 999px; background: #fff; color: var(--text);
}
.searchbox input[type='search']:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(199, 0, 126, 0.18); }
.button, .searchbox button {
  font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: 0.7rem 1.3rem;
  background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; display: inline-block;
}
.button:hover, .searchbox button:hover { background: var(--accent-dark); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; margin: 0 0 1rem; font-size: 0.95rem; }
.filters select { font: inherit; padding: 0.3rem 0.5rem; border: 1px solid var(--border); border-radius: var(--radius-small); background: #fff; }
.status { color: var(--muted); font-size: 0.95rem; min-height: 1.5em; }
mark { background: #fff1a8; padding: 0 0.1em; border-radius: 3px; }

/* Listen von Beiträgen und Dokumenten */
.entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.entry { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; background: #fff; }
.entry h3 { margin: 0.35rem 0 0.2rem; font-size: 1.1rem; }
.entry h3 a { text-decoration: none; }
.entry h3 a:hover { text-decoration: underline; }
.entry p { margin: 0.25rem 0; }
.entry .meta { font-size: 0.9rem; color: var(--muted); }
.entry .snippet { font-size: 0.95rem; }
.entry details { margin-top: 0.4rem; font-size: 0.95rem; }
.entry summary { cursor: pointer; color: var(--link); }

.badges { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; padding: 0.1rem 0.55rem; border-radius: 999px; border: 1px solid currentColor; }
.badge-article { color: var(--accent); }
.badge-file { color: var(--blue); }
.badge-reference { color: var(--muted); }
.badge-external { color: #7a4f00; background: #fff6d6; border-color: #e8c96a; text-transform: none; letter-spacing: 0; }
.badge-lang { color: var(--muted); text-transform: uppercase; }

.topic-chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.topic-chip::before { content: ''; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--c, var(--grey)); flex: none; }
a.topic-chip:hover { color: var(--accent); }

/* Themenübersicht */
.topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.topics a { display: flex; gap: 0.75rem; align-items: flex-start; height: 100%; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); background: #fff; }
.topics a:hover { border-color: var(--c); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.topics a::before { content: ''; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--c); flex: none; margin-top: 0.2rem; }
.topics strong { display: block; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.3; }
.topics span { font-size: 0.9rem; color: var(--muted); }

/* Beitrag */
.article-body { max-width: var(--narrow); }
.article-body table { border-collapse: collapse; width: 100%; font-size: 0.95rem; display: block; overflow-x: auto; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 0.4rem 0.6rem; vertical-align: top; text-align: left; }
.article-body blockquote { margin: 1rem 0; padding: 0.5rem 1rem; border-left: 4px solid var(--magenta); background: var(--bg-soft); border-radius: 0 var(--radius-small) var(--radius-small) 0; }
.article-body a[href$='.pdf']::after, a.file-link::after { content: ' (PDF)'; font-size: 0.8em; color: var(--muted); }
.article-meta { font-size: 0.95rem; color: var(--muted); margin-bottom: 1.5rem; }
.provenance { margin-top: 3rem; padding: 1rem 1.2rem; background: var(--bg-soft); border-radius: var(--radius); font-size: 0.9rem; color: var(--muted); max-width: var(--narrow); overflow-wrap: anywhere; }
.provenance h2 { font-size: 1rem; margin: 0 0 0.4rem; }
.provenance ul { margin: 0; padding-left: 1.2rem; }

.back { margin: 0 0 1rem; font-size: 0.95rem; }
.back a { color: var(--muted); text-decoration: none; font-weight: 600; }
.back a:hover { color: var(--accent); text-decoration: underline; }

.columns { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 60rem) { .columns { grid-template-columns: 1fr 1fr; } }

.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 1.5rem 0; font-size: 0.9rem; color: var(--muted); }
.site-footer p { margin: 0.25rem 0; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.operator { display: flex; align-items: center; gap: 0.75rem; }
.footer-links { flex: none; }
.pill { display: inline-block; padding: 0.3rem 0.9rem; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text); font-weight: 600; text-decoration: none; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.operator img { width: 32px; height: 32px; display: block; flex: none; }

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .brand img { width: 11rem; }
  .brand span { display: none; }
  .searchbox { flex-direction: column; }
  .entry { padding: 0.9rem 1rem; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .site-footer .footer-links { margin: 0.5rem 0 0 calc(32px + 0.75rem); }
  .pill { padding: 0.55rem 1.1rem; }
}

@media print {
  .site-header nav, .notice, .searchbox, .site-footer, .dots { display: none; }
  a { color: inherit; }
}
