/* /resources: the blog index, plus the article cards and section heads the
   article pages reuse (they link this file before post.css). Everything shared
   (hero, buttons, letter band) comes from site.css. */

/* Section heads. The index uses the shared centered .section-head (the filter and the
   portal link sit under the title as its aside). .res-head is the article pages' "Keep
   reading" head: the shared .h2 size, title left, a link on the right, the shared
   60 px gap above the cards. (.res-title is kept in their markup as a hook; it sets
   no size: every section title is the one .h2.) */
.res-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
  margin-bottom: clamp(40px, 28px + 2.2vw, 60px);
}
.res-head .link-arrow { padding-bottom: 6px; font-size: 14.5px; }
@media (min-width: 1200px) {
  .res-title { white-space: nowrap; }
}

/* Hero: the shared page hero, a little tighter at the bottom (the feature follows). */
.res-hero { padding-bottom: clamp(48px, 30px + 4vw, 104px); }

/* In the news: the WSJ feature. */
.res-feature { position: relative; z-index: 2; }
.feature-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 32px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
}
[data-theme="dark"] .feature-card { background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)); }
.feature-card__media {
  position: relative;
  overflow: hidden;
  height: clamp(300px, 200px + 22vw, 470px);
  border-radius: 22px;
  background: #1C1230;
}
.feature-card__media > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; }
.feature-card__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(180deg, rgba(14, 8, 26, 0), rgba(14, 8, 26, 0.6) 48%, rgba(14, 8, 26, 0.9));
  pointer-events: none;
}
.feature-card__press {
  position: absolute;
  left: clamp(20px, 12px + 1.4vw, 32px);
  bottom: clamp(20px, 14px + 1vw, 30px);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-card__press .mono { font-size: 11px; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.78); }
.feature-card__press img { width: auto; height: 21px; }
.feature-card__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(18px, 10px + 2vw, 44px) clamp(14px, 6px + 2.6vw, 48px) clamp(14px, 8px + 1.6vw, 36px) clamp(14px, 6px + 3.4vw, 56px);
}
.feature-card__title {
  font-size: clamp(27px, 21px + 1.2vw, 38px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.038em;
  color: var(--text-1);
  text-wrap: balance;
}
.feature-card__title a { transition: color 0.2s; }
.feature-card__title a:hover { color: var(--accent-2); }
.feature-card__text { max-width: 470px; font-size: 16.5px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.feature-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.feature-card__who { display: flex; flex-direction: column; gap: 3px; }
.feature-card__who .person__org { margin-top: 0; }
.feature-card__foot .btn { --btn-h: 46px; --btn-px: 20px; }
@media (min-width: 1024px) {
  .feature-card { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr); padding: 12px; gap: 0; }
}
@media (min-width: 1200px) {
  .feature-card { grid-template-columns: 548px minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .feature-card { border-radius: 26px; }
  .feature-card__media { border-radius: 18px; }
  .feature-card__foot .btn { width: 100%; }
}

/* Latest articles (and Keep reading on the article pages). */
.res-articles { position: relative; }
.res-articles__glow {
  position: absolute;
  left: 50%;
  top: 520px;
  z-index: 0;
  width: 1300px;
  height: 900px;
  margin-left: -650px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(107, 66, 156, 0.26), rgba(107, 66, 156, 0) 70%);
  pointer-events: none;
}
[data-theme="light"] .res-articles__glow { background: radial-gradient(closest-side, rgba(126, 72, 214, 0.08), rgba(126, 72, 214, 0) 70%); }
.res-articles--related .res-articles__glow { top: 260px; height: 700px; }
.res-articles > .container { position: relative; z-index: 1; }

/* The category filter: radio pills; the grid reads the checked one (no script). */
.filter { min-width: 0; max-width: 100%; margin: 0; padding: 0; border: 0; }
.filter__track {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 50px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--fill-1);
  border: 1px solid var(--border);
}
.filter__input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.filter__pill {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 17px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.filter__pill:hover { color: var(--text-1); }
.filter__input:checked + .filter__pill { background: var(--fill-3); color: var(--text-1); box-shadow: inset 0 0 0 1px var(--border); }
.filter__input:focus-visible + .filter__pill { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Under the centered title: the pill row is as wide as its pills; on a phone it runs
   edge to edge and scrolls (the aside and the filter stretch to the column). */
.res-filter { max-width: 100%; }
@media (max-width: 767px) {
  .res-filter,
  .res-filter .filter { align-self: stretch; }
}
@media (max-width: 1023px) {
  .res-articles .res-head { flex-direction: column; align-items: stretch; }
  .filter__track {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .filter__track::-webkit-scrollbar { display: none; }
  .filter__pill { flex: none; }
}
@media (max-width: 767px) {
  .filter__track {
    height: 54px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 0 var(--gutter);
    scroll-padding-inline: var(--gutter);
    border-radius: 0;
    border-width: 1px 0;
    background: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .filter__pill { height: 44px; padding: 0 16px; }
}

.post-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 1024px) {
  .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}
.post-grid__item { display: flex; min-width: 0; }
.post-grid__item--news { display: none; }
.res-articles:has(.filter__input:not(#cat-all):checked) .post-grid__item { display: none; }
.res-articles:has(#cat-rebates:checked) .post-grid__item[data-cat="rebates"],
.res-articles:has(#cat-biologics:checked) .post-grid__item[data-cat="biologics"],
.res-articles:has(#cat-billing:checked) .post-grid__item[data-cat="billing"],
.res-articles:has(#cat-operations:checked) .post-grid__item[data-cat="operations"],
.res-articles:has(#cat-news:checked) .post-grid__item[data-cat="news"] { display: flex; }

/* Article card. */
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 10px;
  border-radius: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
  color: var(--text-1);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.post-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
[data-theme="light"] .post-card:hover { box-shadow: 0 1px 2px rgba(21, 14, 32, 0.04), 0 28px 50px -28px rgba(76, 40, 130, 0.36); }
.post-card:focus-visible { outline-offset: 4px; border-radius: 24px; }
.post-card__cover {
  position: relative;
  display: block;
  overflow: hidden;
  height: clamp(200px, 150px + 6vw, 232px);
  border-radius: 16px;
}
.post-card__cover--photo { background: #1C1230; }
.post-card__cover--photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.post-card:hover .post-card__cover--photo img { transform: scale(1.03); }
.post-card__cover--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(74, 44, 128, 0.16), rgba(24, 12, 44, 0.4));
  mix-blend-mode: multiply;
  pointer-events: none;
}
.post-card__cover--portrait img { object-position: 50% 18%; }
.post-card__body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 24px 16px 16px; }
.post-card__cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.post-card__title {
  min-height: 2.48em;
  font-size: clamp(19px, 17px + 0.3vw, 21px);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -0.028em;
  color: var(--text-1);
  text-wrap: balance;
}
.post-card__excerpt { font-size: 14.5px; line-height: 1.55; color: var(--text-3); text-wrap: pretty; }
.post-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.post-card__excerpt + .post-card__meta { margin-top: auto; }
.post-card__body > .post-card__excerpt { margin-bottom: 6px; }
.byline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap;
}
.byline__mark { flex: none; border-radius: 30%; box-shadow: 0 0 0 1px var(--border-strong); }
.post-card__when {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-4);
  white-space: nowrap;
}
.post-card__read { display: inline-flex; align-items: center; gap: 5px; }
.post-card__read .icon { width: 13px; height: 13px; }
.post-card__press { width: auto; height: 15px; opacity: 0.85; }
.post-card__out { display: flex; color: var(--text-4); }
.post-card__out .icon { width: 16px; height: 16px; }
@media (min-width: 1024px) and (max-width: 1199px) {
  .post-card__body { padding: 20px 10px 10px; }
  .post-card__when time { display: none; }
}

/* The 3D-art covers: rings, a glow and the floating art (both themes). */
.art-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 60%, rgba(139, 92, 246, 0.55), rgba(139, 92, 246, 0) 56%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(185, 154, 240, 0.22), rgba(185, 154, 240, 0) 70%),
    linear-gradient(160deg, #1B1230 0%, #100A19 100%);
}
.art-cover--cyan {
  background:
    radial-gradient(circle at 50% 62%, rgba(139, 92, 246, 0.45), rgba(139, 92, 246, 0) 54%),
    radial-gradient(circle at 88% 8%, rgba(143, 233, 242, 0.24), rgba(143, 233, 242, 0) 46%),
    linear-gradient(160deg, #151428 0%, #0F0B19 100%);
}
.art-cover--lilac {
  background:
    radial-gradient(circle at 50% 60%, rgba(185, 154, 240, 0.4), rgba(185, 154, 240, 0) 56%),
    radial-gradient(circle at 6% 100%, rgba(126, 72, 214, 0.4), rgba(126, 72, 214, 0) 52%),
    linear-gradient(160deg, #1A1227 0%, #110A1B 100%);
}
[data-theme="light"] .art-cover {
  background:
    radial-gradient(circle at 50% 60%, rgba(139, 92, 246, 0.22), rgba(139, 92, 246, 0) 56%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(185, 154, 240, 0.09), rgba(185, 154, 240, 0) 70%),
    #F7F4FD;
}
[data-theme="light"] .art-cover--cyan {
  background:
    radial-gradient(circle at 50% 62%, rgba(139, 92, 246, 0.18), rgba(139, 92, 246, 0) 54%),
    radial-gradient(circle at 88% 8%, rgba(31, 143, 156, 0.1), rgba(31, 143, 156, 0) 46%),
    #F7F4FD;
}
[data-theme="light"] .art-cover--lilac {
  background:
    radial-gradient(circle at 50% 60%, rgba(185, 154, 240, 0.2), rgba(185, 154, 240, 0) 56%),
    radial-gradient(circle at 6% 100%, rgba(126, 72, 214, 0.16), rgba(126, 72, 214, 0) 52%),
    #F7F4FD;
}
.art-cover > .fx-grain { opacity: calc(var(--grain-opacity) * 0.8); }
.art-cover__rings { position: absolute; inset: 0; }
.art-cover__rings span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--ring) * var(--ring-scale, 1));
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, var(--ring-a));
  transform: translate(-50%, -50%);
}
[data-theme="light"] .art-cover__rings span { border-color: rgba(107, 66, 156, calc(var(--ring-a) * 1.6)); }
.art-cover__rings span:nth-child(1) { --ring: 176px; --ring-a: 0.08; }
.art-cover__rings span:nth-child(2) { --ring: 262px; --ring-a: 0.055; }
.art-cover__rings span:nth-child(3) { --ring: 352px; --ring-a: 0.035; }
.art-cover .art {
  position: relative;
  width: 136px;
  filter: drop-shadow(0 18px 30px rgba(139, 92, 246, 0.5));
  animation: mx-float 9s ease-in-out infinite;
}
[data-theme="light"] .art-cover .art { filter: drop-shadow(0 18px 30px rgba(139, 92, 246, 0.24)); }
.post-grid__item:nth-child(3n + 2) .art-cover .art { animation-delay: -2.3s; }
.post-grid__item:nth-child(3n) .art-cover .art { animation-delay: -4.6s; }

/* More from Medico: the member resources. */
.more-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 1024px) {
  .more-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.more-grid > li { display: flex; }
.more-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 16px 16px 24px;
  border-radius: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
  color: var(--text-1);
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}
.more-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.more-card--accent { background: var(--feature-bg); border-color: var(--feature-border); }
[data-theme="dark"] .more-card--accent { background: linear-gradient(180deg, rgba(185, 154, 240, 0.12), rgba(255, 255, 255, 0.015)); border-color: rgba(205, 181, 244, 0.2); }
[data-theme="light"] .more-card--accent { background: linear-gradient(180deg, rgba(185, 154, 240, 0.1), rgba(255, 255, 255, 0.6)), #FFFFFF; }
.more-card__art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 132px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 58%, rgba(139, 92, 246, 0.35), rgba(139, 92, 246, 0) 64%);
}
.more-card--accent .more-card__art { background: radial-gradient(circle at 50% 58%, rgba(139, 92, 246, 0.45), rgba(139, 92, 246, 0) 64%); }
[data-theme="light"] .more-card__art { background: radial-gradient(circle at 50% 58%, rgba(139, 92, 246, 0.16), rgba(139, 92, 246, 0) 64%); }
.more-card__art .art { width: 96px; animation: mx-float 9s ease-in-out infinite; }
.more-grid > li:nth-child(2) .art { animation-delay: -3s; }
.more-grid > li:nth-child(3) .art { animation-delay: -6s; }
.more-grid > li:nth-child(4) .art { animation-delay: -1s; }
.more-card__text { display: flex; flex-direction: column; gap: 8px; padding: 10px 8px 0; }
.more-card__title { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-4); }
.more-card__title h3 { font-size: 19px; font-weight: 500; line-height: 1.2; letter-spacing: -0.028em; color: var(--text-1); }
.more-card__title .icon { width: 15px; height: 15px; transition: transform 0.25s var(--ease-out), color 0.2s; }
.more-card:hover .more-card__title .icon { transform: translateX(3px); color: var(--accent-2); }
.more-card__desc { font-size: 14px; line-height: 1.55; color: var(--text-3); text-wrap: pretty; }
@media (max-width: 639px) {
  .more-card { flex-direction: row; align-items: center; gap: 16px; padding: 12px 18px 12px 12px; border-radius: 22px; }
  .more-card__art { flex: none; width: 92px; height: 92px; border-radius: 14px; }
  .more-card__art .art { width: 72px; }
  .more-card__text { flex: 1; min-width: 0; gap: 4px; padding: 0; }
  .more-card__title h3 { font-size: 17.5px; }
  .more-card__desc { font-size: 13.5px; }
}
