/* GKV-Orakel — nüchtern, sachlich. System-Sans überall, schwarzer Text, schwarze
   unterstrichene Links. Grün ist AUSSCHLIESSLICH dem Wortschriftzug „GKV-Orakel"
   vorbehalten. Kein CSS-Framework, keine Web-Fonts, kein Build-Schritt. */

:root {
  --text: #1f2933;            /* dunkles Slate / „schwarz" */
  --muted: #52606d;
  --border: #d7dce1;
  --bg: #ffffff;
  --brand: #15803d;           /* NUR für den Wortschriftzug */
  --row-highlight: #f2f2f2;   /* eigene Ranglisten-Zeile: neutrales Hellgrau */
  --btn: #1f2933;             /* Buttons: dunkel, nicht grün */
  --btn-hover: #0f1620;
  --maxw: 68rem;              /* ~1088px zentrierte Inhaltsspalte */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.nav, .content, .footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

/* Kopfzeile: Wortschriftzug links, Navigation rechts. */
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
  border-bottom: 1px solid var(--border);
}
.brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand);   /* einziger grüner Akzent */
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.nav-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.75rem; }
.nav-links a, .nav-links .linkbtn {
  display: inline-block;
  padding: 0.5rem 0;     /* touch-freundliche Höhe */
  color: var(--text);
  text-decoration: underline;
}

.content { padding-top: 1.5rem; padding-bottom: 2.5rem; }

/* Überschriften: serifenlos (System-Sans), kräftig. */
h1, h2, h3 { font-family: var(--sans); color: var(--text); line-height: 1.25; }
h1 { font-size: 1.8rem; margin: 0 0 1rem; }
h2 { font-size: 1.3rem; margin: 1.75rem 0 0.6rem; }
h3 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }

p { margin: 0.6rem 0; }

/* Links: schwarz + unterstrichen (kein Grün). */
a { color: var(--text); text-decoration: underline; }
a:hover { color: #000; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* „Abmelden" als link-artiger Button. */
form.inline { display: inline; margin: 0; }
.linkbtn {
  background: none; border: none; font: inherit; cursor: pointer;
  color: var(--text); text-decoration: underline;
}

/* Flash-Meldungen — neutral. */
.flash {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--row-highlight);
  border: 1px solid var(--border);
  border-left: 4px solid var(--muted);
  border-radius: 4px;
}
.flash li { margin: 0; }

/* Formulare. */
label { display: block; margin: 1rem 0 0.3rem; font-weight: 600; }
input[type="email"], input[type="text"], input[type="url"],
input[type="number"], input[type="datetime-local"], input[type="date"], textarea {
  width: 100%;
  max-width: 28rem;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  color: var(--text);
  background: #fff;
}
textarea { max-width: 36rem; }
label.checkbox { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; margin-top: 1rem; }
label.checkbox input { width: auto; }

.content button[type="submit"] {
  margin-top: 1.25rem;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  background: var(--btn);
  color: #fff;
  border: none;
  border-radius: 4px;
  font: inherit;
  cursor: pointer;
}
.content button[type="submit"]:hover { background: var(--btn-hover); }

/* Tabellen — schlicht: dünne horizontale Linien, klare Kopfzeile. */
.qtable { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.5rem; }
.qtable th, .qtable td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.qtable thead th {
  border-bottom: 2px solid var(--border);
  font-weight: 700;
  color: var(--muted);
}
/* Eigene Ranglisten-Zeile: neutrales Hellgrau (kein Grün). */
.qtable tr.me { background: var(--row-highlight); }
.me-tag { color: var(--muted); font-size: 0.9rem; }

/* Aufklapp-Button: am Desktop unsichtbar (alle Spalten sichtbar), auf Schmal-Viewports
   nur mit aktivem JS (sonst kein toter Button). */
.row-toggle {
  display: none;
  margin-right: 0.5rem;
  min-width: 1.9rem;
  min-height: 1.9rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.meta { color: var(--muted); font-size: 0.95rem; }
.desc { white-space: pre-wrap; }

/* Anonyme Begründungsliste. */
.rationales { list-style: none; padding: 0; }
.rationales li {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 0.5rem 0;
}

/* Amtlicher Wert nach Auflösung — neutrale Hervorhebung. */
.resolved {
  padding: 0.7rem 1rem;
  background: var(--row-highlight);
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* Abgesetzter „Konto löschen"-Bereich (optisch vom Rest getrennt). */
.danger-zone {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid #d99;
  border-radius: 4px;
  background: #fbf3f3;
}
.danger-zone h2 { margin-top: 0; }

/* Footer dezent. */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer a { margin-right: 1rem; color: var(--text); }

/* --- Schmale Viewports: sekundäre Spalten ausblenden, Zeile aufklappbar --- */
@media (max-width: 640px) {
  /* Kopfzeile weg; sekundäre Felder tragen ihr Label via data-label/::before. */
  .qtable thead { display: none; }
  .qtable, .qtable tbody { display: block; }
  .qtable tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.1rem 0.6rem;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0.25rem;
  }
  .qtable td { border: none; padding: 0; }

  /* Sekundäre Spalten standardmäßig ausgeblendet — ganz ohne JS (Tabelle passt in den Viewport). */
  .qtable td.sec { display: none; }

  /* Aufgeklappte Zeile: sekundäre Felder als „Beschriftung: Wert" (volle Breite). */
  .qtable tr.expanded td.sec {
    display: block;
    flex-basis: 100%;
    padding: 0.1rem 0 0.1rem 2.4rem;
  }
  .qtable tr.expanded td.sec::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--muted);
  }

  /* Toggle nur mit aktivem JS sichtbar. */
  html.js .qtable .row-toggle { display: inline-block; }
}
