:root {
  --color-bg: #fff;
  --color-text: #000;
  --color-text-muted: #888;
  --color-link: #000;
  --color-link-visited: #888;
  --color-active: #00f;
  --color-border: #ddd;
  --color-highlight: #ccff00;
  --index-width: 215px;
  --font-main: 'Helvetica Neue', Arial, Helvetica, Verdana, sans-serif;
}

[data-theme="dark"] {
  --color-bg: #111;
  --color-text: #ccc;
  --color-text-muted: #666;
  --color-link: #ccc;
  --color-link-visited: #666;
  --color-active: #6666ff;
  --color-border: #333;
  --color-highlight: #445500;
}

* { margin: 0; padding: 0; border: 0; font: inherit; vertical-align: baseline; box-sizing: border-box; }

body {
  font-size: 16px;
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5em;
  transition: background 0.15s, color 0.15s;
}

a { text-decoration: none; color: var(--color-link); }
a:visited { color: var(--color-link-visited); }
a:hover { text-decoration: underline; }

strong, b { font-weight: bold; }
em, i { font-style: italic; }

h1, h2, h3, h4 { font-size: 16px; margin-bottom: 1em; }
h1, h2 { font-weight: bold; }
p { margin-bottom: 1em; }

::selection { background: var(--color-highlight); color: var(--color-text); }

button {
  font-family: var(--font-main);
  background: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* Zwei-Panel-Layout */
#ndxz-index {
  width: var(--index-width);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  background: var(--color-bg);
  z-index: 10;
}

#ndxz-exhibit {
  margin-left: var(--index-width);
  min-height: 100vh;
}

.ndxz-container { padding: 27px 9px 25px 27px; }

#ndxz-index .ndxz-container { height: 100%; }

/* Sidebar-Innenleben */
.sidebar { display: flex; flex-direction: column; height: 100%; }
.sidebar h1 { margin-bottom: 1.5em; font-weight: normal; }
.sidebar h1 a { color: var(--color-text); }
.sidebar nav ul { list-style: none; margin-bottom: 1.5em; }
.sidebar nav li { margin-bottom: 2px; }
.sidebar nav a.active { color: var(--color-active); text-decoration: underline; }
.sidebar .sidebar-footer { list-style: none; margin-top: auto; font-size: 13px; }

/* responsive: stack auf schmalen Screens */
@media (max-width: 640px) {
  #ndxz-index {
    position: relative;
    width: 100%;
    border-bottom: 1px solid var(--color-border);
  }
  #ndxz-exhibit { margin-left: 0; }
}
