:root {
  --stream-lead-size: clamp(1.0625rem, 1.65vw, 1.25rem);
  --stream-table-min: 49rem;
  --stream-rule-gap: clamp(24px, 5vw, 64px);
}

.stream-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: end;
  gap: var(--stream-rule-gap);
}

.stream-intro h1 {
  margin-block-start: 18px;
  line-height: 1.1;
  text-wrap: wrap;
}

.stream-lead {
  margin-block: 18px 0;
  max-width: 32em;
  color: var(--text-muted);
  font-size: var(--stream-lead-size);
}

.stream-note {
  border-inline-start: 3px solid var(--accent);
}

.stream-note p {
  margin: 0;
  color: var(--text-muted);
}

.stream-note .mono {
  margin-block-end: 8px;
  color: var(--text);
  font-weight: 700;
}

.stream-guide > .sec + .sec {
  border-block-start: 1px solid var(--border);
}

.stream-guide > .sec {
  padding-block: var(--stream-rule-gap);
}

.stream-guide > .sec:last-child {
  padding-block-end: var(--section-gap);
}

.stream-matrix {
  --table-min: var(--stream-table-min);
}

.stream-copy,
.stream-next {
  max-width: calc(48em + 2 * var(--card-padding));
  margin-inline: auto;
}

.stream-copy p,
.stream-next p {
  max-width: none;
}

.stream-copy p:first-child,
.stream-next p:first-child {
  margin-block-start: 0;
}

.stream-copy p:last-child,
.stream-ip p:last-child {
  margin-block-end: 0;
}

.compare-grid .stream-ip {
  gap: 12px;
}

.stream-ip p {
  margin-block-start: 0;
}

.stream-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 768px) {
  .stream-intro {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}

@media (max-width: 640px) {
  .stream-matrix.table-scroll:has(.data-table) {
    border: 1px solid var(--border);
    background: var(--bg-panel);
  }

  .stream-matrix .data-table {
    display: table;
    min-width: var(--table-min);
  }

  .stream-matrix .data-table caption {
    display: table-caption;
    padding-inline: 14px;
    background: var(--bg-panel);
  }

  .stream-matrix .data-table thead {
    position: static;
    display: table-header-group;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }

  .stream-matrix .data-table tbody {
    display: table-row-group;
  }

  .stream-matrix .data-table tr {
    display: table-row;
    background: var(--clear);
  }

  .stream-matrix .data-table :is(td, th[scope="row"]) {
    display: table-cell;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    word-break: keep-all;
    vertical-align: top;
  }

  .stream-matrix .data-table [data-label]::before {
    content: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.stream-guide) {
    scroll-behavior: smooth;
  }
}