/* Station identity, profile and Python status. */
/* One identity, one set of controls, one clearly explained code status. */
header.station-header {
  display: grid;
  grid-template-columns: minmax(250px,1fr) auto;
  gap: 15px 24px;
  align-items: center;
  min-height: 0;
  height: auto;
  padding: 20px 36px 14px;
  background: #10272bf5;
  box-shadow: 0 3px 22px #0002;
}
.station-header .station-identity {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}
.station-header .brand {
  flex: 0 0 auto;
  gap: 11px;
}
.station-header .brand .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  padding: 9px;
  border-radius: 14px;
}
.station-header .brand>span:last-child {
  font-size: 24px;
  line-height: 1;
  letter-spacing: 3px;
}
.station-header .brand small {
  letter-spacing: 1px;
  margin-top: 8px;
  line-height: 1.3;
}
.station-header .chapter {
  display: block;
  border-left: 1px solid #3b5d58;
  padding-left: 24px;
  min-width: 0;
  line-height: 1.5;
  letter-spacing: .7px;
}
.station-header .chapter b {
  font-size: 14px;
  line-height: 1.5;
  margin-top: 4px;
  letter-spacing: 0;
}
.station-header .header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  min-width: 0;
  flex-shrink: 1;
}
.station-header .header-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.station-header .header-buttons button {
  min-height: var(--control-min);
  padding: 10px 13px;
  font-size: 14px;
}
.station-header .header-actions #player-label {
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 290px;
  min-width: 180px;
  min-height: 64px;
  padding: 9px 13px;
  border: 1px solid #769880;
  border-radius: 14px;
  background: linear-gradient(135deg,#2b4c3e,#1b3938);
  color: #d2e8d1;
  font: inherit;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  box-shadow: inset 0 1px #d5f6ce15;
}
.station-header .engineer-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 38px;
  color: #f3cf91;
}
.station-header .engineer-mark .ui-icon {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
}
.station-header .engineer-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
  line-height: 1.3;
}
.station-header .engineer-label {
  font: 11px/1.3 var(--font-body);
  color: #b9cfbc;
  letter-spacing: .3px;
}
.station-header .engineer-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  color: #ffe1a6;
  overflow-wrap: anywhere;
}
.station-header .engineer-specialization {
  font: 12px/1.4 var(--font-body);
  color: #b8d2c0;
}
.station-header #python-status.runtime {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid #345956;
  border-radius: var(--radius-control);
  background: #102229;
  color: #b5d5c5;
  font: 13px/1.5 var(--font-body);
  white-space: normal;
  flex-shrink: 1;
}
.station-header .runtime-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  background: #284c41;
  color: #b5e9c1;
}
.station-header .runtime-mark .ui-icon {
  width: 19px;
  height: 19px;
  flex-basis: 19px;
}
.station-header .runtime-copy {
  flex: 1;
  min-width: 0;
}
.station-header .runtime-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  font-size: 13px;
  line-height: 1.5;
}
.station-header .runtime-label {
  color: #a6beb5;
}
.station-header .runtime-state {
  color: #ccebd0;
  font-weight: 650;
}
.station-header .runtime-description {
  margin: 2px 0 0;
  color: #a3bcb3;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.station-header #runtime-retry {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-color: #c4a36c;
  color: #ffe2b0;
  background: #463c2b;
  box-shadow: none;
}
.station-header .runtime-diagnostics {
  border: 0;
  padding: 0;
  min-width: 0;
  max-width: 280px;
  font-size: 12px;
  line-height: 1.6;
  color: #cbb8a1;
}
.station-header .runtime-diagnostics summary {
  color: #dfc39b;
  cursor: pointer;
}
.station-header .runtime-diagnostics p {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  white-space: normal;
}
.station-header #python-status[data-state=loading] .runtime-mark {
  background: #3e3d2b;
  color: #f4d39b;
  animation: runtime-pulse 2.2s ease-in-out infinite;
}
.station-header #python-status[data-state=loading] .runtime-state {
  color: #f5d6a0;
}
.station-header #python-status[data-state=error] {
  background: #302c28;
  border-color: #8c7159;
}
.station-header #python-status[data-state=error] .runtime-mark {
  background: #594132;
  color: #ffd6a7;
}
.station-header #python-status[data-state=error] .runtime-state {
  color: #ffdab0;
}
.station-header #python-status[data-state=error] .runtime-description {
  color: #d5c4ad;
}
@keyframes runtime-pulse {
  0%,100% {
    opacity: 1;
  }
  50% {
    opacity: .55;
  }
}
.station-header .brand small,.station-header .chapter,.station-header .engineer-label {
  font-size: 12px;
}
.station-header #runtime-retry {
  min-height: var(--control-min);
  font-size: 14px;
}
.station-header .runtime-diagnostics summary {
  min-height: var(--control-min);
  padding: 10px 0;
}
@media(min-width:1250px) {
  .station-header .runtime-copy {
    display: flex;
    align-items: center;
    gap: 17px;
  }
  .station-header .runtime-description {
    margin: 0;
  }
  .station-header .runtime-heading {
    flex: 0 0 auto;
  }
}
@media(max-width:1249px) {
  header.station-header {
    padding: 18px 24px 14px;
    gap: 14px 20px;
  }
  .station-header .station-identity {
    gap: 18px;
  }
  .station-header .chapter {
    padding-left: 18px;
  }
  .station-header .header-actions {
    gap: 12px;
  }
  .station-header .header-actions #player-label {
    min-width: 165px;
    max-width: 250px;
  }
}
@media(max-width:1040px) {
  .station-header .chapter {
    display: none;
  }
  .station-header .header-actions #player-label {
    max-width: 260px;
  }
  .station-header .brand>span:last-child {
    font-size: 22px;
  }
  .station-header .header-actions {
    gap: 12px;
  }
}
@media(max-width:760px) {
  header.station-header {
    grid-template-columns: minmax(0,1fr);
    padding: 17px 18px 13px;
    gap: 14px;
  }
  .station-header .station-identity {
    justify-content: center;
  }
  .station-header .brand>span:last-child {
    font-size: 24px;
  }
  .station-header .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 12px;
  }
  .station-header .header-actions #player-label {
    max-width: none;
    min-width: 0;
    width: 100%;
    padding: 9px 11px;
  }
  .station-header .header-buttons {
    gap: 8px;
  }
  .station-header .header-buttons button {
    font-size: 13px;
    padding: 10px;
  }
  .station-header #python-status.runtime {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 11px 12px;
  }
  .station-header .runtime-copy {
    flex-basis: calc(100% - 40px);
  }
  .station-header #runtime-retry {
    margin-left: 40px;
  }
  .station-header .runtime-diagnostics {
    max-width: none;
    flex-basis: calc(100% - 40px);
    margin-left: 40px;
  }
}
@media(max-width:440px) {
  header.station-header {
    padding: 15px 14px 12px;
  }
  .station-header .header-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .station-header .header-actions #player-label {
    min-height: 66px;
  }
  .station-header .header-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 10px;
  }
  .station-header .header-buttons button {
    font-size: 14px;
  }
  .station-header .engineer-name {
    font-size: 18px;
  }
  .station-header .runtime-heading {
    gap: 2px 10px;
  }
  .station-header .runtime-description {
    font-size: 12px;
    line-height: 1.6;
  }
}
@media(prefers-reduced-motion:reduce) {
  .station-header #python-status[data-state=loading] .runtime-mark {
    animation: none;
  }
}
