/* sec-resources.css: the Resources hub, the article template and the author pages. Owned by P4. Tokens only (tokens.css).
   Devices: the Monthly/Annual toggle container reused as the topic filter (DETAILS part A section 7), pale and colour cards,
   headline pairing, eyebrow. Reading measure for articles: 46rem column, 18px / 1.6 body. */
.t-lilac  { --tone: var(--lilac); }
.t-orange { --tone: var(--orange); }
.t-coral  { --tone: var(--coral); }
.t-mint   { --tone: var(--mint); }
.t-pale   { --tone: var(--card); }
.sec-head { text-align: center; max-width: 54rem; margin: 0 auto var(--gap-xl); }

/* ---- the hub: topic filter (the template's tab-menu container) ---------------------------------------------------- */
.resources-band { padding-top: 0; }
.filter { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0 0 var(--gap-xl); }
.filter[hidden] { display: none; }
.filter__label { margin: 0; font: 500 14px/1.3 var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-70); }
.chips { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 4px; background: var(--ground); border: 2px solid var(--card); border-radius: 14px; }
.chip { display: inline-flex; align-items: center; gap: var(--gap-s); min-height: 40px; padding: 8px 12px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); font: 600 16px/1.3 var(--body); cursor: pointer; transition: color .3s; }
.chip[aria-pressed="true"] { background: var(--cta); }
.chip__n { font-size: 13px; font-weight: 500; }
.filter__status { margin: 0; min-height: 20px; font-size: 14px; font-weight: 500; color: var(--ink-70); }

/* ---- the article cards ----------------------------------------------------------------------------------------------- */
.agrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-m); }
.agrid--related { grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr)); }
.agrid[hidden], .acard[hidden] { display: none; }
.agrid__count { margin: 0 0 var(--gap-m); font-weight: 600; color: var(--ink-70); }
.acard { position: relative; display: flex; flex-direction: column; padding: 12px; border: 2px solid var(--card); border-radius: var(--r-xl); background: var(--ground); transition: transform .2s; }
.acard:hover { transform: scale(.99); }
.acard__media { position: relative; overflow: hidden; aspect-ratio: 3 / 2; border-radius: var(--r-lg); background: var(--card); }
.acard__media img { width: 100%; height: 100%; object-fit: cover; }
.acard__body { display: flex; flex-direction: column; gap: var(--gap-s); padding: 20px 12px 12px; flex: 1; }
.acard__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font: 500 13px/1.3 var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-70); }
.acard__title { margin: 0; font: 400 28px/1.05 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.acard__title a { color: var(--ink); text-decoration: none; }
.acard__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-xl); }
.acard__ex { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--ink-70); }
.acard__by { margin: auto 0 0; padding-top: var(--gap-s); font-size: 14px; font-weight: 500; color: var(--ink-70); }
.acard__by a { position: relative; z-index: 1; display: inline-block; min-height: 24px; line-height: 24px; color: var(--ink); text-underline-offset: 3px; }

/* ---- the article page ------------------------------------------------------------------------------------------------ */
.art-head { padding: 196px 0 var(--gap-xl); }
.art-wrap { width: min(100% - 2 * var(--gutter-x), 46rem); margin-inline: auto; }
.art-h1 { font-size: var(--fs-h2); line-height: 1; letter-spacing: -.03em; }
.art-lede { margin: var(--gap-m) 0 0; font-size: 20px; line-height: 1.5; font-weight: 500; color: var(--ink-70); text-wrap: pretty; }
/* the byline is By, Published, Updated, read time: each part stays whole and wraps as a unit (a date never splits across lines and a
   divider never starts a line); under 560 px the dividers go and the gap between parts does their job */
.art-byline { margin-top: var(--gap-l); font-weight: 600; display: flex; flex-wrap: wrap; column-gap: .4em; row-gap: 2px; }
.art-byline > * { white-space: nowrap; }
.acover { margin: 0 auto var(--gap-xl); max-width: 60rem; border-radius: var(--r-xl); overflow: hidden; background: var(--card); }
.acover img { width: 100%; height: auto; }
.art { padding-bottom: var(--band-pad); }
.prose { font-size: 18px; line-height: 1.6; font-weight: 500; color: var(--ink); }
.prose > * { margin-top: 0; margin-bottom: 20px; }
.prose p { margin-bottom: 20px; }
.prose a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.prose h2, .prose h3, .prose h4 { font-family: var(--display); font-weight: 400; letter-spacing: -.03em; text-wrap: pretty; scroll-margin-top: 120px; }
.prose h2 { font-size: min(var(--fs-h3), 40px); line-height: 1; margin: var(--gap-xxl) 0 var(--gap-m); }
.prose h3 { font-size: 30px; line-height: 1.05; margin: var(--gap-xl) 0 12px; }
.prose h4 { font: 600 20px/1.3 var(--body); letter-spacing: 0; margin: var(--gap-l) 0 8px; }
.prose > h2:first-child { margin-top: 0; }
.prose .alabel { font-weight: 700; margin-bottom: 8px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 0 0 10px; padding-left: 4px; }
.prose li > ul, .prose li > ol { margin-top: 10px; margin-bottom: 0; }
.prose blockquote { margin: var(--gap-l) 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--card); font-family: var(--display); font-size: 28px; line-height: 1.2; letter-spacing: -.02em; }
.prose blockquote p { margin: 0; }
.atable { margin: var(--gap-l) 0; overflow-x: auto; border: 2px solid var(--card); border-radius: var(--r-md); background: var(--ground); }
.atable:focus-visible { outline-offset: 2px; }
.atable table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 15px; line-height: 1.4; font-weight: 500; text-align: left; }
.atable th, .atable td { padding: 12px 16px; border-bottom: 1px solid var(--card); vertical-align: top; }
.atable thead th { background: var(--card); font-weight: 700; border-bottom: 0; }
.atable tbody th { font-weight: 600; }
.atable tbody tr:last-child th, .atable tbody tr:last-child td { border-bottom: 0; }
.asrc { margin-top: var(--gap-xxl); padding: var(--gap-l) var(--gap-l) var(--gap-l); border-radius: var(--r-lg); background: var(--card); }
.prose a, .asrc a, .art-byline a { padding-block: 3px; }
.asrc h2 { font: 400 var(--fs-h3)/1 var(--display); letter-spacing: -.03em; margin: 0 0 var(--gap-m); }
.asrc ol { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; font-size: 16px; line-height: 1.4; font-weight: 500; }
.asrc a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.asrc__host { color: var(--ink-70); font-size: 14px; overflow-wrap: anywhere; }

/* ---- responsive ------------------------------------------------------------------------------------------------------ */
@media (max-width: 991px) {
  .agrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .art-head { padding-top: 150px; }
}
@media (max-width: 767px) {
  .agrid { grid-template-columns: minmax(0, 1fr); }
  .acard, .acover { border-radius: var(--r-lg); }
  .acard__title a::after { border-radius: var(--r-lg); }
  .prose { font-size: 17px; }
  .prose h3 { font-size: 26px; }
  .acard__topic { font-size: 32px; }
}
@media (max-width: 559px) {
  .art-byline { column-gap: 1.1em; }
  .art-byline > [aria-hidden="true"] { display: none; }
}
@media (max-width: 479px) {
  .chip { font-size: 14px; }
}
