/* BadPD Command Deck: a scoped hierarchy layer, placed after the companion theme CSS. */
:root {
  --badpd-command-edge: rgba(255, 255, 255, 0.16);
  --badpd-command-surface: rgba(5, 10, 17, 0.9);
  --badpd-command-shadow: 0 1.4rem 3.2rem rgba(0, 0, 0, 0.31);
}

.badpd-site-header {
  background: linear-gradient(90deg, rgba(211, 38, 34, 0.2), rgba(5, 10, 17, 0.94) 30%, rgba(21, 89, 212, 0.22));
  box-shadow: 0 0.9rem 2rem rgba(0, 0, 0, 0.38);
  z-index: 1201;
}

/* Keep the expanded mobile menu above the page's independently stacked main area. */
.h4bs-template-slot-header {
  position: relative;
  z-index: 1200;
}

.badpd-header-inner {
  gap: clamp(0.55rem, 0.85vw, 0.9rem);
  max-width: min(100%, 96rem);
  min-height: 4.7rem;
}

.badpd-primary-menu {
  gap: clamp(0.38rem, 0.64vw, 0.72rem);
}

.badpd-primary-menu a {
  color: rgba(244, 248, 252, 0.94);
  font-size: clamp(0.68rem, 0.68vw, 0.78rem);
  letter-spacing: 0.06em;
  padding-block: 0.3rem;
}

.badpd-primary-menu a:hover,
.badpd-primary-menu a:focus-visible {
  color: var(--badpd-gold);
  text-shadow: 0 0 1rem rgba(255, 201, 71, 0.32);
}

.badpd-translate-bar {
  align-items: center;
  background: rgba(1, 4, 8, 0.86) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  min-height: 2.05rem;
  padding: 0.24rem 1rem;
}

.badpd-translate-bar .gt_switcher {
  font-size: 0.78rem !important;
}

.badpd-page-shell {
  max-width: min(100%, 96rem);
}

.badpd-ticker {
  border-radius: 0.82rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  margin-top: 0.95rem;
}

.badpd-ticker span {
  align-self: stretch;
  align-items: center;
  display: flex;
  font-size: 0.74rem;
  letter-spacing: 0.09em;
}

.badpd-front-memorial {
  border-color: rgba(255, 201, 71, 0.3);
  box-shadow: var(--badpd-command-shadow);
  margin-top: 1rem;
}

.badpd-front-hero {
  gap: clamp(0.85rem, 1.2vw, 1.25rem);
  grid-template-columns: minmax(11.5rem, 0.43fr) minmax(0, 1.55fr) minmax(18rem, 0.82fr);
  margin-top: 1.05rem;
}

.badpd-mascot-rail,
.badpd-latest-panel,
.badpd-lead-story,
.badpd-news-section,
.badpd-archive-shell,
.badpd-single-article {
  border-color: var(--badpd-command-edge);
  box-shadow: var(--badpd-command-shadow);
}

.badpd-mascot-rail {
  background: linear-gradient(180deg, rgba(17, 39, 68, 0.6), rgba(7, 10, 16, 0.9));
}

.badpd-mascot-copy {
  background: rgba(2, 6, 10, 0.7);
}

.badpd-lead-story {
  min-height: clamp(25rem, 36vw, 31rem);
}

.badpd-lead-copy {
  max-width: 43rem;
}

.badpd-lead-copy h1 {
  letter-spacing: -0.025em;
  max-width: 17ch;
}

.badpd-latest-panel {
  background: linear-gradient(180deg, rgba(10, 23, 38, 0.94), rgba(6, 10, 16, 0.95));
}

.badpd-latest-panel h2 {
  align-items: center;
  display: flex;
  gap: 0.55rem;
}

.badpd-latest-panel h2::after {
  background: linear-gradient(90deg, var(--badpd-cyan), transparent);
  content: "";
  height: 1px;
  opacity: 0.55;
  width: 100%;
}

.badpd-latest-list {
  max-height: 31rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.25rem;
  scrollbar-color: rgba(35, 217, 255, 0.68) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
}

.badpd-latest-row {
  padding-block: 0.65rem;
}

.badpd-latest-row:hover strong,
.badpd-latest-row:focus-within strong {
  color: var(--badpd-gold);
}

.badpd-civic-desk,
.badpd-source-radar {
  box-shadow: var(--badpd-command-shadow);
}

.badpd-civic-desk h2,
.badpd-source-radar-head h2,
.badpd-archive-header h1,
.badpd-single-header h1 {
  letter-spacing: -0.022em;
}

.badpd-news-section {
  min-height: 100%;
}

.badpd-article-card-standard {
  border-color: rgba(255, 255, 255, 0.14);
}

.badpd-article-card-standard:hover,
.badpd-article-card-standard:focus-within {
  border-color: rgba(255, 201, 71, 0.62);
}

.badpd-archive-shell,
.badpd-single-article {
  background: linear-gradient(145deg, rgba(11, 23, 38, 0.94), rgba(6, 10, 16, 0.94));
}

.badpd-single-article .badpd-single-content {
  font-size: 1.04rem;
  line-height: 1.72;
}

.badpd-single-article .badpd-single-content h2 {
  border-left: 3px solid var(--badpd-gold);
  padding-left: 0.75rem;
}

.badpd-site-footer {
  margin-top: 2.25rem;
}

@media (max-width: 1120px) {
  .badpd-header-inner {
    min-height: 4.55rem;
  }

  .badpd-primary-menu a {
    font-size: 0.82rem;
    padding-block: 0.42rem;
  }

  .badpd-front-hero {
    grid-template-columns: 1fr;
  }

  .badpd-mascot-rail {
    align-items: center;
    grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr);
  }

  .badpd-mascot-logo {
    max-height: 10rem;
  }

  .badpd-latest-list {
    max-height: 27rem;
  }
}

@media (max-width: 640px) {
  .badpd-primary-nav[data-open] {
    top: calc(100% + 2.55rem);
  }

  .badpd-translate-bar {
    justify-content: flex-start;
    min-height: 1.9rem;
    overflow-x: auto;
    padding-inline: 0.75rem;
  }

  .badpd-ticker {
    align-items: stretch;
    gap: 0;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .badpd-ticker span {
    min-height: 1.95rem;
    padding: 0.35rem 0.72rem;
  }

  .badpd-ticker a {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    line-height: 1.3;
    overflow: hidden;
    padding: 0.55rem 0.72rem 0.65rem;
  }

  .badpd-front-memorial {
    margin-top: 0.72rem;
  }

  .badpd-front-hero {
    margin-top: 0.85rem;
  }

  .badpd-mascot-rail {
    grid-template-columns: minmax(5.6rem, 7.25rem) minmax(0, 1fr);
    padding: 0.85rem;
  }

  .badpd-mascot-logo {
    max-height: 7rem;
  }

  .badpd-mascot-copy {
    padding: 0.75rem;
  }

  .badpd-mascot-copy p {
    font-size: 0.95rem;
  }

  .badpd-lead-story {
    min-height: 25rem;
  }

  .badpd-lead-copy {
    max-width: min(100%, 20rem) !important;
    padding: 1.1rem !important;
  }

  .badpd-lead-copy h1 {
    font-size: clamp(1.66rem, 8vw, 2.25rem) !important;
    max-inline-size: 16ch !important;
  }

  .badpd-latest-panel {
    padding: 0.85rem !important;
  }

  .badpd-latest-list {
    max-height: 25rem;
    padding-right: 0.35rem;
  }

  .badpd-latest-row {
    gap: 0.32rem !important;
    padding-block: 0.58rem;
  }

  .badpd-latest-row strong,
  .badpd-latest-row em {
    max-inline-size: 100% !important;
  }

  .badpd-single-article .badpd-single-content {
    font-size: 1rem;
    line-height: 1.65;
  }
}

@media (prefers-reduced-motion: reduce) {
  .badpd-latest-row,
  .badpd-article-card-standard,
  .badpd-mascot-logo {
    transition: none !important;
  }
}
