.mast:has(> .station-domain:not([hidden])) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px 10px;
}

.mast:has(> .station-domain:not([hidden])) > #site-name {
  grid-area: 1 / 1;
  justify-self: start;
}

.mast:has(> .station-domain:not([hidden])) > .station-detail-close {
  grid-area: 1 / 2 / span 2;
  min-inline-size: 44px;
}

.station-domain {
  grid-area: 2 / 1;
  justify-self: start;
  min-inline-size: 0;
  max-inline-size: 100%;
  font-size: 13px;
  line-height: 1.35;
}

.station-domain[hidden] {
  display: none;
}

.station-domain-note {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

html:not([data-post-detail=true], [data-paper-detail=true]) .station-domain-note {
  color: var(--muted);
}

#station-domain-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

html:is([data-post-detail=true], [data-paper-detail=true]) #station-domain-link {
  color: inherit;
}

.station-domain a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media (min-width: 701px) {
  html:not([data-post-detail=true], [data-paper-detail=true]) .mast:has(> .station-domain:not([hidden])) {
    display: flex;
  }

  html:not([data-post-detail=true], [data-paper-detail=true]) .station-domain {
    margin-inline-start: auto;
    max-inline-size: 50%;
  }
}
