/* ========================================================================== 
   NOISELEVEL DIGITAL - MASSSTABSRECHNER
   Eigenständiges Tool-Stylesheet. Die Werte orientieren sich gezielt an der
   Hauptwebsite; das Hauptstylesheet wird auf dieser Seite nicht eingebunden.
   ========================================================================== */

:root {
  --paper: #f6f4ef;
  --white: #ffffff;
  --black: #111111;
  --muted: #666666;
  --line: #d8d4ca;
  --line-dark: #111111;
  --rose: #e7a6bd;
  --rose-soft: #f1d5df;
  --blue: #24345f;
  --blue-soft: #e9ecf5;
  --max: 1440px;
  --footer-max: 1180px;
  --gap: clamp(18px, 2vw, 32px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--paper);
  color: var(--black);
  line-height: 1.45;
}
body.nav-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, input, select { border-radius: 0; }
::selection { background: var(--rose); color: var(--black); }
:where(a, button, input, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid var(--line-dark);
  background: var(--paper);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gap);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--gap);
}
.logo { font-size: clamp(18px, 1.5vw, 24px); font-weight: 800; letter-spacing: -.04em; }
.logo span { color: var(--blue); }
.main-nav { display: flex; gap: 18px; align-items: center; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.main-nav a { border-bottom: 1px solid transparent; padding-bottom: 3px; font-weight: 800; }
.main-nav a:hover, .main-nav a.is-active { border-bottom-color: var(--black); color: var(--blue); }
.mobile-nav-toggle { display: none; }

.page-hero, .section { border-bottom: 1px solid var(--line-dark); }
.page-hero-inner, .section-inner { max-width: var(--max); margin: 0 auto; padding-inline: var(--gap); }
.page-hero-inner { padding-top: clamp(48px, 7vw, 90px); padding-bottom: clamp(44px, 6vw, 78px); }
.section-inner { padding-top: clamp(48px, 7vw, 92px); padding-bottom: clamp(48px, 7vw, 92px); }
.hero-topline { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 28px; }
.kicker { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.language-link { border-bottom: 1px solid var(--line-dark); font-size: 13px; font-weight: 750; }
.language-link:hover { color: var(--blue); }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 1220px; margin-bottom: 24px; font-size: clamp(52px, 9vw, 132px); line-height: .9; letter-spacing: -.072em; font-weight: 800; }
h2 { margin-bottom: 0; font-size: clamp(34px, 5vw, 76px); line-height: .94; letter-spacing: -.058em; font-weight: 800; }
h3 { margin-bottom: 10px; font-size: clamp(22px, 2vw, 30px); line-height: 1.05; letter-spacing: -.04em; }
.lead { max-width: 820px; margin-bottom: 0; font-size: clamp(18px, 2vw, 28px); line-height: 1.2; letter-spacing: -.03em; }
.section-title-row { display: grid; grid-template-columns: 1fr minmax(260px, 430px); gap: var(--gap); align-items: end; margin-bottom: 34px; }
.section-title-row > p { margin-bottom: 0; color: var(--muted); }
.prose { max-width: 820px; }
.prose p, .prose li { font-size: 17px; line-height: 1.6; }
.prose a { border-bottom: 1px solid currentColor; }

.language-note { border-bottom: 1px solid var(--line-dark); background: var(--blue-soft); }
.language-note-inner { max-width: var(--max); margin: 0 auto; padding: 12px var(--gap); font-size: 14px; }
.language-note p { margin: 0; }

.calculator-shell { display: grid; grid-template-columns: minmax(0, .9fr) minmax(440px, 1.1fr); border: 1px solid var(--line-dark); background: var(--white); }
.calculator-inputs, .calculator-results { padding: clamp(20px, 3.2vw, 46px); }
.calculator-inputs { border-right: 1px solid var(--line-dark); background: var(--paper); }
.calculator-heading { margin-bottom: 26px; }
.calculator-heading p { margin-bottom: 0; color: var(--muted); }
.mode-switch { border: 0; padding: 0; margin: 0 0 30px; }
.mode-switch legend, .field-label, .scale-options legend { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mode-options { display: grid; grid-template-columns: 1fr 1fr; }
.mode-option { position: relative; display: flex; min-height: 78px; padding: 15px; border: 1px solid var(--line-dark); margin-left: -1px; cursor: pointer; align-items: center; font-weight: 800; line-height: 1.2; }
.mode-option:first-child { margin-left: 0; }
.mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.mode-option.is-active, .mode-option:has(input:checked) { background: var(--blue); color: var(--white); }
.mode-option:has(input:focus-visible),
.scale-choice:has(input:focus-visible) {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  z-index: 1;
}
.input-grid { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 10px; }
.field { margin-bottom: 20px; }
.field input, .field select { width: 100%; min-height: 52px; padding: 12px 13px; border: 1px solid var(--line-dark); background: var(--white); }
.field input:focus, .field select:focus { border-color: var(--blue); }
.field-hint { margin: 7px 0 0; font-size: 13px; color: var(--muted); }
.scale-options { margin: 28px 0 0; padding: 0; border: 0; }
.scale-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.scale-choice { position: relative; display: flex; min-height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line-dark); background: var(--white); cursor: pointer; font-size: 13px; font-weight: 750; }
.scale-choice input { position: absolute; opacity: 0; pointer-events: none; }
.scale-choice:has(input:checked) { background: var(--rose); }
.custom-scale { margin-top: 16px; }
.custom-scale-input { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch; }
.custom-scale-input span { display: flex; align-items: center; padding: 0 13px; border: 1px solid var(--line-dark); border-right: 0; background: var(--blue-soft); font-weight: 800; }
.custom-scale-input input { margin: 0; }
.calculator-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.button { display: inline-flex; min-height: 44px; padding: 11px 17px; border: 1px solid var(--line-dark); background: var(--black); color: var(--white); align-items: center; justify-content: center; cursor: pointer; font-size: 14px; font-weight: 750; }
.button:hover { background: var(--blue); }
.button.secondary { background: transparent; color: var(--black); }
.button.secondary:hover { background: var(--black); color: var(--white); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.noscript-note { border: 1px solid var(--line-dark); background: var(--rose-soft); padding: 13px; }
.support-note { display: flex; margin-top: 14px; padding: 18px 20px; border: 1px solid var(--line-dark); background: var(--rose-soft); align-items: center; justify-content: space-between; gap: 24px; }
.support-note p { max-width: 780px; margin: 0; }
.support-note .button { flex: 0 0 auto; }

.calculator-results { min-width: 0; }
.results-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 22px; }
.results-head h3 { margin-bottom: 0; font-size: clamp(28px, 3vw, 46px); }
.status { min-height: 1.45em; margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.status.is-error { color: #8b2434; font-weight: 700; }
.real-summary { margin: 0 0 20px; padding: 15px; border: 1px solid var(--line-dark); background: var(--blue-soft); font-size: clamp(18px, 2vw, 25px); font-weight: 800; }
.results-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line-dark); }
.results-table th, .results-table td { padding: 13px 5px; border-bottom: 1px solid var(--line-dark); text-align: left; vertical-align: middle; }
.results-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.result-scale { width: 36%; font-weight: 800; }
.result-value { font-size: clamp(19px, 2.1vw, 30px); font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }

.formula-grid, .topic-grid, .example-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.formula-card, .topic-card, .example-card { border: 1px solid var(--line-dark); margin: -1px 0 0 -1px; padding: 22px; background: var(--paper); }
.formula-card:first-child, .topic-card:first-child, .example-card:first-child { margin-left: 0; }
.formula-card { background: var(--white); }
.formula { display: block; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-dark); font-size: clamp(20px, 2vw, 29px); font-weight: 800; letter-spacing: -.035em; }
.topic-card p, .example-card p { margin-bottom: 0; color: var(--muted); }
.card-index { display: block; margin-bottom: 50px; color: var(--muted); font-size: 13px; }

.scale-guide { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line-dark); }
.scale-guide th, .scale-guide td { padding: 18px 12px; border-bottom: 1px solid var(--line-dark); text-align: left; vertical-align: top; }
.scale-guide th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.scale-guide td:first-child { width: 190px; font-size: 18px; font-weight: 800; }
.orientation-note { margin-top: 22px; padding: 18px; border: 1px solid var(--line-dark); background: var(--rose-soft); }
.orientation-note p { margin: 0; }

.faq-list { border-top: 1px solid var(--line-dark); }
.faq-list details { border-bottom: 1px solid var(--line-dark); }
.faq-list summary { cursor: pointer; padding: 20px 44px 20px 0; list-style: none; position: relative; font-size: clamp(19px, 2vw, 26px); font-weight: 800; letter-spacing: -.025em; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 8px; top: 18px; font-size: 28px; font-weight: 400; }
.faq-list details[open] summary::after { content: "−"; }
.faq-answer { max-width: 820px; padding: 0 0 22px; }
.faq-answer p { margin-bottom: 0; font-size: 17px; line-height: 1.6; }
.site-footer { min-height: 380px; position: relative; overflow: hidden; border-top: 1px solid var(--line-dark); background: var(--rose-soft); }
.site-footer::before { content: "noiselevel digital"; position: absolute; left: 50%; top: 38px; transform: translateX(-50%); width: max-content; color: rgba(255,255,255,.48); font-size: clamp(72px, 8.5vw, 148px); font-weight: 800; line-height: .82; letter-spacing: -.075em; pointer-events: none; }
.footer-inner { max-width: var(--footer-max); margin: 0 auto; padding: 150px var(--gap) 62px; display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: clamp(48px, 7vw, 112px); position: relative; z-index: 1; }
.footer-title { margin-bottom: 16px; font-weight: 800; }
.footer-col a { display: block; margin-bottom: 9px; font-size: 16px; }
.footer-col a:hover { color: var(--blue); }
.footer-bottom { max-width: var(--footer-max); margin: 0 auto; padding: 0 var(--gap) 34px; position: relative; z-index: 1; color: rgba(0,0,0,.62); font-size: 13px; }

@media (max-width: 900px) {
  .mobile-nav-toggle { display: inline-flex; width: 58px; height: 48px; border: 1px solid var(--line-dark); background: transparent; align-items: center; justify-content: center; cursor: pointer; z-index: 260; }
  .mobile-nav-toggle span::after { content: attr(data-label); font-size: 17px; }
  .main-nav { display: none; }
  body.nav-open .logo { position: fixed; top: 22px; left: 18px; z-index: 280; }
  body.nav-open .mobile-nav-toggle { position: fixed; top: 14px; right: 14px; width: 52px; height: 52px; border-radius: 999px; background: var(--black); color: var(--white); }
  body.nav-open .mobile-nav-toggle span { display: none; }
  body.nav-open .mobile-nav-toggle::before, body.nav-open .mobile-nav-toggle::after { content: ""; position: absolute; left: 15px; right: 15px; top: 24px; height: 2px; background: var(--white); }
  body.nav-open .mobile-nav-toggle::before { transform: rotate(45deg); }
  body.nav-open .mobile-nav-toggle::after { transform: rotate(-45deg); }
  body.nav-open .main-nav { display: flex; position: fixed; inset: 0; z-index: 240; padding: 112px 24px 180px; background: var(--paper); flex-direction: column; align-items: center; justify-content: center; gap: 18px; overflow: auto; }
  body.nav-open .main-nav a { border: 0; padding: 0; font-size: clamp(36px, 9vw, 68px); line-height: .94; letter-spacing: -.065em; text-transform: none; text-align: center; }
  body.nav-open .main-nav a.is-active { color: var(--rose); }
  .section-title-row, .calculator-shell { grid-template-columns: 1fr; }
  .calculator-inputs { border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .formula-grid, .topic-grid, .example-grid { grid-template-columns: 1fr; }
  .formula-card, .topic-card, .example-card { margin-left: 0; }
  .footer-inner { padding-top: 170px; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
  .site-footer::before { content: "noiselevel\A digital"; white-space: pre; top: 34px; text-align: center; font-size: clamp(54px, 17vw, 96px); line-height: .78; }
}

@media (max-width: 560px) {
  :root { --gap: 16px; }
  h1 { font-size: clamp(46px, 15vw, 72px); overflow-wrap: anywhere; hyphens: auto; }
  .hero-topline { align-items: flex-start; }
  .mode-options, .input-grid { grid-template-columns: 1fr; }
  .mode-option { margin: -1px 0 0; min-height: 58px; }
  .mode-option:first-child { margin-top: 0; }
  .scale-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calculator-inputs, .calculator-results { padding: 20px 16px; }
  .results-head { display: block; }
  .results-head .button { margin-top: 14px; width: 100%; }
  .results-table th, .results-table td { padding-block: 12px; }
  .result-scale { width: 31%; }
  .result-value { font-size: 18px; }
  .support-note { align-items: stretch; flex-direction: column; gap: 16px; }
  .support-note .button { width: 100%; }
  .scale-guide, .scale-guide tbody, .scale-guide tr, .scale-guide td { display: block; }
  .scale-guide thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .scale-guide tr { padding: 16px 0; border-bottom: 1px solid var(--line-dark); }
  .scale-guide td { width: auto !important; padding: 3px 0; border: 0; }
  .scale-guide td::before { content: attr(data-label); display: block; margin-top: 7px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .scale-guide td:first-child::before { display: none; }
  .footer-inner { padding-top: 156px; grid-template-columns: 1fr; gap: 22px; }
}
