/* ============================================================
   元智医康 — 站点页眉独立样式（header.css）
   从 assets/style.css 摘取页眉/按钮所需规则，供评估页（全屏
   video/canvas 场景）单独引用，避免整份 style.css 中的
   `img, video, canvas { max-width:100%; display:block; }`
   压变形全屏视频与画布。
   ============================================================ */

:root {
  /* —— 品牌与配色 —— */
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: #eff6ff;
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --border: #d7e0ea;
  --accent: #10b981;
  --danger: #ef4444;

  /* —— 布局 —— */
  --radius: 14px;
  --radius-sm: 8px;
  --gap: 24px;
  --maxw: 1120px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, .06);

  /* —— 字阶 —— */
  --f-h1: 46px;
  --f-h2: 32px;
  --f-h3: 22px;
  --f-body: 18px;
  --f-sm: 15px;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gap); }

/* —— 顶部导航 —— */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.brand { font-size: 20px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.brand .brand-text { font-family: "Microsoft YaHei", "微软雅黑", sans-serif; font-style: italic; color: #0078d7; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; display: inline-block; vertical-align: -6px; margin-right: 8px; object-fit: cover; }
.nav { display: flex; gap: 12px; }
.nav a { color: var(--muted); font-size: var(--f-body); font-weight: 500; padding: 8px 10px; border-radius: var(--radius-sm); }
.nav a:hover, .nav a.active { color: var(--brand); background: var(--brand-soft); }

/* —— 按钮（触控目标 ≥48px 高） —— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-size: var(--f-body);
  font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: all .18s ease; line-height: 1.2;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn-lg { padding: 18px 36px; font-size: 19px; }
.site-header .btn-cta { padding: 12px 20px; font-size: 15px; white-space: nowrap; }

/* —— 页眉登录态 —— */
.header-auth { display: inline-flex; align-items: center; margin-left: 12px; }
.header-auth-login,
.header-auth-user {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: var(--f-sm); font-weight: 500; color: var(--muted);
  white-space: nowrap; transition: color .18s ease, background .18s ease;
}
.header-auth-login { color: var(--brand); }
.header-auth-login:hover,
.header-auth-user:hover { color: var(--brand); background: var(--brand-soft); }

/* —— 页眉内所有链接去默认下划线 ——
   评估页只引本文件、不引 style.css，缺 `a { text-decoration: none }` 全局重置；
   这里只作用于 .site-header 内部，不影响评估页其他区域的链接。 */
.site-header a { text-decoration: none; }

/* —— 页眉账号下拉菜单 —— */
.header-auth-menu-wrap { position: relative; display: inline-flex; }
.header-auth-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 168px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); padding: 6px; z-index: 60;
  display: flex; flex-direction: column; gap: 2px;
}
.header-auth-menu[hidden] { display: none; }
.header-auth-menu > a,
.header-auth-menu > button,
.header-auth-menu > span {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: var(--f-sm); font-weight: 500; color: var(--text);
  background: transparent; border: 0; cursor: pointer;
  font-family: inherit; white-space: nowrap;
  text-decoration: none;
}
.header-auth-menu > a:hover,
.header-auth-menu > button:hover { background: var(--brand-soft); color: var(--brand); }
.header-auth-menu > .is-disabled { color: var(--muted); opacity: .55; cursor: not-allowed; }
.header-auth-menu > .is-disabled:hover { background: transparent; color: var(--muted); }
