/* molecular-pathology.com
   Umsetzung von DESIGN.md. Werte hier nicht aendern, ohne DESIGN.md
   zu aendern — die Datei ist die Quelle, das hier die Umsetzung. */

/* ---------- Schriften ----------
   DESIGN.md §3: selbst hosten, kein Google-Fonts-CDN (DSGVO).
   Dateien fehlen noch — siehe assets/fonts/README.md.
   Bis dahin greifen die Fallbacks. */

@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/source-serif-4.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('../fonts/source-sans-3.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('../fonts/source-sans-3-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

/* ---------- Tokens: DESIGN.md §2 ---------- */

:root {
  --petrol-deep: #0b3b3c;
  --petrol-mid: #134e4a;
  --teal: #0f766e;
  --teal-bright: #1d9e75;
  --teal-light: #5dcaa5;

  /* RATIONIERT. Max. zweimal pro Bildschirm: primaerer CTA + EIN
     Datenpunkt. Kein Bernstein fuer Icons, Hover, Links, Badges. */
  --amber: #d97706;
  --amber-text: #412402;
  --amber-soft: #f0c480;
  --amber-on-dark: #f0c480;

  --text-on-dark: #f0fdfa;
  --text-dim: #9fcfc8;
  --text-faint: #7fb5ae;

  --text-page: #1c1917;
  --text-muted: #57534e;
  --page-bg: #fafaf9;
  --card-bg: #ffffff;
  --sec-tint: #f4f7f6;
  --border: #e7e5e4;

  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', system-ui, -apple-system, sans-serif;

  --radius: 8px;
  --radius-card: 12px;
  --wrap: 1080px;
  --measure: 62ch;
}

/* ---------- Basis ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--page-bg);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-page);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--teal);
}

/* DESIGN.md §3: Zahlen springen sonst bei Score-Bereichen. */
.num,
table,
.metric__val {
  font-variant-numeric: tabular-nums;
}

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

/* DESIGN.md §6: auf /el/ pruefen, Griechisch laeuft laenger. */
.measure {
  max-width: var(--measure);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card-bg);
  padding: 0.75rem 1rem;
  z-index: 10;
}
.skip:focus {
  left: 0;
}

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

/* ---------- Kopf ---------- */

.top {
  background: var(--petrol-deep);
}

.top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--text-on-dark);
  text-decoration: none;
  white-space: nowrap;
}
.brand span {
  color: var(--amber);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  font-size: 13.5px;
  flex-wrap: wrap;
}
.nav a {
  color: var(--text-dim);
  text-decoration: none;
}
.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--text-on-dark);
}

/* DESIGN.md §6: Sprachnamen, keine Flaggen. Flaggen sind Laender. */
.langsel {
  background: transparent;
  color: var(--text-faint);
  border: 0.5px solid var(--petrol-mid);
  border-radius: var(--radius);
  padding: 4px 7px;
  font: inherit;
  font-size: 12.5px;
}

/* ---------- Banner ---------- */

.hint {
  background: var(--petrol-mid);
  color: var(--text-on-dark);
  font-size: 14px;
  padding: 0.6rem 1.75rem;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.hint a {
  color: var(--teal-light);
}
.hint button {
  background: none;
  border: 0;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.stale {
  background: #fef3c7;
  color: var(--amber-text);
  font-size: 14px;
  padding: 0.7rem 1.75rem;
  margin: 0;
  text-align: center;
}
.stale a {
  color: var(--amber-text);
}

/* ---------- Hero ---------- */

.hero {
  background: var(--petrol-deep);
  padding: 1.5rem 0 3.5rem;
}
.hero h1 {
  font-size: clamp(26px, 4vw, 38px);
  color: var(--text-on-dark);
  margin-bottom: 0.85rem;
}
.hero__sub {
  font-size: 16.5px;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
}
.hero__art {
  margin-bottom: 2.5rem;
}

.hero__art--slim {
  margin-top: 1.5rem;
  margin-bottom: 0;
  opacity: 0.95;
}

.hero--slim {
  padding-bottom: 2rem;
}

.hero--mid {
  padding-bottom: 2.5rem;
}

.hero__sub--mid {
  margin-bottom: 1.5rem;
}

.h1--tight {
  margin-bottom: 0.75rem;
}

.hero__sub--last {
  margin-bottom: 0;
}

/* ---------- Knoepfe ---------- */

.btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  display: inline-block;
}

/* Der eine erlaubte CTA. DESIGN.md §2. */
.btn--go {
  background: var(--amber);
  color: var(--amber-text);
}

.btn--ghost-dark {
  border: 0.5px solid var(--petrol-mid);
  color: var(--text-dim);
}

.btn--ghost {
  border: 0.5px solid var(--border);
  color: var(--text-page);
  background: var(--card-bg);
}

/* ---------- Karten ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.grid--gap {
  margin-bottom: 1.25rem;
}

.card {
  background: var(--card-bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
}
.card:hover {
  border-color: var(--teal-light);
}
.card__eyebrow {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.card__title {
  font-family: var(--font-serif);
  font-size: 19px;
  margin-bottom: 5px;
}

.card__title--sm {
  font-size: 16px;
}
.card__note {
  font-size: 13px;
  color: var(--text-muted);
}

.card__method {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 0.5px solid var(--border);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--teal);
}

/* Betonung, nicht Dekoration. DESIGN.md §5: max. eine pro Abschnitt. */
.card--dark {
  background: var(--petrol-deep);
  border: 0;
  color: var(--text-on-dark);
}
.card--dark .card__eyebrow {
  color: var(--text-faint);
}
.card--dark .card__note {
  color: var(--text-dim);
}

/* ---------- Abschnitte ---------- */

.sec {
  padding: 3rem 0;
  border-top: 0.5px solid var(--border);
}
.sec:first-of-type {
  border-top: 0;
}

.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Auf dunklem Grund */
.eyebrow--dark {
  color: var(--text-faint);
  margin-bottom: 6px;
}

.axis-wrap {
  margin-bottom: 1.5rem;
}

.lede {
  font-size: 16px;
  color: var(--text-muted);
}

/* ---------- Metriken ---------- */

.metric {
  background: var(--petrol-deep);
  border-radius: var(--radius-card);
  padding: 1.1rem 1.25rem;
  color: var(--text-on-dark);
}
.metric__lbl {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.metric__val {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1;
}
.metric__note {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 5px;
}
.metric__rule {
  border-top: 0.5px solid var(--petrol-mid);
  margin: 12px 0 10px;
}

.metric__sm {
  font-size: 13px;
}

/* ---------- Badges ---------- */

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badges--after {
  margin-top: 1.25rem;
}
.badge {
  background: var(--page-bg);
  border: 0.5px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 20px;
}

/* Auf dunklem Grund, z. B. im Assay-Hero */
.badge--dark {
  background: transparent;
  border-color: var(--petrol-mid);
  color: var(--text-dim);
}

/* ---------- Fuss ---------- */

.foot {
  background: var(--petrol-deep);
  color: var(--text-dim);
  font-size: 13px;
  padding: 2.5rem 0;
  margin-top: 3rem;
}
.foot a {
  color: var(--text-dim);
}
.foot__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}
.foot__h {
  color: var(--text-faint);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.foot li {
  margin-bottom: 0.35rem;
}

.foot__addr {
  margin: 0;
  line-height: 1.7;
}

.foot__note {
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 0.5px solid var(--petrol-mid);
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ---------- Referenzen ---------- */

.refs {
  font-size: 13px;
  color: var(--text-muted);
}
.refs li {
  margin-bottom: 0.4rem;
}

/* ---------- Lead-Absatz ---------- */

.lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-page);
  margin: 0 0 1.5rem;
}

/* ---------- Anklickbare Helix-Cluster ---------- */

.hc-link {
  cursor: pointer;
}

.hc-link text {
  transition: fill 0.15s;
}

.hc-link:hover text,
.hc-link:focus-visible text {
  fill: var(--teal-bright) !important;
}

.hc-link:focus-visible {
  outline: 2px solid var(--teal-light);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Marker-Dreiteilung ---------- */

.markers {
  margin: 2rem 0 1.5rem;
  max-width: var(--measure);
}

.marker {
  padding: 1.1rem 0;
  border-top: 0.5px solid var(--border);
}

.marker:last-child {
  border-bottom: 0.5px solid var(--border);
}

.marker__k {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--teal);
  margin-bottom: 0.35rem;
}

.marker__t {
  margin: 0;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ---------- Getönter Abschnitt ---------- */

.sec--tint {
  background: var(--sec-tint);
}

.prose--lg p {
  font-size: 17px;
  line-height: 1.7;
}

/* ---------- Entität-Treiber-Tabelle ---------- */

.etab {
  width: 100%;
  max-width: var(--measure);
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 15px;
}

.etab thead th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0 0 0.6rem;
  border-bottom: 1px solid var(--border);
}

.etab tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--text-page);
  padding: 0.7rem 1.5rem 0.7rem 0;
  vertical-align: top;
  white-space: nowrap;
  border-bottom: 0.5px solid var(--border);
}

.etab tbody td {
  color: var(--text-muted);
  padding: 0.7rem 0;
  vertical-align: top;
  line-height: 1.5;
  border-bottom: 0.5px solid var(--border);
}

.etab tbody tr:last-child th,
.etab tbody tr:last-child td {
  border-bottom: 0;
}

.etab__note {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

@media (max-width: 560px) {
  .etab tbody th {
    white-space: normal;
  }
}

/* ---------- Helix als Trennelement (Textseiten) ---------- */

.helix-rule {
  max-width: var(--measure);
  margin: 2.5rem 0 0;
  opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Formular ---------- */

.form {
  max-width: var(--measure);
}

.field {
  margin-bottom: 1.1rem;
}

.flabel {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.flabel--req::after {
  content: ' *';
  color: var(--text-muted);
}

.fin {
  width: 100%;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-page);
  background: var(--card-bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.fin:focus {
  outline: 2px solid var(--teal-light);
  outline-offset: 1px;
  border-color: var(--teal);
}

textarea.fin {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}

select.fin {
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
                    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.fnote {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.fhp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button.btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

/* ---------- Meldungen ---------- */

.msg {
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 14px;
  line-height: 1.6;
}

.msg--warn {
  background: #fef3c7;
  color: var(--amber-text);
}

.msg--ok {
  background: var(--card-bg);
  border: 0.5px solid var(--teal-light);
  padding: 1.25rem;
  margin: 0;
}

.msg p {
  margin: 0;
}

/* ---------- Zweispaltig ---------- */

.cols {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.col--side {
  flex: 0 0 250px;
}

.col--main {
  flex: 1;
  min-width: 280px;
  max-width: var(--measure);
}

.cols--tight {
  gap: 1.75rem;
}

.col--metric {
  flex: 0 0 200px;
}

/* ---------- Kontaktblock ---------- */

.contact-line {
  margin: 0 0 1.25rem;
  line-height: 1.8;
}

.contact-tel {
  font-size: 17px;
}

.contact-meta {
  color: var(--text-muted);
  font-size: 13px;
}

.contact-addr {
  margin: 0 0 1.25rem;
  line-height: 1.7;
  font-size: 14px;
  color: var(--text-muted);
}

.contact-hours {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Prosa in Textseiten ---------- */

.prose h2 {
  font-size: 19px;
  margin: 2rem 0 0.75rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 17px;
  margin: 1.75rem 0 0.5rem;
}

.prose h3:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ---------- Abschnittsüberschrift ---------- */

.sec__h {
  font-size: 20px;
  margin-bottom: 0.6rem;
}

.sec__lede {
  margin-bottom: 1.25rem;
}

/* ---------- Lead-Absatz ---------- */

.lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-page);
  margin: 0 0 1.5rem;
}

/* ---------- Anklickbare Helix-Cluster ---------- */

.hc-link {
  cursor: pointer;
}

.hc-link text {
  transition: fill 0.15s;
}

.hc-link:hover text,
.hc-link:focus-visible text {
  fill: var(--teal-bright) !important;
}

.hc-link:focus-visible {
  outline: 2px solid var(--teal-light);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Marker-Dreiteilung ---------- */

.markers {
  margin: 2rem 0 1.5rem;
  max-width: var(--measure);
}

.marker {
  padding: 1.1rem 0;
  border-top: 0.5px solid var(--border);
}

.marker:last-child {
  border-bottom: 0.5px solid var(--border);
}

.marker__k {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--teal);
  margin-bottom: 0.35rem;
}

.marker__t {
  margin: 0;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ---------- Getönter Abschnitt ---------- */

.sec--tint {
  background: var(--sec-tint);
}

.prose--lg p {
  font-size: 17px;
  line-height: 1.7;
}

/* ---------- Entität-Treiber-Tabelle ---------- */

.etab {
  width: 100%;
  max-width: var(--measure);
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 15px;
}

.etab thead th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0 0 0.6rem;
  border-bottom: 1px solid var(--border);
}

.etab tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--text-page);
  padding: 0.7rem 1.5rem 0.7rem 0;
  vertical-align: top;
  white-space: nowrap;
  border-bottom: 0.5px solid var(--border);
}

.etab tbody td {
  color: var(--text-muted);
  padding: 0.7rem 0;
  vertical-align: top;
  line-height: 1.5;
  border-bottom: 0.5px solid var(--border);
}

.etab tbody tr:last-child th,
.etab tbody tr:last-child td {
  border-bottom: 0;
}

.etab__note {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

@media (max-width: 560px) {
  .etab tbody th {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* [hidden] verliert gegen jede explizite display-Regel (z. B. .hint mit
   display:flex). Ohne diese Zeile bleibt beim Schliessen des
   Sprachhinweises der Schliessen-Button als einzelnes x stehen. */
[hidden] {
  display: none !important;
}

/* Tumoragnostische Marker: einheitliche, dezente Hervorhebung ueberall
   in der Zielstruktur-Tabelle. Bernstein wie der Helix-Akzent, leicht
   getoent, damit der Marker sich abhebt, ohne die Zeile zu zerreissen.
   Ans Dateiende gesetzt, weil .etab weiter oben doppelt definiert ist. */
.etab .agn {
  color: var(--amber-text);
  background: var(--amber-soft);
  border-radius: 3px;
  padding: 0 0.3em;
  white-space: nowrap;
}
