/* Homepage presentation primitives. Editions supply type and colour tokens;
   the existing homepage views determine content, order and layout options. */
.page-home #main-content {
  --home-heading-font: Inter, 'Segoe UI', sans-serif;
  --home-section-title: clamp(23px, 2.25vw, 33px);
  --home-feature-title: clamp(22px, 2.35vw, 34px);
  --home-card-title: clamp(17px, 1.55vw, 23px);
  --home-rail-title: clamp(15px, 1.25vw, 18px);
  --home-card-leading: 1.32;
  --home-section-space: clamp(30px, 4vw, 58px);
  --home-card-gap: clamp(14px, 2vw, 28px);
  --home-panel-inset: clamp(13px, 1.7vw, 24px);
  --home-heading-space: 16px;
  --home-heading-inset: 8px;
  --home-rule-color: var(--in-border);
  --home-paper-color: #f3f6fa;
  --home-accent-color: var(--front-red);
  --home-image-radius: 5px;
  --home-card-radius: 5px;
  --home-thumbnail-ratio: 4 / 3;
  --home-thumbnail-width: clamp(74px, 7.5vw, 108px);
  --home-target-height: 44px;
}
.page-home.edition-ne #main-content {
  --home-heading-font: Mukta, 'Nirmala UI', sans-serif;
  --home-section-title: clamp(27px, 2.85vw, 39px);
  --home-feature-title: clamp(25px, 2.7vw, 38px);
  --home-card-title: clamp(20px, 1.8vw, 26px);
  --home-rail-title: clamp(17px, 1.45vw, 21px);
}
.page-home #main-content .home-english-cards {
  --home-heading-font: Inter, 'Segoe UI', sans-serif;
  --home-card-title: clamp(16px, 1.3vw, 20px);
}

/* Section and panel rhythm. Custom CMS spacing classes keep their own rules. */
.page-home #main-content .homepage-composition > :is(.news-section.spacing-normal, .homepage-news-columns, .home-province-news, .home-travel, .home-english-news, .home-section-pair) {
  margin-block: var(--home-section-space);
}
.page-home #main-content :is(.section-heading, .home-desk-heading, .home-travel-heading, .home-english-heading) {
  align-items: center;
  margin-bottom: var(--home-heading-space);
  padding-bottom: var(--home-heading-inset);
  border-bottom: 1px solid var(--home-heading-rule, var(--home-rule-color));
}
.page-home #main-content :is(.section-heading, .home-desk-heading, .home-travel-heading, .home-english-heading) h2 {
  min-width: 0;
  margin: 0;
  font: 750 var(--home-section-title)/1.16 var(--home-heading-font);
  text-wrap: pretty;
}
.page-home #main-content .home-english-heading h2 {font-family: Inter, 'Segoe UI', sans-serif}
.page-home #main-content :is(.section-heading, .home-desk-heading, .home-travel-heading, .home-english-heading) > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--home-target-height);
  text-decoration: none;
  text-underline-offset: 4px;
}
.page-home #main-content :is(.section-heading, .home-desk-heading, .home-travel-heading, .home-english-heading) > a:hover {text-decoration: underline}
.page-home #main-content .home-desk-picks .home-desk-heading {
  border-top: 3px solid var(--home-accent-color);
  padding-top: 10px;
}
.page-home #main-content :is(.homepage-entertainment, .section-navy:not(.homepage-photo-section)) {--home-heading-rule: #ffffff4d}
.page-home.edition-en #main-content .homepage-photo-section.section-navy {--home-heading-rule: #ffffff4d}
.page-home #main-content :is(.home-desk-sidebar, .homepage-news-side) {
  align-self: start;
  padding: var(--home-panel-inset);
  background: var(--home-panel-color, var(--home-paper-color));
}
.page-home #main-content .home-desk-sidebar {border-top: 3px solid var(--home-panel-accent, var(--home-accent-color))}
@media (min-width: 901px) {
  .page-home #main-content :is(.home-desk-sidebar, .homepage-news-side) {
    --home-card-title: var(--home-rail-title);
  }
}

/* Cards use the same type and media scale across presentation layouts. */
.page-home #main-content :is(.editorial-card, .home-brief, .home-opinion-item, .card-copy) {min-inline-size: 0}
.page-home #main-content :is(.editorial-card, .home-brief, .home-opinion-item) h3 {
  font-family: var(--home-heading-font);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.page-home #main-content :is(.editorial-card, .home-brief, .home-opinion-item) h3 a {
  text-decoration: none;
  text-underline-offset: 3px;
}
.page-home #main-content :is(.editorial-card, .home-brief, .home-opinion-item) h3 a:hover {text-decoration: underline}
.page-home #main-content a:focus-visible {outline: 2px solid var(--home-accent-color); outline-offset: 3px}
.page-home #main-content :is(.home-desk-feature, .homepage-category-lead, .home-opinion-lead, .home-province-lead) .card-copy h3 {
  font-size: var(--home-feature-title);
  line-height: 1.24;
}
.page-home #main-content :is(.editorial-story-list, .home-desk-grid, .home-news-cards, .home-business-cards, .home-travel-stories, .home-shelf-cards, .home-more-grid, .home-english-cards, .news-card-grid, .homepage-digital-desk) h3 {
  font-size: var(--home-card-title);
  line-height: var(--home-card-leading);
}
.page-home #main-content .card-summary {text-align: start}
.page-home #main-content :is(.editorial-card, .home-brief, .home-headline-photo) .featured-image img {
  max-inline-size: 100%;
  border-radius: var(--home-image-radius);
}
.page-home #main-content .editorial-story-list .featured-image img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: var(--home-thumbnail-ratio);
  object-fit: cover;
}
.page-home #main-content :is(.home-entertainment-cards, .home-english-cards) .editorial-card {
  border-radius: var(--home-card-radius);
  overflow: hidden;
}
.page-home #main-content :is(.home-travel-stories, .home-shelf-cards, .home-more-grid, .home-english-cards, .homepage-standard-grid > .news-card-grid) {
  gap: var(--home-card-gap);
}
.page-home #main-content .home-province-label {min-height: var(--home-target-height); align-content: center}
.page-home #main-content .edition-ad:is([data-ad-placement="homepage_after_hero"], [data-ad-placement="homepage_between_sections"]):not([hidden]) {
  max-width: 1248px;
  margin-block: clamp(18px, 2.6vw, 34px);
  padding-block: 7px;
  border-block: 1px solid var(--home-rule-color);
}
.page-home #main-content .edition-ad[data-ad-placement="homepage_sidebar"] {max-width: 340px}
.page-home #main-content .home-desk-sidebar .edition-ad:not([hidden]) {margin-block: 16px 0}

@media (max-width: 640px) {
  .page-home #main-content {
    --home-mobile-gutter: clamp(14px, 4vw, 22px);
    --home-card-gap: 12px;
    --home-section-space: 30px;
    --home-heading-space: 12px;
    --home-heading-inset: 6px;
    --home-thumbnail-width: 74px;
    padding-inline: var(--home-mobile-gutter);
  }
  .page-home #main-content .home-english-cards {--home-card-title: 17px}
  .page-home #main-content :is(.section-heading, .home-desk-heading, .home-travel-heading, .home-english-heading) h2 {
    font-size: var(--home-feature-title);
  }
  .page-home #main-content :is(.editorial-card, .home-brief, .home-opinion-item) :is(time, .card-meta) {
    font-size: 12px;
    line-height: 1.4;
  }
  .page-home #main-content .card-summary {line-height: 1.5}
}
@media (max-width: 440px) {
  .page-home #main-content :is(.editorial-story-list, .home-news-cards, .home-business-cards) > .has-photo {
    grid-template-columns: var(--home-thumbnail-width) minmax(0, 1fr);
  }
}
