.hero-carousel {
  --hero-surface: #fbf9f4;
  --hero-text: #1a1713;
  --hero-muted: #526579;
  --hero-rule: #ded6c8;
  --hero-accent: #b3261e;
  --hero-button: #b3261e;
  --hero-hover: #eee8df;
  color: var(--hero-text);
  border: 1px solid var(--hero-rule);
  border-radius: 22px;
  background: var(--hero-surface);
  padding: 24px;
  outline-offset: 5px;
}
.dark .hero-carousel {
  --hero-surface: #1e1a15;
  --hero-text: #f3ede3;
  --hero-muted: #a6b7c9;
  --hero-rule: #3a342b;
  --hero-accent: #f08278;
  --hero-hover: #2a241d;
}
.hero-carousel [hidden] { display: none !important; }
.hero-carousel-slides { display: grid; min-width: 0; }
.hero-carousel-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.4fr);
  gap: 40px;
  align-items: center;
  min-width: 0;
  min-height: 420px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
.hero-carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.hero-carousel-copy { min-width: 0; padding: 8px 0 8px 12px; }
.hero-carousel-category {
  display: inline-block;
  color: var(--hero-accent);
  border-bottom: 2px solid currentColor;
  padding-bottom: 7px;
  font: 600 11px/1.4 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .16em;
}
.hero-carousel-title { margin: 16px 0 0; font-size: clamp(27px, 2.25vw, 34px); }
.hero-carousel-title a { color: inherit; text-decoration: none; transition: color .2s; }
.hero-carousel-title a:hover { color: var(--hero-accent); }
.hero-carousel-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 13px 0 0;
  color: var(--hero-muted);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.hero-carousel-meta { margin-top: 14px; color: var(--hero-muted); font-size: 12px; line-height: 1.7; }
.hero-carousel-meta p { margin: 0; }
.hero-carousel-meta a, .hero-carousel-meta strong { color: var(--hero-text); font-weight: 600; }
.hero-carousel-meta a { text-decoration: underline; text-underline-offset: 3px; }
.hero-carousel-read {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  min-height: 44px;
  margin-top: 18px;
  border-radius: 9px;
  padding: 11px 17px;
  background: var(--hero-button);
  color: #fff;
  font: 600 12px/1.5 'IBM Plex Mono', monospace;
  text-decoration: none;
  transition: background .2s;
}
.hero-carousel-read:hover { background: #8f1d16; }
.hero-carousel-read span { font: 500 20px/1 sans-serif; }
.hero-carousel-media {
  display: block;
  min-width: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: var(--hero-hover);
  border: 1px solid var(--hero-rule);
  touch-action: pan-y pinch-zoom;
}
.hero-carousel-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-carousel-placeholder { height: 100%; font-size: 40px; font-weight: 800; }
.hero-carousel-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding-top: 18px;
  margin-top: 16px;
  border-top: 1px solid var(--hero-rule);
}
.hero-carousel-caption { display: flex; align-items: baseline; white-space: nowrap; font: 500 12px/1.5 'IBM Plex Mono', monospace; }
.hero-carousel-current { color: var(--hero-accent); font-weight: 600; }
.hero-carousel-total { color: var(--hero-muted); white-space: pre; }
.hero-carousel-caption-label { margin-left: 18px; color: var(--hero-muted); font-size: 10px; }
.hero-carousel-dots, .hero-carousel-actions { display: flex; align-items: center; }
.hero-carousel-actions { justify-self: end; gap: 8px; }
.hero-carousel-dot { display: grid; place-items: center; width: 32px; height: 44px; border: 0; background: transparent; cursor: pointer; }
.hero-carousel-dot span { width: 7px; height: 7px; border-radius: 8px; background: var(--hero-muted); opacity: .45; transition: width .25s, opacity .25s, background .25s; }
.hero-carousel-dot[aria-current="true"] span { width: 24px; background: var(--hero-accent); opacity: 1; }
.hero-carousel-control { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--hero-rule); border-radius: 50%; background: transparent; color: var(--hero-text); cursor: pointer; transition: background .2s, border-color .2s; }
.hero-carousel-control:hover { background: var(--hero-hover); border-color: var(--hero-accent); }
.hero-carousel-control svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero-carousel-announcer { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1100px) and (min-width: 960px) {
  .hero-carousel-slide { gap: 24px; }
  .hero-carousel-copy { padding-left: 0; }
  .hero-carousel-title { font-size: 30px; }
}
@media (max-width: 959px) {
  .hero-carousel { padding: 18px; border-radius: 18px; }
  .hero-carousel-slide { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0; min-height: 0; align-items: start; }
  .hero-carousel-media { grid-area: 1 / 1; }
  .hero-carousel-copy { grid-area: 2 / 1; padding: 24px 4px 8px; }
  .hero-carousel-title { font-size: clamp(25px, 4.2vw, 36px); margin-top: 15px; }
  .hero-carousel-summary { margin-top: 13px; line-height: 1.7; }
  .hero-carousel-read { margin-top: 18px; }
  .hero-carousel-controls { grid-template-columns: 1fr auto; gap: 4px 12px; margin-top: 14px; padding-top: 13px; }
  .hero-carousel-caption-label { display: none; }
  .hero-carousel-dots { grid-area: 1 / 1; margin-left: -8px; }
  .hero-carousel-caption { grid-area: 2 / 1; padding-left: 4px; font-size: 11px; }
  .hero-carousel-actions { grid-area: 1 / 2 / span 2 / 3; }
}
@media (max-width: 420px) {
  .hero-carousel { padding: 12px; }
  .hero-carousel-copy { padding: 21px 4px 6px; }
  .hero-carousel-actions { gap: 5px; }
  .hero-carousel-dot { width: 28px; }
  .hero-carousel-control { width: 44px; height: 44px; }
}
@media (max-width: 360px) {
  .hero-carousel-dots { grid-area: 1 / 1 / 2 / 3; justify-content: center; margin: 0; }
  .hero-carousel-caption { grid-area: 2 / 1; }
  .hero-carousel-actions { grid-area: 2 / 2; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-carousel *, .hero-carousel *::before, .hero-carousel *::after { transition: none !important; }
}
