/* WordPress integration and accessible responsive refinements. */
.site-header__dropdown {
  position: relative;
}

.site-header__dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
}

.site-header__dropdown-toggle::-webkit-details-marker {
  display: none;
}

.site-header__dropdown-toggle::after {
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  content: "";
  transform: rotate(45deg);
  transition: transform .2s ease;
}

.site-header__dropdown[open] > summary::after {
  transform: rotate(225deg);
}

.site-header__dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  padding: 12px;
  background: var(--kp-white);
  border: 1px solid var(--kp-line);
  border-radius: 8px;
  box-shadow: var(--kp-shadow-sm);
}

.site-header__dropdown-panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  white-space: nowrap;
}

.site-header__dropdown[open] > .site-header__dropdown-panel {
  animation: kashibaplus-menu-open .22s ease-out;
  transform-origin: top;
}

@keyframes kashibaplus-menu-open {
  from { opacity: 0; transform: translateY(-8px) scaleY(.9); }
  to { opacity: 1; transform: translateY(0) scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .site-header__dropdown[open] > .site-header__dropdown-panel { animation: none; }
}

@media (max-width: 991.98px) {
  .site-header__dropdown { width: 100%; }
  .site-header__dropdown-toggle { min-height: 54px; }
  .site-header__dropdown-panel { position: static; margin-bottom: 12px; }
}

:focus-visible {
  outline: 3px solid var(--kp-blue-dark);
  outline-offset: 5px;
}

[hidden] {
  display: none !important;
}

.hero-media__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 26px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-header__nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--kp-pink);
  text-underline-offset: 8px;
}

.kp-content {
  overflow-wrap: anywhere;
}

.kp-content>h2 {
  margin-top: 2.8em;
}

.kp-content p {
  line-height: 2.1;
}

.kp-content a:not(.kp-button) {
  color: var(--kp-blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.kp-content figure {
  margin: 2em 0;
}

.kp-content img {
  height: auto;
  max-width: 100%;
}

.kp-content iframe {
  max-width: 100%;
}

.kp-content> :first-child {
  margin-top: 0;
}

.kp-content .alignwide {
  width: 100%;
}

.kp-pagination {
  margin-top: 48px;
}

.kp-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  list-style: none;
  padding: 0;
}

.kp-pagination .page-numbers:not(ul) {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--kp-line);
  border-radius: 50px;
  padding: 8px 16px;
}

.kp-pagination .current {
  background: var(--kp-ink);
  color: white;
}

.kp-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.kp-filter select {
  max-width: 100%;
  padding: 10px 20px;
  background: white;
  border: 1px solid var(--kp-line);
  border-radius: 8px;
}

.kp-notice,
.kp-empty {
  padding: 24px;
  border-radius: 12px;
  background: var(--kp-blue-soft);
}

.kp-error {
  padding: 24px;
  margin-bottom: 28px;
  border: 2px solid #ad2348;
  border-radius: 12px;
  background: var(--kp-pink-soft);
}

.kp-error h3 {
  font-size: 21px;
}

.kp-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.kp-confirm>div {
  padding-block: 18px;
  border-bottom: 1px solid var(--kp-line);
}

.kp-confirm dt {
  font-weight: bold;
}

.kp-confirm dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.kp-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.kp-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.kp-search {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-block: 24px;
}

.kp-search input {
  padding: 10px;
  border: 1px solid var(--kp-line);
  max-width: 100%;
}

.story-share button {
  border: 0;
  padding: 8px 14px;
  border-radius: 30px;
  background: var(--kp-bg);
  cursor: pointer;
}

.story-index:has(ol:empty) {
  display: none;
}

.award-detail__content>.container>.kp-content {
  max-width: 100%;
}

.story-article__hero>img {
  width: 100%;
  max-height: 720px;
  object-fit: cover;
}

.site-footer__bottom a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 991.98px) {
  .site-header__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-header__nav {
    visibility: hidden;
  }

  .site-header.is-nav-open .site-header__nav {
    visibility: visible;
  }

  .site-header__inner {
    padding-inline: 20px;
  }

  .site-header__nav a {
    min-height: 44px;
  }

  .site-header__menu {
    min-width: 60px;
    min-height: 48px;
  }
}

@media (max-width: 575.98px) {
  .kp-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .kp-filter select {
    width: 100%;
  }

  .story-share {
    flex-wrap: wrap;
  }

  .kp-form-actions .kp-button {
    width: 100%;
  }

  .news-item {
    gap: 8px;
  }

  .kp-content h2 {
    font-size: 27px;
  }
}

.award-detail__wide-section .col-lg-8.offset-lg-2 {
  max-width: 850px;
}

.award-detail__header h1,
.story-article__header h1 {
  text-wrap: balance;
  word-break: auto-phrase;
}

@media (max-width: 991.98px) {
  html:not(.js) .site-header__inner {
    display: flex;
    flex-wrap: wrap;
  }

  html:not(.js) .site-header__nav {
    display: flex;
    visibility: visible;
    position: static;
    width: 100%;
    gap: 18px;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  html:not(.js) .site-header__menu {
    display: none;
  }
}

/* Keep mobile copy readable without leaving one or two characters on a line. */
@media (max-width: 767.98px) {
  :is(h1, h2, h3, h4, h5, h6) {
    word-break: auto-phrase;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  dd,
  .kp-button,
  .council-about__message {
    text-wrap: balance;
  }

  p,
  li,
  dt,
  label {
    text-wrap: pretty;
  }

  :is(h1, h2, h3, h4, h5, h6) br,
  .council-about__message br {
    display: none;
  }

  .about-hero h1 br {
    display: revert;
  }

  .cta__panel h2 {
    font-size: clamp(26px, 7.5vw, 34px);
  }

  .privacy-page .page-hero h1 {
    font-size: clamp(26px, 7.8vw, 34px);
  }
}
/* Supplied portraits must not inherit the design sample's enlarged crop. */
.story-card .media-card__image img.kashibaplus-story-photo {
  object-fit: cover;
  object-position: center 12%;
  transform: none;
}

.story-list-feature__media img.kashibaplus-story-photo,
.story__feature-media img.kashibaplus-story-photo {
  object-position: center 12%;
}
