/* Shared look of the showcase pages: Siemens Sand & Petrol (ADR 0011), system font stack. */
:root {
  --deep-blue: #000028;
  --petrol: #009999;
  --petrol-dark: #007373;
  --sand: #f3f3f0;
  --line: #d9d9df;
  --muted: #66667e;
  --text: #000028;
  --surface: #ffffff;
  --on-accent: #ffffff;
  color-scheme: light;
}

/* Dark (ADR 0039): pages that load ../scheme.ts carry data-scheme-auto and follow the visitor's
   setting before any script runs; the script then sets data-scheme from colorScheme=. Muted text
   #B3B3BE is 8:1 on #00183B, the accent #00CCCC 9:1, Deep Blue on the accent 11:1. */
@media (prefers-color-scheme: dark) {
  :root[data-scheme-auto]:not([data-scheme="light"]) {
    --petrol: #00cccc;
    --petrol-dark: #00cccc;
    --sand: #000028;
    --line: #333353;
    --muted: #b3b3be;
    --text: #ffffff;
    --surface: #00183b;
    --on-accent: #000028;
    color-scheme: dark;
  }
}

:root[data-scheme="dark"] {
  --petrol: #00cccc;
  --petrol-dark: #00cccc;
  --sand: #000028;
  --line: #333353;
  --muted: #b3b3be;
  --text: #ffffff;
  --surface: #00183b;
  --on-accent: #000028;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
  background: var(--surface);
}

.top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--deep-blue);
  color: #fff;
}

.top h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.brand {
  color: #00c1b6;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.brand:hover,
.brand:focus-visible {
  text-decoration: underline;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid var(--petrol-dark);
  background: var(--surface);
  color: var(--petrol-dark);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.button.primary {
  background: var(--petrol-dark);
  color: var(--on-accent);
}

.button:hover {
  filter: brightness(0.95);
}

.button:focus-visible,
.toggle:focus-visible,
.chip:focus-visible {
  outline: 2px solid var(--deep-blue);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.index main {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.index .cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  padding: 0;
  list-style: none;
}

.index .cards a {
  display: block;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  background: var(--sand);
}

.index .cards a:hover,
.index .cards a:focus-visible {
  border-color: var(--petrol-dark);
}

.index .cards h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--petrol-dark);
}

/* Map controls and attribution on the dark scheme (ADR 0039). */
:root[data-scheme="dark"] .maplibregl-ctrl-group {
  background: #00183b;
  box-shadow: 0 0 0 1px #333353;
}

:root[data-scheme="dark"] .maplibregl-ctrl-group button + button {
  border-top-color: #333353;
}

:root[data-scheme="dark"] .maplibregl-ctrl-icon,
:root[data-scheme="dark"] .maplibregl-ctrl-attrib-button {
  filter: invert(1);
}

:root[data-scheme="dark"] .maplibregl-ctrl.maplibregl-ctrl-attrib,
:root[data-scheme="dark"] .maplibregl-ctrl-attrib.maplibregl-compact-show {
  color: #ccccd4;
  background: rgb(0 0 40 / 85%);
}

:root[data-scheme="dark"] .maplibregl-ctrl-attrib a {
  color: #00cccc;
}

:root[data-scheme="dark"] .maplibregl-ctrl-scale {
  color: #ffffff;
  background: rgb(0 0 40 / 85%);
  border-color: #b3b3be;
}
