/* QR test pages use the museum's dark event-page palette while keeping the
   existing, responsive HPM header structure intact. */
body.hpm-qr-education-site-page .hpm-home-header-stack {
  background: #29261f !important;
  position: relative;
  width: 100%;
}

body.hpm-qr-education-site-page .hpm-home-header-stack::before {
  content: none;
}

body.hpm-qr-education-site-page .hpm-home-header-stack .header-top,
body.hpm-qr-education-site-page .hpm-home-header-stack .header-top .bg-dark,
body.hpm-qr-education-site-page .hpm-home-header-stack .header--secondary,
body.hpm-qr-education-site-page .hpm-home-header-stack .header--secondary-container {
  background: #29261f !important;
}

body.hpm-qr-education-site-page .hpm-home-header-stack .header-top,
body.hpm-qr-education-site-page .hpm-home-header-stack .header-top a,
body.hpm-qr-education-site-page .hpm-home-header-stack .header-top .text--white,
body.hpm-qr-education-site-page .hpm-home-header-stack .header--secondary-container .primary-menu__link,
body.hpm-qr-education-site-page .hpm-home-header-stack .header--secondary-container .primary-menu__link i,
body.hpm-qr-education-site-page .hpm-home-header-stack .nav--toggle,
body.hpm-qr-education-site-page .hpm-home-header-stack .header__link {
  color: #f6f3eb !important;
  text-shadow: none !important;
}

body.hpm-qr-education-site-page .hpm-home-header-stack .primary-menu__list.active > .primary-menu__link,
body.hpm-qr-education-site-page .hpm-home-header-stack .primary-menu__link:hover,
body.hpm-qr-education-site-page .hpm-home-header-stack .primary-menu__link:focus-visible {
  color: #54d3ca !important;
}

body.hpm-qr-education-site-page .hpm-home-header-stack .primary-menu__sub {
  background: #302d26 !important;
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
}

body.hpm-qr-education-site-page .hpm-home-header-stack .primary-menu__sub::after {
  border-bottom-color: #302d26 !important;
}

body.hpm-qr-education-site-page .hpm-home-header-stack .primary-menu__sub-link,
body.hpm-qr-education-site-page .hpm-home-header-stack .primary-menu__sub-link i {
  background: #302d26 !important;
  color: #f6f3eb !important;
  text-shadow: none !important;
}

body.hpm-qr-education-site-page .hpm-home-header-stack .primary-menu__sub-link:hover,
body.hpm-qr-education-site-page .hpm-home-header-stack .primary-menu__sub-link:focus-visible {
  background: #00aaa6 !important;
  color: #fff !important;
}

body.hpm-qr-education-site-page .hpm-home-header-stack .hpm-special-links-row {
  border-top-color: rgba(255, 255, 255, .18);
}

body.hpm-qr-education-site-page .hpm-home-header-stack .hpm-special-link,
body.hpm-qr-education-site-page .hpm-home-header-stack .hpm-special-menu > .primary-menu__list > .primary-menu__link {
  background: transparent !important;
  border-color: rgba(255, 255, 255, .36) !important;
  color: #f6f3eb !important;
}

body.hpm-qr-education-site-page .hpm-home-header-stack .hpm-special-link:hover,
body.hpm-qr-education-site-page .hpm-home-header-stack .hpm-special-link:focus-visible,
body.hpm-qr-education-site-page .hpm-home-header-stack .hpm-special-menu > .primary-menu__list > .primary-menu__link:hover,
body.hpm-qr-education-site-page .hpm-home-header-stack .hpm-special-menu > .primary-menu__list > .primary-menu__link:focus-visible {
  background: #00aaa6 !important;
  border-color: #00aaa6 !important;
  color: #fff !important;
}

body.hpm-qr-education-site-page .site-main > .section {
  padding-bottom: clamp(28px, 4vw, 56px);
  padding-top: clamp(24px, 3vw, 42px);
}

body.hpm-qr-education-site-page.fixed-header .hpm-home-header-stack .header--secondary {
  backdrop-filter: none;
  left: auto;
  position: relative;
  right: auto;
  top: auto;
  transform: none;
  transition: none;
}

body.hpm-qr-education-site-page.admin-bar .hpm-home-header-stack {
  padding-top: 0 !important;
}

.hpm-qr-education {
  color: #29261f;
  margin-inline: auto;
  max-width: 1050px;
}

.hpm-qr-education__intro {
  background: #f7f6f2;
  border: 1px solid #e7e2d9;
  border-radius: 18px;
  margin-bottom: 1.25rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.hpm-qr-education__eyebrow {
  color: #009d99;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  margin: 0 0 .65rem;
  text-transform: uppercase;
}

.hpm-qr-education__intro h1,
.hpm-qr-education__group h2,
.hpm-qr-education__card h3 {
  color: #29261f;
  font-family: var(--heading-font, inherit);
  line-height: 1.25;
}

.hpm-qr-education__intro h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 .75rem;
}

.hpm-qr-education__intro > p:last-child,
.hpm-qr-education__group-intro {
  color: #626864;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
  max-width: 72ch;
}

.hpm-qr-education__local-notice {
  background: #eef8f6;
  border: 1px solid #ccebe7;
  border-radius: 12px;
  color: #34504d;
  line-height: 1.6;
  margin: 0 0 1.5rem;
  padding: .9rem 1.1rem;
}

.hpm-qr-education__local-notice code {
  color: #006e6a;
  overflow-wrap: anywhere;
}

.hpm-qr-education__group h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin: 0 0 .5rem;
}

.hpm-qr-education__direct-link {
  color: #008d88;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.hpm-qr-education__direct-link:hover,
.hpm-qr-education__direct-link:focus-visible {
  color: #006e6a;
  text-decoration: underline;
}

.hpm-qr-education__group {
  padding: .5rem 0 1rem;
}

.hpm-qr-education__grid,
.hpm-qr-education__individual-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.25rem;
}

.hpm-qr-education__card {
  background: #fff;
  border: 1px solid #e5e1d9;
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(40, 35, 26, .05);
  min-width: 0;
  padding: clamp(1.1rem, 3vw, 1.5rem);
}

.hpm-qr-education__card h3 {
  font-size: 1.2rem;
  margin: 0 0 1rem;
}

.hpm-qr-education__player .wp-audio-shortcode {
  max-width: 100%;
  width: 100%;
}

.hpm-qr-education__direct-link {
  display: inline-flex;
  font-size: .9rem;
  font-weight: 700;
  gap: .4rem;
  margin-top: .75rem;
}

.hpm-qr-education__card--individual-qr {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
}

.hpm-qr-education__card--qr-only {
  align-items: center;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.hpm-qr-education__sequence-layout {
  align-items: stretch;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  margin-top: 1.25rem;
}

.hpm-qr-education__sequence {
  align-self: stretch;
}

.hpm-qr-education__sequence-audio {
  display: block;
  margin: 1rem 0 .75rem;
  max-width: 100%;
  width: 100%;
}

.hpm-qr-education__sequence-status {
  color: #626864;
  font-size: .95rem;
  line-height: 1.55;
  min-height: 1.55em;
}

.hpm-qr-education__sequence-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin: 1rem 0;
}

.hpm-qr-education__sequence-controls button {
  background: #00aaa7;
  border: 1px solid #00aaa7;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: .65rem .9rem;
}

.hpm-qr-education__sequence-controls button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.hpm-qr-education__sequence-list {
  color: #626864;
  line-height: 1.6;
  margin: 1rem 0 0;
  padding-left: 1.35rem;
}

.hpm-qr-education__sequence-list li[aria-current="step"] {
  color: #006e6a;
  font-weight: 700;
}

.hpm-qr-education__qr-card {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-width: 0;
  text-align: center;
}

.hpm-qr-education__qr-card--compact {
  background: #faf9f6;
  border-radius: 12px;
  padding: .75rem;
}

.hpm-qr-education__download {
  background: #00aaa7;
  border: 1px solid #00aaa7;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: .1rem;
  padding: .65rem .9rem;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.hpm-qr-education__download:hover,
.hpm-qr-education__download:focus-visible {
  background: #007f7d;
  border-color: #007f7d;
  color: #fff;
  transform: translateY(-1px);
}

.hpm-qr-education__download:disabled {
  cursor: progress;
  opacity: .72;
  transform: none;
}

.hpm-qr-education__download-status {
  display: block;
  color: #626864;
  font-size: .85rem;
  line-height: 1.4;
  margin-top: .35rem;
  min-height: 1.4em;
}

.hpm-qr-education__qr {
  align-items: center;
  background: #fff;
  border: 1px solid #e5e1d9;
  border-radius: 8px;
  display: flex;
  height: 200px;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
  padding: 8px;
  width: 200px;
}

.hpm-qr-education__qr img,
.hpm-qr-education__qr canvas,
.hpm-qr-education__qr svg {
  height: auto;
  max-height: 100%;
  max-width: 100%;
  width: 100%;
}

.hpm-qr-education__qr-status {
  display: none;
}

.hpm-qr-education__qr-status.is-error {
  display: block;
  color: #9b3c32;
  font-size: .9rem;
}

.hpm-qr-education__kiosk-app [hidden] {
  display: none !important;
}

.hpm-qr-education__kiosk-screen,
.hpm-qr-education__listener {
  background: #fff;
  border: 1px solid #e5e1d9;
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(40, 35, 26, .06);
  margin: 1.5rem auto;
  max-width: 760px;
  padding: clamp(1.5rem, 5vw, 3rem);
  text-align: center;
}

.hpm-qr-education__kiosk-screen h2,
.hpm-qr-education__listener h2 {
  margin-bottom: .75rem;
}

.hpm-qr-education__kiosk-qr {
  align-items: center;
  background: #faf9f6;
  border: 1px solid #e5e1d9;
  border-radius: 14px;
  display: flex;
  height: 300px;
  justify-content: center;
  margin: 1.5rem auto;
  max-width: 100%;
  padding: 14px;
  width: 300px;
}

.hpm-qr-education__kiosk-qr img,
.hpm-qr-education__kiosk-qr canvas,
.hpm-qr-education__kiosk-qr svg {
  height: auto;
  max-height: 100%;
  max-width: 100%;
  width: 100%;
}

.hpm-qr-education__kiosk-status {
  color: #626864;
  line-height: 1.55;
  min-height: 1.55em;
}

.hpm-qr-education__kiosk-reset,
.hpm-qr-education__kiosk-test-link {
  display: inline-flex;
  margin: .5rem;
}

.hpm-qr-education__kiosk-reset {
  background: #00aaa7;
  border: 1px solid #00aaa7;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: .7rem 1rem;
}

.hpm-qr-education__kiosk-test-link {
  color: #008d88;
  font-weight: 700;
}

.hpm-qr-education__listener audio {
  margin-top: 1rem;
}

body:has(.hpm-qr-education__listener:not([hidden])) .hpm-qr-education__intro,
body:has(.hpm-qr-education__listener:not([hidden])) .hpm-qr-education__local-notice {
  display: none;
}

@media (max-width: 760px) {
  .hpm-qr-education__grid,
  .hpm-qr-education__individual-grid,
  .hpm-qr-education__card--individual-qr {
    grid-template-columns: 1fr;
  }

  .hpm-qr-education__sequence-layout {
    grid-template-columns: 1fr;
  }

  .hpm-qr-education__card--individual-qr .hpm-qr-education__qr-card {
    justify-self: center;
    width: min(100%, 260px);
  }

  .hpm-qr-education__kiosk-qr {
    height: min(78vw, 300px);
    width: min(78vw, 300px);
  }
}

/* V5 keeps its kiosk behavior but uses the same light archive-card language as V2. */
body.hpm-qr-education-site-page:has(.hpm-qr-education--v5) {
  background: #fff;
  color: #29261f;
}

body.hpm-qr-education-site-page:has(.hpm-qr-education--v5) .site-main,
body.hpm-qr-education-site-page:has(.hpm-qr-education--v5) .site-main > .section {
  background: #fff !important;
}

body.hpm-qr-education-site-page:has(.hpm-qr-education--v5) .site-main > .section {
  padding-bottom: clamp(32px, 4vw, 56px);
  padding-top: clamp(32px, 4vw, 56px);
}

.hpm-qr-education--v5 {
  margin-inline: auto;
  max-width: 1050px;
  width: 100%;
}

.hpm-qr-education--v5 > .hpm-qr-education__intro {
  background: #f7f6f2;
  border: 1px solid #e7e2d9;
  border-radius: 18px;
  margin-bottom: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.hpm-qr-education--v5 > .hpm-qr-education__intro .hpm-qr-education__eyebrow {
  display: block;
  font-size: .74rem;
  letter-spacing: .1em;
  margin-bottom: .65rem;
}

.hpm-qr-education--v5 > .hpm-qr-education__intro h1 {
  color: #29261f;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0 0 .75rem;
  max-width: none;
}

.hpm-qr-education--v5 > .hpm-qr-education__intro > p:last-child {
  color: #626864;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 72ch;
}

.hpm-qr-education--v5 > .hpm-qr-education__local-notice {
  margin: 0 0 1.5rem;
}

.hpm-qr-education--v5 .hpm-qr-education__kiosk-app {
  min-width: 0;
}

.hpm-qr-education--v5 .hpm-qr-education__kiosk-screen {
  align-content: center;
  background: #fff;
  border: 1px solid #e5e1d9;
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(40, 35, 26, .05);
  column-gap: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  grid-template-areas:
    "count qr"
    "title qr"
    "intro qr"
    "status qr"
    "actions qr";
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  margin: 0;
  max-width: none;
  min-height: 360px;
  padding: clamp(1.25rem, 3vw, 2rem);
  row-gap: .2rem;
  text-align: left;
}

.hpm-qr-education--v5 .hpm-qr-education__kiosk-screen [data-hpm-kiosk-count] {
  color: #009d99;
  grid-area: count;
  margin: 0 0 .55rem;
}

.hpm-qr-education--v5 .hpm-qr-education__kiosk-screen h2 {
  color: #29261f;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  grid-area: title;
  line-height: 1.25;
  margin: 0 0 .8rem;
  overflow-wrap: normal;
}

.hpm-qr-education--v5 .hpm-qr-education__kiosk-screen .hpm-qr-education__group-intro {
  color: #626864;
  grid-area: intro;
  line-height: 1.65;
  margin: 0 0 .75rem;
}

.hpm-qr-education--v5 .hpm-qr-education__kiosk-qr {
  aspect-ratio: 1;
  background: #faf9f6;
  border: 1px solid #e5e1d9;
  border-radius: 12px;
  grid-area: qr;
  height: auto;
  justify-self: end;
  margin: 0;
  max-width: 320px;
  padding: 12px;
  width: 100%;
}

.hpm-qr-education--v5 .hpm-qr-education__kiosk-qr img,
.hpm-qr-education--v5 .hpm-qr-education__kiosk-qr canvas,
.hpm-qr-education--v5 .hpm-qr-education__kiosk-qr svg {
  display: block;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  width: 100%;
}

.hpm-qr-education--v5 .hpm-qr-education__qr-status {
  color: #9b3c32;
  grid-column: 1 / -1;
  text-align: center;
}

.hpm-qr-education--v5 .hpm-qr-education__kiosk-status {
  color: #626864;
  grid-area: status;
  line-height: 1.5;
  margin: .25rem 0 0;
  min-height: 1.5em;
}

.hpm-qr-education--v5 .hpm-qr-education__kiosk-reset,
.hpm-qr-education--v5 .hpm-qr-education__kiosk-test-link {
  grid-area: actions;
  justify-self: start;
  margin: .7rem 0 0;
}

.hpm-qr-education--v5 .hpm-qr-education__kiosk-test-link {
  color: #008d88;
}

/* The phone listener stays a single V2-style light card. */
body.hpm-qr-education-site-page:has(.hpm-qr-education__listener:not([hidden])) .hpm-qr-education--v5 {
  display: block;
  max-width: 760px;
}

body.hpm-qr-education-site-page:has(.hpm-qr-education__listener:not([hidden])) .hpm-qr-education--v5 .hpm-qr-education__kiosk-app {
  display: block;
}

.hpm-qr-education--v5 .hpm-qr-education__listener {
  background: #f7f6f2;
  border: 1px solid #e5e1d9;
  color: #29261f;
  margin: 0;
  max-width: 760px;
  text-align: left;
}

.hpm-qr-education--v5 .hpm-qr-education__listener h2 {
  color: #29261f;
}

.hpm-qr-education--v5 .hpm-qr-education__listener .hpm-qr-education__group-intro,
.hpm-qr-education--v5 .hpm-qr-education__listener .hpm-qr-education__sequence-status {
  color: #626864;
}

@media (max-width: 760px) {
  body.hpm-qr-education-site-page:has(.hpm-qr-education--v5) .site-main > .section {
    padding-bottom: 28px;
    padding-top: 22px;
  }

  .hpm-qr-education--v5 .hpm-qr-education__kiosk-screen {
    grid-template-areas:
      "count"
      "title"
      "intro"
      "qr"
      "status"
      "actions";
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 1.25rem;
    text-align: center;
  }

  .hpm-qr-education--v5 .hpm-qr-education__kiosk-screen [data-hpm-kiosk-count] {
    justify-self: center;
  }

  .hpm-qr-education--v5 .hpm-qr-education__kiosk-screen h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .hpm-qr-education--v5 .hpm-qr-education__kiosk-qr {
    justify-self: center;
    margin: .7rem auto 1rem;
    max-width: min(78vw, 320px);
  }

  .hpm-qr-education--v5 .hpm-qr-education__kiosk-status,
  .hpm-qr-education--v5 .hpm-qr-education__kiosk-reset,
  .hpm-qr-education--v5 .hpm-qr-education__kiosk-test-link {
    justify-self: center;
  }
}
