/* hilmarsimon.engineering — nüchternes Ingenieur-Layout, ohne externe Ressourcen */

:root {
  --bg:        #f6f7f5;
  --flaeche:   #ffffff;
  --text:      #16211f;
  --text-leise:#5a6764;
  --linie:     #d9ded9;
  --akzent:    #1f5f4e;
  --akzent-hell:#e7f0ec;
  --warn-bg:   #fff6e5;
  --warn-li:   #e0b94b;
  --radius:    4px;
  --maxw:      68rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #101413;
    --flaeche:   #171d1c;
    --text:      #e6ebe9;
    --text-leise:#9aa8a4;
    --linie:     #2a3331;
    --akzent:    #6fc0a5;
    --akzent-hell:#1b2a26;
    --warn-bg:   #2a2415;
    --warn-li:   #8a7327;
  }
}
:root[data-theme="dark"] {
  --bg:#101413; --flaeche:#171d1c; --text:#e6ebe9; --text-leise:#9aa8a4;
  --linie:#2a3331; --akzent:#6fc0a5; --akzent-hell:#1b2a26;
  --warn-bg:#2a2415; --warn-li:#8a7327;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.62 ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "kern" 1;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--akzent);
  color: #fff; padding: .6rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

/* ---------- Kopf ---------- */
.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopf-inner {
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  align-items: baseline; justify-content: space-between; padding-top: 1rem; padding-bottom: 1rem;
}
.marke { text-decoration: none; color: inherit; display: block; }
.marke-name { display: block; font-size: 1.15rem; font-weight: 650; letter-spacing: .01em; }
.marke-zusatz { display: block; font-size: .82rem; color: var(--text-leise); }
.nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.nav a {
  color: var(--text-leise); text-decoration: none; font-size: .92rem;
  padding-bottom: 2px; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--akzent); }

/* ---------- Abschnitte ---------- */
section { padding: 3rem 0; border-bottom: 1px solid var(--linie); }
section:last-of-type { border-bottom: 0; }
section.hell { background: var(--flaeche); }

h1 { font-size: 1.85rem; line-height: 1.25; margin: 0 0 1rem; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; margin: 0 0 .9rem; letter-spacing: -.005em; }
h3 { font-size: 1.02rem; margin: 0 0 .4rem; }
p  { margin: 0 0 1rem; max-width: 62ch; }
ul, ol { max-width: 62ch; padding-left: 1.15rem; }
li { margin-bottom: .4rem; }
a { color: var(--akzent); }

.lead { font-size: 1.08rem; color: var(--text); max-width: 58ch; }
.klein { font-size: .88rem; color: var(--text-leise); }
.augbraue {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-leise); margin: 0 0 .5rem;
}

/* ---------- Raster ---------- */
.raster { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.karte {
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: 1.25rem;
}
section.hell .karte { background: var(--bg); }
.karte p:last-child, .karte ul:last-child { margin-bottom: 0; }

/* ---------- Tabelle / Referenzen ---------- */
.zeitleiste { border-top: 1px solid var(--linie); margin-top: 1.5rem; }
.eintrag {
  display: grid; grid-template-columns: 10rem 1fr; gap: 0 1.5rem;
  padding: 1.25rem 0; border-bottom: 1px solid var(--linie);
}
.eintrag .jahr { font-variant-numeric: tabular-nums; color: var(--text-leise); font-size: .92rem; }
.eintrag p:last-child { margin-bottom: 0; }

table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { font-weight: 600; color: var(--text-leise); font-size: .84rem; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Formular ---------- */
form { max-width: 40rem; }
.feld { margin-bottom: 1.1rem; }
label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .3rem; }
input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%; padding: .6rem .7rem; font: inherit; font-size: .95rem;
  color: var(--text); background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: var(--radius);
}
textarea { min-height: 9rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
.hp { position: absolute; left: -9999px; }

button, .knopf {
  display: inline-block; font: inherit; font-weight: 600; font-size: .95rem;
  padding: .65rem 1.4rem; border: 1px solid var(--akzent); border-radius: var(--radius);
  background: var(--akzent); color: #fff; cursor: pointer; text-decoration: none;
}
button:hover, .knopf:hover { filter: brightness(1.08); }
.knopf.sekundaer { background: transparent; color: var(--akzent); }

.hinweis {
  border-left: 3px solid var(--akzent); background: var(--akzent-hell);
  padding: .9rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 1.5rem;
  max-width: 62ch;
}
.hinweis.fehler { border-left-color: #b4452f; background: #fdeeea; color: #5d1d10; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hinweis.fehler { background: #2c1712; color: #f3cfc6; }
}
.todo {
  border-left: 3px solid var(--warn-li); background: var(--warn-bg);
  padding: .8rem 1rem; font-size: .88rem; margin: 0 0 1.25rem; max-width: 62ch;
}

/* ---------- Fuß ---------- */
.fuss { background: var(--flaeche); border-top: 1px solid var(--linie); margin-top: 0; }
.fuss-inner {
  display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  padding-top: 2.25rem; padding-bottom: 1.5rem; font-size: .9rem;
}
.fuss-block a { color: var(--text-leise); text-decoration: none; }
.fuss-block a:hover { color: var(--akzent); text-decoration: underline; }
.fuss-zeile {
  border-top: 1px solid var(--linie); padding-top: 1rem; padding-bottom: 1.5rem;
  font-size: .82rem; color: var(--text-leise);
}

@media (max-width: 40rem) {
  .eintrag { grid-template-columns: 1fr; gap: .25rem; }
  h1 { font-size: 1.5rem; }
  section { padding: 2.25rem 0; }
}
