/* ============================================================
   unterseiten.css – ausloeschung.spirgi.com
   Stand: 24. Oktober 2026 · v=23
   Dark Mode · Serifenschrift · Mobile-Tauglichkeit
   KEIN Spaltenlayout, KEINE Navigation, KEINE Breakpoints
   ============================================================ */

/* ---------- 1. Farben ---------- */
:root {
  color-scheme: light dark;

  --bg:         #ffffff;
  --fg:         #1a1a1a;
  --heading:    #111111;
  --link:       #0645ad;
  --link-hover: #a00000;
  --rule:       #dddddd;
  --faint:      #666666;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #141414;
    --fg:         #d6d6d6;
    --heading:    #f2f2f2;
    --link:       #8ab4f8;
    --link-hover: #ff9b9b;
    --rule:       #333333;
    --faint:      #9a9a9a;
  }
}

[data-theme="dark"] {
  --bg: #141414; --fg: #d6d6d6; --heading: #f2f2f2;
  --link: #8ab4f8; --link-hover: #ff9b9b; --rule: #333333; --faint: #9a9a9a;
}
[data-theme="light"] {
  --bg: #ffffff; --fg: #1a1a1a; --heading: #111111;
  --link: #0645ad; --link-hover: #a00000; --rule: #dddddd; --faint: #666666;
}

/* ---------- 2. Grundschrift ---------- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;

  background-color: var(--bg) !important;
  background-image: none !important;
}

body {
  background-color: var(--bg) !important;
  background-image: none !important;
  color: var(--fg);

  /* Serifenschrift: Windows, macOS, Linux, Android */
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype",
               "Book Antiqua", "Liberation Serif", "DejaVu Serif",
               "Noto Serif", "Source Serif 4", Times, serif;

  /* 22–26 px – identisch mit der Startseite */
  font-size: clamp(1.375rem, 1.1rem + 0.75vw, 1.625rem);
  line-height: 1.7;

  overflow-wrap: break-word;
  hyphens: auto;
}

/* ---------- 3. Altlasten: alle alten Hintergründe aus ---------- */
body table,
body thead, body tbody, body tfoot,
body tr,
body td, body th,
body div,
body p,
body span,
body font,
body center,
body blockquote,
body li,
body dl, body dt, body dd {
  background-color: transparent !important;
  background-image: none !important;
}

/* ---------- 4. Alte Textfarben und Schriftarten aus ---------- */
body font,
body font[color],
body td[style*="color"],
body font[style*="color"],
body p[style*="color"],
body span[style*="color"],
body div[style*="color"] {
  color: inherit !important;
}

/* alte Schriftgrössen-Attribute aus */
body font,
body font[size],
body small {
  font-family: inherit;
  font-size: 1em;
}

/* Inline-Schriftarten und face="…" ausschalten */
body [style*="font-family"],
body [face] {
  font-family: inherit !important;
}

/* alte Grössen in Inline-Styles ausschalten */
body [style*="font-size"] {
  font-size: inherit !important;
}

/* ---------- 5. Text-Elemente ---------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  font-family: inherit;
  overflow-wrap: break-word;
}

a                { color: var(--link); }
a:visited        { color: var(--link); }   /* überschreibt vlink="…" */
a:hover, a:focus { color: var(--link-hover); }

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  background: transparent;
  color: var(--rule);
}

/* Fussnotenzeile: kleiner als der Fliesstext, gut lesbar */
p small,
p font[size="1"],
p font[size="2"] {
  font-size: 0.9em;
  color: var(--faint);
}

/* ---------- 6. Tabellen ---------- */
table[border]      { border-color: var(--rule); }
table[border] td,
table[border] th   { border-color: var(--rule); }

/* ---------- 7. Bilder: unverändert, kein Filter ---------- */
img {
  max-width: 100%;
  height: auto;
  background: transparent;
}

/* ---------- 8. Mobile: kein Überlauf (Chrome/Android) ----------
   Wirkt nur mit <meta name="viewport" content="width=device-width, initial-scale=1">.
   Wer diesen Abschnitt nicht will, kann ihn komplett löschen. */

html, body {
  max-width: 100%;
  overflow-x: auto;
}

table {
  max-width: 100%;
}

/* feste Pixelbreiten aus 1999 ausser Kraft setzen */
table[width],
td[width],
th[width],
img[width] {
  width: auto !important;
  max-width: 100%;
}

/* Zellen dürfen schrumpfen statt die Seite zu sprengen */
td, th {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Werkverzeichnis: Tabelle auf schmalen Geräten scrollbar halten */
.tabelle-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------- 9. Druck ---------- */
@media print {
  html, body {
    background: #fff !important;
    color: #000 !important;
  }
  a { color: #000 !important; text-decoration: underline; }
}
