/* Shared components. Filled red controls use dark red so white text clears WCAG AA.
   Decorative red uses the red paint style. No effect styles exist in the file, so panels use a 1px border. */

.btn,
.btn-main,
.btn-cta,
.btn-search,
.icon-btn {
  border: 0;
  background: transparent;
  color: var(--color-dark-red);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 16px;
  line-height: 1.2;
}

.btn-main {
  padding: 4px 0;
  min-height: 0;
  border-bottom: 2px solid var(--color-red);
  font-weight: 500;
}

.btn-main:hover { color: var(--color-red); }

.btn-cta {
  background: var(--color-white);
  color: var(--color-dark-red);
  border: 1px solid var(--color-light-gray);
  min-width: 128px;
  font-weight: 500;
}

.btn-cta:hover,
.btn-cta.is-hover {
  background: var(--color-dark-red);
  color: var(--color-white);
  border-color: var(--color-dark-red);
}

.btn-cta.is-solid {
  background: var(--color-dark-red);
  color: var(--color-white);
  border-color: var(--color-dark-red);
}

.btn-cta.is-solid:hover { background: var(--color-red); border-color: var(--color-red); }

.btn-cta.is-muted {
  background: var(--color-pale-gray);
  color: var(--color-black);
  border-color: var(--color-light-gray);
}

.btn-cta:disabled,
.btn:disabled {
  background: var(--color-pale-gray);
  color: var(--color-gray);
  border-color: var(--color-light-gray);
  cursor: not-allowed;
}

.btn-search {
  background: var(--color-dark-red);
  color: var(--color-white);
  min-width: 132px;
  min-height: 88px;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
  padding: 12px 18px;
}

.btn-search:hover { background: var(--color-red); }

.icon-btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  background: var(--color-white);
  color: var(--color-dark-red);
  border: 1px solid var(--color-light-gray);
}

.icon-btn:hover { background: var(--color-pink); }

[data-prev] .icon { transform: scaleX(-1); }

.icon-btn:disabled { color: var(--color-gray); background: var(--color-pale-gray); }

.field { display: grid; gap: 6px; max-width: 420px; }

.field-label { font-weight: 500; }

.input,
.select,
.combo {
  width: 100%;
  max-width: 420px;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--color-light-gray);
  background: var(--color-white);
  border-radius: 0;
  caret-color: var(--color-dark-red);
}

.input::placeholder { color: var(--color-black); opacity: 0.55; }

.input:hover,
.select:hover { border-color: var(--color-gray); }

.input:focus,
.select:focus { border-color: var(--color-dark-red); }

.input.is-error,
.input[aria-invalid="true"] {
  border-color: var(--color-red);
  color: var(--color-dark-red);
}

.field-error {
  color: var(--color-dark-red);
  font-weight: 500;
}

.input-row {
  display: flex;
  align-items: stretch;
  max-width: 420px;
  border: 1px solid var(--color-light-gray);
  background: var(--color-white);
}

.input-row .input {
  border: 0;
  min-width: 0;
  flex: 1;
}

.input-row .input:focus { outline-offset: -2px; }

.input-go {
  border: 0;
  background: transparent;
  color: var(--color-dark-red);
  width: 48px;
}

.input-line {
  max-width: 420px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-black);
  background: transparent;
}

.input-line .input {
  border: 0;
  background: transparent;
  min-height: 44px;
}

.check,
.radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
}

.check input,
.radio input {
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 1.5px solid var(--color-black);
  background: var(--color-white);
  display: grid;
  place-items: center;
  flex: none;
}

.radio input { border-radius: 50%; }

.check input:checked::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--color-dark-red);
  border-bottom: 2px solid var(--color-dark-red);
  transform: rotate(-45deg) translateY(-1px);
}

.radio input:checked::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-dark-red);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid var(--color-red);
  color: var(--color-dark-red);
  background: var(--color-white);
  font-size: var(--p9-size);
  line-height: var(--p9-lh);
  font-weight: 500;
  text-decoration: none;
}

.tag:hover,
.tag.is-on { background: var(--color-pink); }

.tag-btn {
  border: 0;
  background: transparent;
  color: var(--color-black);
  padding: 8px 4px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}

.tag-btn[aria-selected="true"] {
  color: var(--color-dark-red);
  border-bottom-color: var(--color-red);
}

.accordion { border-top: 1px solid var(--color-light-gray); }

.accordion-item { border-bottom: 1px solid var(--color-light-gray); }

.accordion-item summary,
.accordion-trigger {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 16px 0;
  background: transparent;
  border: 0;
  font-weight: 500;
  cursor: pointer;
}

.accordion-item summary::-webkit-details-marker { display: none; }

.accordion-item summary::after,
.accordion-trigger::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--color-black);
  border-bottom: 1.5px solid var(--color-black);
  transform: rotate(45deg);
  flex: none;
}

.accordion-item[open] summary::after,
.accordion-trigger[aria-expanded="true"]::after {
  transform: rotate(-135deg);
}

.accordion-panel { padding: 0 0 16px; max-width: var(--measure); }

.pager { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.pager a,
.pager span {
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-light-gray);
  color: var(--color-black);
  text-decoration: none;
  background: var(--color-white);
}

.pager .is-current {
  background: var(--color-dark-red);
  color: var(--color-white);
  border-color: var(--color-dark-red);
}

body.nav-lock { overflow: hidden; }

.site-header {
  background: var(--color-white);
  position: sticky;
  top: 0;
  z-index: var(--header-z);
}

.nav-close { display: none; }

.announce {
  /* Source fill #FF5E5E. White type on it is below WCAG AA; kept because HEADER-TARGETS names this bar separately from --color-dark-red. */
  background: #FF5E5E;
  color: var(--color-white);
}

html.announce-done .announce { display: none; }

.announce-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 40px;
  padding-block: 8px;
}

.announce p { flex: 1; color: var(--color-white); }

.announce-close {
  border: 0;
  background: transparent;
  color: var(--color-white);
  width: 44px;
  height: 44px;
}

/* Shared SVG strokes are #333. These two sit on header red; img cannot inherit currentColor. */
.announce-close .icon,
.brand-row .btn-search .icon {
  filter: brightness(0) invert(1);
}

.brand-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 4px solid var(--color-red);
}

.logo {
  display: flex;
  align-items: center;
  padding-block: 16px;
  text-decoration: none;
}

.logo img { width: min(240px, 58vw); height: auto; }

.nav-toggle {
  display: none;
  align-self: center;
  margin-right: var(--pad);
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--color-black);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px 18px;
  min-height: 52px;
  padding-block: 4px;
  flex-wrap: wrap;
}

.site-nav a,
.drop summary {
  color: var(--color-black);
  text-decoration: none;
  font-weight: 500;
  background: transparent;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
  list-style: none;
}

.drop summary::-webkit-details-marker { display: none; }

.drop summary::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--color-black);
  vertical-align: 2px;
}

.drop { position: relative; }

.drop-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 240px;
  background: var(--color-white);
  border: 1px solid var(--color-light-gray);
  padding: 8px 0;
  z-index: 5;
}

.drop-panel a {
  display: block;
  padding: 8px 16px;
  font-weight: 400;
}

.drop-panel a:hover { background: var(--color-pink); color: var(--color-dark-red); }

.nav-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.font-ctl,
.lang-ctl { display: flex; align-items: center; gap: 4px; }

.font-ctl button,
.lang summary {
  border: 0;
  background: transparent;
  min-width: 32px;
  min-height: 32px;
  padding: 4px;
  font-weight: 700;
  color: var(--color-black);
  list-style: none;
  cursor: pointer;
}

.lang { position: relative; }
.lang summary::-webkit-details-marker { display: none; }

.lang-panel {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--color-white);
  border: 1px solid var(--color-light-gray);
  min-width: 140px;
  z-index: 6;
}

.lang-panel button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
}

.lang-panel button[aria-current="true"] { color: var(--color-dark-red); font-weight: 700; }

.locale-note {
  display: none;
  background: var(--color-pink);
  color: var(--color-black);
  padding: 10px var(--pad);
}

html[data-locale="zh-Hans"] .locale-note,
html[data-locale="en"] .locale-note { display: block; }

dialog {
  border: 0;
  padding: 0;
  max-width: min(848px, calc(100vw - 32px));
  width: min(720px, 100%);
  color: var(--color-black);
  background: var(--color-white);
}

dialog::backdrop { background: rgba(51, 51, 51, 0.55); }

.dialog-card { padding: 28px 24px 24px; display: grid; gap: 16px; }

.dialog-close {
  justify-self: end;
  border: 0;
  background: transparent;
  width: 44px;
  height: 44px;
}

.dialog-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.live {
  min-height: 1.5em;
}

.carousel {
  position: relative;
}

.carousel-viewport { overflow: hidden; }

.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel.is-paused .carousel-track { transition: none; }

.dots { display: flex; gap: 8px; justify-content: center; padding: 12px; }

.dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--color-dark-red);
  background: transparent;
  padding: 0;
}

.dots button[aria-selected="true"] { background: var(--color-dark-red); }

.site-footer {
  background: var(--color-white);
  border-top: 1px solid var(--color-light-gray);
  padding-block: 48px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 24px;
}

.footer-col h2 {
  font-size: var(--p6-size);
  line-height: var(--p6-lh);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.footer-col a { color: var(--color-black); text-decoration: none; font-weight: 400; }

.footer-col a:hover { color: var(--color-dark-red); text-decoration: underline; }

.socials { display: flex; gap: 12px; margin: 12px 0 24px; }

.socials a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-light-gray);
  color: var(--color-black);
}

.socials img { width: 20px; height: 20px; display: block; }

.footer-brand { padding-top: 28px; }

.footer-brand img { width: min(220px, 58vw); height: auto; }

.awards {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--color-light-gray);
}

.award {
  width: 140px;
  height: auto;
  object-fit: contain;
  background: transparent;
}

.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-light-gray);
}

.legal a { color: var(--color-black); }

.block-gap { margin-top: 28px; }
.tight-gap { margin-top: 10px; }
.cluster { display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

.tri-mark {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--color-red);
  display: inline-block;
}

/* Desktop header geometry from the 1440 crop. 1024 has no Figma frame.
   Logo row is 89px plus the 1px #E0E0E0 hairline. The 8px red rule stays under the nav. */
@media (min-width: 1024px) {
  .brand-row {
    width: 100%;
    max-width: none;
    min-height: 90px;
    gap: 0;
    padding-left: 40px;
    padding-right: 0;
    border-bottom: 1px solid var(--color-light-gray);
  }
  .logo { padding-block: 0; }
  .logo img { width: 260px; height: 70px; }
  .site-nav {
    width: 100%;
    max-width: none;
    min-height: 66px;
    padding-block: 16px;
    padding-inline: 40px;
    border-bottom: 8px solid var(--color-red);
    flex-wrap: nowrap;
    gap: 30px;
  }
  .site-nav > a,
  .site-nav .drop summary,
  .nav-tools > a,
  .lang summary {
    font-size: 16px;
    line-height: 26px;
    font-weight: 500;
    padding: 0;
  }
  .drop summary,
  .lang summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 0;
  }
  .drop summary::after,
  .lang summary::after {
    content: "";
    width: 12px;
    height: 12px;
    margin: 0;
    border: 0;
    background-color: var(--color-black);
    -webkit-mask: url("../assets/icons/arrow-5155-39354.svg") center / contain no-repeat;
    mask: url("../assets/icons/arrow-5155-39354.svg") center / contain no-repeat;
    transform: rotate(90deg);
  }
  .nav-tools { gap: 30px; }
  .nav-util { display: flex; align-items: center; gap: 16px; }
  .nav-divider { width: 1px; height: 18px; background: var(--color-black); flex: none; }
  .font-ctl { gap: 10px; }
  .font-ctl button {
    font-family: Inter, sans-serif;
    font-size: 16px;
    line-height: 26px;
    font-weight: 500;
    min-width: 0;
    min-height: 0;
    padding: 0;
  }
}

@media (min-width: 1024px) {
  .brand-row .btn-search {
    width: 185px;
    min-width: 185px;
    height: 90px;
    min-height: 0;
    align-self: flex-start;
    margin-bottom: -1px;
    flex-direction: row;
    gap: 16px;
    margin-left: auto;
    /* 37px matches the icon x (1292) inside the 185px button. The layout string says 40; that placed the icon at 1295. */
    padding: 0 37px;
    background: var(--color-red);
    font-size: 20px;
    line-height: 32px;
    font-weight: 500;
  }
  .brand-row .btn-search [data-icon] { display: flex; align-items: center; height: 17px; }
  .brand-row .btn-search .icon { display: block; width: 15px; height: 17px; }
}

@media (min-width: 1024px) {
  .announce-inner {
    position: relative;
    width: 100%;
    max-width: none;
    height: 58px;
    min-height: 58px;
    padding: 12px 40px 14px;
    justify-content: flex-start;
  }
  .announce p {
    flex: 0 0 auto;
    width: 1308px;
    margin: 0;
    font-size: 20px;
    line-height: 32px;
    font-weight: 400;
    text-align: center;
  }
  .announce-lead { font-weight: 500; }
  .announce-close {
    position: absolute;
    right: 24px;
    top: 6px;
    transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  .announce-close .icon { display: block; width: 12px; height: 12px; }
}

/* Below 1024 the header becomes a menu button. 1024 has no Figma header frame; this follows FRD <1024 and the mobile landing screenshot. */
@media (max-width: 1023.98px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .brand-row .btn-search { display: none; }
  .site-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--color-white);
    z-index: 40;
    flex-direction: column;
    align-items: stretch;
    padding: 72px 20px 32px;
    overflow: auto;
    gap: 0;
  }
  .site-nav[data-open="true"] { display: flex; }
  .nav-close {
    display: inline-flex;
    position: absolute;
    top: 12px;
    right: 12px;
    border: 0;
    background: transparent;
    min-height: 44px;
    padding: 8px 12px;
    color: var(--color-black);
  }
  .nav-tools {
    margin-left: 0;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid var(--color-light-gray);
  }
  .drop-panel,
  .lang-panel {
    position: static;
    border: 0;
    min-width: 0;
    padding-left: 8px;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767.98px) {
  .footer-grid { grid-template-columns: 1fr; }
  .btn-search { min-height: 64px; }
  .announce-inner {
    position: relative;
    width: 100%;
    max-width: none;
    height: 52px;
    min-height: 52px;
    padding: 12px 20px 14px;
    justify-content: flex-start;
  }
  .announce p {
    flex: none;
    min-width: 0;
    width: 322px;
    font-size: 16px;
    line-height: 26px;
    font-weight: 400;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
  }
  .announce-close {
    position: absolute;
    right: 20px;
    top: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    flex: none;
  }
  .announce-close .icon { display: block; width: 12px; height: 12px; }
  .brand-row {
    min-height: 82px;
    padding-left: 20px;
    padding-right: 20px;
    gap: 0;
    border-bottom: 8px solid var(--color-red);
  }
  .logo { padding-block: 0; }
  .logo img { width: 200px; height: auto; }
  .nav-toggle {
    margin-right: 0;
    width: 44px;
    height: 44px;
    justify-content: flex-end;
    padding: 0;
  }
  .nav-toggle [data-icon] { display: flex; align-items: center; height: 18px; }
  .nav-toggle .icon { display: block; width: 20px; height: 18px; }
}

@media (min-width: 1024px) {
  .site-nav > .btn-search { display: none; }
}
