/* Eiseninfo – Stylesheet */
:root {
  --ink: #1b2633;
  --muted: #5a6573;
  --line: #d9dee4;
  --paper: #ffffff;
  --wash: #f2f4f6;
  --hb: #a3262a;          /* Hämoglobin-Rot */
  --hb-dark: #7e1b1f;
  --hb-wash: #f8eceb;
  --steel: #2c5272;       /* Stahlblau */
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  --measure: 44rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; }
a { color: var(--steel); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--hb); }
:focus-visible { outline: 3px solid var(--hb); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 10; font-family: var(--sans); }
.skip:focus { left: 1rem; }

/* ---------- Kopfzeile ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner {
  max-width: 76rem; margin: 0 auto; padding: .9rem 1.5rem;
  display: flex; align-items: center; gap: 2rem; font-family: var(--sans);
}
.brand { display: flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand-name { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; }

/* Periodensystem-Kachel */
.fe {
  position: relative; display: inline-grid; place-items: center;
  width: 2.75rem; height: 2.75rem; border: 2px solid var(--hb); border-radius: 3px;
  color: var(--hb); font-family: var(--sans); font-weight: 700; font-size: 1.25rem; line-height: 1;
  background: var(--paper);
}
.fe .z { position: absolute; top: 3px; left: 4px; font-size: .55rem; font-weight: 600; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.main-nav a { color: var(--ink); text-decoration: none; font-size: .975rem; padding: .35rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--hb); }
.main-nav a[aria-current] { border-bottom-color: var(--hb); }
.menu-toggle { display: none; }
.main-nav .pending { color: #98a1ab; font-size: .975rem; }

/* ---------- Seitenaufbau ---------- */
.layout {
  max-width: 76rem; margin: 0 auto; padding: 2.5rem 1.5rem 4rem;
  display: grid; grid-template-columns: 15.5rem minmax(0, var(--measure)); gap: 3.5rem;
}
.layout.single { grid-template-columns: minmax(0, 1fr); }

/* Kapitelnavigation */
.chapter { font-family: var(--sans); font-size: .925rem; line-height: 1.4; }
.chapter-inner { position: sticky; top: 1.5rem; }
.chapter summary { list-style: none; cursor: default; }
.chapter summary::-webkit-details-marker { display: none; }
.chapter-title { display: block; font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; padding-bottom: .6rem; border-bottom: 2px solid var(--hb); margin-bottom: .6rem; }
.chapter h2 { font-size: .8rem; font-weight: 600; color: var(--muted); margin: 1.1rem 0 .3rem; letter-spacing: .01em; }
.chapter ul { list-style: none; margin: 0; padding: 0; }
.chapter li a { display: block; padding: .32rem 0 .32rem .75rem; color: var(--ink); text-decoration: none; border-left: 2px solid var(--line); }
.chapter li a:hover { color: var(--hb); border-left-color: var(--hb); }
.chapter li a[aria-current] { font-weight: 700; color: var(--hb); border-left: 3px solid var(--hb); padding-left: calc(.75rem - 1px); }
.chapter .pending { display: block; padding: .32rem 0 .32rem .75rem; color: #98a1ab; border-left: 2px solid var(--line); }

/* ---------- Artikel ---------- */
.breadcrumb { font-family: var(--sans); font-size: .85rem; color: var(--muted); margin: 0 0 .75rem; }
.breadcrumb a { color: var(--muted); }
article h1, article h2, article h3 { font-family: var(--sans); line-height: 1.25; color: var(--ink); }
article h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.75rem); letter-spacing: -.02em; margin: 0 0 1.5rem; font-weight: 700; }
article h2 { font-size: 1.35rem; margin: 2.6rem 0 .6rem; font-weight: 700; letter-spacing: -.005em; }
article h3 { font-size: 1.1rem; margin: 2rem 0 .4rem; font-weight: 600; }
article p { margin: 0 0 1.05rem; }
article ul, article ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
article li { margin: .2rem 0; }
article li::marker { color: var(--hb); }
.hl { color: var(--steel); }
.alert { color: var(--hb); }
.center { text-align: center; }

figure { margin: 2rem 0; }
figure img { display: block; }
figure.wide { margin-right: calc(-1 * min(8rem, (100vw - 100%) / 2 - 1.5rem)); }
figcaption { font-family: var(--sans); font-size: .85rem; line-height: 1.5; color: var(--muted); margin-top: .6rem; max-width: 36rem; }

.table-wrap { overflow-x: auto; margin: 1.5rem 0 2rem; }
table { border-collapse: collapse; font-family: var(--sans); font-size: .9rem; line-height: 1.45; min-width: 60%; }
th, td { text-align: left; vertical-align: top; padding: .5rem .9rem .5rem 0; border-bottom: 1px solid var(--line); }
th { border-bottom: 2px solid var(--ink); font-weight: 600; }

ol.refs, ul.refs { font-family: var(--sans); font-size: .85rem; line-height: 1.5; color: var(--muted); padding-left: 2.4rem; margin: 0 0 1.2rem; }
ol.refs li, ul.refs li { margin: .35rem 0; padding-left: .15rem; }
ol.refs li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
ul.refs.plain { list-style: none; padding-left: 1.6rem; }
ul.refs.plain li { text-indent: -1.6rem; }

/* Zurück / Weiter */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 3.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-family: var(--sans); }
.pager a { text-decoration: none; color: var(--ink); display: block; }
.pager a:hover .t { color: var(--hb); }
.pager .l { display: block; font-size: .8rem; color: var(--muted); }
.pager .t { font-weight: 600; }
.pager .next { text-align: right; grid-column: 2; }

/* Hinweis-Box */
.notice { font-family: var(--sans); background: var(--hb-wash); border-left: 4px solid var(--hb); padding: .9rem 1.2rem; margin: 0 0 2.5rem; color: var(--hb-dark); font-weight: 600; }

/* ---------- Startseite ---------- */
.home { max-width: 76rem; margin: 0 auto; padding: 0 1.5rem 4rem; }
.hero { display: grid; justify-content: start; grid-template-columns: auto minmax(0, 42rem); gap: 3.5rem; align-items: center; padding: 4rem 0 3rem; }
.element {
  position: relative; width: 13rem; aspect-ratio: 1; border: 4px solid var(--hb); border-radius: 6px;
  display: grid; place-items: center; color: var(--hb); font-family: var(--sans);
}
.element .z { position: absolute; top: .8rem; left: 1rem; font-size: 1.35rem; font-weight: 600; }
.element .m { position: absolute; top: .9rem; right: 1rem; font-size: .9rem; color: var(--muted); }
.element .s { font-size: 6.5rem; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.element .n { position: absolute; bottom: .9rem; width: 100%; text-align: center; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.hero h1 { font-family: var(--sans); font-size: clamp(2.1rem, 1.3rem + 3vw, 3.4rem); line-height: 1.1; letter-spacing: -.025em; margin: 0 0 1.25rem; }
.hero p { font-size: 1.2rem; line-height: 1.6; margin: 0; }

.topics { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 1rem 0 3rem; }
.topic { padding: 2.25rem 2.5rem 2.25rem 0; display: grid; grid-template-columns: minmax(0, 1fr) 10.5rem; gap: 1.5rem; align-items: start; }
.topic + .topic { padding: 2.25rem 0 2.25rem 2.5rem; border-left: 1px solid var(--line); }
.topic h2 { font-family: var(--sans); font-size: 1.5rem; margin: 0 0 .6rem; color: var(--hb); }
.topic p { margin: 0 0 1rem; }
.topic figure { margin: 0; }
.topic figure img { border-radius: 3px; }
.topic figcaption { font-size: .8rem; }
.more { font-family: var(--sans); font-weight: 600; }

.about { display: grid; grid-template-columns: minmax(0, var(--measure)) 19rem; gap: 3rem; align-items: center; margin: 0 0 3.5rem; }
.about p { font-size: 1.1rem; margin: 0; }
.portrait { margin: 0; display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; align-items: end; }
.portrait img { width: 100%; border-radius: 3px; }
.portrait figcaption { font-size: .85rem; line-height: 1.45; color: var(--muted); margin: 0; }
.portrait figcaption strong { color: var(--ink); font-weight: 600; }

.toc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; font-family: var(--sans); margin: 0 0 4rem; }
.toc-head { font-family: var(--sans); font-size: 1.6rem; margin: 0 0 1.5rem; }
.toc section h3 { font-size: 1.1rem; margin: 0 0 .25rem; }
.toc section h3 a { color: var(--ink); text-decoration: none; }
.toc section h3 a:hover { color: var(--hb); }
.toc section > p { font-size: .875rem; color: var(--muted); margin: 0 0 .8rem; line-height: 1.45; }
.toc ul { list-style: none; padding: 0; margin: 0; font-size: .9rem; line-height: 1.4; }
.toc li { padding: .3rem 0; border-top: 1px solid var(--line); }
.toc li a { color: var(--ink); text-decoration: none; }
.toc li a:hover { color: var(--hb); text-decoration: underline; }
.toc .grp { font-size: .78rem; color: var(--muted); padding-top: .7rem; border-top: 0; }
.toc .pending { color: #98a1ab; }

.diagrams { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; margin: 0 0 .5rem; }
.diagrams figure { margin: 0; }
.diagrams figcaption { font-weight: 600; color: var(--ink); }
.source { font-family: var(--sans); font-size: .85rem; color: var(--muted); margin: 1rem 0 3.5rem; }

/* ---------- Fußzeile ---------- */
.site-footer { background: var(--wash); border-top: 1px solid var(--line); font-family: var(--sans); font-size: .875rem; color: var(--muted); }
.footer-inner { max-width: 76rem; margin: 0 auto; padding: 2rem 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem 3rem; justify-content: space-between; }
.footer-inner p { margin: 0; max-width: 40rem; line-height: 1.55; }
.footer-inner ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.footer-inner a { color: var(--ink); }

/* ---------- Mobil ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-top: 1.25rem; }
  .chapter-inner { position: static; }
  .chapter details { border: 1px solid var(--line); border-radius: 4px; padding: .7rem 1rem; }
  .chapter summary { cursor: pointer; font-weight: 600; }
  .chapter summary::after { content: " ▾"; color: var(--hb); }
  .chapter details[open] summary::after { content: " ▴"; }
  .chapter-title { border-bottom: 0; padding: 0; margin: 0; display: inline; }
  figure.wide { margin-right: 0; }
  .toc { grid-template-columns: 1fr 1fr; }
  .topics { grid-template-columns: 1fr; }
  .topic, .topic + .topic { padding: 2rem 0; border-left: 0; }
  .topic + .topic { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  body { font-size: 1.0rem; }
  .js .menu-toggle {
    display: inline-flex; align-items: center; gap: .4rem; font: 600 .95rem var(--sans);
    background: none; border: 1px solid var(--line); border-radius: 4px; padding: .45rem .8rem; color: var(--ink); cursor: pointer;
  }
  .header-inner { flex-wrap: wrap; gap: .75rem; }
  .js .main-nav { display: none; width: 100%; }
  .js .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li a { display: block; padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .main-nav a[aria-current] { color: var(--hb); border-bottom-color: var(--line); font-weight: 700; }
  .hero { grid-template-columns: 1fr; gap: 2rem; padding: 2.25rem 0 2rem; }
  .element { width: 9.5rem; }
  .element .s { font-size: 4.5rem; }
  .element .z { font-size: 1rem; top: .55rem; left: .7rem; }
  .element .m { font-size: .7rem; top: .65rem; right: .7rem; }
  .element .n { font-size: .85rem; bottom: .6rem; }
  .hero p { font-size: 1.1rem; }
  .topic { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 1.5rem; }
  .portrait { max-width: 22rem; }
  .topic figure { max-width: 14rem; }
  .toc, .diagrams { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
}
@media print {
  .site-header nav, .chapter, .pager, .menu-toggle { display: none; }
.main-nav .pending { color: #98a1ab; font-size: .975rem; }
  .layout { display: block; padding: 0; }
  a { color: inherit; }
}

/* ---------- Rechtstexte ---------- */
.legal { max-width: var(--measure); }
.legal .lead { font-size: 1.15rem; }
.legal .address { font-family: var(--sans); font-size: .975rem; line-height: 1.6; }
.legal .medical { background: var(--hb-wash); border-left: 4px solid var(--hb); padding: 1.25rem 1.5rem .5rem; margin: 2.5rem 0; }
.legal .medical h2 { margin-top: 0; color: var(--hb-dark); }
.legal .todo { background: #fff3bf; outline: 1px dashed #b08900; padding: 0 .2em; font-family: var(--sans); font-size: .95em; }
.legal .stand { font-family: var(--sans); font-size: .875rem; color: var(--muted); margin-top: 2.5rem; }
sup.cite { font-family: var(--sans); font-size: .68em; line-height: 0; margin-left: .05em; }
sup.cite a { text-decoration: none; color: var(--steel); }
sup.cite a:hover { text-decoration: underline; color: var(--hb); }
ol.refs li:target { background: #fff3bf; }
.footer-inner ul { flex-wrap: wrap; }
figure.table { margin: 2rem 0; }
figure.table figcaption { margin: 0 0 .6rem; color: var(--ink); }
figure.table .table-wrap { margin: 0; }
tr.group td { font-weight: 600; padding-top: .9rem; border-bottom: 1px solid var(--line); }
td.sub { padding-left: 1.1rem; }
ul.cell { list-style: none; padding: 0; margin: 0; }
ul.cell li { margin: .15rem 0; }
ul.cell ul { list-style: none; padding-left: 1rem; margin: .1rem 0; }
table.num td:not(:first-child), table.num th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
table.num td:last-child { text-align: left; }
.todo-cell { background: #fff3bf; font-style: italic; }
th small { font-weight: 400; color: var(--muted); }
p.refs { font-family: var(--sans); font-size: .85rem; line-height: 1.5; color: var(--muted); }
.about + .notice { margin-top: -1.5rem; margin-bottom: 3.5rem; }
.source a { color: var(--steel); } .source cite { font-style: normal; }

/* Keine automatische Silbentrennung; sehr lange Wörter dürfen nur im Notfall umbrechen */
body { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: break-word; }

/* Kontaktangaben: kurzer Pop, wenn man über "Kontakt" hierher springt */
@keyframes kontakt-pop {
  0%   { transform: scale(1); }
  28%  { transform: scale(1.22); }
  52%  { transform: scale(0.97); }
  74%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.legal h2#kontakt:target, .legal h2#kontakt:target + .address,
.legal h2#kontakt.pop, .legal h2#kontakt.pop + .address {
  animation: kontakt-pop .75s cubic-bezier(.34, 1.4, .64, 1) both;
  transform-origin: left center;
}
.legal h2#kontakt:target + .address,
.legal h2#kontakt.pop + .address { animation-delay: .1s; }
.legal h2#kontakt { scroll-margin-top: 1.75rem; }
@media (prefers-reduced-motion: reduce) {
  .legal h2#kontakt:target, .legal h2#kontakt:target + .address,
  .legal h2#kontakt.pop, .legal h2#kontakt.pop + .address { animation: none; }
}
