/* Resources group: the blog index and the article page.
   Loaded after pages.css. Prefix: rs-. */

/* ---------- Featured article in the blog hero ---------- */
.rs-feature { grid-template-columns: minmax(0, 1fr); color: var(--white); }
.rs-feature > .r-cut__body { min-width: 0; min-height: clamp(380px, 34vw, 480px); }
.r-page-hero--split .rs-feature .r-photo { aspect-ratio: auto; }
.rs-feature .r-photo strong { font-size: clamp(24px, 2.4vw, 32px); }
.rs-feature__text { max-width: min(30em, 100%); font-family: var(--f-text); font-size: 17px; line-height: 1.7; color: var(--on-dark-strong); }
.rs-feature__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.rs-feature__meta li, .rs-tag {
  display: inline-flex; align-items: center; min-height: 32px; padding: 4px 14px;
  border-radius: 9999px; background: rgba(255, 255, 255, 0.12);
  font-family: var(--f-sans); font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--white);
}

/* ---------- Upcoming articles: not links, so no hover or press states ---------- */
.rs-soon { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rs-soon__card { gap: 14px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.rs-soon__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rs-soon__card .rs-post__role { color: var(--on-dark-strong); }
.rs-soon__badge {
  display: inline-flex; align-items: center; min-height: 30px; padding: 2px 12px; border-radius: 9999px;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4);
  font-family: var(--f-sans); font-size: 13px; font-weight: 700; color: var(--white);
}
.rs-soon__card h3 { font-family: var(--f-display); font-weight: 900; font-size: clamp(20px, 1.6vw, 23px); line-height: 1.45; }
.rs-soon__card p { font-size: 16px; line-height: 1.7; }
.rs-post__role { font-family: var(--f-sans); font-size: 14px; font-weight: 700; color: var(--r-blue); }

/* ---------- Article page ---------- */
.rs-progress {
  position: fixed; inset: 0 0 auto; z-index: 200; height: 3px; pointer-events: none;
  background: var(--r-blue); transform-origin: 100% 50%; transform: scaleX(var(--p, 0));
}
@supports (animation-timeline: scroll()) {
  .rs-progress { transform: scaleX(0); animation: rs-progress linear both; animation-timeline: scroll(root); }
  @keyframes rs-progress { to { transform: scaleX(1); } }
}
.rs-article-hero { padding-bottom: clamp(32px, 4vw, 56px); }
.rs-article-hero .r-page-hero__head { max-width: 920px; }
.rs-article-hero .r-h-page { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.4; }
.rs-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-family: var(--f-sans); font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.rs-meta li + li::before { content: ""; display: inline-block; width: 4px; height: 4px; margin-inline-end: 20px; vertical-align: middle; border-radius: 50%; background: currentColor; opacity: 0.5; }
.rs-cover { grid-template-columns: minmax(0, 1fr); margin-top: clamp(32px, 4vw, 48px); }
.rs-cover > .r-cut__body { min-width: 0; }
.rs-cover .r-photo { aspect-ratio: 16 / 7; min-height: 0; }

.rs-article { position: relative; padding-block: 0 var(--section); }
.rs-article__grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(40px, 6vw, 96px); align-items: start; }
.rs-article .r-prose { max-width: 68ch; }
.rs-article .r-prose h2 { scroll-margin-top: 120px; }
.rs-article .r-prose strong { font-weight: 700; color: var(--ink); }
.rs-lede { font-size: 21px; line-height: 1.85; color: var(--ink); }
.rs-disclaimer { margin-top: 2.4em !important; padding-top: 1.2em; border-top: 1px solid var(--ash); font-size: 15px; color: var(--ink-soft); }
.r-prose .rs-categories { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 18px; border-radius: var(--r-inner); background: var(--cream-2); }
.r-prose .rs-categories li { margin: 0; padding: 4px 14px; border-radius: 9999px; background: var(--white); font-family: var(--f-sans); font-size: 15px; font-weight: 700; }

/* Sticky table of contents; the aside stretches so the sticky panel has room to travel */
.rs-article__aside { align-self: stretch; }
.rs-toc { position: sticky; top: 112px; display: grid; gap: 16px; padding: 24px; border-radius: var(--r-card); background: rgba(255, 255, 255, 0.72); box-shadow: inset 0 0 0 1.5px rgba(37, 99, 234, 0.2); }
.rs-toc > summary { list-style: none; font-family: var(--f-display); font-weight: 900; font-size: 18px; cursor: default; pointer-events: none; }
.rs-toc > summary::-webkit-details-marker { display: none; }
.rs-toc ol { display: grid; gap: 2px; margin-top: 12px; }
.rs-toc a {
  position: relative; display: block; padding: 8px 14px 8px 8px; border-radius: 12px;
  font-family: var(--f-sans); font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--ink-soft);
  transition: color var(--t-hover) ease, background-color var(--t-hover) ease;
}
.rs-toc a::before { content: ""; position: absolute; top: 10px; bottom: 10px; right: 0; width: 3px; border-radius: 3px; background: var(--r-blue); transform: scaleY(0); transition: transform 220ms var(--ease-out); }
.rs-toc a[aria-current="true"] { color: var(--ink); font-weight: 700; }
.rs-toc a[aria-current="true"]::before { transform: none; }
@media (hover: hover) and (pointer: fine) { .rs-toc a:hover { color: var(--r-blue); background: var(--cream-2); } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .rs-soon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-article__grid { grid-template-columns: minmax(0, 1fr) 240px; }
}
@media (max-width: 960px) {
  .rs-article__grid { grid-template-columns: 1fr; }
  .rs-article__aside { order: -1; }
  .rs-toc { position: static; padding: 0; background: none; box-shadow: none; }
  .rs-toc > summary { pointer-events: auto; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 20px; border-radius: var(--r-inner); background: var(--white); box-shadow: inset 0 0 0 1px rgba(11, 26, 92, 0.12); }
  .rs-toc > summary::after { content: "+"; font-weight: 400; transition: transform 200ms var(--ease-out); }
  .rs-toc[open] > summary::after { transform: rotate(45deg); }
}
@media (max-width: 640px) {
  .rs-soon { grid-template-columns: 1fr; }
  .rs-cover .r-photo { aspect-ratio: 4 / 3; }
  .rs-lede { font-size: 19px; }
  .r-prose { font-size: 17px; }
  .rs-feature > .r-cut__body { min-height: 340px; }
}

/* The card loop shows through the cut-out bite on this card */
.rs-feature .r-loop { display: none; }
