/* Shared image geometry. Neutral palette and existing category badge colors stay intact. */
.posts-grid { grid-auto-rows: 1fr; }
.posts-grid > .post-card { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.post-card .post-card-body { flex: 1; height: auto; min-width: 0; }
.post-card .poliifi-card-media {
  position: relative; display: block; flex: none; overflow: hidden;
  aspect-ratio: var(--poliifi-card-ratio, 16 / 10); width: 100%;
  background: var(--soft); isolation: isolate;
}
.poliifi-card-media .poliifi-article-image {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; z-index: 1;
}
/* Onhard's saved .thumb img rule loads later. Only managed card frames reset
   its inset/margins so native and external images use the exact same crop. */
.post-card .poliifi-card-media > img.poliifi-article-image {
  margin: 0; max-width: 100%; max-height: none;
}
.poliifi-image-surface {
  display: grid; place-items: center; position: absolute; inset: 0;
  color: var(--navy); background: repeating-linear-gradient(-25deg, transparent 0 26px, rgba(6,116,216,.08) 26px 29px), var(--soft);
}
.poliifi-image-surface > span {
  font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.5rem, 3vw, 2.7rem);
  font-weight: 700; letter-spacing: -.06em; transform: rotate(-8deg);
}
.poliifi-card-media.has-image .poliifi-image-surface { visibility: hidden; }
.post-card .entry-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden; overflow-wrap: anywhere; line-height: 1.2;
  height: 3.6em; flex: none; margin-bottom: .8rem;
}
.post-card .poliifi-card-excerpt {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; line-height: 1.55; height: 3.1em; flex: none;
}
.post-card .poliifi-card-source {
  color: var(--muted); font-size: .75rem; line-height: 1.4;
  min-height: 1.4em; margin: 0 0 .5rem; overflow-wrap: anywhere;
}
.post-card-meta { min-width: 0; }
.post-card-meta > .entry-meta { flex: none; }
.poliifi-single-media { margin: 0 0 2rem; }
.poliifi-single-media img { width: 100%; height: auto; }
.poliifi-single-media[hidden], .poliifi-article-image[hidden] { display: none !important; }

/* The category theme is selected in term metadata; no slug or term ID is hardcoded. */
body.poliifi-theme-skate {
  --skate-paper: #f5f3ed; --skate-ink: #18181b; --skate-lime: #d6ff32; --skate-pink: #fa83cd;
  --line: var(--skate-ink); --navy: var(--skate-ink); --navy-2: #343438;
  --blue: #313139; --muted: #59595e; --soft: #e8e6df;
  color: var(--skate-ink); background: var(--skate-paper);
}
.poliifi-theme-skate .site-header {
  color: #fff; background: var(--skate-ink); border-bottom: 2px solid var(--skate-ink); backdrop-filter: none;
}
.poliifi-theme-skate .site-branding, .poliifi-theme-skate .site-title,
.poliifi-theme-skate .main-navigation a { color: #fff; }
.poliifi-theme-skate .site-description { color: #d0d0d2; }
.poliifi-theme-skate .main-navigation a:hover,
.poliifi-theme-skate .main-navigation a:focus { color: var(--skate-ink); background: var(--skate-lime); }
.poliifi-theme-skate .main-navigation { background: var(--skate-ink); }
.poliifi-theme-skate .menu-toggle { background: var(--skate-lime); }
.poliifi-theme-skate .archive-header {
  position: relative; overflow: hidden; padding: clamp(2rem, 5vw, 4.5rem) 0 2rem;
}
.poliifi-theme-skate .eyebrow {
  color: var(--skate-ink); font-weight: 800; letter-spacing: .15em; font-size: .75rem;
  background: transparent; border: 0; padding: 0; border-radius: 0;
}
.poliifi-theme-skate .poliifi-skate-title {
  font-size: clamp(2.7rem, 10vw, 8.2rem); line-height: 1;
  text-transform: uppercase; font-style: italic; font-weight: 700;
  letter-spacing: -.075em; margin: 1.3rem 0; max-width: 100%; overflow-wrap: anywhere;
}
.poliifi-skate-title > span { color: #ba1e75; }
.poliifi-skate-sticker {
  display: inline-block; padding: .65rem 1rem; float: right;
  font-size: .75rem; line-height: 1.25; font-weight: 850;
  background: var(--skate-pink); border: 2px solid var(--skate-ink);
  box-shadow: 4px 4px 0 var(--skate-ink); transform: rotate(8deg); margin: .25rem 1rem 1rem;
}
.poliifi-theme-skate .archive-header .lead {
  font-size: 1rem; line-height: 1.7; max-width: 42rem;
}
.poliifi-skate-tape {
  background: var(--skate-lime); border-block: 2px solid var(--skate-ink);
  font-size: .75rem; font-weight: 850; letter-spacing: .13em;
  padding: .8rem 1rem; line-height: 1.7;
}
.poliifi-skate-section-title {
  font-size: 1.4rem; font-weight: 700; letter-spacing: -.04em; margin: 2rem 0 1.1rem;
}
.poliifi-theme-skate .post-card {
  background: #fff; border: 1.5px solid var(--skate-ink); border-radius: 0; box-shadow: none;
}
.poliifi-theme-skate .poliifi-image-surface {
  background: repeating-linear-gradient(-25deg, transparent 0 26px, rgba(24,24,27,.13) 26px 51px), var(--skate-pink);
  color: var(--skate-ink);
}
.poliifi-theme-skate .poliifi-image-surface > span {
  font-weight: 700; font-style: italic; font-size: clamp(1.3rem, 3vw, 2.6rem);
  max-width: 8em; padding: .5rem; text-align: center; line-height: .95;
}
.poliifi-theme-skate .post-card .entry-title { font-size: 1.45rem; font-weight: 700; letter-spacing: -.045em; }
.poliifi-theme-skate .post-card-body > p { color: #53535a; }
.poliifi-theme-skate .post-card-link {
  width: 100%; color: var(--skate-ink); border-top: 1px solid #d8d8db;
  padding-top: .85rem; font-weight: 850; justify-content: space-between;
}
.poliifi-theme-skate .post-card-link:hover, .poliifi-theme-skate .post-card-link:focus { color: #a01961; }
.poliifi-theme-skate .post-category { border-radius: 0; box-shadow: none; }
.poliifi-theme-skate .single-post-main { min-width: 0; }
.poliifi-theme-skate.single-post .entry-header h1 {
  font-size: clamp(2.2rem, 5.5vw, 4.8rem); font-weight: 700;
  letter-spacing: -.065em; line-height: 1.06; overflow-wrap: anywhere;
}
.poliifi-theme-skate .entry-content { line-height: 1.8; }
.poliifi-theme-skate .entry-content a { color: #8b1754; }
.poliifi-theme-skate .entry-content > p:last-child > a[rel~="nofollow"] {
  display: inline-block; background: var(--skate-lime); color: var(--skate-ink);
  border: 1.5px solid var(--skate-ink); padding: .7rem 1.1rem; font-weight: 750;
}
.poliifi-theme-skate .site-footer { border-top-color: var(--skate-ink); }
@media (min-width: 640px) {
  .poliifi-theme-skate.category .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .poliifi-theme-skate.category .posts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .poliifi-theme-skate.category .posts-grid { grid-template-columns: 1fr; }
  .poliifi-skate-sticker { float: none; margin-left: 0; }
}

/* Heavy poster lettering only on short display text; readable news typography. */
body.poliifi-theme-skate { --skate-display: Impact, 'Arial Black', 'DejaVu Sans', sans-serif; }
.poliifi-theme-skate .poliifi-skate-title,
.poliifi-theme-skate .poliifi-skate-sticker,
.poliifi-theme-skate .poliifi-image-surface > span {
  font-family: var(--skate-display); font-weight: 400; font-synthesis: none;
  text-transform: uppercase; letter-spacing: .015em;
  text-shadow: none; -webkit-text-stroke: 0;
}
.poliifi-theme-skate .poliifi-skate-title {
  font-style: normal; line-height: 1.06; transform: none;
}
.poliifi-theme-skate .poliifi-skate-sticker {
  font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.1;
  border-width: 3px; box-shadow: 6px 6px 0 var(--skate-ink); transform: rotate(6deg);
}
.poliifi-theme-skate .poliifi-skate-section-title,
.poliifi-theme-skate .post-card .entry-title,
.poliifi-theme-skate.single-post .entry-header h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700;
  font-style: normal; text-transform: none; letter-spacing: -.02em;
  text-shadow: none; -webkit-text-stroke: 0; transform: none;
}
.poliifi-theme-skate .poliifi-skate-section-title { font-size: 1.6rem; }
.poliifi-theme-skate .poliifi-image-surface > span { font-style: normal; line-height: 1.1; transform: rotate(-5deg); }
.poliifi-theme-skate .post-card { border-width: 2px; box-shadow: 4px 4px 0 var(--skate-ink); }
.poliifi-theme-skate .poliifi-skate-tape { border-block-width: 3px; font-weight: 800; }
