/* ============================================================
   SUSMAT — Materialdatenbank
   Design-System nach Eurac Research Corporate Design
   (Branding & Corporate Design Manual: Farben S. 36–41,
    Webschrift Inter S. 48–49, Layout/Stilelemente S. 52–63)
   ============================================================ */

:root {
  /* --- Institutionelle Farben --- */
  --red:        #DF1B12; /* Eurac Research Rot, immer 100 % */
  --red-dark:   #B2160E; /* Hilfsfarbe Reds, für Hover/Aktiv */
  --red-pale:   #F9D1D0; /* Hilfsfarbe Reds, für Flächen */

  --gray-100:   #404648; /* Eurac Research Grau */
  --gray-80:    #666B6C;
  --gray-60:    #8C9091;
  --gray-40:    #B2B5B5;
  --gray-20:    #D8DADA;

  /* --- semantische Rollen --- */
  --paper:     #FFFFFF; /* „bright white“, vgl. Papierwahl S. 52 */
  --surface:   #FFFFFF;
  --surface-2: #F4F5F5;
  --ink:       var(--gray-100);
  --ink-soft:  var(--gray-80);
  --line:      var(--gray-20);
  --line-strong: var(--gray-40);

  /* type coding — aus den Hilfsfarbpaletten (S. 38–41) */
  --type-renew:   #49742D; /* Nachwachsend — Greens */
  --type-mineral: #2A6D8C; /* Mineralisch  — Blues  */
  --type-other:   #6E3410; /* Andere/Recycling — Earth tones */

  --maxw: 1320px;
  --pad: 24px;
  --rail: 260px;
  --radius: 0px; /* Designprinzip: sachlich, ohne dekorative Effekte */

  --font-display: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Inter', system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 900px) {
  :root { --pad: 48px; }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

::selection { background: rgba(223,27,18,0.14); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--red); color: #fff; padding: 8px 16px;
  font-family: var(--font-display); font-size: 13px; text-decoration: none;
}
.skip-link:focus { left: 8px; top: 8px; }

/* focus ring */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: 72px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
/* Logo-Lockup: Logo links oben, Schutzraum = Logohöhe (CD-Manual S. 22, 54) */
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; white-space: nowrap; }
.eurac-logo {
  display: inline-flex; align-items: baseline; gap: 0.22em;
  color: var(--red); line-height: 1;
  font-size: 21px; /* entspricht ca. 12 mm Standardgröße */
}
.eurac-logo-eurac {
  font-family: var(--font-display); font-weight: 800;
  letter-spacing: -0.035em; text-transform: lowercase;
}
.eurac-logo-research {
  font-family: Georgia, 'Times New Roman', serif; font-weight: 400;
  letter-spacing: -0.005em; text-transform: lowercase;
}
.brand-rule { width: 1px; height: 26px; background: var(--line); flex: none; }
.brand-text { display: flex; align-items: baseline; gap: 9px; }
.brand-sub {
  font-family: var(--font-body); font-size: 13px; color: var(--ink-soft);
}
@media (max-width: 720px) { .brand-rule, .brand-text { display: none; } }

.header-search {
  position: relative; display: flex; align-items: center;
  max-width: 440px; width: 100%; justify-self: center;
}
.header-search .search-icon {
  position: absolute; left: 12px; color: var(--ink-soft); pointer-events: none;
}
#search-input {
  width: 100%; height: 38px;
  padding: 0 14px 0 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  transition: border-color 150ms var(--ease);
}
#search-input::placeholder { color: var(--ink-soft); }
#search-input:focus { outline: none; border-color: var(--red); }
#search-input:focus-visible { outline: none; }

.header-tools { display: flex; align-items: center; gap: 18px; }
.lang-toggle { display: flex; align-items: center; gap: 6px; }
.lang-btn {
  background: none; border: none; padding: 4px 2px;
  font-family: var(--font-display); font-weight: 500; font-size: 13px;
  color: var(--ink-soft); letter-spacing: 0.02em;
  transition: color 150ms var(--ease);
}
.lang-btn[aria-pressed="true"] { color: var(--ink); }
.lang-btn:hover { color: var(--red); }
.lang-sep { color: var(--line); font-size: 13px; }

.view-toggle { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.view-btn {
  background: var(--surface); border: none; width: 36px; height: 30px;
  display: grid; place-items: center; color: var(--ink-soft);
  transition: color 150ms var(--ease), background 150ms var(--ease);
}
.view-btn + .view-btn { border-left: 1px solid var(--line); }
.view-btn[aria-pressed="true"] { color: var(--ink); background: var(--paper); }
.view-btn:hover { color: var(--red); }
@media (max-width: 560px) { .view-toggle { display: none; } }

/* ============================================================
   Layout
   ============================================================ */
.app-main { outline: none; }
.container {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
}

/* overview layout: rail + content */
.overview {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  gap: 48px;
  align-items: start;
  padding-top: 32px;
  padding-bottom: 96px;
}
@media (max-width: 980px) {
  .overview { grid-template-columns: 1fr; gap: 0; }
}

/* ============================================================
   Filter rail
   ============================================================ */
.filter-rail {
  position: sticky; top: 104px;
  align-self: start;
  max-height: calc(100vh - 104px - 24px);
  overflow-y: auto;
  /* room so the scrollbar doesn't overlap the labels */
  padding-right: 8px;
  scrollbar-width: thin;
}
.filter-group { padding: 0 0 28px; }
.filter-group + .filter-group { border-top: 1px solid var(--line); padding-top: 24px; }
.eyebrow {
  font-family: var(--font-display); font-weight: 500; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
  margin: 0 0 14px;
}

/* category list */
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-item {
  display: flex; align-items: baseline; gap: 8px; width: 100%;
  background: none; border: none; text-align: left;
  padding: 6px 0; color: var(--ink);
  font-family: var(--font-display); font-weight: 500; font-size: 13.5px;
  transition: color 150ms var(--ease);
}
.cat-item:hover { color: var(--red); }
.cat-item .cat-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--red);
  flex: none; margin-bottom: 2px; opacity: 0;
}
.cat-item[aria-pressed="true"] { color: var(--red); }
.cat-item[aria-pressed="true"] .cat-dot { opacity: 1; }
.cat-item .cat-label { flex: 1; }
.cat-item .cat-leader {
  flex: 1; border-bottom: 1px dotted var(--line);
  transform: translateY(-3px); margin: 0 2px;
}
.cat-item .cat-count {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* type checkboxes */
.type-list { display: flex; flex-direction: column; gap: 10px; }
.type-check {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: var(--font-display); font-weight: 500; font-size: 13.5px;
  color: var(--ink);
}
.type-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.type-box {
  width: 16px; height: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; place-items: center; flex: none; background: var(--surface);
  transition: border-color 150ms var(--ease);
}
.type-check:hover .type-box { border-color: var(--red); }
.type-box svg { opacity: 0; transition: opacity 120ms var(--ease); }
.type-check input:checked + .type-box svg { opacity: 1; }
.type-check input:focus-visible + .type-box { outline: 2px solid var(--red); outline-offset: 2px; }
.type-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.type-name { flex: 1; }
.type-count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }

/* basismaterial chips */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 5px 12px;
  font-family: var(--font-display); font-weight: 500; font-size: 12px;
  color: var(--ink); display: inline-flex; align-items: center; gap: 6px;
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip[aria-pressed="true"] { border-color: var(--red); color: var(--red); }
.chip[aria-pressed="true"]:hover { border-color: var(--red-dark); color: var(--red-dark); }
.chip .chip-count { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.chip[aria-pressed="true"] .chip-count { color: var(--red); }
.chip-more {
  background: none; border: none; padding: 5px 4px;
  font-family: var(--font-display); font-weight: 500; font-size: 12px;
  color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px;
}
.chip-more:hover { color: var(--red); }

.reset-link {
  display: inline-block; margin-top: 4px;
  background: none; border: none; padding: 0;
  font-family: var(--font-display); font-weight: 500; font-size: 13px;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.reset-link:hover { color: var(--red); border-bottom-color: var(--red); }

/* ============================================================
   Results content
   ============================================================ */
.results-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.result-count {
  font-family: var(--font-mono); font-size: 14px; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.result-count .count-num { font-weight: 500; }
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.active-filter {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 500; font-size: 12px;
  color: var(--red); border: 1px solid var(--red); border-radius: var(--radius);
  padding: 4px 8px 4px 11px; background: none;
}
.active-filter .x { font-size: 14px; line-height: 1; }
.active-filter:hover { background: rgba(223,27,18,0.06); }

/* ---------- card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none; color: inherit;
  overflow: hidden;
  transition: border-color 150ms var(--ease);
}
.card:hover, .card:focus-visible {
  border-color: var(--red);
  outline: none;
}
.card:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.card-media {
  aspect-ratio: 4 / 5; position: relative;
  display: grid; place-items: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.card-media-empty .ph-icon {
  width: clamp(40px, 9vw, 56px); height: auto;
  color: var(--ink-soft); opacity: 0.4;
}
.card-media.has-img { background: var(--surface); }
.card-img { width: 100%; height: 100%; object-fit: contain; padding: 14px; box-sizing: border-box; background: #fff; }

.card-body { padding: 16px 18px 0; flex: 1; display: flex; flex-direction: column; }
.card-eyebrow {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-family: var(--font-display); font-weight: 500; font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft);
}
.card-eyebrow .type-dot { width: 7px; height: 7px; }
.card-title {
  font-family: var(--font-display); font-weight: 500; font-size: 16px;
  line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-maker {
  font-size: 12.5px; color: var(--ink-soft); margin: 0 0 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-foot {
  margin-top: auto; display: flex; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--line); padding: 12px 0; min-height: 44px;
}
.card-metric { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.card-metric.right { text-align: right; align-items: flex-end; }
.card-metric .m-label {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.card-metric .m-value {
  font-family: var(--font-mono); font-weight: 500; font-size: 14px; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px;
}
.card-metric .m-unit { font-size: 10px; color: var(--ink-soft); }

/* lazy reveal */
.reveal { opacity: 0; transform: translateY(12px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 400ms var(--ease), transform 400ms var(--ease); }

/* ---------- list view ---------- */
.list-wrap { width: 100%; overflow-x: auto; }
table.mat-table { width: 100%; border-collapse: collapse; }
.mat-table th {
  text-align: left; padding: 10px 14px 10px 0;
  font-family: var(--font-display); font-weight: 500; font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink);
  border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.mat-table th.sortable { cursor: pointer; user-select: none; }
.mat-table th.sortable:hover { color: var(--red); }
.mat-table th .sort-ind { font-family: var(--font-mono); font-size: 10px; margin-left: 4px; color: var(--red); }
.mat-table th.num, .mat-table td.num { text-align: left; }
.mat-table td {
  padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line);
  font-size: 13.5px; vertical-align: middle;
}
.mat-table tbody tr { transition: background 120ms var(--ease); cursor: pointer; }
.mat-table tbody tr:hover { background: var(--surface-2); }
.mat-table .td-name { font-family: var(--font-display); font-weight: 500; color: var(--ink); }
.mat-table .td-name a { text-decoration: none; }
.mat-table .td-name a:hover { color: var(--red); }

/* thumbnail column */
.mat-table th.th-thumb { width: 52px; padding: 0; }
.mat-table .td-thumb-cell { width: 52px; padding-right: 12px; }
.td-thumb {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface);
}
.td-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
.td-thumb.thumb-empty .ph-icon {
  width: 22px; height: auto; color: var(--ink-soft); opacity: 0.4;
}
.mat-table .td-name .type-dot { width: 7px; height: 7px; display: inline-block; margin-right: 7px; vertical-align: middle; }
.mat-table .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.mat-table td.soft { color: var(--ink-soft); }
@media (max-width: 760px) {
  .mat-table .hide-mobile { display: none; }
}

/* crossfade between views */
.view-fade { animation: fadein 220ms var(--ease); }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   Detail page
   ============================================================ */
.detail { padding-top: 28px; padding-bottom: 96px; }
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 500; font-size: 13px;
  color: var(--ink-soft); text-decoration: none; margin-bottom: 32px;
  transition: color 150ms var(--ease);
}
.back-link:hover { color: var(--red); }

.detail-eyebrow {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--font-display); font-weight: 500; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 16px;
}
.detail-eyebrow .sep { width: 1px; height: 11px; background: var(--line); }
.detail-eyebrow .type-tag { display: inline-flex; align-items: center; gap: 7px; }
.detail-eyebrow .type-dot { width: 8px; height: 8px; }
.detail-eyebrow .mat-no { font-family: var(--font-mono); letter-spacing: 0.02em; text-transform: none; }

.detail-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.08; letter-spacing: -0.02em;
  color: var(--ink); margin: 0 0 18px; max-width: 20ch;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--red);
  display: inline-block;
}
.detail-submeta { margin: 0 0 40px; display: flex; flex-direction: column; gap: 6px; }
.detail-maker { font-size: 14px; color: var(--ink-soft); margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-maker a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); transition: color 150ms var(--ease), border-color 150ms var(--ease); }
.detail-maker a:hover { color: var(--red); border-bottom-color: var(--red); }
.maker-logo { height: 30px; width: auto; max-width: 140px; object-fit: contain; display: block; }
.sym { text-transform: none !important; }
.link-list .doc-lang { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); margin-left: 4px; }
.detail-source { margin: 0; font-size: 13px; }
.detail-source.muted { color: var(--ink-soft); }
.detail-source a {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-display); font-weight: 500; color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--red), var(--red));
  background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size 200ms var(--ease), color 150ms var(--ease);
}
.detail-source a:hover { color: var(--red); background-size: 100% 1px; }
.detail-source .ext { font-size: 11px; }

.detail-hero {
  margin: 0 0 40px; max-width: 840px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface);
}
.detail-hero img { width: 100%; aspect-ratio: 4 / 3; height: auto; max-height: 560px; object-fit: contain; background: #fff; display: block; }
.hero-cap { font-size: 12px; color: var(--ink-soft); padding: 8px 12px; border-top: 1px solid var(--line); }

/* ---------- Bild-Galerie / Slider ---------- */
.gallery { margin: 0 0 40px; max-width: 840px; }
.gallery-stage {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.gallery-track {
  display: flex;
  transition: transform 320ms var(--ease);
  will-change: transform;
}
.gallery-slide { flex: 0 0 100%; }
.gallery-slide img {
  width: 100%; aspect-ratio: 4 / 3; height: auto; max-height: 560px;
  object-fit: contain; background: #fff; display: block; user-select: none;
}
/* Pfeil-Buttons */
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.gallery-nav:hover { color: var(--red); border-color: var(--red); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
/* Zähler */
.gallery-counter {
  position: absolute; bottom: 12px; right: 12px;
  font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums;
  color: #fff; background: rgba(64,70,72,0.72);
  padding: 3px 9px; border-radius: var(--radius);
}
.gallery-counter .gc-cur { font-weight: 600; }
/* Thumbnail-Streifen */
.gallery-thumbs {
  display: flex; gap: 8px; margin-top: 10px;
  overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px;
}
.gallery-thumb {
  flex: 0 0 auto; width: 76px; height: 56px; padding: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; opacity: 0.6;
  transition: opacity 150ms var(--ease), border-color 150ms var(--ease);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.gallery-thumb:hover { opacity: 1; border-color: var(--line-strong); }
.gallery-thumb.active { opacity: 1; border-color: var(--red); }
/* Punkt-Indikatoren (nur mobil, wenn Thumbs ausgeblendet) */
.gallery-dots { display: none; gap: 8px; margin-top: 12px; justify-content: center; }
.gallery-dot {
  width: 7px; height: 7px; padding: 0; border-radius: 50%;
  background: var(--gray-40); border: none;
  transition: background 150ms var(--ease);
}
.gallery-dot[aria-current="true"] { background: var(--red); }
@media (max-width: 560px) {
  .gallery-thumbs { display: none; }
  .gallery-dots { display: flex; }
}

/* metric bar (signature) */
.metric-bar {
  display: flex; flex-wrap: wrap;
  border: 1px solid var(--line); border-top: 2px solid var(--red);
  border-radius: var(--radius); background: var(--surface);
  margin-bottom: 48px; overflow: hidden;
}
.metric {
  flex: 1 1 0; min-width: 130px;
  padding: 20px 24px;
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.metric:first-child { border-left: none; }
.metric .met-label {
  font-family: var(--font-display); font-weight: 500; font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
}
.metric .met-value {
  font-family: var(--font-mono); font-weight: 500;
  font-size: clamp(22px, 3vw, 34px); line-height: 1; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  overflow-wrap: anywhere; word-break: break-word; max-width: 100%;
}
.metric .met-unit { font-size: 12px; color: var(--ink-soft); font-weight: 400; letter-spacing: 0; }
@media (max-width: 640px) {
  .metric { flex: 1 1 45%; min-width: 45%; }
  .metric:nth-child(odd) { border-left: none; }
  .metric { border-top: 1px solid var(--line); }
  .metric:nth-child(1), .metric:nth-child(2) { border-top: none; }
}

/* accordion */
.accordion { max-width: 840px; }
.acc-group { border-top: 1px solid var(--line); }
.acc-group:last-child { border-bottom: 1px solid var(--line); }
.acc-header {
  width: 100%; background: none; border: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 2px; text-align: left;
  font-family: var(--font-display); font-weight: 500; font-size: 17px;
  letter-spacing: -0.01em; color: var(--ink);
  transition: color 150ms var(--ease);
}
.acc-header:hover { color: var(--red); }
.acc-icon { position: relative; width: 16px; height: 16px; flex: none; }
.acc-icon::before, .acc-icon::after {
  content: ''; position: absolute; background: currentColor;
  transition: transform 250ms var(--ease), opacity 250ms var(--ease);
}
.acc-icon::before { left: 0; top: 7px; width: 16px; height: 1.5px; }
.acc-icon::after { left: 7px; top: 0; width: 1.5px; height: 16px; }
.acc-header[aria-expanded="true"] .acc-icon::after { transform: scaleY(0); opacity: 0; }
.acc-header[aria-expanded="true"] { color: var(--red); }

.acc-panel { overflow: hidden; height: 0; transition: height 250ms var(--ease); }
.acc-inner { padding: 0 2px 28px; }

/* rich text block */
.rich-block { margin-bottom: 22px; }
.rich-block:last-child { margin-bottom: 0; }
.rich-block .rb-label {
  font-family: var(--font-display); font-weight: 500; font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft);
  margin: 0 0 8px;
}
.rich-block .rb-text {
  font-family: var(--font-body); font-size: 15px; line-height: 1.65;
  color: var(--ink); max-width: 65ch; white-space: pre-line;
}

/* key-value table */
.kv-table { width: 100%; border-collapse: collapse; }
.kv-table tr { border-bottom: 1px solid var(--line); }
.kv-table tr:last-child { border-bottom: none; }
.kv-table td { padding: 11px 0; vertical-align: top; }
.kv-table .kv-label { color: var(--ink-soft); font-size: 14px; padding-right: 24px; width: 50%; }
.kv-table .kv-value {
  font-family: var(--font-mono); font-size: 14px; color: var(--ink);
  text-align: right; font-variant-numeric: tabular-nums; word-break: break-word;
}

/* link list */
.link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.link-list a {
  font-family: var(--font-display); font-weight: 500; font-size: 14px;
  color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  background-image: linear-gradient(var(--red), var(--red));
  background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size 200ms var(--ease), color 150ms var(--ease);
}
.link-list a:hover { color: var(--red); background-size: 100% 1px; }
.link-list .plain { font-family: var(--font-body); font-size: 14px; color: var(--ink-soft); }
.link-list .ext { font-size: 12px; }

/* detail footer nav */
.detail-nav {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line);
  max-width: 840px;
}
.detail-nav a, .detail-nav span.disabled {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  max-width: 45%;
}
.detail-nav .dn-dir { font-family: var(--font-display); font-weight: 500; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.detail-nav .dn-name { font-family: var(--font-display); font-weight: 500; font-size: 14.5px; color: var(--ink); transition: color 150ms var(--ease); }
.detail-nav a:hover .dn-name { color: var(--red); }
.detail-nav .next { text-align: right; margin-left: auto; align-items: flex-end; }
.detail-nav span.disabled { opacity: 0.35; }

/* ============================================================
   Skeleton / empty states
   ============================================================ */
.skel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.skel-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.skel-media { aspect-ratio: 4/5; background: linear-gradient(90deg, #F4F5F5 25%, #E9EBEB 37%, #F4F5F5 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-bottom: 1px solid var(--line); }
.skel-body { padding: 16px 18px; }
.skel-line { height: 10px; border-radius: var(--radius); background: var(--surface-2); background: linear-gradient(90deg, #F4F5F5 25%, #E9EBEB 37%, #F4F5F5 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; margin-bottom: 10px; }
.skel-line.w60 { width: 60%; } .skel-line.w40 { width: 40%; } .skel-line.w80 { width: 80%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.empty-state {
  padding: 80px 0; text-align: center; color: var(--ink-soft);
}
.empty-state .es-title { font-family: var(--font-display); font-weight: 500; font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.empty-state .es-mono { font-family: var(--font-mono); font-size: 13px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; background: var(--surface); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 48px var(--pad) 40px;
  display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 48px; align-items: start;
}
.footer-h { font-size: 14px; color: var(--ink-soft); margin: 0 0 22px; }
.footer-eurac { height: 52px; width: auto; display: block; }
.footer-logos { display: flex; flex-wrap: wrap; gap: 28px 36px; align-items: center; }
.footer-logos img { height: 74px; width: auto; display: block; }
.footer-inst { color: var(--red); text-transform: uppercase; font-size: 14px; line-height: 1.25; letter-spacing: 0.01em; margin: 0 0 18px; }
.footer-address { font-style: normal; font-size: 14px; line-height: 1.6; color: var(--ink); }
.footer-address a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: color 150ms var(--ease), border-color 150ms var(--ease); }
.footer-address a:hover { color: var(--red); border-bottom-color: var(--red); }
.footer-bottom {
  max-width: var(--maxw); margin: 0 auto; padding: 18px var(--pad) 28px;
  border-top: 1px solid var(--line); display: flex; gap: 20px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-soft);
}
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--red); }
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Header: Logo + Navigation ---------- */
.eurac-logo-img { height: 34px; width: auto; display: block; }
.nav-link {
  font-family: var(--font-display); font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent;
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.nav-link:hover { color: var(--red); }
.nav-link[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }

/* ---------- Über-Seite ---------- */
.about-hero { background: var(--gray-100); color: #fff; padding: 40px 0 56px; }
.about-hero .back-link { color: rgba(255,255,255,0.75); }
.about-hero .back-link:hover { color: #fff; }
.about-eyebrow { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.7); margin: 36px 0 10px; }
.about-hero h1 { font-family: var(--font-display); font-weight: 300; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 16px; color: #fff; }
.about-lead { font-size: clamp(1.1rem, 2.2vw, 1.5rem); font-weight: 300; margin: 0; max-width: 40ch; color: #fff; }
.about { padding-top: 56px; padding-bottom: 24px; }
.about-section { max-width: 760px; padding: 0 0 44px; }
.about-section + .about-section { border-top: 1px solid var(--line); padding-top: 44px; }
.about-section h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 20px; color: var(--ink); }
.about-section p { font-size: 16px; line-height: 1.7; color: var(--ink); margin: 0 0 16px; }
.about-section p strong { font-weight: 600; }
.about-link a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); transition: color 150ms var(--ease), border-color 150ms var(--ease); }
.about-link a:hover { color: var(--red); border-bottom-color: var(--red); }
.about-link .ext { font-size: 12px; }
.about-logos { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.about-logo-tile {
  display: grid; place-items: center; align-content: center; gap: 4px; text-align: center;
  min-width: 200px; height: 120px; padding: 18px 24px; box-sizing: border-box;
  border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink);
  transition: border-color 150ms var(--ease);
}
.about-logo-tile:hover { border-color: var(--red); }
.about-logo-tile img { max-height: 76px; max-width: 220px; width: auto; height: auto; display: block; }
.about-logo-tile.partner.large { min-width: 280px; height: 140px; }
.about-logo-tile.partner.large img { max-height: 96px; max-width: 260px; }
.pt-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.25; }
.about-logo-tile.large .pt-name { font-size: 19px; }
.pt-sub { font-size: 12px; color: var(--ink-soft); line-height: 1.3; max-width: 26ch; }
@media (max-width: 560px) { .about-logo-tile, .about-logo-tile.partner.large { min-width: 0; width: 100%; } .nav-link { font-size: 12px; } }

/* ============================================================
   Mobile filter sheet
   ============================================================ */
.mobile-filter-btn {
  display: none;
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90;
  background: var(--red); color: #fff; border: none;
  border-radius: var(--radius); padding: 12px 24px;
  font-family: var(--font-display); font-weight: 500; font-size: 14px;
  box-shadow: none;
}
.mobile-filter-btn .badge {
  font-family: var(--font-mono); font-size: 12px; margin-left: 8px;
  background: rgba(255,255,255,0.22); border-radius: var(--radius); padding: 1px 7px;
}
@media (max-width: 980px) {
  .filter-rail { display: none; }
  .mobile-filter-btn { display: inline-flex; align-items: center; }
}

/* bottom sheet */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 150; background: rgba(64,70,72,0.32);
  opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease);
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 151;
  background: var(--paper); border-top: 2px solid var(--red);
  max-height: 82vh; overflow-y: auto; padding: 8px 24px 32px;
  transform: translateY(100%); transition: transform 260ms var(--ease);
}
.sheet.open { transform: none; }
.sheet-handle { width: 40px; height: 4px; border-radius: var(--radius); background: var(--line); margin: 10px auto 18px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.sheet-head .sh-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.sheet-close { background: none; border: none; font-size: 20px; color: var(--ink-soft); padding: 4px; }
.sheet-apply {
  position: sticky; bottom: 0; margin-top: 20px;
  width: 100%; background: var(--red); color: #fff; border: none;
  border-radius: var(--radius); padding: 14px; font-family: var(--font-display); font-weight: 500; font-size: 15px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* hidden-Attribut muss die mobile display-Regel schlagen (Knopf lag sonst über Detail-/Über-Seite) */
.mobile-filter-btn[hidden] { display: none !important; }

/* ---------- Seitentitel der Übersicht ---------- */
.page-title { padding-top: 40px; padding-bottom: 8px; }
.page-title h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3.6vw, 2.75rem); line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 8px; }
.page-title p { font-size: clamp(1rem, 1.6vw, 1.25rem); font-weight: 300; color: var(--ink-soft); margin: 0; }
.footer-logos img { height: 44px; }
.about-logo-tile img { max-width: 300px; }
.about-logos:not(.partners) .about-logo-tile { min-width: 340px; }
@media (max-width: 560px) { .footer-logos img { height: 34px; } .about-logos:not(.partners) .about-logo-tile { min-width: 0; } }

/* ---------- „Weitere anzeigen" ---------- */
.load-more-wrap { display: flex; justify-content: center; padding: 40px 0 8px; }
.load-more {
  display: inline-flex; align-items: baseline; gap: 12px; padding: 13px 26px;
  font-family: var(--font-display); font-size: 14px; font-weight: 500; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.load-more:hover { color: var(--red); border-color: var(--red); }
.load-more .lm-count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }

/* ---------- Kartenansicht ---------- */
.map-wrap { margin: 0; }
.map { height: min(70vh, 680px); min-height: 420px; border: 1px solid var(--line); background: var(--surface-2); z-index: 0; }
.map .leaflet-tile-pane { filter: grayscale(1) brightness(1.05) contrast(0.9); }
.map-note { font-size: 13px; color: var(--ink-soft); margin: 12px 0 0; }
.map-error { padding: 40px; text-align: center; color: var(--ink-soft); }
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content-wrapper { border-radius: 0; box-shadow: 0 2px 14px rgba(64,70,72,0.22); }
.leaflet-popup-content { margin: 16px 18px; }
.map-pop { text-align: left; }
.map-pop .mp-logo { max-height: 34px; max-width: 150px; width: auto; display: block; margin: 0 0 10px; }
.map-pop p { margin: 0; }
.map-pop .mp-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.25; color: var(--ink); }
.map-pop .mp-place { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.map-pop .mp-cats { font-size: 12px; color: var(--ink-soft); margin-top: 8px; line-height: 1.4; }
.map-pop .mp-link { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 500; color: var(--red); text-decoration: none; border-bottom: 1px solid transparent; }
.map-pop .mp-link:hover { border-bottom-color: var(--red); }
.leaflet-tooltip { border-radius: 0; font-size: 12px; }
@media (max-width: 560px) { .view-toggle { display: inline-flex !important; } .view-toggle [data-view="list"] { display: none; } .map { height: 60vh; min-height: 360px; } }
/* Leaflet lädt sein CSS später – eigene Regeln brauchen höhere Spezifität */
.map .leaflet-popup-content-wrapper, .map .leaflet-popup-tip { border-radius: 0; box-shadow: 0 2px 14px rgba(64,70,72,0.22); }
.map .leaflet-popup-content { margin: 16px 18px; }
.map .leaflet-bar, .map .leaflet-bar a { border-radius: 0; }
.map .leaflet-tooltip { border-radius: 0; }
.map-pop .mp-logo { height: 30px; width: auto; max-width: 150px; object-fit: contain; object-position: left center; }
.about-logo-tile .pt-cap { font-size: 12px; color: var(--ink-soft); }

/* ---------- Karten-Teaser (Über uns) + Menüpunkt Karte ---------- */
.header-tools .nav-link + .nav-link { margin-left: 4px; }
.about-map { position: relative; display: block; margin-top: 24px; border: 1px solid var(--line); overflow: hidden; text-decoration: none; transition: border-color 150ms var(--ease); }
.about-map:hover { border-color: var(--red); }
.about-map img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 8; object-fit: cover; }
.about-map .am-cta { position: absolute; left: 16px; bottom: 16px; background: var(--surface); color: var(--red); font-family: var(--font-display); font-weight: 500; font-size: 14px; padding: 9px 14px; border: 1px solid var(--line); }
.about-map:hover .am-cta { border-color: var(--red); }
@media (max-width: 720px) { .nav-map { display: none; } }

/* ---------- Kopfzeile: Logo nie stauchen, mobil zweizeilig (Logo + Werkzeuge / Suche) ---------- */
.eurac-logo-img { flex: none; aspect-ratio: 790 / 284; }
.nav-link { white-space: nowrap; }
@media (max-width: 900px) {
  .site-header { height: auto; }
  .header-inner {
    grid-template-columns: auto 1fr; grid-template-areas: "brand tools" "search search";
    row-gap: 10px; column-gap: 12px; height: auto; padding-top: 12px; padding-bottom: 12px;
  }
  .brand { grid-area: brand; }
  .header-tools { grid-area: tools; justify-self: end; gap: 12px; }
  .header-search { grid-area: search; max-width: none; }
  .eurac-logo-img { height: 30px; }
}
