/* X-Bridge-Produktseite. Signatur: die Brücke zwischen PDF und Rechnungsdaten. */

.xb-hero {
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(24rem, 1.2fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: center;
  min-height: 100svh;
  padding: calc(var(--header-height) + clamp(2rem, 5vw, 4rem)) var(--side) clamp(3rem, 6vw, 5rem);
  background: var(--night);
  color: var(--paper);
}

.xb-product {
  margin: 0 0 1.2rem;
  color: var(--sand);
  font-size: 1.05rem;
  font-weight: 520;
  letter-spacing: -0.02em;
}

.xb-hero h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.4rem, 4.6vw, 5.2rem);
  font-weight: 360;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.xb-lead {
  max-width: 34rem;
  margin: clamp(1.4rem, 3vw, 2.4rem) 0 0;
  color: var(--paper-soft);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
}

/* Die Brücke */
.xb-bridge {
  margin: 0;
}

.xb-bridge figcaption {
  margin-bottom: 0.9rem;
  color: var(--paper-quiet);
  font-size: 0.86rem;
}

.xb-panes {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(2.5rem, 6vw, 6rem) minmax(0, 1fr);
  align-items: stretch;
}

.xb-pdf { grid-column: 1; }
.xb-xml { grid-column: 3; }

.xb-pane-label {
  margin: 0 0 0.7rem;
  color: var(--paper-quiet);
  font-size: 0.8rem;
}

.xb-sheet {
  padding: clamp(1rem, 2vw, 1.6rem);
  background: var(--paper);
  color: var(--night);
  font-size: 0.86rem;
  line-height: 1.35;
}

.xb-sheet-head {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}

.xb-sheet-head strong {
  font-size: 1.25rem;
  font-weight: 520;
  letter-spacing: -0.03em;
}

.xb-sheet dl {
  display: grid;
  gap: 0.25rem;
  margin: 0;
}

.xb-sheet dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.xb-sheet dt {
  color: var(--ink-quiet);
}

.xb-sheet dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.xb-sheet table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.xb-sheet th {
  border-bottom: 1px solid var(--night);
  padding: 0.3rem 0;
  font-weight: 520;
  text-align: left;
}

.xb-sheet td {
  border-bottom: 1px solid var(--line-dark);
  padding: 0.35rem 0;
}

.xb-sheet th:nth-child(n+2),
.xb-sheet td:nth-child(n+2) {
  padding-left: 0.6rem;
  text-align: right;
  white-space: nowrap;
}

.xb-sums {
  margin-left: auto !important;
  max-width: 14rem;
}

.xb-total {
  margin-top: 0.3rem;
  border-top: 1px solid var(--night);
  padding-top: 0.35rem;
  font-weight: 560;
}

.xb-total dt {
  color: var(--night) !important;
}

.xb-pdf [data-pair],
.xb-xml [data-pair] {
  border-radius: 2px;
  transition: background-color 160ms ease, color 160ms ease;
}

.xb-pdf [data-pair].is-lit {
  background: rgb(199 180 142 / 45%);
}

.xb-pdf [data-pair].is-off {
  background: rgb(162 69 47 / 16%);
  color: var(--block);
}

.xb-xml {
  display: flex;
  flex-direction: column;
}

.xb-code {
  flex: 1;
  margin: 0;
  border: 1px solid var(--line-light);
  padding: clamp(0.9rem, 1.8vw, 1.4rem) clamp(0.8rem, 1.5vw, 1.2rem);
  list-style: none;
  font-family: "CH Mono", monospace;
  font-size: clamp(0.62rem, 0.78vw, 0.74rem);
  line-height: 1.5;
}

.xb-code li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.8rem;
  padding: 0.18rem 0;
}

.xb-code code {
  flex: 1 0 100%;
  color: var(--paper-quiet);
  font-family: inherit;
  overflow-wrap: anywhere;
}

.xb-code b {
  padding-left: 1.2em;
  color: var(--paper);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.xb-code b.is-lit {
  color: var(--sand);
}

.xb-mark {
  color: var(--paper-quiet);
  font-family: "CH Grotesk", sans-serif;
  font-size: 0.72rem;
  white-space: nowrap;
}

.xb-mark.is-off {
  color: #e29a85;
}

.xb-gap code {
  color: rgb(241 238 229 / 30%);
}

.xb-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.xb-links path {
  fill: none;
  stroke: var(--sand);
  stroke-width: 1.5;
  stroke-dasharray: 1.5 5;
  stroke-linecap: round;
}

.xb-links path.is-off {
  stroke: #e29a85;
  stroke-dasharray: 6 9;
}

.xb-links circle {
  fill: var(--sand);
}

.xb-links circle.is-off {
  fill: #e29a85;
}

.xb-verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 1.1rem;
  border-top: 1px solid var(--line-light);
  padding-top: 1rem;
}

.xb-status {
  max-width: 34rem;
  margin: 0;
  color: var(--paper-soft);
  font-size: 0.95rem;
}

.xb-status strong {
  color: var(--sand);
  font-weight: 560;
}

.xb-bridge.is-blocked .xb-status strong {
  color: #e29a85;
}

.xb-toggle {
  border: 1px solid var(--paper);
  border-radius: 0;
  padding: 0.65rem 1rem;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 150ms ease, color 150ms ease;
}

.xb-toggle:hover {
  background: var(--paper);
  color: var(--night);
}

/* Cockpit */
.xb-cockpit {
  padding: var(--section) var(--side);
  background: var(--paper);
}

.xb-cockpit-head {
  display: grid;
  grid-template-columns: minmax(14rem, 0.8fr) minmax(18rem, 1.2fr);
  gap: clamp(2rem, 6vw, 7rem);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.xb-cockpit h2 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5.6rem);
  font-weight: 360;
  letter-spacing: -0.07em;
  line-height: 0.94;
}

.xb-cockpit-head p {
  max-width: 40rem;
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.35vw, 1.2rem);
}

.xb-board {
  margin: 0;
  background: var(--night);
  color: var(--paper);
}

.xb-board-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  border-bottom: 1px solid var(--line-light);
  padding: 1.1rem clamp(1rem, 2.5vw, 2rem);
}

.xb-board-state {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  color: var(--signal-on-night);
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-weight: 520;
  letter-spacing: -0.02em;
}

.xb-lamp {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--signal-on-night);
  box-shadow: 0 0 0 4px rgb(127 207 155 / 18%);
}

.xb-board figcaption {
  color: var(--paper-quiet);
  font-size: 0.85rem;
}

.xb-board-scroll {
  overflow-x: auto;
}

.xb-board table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.xb-board th,
.xb-board td {
  border-bottom: 1px solid var(--line-light);
  padding: 0.85rem clamp(1rem, 2.5vw, 2rem);
  text-align: left;
  white-space: nowrap;
}

.xb-board thead th {
  color: var(--paper-quiet);
  font-size: 0.8rem;
  font-weight: 450;
}

.xb-board tbody th {
  font-family: "CH Mono", monospace;
  font-size: 0.85rem;
  font-weight: 400;
}

.xb-board tbody tr:last-child th,
.xb-board tbody tr:last-child td {
  border-bottom: 0;
}

.xb-ok {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--signal-on-night);
}

.xb-ok::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
}

@media (max-width: 760px) {
  .xb-cockpit-head {
    grid-template-columns: 1fr;
  }
}

/* Inhaltsabschnitte */
.xb-why,
.xb-flow,
.xb-features,
.xb-trust,
.xb-service {
  padding: var(--section) var(--side);
}

.xb-why h2,
.xb-flow h2,
.xb-features h2,
.xb-trust h2,
.xb-service h2 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5.6rem);
  font-weight: 360;
  letter-spacing: -0.07em;
  line-height: 0.94;
}

.xb-why {
  display: grid;
  grid-template-columns: minmax(14rem, 0.8fr) minmax(18rem, 1.2fr);
  gap: clamp(2rem, 6vw, 7rem);
  background: var(--paper);
}

.xb-why p {
  max-width: 40rem;
  margin: 0 0 1.1rem;
  font-size: clamp(1.02rem, 1.35vw, 1.22rem);
}

.xb-why .xb-source {
  margin-top: 1.6rem;
  color: var(--ink-quiet);
  font-size: 0.92rem;
}

.xb-flow {
  background: var(--fog);
}

.xb-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 clamp(1.5rem, 3vw, 3rem);
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.xb-steps li {
  border-top: 1px solid var(--night);
  padding: 1.2rem 0 clamp(2rem, 4vw, 3rem);
  counter-increment: step;
}

.xb-steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 1.6rem;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.06em;
  line-height: 1;
}

.xb-steps h3 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.25rem, 1.7vw, 1.6rem);
  font-weight: 460;
  letter-spacing: -0.035em;
}

.xb-steps p {
  max-width: 28rem;
  margin: 0;
  color: var(--ink-soft);
}

.xb-features {
  background: var(--night);
  color: var(--paper);
}

.xb-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--paper);
}

.xb-feature-grid > section {
  padding: 1.4rem clamp(1rem, 2vw, 2rem) 0 0;
}

.xb-feature-grid > section + section {
  border-left: 1px solid var(--line-light);
  padding-left: clamp(1rem, 2vw, 2rem);
}

.xb-feature-grid h3 {
  margin: 0 0 1rem;
  color: var(--sand);
  font-size: 1.05rem;
  font-weight: 520;
  letter-spacing: -0.02em;
}

.xb-feature-grid ul {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--paper-soft);
}

.xb-trust {
  background: var(--paper);
}

.xb-trust-list {
  margin-top: clamp(3rem, 6vw, 5rem);
}

.xb-service {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  background: var(--fog);
}

.xb-service p {
  max-width: 40rem;
  margin: 1.4rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
}

.xb-service .v9-more {
  color: var(--night);
  text-decoration: none;
  border-bottom-color: var(--night);
}

@media (max-width: 1100px) {
  .xb-hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
  }

  .xb-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .xb-feature-grid > section:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .xb-feature-grid > section {
    padding-bottom: 2rem;
  }
}

@media (max-width: 760px) {
  .xb-panes {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
  }

  .xb-pdf,
  .xb-xml {
    grid-column: 1;
    min-width: 0;
  }

  .xb-links {
    display: none;
  }

  .xb-why,
  .xb-steps,
  .xb-feature-grid {
    grid-template-columns: 1fr;
  }

  .xb-feature-grid > section,
  .xb-feature-grid > section + section {
    border-left: 0;
    border-bottom: 1px solid var(--line-light);
    padding: 1.4rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xb-pdf [data-pair],
  .xb-toggle {
    transition: none;
  }
}

/* Produktseite: Kopf von Anfang an mit Grund, Menü verhält sich wie auf der Startseite */
.site-header.is-solid {
  border-bottom: 1px solid var(--line-light);
  background: rgb(9 17 22 / 94%);
  backdrop-filter: blur(12px);
}

@media (max-width: 760px) {
  .site-header.is-solid {
    background: var(--night);
    backdrop-filter: none;
  }
}
