/* 首页与二级页面共用的页面框架*/
/* 移动端优先；未增强的 HTML 仍保证页头各区域可读。 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-brand) url("../assets/images/header-pattern.png")
    center top / auto 162px;
  color: #fff;
  isolation: isolate;
}
.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-block: 18px;
  min-height: 78px;
}
.brand {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: auto;
  max-width: 220px;
  min-width: 0;
}
.brand:focus-visible,
.site-search input:focus-visible {
  outline: none;
}
.brand-primary,
.brand-secondary {
  width: 100%;
  max-width: 220px;
}
@media (max-width: 359px) {
  .header-inner {
    gap: 4px;
  }
  .brand,
  .header-ready .brand,
  .brand-primary,
  .brand-secondary {
    max-width: 180px;
  }
}
.header-ready .brand {
  flex: 1 1 auto;
  width: auto;
}
.header-ready .brand-primary {
  width: 100%;
  max-width: 220px;
}
#menu-toggle,
#search-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
  border: 2px solid #8eadd4;
  border-radius: 4px;
  color: #fff;
  background: transparent;
}
.header-ready #menu-toggle,
.header-ready #search-toggle {
  display: block;
}
#menu-toggle {
  order: 0;
}
#menu-toggle,
#search-toggle {
  font-size: 16px;
  line-height: 26px;
}
.header-action-icon {
  display: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-search {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 2px solid #8eadd4;
  border-radius: 24px;
}
.header-ready .site-search {
  order: 2;
}
.site-search input {
  width: 100%;
  min-width: 0;
  padding: 8px 12px;
  border: 0;
  color: #fff;
  background: transparent;
}
.site-search input::placeholder {
  color: #d3e0f0;
  opacity: 1;
}
.site-search button {
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  border: 0;
  padding: 8px 12px;
  border-radius: 24px;
  color: #fff;
  background: transparent;
}
.search-icon {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.language-links {
  font-weight: 400;
}
.language-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}
.site-header a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 6px;
}
#site-navigation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: 8px;
  background: var(--color-surface);
  color: var(--color-brand);
}
#site-navigation > .language-links {
  width: min(var(--content-max), calc(100% - 2 * var(--page-gutter)));
  margin-inline: auto;
}
.navigation-list {
  display: flex;
  flex-direction: column;
}
.navigation-list > li {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}
.navigation-list a,
.navigation-list button {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}
.navigation-list button {
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.navigation-list .has-submenu > button::after {
  content: "";
  margin-left: 8px;
  border-inline: 6px solid transparent;
  border-top: 6px solid currentColor;
}
.navigation-list .has-submenu > button[aria-expanded="true"]::after {
  transform: rotate(180deg);
}
.navigation-list .has-submenu {
  position: relative;
}
.navigation-list .has-submenu > ul {
  display: none;
  width: 100%;
  gap: 0;
  padding: 4px 0 4px 24px;
  border-left: 4px solid var(--color-brand);
  background: #f5f8fc;
  box-shadow: none;
}
.navigation-list .has-submenu > ul.is-open {
  display: grid;
}
.navigation-list .has-submenu > ul a {
  min-height: 36px;
  padding: 4px 10px;
  font-weight: 400;
}
#site-navigation a:hover {
  color: var(--color-brand-deep);
  background: var(--color-interactive-bg);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  /* margin-block: 32px; */
  padding: 24px 20px;
  color: #fff;
}
.footer-contact {
  min-width: 0;
}
.footer-contact > img {
  width: 300px;
  margin-bottom: 20px;
}
.footer-contact address {
  font-style: normal;
  overflow-wrap: anywhere;
}
.footer-contact a {
  display: inline-block;
  min-height: 44px;
}
.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 6px;
}
.related-links h2 {
  margin-bottom: 16px;
}
.related-links,
.related-links ul,
.social-links,
.social-links figure {
  min-width: 0;
}
.related-links ul {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px 16px;
}
.related-links a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 44px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.related-links a::before {
  content: "";
  flex-shrink: 0;
  border-block: 6px solid transparent;
  border-left: 8px solid #fff;
}
.social-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.social-links h2 {
  font-size: 20px;
}
.social-links figure {
  width: min(154px, 100%);
  max-width: 100%;
  aspect-ratio: 1;
}
.social-links img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}
.social-links figcaption {
  text-align: center;
}
.social-label {
  font-weight: 700;
  text-align: center;
}

/* 首页与文章页共用的页面框架。 */
.site-shell {
  --nav-font: 18px;
  --nav-leading: 28px;
  --tools-font: 18px;
  --tools-leading: 28px;
  --contact-font: 18px;
  --contact-leading: 30px;
  --footer-title: 22px;
  --footer-title-leading: 34px;
  --footer-text: 18px;
  --footer-text-leading: 28px;
}
.site-header {
  background-size: auto 100%;
}
.navigation-list button:hover,
.navigation-list button[aria-expanded="true"] {
  background: var(--color-interactive-bg);
}
.site-search:focus-within {
  border-color: #fff;
}
.site-search button:hover,
#menu-toggle:hover,
#search-toggle:hover {
  background: #ffffff26;
}
.site-search input {
  flex: 1 1 0;
  font-size: var(--tools-font);
  line-height: var(--tools-leading);
}
.site-search button {
  flex: none;
  font-size: 16px;
  line-height: 26px;
}
.language-links {
  font-size: var(--tools-font);
  line-height: var(--tools-leading);
}
.navigation-list a,
.navigation-list button {
  font-size: var(--nav-font);
  line-height: var(--nav-leading);
}
.navigation-list .has-submenu > ul a {
  font-size: 16px;
  line-height: 24px;
}
.site-footer {
  height: auto;
  overflow: visible;
  background-size: auto 444px;
  background-repeat: repeat-y;
}
.footer-contact address {
  font-size: var(--contact-font);
  line-height: var(--contact-leading);
}
.footer-contact address a {
  max-width: 100%;
  width: auto;
  min-width: 0;
}
.footer-contact a[href^="tel:"] {
  white-space: nowrap;
  overflow-wrap: normal;
}
.footer-contact a[href^="mailto:"] {
  display: block;
  overflow-wrap: anywhere;
}
.related-links h2 {
  font-size: var(--footer-title);
  line-height: var(--footer-title-leading);
}
.related-links a,
.social-label,
.social-links figcaption {
  font-size: var(--footer-text);
  line-height: var(--footer-text-leading);
}
.social-label {
  grid-column: 1 / -1;
}
@media (min-width: 768px) {
  .site-shell {
    --nav-font: 20px;
    --nav-leading: 30px;
    --tools-font: 20px;
    --tools-leading: 30px;
    --contact-font: 20px;
    --contact-leading: 34px;
    --footer-title: 24px;
    --footer-title-leading: 36px;
  }
  .brand {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 540px;
  }
  .header-ready .brand {
    flex: 1 1 auto;
    width: auto;
    max-width: 540px;
  }
  .brand-primary {
    width: 240px;
    max-width: 240px;
  }
  .brand-secondary {
    width: 272px;
    max-width: 272px;
  }
  .related-links ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .social-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: center;
  }
  .social-links h2 {
    grid-column: 1 / -1;
  }
}

/* 共用触屏页头：紧凑手机布局，其次为平板单行布局。 */
@media (max-width: 1023px) {
  .header-ready .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    gap: 8px;
    padding-block: 16px;
  }
  .header-ready .brand {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: 100%;
    align-items: flex-start;
    gap: 8px;
  }
  .header-ready .brand-primary {
    width: 194px;
    max-width: 100%;
  }
  .header-ready .brand-secondary {
    width: 220px;
    max-width: 100%;
  }
  .header-ready #search-toggle,
  .header-ready #menu-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 8px;
    border: 0;
    border-radius: 4px;
    align-self: center;
  }
  .header-ready #search-toggle {
    grid-column: 2;
    grid-row: 1;
  }
  .header-ready #menu-toggle {
    grid-column: 3;
    grid-row: 1;
  }
  .header-action-icon {
    display: block;
    stroke-linecap: square;
  }
  .header-action-label {
    display: none;
  }
  .header-ready .site-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }
  .site-header #search-toggle:focus-visible,
  .site-header #menu-toggle:focus-visible {
    background: var(--color-panel);
    color: var(--color-brand-deep);
  }
}
@media (max-width: 320px) {
  .header-ready .header-inner {
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-rows: 44px 44px;
    row-gap: 4px;
    padding-block: 12px;
  }
  .header-ready .brand {
    grid-row: 1 / span 2;
    gap: 4px;
  }
  .header-ready .brand-primary {
    width: 180px;
  }
  .header-ready .brand-secondary {
    width: 204px;
  }
  .header-ready #menu-toggle {
    grid-column: 2;
    grid-row: 2;
  }
  .header-ready .site-search {
    grid-row: 3;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .site-header .container {
    width: calc(100% - 48px);
  }
  .header-ready .header-inner {
    column-gap: 12px;
  }
  .header-ready .brand {
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding-right: 12px;
  }
  .header-ready .brand-primary {
    width: 240px;
    max-width: calc((100% - 24px) * 0.469);
  }
  .header-ready .brand-secondary {
    width: 272px;
    max-width: calc((100% - 24px) * 0.531);
  }
  .header-ready .brand img {
    flex-shrink: 0;
  }
}
@media (min-width: 1024px) {
  .site-shell {
    --nav-font: 22px;
    --nav-leading: 28px;
    --tools-font: 24px;
    --tools-leading: 32px;
    --contact-font: 22px;
    --contact-leading: 36px;
    --footer-title: 28px;
    --footer-title-leading: 40px;
    --search-width: 280px;
    --content-max: 1196px;
    --page-gutter: 24px;
    --header-height: 96px;
    --nav-height: 48px;
    --brand-width: 600px;
    --header-gap: 24px;
    --brand-gap: 40px;
    --brand-primary: 262px;
    --brand-secondary: 298px;
    --search-height: 54px;
    --search-icon: 36px;
    --footer-top: 42px;
    --footer-height: 320px;
    --footer-padding: 32px;
    --footer-gap: 24px;
    --footer-logo: 264px;
    --footer-link-columns: 3;
    --qr-size: 112px;
    --footer-columns: 440px minmax(0, 1fr) 144px;
    --footer-link-height: 44px;
    --footer-heading-gap: 24px;
  }
  .header-inner {
    display: grid;
    grid-template-columns:
      var(--brand-width) minmax(0, var(--search-width))
      max-content;
    justify-content: space-between;
    gap: var(--header-gap);
    min-height: var(--header-height);
    padding-block: 0;
  }
  .brand,
  .header-ready .brand {
    width: 100%;
    max-width: none;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: var(--brand-gap);
  }
  .brand-primary,
  .header-ready .brand-primary {
    width: var(--brand-primary);
    max-width: none;
  }
  .brand-secondary {
    width: var(--brand-secondary);
    max-width: none;
  }
  .header-ready #menu-toggle,
  .header-ready #search-toggle {
    display: none;
  }
  .site-search,
  .header-ready .site-search {
    order: 0;
    width: 100%;
    max-width: var(--search-width);
    min-height: var(--search-height);
    border-radius: 1000px;
    justify-self: end;
  }
  .site-search input {
    padding: 0 24px;
  }
  .site-search button {
    display: grid;
    place-items: center;
    min-width: var(--search-height);
    padding: 0;
  }
  .search-icon {
    width: var(--search-icon);
    height: var(--search-icon);
  }
  .language-links {
    white-space: nowrap;
  }
  #site-navigation {
    min-height: var(--nav-height);
    padding: 0;
  }
  .navigation-list {
    min-height: var(--nav-height);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .navigation-list > li {
    flex: none;
    flex-direction: row;
    width: auto;
  }
  .navigation-list a,
  .navigation-list button {
    white-space: nowrap;
    justify-content: center;
  }
  .navigation-list button {
    width: auto;
  }
  .navigation-list .has-submenu > ul {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 6;
    width: auto;
    min-width: 150px;
    gap: 2px;
    padding: 6px;
    border-left: 0;
    background: #fff;
    box-shadow: 0 6px 16px #183b6426;
  }
  .navigation-list .has-submenu:hover > ul {
    display: grid;
  }
  .site-footer {
    grid-template-columns: var(--footer-columns);
    min-height: var(--footer-height);
    gap: var(--footer-gap);
    padding: var(--footer-padding);
    margin-top: var(--footer-top);
    /* margin-bottom: 48px; */
    background-size: cover;
    background-repeat: no-repeat;
  }
  .footer-contact {
    border-right: 2px solid var(--color-shell-divider);
    padding-right: 20px;
  }
  .footer-contact > img {
    width: var(--footer-logo);
    margin-bottom: 28px;
  }
  .footer-contact a {
    min-height: 0;
  }
  .footer-contact a[href^="mailto:"] {
    display: inline-block;
  }
  .related-links h2 {
    margin-bottom: var(--footer-heading-gap);
  }
  .related-links ul {
    grid-template-columns: repeat(var(--footer-link-columns), minmax(0, 1fr));
    gap: 0 16px;
  }
  .related-links a {
    min-height: var(--footer-link-height);
    white-space: normal;
  }
  .social-links {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-left: 16px;
    border-left: 2px solid var(--color-shell-divider);
    gap: 16px;
  }
  .social-links figure {
    width: var(--qr-size);
  }
}
@media (min-width: 1440px) {
  .site-shell {
    --search-width: 320px;
    --content-max: 1348px;
    --header-height: 108px;
    --brand-width: 684px;
    --header-gap: 28px;
    --brand-gap: 48px;
    --brand-primary: 298px;
    --brand-secondary: 338px;
    --search-height: 60px;
    --search-icon: 40px;
    --footer-top: 48px;
    --footer-height: 334px;
    --footer-padding: 34px 38px;
    --footer-logo: 296px;
    --footer-link-columns: 3;
    --qr-size: 116px;
    --footer-columns: minmax(0, 31fr) minmax(0, 42fr) minmax(0, 9fr);
  }
}
@media (min-width: 1920px) {
  .site-shell {
    --search-width: 400px;
    --content-max: 1796px;
    --header-height: 144px;
    --nav-height: 62px;
    --brand-width: 914px;
    --header-gap: 38px;
    --brand-gap: 64px;
    --brand-primary: 398px;
    --brand-secondary: 452px;
    --search-height: 80px;
    --search-icon: 52px;
    --tools-font: 36px;
    --tools-leading: 48px;
    --nav-font: 28px;
    --nav-leading: 34px;
    --contact-font: 32px;
    --contact-leading: 52px;
    --footer-title: 40px;
    --footer-title-leading: 56px;
    --footer-text: 24px;
    --footer-text-leading: 36px;
    --footer-top: 64px;
    --footer-height: 444px;
    --footer-padding: 44px 50px;
    --footer-gap: 28px;
    --footer-logo: 396px;
    --qr-size: 154px;
    --footer-link-height: 58px;
    --footer-heading-gap: 38px;
  }
}

/* 1024–1439px：桌面窄幅布局按设计稿比例收紧，避免固定品牌与工具栏挤压导航。 */
@media (min-width: 1024px) and (max-width: 1439px) {
  .site-shell {
    --nav-font: 18px;
    --nav-leading: 26px;
    --tools-font: 18px;
    --tools-leading: 28px;
    --contact-font: 18px;
    --contact-leading: 30px;
    --footer-title: 24px;
    --footer-title-leading: 36px;
    --brand-width: 520px;
    --brand-gap: 24px;
    --brand-primary: 226px;
    --brand-secondary: 270px;
    --search-width: 230px;
    --search-height: 48px;
    --search-icon: 32px;
    --header-gap: 16px;
    --footer-columns: 296px minmax(0, 1fr) 112px;
    --footer-logo: 240px;
    --qr-size: 96px;
    --footer-link-height: 40px;
    --footer-heading-gap: 16px;
    --footer-text: 14px;
    --footer-text-leading: 24px;
    --contact-font: 14px;
    --contact-leading: 24px;
  }
  .navigation-list {
    gap: 8px;
  }
  .navigation-list a,
  .navigation-list button {
    font-size: var(--nav-font);
    line-height: var(--nav-leading);
  }
  .related-links ul {
    column-gap: 12px;
  }
  .related-links a {
    white-space: normal;
    gap: 5px;
    letter-spacing: -0.2px;
  }
  .footer-contact address p,
  .footer-contact address a {
    white-space: normal;
  }
}

@media (min-width: 1200px) and (max-width: 1439px) {
  .site-shell {
    --footer-columns: 370px minmax(0, 1fr) 112px;
    --footer-text: 16px;
    --footer-text-leading: 26px;
    --contact-font: 16px;
    --contact-leading: 26px;
  }
}
