/* WIJDR REV20: Editorial article cards. CSS-only, scoped to original article previews.
   Does not style petitions, library, court filings, admin tables or other .card items. */
:root{--w20-ink:#161513;--w20-red:#bc262d;--w20-gold:#e6b84a;--w20-cream:#faf5e9;--w20-rule:#e2d9cc}

/* Only a grid containing the original article-preview element gets these columns. */
.grid.cards:has(> a.card.card-link > .wijdr-article-preview){
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(16px,2.4vw,28px);
  align-items:stretch;
}

.grid.cards > a.card.card-link:has(> .wijdr-article-preview){
  position:relative;
  display:flex;
  flex-direction:column;
  min-width:0;
  height:100%;
  padding:0;
  overflow:hidden;
  border:1px solid var(--w20-rule);
  border-radius:19px;
  background:#fffdf9;
  color:var(--w20-ink);
  text-decoration:none;
  box-shadow:0 3px 0 rgba(126,92,47,.07),0 9px 27px rgba(31,22,12,.065);
  isolation:isolate;
  transition:border-color .2s ease,transform .2s ease,box-shadow .2s ease;
}

.grid.cards > a.card.card-link:has(> .wijdr-article-preview)::before{
  content:"";
  height:5px;
  position:absolute;
  z-index:2;
  top:0;left:0;right:0;
  pointer-events:none;
  background:linear-gradient(90deg,var(--w20-red) 0 75%,var(--w20-gold) 75% 100%);
}

.grid.cards > a.card.card-link > .wijdr-article-preview{
  display:block;
  width:100%;
  height:auto;
  min-height:0;
  aspect-ratio:16/10;
  object-fit:cover;
  object-position:center;
  margin:0;
  padding:0;
  border-radius:0;
  flex:none;
  background:#e9e2d7;
  transition:transform .4s cubic-bezier(.2,.7,.2,1),filter .4s ease;
}

.grid.cards > a.card.card-link > .wijdr-article-preview-empty{
  display:grid;
  place-items:center;
  color:#f8eee1;
  background:radial-gradient(circle at 70% 25%,#7e3031 0%,transparent 48%),linear-gradient(135deg,#292323 5%,#681e25 65%,#271e1b 100%);
  text-shadow:0 2px 12px rgba(0,0,0,.2);
  letter-spacing:.22em;
  font-size:clamp(22px,3vw,35px);
  font-weight:900;
}

.grid.cards > a.card.card-link > .section-kicker{
  display:inline-block;
  position:relative;
  z-index:3;
  max-width:calc(100% - 36px);
  margin:-15px 19px 11px;
  padding:6px 11px 5px;
  align-self:flex-start;
  border-radius:6px;
  border:1px solid #981d25;
  background:var(--w20-red);
  color:#fff;
  box-shadow:0 3px 8px rgba(105,21,29,.15);
  font-size:10px;
  font-weight:850;
  letter-spacing:.12em;
  line-height:1.3;
  overflow-wrap:anywhere;
  text-transform:uppercase;
}

.grid.cards > a.card.card-link > :is(h2,h3){
  margin:0 20px 12px;
  padding:0;
  color:var(--w20-ink);
  font-size:clamp(19px,1.75vw,24px);
  font-weight:850;
  line-height:1.22;
  letter-spacing:-.037em;
  overflow-wrap:anywhere;
  text-wrap:pretty;
  transition:color .2s ease;
}

.grid.cards > a.card.card-link > p{
  margin:0 20px 20px;
  color:#514c47;
  font-size:14px;
  line-height:1.65;
  overflow-wrap:anywhere;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  line-clamp:3;
  overflow:hidden;
}

.grid.cards > a.card.card-link > small{
  display:flex;
  align-items:center;
  justify-content:space-between;
  column-gap:8px;
  margin:auto 0 0;
  padding:14px 20px 15px;
  min-height:54px;
  background:linear-gradient(110deg,#fbf7ef,#fffdfa);
  border-top:1px solid #ece4d9;
  color:#766b5e;
  font-size:11px;
  font-weight:750;
  letter-spacing:.04em;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}

.grid.cards > a.card.card-link > small::after{
  content:"READ ARTICLE  ↗";
  color:var(--w20-red);
  text-align:right;
  white-space:nowrap;
  font-size:10px;
  font-weight:900;
  letter-spacing:.1em;
}

.grid.cards > a.card.card-link:hover{
  border-color:#d6b18c;
  transform:translateY(-5px);
  box-shadow:0 6px 0 rgba(166,48,40,.07),0 23px 46px rgba(33,22,13,.15);
}
.grid.cards > a.card.card-link:hover > img.wijdr-article-preview{
  transform:scale(1.045);
  filter:saturate(1.07);
}
.grid.cards > a.card.card-link:hover > :is(h2,h3){color:#9f1e25}
.grid.cards > a.card.card-link:focus-visible{
  outline:3px solid var(--w20-red);
  outline-offset:4px;
  border-color:var(--w20-red);
}

@media(max-width:1060px){
  .grid.cards:has(> a.card.card-link > .wijdr-article-preview){grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){
  .grid.cards:has(> a.card.card-link > .wijdr-article-preview){grid-template-columns:minmax(0,1fr);gap:18px}
  .grid.cards > a.card.card-link > .wijdr-article-preview{aspect-ratio:16/9}
  .grid.cards > a.card.card-link > :is(h2,h3){font-size:21px}
  .grid.cards > a.card.card-link > p{-webkit-line-clamp:4;line-clamp:4}
}
@media(prefers-reduced-motion:reduce){
  .grid.cards > a.card.card-link:has(> .wijdr-article-preview),
  .grid.cards > a.card.card-link > .wijdr-article-preview,
  .grid.cards > a.card.card-link > :is(h2,h3){transition:none!important}
  .grid.cards > a.card.card-link:hover{transform:none}
  .grid.cards > a.card.card-link:hover > .wijdr-article-preview{transform:none}
}
