:root {
  --gb-passion-red: #b61f34;
  --gb-white: #ffffff;
  --gb-black: #000000;
  --gb-coral: #fe3935;
  --gb-pink: #ef1957;
  --gb-rose-bright: #f45e89;
  --gb-peach: #f57e7e;
  --gb-red-soft: #8d1926;
  --gb-red-dark: #590318;
  --gb-fuchsia: #971f51;
  --gb-gold: #f9cb9c;
  --gb-black-soft-1: #575757;
  --gb-black-soft-2: #878787;
  --gb-black-soft-3: #b2b2b2;
  --gb-black-soft-4: #dadada;
  --gb-ui-gray: #9e9e9e;
  --gb-background-light: #f2f2f2;
  --gb-theme-primary: var(--gb-passion-red);
  --gb-theme-background: var(--gb-white);
  --gb-theme-text: var(--gb-black);
  --gb-theme-text-muted: var(--gb-black-soft-1);
  --surface-border: #e7e7e7;
  --focus-ring: rgba(182, 31, 52, 0.2);
  --filter-field-height: 44px;
  --content-max-width: 1360px;
}

@font-face {
  font-family: "LT Tetria";
  src: url("assets/fonts/lt-tetria-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "LT Tetria";
  src: url("assets/fonts/lt-tetria-black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--gb-theme-background);
}

body {
  margin: 0;
  color: var(--gb-theme-text);
  background: var(--gb-theme-background);
  font-family: "LT Tetria", Arial, sans-serif;
  font-weight: 300;
}

button,
input,
select {
  font: inherit;
}

.tooltip-host {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.tooltip-slot {
  display: inline-flex;
  align-items: center;
}

.tooltip-trigger {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  color: var(--gb-black-soft-1);
  background: var(--gb-white);
  border: 1px solid var(--gb-black-soft-3);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.tooltip-trigger:hover,
.tooltip-trigger:focus,
.tooltip-host.is-open .tooltip-trigger {
  color: var(--gb-white);
  background: var(--gb-passion-red);
  border-color: var(--gb-passion-red);
  outline: none;
}

.tooltip-trigger:focus-visible {
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.tooltip-content {
  position: fixed;
  z-index: 1000;
  width: min(290px, calc(100vw - 32px));
  padding: 10px 12px;
  color: var(--gb-white) !important;
  background: var(--gb-red-dark);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font-size: 0.8rem !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  text-align: left;
  text-transform: none;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.tooltip-trigger:hover + .tooltip-content,
.tooltip-trigger:focus-visible + .tooltip-content,
.tooltip-host.is-open .tooltip-content {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-host.is-focus-suppressed .tooltip-trigger:focus-visible + .tooltip-content {
  opacity: 0;
  transform: translateY(-3px);
}

button,
select {
  cursor: pointer;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  background: var(--gb-white);
}

.app-header {
  background: var(--gb-passion-red);
  color: var(--gb-white);
}

.header-inner {
  --logo-width: 142px;
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 24px 20px;
}

.brand-mark {
  text-decoration: none;
  flex: 0 0 auto;
  min-width: 112px;
  color: var(--gb-white);
}

.brand-logo {
  display: block;
  width: var(--logo-width);
  height: auto;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.language-switcher a {
  min-width: 34px;
  padding: 7px 8px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--gb-white);
  font-family: "LT Tetria", Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.language-switcher a:hover,
.language-switcher a:focus-visible,
.language-switcher a[aria-current="page"] {
  border-color: currentColor;
  background: rgba(255, 255, 255, 0.14);
  color: var(--gb-white);
  text-decoration: none;
}

.header-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.header-title {
  /* Versalhöhe (ca. 0.72em) entspricht der Logo-Höhe (Seitenverhältnis 282.8:47.7) */
  font-size: calc(var(--logo-width) * 0.2343);
  line-height: 1;
  white-space: nowrap;
}

.eyebrow {
  margin: 0;
  color: currentColor;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  text-transform: uppercase;
}

h1 {
  font-size: 2.6rem;
}

h2 {
  font-size: 1.42rem;
}

.dashboard {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.calculator-intro {
  max-width: 1120px;
  margin-bottom: 24px;
}

.calculator-intro h2 {
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.12;
}

.calculator-intro p {
  margin: 0;
  color: var(--gb-theme-text-muted);
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.55;
}

.calculator-navigation {
  margin-bottom: 30px;
}

.navigation-title {
  margin: 0 0 9px;
  color: var(--gb-black-soft-1);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading .eyebrow {
  color: var(--gb-passion-red);
  margin-bottom: 7px;
}

.section-heading-compact {
  margin: 0 0 14px;
}

.source-line,
.status-line {
  margin: 0;
  color: var(--gb-theme-text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.region-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.region-tab {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 14px 18px;
  color: var(--gb-black);
  background: var(--gb-white);
  border: 2px solid var(--gb-passion-red);
  border-radius: 8px;
  box-shadow: 0 7px 18px rgba(89, 3, 24, 0.08);
  outline: none;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.region-tab-label,
.region-tab strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.1;
}

.region-tab-label {
  font-size: 1rem;
  font-weight: 700;
}

.region-tab strong {
  color: var(--gb-black-soft-1);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.region-tab-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--gb-passion-red);
}

.region-tab-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

/* Gefülltes Schweiz-Icon (Vollflächen-SVG statt Linien-Icon) */
.region-tab-icon svg.is-filled {
  fill: currentColor;
  stroke: none;
}

.region-tab.is-active {
  color: var(--gb-white);
  background: var(--gb-passion-red);
  box-shadow: 0 9px 22px rgba(182, 31, 52, 0.24);
}

.region-tab.is-active strong,
.region-tab.is-active .region-tab-icon {
  color: var(--gb-white);
}

.region-tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(89, 3, 24, 0.14);
}

.region-tab:focus-visible {
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.dashboard-heading {
  margin-bottom: 14px;
}

.overview-panel {
  display: grid;
  gap: 14px;
}

.overview-panel[hidden] {
  display: none;
}

.overview-content {
  display: grid;
  gap: 18px;
}

.overview-export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 14px 16px;
  background: var(--gb-background-light);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
}

.overview-export-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.overview-export-copy strong {
  color: var(--gb-black);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.overview-export-copy span {
  color: var(--gb-theme-text-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.overview-export-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.export-button {
  min-height: 38px;
  padding: 9px 13px;
  color: var(--gb-white);
  background: var(--gb-passion-red);
  border: 0;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  outline: none;
  transition: background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.export-button:hover:not(:disabled) {
  background: var(--gb-red-soft);
}

.export-button:focus {
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.export-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.overview-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  background: var(--gb-white);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
}

.overview-card.is-disabled {
  background: var(--gb-background-light);
}

.overview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.overview-card-header .eyebrow {
  margin-bottom: 5px;
  color: var(--gb-passion-red);
}

.overview-card-header h3 {
  margin: 0;
  color: var(--gb-black);
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.15;
}

.overview-activation {
  display: inline-grid;
  grid-template-columns: 18px auto;
  gap: 9px;
  align-items: center;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 12px;
  color: var(--gb-passion-red);
  background: var(--gb-white);
  border: 1px solid var(--gb-passion-red);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.overview-activation input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--gb-passion-red);
}

.overview-empty {
  margin: 0;
  color: var(--gb-theme-text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.overview-empty.is-warning {
  color: var(--gb-passion-red);
  font-weight: 700;
}

.overview-block {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.overview-block h4 {
  margin: 0;
  color: var(--gb-black);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.overview-selection {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.overview-selection-item {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.overview-selection dt,
.overview-selection dd {
  min-width: 0;
  margin: 0;
  padding: 0;
}

.overview-selection dt {
  color: var(--gb-black-soft-1);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}

.overview-selection dd {
  color: var(--gb-black);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.overview-weight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.overview-weight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  background: var(--gb-background-light);
  border-radius: 6px;
}

.overview-weight-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--gb-black);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-weight-row strong {
  color: var(--gb-black-soft-1);
  font-size: 0.82rem;
  font-weight: 700;
}

.overview-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.overview-kpi-card {
  padding: 14px;
}

.overview-totals-card {
  border-color: var(--gb-passion-red);
  border-width: 2px;
}

.overview-totals-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overview-kpi-card strong {
  font-size: 1.25rem;
}

.overview-table-wrap table {
  min-width: 760px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 24px 14px;
  align-items: end;
  padding: 18px;
  background: var(--gb-background-light);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
}

.control {
  display: grid;
  gap: 7px;
  min-width: 0;
  grid-column: span 2;
}

.control-label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.control-label label {
  color: var(--gb-black-soft-1);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.budget-net-control {
  grid-column: span 4;
}

.pay-factor-control {
  grid-column: span 3;
}

.gross-budget-control {
  grid-column: span 4;
}

.gross-budget-control .control-label label {
  color: var(--gb-black);
  font-weight: 700;
}

.gross-budget-control .money-field input {
  color: var(--gb-black);
  font-weight: 700;
}

.spot-control {
  grid-column: 1 / span 2;
}

.control span {
  color: var(--gb-black-soft-1);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.control input,
.control select {
  width: 100%;
  height: var(--filter-field-height);
  min-height: 0;
  padding: 10px 12px;
  color: var(--gb-black);
  background: var(--gb-white);
  border: 1px solid var(--gb-black-soft-4);
  border-radius: 6px;
  outline: none;
  font-weight: 300;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.control input:focus,
.control select:focus {
  border-color: var(--gb-passion-red);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.money-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  height: var(--filter-field-height);
  min-height: 0;
  background: var(--gb-white);
  border: 1px solid var(--gb-black-soft-4);
  border-radius: 6px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.money-field:focus-within {
  border-color: var(--gb-passion-red);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.money-field span {
  display: grid;
  place-items: center;
  align-self: stretch;
  padding: 0 11px;
  color: var(--gb-black-soft-1);
  background: var(--gb-white);
  border-right: 1px solid var(--gb-black-soft-4);
  font-size: 0.78rem;
  font-weight: 700;
}

.money-field input {
  height: calc(var(--filter-field-height) - 2px);
  min-height: 0;
  border: 0;
  box-shadow: none;
}

.money-field input:focus {
  box-shadow: none;
}

.money-field.is-readonly {
  background: var(--gb-background-light);
}

.money-field.is-readonly span,
.money-field.is-readonly input {
  background: var(--gb-background-light);
}

.money-field.is-readonly input {
  color: var(--gb-black-soft-1);
  cursor: default;
}

.gross-budget-control .money-field.is-readonly input {
  color: var(--gb-black);
  font-weight: 700;
}

.spot-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  height: var(--filter-field-height);
  min-height: 0;
  background: var(--gb-white);
  border: 1px solid var(--gb-black-soft-4);
  border-radius: 6px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.spot-field:focus-within {
  border-color: var(--gb-passion-red);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.spot-field input {
  width: 100%;
  min-width: 0;
  height: calc(var(--filter-field-height) - 2px);
  min-height: 0;
  padding: 10px 4px 10px 12px;
  color: var(--gb-black);
  background: transparent;
  border: 0;
  outline: none;
}

.spot-field span {
  padding: 0 11px 0 2px;
  color: var(--gb-black-soft-1);
  font-size: 0.78rem;
  font-weight: 700;
}

.date-field {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  height: var(--filter-field-height);
  min-height: 0;
  background: var(--gb-white);
  border: 1px solid var(--gb-black-soft-4);
  border-radius: 6px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.date-field:focus-within {
  border-color: var(--gb-passion-red);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.date-field select {
  width: 100%;
  min-width: 0;
  height: calc(var(--filter-field-height) - 2px);
  min-height: 0;
  padding: 10px 8px;
  color: var(--gb-black);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: none;
}

.date-field select:first-child {
  border-right: 1px solid var(--gb-black-soft-4);
}

.date-field input[type="hidden"] {
  display: none;
}

.reset-button {
  grid-column: span 2;
  height: var(--filter-field-height);
  min-height: 0;
  padding: 10px 14px;
  color: var(--gb-white);
  background: var(--gb-passion-red);
  border: 0;
  border-radius: 6px;
  font-weight: 700;
  outline: none;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.control select:disabled {
  cursor: default;
  opacity: 0.72;
}

.reset-button:hover {
  background: var(--gb-red-soft);
  border-color: var(--gb-red-soft);
}

.reset-button:focus {
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.sync-control {
  display: grid;
  gap: 7px;
  grid-column: span 4;
  min-width: 0;
}

.sync-control-label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: var(--filter-field-height);
  min-width: 0;
  padding: 8px 12px;
  color: var(--gb-black);
  background: var(--gb-white);
  border: 1px solid var(--gb-black-soft-4);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.sync-control-label:focus-within {
  border-color: var(--gb-passion-red);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.sync-control input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--gb-passion-red);
}

.sync-control-label > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sync-control small {
  color: var(--gb-black-soft-1);
  font-size: 0.72rem;
  font-weight: 300;
  line-height: 1.25;
}

.secondary-button {
  min-height: 36px;
  padding: 8px 12px;
  color: var(--gb-passion-red);
  background: var(--gb-white);
  border: 1px solid var(--gb-black-soft-4);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  outline: none;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.secondary-button:hover {
  background: rgba(182, 31, 52, 0.06);
}

.secondary-button:focus {
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.sender-mix {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
  min-width: 0;
  margin: 4px 0 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--gb-black-soft-4);
}

.sender-mix legend {
  padding: 0;
}

.sender-mix-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
}

.sender-mix-toggle {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 0;
  padding: 13px 16px;
  color: var(--gb-black);
  background: rgba(182, 31, 52, 0.07);
  border: 1px solid rgba(182, 31, 52, 0.22);
  border-radius: 8px;
  transition: background 160ms ease;
}

.sender-mix-toggle:hover {
  background: rgba(182, 31, 52, 0.12);
}

.sender-mix-toggle-btn {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 0;
  margin: 0;
  color: transparent;
  background: transparent;
  border: 0;
  border-radius: 8px;
  outline: none;
}

.sender-mix-toggle-btn:focus-visible {
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.sender-mix-toggle-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.sender-mix-toggle-badge {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--gb-white);
  background: var(--gb-passion-red);
  border-radius: 7px;
}

.sender-mix-toggle-badge svg {
  width: 15px;
  height: 15px;
}

.sender-mix-toggle-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.sender-mix-toggle-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sender-mix-toggle-title strong {
  color: var(--gb-black);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.sender-mix-toggle-title .tooltip-slot {
  position: relative;
  z-index: 2;
}

.sender-mix-toggle-sub {
  display: block;
  overflow: hidden;
  color: var(--gb-black-soft-1);
  font-size: 0.76rem;
  font-weight: 400;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sender-mix-toggle-icon {
  width: 9px;
  height: 9px;
  flex: none;
  border-right: 2px solid var(--gb-passion-red);
  border-bottom: 2px solid var(--gb-passion-red);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.sender-mix-toggle-btn[aria-expanded="false"] ~ .sender-mix-toggle-icon {
  transform: rotate(-45deg) translateY(0);
}

.sender-mix-content {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.sender-mix-content[hidden] {
  display: none;
}

.weight-basis {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  gap: 6px;
  align-items: center;
  justify-self: start;
  min-width: 0;
}

.weight-basis > span {
  margin-right: 4px;
  color: var(--gb-black-soft-1);
  font-size: 0.86rem;
  font-weight: 700;
}

.weight-basis > .tooltip-host {
  display: inline-flex;
}

.weight-basis label {
  display: grid;
}

.weight-basis-option {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.weight-basis input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.weight-basis label span {
  min-width: 76px;
  padding: 9px 12px;
  color: var(--gb-passion-red);
  background: var(--gb-white);
  border: 1px solid var(--gb-passion-red);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.weight-basis input:checked + span {
  color: var(--gb-white);
  background: var(--gb-passion-red);
}

.weight-basis input:focus + span {
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.sender-workspace {
  display: grid;
  grid-template-columns: minmax(330px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  min-width: 0;
}

.channel-picker,
.weight-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  background: var(--gb-white);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
}

.channel-picker {
  align-self: start;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  align-content: stretch;
  height: var(--channel-picker-height, 620px);
  min-height: 620px;
  width: 100%;
}

.weight-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.panel-heading h3 {
  margin: 0;
  color: var(--gb-black);
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.2;
}

.panel-heading span {
  color: var(--gb-black-soft-1);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: right;
}

.panel-heading span.is-warning {
  color: var(--gb-passion-red);
}

.weight-panel-heading {
  align-items: flex-start;
}

.weight-heading-copy {
  min-width: 0;
  max-width: 640px;
}

.weight-description {
  margin: 6px 0 0;
  color: var(--gb-black-soft-1);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.45;
}

.weight-description--notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--gb-passion-red);
  border-left: 4px solid var(--gb-passion-red);
  border-radius: 6px;
  background: rgba(182, 31, 52, 0.06);
  color: var(--gb-black);
  text-align: left;
}

.weight-description--notice span {
  text-align: left;
}

.weight-description--notice strong {
  color: var(--gb-passion-red);
}

.weight-description__icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--gb-passion-red);
}

.channel-search {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.channel-search span {
  color: var(--gb-black-soft-1);
  font-size: 0.76rem;
  font-weight: 700;
}

.channel-search input {
  width: 100%;
  height: 40px;
  min-height: 0;
  padding: 9px 11px;
  color: var(--gb-black);
  background: var(--gb-white);
  border: 1px solid var(--gb-black-soft-4);
  border-radius: 6px;
  outline: none;
}

.channel-search input:focus {
  border-color: var(--gb-passion-red);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.channel-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.channel-options {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  max-height: none;
  overflow-y: scroll;
  padding: 2px 10px 2px 2px;
  scrollbar-color: var(--gb-black-soft-2) var(--gb-background-light);
  scrollbar-gutter: stable;
  scrollbar-width: auto;
}

.channel-options::-webkit-scrollbar {
  width: 12px;
}

.channel-options::-webkit-scrollbar-track {
  background: var(--gb-background-light);
  border-radius: 999px;
}

.channel-options::-webkit-scrollbar-thumb {
  background: var(--gb-black-soft-3);
  border: 3px solid var(--gb-background-light);
  border-radius: 999px;
}

.channel-options::-webkit-scrollbar-thumb:hover {
  background: var(--gb-black-soft-2);
}

.channel-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 34px;
  padding: 7px 8px;
  color: var(--gb-black);
  background: var(--gb-background-light);
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
}

.channel-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--gb-passion-red);
}

.channel-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sender-empty {
  color: var(--gb-black-soft-1);
  font-size: 0.86rem;
  line-height: 1.4;
}

.sender-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.sender-tools span {
  color: var(--gb-black-soft-1);
  font-size: 0.86rem;
  font-weight: 700;
}

.sender-tools span.is-warning {
  color: var(--gb-passion-red);
}

.sender-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 106px;
  gap: 12px;
  align-items: center;
}

.sender-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
}

.sender-row {
  min-width: 0;
  padding: 9px 10px;
  background: var(--gb-white);
  border: 1px solid var(--surface-border);
  border-radius: 6px;
}

.sender-name {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--gb-black);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
}

.sender-name > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sender-mode {
  color: var(--gb-black-soft-2);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sender-weight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--gb-black-soft-4);
  border-radius: 6px;
  background: var(--gb-white);
}

.sender-weight:focus-within {
  border-color: var(--gb-passion-red);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.sender-weight input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 4px 7px 8px;
  color: var(--gb-black);
  background: transparent;
  border: 0;
  outline: none;
  text-align: right;
}

.sender-weight span {
  padding: 0 8px 0 2px;
  color: var(--gb-black-soft-1);
  font-size: 0.78rem;
  font-weight: 700;
}

.sender-row.is-manual {
  border-color: rgba(182, 31, 52, 0.38);
  background: rgba(182, 31, 52, 0.04);
}

.sender-row.is-manual .sender-mode {
  color: var(--gb-passion-red);
}

.status-line {
  min-height: 1.4em;
  margin-top: 12px;
}

.status-line.is-warning {
  color: var(--gb-passion-red);
  font-weight: 700;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.kpi-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  background: var(--gb-white);
  border: 1px solid var(--surface-border);
  border-top: 4px solid var(--gb-passion-red);
  border-radius: 8px;
}

.kpi-card p,
.kpi-card span {
  margin: 0;
  color: var(--gb-black-soft-1);
  line-height: 1.35;
}

.kpi-card p {
  font-size: 0.82rem;
  font-weight: 700;
}

.kpi-card p.tooltip-host {
  display: inline-flex;
  justify-self: start;
}

.kpi-card strong {
  display: block;
  min-width: 0;
  color: var(--gb-black);
  font-size: 1.72rem;
  font-weight: 700;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.kpi-card span {
  font-size: 0.82rem;
}

.trend-section,
.table-section {
  margin-top: 30px;
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.trend-panel {
  min-width: 0;
  padding: 16px;
  background: var(--gb-white);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
}

.trend-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.trend-label span {
  color: var(--gb-black-soft-1);
  font-size: 0.82rem;
  font-weight: 700;
}

.trend-label strong {
  color: var(--gb-black);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
}

.trend-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-axis {
  stroke: var(--gb-black-soft-4);
  stroke-width: 1;
}

.chart-grid {
  stroke: var(--gb-background-light);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: var(--gb-passion-red);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line-alt {
  stroke: var(--gb-fuchsia);
}

.chart-dot {
  fill: var(--gb-white);
  stroke: var(--gb-passion-red);
  stroke-width: 3;
}

.chart-dot-alt {
  stroke: var(--gb-fuchsia);
}

.chart-text {
  fill: var(--gb-black-soft-1);
  font-family: "LT Tetria", Arial, sans-serif;
  font-size: 12px;
  font-weight: 300;
}

.chart-current {
  fill: var(--gb-passion-red);
  font-weight: 700;
}

.trend-panel {
  position: relative;
}

.chart-hit {
  fill: transparent;
  cursor: pointer;
  outline: none;
}

.chart-hit:hover,
.chart-hit:focus-visible {
  fill: rgba(0, 0, 0, 0.06);
}

.chart-tooltip {
  position: absolute;
  z-index: 10;
  padding: 6px 10px;
  color: var(--gb-white);
  background: var(--gb-red-dark);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-size: 0.8rem;
  font-weight: 400;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 12px));
  transition: opacity 120ms ease;
}

.chart-tooltip.is-visible {
  opacity: 1;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: var(--gb-white);
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--surface-border);
  text-align: right;
  line-height: 1.35;
  white-space: nowrap;
}

th {
  color: var(--gb-black);
  background: var(--gb-background-light);
  font-size: 0.78rem;
  font-weight: 700;
}

th.tooltip-host {
  display: table-cell;
}

th.tooltip-host .tooltip-trigger {
  margin-left: 5px;
  vertical-align: middle;
}

td {
  color: var(--gb-black-soft-1);
  font-size: 0.9rem;
}

th:first-child,
td:first-child {
  text-align: left;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr.is-selected td {
  color: var(--gb-black);
  background: rgba(182, 31, 52, 0.06);
  font-weight: 700;
}

noscript {
  display: block;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 20px 32px;
  color: var(--gb-passion-red);
  font-weight: 700;
}

@media (max-width: 1020px) {
  .control,
  .control:first-child,
  .spot-control {
    grid-column: span 4;
  }

  .reset-button {
    grid-column: span 4;
  }

  .sync-control {
    grid-column: span 8;
  }

  .sender-workspace {
    grid-template-columns: 1fr;
  }

  .channel-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sender-rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-weight-list,
  .overview-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .header-inner {
    align-items: start;
    flex-direction: column;
    gap: 18px;
    padding: 22px 18px;
  }

  .dashboard {
    padding: 24px 16px 34px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .region-tabs {
    grid-template-columns: 1fr;
  }

  .region-tab {
    min-height: 68px;
  }

  .control,
  .control:first-child,
  .spot-control,
  .reset-button,
  .sync-control {
    grid-column: span 6;
  }

  .kpi-grid,
  .trend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-card-header {
    align-items: start;
    flex-direction: column;
  }

  .overview-export-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .overview-export-actions {
    justify-content: flex-start;
  }

  .overview-selection {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 2rem;
  }

  .calculator-intro p {
    font-size: 0.94rem;
  }

  .calculator-navigation {
    margin-bottom: 24px;
  }

  .region-tab {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 11px;
    padding: 12px 14px;
  }

  .region-tab-icon {
    width: 32px;
    height: 32px;
  }

  .header-inner {
    --logo-width: 126px;
    flex-wrap: wrap;
    gap: 14px 18px;
  }

  .language-switcher {
    gap: 5px;
  }

  .language-switcher a {
    min-width: 31px;
    padding: 7px 6px 6px;
    font-size: 0.76rem;
  }

  .filter-grid {
    padding: 14px;
  }

  .control,
  .control:first-child,
  .spot-control,
  .reset-button,
  .sync-control,
  .kpi-grid,
  .trend-grid {
    grid-column: span 14;
  }

  .kpi-grid,
  .trend-grid {
    grid-template-columns: 1fr;
  }

  .overview-selection,
  .overview-weight-list,
  .overview-kpi-grid,
  .overview-totals-grid {
    grid-template-columns: 1fr;
  }

  .overview-export-actions {
    flex-direction: column;
  }

  .export-button {
    width: 100%;
  }

  .sender-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .weight-basis {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .weight-basis > span {
    grid-column: 1 / -1;
  }

  .secondary-button {
    width: 100%;
  }

  .channel-actions,
  .channel-options {
    grid-template-columns: 1fr;
  }

  .channel-picker {
    height: var(--channel-picker-height, 520px);
    min-height: 520px;
  }

  .sender-rows {
    grid-template-columns: 1fr;
  }

  .kpi-card strong {
    font-size: 1.5rem;
  }
}

/* Zeitschienen-Verteilung unter der Zielgruppen-Auswahl */
.target-group-control {
  position: relative;
}

/* Text-Link liegt absolut unter dem Feld, damit das Feld oben bündig mit den anderen Filtern bleibt */
.timeslot-toggle {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  color: var(--gb-black);
  background: none;
  border: 0;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.timeslot-toggle:hover,
.timeslot-toggle[aria-expanded="true"] {
  color: var(--gb-passion-red);
}

.timeslot-toggle:focus-visible {
  outline: 2px solid var(--gb-black);
  outline-offset: 2px;
}

.timeslot-toggle-icon {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 200ms ease;
}

.timeslot-toggle[aria-expanded="true"] .timeslot-toggle-icon {
  transform: rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
  .timeslot-toggle-icon {
    transition: none;
  }
}

.timeslot-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  background: var(--gb-white);
  border: 1px solid var(--gb-black-soft-4);
  border-radius: 8px;
}

.timeslot-panel[hidden] {
  display: none;
}

.timeslot-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.timeslot-bar {
  display: flex;
  gap: 2px;
  height: 36px;
  overflow: hidden;
  border-radius: 6px;
}

.timeslot-segment {
  display: flex;
  flex-basis: 0;
  align-items: center;
  justify-content: center;
  min-width: 4px;
  font-size: 0.78rem;
  font-weight: 900;
}

.timeslot-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 6px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
}

.timeslot-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeslot-legend i {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.timeslot-legend strong {
  margin-left: auto;
  font-weight: 900;
}

.timeslot-note {
  margin: 0;
  color: var(--gb-black-soft-1);
  font-size: 0.72rem;
}


/* Footer (identisch zu replay-regio-ids.goldbach.com) */
.site-footer {
  padding-top: 70px;
  color: var(--gb-white);
  background: #111111;
}

.footer-shell {
  width: min(calc(100% - 48px), var(--content-max-width));
  margin-inline: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.7fr;
  gap: 60px;
}

.footer-logo {
  max-width: 100%;
  display: block;
  width: 190px;
  height: auto;
  margin-bottom: 30px;
}

.site-footer p {
  margin: 0 0 1rem;
  color: inherit;
  line-height: 1.55;
}

.footer-title {
  margin: 0 0 1.5rem;
  color: inherit;
  font-family: "LT Tetria", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gb-pink);
  text-decoration: none;
}

.footer-bottom {
  margin-top: 55px;
  padding: 20px 0;
  border-top: 1px solid var(--gb-black-soft-1);
  font-size: 0.8rem;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .footer-shell {
    width: min(calc(100% - 32px), var(--content-max-width));
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* SVG-Sprite unsichtbar halten (statt Inline-Style, wegen CSP style-src self) */
.svg-sprite {
  position: absolute;
}
