/* v3 公共壳层：重置、字体、导航、页脚。首页章节样式在 home.css。 */
/* 基础重置：原框架的基础样式在此用标准 CSS 明确提供。 */
*,
::before,
::after {
  box-sizing: border-box;
  border: 0 solid;
}
html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
figure,
dl,
dd {
  margin: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  background: transparent;
}
button,
[type="button"] {
  appearance: button;
}
img,
svg,
canvas {
  display: block;
  vertical-align: middle;
}
img {
  max-width: 100%;
  height: auto;
}
button,
summary {
  touch-action: manipulation;
}
button svg,
a svg {
  flex-shrink: 0;
}
button:disabled {
  cursor: default;
}
a {
  color: inherit;
  text-decoration: inherit;
}
@font-face {
  font-family: Manrope;
  src: url("../fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Continuum Han;
  src: url("../fonts/han-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Continuum Han;
  src: url("../fonts/han-500.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Continuum Han;
  src: url("../fonts/han-700.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --site-header-height: 108px;
  --background: #f6f7f8;
  --foreground: #0d1013;
  --dark: #080a0d;
  --accent: #46c48a;
  --accent-dark: #00683d;
  --muted: #eaedef;
  --muted-foreground: #697078;
  --line: #d7dbde;
  --ease: cubic-bezier(0.22, 0.7, 0.18, 1);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  /* 章节跳转为吸顶导航预留位置。 */
  scroll-padding-top: calc(var(--site-header-height) + 16px);
}
body {
  margin: 0;
  background: var(--dark);
  font-family:
    Manrope,
    Continuum Han,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
input {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
::selection {
  background: #46c48a;
  color: #080a0d;
}
.page-width {
  width: calc(100% - 128px);
  max-width: 1440px;
  margin-inline: auto;
}
.light-section {
  background: var(--background);
  color: var(--foreground);
}
.dark-section {
  background: var(--dark);
  color: #f5f5f6;
}
/* ===== 顶部导航 / Header ===== */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--site-header-height);
  padding: 0 64px;
  display: flex;
  align-items: center;
  gap: 36px;
  color: #f5f5f6;
  /* 滚动到浅色章节时，导航文字仍然清晰可见。 */
  background: #080a0df2;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #ffffff12;
}
.wordmark {
  font-size: 25px;
  letter-spacing: -0.025em;
  font-weight: 700;
  white-space: nowrap;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 35px;
  margin-left: auto;
}
.site-header nav a {
  font-size: 15px;
  color: #d3d5d7;
  transition: color 0.2s;
}
.site-header nav a:hover {
  color: var(--accent);
}
.language[data-slot="button"] {
  min-width: 44px;
  height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #eee;
  border-radius: 50%;
  font-size: 14px;
}
.language[data-slot="button"]:hover {
  background: #ffffff0c;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  background: white;
  color: black;
  padding: 12px;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: translateY(0);
}

/* ===== 页脚 / Footer：全站统一，以首页深色页脚为基准，信息同官网 ===== */
.site-footer {
  padding: 64px 0 30px;
  border-top: 1px solid #ffffff12;
}
.footer-main {
  display: grid;
  grid-template-columns: 1.25fr .8fr 1.35fr 1.3fr;
  gap: 40px;
  padding-bottom: 44px;
}
.site-footer .wordmark {
  font-size: 20px;
  flex-shrink: 0;
}
.site-footer p {
  font-size: 12px;
  line-height: 2;
  color: #8a949f;
  margin: 0;
  overflow-wrap: anywhere;
}
.site-footer .footer-note {
  max-width: 300px;
  margin-top: 20px;
  font-size: 10px;
  line-height: 1.9;
  color: #737d89;
}
.footer-col h3 {
  margin: 4px 0 18px;
  color: #e4e7ea;
  font-size: 14px;
  font-weight: 500;
}
.footer-col a,
.footer-legal a {
  transition: color .2s;
}
.footer-col a:hover,
.footer-legal a:hover {
  color: #9ae7bd;
}
.footer-accounts {
  display: flex;
  gap: 24px;
}
.footer-account {
  flex: 1;
  min-width: 0;
  max-width: 140px;
}
.footer-account img {
  display: block;
  width: 84px;
  height: 84px;
  margin-bottom: 12px;
  border-radius: 6px;
}
.footer-account strong {
  display: block;
  color: #e4e7ea;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
}
.site-footer .footer-account p {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.8;
  color: #737d89;
}
.footer-bottom {
  border-top: 1px solid #ffffff1b;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  font-size: 10px;
  line-height: 1.8;
  color: #737d89;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}
.footer-back-top {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  transition: color .2s;
}
.footer-back-top:hover {
  color: #9ae7bd;
}
@media (max-width: 1100px) and (min-width: 761px) {
  .footer-main {
    grid-template-columns: 1fr 1fr 1.3fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

:root {
  --brand: #00683d;
  --brand-light: #68dba2;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 39px;
  height: 39px;
  flex-shrink: 0;
  object-fit: contain;
}
.site-header {
  gap: 25px;
}
.site-header nav {
  gap: 24px;
}
.header-experience {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
  padding: 12px 19px;
  border-radius: 30px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.25s;
}
.header-experience:hover,
.experience-button:hover {
  background: #07844f;
}
.site-footer .brand-logo {
  width: 34px;
  height: 34px;
}

/* 从首页媒体查询中抽出的公共壳层规则，保证子页面不加载 home.css 时导航和页脚仍然响应式。 */
@media (min-width: 1800px) {
  .site-header { padding-inline: max(64px, calc((100vw - 1440px) / 2)); }
}
@media (max-width: 1100px) {
  .page-width { width: calc(100% - 80px); }
  .site-header { padding-inline: 40px; }
  .site-header nav { gap: 24px; }
}
@media (max-width: 1150px) {
  .site-header { gap: 18px; }
  .site-header nav { gap: 18px; }
  .site-header nav a { font-size: 12px; }
  .site-header .wordmark { font-size: 21px; }
  .brand-logo { width: 34px; height: 34px; }
  .header-experience { font-size: 11px; padding: 11px 15px; }
}
@media (max-width: 760px) {
  .page-width { width: calc(100% - 44px); }
  .site-header { height: 76px; padding: 0 23px; gap: 10px; }
  .wordmark { font-size: 20px; }
  .is-en .wordmark { font-size: 19px; }
  .site-header .wordmark { font-size: 19px; gap: 9px; }
  .brand-logo { width: 31px; height: 31px; }
  .is-en .site-header .wordmark { font-size: 17px; gap: 8px; }
  .site-footer { padding-top: 48px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 32px 24px; padding-bottom: 32px; }
  .footer-brand, .footer-accounts { grid-column: 1 / -1; }
  .site-footer .wordmark { font-size: 18px; }
  .site-footer p { font-size: 11px; }
  .footer-col h3 { margin-bottom: 12px; font-size: 13px; }
  .footer-accounts { max-width: 340px; }
  .footer-bottom { flex-direction: column; font-size: 9px; row-gap: 18px; padding-top: 21px; }
  .footer-legal { flex-direction: column; gap: 6px; }
  .site-footer .brand-logo { width: 29px; height: 29px; }
}
/* ===== 导航响应式 / Navigation responsive ===== */
/* All channels stay available when the header moves to a compact menu. */
.site-header .desktop-navigation {
  gap: 22px;
}
.desktop-navigation > a {
  white-space: nowrap;
}
.compact-navigation {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #ffffff30;
  border-radius: 28px;
  background: transparent;
  color: #e7ece9;
  font-size: 14px;
  line-height: 1.5;
}
.compact-navigation:hover,
.compact-navigation[data-popup-open] {
  background: #ffffff0d;
  border-color: #7b9e8a;
}
.navigation-menu[data-slot="dropdown-menu-content"] {
  min-width: 230px;
  max-width: calc(100vw - 40px);
  width: 250px;
  padding: 10px;
  border: 1px solid #365544;
  border-radius: 16px;
  background: #101a14;
  color: #e9f1ec;
  box-shadow: 0 20px 60px #00000035;
}
.navigation-menu-link[data-slot="dropdown-menu-item"] {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 45px;
  padding: 11px 14px;
  border-radius: 8px;
  color: #e9f1ec;
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
}
.navigation-menu-link[data-slot="dropdown-menu-item"]:hover,
.navigation-menu-link[data-slot="dropdown-menu-item"][data-highlighted],
.navigation-menu-link[data-slot="dropdown-menu-item"]:focus-visible {
  background: #1b3827;
  color: #a0e3ba;
}
.navigation-menu-link svg {
  color: #8bbaa0;
}
@media (max-width: 1250px) and (min-width: 1101px) {
  .site-header {
    gap: 16px;
  }
  .site-header .desktop-navigation {
    gap: 16px;
  }
  .site-header nav a {
    font-size: 12px;
  }
  .site-header .wordmark {
    font-size: 21px;
  }
  .site-header .brand-logo {
    width: 34px;
    height: 34px;
  }
}
@media (max-width: 1100px) {
  .site-header .desktop-navigation {
    display: none;
  }
  .compact-navigation {
    display: inline-flex;
    margin-left: auto;
  }
  .site-header .language[data-slot="button"] {
    margin-left: 0;
  }
  .header-experience {
    flex-shrink: 0;
  }
}
@media (max-width: 760px) {
  .compact-navigation {
    font-size: 13px;
    padding-inline: 11px;
    gap: 7px;
  }
  .navigation-menu[data-slot="dropdown-menu-content"] {
    width: 250px;
  }
}

/* ===== 原生 HTML 控件的基础外观 =====
   页面排版请编辑 styles.css；氛围动画请编辑 animations.css。
   本文件只负责菜单、Tab、弹窗等普通 HTML 交互控件。 */
[hidden] { display: none !important; }
[data-slot="tabs-list"] { display: inline-flex; }
[data-slot="tabs-trigger"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  background: transparent;
  transition: color .2s, border-color .2s;
}
[data-slot="tabs-content"] { outline: none; }
[data-slot="button"] { display: inline-flex; align-items: center; justify-content: center; }
.language[data-slot="button"] { display: inline-flex; flex-shrink: 0; }
/* 语言切换独立放在导航最右侧，线框圈出，与官网一致。 */
.site-header .language[data-slot="button"] {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #5c8a6e;
  border-radius: 999px;
  color: #d7ebdf;
  font-size: 13px;
  font-weight: 500;
  transition: background .2s, border-color .2s, color .2s;
}
.site-header .language[data-slot="button"]:hover,
.site-header .language[data-slot="button"]:focus-visible { background: #1b3827; border-color: #a0c9b0; color: #fff; }
@media (min-width: 1241px) { .site-header .language[data-slot="button"] { margin-left: -16px; } }
.dialog-group, .navigation-dropdown { display: contents; }

/* ===== 顶部折叠菜单 ===== */
@media (max-width: 760px) {
  :root { --site-header-height: 76px; }
}
#compact-menu {
  position: absolute;
  top: calc(100% - 12px);
  right: 40px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 0;
  max-height: calc(100vh - var(--site-header-height) - 12px);
  max-height: calc(100dvh - var(--site-header-height) - 12px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.compact-navigation[aria-expanded="true"] { background: #ffffff0d; border-color: #7b9e8a; }
#compact-menu a { margin: 0; font-size: 15px; }
/* 覆盖旧版平板样式，确保 MedGPT 等所有主入口都可见。 */
#compact-menu > a { display: flex; }
@media (max-width: 760px) { #compact-menu { right: 22px; } }

/* ===== 浏览器原生宣言弹窗 ===== */
dialog.manifesto:not([open]) { display: none !important; }
dialog.manifesto[open] {
  position: fixed;
  inset: 0;
  margin: auto;
  border: 1px solid #ffffff40;
  overscroll-behavior: contain;
  box-shadow: 0 30px 100px #0008;
}
dialog.manifesto::backdrop { background: #030908b8; backdrop-filter: blur(5px); }
html.has-modal { overflow: hidden; }
.review-result { width: 100%; }
.review-result .replay { flex-shrink: 0; }

/* ===== 官网导航入口 / 机构合作 / 下载未来医生 ===== */
.site-header .desktop-navigation { gap: 20px; }
.desktop-navigation > a,
.partnership-toggle { white-space: nowrap; }
.site-header .desktop-navigation > a,
.partnership-toggle { font-size: 14px; }
.desktop-navigation > a[aria-current="page"] { color: var(--brand-light); }
.partnership-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: #d3d5d7;
  background: transparent;
  transition: color .2s;
}
.partnership-toggle:hover,
.partnership-toggle[aria-expanded="true"] { color: var(--brand-light); }
.partnership-toggle svg { transition: transform .2s; }
.partnership-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-partnership { position: relative; }
.nav-partnership::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 18px;
}
.nav-submenu {
  position: absolute;
  top: calc(100% + 12px);
  left: -18px;
  width: 270px;
  padding: 8px;
  border: 1px solid #365544;
  border-radius: 14px;
  background: #101a14;
  box-shadow: 0 18px 45px #0005;
}
.site-header .nav-submenu a {
  display: block;
  padding: 13px 14px;
  border-radius: 8px;
  color: #e9f1ec;
  font-size: 14px;
  line-height: 1.6;
  white-space: nowrap;
}
.site-header .nav-submenu a:hover,
.site-header .nav-submenu a:focus-visible { background: #1b3827; color: #a0e3ba; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-actions .header-experience { min-height: 44px; padding: 11px 17px; }
.header-download { position: relative; }
.header-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #5c8a6e;
  border-radius: 30px;
  color: #d7ebdf;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.header-download-button:hover,
.header-download-button[aria-expanded="true"] { background: #1b3827; border-color: #a0c9b0; }
.header-download::after { content: ""; position: absolute; inset: 100% 0 auto; height: 18px; }
.download-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 245px;
  padding: 22px;
  border: 1px solid #dce7df;
  border-radius: 16px;
  background: #f8fbf9;
  color: #1c3727;
  box-shadow: 0 18px 45px #0005;
}
.download-popover img { width: 176px; height: 176px; object-fit: contain; background: #fff; }
.download-popover strong { font-size: 13px; font-weight: 500; text-align: center; }
.download-popover > a { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #00683d; }
.compact-actions { display: none; }
.compact-partnership > .partnership-toggle { width: 100%; padding: 11px 14px; font-size: 15px; }
.compact-submenu { margin: 0 10px 8px; padding: 3px 0 3px 12px; border-left: 1px solid #365544; }
#compact-menu .compact-submenu a {
  display: block;
  padding: 11px 10px;
  border-radius: 7px;
  color: #b7d2c1;
  font-size: 13px;
  line-height: 1.6;
}
#compact-menu .compact-submenu a:hover,
#compact-menu .compact-submenu a:focus-visible { background: #1b3827; color: #a0e3ba; }
@media (max-width: 1320px) and (min-width: 761px) {
  .site-header { padding-inline: 32px; gap: 16px; }
  .site-header .desktop-navigation { gap: 16px; }
}
@media (max-width: 1240px) {
  .site-header .desktop-navigation { display: none; }
  .compact-navigation { display: inline-flex; margin-left: auto; }
  .site-header .language[data-slot="button"] { margin-left: 0; }
}
@media (max-width: 760px) {
  .header-actions { display: none; }
  #compact-menu { width: 280px; }
  .compact-actions { display: flex; flex-direction: column; gap: 10px; margin: 8px 4px 3px; padding-top: 14px; border-top: 1px solid #365544; }
  #compact-menu .compact-actions a { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 12px; border-radius: 25px; font-size: 13px; font-weight: 500; }
  #compact-menu .compact-experience { background: var(--brand); color: #fff; }
  #compact-menu .compact-download { border: 1px solid #5c8a6e; color: #d7ebdf; }
}

/* 不支持脚本时正文仍可读，所有 Tab 面板展开；菜单和演示需要 JavaScript。 */
@media print {
  .site-header, .motion-control, .hero-art, .review-action, .dialog-group, .skip-link { display: none !important; }
  [data-panel][hidden] { display: block !important; }
  .hero { height: auto; min-height: 0; }
  .hero-inner { padding-block: 40px; }
  .dark-section { background: #fff; color: #111; }
  .page-width { width: 100%; }
  section { break-inside: auto; }
}
