/* The site shell (docs/architecture.md): fonts, tokens, the header with its mode (Recherche or Radar) and the
   Radar elements. Every Research page links it before cards.css; bundestag-radar links the published file, so
   both parts of the site share one header and one set of colours. */
/* Inter (SIL OFL 1.1, fonts/OFL.txt), served from the site itself: no request to a font CDN. Variable weight;
   the latin-ext file only loads for names with characters beyond Latin-1. */
@font-face {
  font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #f6f6f4; --card: #ffffff; --text: #1f2328; --muted: #6b7280; --faint: #a1a1aa; --line: #e7e7e3;
  /* Research's blue: every link between Research pages, and the evidence a Radar result links to */
  --research: #2563eb; --research-soft: #e8efff; --accent: var(--research); --accent-soft: var(--research-soft);
  --warn: #b45309; --warn-soft: #fef3e2;
  --v-yes: #4c9a5f; --v-no: #d0485a; --v-abstain: #c9a72c; --v-absent: #d4d4d0; --v-invalid: #8a8a8a; --v-unknown: #c9c9c4;
  --cdu: #2f2f2f; --spd: #d7263d; --afd: #1f8fd6; --gru: #3f9a3f; --lin: #c0397d; --frl: #8a8a8a;
  /* the government: a neutral slate that is no party's colour and reads on light and dark backgrounds */
  --reg: #64748b; --reg-text: #334155; --reg-soft: #e2e8f0;
  /* the other Einbringer of a Vorgang (controls.py): Bundesrat und Länder, and Sonstige; neutral, no party's colour */
  --laender: #8b7355; --sonstige: #b4b4ac;
  /* kinds in a chart (Gesetzgebung, Anträge, …): a neutral ramp; a selection is the accent, never a fraction colour */
  --k1: #3f3f46; --k2: #71717a; --k3: #a1a1aa; --k4: #cfcfd4; --k5: #e4e4e7;
  /* the Radar (docs/architecture.md, "Telling Radar apart"): selection and interpretation, never the plain blue */
  --radar: #7c3aed; --radar-soft: #f1ebff; --radar-ink: #5b21b6; --radar-line: #ddd0fb;
  /* the part of the site a page belongs to: Research by default, the Radar on .mode-radar pages */
  --mode: var(--research); --mode-soft: var(--research-soft);
}
/* a Radar page: the Radar colour, and a paper with a trace of violet, so the part of the site shows at a glance */
body.mode-radar { --mode: var(--radar); --mode-soft: var(--radar-soft); --bg: #f6f4fa; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 Inter, system-ui, -apple-system, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }

/* The top bar (ui.site_header, D26): three columns, the home item alone in the centre one, so it stays centred
   whatever the two sides hold; the search field at the left end, Daten at the right end. */
header { height: 54px; background: var(--card); border-top: 3px solid var(--mode); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
header.m-home { border-top-color: transparent; border-image: linear-gradient(90deg, var(--research), var(--radar)) 1; border-bottom: 1px solid var(--line); border-left: 0; border-right: 0; }
nav.site { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; padding: 0 14px; }
nav.site .nav-l, nav.site .nav-r { display: flex; align-items: center; gap: 2px; min-width: 0; }
nav.site .nav-l .nav-q { margin-right: auto; }
nav.site .nav-r a.to-radar { margin-left: auto; }
nav.site a { flex: none; color: var(--muted); font-size: 13.5px; font-weight: 500; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
nav.site a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
nav.site a.on { color: var(--text); background: var(--bg); }
/* the site's name in the centre (.brand, also in the Radar's own bars): the mark, the word mark and the part of the
   site (Recherche or Radar) */
nav.site a.home { padding: 5px 8px 5px 10px; }
nav.site a.home:hover, nav.site a.home.on { background: transparent; }
a.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); white-space: nowrap; }
a.brand:hover { text-decoration: none; }
.brand .logo { flex: none; color: var(--text); }
.brand .wm { font-size: 16px; font-weight: 500; letter-spacing: -.03em; }
.brand .wm b { font-weight: 800; }
.brand .mode { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mode); background: var(--mode-soft); border-radius: 999px; padding: 2px 8px; }
.brand .mode .ri { width: 11px; height: 11px; }
/* the Radar entry: always in the Radar colour, so the way to interpretation is never a plain research link */
nav.site a.to-radar { display: inline-flex; align-items: center; gap: 6px; color: var(--radar-ink); background: var(--radar-soft); font-weight: 600; }
nav.site a.to-radar:hover, nav.site a.to-radar.on { background: var(--radar); color: #fff; }
nav.site a.quiet { font-weight: 400; color: var(--faint); font-size: 13px; }
nav.site a.quiet.on { color: var(--muted); }
.nav-q { position: relative; display: flex; align-items: center; }
.nav-q input { width: 190px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px 6px 30px; font-size: 13px; }
.nav-q input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); background: var(--card); }
.nav-qi { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--faint); padding: 4px 5px; display: grid; place-items: center; cursor: text; }
.nav-sug { position: absolute; top: calc(100% + 6px); left: 0; width: min(420px, calc(100vw - 24px)); background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.1); max-height: 70vh; overflow-y: auto; padding: 4px 0; z-index: 30; }
.nav-sug[hidden] { display: none; }
.nav-sug .g { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 8px 12px 2px; }
.nav-sug a { display: block; padding: 6px 12px; color: var(--text); font-size: 13.5px; }
.nav-sug a .s { color: var(--muted); font-size: 12px; margin-left: 6px; }
.nav-sug a:hover, .nav-sug a.hi { background: var(--bg); text-decoration: none; }
.nav-sug .all { color: var(--accent); border-top: 1px solid var(--line); margin-top: 4px; }
/* narrower screens: one row that scrolls sideways (D "nav-fix"), with the search icon and the home item first and
   pinned, so both stay reachable without scrolling; the field opens over the bar when the icon is tapped */
@media (max-width: 1240px) {
  nav.site { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 0 8px 0 4px; }
  nav.site::-webkit-scrollbar { display: none; }
  nav.site .nav-l, nav.site .nav-c, nav.site .nav-r { display: contents; }
  nav.site .nav-l .nav-q, nav.site .nav-r a.to-radar { margin: 0; }
  .nav-q { order: 0; position: sticky; left: 0; z-index: 2; background: var(--card); height: 100%; padding-right: 2px; }
  nav.site a.home { order: 1; position: sticky; left: 36px; z-index: 2; background: var(--card); box-shadow: -6px 0 0 var(--card), 8px 0 10px -4px var(--card); }
  nav.site a.home:hover { background: var(--card); }
  nav.site a:not(.home) { order: 2; }
  .nav-q input { display: none; }
  .nav-qi { position: static; transform: none; width: 34px; height: 34px; cursor: pointer; color: var(--muted); }
  header.q-open .nav-q { position: fixed; left: 0; right: 0; top: 0; height: 54px; padding: 0 12px; z-index: 40; }
  header.q-open .nav-q input { display: block; flex: 1; width: auto; padding-left: 40px; }
  header.q-open .nav-qi { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); }  /* inside the field */
  header.q-open .nav-sug { left: 12px; top: 54px; }
}
/* phones: no sideways scrolling; the bar holds the search icon, the site's name and "Menü", which folds the sections
   out below it as a list (nav.js). Only headers with the button (.has-menu, the research platform's): the Radar's own
   bars keep the row above. Without JavaScript (.menu-js missing) the links wrap below the bar instead. */
.nav-menu { display: none; }
@media (max-width: 760px) {
  header.has-menu { height: auto; }
  header.has-menu nav.site { flex-wrap: wrap; overflow: visible; padding: 0 8px 0 4px; }
  header.has-menu .nav-q, header.has-menu nav.site a.home { position: static; box-shadow: none; height: 54px; }
  header.has-menu nav.site a.home { order: 1; margin: 0 auto; display: inline-flex; align-items: center; }
  header.has-menu .nav-menu { display: inline-flex; align-items: center; order: 2; height: 34px; margin: 10px 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer; }
  header.has-menu .nav-menu[aria-expanded="true"] { background: var(--bg); }
  header.has-menu nav.site a:not(.home) { order: 3; flex: 1 0 100%; margin: 0; padding: 11px 12px; border-radius: 0; border-top: 1px solid var(--line); font-size: 15px; }
  header.has-menu nav.site a.to-radar { justify-content: flex-start; }
  header.has-menu.menu-js:not(.menu-open) nav.site a:not(.home) { display: none; }
  /* the open search field covers the bar, as on wider screens */
  header.has-menu.q-open .nav-q { position: fixed; left: 0; right: 0; top: 0; height: 54px; padding: 0 12px; z-index: 40; }
  header.has-menu:not(.menu-js) nav.site a:not(.home) { flex: none; border-top: 0; padding: 6px 10px; font-size: 13.5px; }
}
footer { color: var(--faint); font-size: 12.5px; margin-top: 40px; }
footer a { color: var(--muted); }

/* ---- the Radar inside Research (docs/architecture.md, "Telling Radar apart"): one colour, one mark */
.ri { flex: none; vertical-align: -2px; }
a.rl { color: var(--radar); font-weight: 500; }
a.rl::before { content: ''; display: inline-block; width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='none' stroke='%23000' stroke-width='1.3' opacity='.45'/%3E%3Ccircle cx='8' cy='8' r='3.5' fill='none' stroke='%23000' stroke-width='1.3' opacity='.7'/%3E%3Cpath d='M8 8 12.6 3.4' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='8' r='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 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='none' stroke='%23000' stroke-width='1.3' opacity='.45'/%3E%3Ccircle cx='8' cy='8' r='3.5' fill='none' stroke='%23000' stroke-width='1.3' opacity='.7'/%3E%3Cpath d='M8 8 12.6 3.4' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='8' r='1.4'/%3E%3C/svg%3E") center / contain no-repeat; }
a.rl:hover { color: var(--radar-ink); }
footer a.rl { color: var(--radar); }
.rmark { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--radar); }
/* a Radar page's method note, above its footer */
.radar-note { margin-top: 40px; padding: 12px 16px; border-radius: 12px; background: var(--radar-soft); border: 1px solid var(--radar-line); color: #3b2a63; font-size: 13px; }
.radar-note p { margin: 4px 0 0; max-width: 680px; }
.radar-note + footer { margin-top: 16px; }
/* a Radar page's own headings carry the Radar colour; links into Research stay blue: the evidence */
.mode-radar main h1 { position: relative; }
.mode-radar .eyebrow, .mode-radar .ent-head .when { color: var(--radar); font-weight: 600; }
@media (max-width: 640px) {
  nav.site a { font-size: 13px; padding: 6px 8px; }
  nav.site a.home { padding: 5px 6px; gap: 6px; }
  .brand .wm { font-size: 15px; }
  nav.site a.home .logo { display: none; }
}
