/* Saldura – Stylesheet
   Marke: Ink #0D0D0D, Paper #FBFBFA, Gold #96762F
   Schrift: Archivo (variabel, Breitenachse), IBM Plex Mono für Ziffern
   Alle Schriften lokal – keine externen Abrufe. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-var.woff2") format("woff2-variations"),
       url("/assets/fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0D0D0D;
  --ink-2: #141412;
  --ink-3: #1D1C19;
  --paper: #FBFBFA;
  --paper-2: #EEEDE8;
  --text: #FBFBFA;
  --muted: #A6A69E;
  --faint: #74746D;
  --rule: rgba(251, 251, 250, 0.08);
  --rule-2: rgba(251, 251, 250, 0.17);
  --gold: #96762F;
  --gold-hi: #C9A253;
  --gold-glow: rgba(201, 162, 83, 0.32);
  --ink-on-paper: #0D0D0D;
  --muted-on-paper: #5E5E57;
  --rule-on-paper: #DAD9D3;

  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Spaltenraster im Hintergrund – das „Messinstrument“ der Seite */
body::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 50%;
  transform: translateX(-50%);
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to left, var(--rule) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%, 100% 100%;
  background-repeat: repeat-x, no-repeat;
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
}

main { flex: 1 0 auto; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

p { margin: 0 0 1em; max-width: 64ch; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

::selection { background: var(--gold-hi); color: var(--ink); }

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

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--gold-hi);
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 600;
  z-index: 100;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Typografie ---------- */

.display {
  font-size: clamp(2.6rem, 6.2vw, 5.4rem);
  font-stretch: 122%;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.title {
  font-size: clamp(1.95rem, 3.8vw, 3.15rem);
  font-stretch: 116%;
  line-height: 1.03;
  letter-spacing: -0.022em;
}

.subtitle {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-stretch: 110%;
  line-height: 1.15;
}

h3 {
  font-size: 1.22rem;
  font-stretch: 108%;
  line-height: 1.25;
}

.lead {
  font-size: clamp(1.1rem, 1.55vw, 1.28rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 54ch;
}

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 28px;
}
.status-line::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--gold-hi);
  box-shadow: 0 0 0 4px rgba(201, 162, 83, 0.16);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  font: 600 1rem/1 var(--sans);
  font-stretch: 106%;
  padding: 1.05em 1.5em;
  border-radius: 2px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--gold-hi); color: var(--ink); }
.btn-primary:hover { background: var(--paper); }
.btn-ghost { border-color: var(--rule-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--paper); }
.btn-sm { padding: 0.8em 1.1em; font-size: 0.93rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.text-link {
  color: var(--gold-hi);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.text-link:hover { color: var(--paper); }

/* ---------- Kopfzeile ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 13, 13, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--paper);
}
.brand svg { width: 34px; height: auto; }
.brand-word {
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.015em;
  line-height: 1;
}

.nav { display: flex; align-items: center; gap: 36px; }
.nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 28px;
}
.nav ul a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.97rem;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav ul a:hover { color: var(--paper); }
.nav ul a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--gold-hi); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule-2);
  color: var(--paper);
  font: 500 0.95rem/1 var(--sans);
  padding: 10px 14px;
  border-radius: 2px;
  cursor: pointer;
  align-items: center;
  gap: 10px;
}
.nav-toggle-bars { display: inline-grid; gap: 4px; }
.nav-toggle-bars span { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform 0.2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child { transform: translateY(2.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--ink);
    border-bottom: 1px solid var(--rule-2);
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 12px var(--gutter) 28px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a {
    display: block;
    padding: 16px 0;
    font-size: 1.15rem;
    border-bottom: 1px solid var(--rule);
    color: var(--paper);
  }
  .nav ul a[aria-current="page"] { border-bottom-color: var(--rule); color: var(--gold-hi); }
  .nav .btn { width: 100%; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Abschnitte ---------- */

.section {
  padding-block: clamp(80px, 10vw, 144px);
  border-top: 1px solid var(--rule);
}
.section-tight { padding-block: clamp(56px, 7vw, 96px); }

.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px 32px;
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.section-head > :first-child { grid-column: 1 / span 7; }
.section-head > .lead { grid-column: 8 / span 5; margin: 0; }
@media (max-width: 860px) {
  .section-head > :first-child, .section-head > .lead { grid-column: 1 / -1; }
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(56px, 8vw, 112px) clamp(80px, 10vw, 128px);
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 48px 32px;
  align-items: center;
}
.hero-copy { grid-column: 1 / span 7; }
.hero-copy .lead { margin-top: 32px; }
.hero-visual { grid-column: 8 / span 5; }
@media (max-width: 980px) {
  .hero-copy, .hero-visual { grid-column: 1 / -1; }
  .hero-visual { max-width: 520px; }
}

/* Instrument: das Signet als Ablaufdiagramm */
.instrument {
  margin: 0;
  position: relative;
  border: 1px solid var(--rule-2);
  background: linear-gradient(180deg, rgba(251, 251, 250, 0.025), rgba(251, 251, 250, 0) 70%);
  padding: 22px 24px 0;
}
.instrument .corner {
  position: absolute;
  width: 12px; height: 12px;
  border-color: var(--paper);
  border-style: solid;
  border-width: 0;
}
.corner.tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.corner.tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.corner.bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.corner.br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

.instrument-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 22px;
}
.instrument-top .mono { color: var(--faint); font-size: 0.78rem; }

.plot {
  position: relative;
  height: clamp(220px, 30vw, 320px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: clamp(14px, 2.6vw, 28px);
  align-items: end;
  border-bottom: 1px solid var(--rule-2);
  background-image: linear-gradient(to top, var(--rule) 1px, transparent 1px);
  background-size: 100% 25%;
}
.bar {
  height: 100%;
  background: var(--paper);
  transform-origin: 50% 100%;
  transform: scaleY(0);
  animation: rise 1s var(--ease) forwards;
}
.bar-1 { height: 36%; animation-delay: 0.15s; }
.bar-2 { height: 61%; animation-delay: 0.3s; }
.bar-3 { height: 50%; animation-delay: 0.45s; }
.bar-4 {
  height: 100%;
  background: var(--gold);
  animation-delay: 0.65s;
  box-shadow: 0 0 80px -8px var(--gold-glow), 0 0 0 1px rgba(201, 162, 83, 0.25) inset;
}
@keyframes rise { to { transform: scaleY(1); } }

.plot-labels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: clamp(14px, 2.6vw, 28px);
  list-style: none;
  margin: 0;
  padding: 14px 0 20px;
}
.plot-labels li {
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--muted);
  opacity: 0;
  animation: fade 0.6s ease forwards;
  animation-delay: 1.1s;
}
.plot-labels .mono { display: block; color: var(--faint); font-size: 0.74rem; margin-bottom: 4px; }
.plot-labels li:last-child { color: var(--paper); }
.plot-labels li:last-child .mono { color: var(--gold-hi); }
@keyframes fade { to { opacity: 1; } }

.instrument-readout {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-top: 1px solid var(--rule-2);
  margin-inline: -24px;
  padding: 16px 24px;
  font-size: 0.9rem;
  color: var(--muted);
}
.instrument-readout .mono { color: var(--gold-hi); font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar, .plot-labels li { animation: none; transform: none; opacity: 1; }
}

/* ---------- Ablaufstufen (Sequenz) ---------- */

.stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.stages li { border-top: 2px solid var(--paper); padding-top: 22px; }
.stages li:last-child { border-top-color: var(--gold); }
.stages .mono { display: block; color: var(--faint); font-size: 0.8rem; margin-bottom: 18px; }
.stages li:last-child .mono { color: var(--gold-hi); }
.stages h3 { margin-bottom: 12px; }
.stages p { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 980px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; } }
@media (max-width: 560px) { .stages { grid-template-columns: 1fr; } }

/* ---------- Aussagen-Zeilen ---------- */

.rows { border-top: 1px solid var(--rule-2); }
.row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px 32px;
  padding-block: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--rule-2);
}
.row > :first-child { grid-column: 1 / span 5; }
.row > :last-child { grid-column: 7 / span 6; color: var(--muted); }
.row h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-stretch: 114%; line-height: 1.12; }
@media (max-width: 860px) {
  .row > :first-child, .row > :last-child { grid-column: 1 / -1; }
}

/* ---------- Leistungs-Definitionen ---------- */

.deflist { margin: 0; border-top: 1px solid var(--rule-2); }
.deflist > div {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px 32px;
  padding-block: 28px;
  border-bottom: 1px solid var(--rule);
}
.deflist dt { grid-column: 1 / span 4; font-weight: 600; font-stretch: 108%; font-size: 1.15rem; }
.deflist dd { grid-column: 5 / span 8; margin: 0; color: var(--muted); }
@media (max-width: 760px) {
  .deflist dt, .deflist dd { grid-column: 1 / -1; }
}

/* Zuständigkeitstabelle: Sie / Saldura */
.duty {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.duty th, .duty td {
  text-align: left;
  vertical-align: top;
  padding: 22px 24px 22px 0;
  border-bottom: 1px solid var(--rule);
}
.duty thead th {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid var(--rule-2);
  padding-top: 0;
}
.duty tbody th { font-weight: 600; font-stretch: 108%; width: 30%; }
.duty tbody th .mono { display: block; font-weight: 400; color: var(--faint); font-size: 0.78rem; margin-bottom: 6px; }
.duty td { color: var(--muted); width: 35%; }
.duty td.none { color: var(--faint); font-family: var(--mono); }
.duty tbody tr:last-child th .mono { color: var(--gold-hi); }
.table-scroll { overflow-x: auto; }
@media (max-width: 680px) {
  .duty thead { display: none; }
  .duty, .duty tbody, .duty tr, .duty th, .duty td { display: block; width: 100%; }
  .duty tr { border-bottom: 1px solid var(--rule-2); padding-block: 18px; }
  .duty th, .duty td { border: 0; padding: 4px 0; }
  .duty td::before { content: attr(data-label) ": "; color: var(--faint); }
}

/* Hinweiskasten */
.note {
  border-left: 2px solid var(--gold);
  padding: 4px 0 4px 22px;
  color: var(--muted);
  max-width: 68ch;
}
.note strong { color: var(--paper); font-weight: 600; }

/* ---------- Seitenkopf Unterseiten ---------- */

.page-head { padding-block: clamp(56px, 8vw, 112px) clamp(48px, 6vw, 80px); }
.page-head .lead { margin-top: 28px; }

/* ---------- Rechnung / Rechner ---------- */

.sheet {
  background: var(--paper);
  color: var(--ink-on-paper);
  padding: clamp(24px, 3.4vw, 40px);
  box-shadow: 0 50px 90px -50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.04);
  position: relative;
}
.sheet::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -7px;
  height: 7px;
  background: linear-gradient(-45deg, transparent 5px, var(--paper) 0) 0 0 / 10px 7px repeat-x,
              linear-gradient(45deg, transparent 5px, var(--paper) 0) 0 0 / 10px 7px repeat-x;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule-on-paper);
  margin-bottom: 8px;
}
.sheet-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; }
.sheet-brand svg { width: 24px; }
.sheet-kicker { margin: 8px 0 0; font-size: 0.88rem; color: var(--muted-on-paper); }
.sheet-tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted-on-paper);
  border: 1px solid var(--rule-on-paper);
  padding: 4px 8px;
  white-space: nowrap;
}

.sheet-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.sheet-table th { text-align: left; font-weight: 400; padding: 12px 12px 12px 0; vertical-align: top; }
.sheet-table td {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  padding: 12px 0;
  white-space: nowrap;
  vertical-align: top;
}
.sheet-table tbody tr + tr th, .sheet-table tbody tr + tr td { border-top: 1px dashed var(--rule-on-paper); }
.sheet-table tfoot th, .sheet-table tfoot td { padding-block: 8px; color: var(--muted-on-paper); }
.sheet-table tfoot tr:first-child th, .sheet-table tfoot tr:first-child td {
  border-top: 1px solid var(--ink-on-paper);
  padding-top: 14px;
  color: var(--ink-on-paper);
  font-weight: 600;
}
.sheet-table tfoot tr.total th, .sheet-table tfoot tr.total td {
  color: var(--ink-on-paper);
  font-weight: 600;
  font-size: 1.12rem;
  border-top: 2px solid var(--gold);
  padding-top: 14px;
}
.sheet-table tfoot tr.total td { font-weight: 500; }
.sheet-table .sub { display: block; font-size: 0.8rem; color: var(--muted-on-paper); }

.sheet-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule-on-paper);
  border: 1px solid var(--rule-on-paper);
  margin: 24px 0 0;
}
.sheet-meta > div { background: var(--paper); padding: 14px 16px; }
.sheet-meta dt { font-size: 0.8rem; color: var(--muted-on-paper); }
.sheet-meta dd { margin: 4px 0 0; font-family: var(--mono); font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* Eingaben */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 48px 32px;
  align-items: start;
}
.calc-inputs { grid-column: 1 / span 6; }
.calc-output { grid-column: 8 / span 5; position: sticky; top: calc(var(--header-h) + 32px); }
@media (max-width: 980px) {
  .calc-inputs, .calc-output { grid-column: 1 / -1; position: static; }
}

.field { margin-bottom: 32px; }
.field > label, .field > .label {
  display: block;
  font-weight: 600;
  font-stretch: 104%;
  margin-bottom: 4px;
}
.field .hint { display: block; font-size: 0.88rem; color: var(--muted); margin-bottom: 14px; }
.hint-flag { color: var(--gold-hi); }

.num-wrap { display: flex; align-items: stretch; max-width: 280px; }
.num-wrap .unit {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--rule-2);
  border-left: 0;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  border-radius: 0 2px 2px 0;
}

input[type="number"], input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  color: var(--paper);
  font: 400 1rem/1.4 var(--sans);
  padding: 14px 14px;
  transition: border-color 0.2s, background-color 0.2s;
}
.num-wrap input { border-radius: 2px 0 0 2px; }
input[type="number"] { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 1.05rem; }
input:hover, select:hover, textarea:hover { border-color: rgba(251, 251, 250, 0.3); }
input:focus, select:focus, textarea:focus { border-color: var(--gold-hi); background: var(--ink-3); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 1px; }
textarea { min-height: 150px; resize: vertical; }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

/* Schieberegler: Daumen in Form eines Signet-Balkens */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  background: transparent;
  margin: 16px 0 0;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(to right, var(--gold-hi) var(--fill, 0%), var(--rule-2) var(--fill, 0%));
}
input[type="range"]::-moz-range-track { height: 1px; background: var(--rule-2); }
input[type="range"]::-moz-range-progress { height: 1px; background: var(--gold-hi); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px; height: 28px;
  margin-top: -14px;
  background: var(--gold-hi);
  border: 0;
  border-radius: 0;
}
input[type="range"]::-moz-range-thumb {
  width: 10px; height: 28px;
  background: var(--gold-hi);
  border: 0;
  border-radius: 0;
}
input[type="range"]:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 6px; }
.range-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
  margin-top: 6px;
}

.calc-divider { border: 0; border-top: 1px solid var(--rule-2); margin: 48px 0 40px; }

/* Vergleich */
.compare { margin-top: 32px; }
.compare-row { margin-bottom: 18px; }
.compare-label { display: flex; justify-content: space-between; gap: 16px; font-size: 0.92rem; margin-bottom: 8px; }
.compare-label .mono { font-size: 0.95rem; }
.compare-track { height: 14px; background: var(--ink-3); position: relative; }
.compare-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--paper); transition: width 0.5s var(--ease); }
.compare-fill.is-gold { background: var(--gold); }
.compare-result {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--rule-2);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.compare-result .mono { font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--gold-hi); }
@media (prefers-reduced-motion: reduce) { .compare-fill { transition: none; } }

/* Preisblock */
.price-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 48px 32px;
  align-items: start;
}
.price-main { grid-column: 1 / span 6; }
.price-side { grid-column: 8 / span 5; }
@media (max-width: 900px) { .price-main, .price-side { grid-column: 1 / -1; } }

.price-figure {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(4rem, 11vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: flex-start;
  gap: 0.08em;
}
.price-figure .cur { font-size: 0.4em; margin-top: 0.12em; color: var(--gold-hi); }
.price-figure { margin: 0; }
.price-caption { margin-top: 22px; font-size: 1.05rem; color: var(--muted); }

.checklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-2); }
.checklist li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.checklist li::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--gold-hi);
  transform: translateY(-1px);
}
.checklist li.is-extra::before { background: transparent; border: 1px solid var(--muted); }
.checklist .mono { color: var(--muted); font-size: 0.92rem; text-align: right; }

.examples { width: 100%; border-collapse: collapse; }
.examples th, .examples td { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--rule); text-align: right; }
.examples th:first-child, .examples td:first-child { text-align: left; }
.examples thead th { font-weight: 500; font-size: 0.88rem; color: var(--muted); border-bottom-color: var(--rule-2); padding-top: 0; }
.examples td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.examples tbody td:first-child { color: var(--paper); }

/* Teaser-Rechner auf der Startseite */
.teaser {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 48px 32px;
  align-items: center;
}
.teaser-copy { grid-column: 1 / span 6; }
.teaser-sheet { grid-column: 8 / span 5; }
@media (max-width: 980px) { .teaser-copy, .teaser-sheet { grid-column: 1 / -1; } }

.big-readout { margin-top: 36px; }
.big-readout output {
  display: block;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.big-readout .muted { display: block; margin-top: 10px; font-size: 0.95rem; }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--rule-2); max-width: 880px; }
.faq details { border-bottom: 1px solid var(--rule-2); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 26px 0;
  font-weight: 600;
  font-stretch: 108%;
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-weight: 400;
  color: var(--gold-hi);
  font-size: 1.3rem;
  line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--gold-hi); }
.faq .answer { padding: 0 0 28px; color: var(--muted); max-width: 68ch; }

/* ---------- Formular ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 48px 32px;
  align-items: start;
}
.form-main { grid-column: 1 / span 7; }
.form-side { grid-column: 9 / span 4; }
@media (max-width: 980px) { .form-main, .form-side { grid-column: 1 / -1; } }

.form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-fields .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-fields { grid-template-columns: 1fr; } }
.form-fields .field { margin-bottom: 22px; }
.form-fields label { font-weight: 500; font-stretch: 100%; font-size: 0.95rem; margin-bottom: 8px; }
.req { color: var(--gold-hi); }
.optional { color: var(--faint); font-weight: 400; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-legal { font-size: 0.9rem; color: var(--muted); margin: 6px 0 28px; }
.form-status { min-height: 1.6em; margin-top: 16px; font-size: 0.95rem; }
.form-status.is-error { color: #E8A39A; }

.form-success { border: 1px solid var(--rule-2); padding: 36px; }
.form-success:focus { outline: none; }
.form-success h2 { margin-bottom: 14px; }

.side-list { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.side-list li { padding: 18px 0; border-top: 1px solid var(--rule); color: var(--muted); }
.side-list li strong { display: block; color: var(--paper); font-weight: 600; margin-bottom: 4px; }

/* ---------- CTA-Band ---------- */

.cta-band {
  border-top: 1px solid var(--rule);
  padding-block: clamp(80px, 10vw, 136px);
  position: relative;
  overflow: hidden;
}
.cta-inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px;
  align-items: end;
}
.cta-inner > :first-child { grid-column: 1 / span 8; }
.cta-inner > :last-child { grid-column: 9 / span 4; justify-self: end; }
.cta-inner .btn-row { margin-top: 0; }
@media (max-width: 860px) {
  .cta-inner > :first-child, .cta-inner > :last-child { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- Rechtstexte ---------- */

.legal { max-width: 760px; }
.legal h2 { font-size: 1.35rem; font-stretch: 110%; margin: 52px 0 14px; }
.legal h3 { font-size: 1.05rem; margin: 30px 0 10px; }
.legal p, .legal li { color: #D3D3CD; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.4em; }
.legal address { font-style: normal; margin-bottom: 1em; color: #D3D3CD; }
.placeholder {
  background: rgba(201, 162, 83, 0.14);
  outline: 1px dashed rgba(201, 162, 83, 0.6);
  color: var(--gold-hi);
  padding: 0 4px;
}
.legal .stand { margin-top: 56px; color: var(--faint); font-size: 0.9rem; }

/* ---------- Fußzeile ---------- */

.site-footer {
  border-top: 1px solid var(--rule-2);
  padding-block: 64px 36px;
  background: var(--ink);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 40px 32px;
}
.footer-brand { grid-column: 1 / span 5; }
.footer-brand p { color: var(--muted); margin-top: 18px; max-width: 36ch; font-size: 0.95rem; }
.footer-col { grid-column: span 2; }
.footer-col:first-of-type { grid-column: 7 / span 2; }
.footer-col h2 { font-size: 0.9rem; font-weight: 500; color: var(--faint); letter-spacing: 0; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { text-decoration: none; color: var(--muted); font-size: 0.95rem; }
.footer-col a:hover { color: var(--paper); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--faint);
}
@media (max-width: 860px) {
  .footer-brand { grid-column: 1 / -1; }
  .footer-col, .footer-col:first-of-type { grid-column: span 6; }
}
@media (max-width: 460px) {
  .footer-col, .footer-col:first-of-type { grid-column: 1 / -1; }
}

/* ---------- 404 ---------- */
.notfound { padding-block: clamp(96px, 16vw, 200px); }
.notfound .mono { color: var(--gold-hi); display: block; margin-bottom: 20px; }

@media print {
  body::before, .site-header, .site-footer, .cta-band { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- Abstands-Hilfsklassen (keine Inline-Styles wegen CSP) ---------- */
.mt-s { margin-top: 14px; }
.mt-m { margin-top: 22px; }
.mt-l { margin-top: 36px; }
.mb-s { margin-bottom: 12px; }
.mb-m { margin-bottom: 20px; }
.mb-l { margin-bottom: 32px; }

@media (max-width: 560px) {
  .plot-labels li { font-size: 0.74rem; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
  .instrument { padding-inline: 18px; }
  .instrument-readout { margin-inline: -18px; padding-inline: 18px; flex-direction: column; gap: 4px; }
}
