/* 六页共用的排版细化；保留原有内容、品牌色和各页视觉结构。 */
/* 控件允许长文案自然换行，图标保持尺寸。 */
.button {
  max-width: 100%;
  padding-block: 12px;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
}

.button-small {
  padding-block: 9px;
}

.button > span {
  min-width: 0;
}

.button svg,
.text-link svg,
.language-toggle svg,
.contact-hero-badges svg {
  flex-shrink: 0;
}

.button:hover {
  transform: none;
}

.site-header {
  column-gap: 20px;
}

.desktop-nav {
  gap: clamp(18px, 2vw, 30px);
  padding-inline: 12px;
}

.desktop-nav a,
.header-actions {
  flex-shrink: 0;
}

.desktop-nav a {
  white-space: nowrap;
}

.language-toggle {
  min-height: 40px;
}

.brand-copy span {
  line-height: 1.5;
}

.site-header .brand-copy span {
  font-size: 11px;
}

.mobile-menu nav a {
  padding-block: 10px;
  line-height: 1.35;
}

.footer-links > div {
  gap: 12px;
}

.footer-links a {
  width: fit-content;
  max-width: 100%;
  padding-block: 3px;
  line-height: 1.5;
}

.footer-brand p {
  line-height: 1.85;
}

.footer-bottom {
  flex-wrap: wrap;
  gap: 12px 24px;
  line-height: 1.7;
}

/* 英文保持词间距，以行高和自然换行消化较长内容。 */
body.lang-en :is(h1, h2, h3) {
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

body.lang-en :is(.hero-copy-text, .section-intro, .about-manifesto-copy,
  .coverage-hero-copy > p, .contact-hero-copy > p) {
  line-height: 1.8;
  text-wrap: pretty;
}

:is(.section-heading, .feature-section-heading, .feature-map-heading,
  .coverage-directory-heading, .plans-spec-heading) > div {
  min-width: 0;
}

/* 首页：密集的能力介绍保留原网格，统一标题的呼吸感。 */
.hero h1 {
  line-height: 1.14;
}

body.lang-en .hero h1 {
  font-size: clamp(2.5rem, 4.1vw, 4.5rem);
  line-height: 1.12;
}

.hero-copy-text {
  max-width: 62ch;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 18px 24px;
}

body.lang-en :is(.coverage-copy h2, .feature-section-heading h2,
  .feature-question-types-heading h2, .home-exam-models-heading h2,
  .home-scoring-reports-heading h2, .home-vocabulary-heading h2,
  .home-teaching-plan-heading h2, .home-auto-entry-heading h2,
  .home-k12-heading h2, .home-multilingual-heading h2,
  .home-brand-custom-heading h2, .feature-platforms-heading h2,
  .home-security-heading h2, .about-copy h2, .contact-copy h2) {
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  line-height: 1.16;
}

body.lang-en :is(.home-exam-models-grid, .home-k12-grid,
  .home-brand-operations-grid, .feature-platforms-grid) h3 {
  line-height: 1.3;
}

.feature-question-types-grid > *,
.home-k12-grid > *,
.feature-platforms-grid > * {
  min-width: 0;
}

/* 功能页：侧栏给长名称完整行高，主面板标题与正文拉开层级。 */
.feature-proof article {
  gap: 10px;
  padding-block: 24px;
}

.feature-proof article > span {
  line-height: 1.65;
}

.feature-module-tabs button {
  min-height: 50px;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 13px;
}

.feature-module-tabs button b {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.feature-module-tabs button b em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.feature-module-panel {
  min-width: 0;
  padding: clamp(20px, 2.5vw, 36px);
}

.feature-module-panel > header {
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 20px;
}

body.lang-en .feature-module-panel h3 {
  font-size: clamp(1.875rem, 3vw, 2.75rem);
  line-height: 1.18;
}

.feature-item-title {
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px 12px;
  line-height: 1.25;
}

body.lang-en .feature-item-title {
  font-size: clamp(1.4rem, 2.1vw, 1.875rem);
  overflow-wrap: anywhere;
}

.feature-item-introduction {
  padding-top: 12px;
  line-height: 1.8;
}

/* 演示卡片里的标签同样完整换行，避免英文只剩省略号。 */
.feature-shortcut-tile > b,
.feature-vocabulary-details :is(b, small),
.feature-public-resource-summary span,
.feature-coin-segments > div > span {
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

body.lang-en .feature-map-heading > p {
  margin-top: 16px;
}

/* 考试目录：缩小长英文标题的级差，网格子项允许收缩。 */
.coverage-hero-actions {
  flex-wrap: wrap;
  gap: 16px 24px;
}

.coverage-hero-notes span,
.contact-hero-badges > span {
  padding-block: 8px;
  line-height: 1.5;
}

body.lang-en .coverage-hero-copy h1 {
  font-size: clamp(2.4rem, 5vw, 5.5rem);
  line-height: 1.12;
}

body.lang-en .coverage-directory-heading h2 {
  font-size: clamp(2rem, 3.6vw, 3.75rem);
  line-height: 1.18;
}

.coverage-directory-heading h2 {
  text-wrap: balance;
}

.coverage-results,
.exam-result-group,
.exam-card-grid,
.exam-card {
  min-width: 0;
}

.coverage-search-panel {
  display: block;
}

.coverage-filters,
.coverage-country-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.coverage-country-filter {
  display: block;
  margin-top: 16px;
  padding-top: 16px;
}

.coverage-filters button,
.coverage-country-buttons button {
  flex: 0 1 auto;
  min-height: 44px;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: normal;
  text-align: left;
}

.coverage-filters button b,
.coverage-country-buttons button b {
  flex-shrink: 0;
  font-size: 11px;
}

@media (min-width: 1181px) {
  .coverage-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .coverage-country-buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .coverage-filters,
  .coverage-country-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coverage-filters button:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .coverage-filters,
  .coverage-country-buttons {
    grid-template-columns: 1fr;
  }
}

.exam-result-heading h3 {
  line-height: 1.35;
}

.exam-card-meta {
  line-height: 1.65;
}

/* 套餐页：两栏标题使用真实可用空间，不靠位移挤在一起。 */
.plans-spec-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 72px);
}

.plans-spec-custom-message {
  max-width: none;
  margin-top: 0;
  padding-left: 24px;
  transform: none;
}

.plans-spec-heading h2,
.plans-spec-custom-copy {
  line-height: 1.22;
}

.plans-hero-title > span {
  display: block;
}

body.lang-en .plans-spec-heading h2 {
  font-size: clamp(2rem, 3.6vw, 3.75rem);
}

body.lang-en .plans-spec-custom-copy {
  font-size: clamp(1.5rem, 2.1vw, 2rem);
  line-height: 1.35;
  text-wrap: pretty;
}

.plans-spec-table :is(th, td) {
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.plans-spec-note {
  line-height: 1.8;
}

/* 关于我们：增加正文可读性，保留居中的宣言式布局。 */
.about-manifesto-copy,
body.lang-en .about-manifesto-copy {
  font-size: 16px;
  line-height: 1.9;
  gap: 20px;
  text-wrap: pretty;
}

body.lang-en .about-manifesto-body h1 {
  font-size: clamp(2rem, 4.2vw, 4.5rem);
  line-height: 1.2;
}

.about-manifesto-signoff {
  flex-wrap: wrap;
  line-height: 1.7;
}

/* 联系页：标签、输入与行之间留出空间，电话在小屏完整分行。 */
.contact-hero-copy h1 {
  line-height: 1.18;
}

body.lang-en .contact-hero-copy h1 {
  max-width: 23ch;
  font-size: clamp(2rem, 4.2vw, 3.75rem);
}

.contact-form-card {
  padding: clamp(24px, 2.5vw, 36px);
}

.contact-form-card h2 {
  line-height: 1.3;
}

.contact-page .form-grid {
  gap: 20px;
}

.contact-page .form-field {
  min-width: 0;
  gap: 8px;
}

.contact-page .form-field > span {
  line-height: 1.5;
}

.contact-page .form-field :is(input, select) {
  height: 46px;
}

.contact-page .form-field textarea {
  height: 120px;
  min-height: 120px;
  line-height: 1.65;
}

.contact-page .form-field-wide {
  margin-top: 20px;
}

.contact-form-card .contact-submit {
  min-height: 48px;
}

/* 页尾行动区的长英文标题，避免与右侧按钮争抢宽度。 */
body.lang-en :is(.features-cta, .coverage-cta, .plans-cta, .about-cta) h2 {
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  line-height: 1.18;
}

@media (min-width: 1081px) {
  .coverage-hero-copy {
    grid-template-areas:
      "eyebrow eyebrow"
      "title title"
      "copy actions"
      "copy notes";
  }

  .coverage-hero-actions {
    grid-area: actions;
    top: auto;
    align-self: end;
    justify-self: start;
    margin-top: 32px;
  }

  .coverage-hero-notes {
    grid-area: notes;
    top: auto;
    justify-self: start;
    margin-top: 16px;
  }
}

@media (min-width: 1081px) and (max-width: 1280px) {
  .site-header {
    column-gap: 14px;
    padding-inline: 24px;
  }

  .desktop-nav {
    gap: 18px;
    padding-inline: 0;
  }

  .header-cta {
    padding-inline: 12px;
  }
}

@media (max-width: 1080px) {
  .plans-spec-heading {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .plans-spec-custom-message {
    max-width: 640px;
  }

  .feature-module-tabs button {
    flex-basis: 240px;
    max-width: calc(100vw - 48px);
    min-height: 52px;
  }

  .feature-module-tabs button b {
    white-space: normal;
  }

  .feature-public-resource-summary > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 760px) {
  .language-toggle,
  .menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .site-header {
    column-gap: 12px;
  }

  .site-header .brand-copy span {
    font-size: 10px;
  }

  .mobile-menu {
    overflow-y: auto;
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

  body.lang-en :is(.coverage-copy h2, .feature-section-heading h2,
    .feature-question-types-heading h2, .home-exam-models-heading h2,
    .home-scoring-reports-heading h2, .home-vocabulary-heading h2,
    .home-teaching-plan-heading h2, .home-auto-entry-heading h2,
    .home-k12-heading h2, .home-multilingual-heading h2,
    .home-brand-custom-heading h2, .feature-platforms-heading h2,
    .home-security-heading h2, .about-copy h2, .contact-copy h2,
    .coverage-directory-heading h2, .plans-spec-heading h2,
    .features-cta h2, .coverage-cta h2, .plans-cta h2, .about-cta h2) {
    font-size: clamp(1.875rem, 6.5vw, 2.5rem);
    line-height: 1.2;
  }

  body.lang-en .hero h1 {
    font-size: clamp(2.25rem, 8.5vw, 3.25rem);
  }

  .feature-proof article {
    padding: 22px 16px;
  }

  .feature-module-panel > header {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feature-module-panel > header > span {
    padding-top: 0;
  }

  .feature-map-heading {
    gap: 24px;
  }

  body.lang-en .feature-map-heading > p {
    margin-top: 0;
  }

  .coverage-hero-copy h1,
  body.lang-en .coverage-hero-copy h1 {
    font-size: clamp(2.25rem, 7.5vw, 3.5rem);
    line-height: 1.16;
  }

  .exam-result-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 16px;
  }

  .exam-result-heading p {
    grid-column: 1 / -1;
  }

  .exam-result-heading h3 {
    min-width: 0;
    font-size: 23px;
    overflow-wrap: anywhere;
  }

  .plans-spec-table td {
    min-height: 84px;
    padding: 14px 10px;
    gap: 8px;
    font-size: 13px;
  }

  .plans-spec-table td[data-plan]::before {
    font-size: 11px;
    line-height: 1.5;
  }

  .about-manifesto-copy,
  body.lang-en .about-manifesto-copy {
    font-size: 15px;
    line-height: 1.85;
  }

  .contact-form-card {
    padding: 24px 20px;
  }

  .contact-hero-badges > span {
    min-height: 44px;
  }

  .footer-links a {
    padding-block: 6px;
  }
}

@media (max-width: 560px) {
  .feature-news-distribution-audiences > article {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 6px 10px;
  }

  .feature-news-distribution-audiences article > header {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
  }

  .feature-news-distribution-audiences article > strong {
    grid-column: 1;
    grid-row: 2;
  }

  .feature-news-distribution-audiences article > small {
    grid-column: 1;
    grid-row: 3;
  }

  .feature-news-distribution-audiences article > b {
    grid-column: 2;
    grid-row: 2 / 4;
  }

  .feature-news-distribution-audiences article > header > span {
    overflow: visible;
    overflow-wrap: anywhere;
    font-size: 6px;
    line-height: 1.5;
  }

  .contact-page .phone-input-group {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  body.lang-en .plans-spec-custom-copy {
    font-size: 1.5rem;
  }

  .plans-spec-custom-message {
    padding-left: 20px;
  }
}
