/* WIJDR 1.0.8 REV21 — Latest Discussion editorial presentation only.
   Intentional scope: .wijdr-latest-shell. No changes to feed, links, counts,
   search, templates, or the two existing discussion tab handlers. */
.wijdr-latest-shell{
  --w21-ink:#201d1b;--w21-red:#bc262d;--w21-gold:#e6b84a;
  --w21-cream:#faf5e9;--w21-muted:#625d55;--w21-line:#dfd4c5;
  box-sizing:border-box;max-width:1160px;min-width:0;
  margin:clamp(24px,3vw,42px) auto;padding:clamp(18px,3vw,34px);
  border:1px solid #e2d8ca;border-radius:20px;
  background:linear-gradient(155deg,#fdfaf3 0%,#f8f1e6 60%,#fffdfa 100%);
  color:var(--w21-ink);box-shadow:0 10px 34px rgba(38,28,21,.075);isolation:isolate;
}
.wijdr-latest-shell::before{
  height:6px;background:linear-gradient(90deg,#bc262d 0 72%,#e6b84a 72% 100%);
  border-radius:20px 20px 0 0;
}
.wijdr-latest-shell>.section-kicker{
  color:#8d262b!important;opacity:1!important;font-weight:850!important;
  font-size:.73rem!important;letter-spacing:.16em!important;
  text-transform:uppercase;display:flex;align-items:center;gap:10px;margin:0 0 7px;
}
.wijdr-latest-shell>.section-kicker::before{
  content:"";display:block;width:10px;height:10px;flex:none;border-radius:2px;
  transform:rotate(45deg);background:var(--w21-red);box-shadow:none;
}
.wijdr-latest-shell>h2{
  color:#1c1a18;margin:0 0 20px;font-size:clamp(1.6rem,2.7vw,2.3rem);
  letter-spacing:-.045em;line-height:1.12;font-weight:850;text-wrap:balance;
}
/* The existing REV6 tab buttons remain functional; this only restyles them. */
.wijdr-latest-shell .wijdr-discussion-tabs{
  display:flex;flex-wrap:wrap;align-items:stretch;gap:8px;
  margin:0 0 20px;padding:5px;border:1px solid #e0d5c8;
  border-radius:14px;background:#eee6db;
}
.wijdr-latest-shell .wijdr-discussion-tabs button{
  appearance:none;flex:1 1 190px;position:relative;min-width:0;
  padding:12px clamp(10px,2vw,22px);border:1px solid transparent;
  border-radius:10px;color:#4b4540;background:transparent;
  font:inherit;font-size:.91rem;font-weight:800;letter-spacing:-.01em;
  cursor:pointer;transition:background .2s,color .2s,box-shadow .2s,transform .2s;
}
.wijdr-latest-shell .wijdr-discussion-tabs button:hover{
  color:#9f2029;background:rgba(255,253,249,.82);
}
.wijdr-latest-shell .wijdr-discussion-tabs button[aria-selected="true"]{
  background:#26201e;color:#fff;border-color:#26201e;
  box-shadow:inset 0 -3px 0 var(--w21-gold),0 3px 9px rgba(30,20,17,.15);
}
.wijdr-latest-shell .wijdr-discussion-tabs button:focus-visible,
.wijdr-latest-shell .wijdr-latest-item:focus-visible{
  outline:3px solid #b12a32;outline-offset:3px;
}
.wijdr-latest-shell .wijdr-latest-list{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;
  min-width:0;counter-reset:w21-discussion;
}
.wijdr-latest-shell .wijdr-latest-list[hidden]{display:none!important}
.wijdr-latest-shell .wijdr-latest-item{
  --w21-accent:#bc262d;--w21-tint:#fff8f4;
  box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;
  justify-content:flex-start;gap:12px;min-width:0;min-height:176px;
  padding:19px 20px 17px;border-radius:15px;
  border:1px solid var(--w21-line);border-left:4px solid var(--w21-accent);
  color:var(--w21-ink)!important;text-decoration:none!important;
  background:linear-gradient(130deg,#fffefb 0%,var(--w21-tint) 100%);
  box-shadow:0 2px 0 rgba(139,103,50,.05),0 6px 16px rgba(24,16,10,.035);
  overflow:hidden;position:relative;counter-increment:w21-discussion;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.wijdr-latest-shell .wijdr-latest-item:nth-child(4n+1){--w21-accent:#bc262d;--w21-tint:#fff8f4}
.wijdr-latest-shell .wijdr-latest-item:nth-child(4n+2){--w21-accent:#bb8131;--w21-tint:#fffbf0}
.wijdr-latest-shell .wijdr-latest-item:nth-child(4n+3){--w21-accent:#586964;--w21-tint:#f7faf7}
.wijdr-latest-shell .wijdr-latest-item:nth-child(4n){--w21-accent:#8f5a56;--w21-tint:#fdf6f5}
.wijdr-latest-shell .wijdr-latest-item::before{
  content:counter(w21-discussion,decimal-leading-zero);
  display:inline-grid;place-items:center;flex:none;align-self:flex-start;
  min-width:31px;height:27px;padding:0 4px;box-sizing:border-box;
  border-radius:7px;background:var(--w21-accent);color:#fff;
  font-size:.71rem;line-height:1;font-weight:850;letter-spacing:.04em;
}
.wijdr-latest-shell .wijdr-trending-list .wijdr-latest-item::before{
  content:"↗ " counter(w21-discussion,decimal-leading-zero);min-width:46px;
}
.wijdr-latest-shell .wijdr-latest-item:hover{
  transform:translateY(-3px);border-color:var(--w21-accent);
  box-shadow:0 13px 25px rgba(37,21,13,.12);
}
.wijdr-latest-shell .wijdr-latest-text{
  display:block;color:#29231f;overflow-wrap:anywhere;word-break:normal;
  font-size:clamp(.95rem,1.17vw,1.02rem);font-weight:650;
  line-height:1.53;letter-spacing:-.009em;margin:0;flex:1 0 auto;
}
.wijdr-latest-shell .wijdr-latest-text::before{
  content:'“';vertical-align:-.12em;line-height:0;margin-right:3px;
  font-family:Georgia,serif;font-size:1.7em;color:var(--w21-accent);opacity:.7;
}
.wijdr-latest-shell .wijdr-latest-meta{
  box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;
  width:100%;min-width:0;gap:7px;margin-top:auto;padding-top:12px;
  border-top:1px solid #e9ded0;color:var(--w21-muted);
  font-size:.74rem;font-weight:750;letter-spacing:.01em;opacity:1;
  overflow-wrap:anywhere;
}
.wijdr-latest-shell .wijdr-latest-meta::after{
  content:"View comment ↗";margin-left:auto;white-space:nowrap;
  color:#aa262b;font-weight:850;letter-spacing:0;
}
.wijdr-latest-shell .wijdr-trending-list .wijdr-latest-meta::after{
  content:"Open conversation ↗";color:#aa262b;
}
.wijdr-latest-shell .wijdr-latest-list>.muted,
.wijdr-latest-shell .wijdr-latest-list:not(:has(.wijdr-latest-item)){
  color:var(--w21-muted);line-height:1.6;
}
.wijdr-latest-shell .wijdr-latest-list>.muted{
  grid-column:1/-1;border:1px dashed #d5c5af;border-radius:12px;
  padding:22px;background:#fffdf9;text-align:center;
}
@media(max-width:750px){
  .wijdr-latest-shell{margin:24px 12px;padding:20px 16px;border-radius:17px}
  .wijdr-latest-shell::before{border-radius:17px 17px 0 0}
  .wijdr-latest-shell .wijdr-latest-list{grid-template-columns:1fr;gap:11px}
  .wijdr-latest-shell .wijdr-latest-item{min-height:0;padding:16px 16px 14px;gap:10px}
  .wijdr-latest-shell .wijdr-discussion-tabs button{flex:1 1 120px;padding:10px 8px;font-size:.8rem}
}
@media(max-width:385px){
  .wijdr-latest-shell{margin:20px 8px;padding:15px 11px}
  .wijdr-latest-shell .wijdr-latest-meta::after{margin-left:0}
}
@media(prefers-reduced-motion:reduce){
  .wijdr-latest-shell .wijdr-latest-item,
  .wijdr-latest-shell .wijdr-discussion-tabs button{transition:none}
  .wijdr-latest-shell .wijdr-latest-item:hover{transform:none}
}
