@layer components {
  .home-schedule .page-title {
    margin-bottom: 0;
    font-family: var(--font-display);
    font-size: 40px;
    line-height: 1;
    font-weight: 700;
  }

  .home-section {
    margin-top: 32px;
  }

  .home-section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 24px;
    padding-bottom: 12px;
  }

  .home-section-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
  }

  .home-section-title::after {
    content: attr(data-count) / "";
    margin-left: 10px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-secondary);
  }

  .home-section-note {
    flex: 0 1 auto;
    margin: 0;
    font-size: 15px;
    color: var(--color-text-secondary);
  }

  .game-board,
  .result-grid,
  .schedule-change-list {
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--color-bg-card);
    border-radius: var(--radius);
    outline: 1px solid var(--color-border);
    outline-offset: -1px;
    overflow: hidden;
  }

  .home-game-item {
    position: relative;
    background: var(--color-bg-card);
  }

  .game-board > .home-game-item + .home-game-item {
    border-top: 1px solid var(--color-border);
  }

  .game-row.is-live {
    box-shadow: inset 4px 0 0 var(--color-brand);
  }

  @media (hover: hover) {
    .home-game-item:hover {
      background: var(--color-bg-card-raised);
    }
  }

  .home-schedule a:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: -3px;
    border-radius: var(--radius-small);
  }

  .home-game-item > .credit-note {
    margin: -4px 0 0;
    padding: 0 24px 10px 84px;
    font-size: 13px;
    color: var(--color-text-muted);
  }

  .home-game-item > .credit-note a {
    color: var(--color-text-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .home-game-item > .credit-note a:focus-visible {
    outline-offset: 2px;
  }

  .game-row,
  .result-tile {
    position: relative;
    display: grid;
    align-items: center;
    background: inherit;
    color: var(--color-text-primary);
    font-variant-numeric: tabular-nums;
  }

  .game-row {
    grid-template-columns: 48px minmax(0, 1fr) 52px 12px 52px minmax(0, 1fr) 140px 104px 96px 56px;
    column-gap: 12px;
    row-gap: 4px;
    min-height: 60px;
    padding: 8px 24px;
  }

  .game-row-hype {
    grid-column: 1;
    grid-row: 1;
    display: flex;
  }

  .row-hype {
    display: grid;
    justify-items: start;
    gap: 5px;
  }

  .row-hype .home-metric-value {
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 0.85;
    font-weight: 700;
    color: var(--heat-text);
  }

  .row-hype .home-hype-unavailable {
    color: var(--color-text-muted);
  }

  .heat-bar {
    grid-row: 2;
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--color-track);
    overflow: hidden;
  }

  .heat-bar-fill {
    display: block;
    width: calc(var(--hype) * 1%);
    height: 100%;
    border-radius: inherit;
    background: var(--heat);
  }

  .home-schedule :is(.hype-low, .excitement-low) {
    --heat: var(--heat-low);
    --heat-text: var(--heat-low-text);
  }

  .home-schedule :is(.hype-medium, .excitement-medium) {
    --heat: var(--heat-medium);
    --heat-text: var(--heat-medium-text);
  }

  .home-schedule :is(.hype-high, .excitement-high) {
    --heat: var(--heat-high);
    --heat-text: var(--heat-high-text);
  }

  .row-hype .home-metric-label,
  .result-tile .metric-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .matchup {
    grid-column: 2 / 7;
    grid-row: 1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
  }

  .matchup-team {
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
    min-width: 0;
  }

  .matchup-team.is-away {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .matchup-team.is-home {
    grid-column: 4 / 6;
    grid-row: 1;
  }

  .game-row .team-identity {
    display: grid;
    align-items: center;
    column-gap: 8px;
    min-width: 0;
  }

  .game-row .matchup-team.is-away .team-identity {
    grid-template-columns: minmax(0, 1fr) var(--stripe) 26px 64px;
    grid-template-areas: "meta stripe logo name";
  }

  .game-row .matchup-team.is-home .team-identity {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: 64px 26px var(--stripe) minmax(0, 1fr);
    grid-template-areas: "name logo stripe meta";
  }

  .game-row .matchup-team.is-home .team-score {
    grid-column: 1;
    grid-row: 1;
  }

  .team-identity::before {
    content: "";
    grid-area: stripe;
    width: var(--stripe);
    height: 28px;
    border-radius: 999px;
    background: var(--team);
  }

  .matchup .team-label {
    display: contents;
  }

  .matchup .team-logo {
    grid-area: logo;
    width: 26px;
    height: 26px;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
  }

  .matchup .team-name {
    grid-area: name;
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
  }

  .matchup .team-name .poll-rank {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
  }

  .matchup .team-rank {
    grid-area: meta;
    min-width: 0;
    font-size: 15px;
    line-height: 1.3;
    color: var(--color-text-secondary);
    text-wrap: balance;
  }

  .game-row .matchup-team.is-away :is(.team-name, .team-rank) {
    text-align: right;
  }

  .matchup .team-score {
    position: relative;
    font-family: var(--font-display);
    font-size: 32px;
    line-height: 1;
    font-weight: 700;
    color: var(--color-text-primary);
  }

  .matchup-team.is-away .team-score {
    text-align: right;
  }

  .game-row.is-live .matchup::before {
    content: "–";
    grid-column: 2 / 5;
    grid-row: 1;
    display: grid;
    place-items: center;
    height: 46px;
    border-radius: 8px;
    background: var(--color-bg-primary);
    font-size: 20px;
    line-height: 1;
    color: var(--color-text-secondary);
  }

  .game-row-kickoff {
    grid-column: 3 / 6;
    grid-row: 1;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
  }

  .game-row-state {
    grid-column: 7;
    grid-row: 1;
    display: grid;
    gap: 5px;
    min-width: 0;
  }

  .game-row.is-scheduled .game-row-status {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .game-row.is-scheduled .game-row-state:not(:has(.card-probability)) {
    display: none;
  }

  .game-row-status {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
  }

  .game-row .status-badge,
  .result-tile .status-badge {
    padding: 0;
    border-radius: 0;
    background: none;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
    animation: none;
  }

  .game-row .status-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--color-accent-text);
  }

  .game-row .status-live::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-brand);
  }

  .game-row .live-clock {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
  }

  .game-row [id^="clock-"]:empty,
  .game-row [id^="probbar-"]:empty {
    display: none;
  }

  .game-row .card-probability {
    margin: 0;
  }

  .game-row .card-probability > [role="group"] {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: center;
    gap: 3px 6px;
  }

  .game-row .probability-labels {
    display: contents;
    font-size: 13px;
    color: var(--color-text-secondary);
  }

  .game-row .probability-labels > span {
    grid-row: 1;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 500;
    white-space: nowrap;
    color: var(--color-text-secondary);
  }

  .game-row .probability-labels > span:first-child {
    grid-column: 1;
  }

  .game-row .probability-home-label {
    grid-column: 2;
    text-align: right;
  }

  .game-row .probability-track {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 4px;
  }

  .game-row .unavailable-note,
  .result-tile .unavailable-note {
    font-size: 13px;
    line-height: 1.3;
    color: var(--color-text-muted);
  }

  .game-row-excitement {
    grid-column: 8;
    grid-row: 1;
    position: relative;
    min-width: 0;
    min-height: 44px;
    display: grid;
    align-items: end;
  }

  .game-row-excitement .card-sparkline {
    position: absolute;
    left: 0;
    bottom: 2px;
    height: auto;
    color: var(--color-text-muted);
  }

  .game-row-excitement .metric-block {
    display: grid;
    grid-template-columns: 56px auto;
    column-gap: 6px;
    text-align: left;
  }

  .game-row-excitement .metric-label {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 13px;
    line-height: 1.2;
    color: var(--color-text-secondary);
  }

  .game-row-excitement .metric-value {
    grid-column: 2;
    font-family: var(--font-display);
    font-size: 26px;
    line-height: 1;
    font-weight: 700;
    color: var(--heat-text);
  }

  .game-row-tv {
    grid-column: 9;
    grid-row: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    min-width: 0;
    font-size: 15px;
    color: var(--color-text-secondary);
  }

  .game-row.is-scheduled .game-row-tv {
    grid-column: 8 / 10;
  }

  .game-row.is-scheduled:not(:has(.card-probability)) .game-row-tv {
    grid-column: 7 / 10;
  }

  .game-row-tv .college-context {
    margin: 0;
    font-size: 13px;
    line-height: 1.3;
    color: var(--color-text-secondary);
  }

  .game-row-tv .nb-broadcast-sep {
    display: none;
  }

  .home-schedule .network-logo {
    height: 15px;
    max-width: 64px;
    filter: var(--network-logo-filter);
  }

  .no-tv {
    color: var(--color-text-muted);
  }

  .home-card-league {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    font-size: 15px;
    color: var(--color-text-secondary);
  }

  .home-card-league img {
    width: 18px;
    height: 18px;
  }

  .game-row .home-card-league {
    grid-column: 10;
    grid-row: 1;
  }

  .game-row-series {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .home-schedule .series-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
  }

  .home-schedule .series-standing {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
  }

  .home-schedule .series-context {
    margin: 0;
    font-size: 13px;
    color: var(--color-text-secondary);
  }

  .result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    background: transparent;
    outline: none;
    gap: 8px;
  }

  .result-grid > .home-game-item {
    display: grid;
    align-content: start;
    border-radius: var(--radius);
    outline: 1px solid var(--color-border);
    outline-offset: -1px;
  }

  .result-grid > .home-game-item > .credit-note {
    margin: 0;
    padding: 0 16px 10px;
  }

  .result-tile {
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    row-gap: 4px;
    padding: 12px 16px;
  }

  .result-tile-metric {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    justify-items: start;
    gap: 5px;
    min-width: 0;
  }

  .result-tile .metric-value {
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 0.85;
    font-weight: 700;
    color: var(--heat-text);
  }

  .result-tile .card-sparkline {
    height: auto;
    color: var(--color-text-muted);
  }

  .result-tile .matchup {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 4px;
  }

  .result-tile .matchup-team {
    grid-column: 1 / -1;
  }

  .result-tile .matchup-team.is-home {
    grid-row: 2;
  }

  .result-tile .team-identity {
    display: grid;
    grid-template-columns: var(--stripe) 22px minmax(0, 1fr);
    grid-template-areas: "stripe logo name";
    align-items: center;
    column-gap: 9px;
    min-width: 0;
  }

  .result-tile .team-identity::before {
    height: 20px;
  }

  .result-tile .team-logo {
    width: 22px;
    height: 22px;
  }

  .result-tile :is(.team-name, .team-score) {
    font-size: 24px;
  }

  .result-tile .team-rank {
    display: none;
  }

  .result-tile[data-trailing="away"] .matchup-team.is-away :is(.team-name, .team-score),
  .result-tile[data-trailing="home"] .matchup-team.is-home :is(.team-name, .team-score) {
    color: var(--color-text-muted);
  }

  .result-tile .status-badge {
    color: var(--color-text-secondary);
  }

  .result-tile .home-card-league {
    grid-column: 2;
    gap: 6px;
    font-size: 13px;
  }

  .result-tile .home-card-league img {
    width: 14px;
    height: 14px;
  }

  .result-tile > [id^="probbar-"],
  .result-tile > [id^="clock-"] {
    display: none;
  }

  .result-grid + .schedule-change-list {
    margin-top: 12px;
  }

  .schedule-change-list > .home-game-item + .home-game-item {
    border-top: 1px solid var(--color-border);
  }

  .schedule-change {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding: 10px 16px;
    color: var(--color-text-primary);
  }

  .schedule-change .matchup {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .schedule-change .matchup-team.is-home::before {
    content: "at";
    margin-inline-end: 10px;
    font-size: 15px;
    color: var(--color-text-secondary);
  }

  .schedule-change .matchup-team {
    display: flex;
    align-items: center;
  }

  .schedule-change .team-identity {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .schedule-change .team-identity::before {
    height: 20px;
  }

  .schedule-change .team-logo {
    width: 22px;
    height: 22px;
  }

  .schedule-change .team-name {
    font-size: 22px;
  }

  .schedule-change :is(.team-rank, .team-score) {
    display: none;
  }

  .schedule-change-status {
    font-size: 15px;
    font-weight: 600;
  }

  .schedule-change .status-badge {
    padding: 0;
    background: none;
    font-size: inherit;
    font-weight: inherit;
    color: var(--color-text-primary);
  }

  .schedule-change .home-card-league {
    margin-inline-start: auto;
    gap: 6px;
    font-size: 13px;
  }

  .schedule-change .home-card-league img {
    width: 14px;
    height: 14px;
  }

  .schedule-change > [id^="probbar-"],
  .schedule-change > [id^="clock-"] {
    display: none;
  }

  .result-tile-context,
  .result-tile-series {
    grid-column: 1 / -1;
  }

  .result-tile-context .college-context {
    margin: 0;
    font-size: 13px;
    color: var(--color-text-secondary);
  }

  .home-schedule > .quality-credit {
    margin-top: 28px;
    font-size: 13px;
    color: var(--color-text-muted);
  }

  .home-schedule > .quality-credit a {
    color: var(--color-text-secondary);
  }

  @media (max-width: 1100px) {
    .game-row {
      grid-template-columns: 48px minmax(0, 1fr) 52px 12px 52px minmax(0, 1fr) 140px 104px 96px;
    }

    .game-row .home-card-league {
      display: none;
    }

  }

  @media (max-width: 860px) {
    .home-section {
      margin-top: 24px;
    }

    .home-section-title {
      font-size: 26px;
    }

    .game-row {
      grid-template-columns: 40px minmax(0, 1fr) auto;
      gap: 6px 12px;
      padding: 10px 14px;
    }

    .game-row-hype {
      grid-row: 1 / 3;
      align-self: start;
    }

    .row-hype .home-metric-value {
      font-size: 28px;
    }

    .heat-bar {
      width: 32px;
    }

    .matchup {
      grid-column: 2;
      grid-row: 1 / 3;
      grid-template-columns: minmax(0, 1fr) auto;
      row-gap: 6px;
    }

    .matchup-team.is-away,
    .matchup-team.is-home {
      grid-column: 1 / -1;
    }

    .matchup-team.is-home {
      grid-row: 2;
    }

    .game-row .matchup-team.is-away .team-identity,
    .game-row .matchup-team.is-home .team-identity {
      grid-column: 1;
      grid-template-columns: var(--stripe) 22px minmax(0, 1fr);
      grid-template-areas: "stripe logo name" ". . meta";
      row-gap: 2px;
    }

    .game-row .matchup-team.is-home .team-score {
      grid-column: 2;
    }

    .game-row .matchup-team.is-away :is(.team-name, .team-rank) {
      text-align: left;
    }

    .team-identity::before {
      height: 24px;
    }

    .matchup .team-logo {
      width: 22px;
      height: 22px;
    }

    .matchup .team-name {
      font-size: 25px;
    }

    .game-row .team-rank {
      font-size: 13px;
      line-height: 1.2;
    }

    .matchup .team-score:empty {
      display: none;
    }

    .game-row-kickoff {
      grid-column: 3;
      grid-row: 1;
      text-align: right;
    }

    .game-row-tv,
    .game-row.is-scheduled .game-row-tv,
    .game-row.is-scheduled:not(:has(.card-probability)) .game-row-tv {
      grid-column: 2 / -1;
      grid-row: 3;
      font-size: 13px;
    }

    .home-schedule .network-logo {
      height: 13px;
      max-width: 56px;
    }

    .game-row.is-scheduled .game-row-state {
      grid-column: 2 / -1;
      grid-row: 4;
    }

    .game-row-series {
      grid-column: 2 / -1;
      grid-row: 5;
    }

    .game-row.is-live {
      grid-template-columns: 40px auto minmax(0, 1fr);
    }

    .game-row.is-live .matchup {
      grid-template-columns: auto 44px;
    }

    .game-row.is-live .team-rank {
      display: none;
    }

    .game-row.is-live .matchup .team-identity {
      grid-template-columns: var(--stripe) 22px 54px;
      grid-template-areas: "stripe logo name";
    }

    .game-row.is-live .matchup::before {
      content: "";
      grid-column: 2;
      grid-row: 1 / 3;
      height: auto;
      align-self: stretch;
      margin: -4px -6px;
    }

    .game-row.is-live .matchup .team-score {
      font-size: 27px;
      text-align: right;
    }

    .game-row.is-live .game-row-tv {
      display: none;
    }

    .game-row.is-live .game-row-state {
      grid-column: 3;
      grid-row: 1 / 3;
      min-width: 0;
      justify-items: end;
      gap: 3px;
    }

    .game-row.is-live .game-row-status {
      flex-wrap: wrap;
      justify-content: end;
      row-gap: 0;
    }

    .game-row.is-live .game-row-status [id^="clock-"] {
      flex-basis: 100%;
      text-align: right;
    }

    .game-row .card-probability {
      width: 100%;
      max-width: 150px;
    }

    .game-row-excitement {
      grid-column: 2 / -1;
      grid-row: 3;
      min-height: 0;
    }

    .game-row-excitement {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .game-row-excitement .card-sparkline {
      position: static;
      order: 1;
    }

    .game-row-excitement [id^="excitement-"],
    .game-row-excitement .metric-block {
      display: contents;
    }

    .game-row-excitement .metric-value {
      order: 2;
    }

    .game-row-excitement .metric-value {
      font-size: 22px;
    }

    .home-game-item > .credit-note {
      margin-top: 0;
      padding: 0 14px 10px 66px;
    }

    .result-grid {
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .result-tile {
      grid-template-columns: minmax(0, 1fr);
      gap: 8px;
      padding: 10px 12px;
    }

    .result-tile-metric {
      grid-auto-flow: column;
      align-items: center;
      justify-content: start;
      gap: 8px;
    }

    .result-tile .matchup,
    .result-tile .home-card-league {
      grid-column: 1;
      grid-row: auto;
    }
  }
}
