/* Static rebuild of the "wib" template of die-werkstatt-gemeinsam-denken.de */
:root {
  --text: #1d1d1b;
  --muted: #707173;
  --line-grey: #e3e4e5;
  --border: #b1b3b4;
  --red: #e00035;
  --bg: #ffffff;
  --card: #f6f6f7;
  --link: #a1002a;
  --hover: #262626;
  --current: var(--red);
  /* Cap for header and two-column layout on wide screens: leaves the
     content column about 75-80 characters per line. */
  --page-max: 960px;
}
:root { color-scheme: light; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Verdana, Tahoma, sans-serif;
  font-size: 10pt;
  line-height: 1.45;
}
/* Logo shadow: the grey star of the logo, larger and offset down-left of
   it, like a cast shadow. Anchored to the right edge of the centred page;
   130px = logo margin (20px) + logo width (220px) - half the logo width. */
body::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: 60px; right: calc(max(0px, (100% - var(--page-max)) / 2) + 130px);
  width: 500px; height: 323px;
  background: url(img/WIB_Schatten.png) no-repeat 0 0 / 100% auto;
  opacity: 0.5;
}
a { color: var(--link); }
a:hover { color: var(--text); }
img { max-width: 100%; height: auto; }
h1 { margin: 0 0 10pt; font-size: 12pt; font-weight: 600; }
h2 { margin: 10pt 0 4pt; font-size: 11pt; font-weight: 600; }
h3 { margin: 10pt 0 4pt; font-size: 10.5pt; font-weight: 600; }
/* Hidden on screen but read by screen readers (e.g. a page's h1 when the
   design shows no heading) */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
p { margin: 0; padding: 5pt 0; }
ul, ol { margin: 6pt 0 6pt 15pt; padding: 0; }
li > p { padding: 0; }
img.float-right { float: right; margin: 0 0 8pt 12pt; }
strong, b { font-weight: 600; }
.center { text-align: center; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--text); color: var(--bg); padding: 6px 10px; z-index: 10; }
.skip-link:focus { left: 8px; top: 8px; }
/* Keyboard focus (mouse clicks show no ring) */
a:focus-visible, button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* Header */
.site-header { height: 195px; overflow: hidden; max-width: var(--page-max); margin: 0 auto; }
.logo { display: block; width: 220px; float: right; margin: 25px 20px 0 0; }

/* Menu bars: grey (top) and red (bottom) lines with boxed items centred on top */
.menubar, .footerbar {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px 0; padding: 0 4pt;
  background: linear-gradient(var(--line-grey), var(--line-grey)) left center / 100% 25pt no-repeat;
}
.footerbar { background-image: linear-gradient(var(--red), var(--red)); margin: 0 0 2pt; }
.menu { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 0; margin: 0; padding: 0; }
.menu li { margin: 0 3.8pt; }
.menu a, .a11y-toggle, .theme-toggle {
  display: block; width: 87pt; padding: 5pt 0 4.5pt; text-align: center;
  border: 1px solid var(--muted); background: var(--bg);
  font: inherit; font-size: 13pt; line-height: 1.2;
  color: var(--muted); text-decoration: none; cursor: pointer;
}
.menu a:hover, .a11y-toggle:hover, .theme-toggle:hover { color: var(--hover); }
.menu a[aria-current="page"] { color: var(--current); }
.a11y-toggle, .theme-toggle { width: auto; padding: 5pt 10pt 4.5pt; margin: 0 3.8pt; }

/* Two-column layout: left partners | content */
.layout {
  display: grid;
  /* Original table: 150pt content width + 16pt padding per side; the left
     column grows to fit the 290px-wide BLiQ logo, like the table cell did. */
  grid-template-columns: calc(290px + 32pt) minmax(0, 1fr);
  grid-template-areas: "left main";
  max-width: var(--page-max);
  margin: 28pt auto;
}
.sidebar-left { grid-area: left; border-right: 1px solid var(--border); padding: 0 16pt; }
.content { grid-area: main; padding: 10pt 20pt 10pt 60pt; min-width: 0; }
/* Partner logos in the left sidebar: more space between them */
.sidebar-left .center + .center { margin-top: 14pt; }
/* Linked logos grow slightly on hover and keyboard focus */
.sidebar-left a img { transition: transform 0.15s ease; }
.sidebar-left a:hover img, .sidebar-left a:focus-visible img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { .sidebar-left a img { transition: none; } }
/* Cards (mitglieder.html members, publikationen.html working groups):
   name, subtitle, text, links. .org-group is the ruled section heading. */
.org-group { margin: 24pt 0 10pt; padding-bottom: 4pt; border-bottom: 1px solid var(--border); font-size: 11pt; }
.org { margin: 0 0 10pt; padding: 8pt 12pt 6pt; background: var(--card); border: 1px solid var(--line-grey); border-radius: 4px; }
.org h2, .org h4 { margin: 0; font-size: 10.5pt; }
/* Space before a subheading that follows a card */
.org + h3 { margin-top: 24pt; }
/* Working-group cards: same small gap above the links with or without a subtitle */
.org h4 + .org-links { margin-top: 4pt; }
.org h4 + .org-name { padding-bottom: 2pt; }
.org-name { padding-top: 0; color: var(--muted); }
.org-links { list-style: none; margin: 2pt 0 0; }
.org-links li { padding: 1pt 0; }
.org-links li::before { content: "→ "; content: "→ " / ""; color: var(--muted); }
.content table { border-collapse: collapse; max-width: 100%; }
.content td, .content th { vertical-align: top; padding: 2pt 6pt 2pt 0; }
.missing-file { color: var(--muted); }
.missing-note { color: var(--muted); font-style: italic; font-size: 0.9em; }
.file-info { display: inline-block; color: var(--muted); font-size: 0.9em; white-space: nowrap; }

@media (max-width: 900px) {
  body::before { top: 40px; right: 96px; width: 300px; height: 194px; }
  .site-header { height: auto; min-height: 140px; }
  .logo { width: 160px; margin: 16px 16px 0 0; }
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "left"; margin: 16pt auto; }
  .content { padding: 0 16px 16px; }
  .sidebar-left { border: 0; border-top: 1px solid var(--border); padding: 16px; }
  .menubar, .footerbar { background-size: 100% 100%; padding: 8px 12px; }
  .menu li { margin: 0 3px; }
  .menu a, .a11y-toggle, .theme-toggle { width: auto; min-width: 7.5em; padding: 6px 10px; font-size: 12pt; }
}

/* Dark mode: class "dark" is set by a11y.js (saved choice, otherwise the
   system setting). Screen only: printouts stay light. The "Barrierefrei"
   view stays light too. */
@media screen {
  html.dark:not(.a11y) {
    color-scheme: dark;
    --text: #e6e6e4;
    --muted: #a9aaac;
    --line-grey: #3a3b3e;
    --border: #5a5b5e;
    --bg: #1b1b1d;
    --card: #232326;
    --link: #ff8aa3;
    --hover: #ffffff;
    --current: #ff6b88;
  }
  html.dark:not(.a11y) body::before { background-image: url(img/WIB_Schatten-dark.png); }
  /* Logos have white backgrounds: show them on light cards */
  html.dark:not(.a11y) .logo,
  html.dark:not(.a11y) .sidebar img,
  html.dark:not(.a11y) .content img { background: #fff; padding: 6px; border-radius: 4px; }
  /* WIB.png has white space at the bottom, so no bottom padding */
  html.dark:not(.a11y) .logo { padding: 8px 8px 0; margin-top: 10px; }
  html.dark:not(.a11y) .sidebar img[src*="raa-logo"] { background: none; padding: 0; }
  @media (max-width: 900px) {
    html.dark:not(.a11y) .logo { margin-bottom: 12px; }
  }
}
.theme-toggle[hidden], html.a11y .theme-toggle { display: none; }

/* "Barrierefrei" view: plain, high-contrast, larger text, no decorative background */
html.a11y body::before { display: none; }
html.a11y body { background: #fff; color: #000; font-size: 13pt; line-height: 1.6; }
html.a11y a { color: #0033cc; text-decoration: underline; }
html.a11y h1 { font-size: 1.5em; }
html.a11y h2 { font-size: 1.3em; }
html.a11y h3, html.a11y .org h2, html.a11y .org h4 { font-size: 1.15em; }
html.a11y { --page-max: 1200px; }
html.a11y .content { padding-left: 30pt; }
html.a11y .sidebar { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 900px) { html.a11y .layout { grid-template-columns: minmax(0, 1fr); } html.a11y .content { padding-left: 16px; } }
html.a11y .menubar, html.a11y .footerbar { background: #000; padding: 8px; }
html.a11y .menu a, html.a11y .a11y-toggle { color: #000; border: 2px solid #000; font-size: 13pt; width: auto; min-width: 8em; padding: 6px 10px; }
html.a11y .menu a[aria-current="page"] { background: #ffd800; color: #000; }
html.a11y .a11y-toggle[aria-pressed="true"] { background: #ffd800; }
html.a11y .org-name, html.a11y .org-links li::before, html.a11y .missing-file, html.a11y .missing-note, html.a11y .file-info { color: #000; }
html.a11y .sidebar-left, html.a11y .org-group { border-color: #000; }
html.a11y .org { background: #fff; border-color: #000; }
html.a11y a:focus, html.a11y button:focus { outline: 3px solid #ffd800; outline-offset: 2px; }

@media print {
  body { background: none; }
  .menubar, .footerbar, .sidebar-left, .skip-link { display: none; }
  .layout { display: block; }
}
