/*
  Zweck: Desktop-Regeln ab 1181px für Header, Raster und Modulnavigation.
  Zielpfad: /home/mckiede/public_html/design/layout-desktop-wide.css
  Verantwortlich: mckie-Portal
*/

@media (min-width: 1181px) {
  /*
    Header action row: Kommandozentrale | NAV-Sensor | Icons auf einer Höhe.
    display:contents auf brand/status — Kinder landen im Header-Grid.
  */
  .command-header {
    grid-template-columns: 12rem minmax(0, 1fr) minmax(7.25rem, 10.25rem) minmax(14rem, 18rem) 2.8rem;
    grid-template-rows: var(--header-bar) auto var(--header-action-h);
    padding-bottom: 1.1rem;
    overflow: visible;
  }

  .header-bars {
    left: 12rem;
    right: 2.8rem;
  }

  .header-elbow-left {
    grid-column: 1;
    grid-row: 1 / -1;
  }

  .header-elbow-right {
    grid-column: 5;
    grid-row: 1 / -1;
  }

  .header-brand,
  .header-status {
    margin-top: 0;
    padding: 0;
    overflow: visible;
  }

  .header-brand {
    display: contents;
  }

  .header-brand p {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin: 0;
    padding: calc(var(--header-bar) + 0.25rem) 0 0 0.85rem;
  }

  .header-brand h1 {
    display: flex;
    grid-column: 2;
    grid-row: 3;
    align-items: center;
    align-self: center;
    margin: 0;
    padding: 0 0 0 0.85rem;
    height: var(--header-action-h);
    min-height: var(--header-action-h);
    container-type: inline-size;
  }

  .header-brand #page-title {
    font-size: clamp(0.52rem, 5.25cqi, 2.65rem);
    line-height: 0.9;
  }

  .header-brand .nav-sensor-map {
    grid-column: 3;
    grid-row: 3;
    align-self: center;
    justify-self: end;
    width: 100%;
    max-width: 10.25rem;
    height: var(--header-action-h);
    margin: 0 0.45rem 0 0;
  }

  .header-status {
    display: contents;
  }

  .header-status > span {
    position: relative;
    top: auto;
    right: auto;
    grid-column: 4;
    grid-row: 1;
    align-self: start;
    justify-self: end;
    margin: 0 0.35rem 0 0;
  }

  .header-status strong {
    grid-column: 4;
    grid-row: 2;
    align-self: end;
    margin: 0;
    padding: calc(var(--header-bar) + 0.2rem) 0.35rem 0.15rem 0;
  }

  .header-status .header-controls {
    grid-column: 4;
    grid-row: 3;
    align-self: center;
    justify-self: end;
    height: var(--header-action-h);
    margin: 0 0.35rem 0 0;
  }

  /* Desktop only: unwrap panel matrix into the 3-column command grid. */
  .command-panel-matrix {
    display: contents;
  }

  .side-rail {
    grid-column: 1;
    grid-row: 1;
  }

  .main-console {
    grid-column: 2;
    grid-row: 1;
  }

  .module-rail {
    grid-column: 3;
    grid-row: 1;
  }

  .status-strip {
    flex: 0 0 auto;
  }

  .module-view {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .module-view.is-history,
  .module-view.is-single {
    overflow-y: auto;
  }

  .module-stack {
    min-height: 0;
  }

  .module-rail {
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(180deg, var(--wash-primary-16), transparent 30%), var(--console-rail);
    color: var(--text);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    clip-path: none;
    border: var(--console-seam) solid var(--console-frame);
    border-left: 0;
    box-shadow:
      inset 0.42rem 0 0 var(--segment-muted),
      var(--shadow);
  }

  .module-rail .module-buttons {
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .module-rail .module-button {
    min-height: 4.25rem;
    height: auto;
  }
}

.module-rail-header h2 {
  margin-bottom: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 0.95;
  text-transform: uppercase;
}
