:root {
  --stream-space-xs: 8px;
  --stream-space-sm: 14px;
  --stream-space-md: 22px;
  --stream-space-lg: 34px;
  --stream-space-xl: 54px;
  --stream-board-pad: 30px;
  --stream-board-min: 430px;
  --stream-reading-width: 850px;
  --stream-note-width: 430px;
  --stream-table-width: 880px;
  --stream-label-width: 58px;
  --stream-label-height: 42px;
  --stream-hero-min: 610px;
  --stream-grid-gap: 64px;
  --stream-title-size: 20px;
  --stream-body-size: 15px;
  --stream-small-size: 13px;
  --stream-line-height: 1.78;
  --stream-arrow-size: 28px;
}

.media-hero {
  overflow-x: clip;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-canvas);
}

.media-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(var(--stream-board-min), .82fr);
  gap: var(--stream-grid-gap);
  min-height: var(--stream-hero-min);
  align-items: center;
  padding-top: var(--stream-space-xl);
  padding-bottom: var(--stream-space-xl);
}

.media-hero-copy {
  max-width: var(--stream-reading-width);
}

.media-hero-copy .lead {
  margin-bottom: var(--stream-space-lg);
}

.media-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--stream-space-sm);
}

.media-guide-board {
  overflow: hidden;
  border-radius: var(--radius-board);
  background: var(--color-route);
  box-shadow: var(--shadow-board);
  color: var(--color-white);
}

.media-board-strip {
  height: calc(var(--stream-space-xs) / 2);
  background: var(--color-accent);
}

.media-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--stream-space-md);
  padding: var(--stream-space-md) var(--stream-board-pad);
  color: var(--color-white-soft);
  font-family: var(--font-mono);
  font-size: var(--stream-small-size);
  letter-spacing: .08em;
}

.media-board-state {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--stream-space-xs);
  color: var(--color-accent);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0;
}

.media-board-state .status-dot {
  box-shadow: none;
}

.media-board-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.media-board-list li {
  display: grid;
  grid-template-columns: auto minmax(0, .7fr) minmax(0, 1.3fr);
  gap: var(--stream-space-md);
  align-items: center;
  padding: var(--stream-space-md) var(--stream-board-pad);
  border-top: 1px solid var(--color-white-faint);
}

.media-board-code {
  display: inline-flex;
  min-width: var(--stream-label-width);
  min-height: var(--stream-label-height);
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-white-faint);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: var(--stream-small-size);
}

.media-board-list strong {
  color: var(--color-white);
  font-size: var(--stream-title-size);
}

.media-board-list li > span:last-child {
  color: var(--color-white-soft);
  font-size: var(--stream-small-size);
}

.streaming-content {
  position: relative;
  padding-top: var(--stream-space-lg);
}

.streaming-content .toc-tabs {
  top: var(--stream-space-xs);
}

.section-note {
  max-width: var(--stream-note-width);
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: var(--stream-body-size);
}

.streaming-intro {
  max-width: var(--stream-reading-width);
  margin-bottom: var(--stream-space-lg);
  color: var(--color-muted);
  line-height: var(--stream-line-height);
}

.media-support-table {
  min-width: var(--stream-table-width);
}

.media-support-table td {
  color: var(--color-muted);
  line-height: var(--stream-line-height);
}

.media-support-table td:first-child {
  white-space: nowrap;
  color: var(--color-route);
}

.streaming-reading {
  width: 100%;
  max-width: var(--stream-reading-width);
  margin-inline: auto;
}

.streaming-reading > p {
  color: var(--color-muted);
  line-height: var(--stream-line-height);
}

.streaming-reading > p + p {
  margin-top: var(--stream-space-md);
}

.media-route-list {
  margin-top: var(--stream-space-lg);
}

.media-route-list .route-feature p {
  max-width: var(--stream-reading-width);
  line-height: var(--stream-line-height);
}

.media-steps {
  display: grid;
  margin: var(--stream-space-lg) 0 0;
  padding: 0;
  border-top: 3px solid var(--color-accent);
  counter-reset: media-step;
  list-style: none;
}

.media-steps li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: var(--stream-space-lg);
  padding: var(--stream-space-lg) var(--stream-space-lg) var(--stream-space-lg) calc(var(--stream-space-xl) + var(--stream-space-lg));
  border-bottom: 1px solid var(--color-line);
  counter-increment: media-step;
}

.media-steps li::before {
  position: absolute;
  top: var(--stream-space-lg);
  left: var(--stream-space-md);
  display: inline-flex;
  width: var(--stream-label-height);
  height: var(--stream-label-height);
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--color-route);
  color: var(--color-white);
  content: counter(media-step);
  font-family: var(--font-mono);
  font-size: var(--stream-small-size);
}

.media-steps h3 {
  margin-bottom: 0;
  font-size: var(--stream-title-size);
}

.media-steps p {
  margin-bottom: 0;
  color: var(--color-muted);
  line-height: var(--stream-line-height);
}

.error-ledger {
  margin-top: var(--stream-space-lg);
  border-top: 3px solid var(--color-accent);
}

.error-row {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: var(--stream-space-lg);
  padding-top: var(--stream-space-lg);
  padding-bottom: var(--stream-space-lg);
  border-bottom: 1px solid var(--color-line);
}

.error-row h3 {
  margin-bottom: 0;
  font-size: var(--stream-title-size);
}

.error-row p {
  margin-bottom: 0;
  color: var(--color-muted);
  line-height: var(--stream-line-height);
}

.device-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 3px solid var(--color-accent);
}

.device-check-grid > div {
  padding: var(--stream-space-lg);
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.device-check-grid > div:nth-child(odd) {
  border-left: 1px solid var(--color-line);
}

.device-check-grid h3 {
  font-size: var(--stream-title-size);
}

.device-check-grid p {
  color: var(--color-muted);
  line-height: var(--stream-line-height);
}

.platform-line {
  margin-top: var(--stream-space-lg);
  padding: var(--stream-space-md);
  border-left: 3px solid var(--color-route);
  background: var(--color-panel);
  color: var(--color-muted);
}

.platform-line strong {
  color: var(--color-ink);
}

.media-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--stream-space-xl);
  align-items: center;
  border-top: 3px solid var(--color-accent);
}

.media-next-copy {
  max-width: var(--stream-reading-width);
}

.media-next-copy p {
  color: var(--color-muted);
  line-height: var(--stream-line-height);
}

@media (max-width: 1180px) {
  .media-hero-grid {
    grid-template-columns: 1fr;
  }

  .media-guide-board {
    width: min(100%, var(--stream-reading-width));
  }
}

@media (max-width: 820px) {
  .media-steps li,
  .error-row {
    grid-template-columns: 1fr;
    gap: var(--stream-space-sm);
  }

  .device-check-grid {
    grid-template-columns: 1fr;
  }

  .device-check-grid > div,
  .device-check-grid > div:nth-child(odd) {
    border-right: 1px solid var(--color-line);
    border-left: 1px solid var(--color-line);
  }

  .media-next {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .media-hero-grid {
    min-height: auto;
    gap: var(--stream-space-lg);
    padding-top: var(--stream-space-lg);
    padding-bottom: var(--stream-space-lg);
  }

  .media-hero-links > * {
    width: 100%;
  }

  .media-board-head {
    align-items: flex-start;
    flex-direction: column;
    padding-inline: var(--stream-space-md);
  }

  .media-board-list li {
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--stream-space-sm);
    padding-inline: var(--stream-space-md);
  }

  .media-board-list li > span:last-child {
    grid-column: 2;
  }

  .media-steps li {
    padding: var(--stream-space-lg) var(--stream-space-md) var(--stream-space-lg) calc(var(--stream-space-xl) + var(--stream-space-md));
  }

  .media-steps li::before {
    left: var(--stream-space-xs);
  }

  .device-check-grid > div {
    padding: var(--stream-space-md);
  }
}