/* simplace.net - shared stylesheet. Tokens follow the SIMPLACE web client (net.simplace.sim.wrapper.web). */
:root {
  --bg: #f5f6f4;
  --card: #ffffff;
  --text: #1f2421;
  --muted: #5d645f;
  --border: #d9ddd9;
  --accent: #1f6fb2;
  --accent-soft: #e6f0f9;
  --brand-blue: #1f497d;
  --brand-green: #5f8a00;
  --code-bg: #eef0ed;
  --on-accent: #ffffff;
  --max: 1000px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161a18;
    --card: #1f2421;
    --text: #e6e9e7;
    --muted: #a3aaa5;
    --border: #353b37;
    --accent: #6aaee8;
    --accent-soft: #1d2c3a;
    --brand-blue: #8fb4e3;
    --brand-green: #a9d34a;
    --code-bg: #121513;
    --on-accent: #10161b;
  }
}
:root[data-theme="dark"] {
  --bg: #161a18; --card: #1f2421; --text: #e6e9e7; --muted: #a3aaa5; --border: #353b37;
  --accent: #6aaee8; --accent-soft: #1d2c3a; --brand-blue: #8fb4e3; --brand-green: #a9d34a; --code-bg: #121513;
  --on-accent: #10161b;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
code { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; font-size: .92em; overflow-wrap: anywhere; }
pre { background: var(--code-bg); padding: 12px 14px; border-radius: 6px; overflow-x: auto; font-size: .9em; }
pre code { background: none; padding: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* skip link */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--card); padding: 6px 10px; z-index: 10; }

/* header: logo bar is white in both themes (corporate design), University of Bonn always at the right */
.site-header { padding-top: 16px; }
.logos {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: #fff; border: 1px solid var(--border); border-radius: 8px;
}
.logos a, .logos span { display: flex; min-width: 0; }
.logos img { display: block; width: auto; min-width: 0; object-fit: contain; }
.logo-simplace { height: 52px; max-width: 100%; }
.logo-crop { height: 46px; max-width: 100%; }
.logo-uni { height: 40px; max-width: 100%; }
.logos .l-simplace { flex: 0 1 40%; }
.logos .l-crop { flex: 0 1 22%; justify-content: center; }
.logos .l-uni { flex: 0 1 34%; justify-content: flex-end; }
@media (max-width: 520px) {
  .logos { padding: 8px 10px; gap: 8px; }
  .logo-simplace { height: 34px; }
  .logo-crop { height: 30px; }
  .logo-uni { height: 26px; }
}

/* main navigation */
.nav { margin: 12px 0 0; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.nav a {
  display: block; padding: 7px 12px; border-radius: 6px; text-decoration: none;
  color: var(--text); font-weight: 500;
}
.nav a:hover { background: var(--accent-soft); }
.nav a[aria-current="page"], .nav a.section { background: var(--accent); color: var(--on-accent); }

/* section sub-navigation (About, Documentation) */
.subnav { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.subnav a {
  display: block; padding: 4px 11px; border: 1px solid var(--border); border-radius: 999px;
  text-decoration: none; color: var(--muted); font-size: .92em; background: var(--card);
}
.subnav a:hover { color: var(--text); border-color: var(--accent); }
.subnav a[aria-current="page"] { color: var(--accent); border-color: var(--accent); font-weight: 600; }

/* content */
main { padding-top: 8px; padding-bottom: 40px; }
.content { max-width: 74ch; }
h1 { font-size: 1.9em; line-height: 1.2; margin: 28px 0 14px; color: var(--brand-blue); }
h2 { font-size: 1.35em; line-height: 1.25; margin: 32px 0 10px; }
h3 { font-size: 1.1em; margin: 24px 0 8px; }
p, li { overflow-wrap: break-word; }
li + li { margin-top: 4px; }
.lead { font-size: 1.08em; }
.muted { color: var(--muted); }

/* home */
.hero { padding: 26px 0 6px; }
.hero h1 { margin: 0 0 8px; font-size: 2.4em; letter-spacing: .02em; }
.tagline { margin: 0; font-weight: 700; font-size: 1.25em; line-height: 1.35; }
.tagline span { display: block; }
.tagline .t1 { color: var(--brand-blue); }
.tagline .t2 { color: var(--brand-green); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 18px 0; }
.card {
  display: block; background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 16px; text-decoration: none; color: var(--text);
}
a.card:hover { border-color: var(--accent); }
.card h3 { margin: 0 0 6px; color: var(--accent); }
.card p { margin: 0; color: var(--muted); font-size: .95em; }

.box {
  background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: 8px; padding: 14px 18px; margin: 20px 0;
}
.box h2, .box h3 { margin-top: 0; }
.box ul { margin-bottom: 0; padding-left: 20px; }
.box.cite { border-left-color: var(--brand-green); }

/* figures */
figure { margin: 20px 0; }
figure img { display: block; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
figcaption { color: var(--muted); font-size: .9em; margin-top: 6px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 14px 0; }
table { border-collapse: collapse; min-width: 100%; background: var(--card); }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--accent-soft); }

/* publications */
.pubs { padding-left: 20px; }
.pubs li { margin-bottom: 10px; }
.pubs li + li { margin-top: 0; }

/* contact */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0; }
.people > div { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.people .role { color: var(--muted); font-size: .9em; margin: 0; }
.people .name { font-weight: 600; margin: 2px 0 0; }

/* imprint: long legal text */
.legal h2 { font-size: 1.2em; }
.legal h3 { font-size: 1em; }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: 18px 0 28px; color: var(--muted); font-size: .9em; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
