@layer pages {
  body:is([data-route='home'], [data-route='discover']) {
    --editorial-paper: var(--bg);
    --editorial-ink: var(--text);
    --editorial-muted: var(--muted);
    --editorial-rule: var(--border);
    --editorial-accent: var(--coral-text);
  }

  .editorial-page {
    gap: var(--page-gap);
    color: var(--editorial-ink);
  }

  .editorial-page .hero-header {
    --hero-text: var(--editorial-ink);
    --hero-text-soft: var(--editorial-muted);
    --hero-text-muted: var(--editorial-muted);
    --hero-fill: var(--surface);
    --hero-line: var(--editorial-rule);
    color: var(--editorial-ink);
  }

  .editorial-page .hero-search {
    min-inline-size: 0;
    border: 1px solid var(--editorial-rule);
    background: transparent;
    color: var(--editorial-ink);
    padding-block: var(--space-2);
    overflow-wrap: anywhere;
  }

  .editorial-page .hero-search svg {
    flex: none;
    color: var(--editorial-accent);
  }

  .editorial-page .sheet {
    border-radius: 0;
    background: transparent;
    padding-block-start: 0;
  }

  .editorial-page .sheet > .section {
    border-block-start: 1px solid var(--editorial-rule);
  }

  .editorial-page .section-heading h2 {
    color: var(--editorial-ink);
  }

  .home-masthead {
    display: grid;
    gap: var(--space-3);
  }

  .home-masthead__title {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    min-inline-size: 0;
  }

  .editorial-page .editorial-feature {
    display: grid;
    grid-template-areas:
      'label label'
      'art heading'
      'description description'
      'progress progress'
      'actions actions';
    grid-template-columns: min(32%, 6.5rem) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 0 var(--space-4);
    padding: clamp(0.875rem, 3vw, 2rem);
  }

  .editorial-feature__label {
    grid-area: label;
    padding-block-end: var(--space-3);
  }

  .editorial-feature__art {
    grid-area: art;
    display: block;
    inline-size: 100%;
    min-inline-size: 0;
    padding: 0;
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
  }

  .editorial-feature__art .cover-frame {
    inline-size: 100%;
  }

  .editorial-feature__heading {
    grid-area: heading;
    align-self: center;
    min-inline-size: 0;
    overflow-wrap: anywhere;
  }

  .editorial-feature__heading > p,
  .editorial-feature__heading > span {
    font-size: var(--fs-12);
  }

  .editorial-page .editorial-feature h2 {
    grid-column: auto;
    margin-block: var(--space-1);
    font-size: clamp(1.125rem, 0.85rem + 1.25vi, 2.25rem);
    line-height: 1.46;
  }

  .editorial-feature__description {
    grid-area: description;
    display: -webkit-box;
    overflow: hidden;
    font-size: var(--fs-14);
    line-height: 1.85;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    margin-block-start: var(--space-3);
  }

  .editorial-feature__progress {
    grid-area: progress;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--fs-12);
    margin-block-start: var(--space-3);
  }

  .editorial-feature__progress progress {
    direction: ltr;
    flex: 1;
    min-inline-size: 0;
    block-size: 0.5rem;
    accent-color: var(--feature-accent);
  }

  .editorial-feature__actions {
    grid-area: actions;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-block-start: var(--space-4);
  }

  .editorial-feature__actions > button {
    max-inline-size: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .editorial-feature__actions .text-button {
    min-block-size: 44px;
  }

  @media (min-width: 48rem) {
    .editorial-page .editorial-feature {
      grid-template-areas:
        'label art'
        'heading art'
        'description art'
        'progress art'
        'actions art';
      grid-template-columns: minmax(0, 1fr) min(33%, 16rem);
      grid-template-rows: auto;
      align-content: center;
      column-gap: clamp(1.5rem, 4vw, 4rem);
    }

    .editorial-feature__art {
      align-self: center;
    }

    .editorial-page .editorial-feature h2 {
      font-size: clamp(1.5rem, 1.25rem + 1.2vi, 2.625rem);
    }
  }
}

@layer responsive {
  @media (min-width: 68rem) {
    .home-page .home-masthead .hero-search {
      display: none;
    }
  }
}
