/* Section artwork is shared by related pages to make the areas recognizable. */
[data-editorial] {
  --editorial-paper: #fff;
  --editorial-blush: #f8e9ee;
  --editorial-wine: #641c38;
  --editorial-rule: #dbc4cd;
  --editorial-space: clamp(30px, 5.6vw, 88px);
}
:is([data-editorial="procedures"],[data-editorial="guides"],[data-editorial="official-qa"]) {
  --section-art: url(/assets/renewal-rules.webp);
}
[data-editorial="operations"] { --section-art: url(/assets/renewal-operations.webp); }
[data-editorial="rates"] { --section-art: url(/assets/renewal-fees.webp); }
:is([data-editorial="today"],[data-editorial="news"],[data-editorial="outlook"],[data-editorial="notes"]) {
  --section-art: url(/assets/editorial-news.webp);
}

/* Landing pages use artwork; reference articles keep their heading and sources in view. */
body[data-editorial] :is(.procedure-hero,.guide-hero,.ops-hero,.rate-hero,.news-index-header,.today-hero,.notes-index-heading,
  .outlook-shell > .outlook-hero:not(.compact),.institution-index > .article-title) {
  position: relative;
  display: block;
  min-height: clamp(250px, 29vw, 420px);
  padding: var(--editorial-space) 39% var(--editorial-space) clamp(20px, 4vw, 58px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--editorial-blush);
  isolation: isolate;
}
body[data-editorial] :is(.procedure-hero,.guide-hero,.ops-hero,.rate-hero,.news-index-header,.today-hero,.notes-index-heading,
  .outlook-shell > .outlook-hero:not(.compact),.institution-index > .article-title)::after {
  content: "";
  position: absolute;
  inset: 0 0 0 67%;
  z-index: -1;
  background: var(--section-art, none) center / cover no-repeat;
}
body[data-editorial] .ops-hero-art { display: none; }
body[data-editorial] :is(.procedure-hero,.guide-hero,.ops-hero,.rate-hero,.news-index-header,.today-hero,.notes-index-heading,
  .outlook-shell > .outlook-hero:not(.compact),.institution-index > .article-title) h1 {
  font-size: clamp(29px, 4.1vw, 60px);
  line-height: 1.16;
  letter-spacing: -.045em;
  text-wrap: pretty;
}

/* Index rows are documents to scan. A rule and an underline do the work of a card frame. */
body[data-editorial] :is(.news-index-shell .article-grid,.procedure-grid,.guide-grid,.ops-grid,.notes-list,.outlook-topic-grid) {
  gap: 0 clamp(20px, 4vw, 58px);
}
body[data-editorial] :is(.news-index-shell .article-card,.procedure-card,.guide-card,.ops-tile,.notes-list-card,.outlook-topic-card) {
  border: 0;
  border-top: 1px solid var(--editorial-rule);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: clamp(16px, 2.6vw, 32px) 0;
  transform: none;
}
body[data-editorial] :is(.news-index-shell .article-card,.procedure-card,.guide-card,.ops-tile,.notes-list-card,.outlook-topic-card):is(:hover,:focus-within) {
  border-color: var(--editorial-wine);
  box-shadow: none;
  transform: none;
}
body[data-editorial] :is(.news-index-shell .article-card,.procedure-card,.guide-card,.ops-tile,.notes-list-card,.outlook-topic-card):is(:hover,:focus-within) :is(h2,h3) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
body[data-editorial] :is(.article-next-grid a,.rate-card-links a,a.text-link,a.rate-hero-action) {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--editorial-wine);
  text-decoration: underline;
  text-underline-offset: .25em;
}

/* Reading pages use an editorial title and open text sections. Answer and warning boxes retain their meaning. */
body[data-editorial] :is(.article-title,.procedure-article-header,.ops-title,.note-article-shell header,.series-shell > header) h1 {
  line-height: 1.23;
  letter-spacing: -.035em;
  text-wrap: pretty;
}
body:is([data-editorial="articles"],[data-editorial="guides"],[data-editorial="procedures"],[data-editorial="series"],[data-editorial="outlook"]) :is(.article-title,.procedure-article-header) {
  border-bottom: 1px solid var(--editorial-rule);
  padding-bottom: clamp(20px, 4vw, 48px);
}
body[data-editorial] :is(.news-report-shell,.procedure-shell,.guide-shell,.series-shell) .article-section {
  margin-block: clamp(22px, 4vw, 60px);
}
body[data-editorial] :is(.reader-page,.site-search-shell,.article-shell.narrow):not(.institution-index) > .article-title {
  border-top: 4px solid var(--editorial-wine);
  padding-top: clamp(20px, 4vw, 42px);
}

/* Tool navigation uses images; tools use restrained surfaces around editable inputs. */
body[data-editorial="tools"] .tools-index-grid {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: clamp(18px, 3vw, 42px);
}
body[data-editorial="tools"] a.tools-index-card {
  --tool-image: url(/assets/renewal-fees.webp);
  display: flex;
  position: relative;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 0 0 20px;
  border: 0;
  border-bottom: 1px solid var(--editorial-rule);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: inherit;
  transform: none;
}
body[data-editorial="tools"] a.tools-index-age { --tool-image: url(/assets/editorial-age.webp); }
body[data-editorial="tools"] a.tools-index-medicines { --tool-image: url(/assets/editorial-medicines.webp); }
body[data-editorial="tools"] a.tools-index-drip { --tool-image: url(/assets/editorial-drip.webp); }
body[data-editorial="tools"] a.tools-index-card::before {
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  background: var(--editorial-blush) var(--tool-image) center / cover no-repeat;
  margin-bottom: 6px;
}
body[data-editorial="tools"] .tools-index-card :is(h2,p,.tools-index-bottom) { margin: 0; padding-inline: 2px; }
body[data-editorial="tools"] .tools-index-card h2 { color: var(--ink); }
body[data-editorial="tools"] .tools-index-card p { color: var(--muted); }
body[data-editorial="tools"] .tools-index-card .tools-index-bottom { color: var(--editorial-wine); margin-top: auto; }
body[data-editorial="tools"] .tools-index-card .tools-index-bottom svg { display: none; }
body[data-editorial="tools"] .tools-index-card:is(:hover,:focus-visible) .tools-index-bottom { text-decoration: underline; }
body[data-editorial="tools"] :is(.fee-hero,.age-hero,.medicine-calendar-hero,.drip-hero) {
  border-radius: 0;
  border-top: 4px solid var(--editorial-wine);
  box-shadow: none;
}
body[data-editorial="tools"] :is(.fee-card,.fee-scope-grid) {
  border-radius: 4px;
  box-shadow: none;
}
body[data-editorial] a:focus-visible { outline: 2px solid #a73766; outline-offset: 4px; }

@media (max-width: 760px) {
  body[data-editorial] :is(.procedure-hero,.guide-hero,.ops-hero,.rate-hero,.news-index-header,.today-hero,.notes-index-heading,
    .outlook-shell > .outlook-hero:not(.compact),.institution-index > .article-title) {
    min-height: 0;
    padding: 24px 18px 0;
  }
  body[data-editorial] :is(.procedure-hero,.guide-hero,.ops-hero,.rate-hero,.news-index-header,.today-hero,.notes-index-heading,
    .outlook-shell > .outlook-hero:not(.compact),.institution-index > .article-title)::after {
    position: static;
    display: block;
    height: 120px;
    margin: 24px -18px 0;
  }
  body[data-editorial="tools"] .tools-index-grid { grid-template-columns: 1fr; }
}
