/* isd-experiments-web — shared styles. Self-contained: system fonts, no CDN. */

:root {
  --tud-blue: #002d5a;
  --tud-blue-light: #0f4c81;
  --ink: #1a1a1a;
  --muted: #555;
  --line: #d7dbe0;
  --bg: #ffffff;
  --bg-soft: #f4f6f8;
  --focus: #0f4c81;
  --maxw: 46rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

/* --- Language switching ---------------------------------------------------- */
/* Content is hidden by default and revealed for the active language.          */
/* An inline <head> script sets html.lang-de / html.lang-en before paint.      */
/* <noscript> below forces both languages visible when scripting is off.       */
[data-lang] { display: none; }
html.lang-de [data-lang="de"],
html.lang-en [data-lang="en"] { display: revert; }

/* --- Layout ------------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--tud-blue);
  color: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

header.site {
  border-bottom: 3px solid var(--tud-blue);
  background: var(--bg-soft);
}
.bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.wordmark {
  font-weight: 700;
  color: var(--tud-blue);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.wordmark span { font-weight: 400; color: var(--muted); }

.langswitch { display: flex; gap: 0.25rem; }
.langswitch button {
  font: inherit;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--tud-blue-light);
  cursor: pointer;
  border-radius: 3px;
}
.langswitch button[aria-pressed="true"] {
  background: var(--tud-blue);
  border-color: var(--tud-blue);
  color: #fff;
  font-weight: 700;
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
}

h1 { font-size: 1.5rem; line-height: 1.3; color: var(--tud-blue); margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.5rem; color: var(--tud-blue); }
h3 { font-size: 1rem; margin: 1.25rem 0 0.35rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin: 0.2rem 0; }
a { color: var(--tud-blue-light); }
a:hover { color: var(--tud-blue); }

.lead { font-size: 1.05rem; }
.meta { color: var(--muted); font-size: 0.9rem; }
address { font-style: normal; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

footer.site {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  align-items: baseline;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9edf1;
    --muted: #a8b0ba;
    --line: #33404d;
    --bg: #14181d;
    --bg-soft: #1c232b;
    --tud-blue: #6ea8dc;
    --tud-blue-light: #9cc4e8;
    --focus: #9cc4e8;
  }
  .langswitch button { background: #14181d; }
  .langswitch button[aria-pressed="true"] { color: #14181d; }
}
