/* bmiberechnen-ratgeber.de · R10 v2-enhanced lineage, local candidate.
   Near-black frame, off-white field, acid-lime accent, ruled data register. */

:root {
  --ink: #0c110f;
  --panel: #151c18;
  --panel-alt: #101513;
  --paper: #f3f1e8;
  --muted: #b9c0b8;
  --rule: #39433d;
  --rule-strong: #59655c;
  --accent: #b7ff5a;
  --danger: #ffb6a3;
  --shell: min(100% - 2rem, 78rem);
}

* { box-sizing: border-box; }
input, button, select { font: inherit; }

html { background: var(--ink); -webkit-text-size-adjust: 100%; }

body.page {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  line-height: 1.65;
  min-width: 0;
}

h1, h2, h3, h4, p, li, td, th, figcaption { overflow-wrap: break-word; }
h1, h2, h3, h4, p, ol, ul, table, figure { margin-top: 0; }
main, section, article, div, nav, ul, table { min-width: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: 0.5rem; top: 0.5rem; z-index: 20;
  transform: translateY(-300%);
  background: var(--accent); color: var(--ink);
  padding: 0.6rem 1rem; text-decoration: none; font-weight: 700;
}
.skip:focus { transform: none; }

.mono, .panel-label, .masthead, .field label, .calc-privacy, .footer, .calc-result .res-class, .src-url {
  font-family: Consolas, "Courier New", monospace;
  letter-spacing: 0.02em;
}

/* masthead */
.masthead {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  padding: 1rem calc((100% - var(--shell)) / 2);
  font-size: 0.82rem;
}
.masthead-brand { margin: 0; font-weight: 700; color: var(--paper); }
.masthead-brand::after { content: ""; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; }
.nav-link { color: var(--muted); text-decoration: none; padding: 0.15rem 0; }
.nav-link:hover, .nav-link:focus-visible { color: var(--accent); }
.menu-toggle { display: none; }

/* hero grid */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 0;
  align-items: stretch;
  border-bottom: 1px solid var(--rule);
}
.hero-copy {
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 3vw, 3rem);
  border-right: 1px solid var(--rule);
  min-width: 0;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 1.1rem;
  max-width: 18ch;
}
.lede { font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--muted); max-width: 46ch; }
.action {
  display: inline-block;
  margin-top: 1.4rem;
  background: var(--accent); color: var(--ink);
  padding: 0.8rem 1.6rem;
  font-weight: 700; text-decoration: none;
  border: 1px solid var(--accent);
}
.action-secondary { background: transparent; color: var(--accent); }
.action:hover { filter: brightness(1.05); }
.hero-figure { margin: 2.2rem 0 0; }
.hero-figure img { border: 1px solid var(--rule); }
.hero-figure figcaption {
  margin-top: 0.6rem; font-size: 0.78rem; color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
}

/* calculator panel */
.calc-panel {
  background: var(--panel);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: flex; flex-direction: column; gap: 1.25rem;
  min-width: 0;
}
.panel-label {
  font-size: 0.85rem; text-transform: uppercase;
  color: var(--accent); margin: 0;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.8rem;
}
.calc-form { display: grid; gap: 1rem; }
.field label {
  display: block; font-size: 0.78rem; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.4rem;
}
.field input {
  width: 100%;
  background: var(--panel-alt);
  border: 1px solid var(--rule-strong);
  color: var(--paper);
  padding: 0.7rem 0.8rem;
  font-family: Consolas, "Courier New", monospace;
  font-size: 1.15rem;
}
.field input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field .field-error { color: var(--danger); font-size: 0.85rem; margin: 0.35rem 0 0; }
.calc-submit {
  background: var(--accent); color: var(--ink);
  border: 1px solid var(--accent);
  font-weight: 700; padding: 0.85rem 1.5rem;
  cursor: pointer; width: 100%;
}
.calc-submit:hover { filter: brightness(1.05); }
.calc-result { min-height: 1rem; }
.calc-result .res-value {
  font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1;
  font-weight: 800; margin: 0;
}
.calc-result .res-class {
  display: block; margin-top: 0.5rem; color: var(--accent); font-size: 0.9rem;
  text-transform: uppercase;
}
.calc-result .res-error { color: var(--danger); margin: 0; }
.calc-result .res-note { color: var(--muted); font-size: 0.85rem; margin: 0.6rem 0 0; }
.calc-privacy {
  font-size: 0.75rem; color: var(--muted);
  border-top: 1px solid var(--rule); padding-top: 0.9rem;
}
.calc-nojs { border-top: 1px solid var(--rule); padding-top: 1rem; }
.calc-nojs h3 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.calc-nojs p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.js .calc-nojs h3 { display: none; }
.js .calc-nojs p { display: none; }
.js .calc-nojs::before {
  content: "Rechner aktiv. Ergebnisse erscheinen direkt oberhalb.";
  display: block; color: var(--muted); font-size: 0.75rem;
  font-family: Consolas, "Courier New", monospace;
}
.no-js .calc-form, .no-js .calc-submit { display: none; }

/* content register */
.content {
  padding: clamp(2.5rem, 5vw, 5rem) clamp(1rem, 3vw, 3rem) clamp(2rem, 4vw, 4rem);
  max-width: 76ch;
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
}
.content h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.2;
  margin: 2.8rem 0 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.6rem;
}
.content h2:first-child { margin-top: 0; }
.content h3 { font-size: 1.1rem; margin: 1.8rem 0 0.6rem; }
.content p { margin: 0 0 1rem; max-width: 72ch; }
.content table {
  border-collapse: collapse; width: 100%;
  margin: 1.2rem 0; font-size: 0.95rem;
}
.content th, .content td {
  border: 1px solid var(--rule-strong);
  padding: 0.55rem 0.7rem; text-align: left;
}
.content th { background: var(--panel); font-family: Consolas, "Courier New", monospace; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; }
.src-url { font-size: 0.8rem; color: var(--muted); word-break: break-all; }

/* context band */
.context-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1rem, 3vw, 3rem);
  border-bottom: 1px solid var(--rule);
}
.context-band h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 0 0 0.8rem; }
.context-band p { color: var(--muted); margin: 0 0 1.2rem; }
.context-figure img { border: 1px solid var(--rule); }

/* footer */
.footer {
  padding: 1.6rem clamp(1rem, 3vw, 3rem) 2.5rem;
  color: var(--muted); font-size: 0.78rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between;
}
.footer p { margin: 0; }

/* responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { border-right: none; border-bottom: 1px solid var(--rule); }
  .context-band { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .menu-toggle {
    display: inline-block;
    background: transparent; color: var(--paper);
    border: 1px solid var(--rule-strong);
    padding: 0.45rem 0.9rem; cursor: pointer;
    margin-left: auto;
    font-family: Consolas, "Courier New", monospace; font-size: 0.8rem;
  }
  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column; gap: 0.4rem;
    padding-top: 0.6rem;
  }
  .site-nav.open { display: flex; }
  .masthead { align-items: center; }
  .js .menu-toggle { display: inline-block; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
