/* NOVALA – Was der Status quo kostet. IBM Plex Sans, Rot #DA2C27 als Akzent. */

@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/IBMPlexSans-Regular.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/IBMPlexSans-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/IBMPlexSans-Bold.ttf') format('truetype'); }

:root {
  color-scheme: light;
  --brand: #DA2C27;
  --brand-dark: #B3211D;
  --brand-soft: #FBE9E8;
  --ink: #1E1E1E;
  --text: #262626;
  --text-2: #5A5A5A;
  --muted: #737373;
  --soft: #F5F5F4;
  --soft-2: #EEEDEB;
  --line: #DEDDDA;
  --dark: #1E1E1E;
  --surface: #FFFFFF;
  --bar: #C8C6C2;
  --danger: #A12020;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 16px rgba(0, 0, 0, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: 'IBM Plex Sans', Arial, sans-serif; font-size: 16px; line-height: 1.55;
  color: var(--text); background: var(--soft); display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; padding: 28px 0 48px; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; }
h1 { font-size: 30px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
code { font-family: Menlo, Consolas, monospace; font-size: .9em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* ---------------------------------------------------------------- Kopf und Fuss */

.site-header { background: var(--surface); border-bottom: 3px solid var(--brand); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark { font-weight: 700; font-size: 24px; letter-spacing: .22em; }
.brand-sub { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.user-nav { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--text-2); flex-wrap: wrap; }
.user-nav form { margin: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }
.site-footer { background: var(--dark); color: #fff; font-size: 13px; }
.site-footer a { color: #fff; }
.footer-row { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }

/* ---------------------------------------------------------------- Knöpfe, Felder */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px;
  border-radius: 8px; border: 2px solid transparent; font: 600 15px/1.2 'IBM Plex Sans', Arial, sans-serif;
  text-decoration: none; cursor: pointer; text-align: center;
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary, .btn-brand { background: var(--brand); color: #fff; }
.btn-primary:hover, .btn-brand:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--soft-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); width: 100%; margin-top: 16px; }
.btn-ghost:hover { border-color: var(--brand); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); min-height: 38px; font-size: 13px; padding: 6px 14px; }
.btn-outline-light:hover { border-color: #fff; color: #fff; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
input[type=text], input[type=email], input[type=tel], input[type=number] {
  font: 400 16px/1.3 'IBM Plex Sans', Arial, sans-serif; color: var(--text); padding: 10px 12px;
  border: 1px solid #BDBBB7; border-radius: 6px; background: #fff; width: 100%; min-height: 44px;
}
input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(218, 44, 39, .18); }
.has-error input { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; margin: 0; }
.field-hint, .hint, .small { font-size: 13px; color: var(--text-2); margin: 4px 0 0; }
.field-hint { margin: -8px 0 16px; }
.req { color: var(--brand); }
.alert { background: #FBEDED; color: #6E1515; border-left: 4px solid var(--danger); padding: 12px 14px; border-radius: 6px; margin: 16px 0; font-size: 14px; }
.alert-ok { background: #EEF6EE; color: #1E4D1E; border-left-color: #3C8A3C; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 6px; font-size: 14px; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--brand); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- Anmeldung, Registrierung */

.auth-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .auth-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; } }
.auth-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 22px; }
@media (min-width: 720px) { .auth-card { padding: 36px 40px; } }
.auth-card h1 { margin: 6px 0 12px; }
.auth-card .lead { font-size: 17px; color: var(--text-2); margin: 0 0 20px; }
.auth-card .btn { width: 100%; }
.auth-card.message .btn, .form-actions .btn { width: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 700; color: var(--brand); margin: 0; }
.stack { display: flex; flex-direction: column; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 22px 0 14px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-aside { background: var(--dark); color: #fff; border-radius: var(--radius); padding: 28px 24px; }
.auth-aside .eyebrow { color: #FF8A86; }
.auth-aside .formula { font-size: 18px; font-weight: 600; margin: 12px 0 16px; line-height: 1.4; }
.driver-list { list-style: none; padding: 0; margin: 8px 0 0; counter-reset: d; }
.driver-list li { counter-increment: d; display: grid; grid-template-columns: 34px 1fr; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.driver-list li::before { content: counter(d); grid-row: span 2; font-weight: 700; color: #FF8A86; font-size: 18px; }
.driver-list span { font-size: 13px; color: rgba(255, 255, 255, .75); }
.aside-note { font-size: 14px; color: rgba(255, 255, 255, .85); margin: 16px 0 0; }
.form-section { border: 0; padding: 0; margin: 0 0 18px; }
.form-section legend { font-weight: 700; color: var(--ink); font-size: 15px; padding: 0 0 10px; border-bottom: 1px solid var(--soft-2); width: 100%; margin-bottom: 14px; }
.grid-2, .grid-3 { display: grid; gap: 0 16px; }
@media (min-width: 600px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 2fr 1.4fr; } }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 22px; }

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

.page-title { margin-bottom: 20px; }
.page-title .lead { color: var(--text-2); margin: 6px 0 0; font-size: 17px; }
.calc { display: grid; gap: 20px; align-items: start; }
@media (min-width: 1000px) { .calc { grid-template-columns: 380px minmax(0, 1fr); gap: 24px; } }
.inputs { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 20px 20px; }
@media (min-width: 1000px) { .inputs { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; } }
.group { padding: 16px 0; border-bottom: 1px solid var(--soft-2); }
.group:last-child { border-bottom: 0; }
.group-title { display: flex; align-items: center; gap: 10px; font-size: 16px; margin-bottom: 8px; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; }
.question { font-size: 14px; font-weight: 600; margin: 0 0 4px; }

.band-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin: 10px 0 10px; }
.band { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 52px; padding: 5px 2px;
  border: 1px solid var(--line); border-radius: 7px; background: var(--soft); cursor: pointer; font: inherit; color: var(--text); text-align: center; }
.band strong { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.band small { font-size: 10.5px; color: var(--muted); line-height: 1.2; }
.band:hover { border-color: var(--brand); }
.band.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.band.active small { color: #D6D6D6; }
@media (max-width: 420px) { .band-options { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.exact { display: grid; grid-template-columns: 1fr 96px; align-items: center; gap: 4px 10px; }
.exact label { font-size: 13px; color: var(--text-2); }
.exact input { min-height: 38px; padding: 6px 10px; text-align: right; font-weight: 700; }
.src { grid-column: 1 / -1; justify-self: start; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--soft-2); color: var(--text-2); }
.src[data-src="Mentimeter"] { background: #E6F0FB; color: #1C4E85; }
.src[data-src="Überschrieben"], .src[data-src="Ihre Angabe"] { background: var(--brand-soft); color: var(--brand-dark); }

.more summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 14px; padding: 4px 0; }
.more .field { margin-top: 12px; }
.more label { font-weight: 400 !important; font-size: 13px !important; }
.range-row { display: grid; grid-template-columns: 1fr 80px; gap: 10px; align-items: center; }
.range-row input[type=number] { min-height: 36px; padding: 5px 8px; text-align: right; }
input[type=range] { width: 100%; accent-color: var(--brand); }

.menti { background: #F3F7FC; margin: 12px -8px 0; padding: 12px 8px 16px; border-radius: 8px; border-bottom: 0; }
.menti-q { margin-top: 14px; }
.menti-title { font-weight: 700; font-size: 13.5px; margin: 0 0 6px; }
.menti-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.menti-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 10.5px; color: var(--text-2); text-align: center; }
.menti-grid input { min-height: 36px; padding: 4px; text-align: center; font-weight: 700; }
.menti-result { font-size: 13px; margin: 6px 0 0; }
.room-sum { font-size: 15px; margin: 6px 0 0; padding: 8px 10px; background: #fff; border-radius: 6px; border-left: 4px solid var(--brand); }
.room-sum strong { font-size: 20px; }

.results { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 999px) {
  .results { display: contents; }
  .page-title { order: -2; }
  .hero { order: -1; }
  .inputs { order: 0; }
  .results > :not(.hero) { order: 1; }
  #stage-toggle { display: none; }
}
.hero { background: var(--dark); color: #fff; border-radius: var(--radius); padding: 24px 22px; display: grid; gap: 18px; }
@media (min-width: 760px) { .hero { grid-template-columns: minmax(0, 1fr) auto; padding: 28px 32px; align-items: start; } .hero-step { grid-column: 1; } .hero-actions { grid-column: 2; grid-row: 1 / span 3; } }
.hero .eyebrow { color: #FF8A86; }
.hero-person { font-size: 19px; margin: 6px 0 0; }
.hero-value { font-size: clamp(38px, 6vw, 60px); font-weight: 700; line-height: 1.05; margin: 6px 0 6px; }
.hero-value2 { font-size: clamp(30px, 4.6vw, 44px); font-weight: 700; line-height: 1.05; margin: 6px 0 6px; color: #fff; }
.hero-avoid { border-left: 4px solid var(--brand); padding-left: 16px; }
.hero-sub { margin: 0; color: rgba(255, 255, 255, .82); font-size: 15px; }
.hero-step { transition: opacity .25s; }
.hero-step.pending { display: none; }
.hero-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
@media (min-width: 760px) { .hero-actions { align-items: flex-end; min-width: 230px; } }
.hero-note { font-size: 13px; color: rgba(255, 255, 255, .8); margin: 0 0 8px; max-width: 260px; }
@media (min-width: 760px) { .hero-note { text-align: right; } }
.stage-controls { display: none; align-items: center; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, .8); }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 18px; min-width: 0; }
@media (min-width: 720px) { .card { padding: 24px 26px; } }
.card-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 10px; }
.formula { font-size: 14px; color: var(--text-2); margin: 0 0 12px; }
.card.pending { display: none; }
.band small { white-space: nowrap; }

.calc-table, .sizes, .assumptions { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.calc-table td, .sizes td, .sizes th, .assumptions td, .assumptions th { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--soft-2); }
.calc-table .num, .sizes .num, .assumptions .num { text-align: right; white-space: nowrap; }
.calc-table .strong { font-weight: 700; color: var(--ink); }
.calc-table .accent { color: var(--brand); }
.sizes thead th, .assumptions thead th { background: var(--ink); color: #fff; font-weight: 600; font-size: 13px; }
.sizes tbody tr:nth-child(even) { background: var(--soft); }
.table-wrap { overflow-x: auto; }

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { background: var(--soft); border-radius: 8px; padding: 12px 14px; border-left: 4px solid var(--bar); }
.tile-accent { border-left-color: var(--brand); background: var(--brand-soft); }
.tile-label { font-size: 13px; color: var(--text-2); margin: 0; }
.tile-value { font-size: 22px; font-weight: 700; color: var(--ink); margin: 4px 0 0; }
.statement { font-size: 16px; margin: 16px 0 6px; }

.chart { width: 100%; min-height: 200px; }
.chart svg { display: block; overflow: visible; font-family: 'IBM Plex Sans', Arial, sans-serif; }
.chart .grid { stroke: #ECEBE8; stroke-width: 1; }
.chart .tick { font-size: 12px; fill: var(--text-2); font-variant-numeric: tabular-nums; }
.chart .xlabel { font-size: 12px; fill: var(--text-2); }
.chart .xlabel-current { font-weight: 700; fill: var(--ink); }
.chart .vlabel { font-size: 13px; font-weight: 700; fill: var(--ink); }
.chart .bar-current { fill: var(--brand); }
.chart .bar-other { fill: var(--bar); }
.chart .hit { fill: transparent; }
.chart .bar-group { outline: none; }
.chart .bar-group:hover .bar-other, .chart .bar-group:focus .bar-other { fill: #A9A6A1; }
.chart .bar-group:focus-visible .hit { stroke: var(--brand); stroke-width: 2; }
.tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--dark); color: #fff; padding: 8px 12px; border-radius: 6px; font-size: 13px; display: flex; flex-direction: column; max-width: 260px; }
.tooltip[hidden] { display: none; }

.change-list { margin: 0; padding-left: 20px; }
.change-list li { margin-bottom: 6px; }
.change-list li::marker { color: var(--brand); }
.sources summary { cursor: pointer; font-weight: 700; color: var(--ink); font-size: 16px; }
.sub-head { font-weight: 700; margin: 18px 0 6px; }
.not-list { padding-left: 20px; font-size: 14px; margin: 0; }
.not-list li { margin-bottom: 6px; }

.mobile-total { display: none; }
@media (max-width: 999px) {
  .mobile-total { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: var(--dark); color: #fff; font-size: 13px; transform: translateY(100%); transition: transform .2s; }
  .mobile-total.visible { transform: translateY(0); }
  .mobile-total strong { font-size: 18px; }
  .page-calc main { padding-bottom: 72px; }
}

/* ---------------------------------------------------------------- Bühnenansicht */

[data-stage-only] { display: none !important; }
body.stage [data-stage-only] { display: block !important; }
body.stage .stage-controls[data-stage-only] { display: flex !important; }
body.stage [data-hide-on-stage], body.stage .price-col, body.stage [data-online-only], body.stage .site-footer, body.stage .user-nav, body.stage .sources { display: none !important; }
body.stage .wrap { max-width: none; }
body.stage .hero-value { font-size: clamp(56px, 7vw, 104px); }
body.stage .hero-value2 { font-size: clamp(40px, 5vw, 72px); }
body.stage .hero-person { font-size: 26px; }
body.stage .hero-sub { font-size: 19px; }
body.stage .mobile-total { display: none; }

/* ---------------------------------------------------------------- Leads */

.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.table-scroll { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--soft-2); vertical-align: top; }
.data-table thead th { background: var(--ink); color: #fff; font-weight: 600; white-space: nowrap; }
.data-table .num { text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.ok { color: #2E7D32; font-weight: 700; }
.fail { color: var(--danger); font-weight: 700; }

@media print {
  .site-header, .site-footer, .inputs, .hero-actions, .mobile-total, .tooltip { display: none !important; }
  body { background: #fff; }
  .calc { display: block; }
  .card { box-shadow: none; border: 1px solid var(--line); }
}
