/* Shared reading layout. Each site supplies its own colour and type tokens. */
.editorial {
  --ed-accent: #ad311e;
  --ed-ink: #211f1c;
  --ed-muted: #605b51;
  --ed-line: #d9d2c6;
  --ed-tint: #fffcf6;
  --ed-feature: #28231f;
  --ed-feature-text: #fff4e9;
  --ed-feature-accent: #ffad98;
  --ed-radius: 6px;
  color: var(--ed-ink);
  padding-block: 32px 72px;
}
.editorial--rebate {
  --ed-accent: #2457d6;
  --ed-ink: #182334;
  --ed-muted: #465570;
  --ed-line: #d9e2f2;
  --ed-tint: #edf3ff;
  --ed-feature: #142c60;
  --ed-feature-text: #f2f6ff;
  --ed-feature-accent: #b7ceff;
  --ed-radius: 8px;
}
.editorial :is(h1, h2, h3, p, figure) { margin: 0; }
.editorial h1 {
  font-size: clamp(2rem, 4.35vw, 3.9rem);
  font-weight: 820;
  line-height: 1.15;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.editorial h2 { font-size: clamp(1.3rem, 2.3vw, 1.75rem); line-height: 1.35; }
.editorial a { text-underline-offset: .22em; }
.editorial a:hover { text-decoration: underline; }
.editorial .ed-trail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 21px;
  color: var(--ed-muted);
  font-size: .875rem;
}
.ed-trail a, .ed-links a, .ed-section-link { color: var(--ed-accent); text-decoration: underline; }
.ed-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: 16px 36px;
  align-items: end;
  margin-bottom: 31px;
}
.editorial .ed-deck { max-width: 42ch; color: var(--ed-muted); font-size: 1rem; line-height: 1.75; }
.ed-feature {
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
  border-radius: var(--ed-radius);
  overflow: clip;
  background: var(--ed-feature);
  color: var(--ed-feature-text);
}
.ed-feature-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 13px;
  padding: clamp(25px, 4vw, 52px);
}
.ed-category {
  color: var(--ed-accent);
  font-size: .875rem;
  font-weight: 770;
  line-height: 1.45;
}
.ed-feature .ed-category { color: var(--ed-feature-accent); }
.ed-feature h2 { font-size: clamp(1.55rem, 2.9vw, 2.55rem); text-wrap: balance; }
.ed-feature-copy > p:not(.ed-category) { color: var(--ed-feature-text); line-height: 1.75; }
.ed-feature .ed-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 15px;
  min-height: 44px;
  margin-top: 6px;
  border-radius: 5px;
  background: var(--ed-feature-text);
  color: var(--ed-feature);
  font-weight: 760;
}
.ed-feature .ed-primary:focus-visible { outline: 2px solid var(--ed-feature-text); outline-offset: 3px; }
.ed-photo { position: relative; min-height: 310px; }
.ed-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ed-photo figcaption {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 3px;
  background: #1a1a1ae8;
  color: #fff;
  font-size: .8125rem;
}
.ed-index { margin-top: clamp(35px, 5vw, 65px); }
.ed-index > h2 { margin-bottom: 18px; }
.ed-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ed-line); }
.ed-list li { border-bottom: 1px solid var(--ed-line); }
.ed-list .ed-row {
  display: grid;
  grid-template-columns: minmax(95px, 1fr) minmax(0, 5fr) auto;
  align-items: center;
  gap: 12px 22px;
  padding: 18px 12px;
  color: var(--ed-ink);
}
.ed-row-content { display: flex; align-items: center; gap: 14px; }
.ed-row-content img { width: clamp(68px, 9vw, 128px); height: auto; flex: none; border-radius: var(--ed-radius); }
.ed-row h3 { font-size: clamp(1.03rem, 2vw, 1.27rem); line-height: 1.45; }
.ed-row p:not(.ed-category) { margin-top: 4px; color: var(--ed-muted); font-size: .9375rem; line-height: 1.6; }
.ed-list .ed-row:hover { background: var(--ed-tint); text-decoration: none; }
.ed-row:hover h3 { text-decoration: underline; }
.ed-row > span { color: var(--ed-accent); font-size: 1.25rem; }
.ed-article-head {
  display: grid;
  gap: 13px;
  padding: clamp(23px, 4vw, 47px);
  border-top: 3px solid var(--ed-accent);
  border-radius: 0 0 var(--ed-radius) var(--ed-radius);
  background: var(--ed-tint);
}
.ed-article-head h1 { max-width: 22ch; font-size: clamp(1.9rem, 4.05vw, 3.5rem); }
.editorial .ed-meta { color: var(--ed-muted); font-size: .875rem; line-height: 1.6; }
.ed-article-head .ed-deck { max-width: 62ch; }
.ed-article-grid {
  display: grid;
  grid-template-columns: minmax(0, 690px) minmax(0, 250px);
  justify-content: space-between;
  gap: 32px clamp(24px, 6vw, 92px);
  margin-top: clamp(27px, 5vw, 52px);
}
.ed-toc {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  position: sticky;
  top: var(--ed-sticky-top, 28px);
  border-left: 2px solid var(--ed-line);
  padding: 3px 0 3px 19px;
}
.ed-toc h2 { font-size: 1rem; }
.ed-toc ol { margin: 9px 0 0; padding-left: 1.3em; }
.ed-toc li { padding-left: 3px; }
.ed-toc a { display: block; padding: 7px 0; color: var(--ed-muted); font-size: .9375rem; line-height: 1.45; }
.ed-toc a:hover { color: var(--ed-accent); }
.ed-story { grid-column: 1; grid-row: 1; }
.ed-story > section {
  padding-block: 24px;
  border-bottom: 1px solid var(--ed-line);
  scroll-margin-top: var(--ed-sticky-top, 24px);
}
.ed-story > section:first-child { padding-top: 0; }
.ed-story > section > p { margin-top: 10px; font-size: 1.0625rem; line-height: 1.9; }
.ed-story > section > a { display: inline-block; margin-top: 12px; font-weight: 700; }
.ed-story section:target { border-bottom-color: var(--ed-accent); }
.ed-sources, .ed-related, .ed-action { margin-top: 27px; }
.ed-links ul { padding-left: 1.25em; margin: 8px 0 0; }
.ed-links li { margin-top: 6px; }
.ed-related { border-top: 1px solid var(--ed-line); padding-top: 21px; }
.ed-action {
  padding: clamp(18px, 3vw, 30px);
  border-radius: var(--ed-radius);
  background: var(--ed-tint);
  scroll-margin-top: var(--ed-sticky-top, 24px);
}
.ed-action .button { white-space: normal; }
.editorial .ed-footnote { margin-top: 16px; }

@media (max-width: 680px) {
  .editorial { padding-block: 21px 48px; }
  .editorial .ed-trail { margin-bottom: 14px; }
  .ed-masthead { grid-template-columns: 1fr; gap: 10px; margin-bottom: 21px; }
  .ed-feature { grid-template-columns: 1fr; }
  .ed-photo { grid-row: 1; min-height: 0; aspect-ratio: 2.15; }
  .ed-feature-copy { gap: 10px; }
  .ed-list .ed-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding-inline: 4px; }
  .ed-row > .ed-category { grid-column: 1 / -1; }
  .ed-article-grid { display: block; }
  .ed-toc { position: static; margin-bottom: 27px; }
  .ed-story > section > p { font-size: 1rem; }
}

.ed-guide-figure { margin: 24px 0; }
.ed-guide-figure img, .ed-guide-cover { display: block; width: 100%; height: auto; border-radius: var(--ed-radius); }
.ed-guide-figure figcaption { margin-top: 8px; color: var(--ed-muted); font-size: .875rem; line-height: 1.55; }
.ed-guide-table { overflow-x: auto; margin-block: 18px; }
.ed-guide-table table { width: 100%; border-collapse: collapse; }
.ed-guide-table th, .ed-guide-table td { border: 1px solid var(--ed-line); padding: 9px; text-align: left; vertical-align: top; }
.ed-guide-table th { background: var(--ed-tint); }
