/* ============================================================
   心屿 · 设计系统 v2
   视觉母题：深海 / 月光 / 灯塔
   原则：低饱和疗愈色系，大留白，柔和阴影，克制的动效
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 主色：深海青绿 */
  --sea-900: #0B2B24;
  --sea-800: #103A30;
  --sea-700: #165245;
  --sea-600: #1D6B58;
  --sea-500: #2A8168;
  --sea-400: #3F9E80;
  --sea-300: #6FBFA3;
  --sea-200: #A6D8C7;
  --sea-100: #D6EEE5;
  --sea-50:  #EFF8F4;

  /* 辅色：月光暖沙 */
  --sand-500: #C9A227;
  --sand-400: #DDB44A;
  --sand-300: #EBCE85;
  --sand-200: #F5E6BE;
  --sand-100: #FBF5E4;
  --sand-50:  #FDFBF3;

  /* 中性 */
  --ink-900: #14211D;
  --ink-700: #2C3B36;
  --ink-500: #51635C;
  --ink-400: #6E807A;
  --ink-300: #98A7A1;
  --ink-200: #C9D3CF;
  --ink-100: #E6EBE8;
  --ink-50:  #F4F7F5;

  /* 语义 */
  --ok:    #3F9E80;
  --warn:  #D9A441;
  --bad:   #C96A5B;
  --urgent:#B4453A;

  /* 表面 */
  --bg:        #FBFCFA;
  --surface:   #FFFFFF;
  --surface-2: #F4F7F5;
  --border:    rgba(20, 33, 29, .09);
  --border-strong: rgba(20, 33, 29, .16);

  /* 文本 */
  --text:      var(--ink-900);
  --text-2:    var(--ink-500);
  --text-3:    var(--ink-400);
  --text-inv:  #F4FBF8;

  /* 圆角 */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 36px;
  --r-full: 999px;

  /* 阴影 */
  --sh-xs: 0 1px 2px rgba(20,33,29,.05);
  --sh-sm: 0 2px 8px rgba(20,33,29,.06), 0 1px 2px rgba(20,33,29,.04);
  --sh-md: 0 8px 24px rgba(20,33,29,.07), 0 2px 6px rgba(20,33,29,.04);
  --sh-lg: 0 20px 48px rgba(20,33,29,.10), 0 6px 14px rgba(20,33,29,.05);
  --sh-glow: 0 0 0 1px rgba(63,158,128,.18), 0 12px 32px rgba(29,107,88,.18);

  /* 字体 */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;

  /* 间距节奏 */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  /* 布局 */
  --wrap: 1140px;
  --wrap-mid: 960px;
  --wrap-narrow: 760px;
  --nav-h: 68px;

  /* 动效 */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur-1: .18s;
  --dur-2: .3s;
  --dur-3: .55s;
}

/* ---------- 2. 深色模式 ---------- */
html[data-theme="dark"] {
  --bg:        #0A1714;
  --surface:   #10231E;
  --surface-2: #163029;
  --border:    rgba(214,238,229,.10);
  --border-strong: rgba(214,238,229,.20);

  --text:    #E8F2EE;
  --text-2:  #A9C0B8;
  --text-3:  #7E958D;
  --text-inv: #0B2B24;

  --sea-50:  #10231E;
  --sea-100: #143028;
  --sea-200: #1D4A3D;

  --sand-50: #1A1710;
  --sand-100:#241F13;

  --ink-50:  #12211D;
  --ink-100: #1B2C27;

  --sh-sm: 0 2px 8px rgba(0,0,0,.28);
  --sh-md: 0 8px 24px rgba(0,0,0,.34);
  --sh-lg: 0 20px 48px rgba(0,0,0,.42);
}

/* ---------- 3. 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { line-height: 1.35; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4.4vw, 44px); }
h2 { font-size: clamp(23px, 3vw, 31px); }
h3 { font-size: clamp(17px, 2vw, 20px); }
p { color: var(--text-2); }
::selection { background: var(--sea-200); color: var(--sea-900); }

/* 焦点可见性（无障碍） */
:focus-visible {
  outline: 2.5px solid var(--sea-400);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--ink-200); border-radius: 99px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }

/* ---------- 4. 布局工具类 ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; }
.wrap-narrow { width: 100%; max-width: var(--wrap-narrow); margin-inline: auto; padding-inline: 22px; }
.section { padding-block: clamp(48px, 7vw, 88px); }
.section-sm { padding-block: clamp(32px, 4vw, 52px); }
.stack > * + * { margin-top: var(--sp-4); }
.row { display: flex; align-items: center; gap: var(--sp-3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.grid { display: grid; gap: var(--sp-4); }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 5. 排版 ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--sea-600);
  margin-bottom: var(--sp-3);
}
html[data-theme="dark"] .eyebrow { color: var(--sea-300); }
.eyebrow::before {
  content: ""; width: 18px; height: 1.5px;
  background: currentColor; opacity: .55;
}
.lead {
  font-size: clamp(15px, 1.7vw, 17.5px);
  line-height: 1.85; color: var(--text-2); max-width: 62ch;
}
.section-title { margin-bottom: var(--sp-2); }
.section-desc { color: var(--text-2); max-width: 60ch; margin-bottom: var(--sp-6); }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.serif { font-family: var(--font-serif); }

/* ---------- 6. 按钮 ---------- */
.btn {
  --btn-bg: var(--sea-600);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 14.5px; font-weight: 600; letter-spacing: .01em;
  padding: 12px 24px; border-radius: var(--r-full);
  box-shadow: var(--sh-sm);
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease),
              background var(--dur-1) var(--ease), opacity var(--dur-1);
  position: relative; overflow: hidden; isolation: isolate;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-md); background: var(--sea-500); }
.btn:active { transform: translateY(0) scale(.985); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }

/* 点击波纹 */
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at var(--rx,50%) var(--ry,50%), rgba(255,255,255,.32), transparent 60%);
  opacity: 0; transition: opacity .5s;
}
.btn:active::after { opacity: 1; transition: opacity 0s; }

.btn-lg { padding: 15px 32px; font-size: 15.5px; }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-ghost {
  --btn-bg: transparent; --btn-fg: var(--sea-700);
  border: 1.5px solid var(--border-strong); box-shadow: none;
}
.btn-ghost:hover { background: var(--sea-50); border-color: var(--sea-300); box-shadow: none; }
html[data-theme="dark"] .btn-ghost { --btn-fg: var(--sea-200); }
html[data-theme="dark"] .btn-ghost:hover { background: var(--surface-2); }

.btn-soft {
  --btn-bg: var(--sea-50); --btn-fg: var(--sea-700);
  box-shadow: none;
}
.btn-soft:hover { background: var(--sea-100); box-shadow: none; }
html[data-theme="dark"] .btn-soft { --btn-bg: var(--surface-2); --btn-fg: var(--sea-200); }

.btn-sand { --btn-bg: var(--sand-400); --btn-fg: #3A2E08; }
.btn-sand:hover { background: var(--sand-300); }

.btn-danger { --btn-bg: var(--bad); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--sea-600);
  border-bottom: 1.5px solid transparent; padding-bottom: 1px;
  transition: gap var(--dur-1) var(--ease), border-color var(--dur-1);
}
.link-arrow:hover { gap: 10px; border-bottom-color: currentColor; }
html[data-theme="dark"] .link-arrow { color: var(--sea-300); }

/* ---------- 7. 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  box-shadow: var(--sh-xs);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease),
              border-color var(--dur-2);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-md);
  border-color: var(--sea-200);
}
.card-flat { box-shadow: none; }
.card-pad-lg { padding: var(--sp-6); }

/* 玻璃拟态 */
.glass {
  background: rgba(255,255,255,.62);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 12px 40px rgba(11,43,36,.10);
}
html[data-theme="dark"] .glass {
  background: rgba(16,35,30,.66);
  border-color: rgba(214,238,229,.12);
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}

/* 服务卡（图标 + 标题 + 描述） */
.svc {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-5);
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease),
              border-color var(--dur-2), background var(--dur-2);
  position: relative; overflow: hidden;
}
.svc::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(150deg, var(--sea-50), transparent 55%);
  opacity: 0; transition: opacity var(--dur-3) var(--ease); pointer-events: none;
}
.svc:hover { transform: translateY(-5px); box-shadow: var(--sh-md); border-color: var(--sea-200); }
.svc:hover::before { opacity: 1; }
.svc > * { position: relative; }
.svc-ico {
  width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center; font-size: 21px;
  background: var(--sea-50); border: 1px solid var(--sea-100);
  transition: transform var(--dur-2) var(--ease-out);
}
.svc:hover .svc-ico { transform: scale(1.08) rotate(-4deg); }
.svc-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.svc-desc { font-size: 13.5px; line-height: 1.75; color: var(--text-2); flex: 1; }
.svc-more { font-size: 13px; font-weight: 600; color: var(--sea-600); }
html[data-theme="dark"] .svc-ico { background: var(--surface-2); border-color: var(--border); }
html[data-theme="dark"] .svc-more { color: var(--sea-300); }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  padding: 4px 11px; border-radius: var(--r-full);
  background: var(--sea-50); color: var(--sea-700);
  border: 1px solid var(--sea-100);
  white-space: nowrap;
}
.tag-sand { background: var(--sand-50); color: #8A6A15; border-color: var(--sand-200); }
.tag-bad { background: #FDF0EE; color: #A8402F; border-color: #F3D5CF; }
.tag-plain { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
html[data-theme="dark"] .tag { background: var(--surface-2); color: var(--sea-200); border-color: var(--border); }
html[data-theme="dark"] .tag-sand { background: var(--sand-100); color: var(--sand-300); border-color: var(--border); }
html[data-theme="dark"] .tag-bad { background: #2E1714; color: #E8A79C; border-color: #4A2A25; }
html[data-theme="dark"] .tag-plain { background: var(--surface-2); color: var(--text-2); }

/* ---------- 8. 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2), background var(--dur-2), box-shadow var(--dur-2);
}
.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 16px rgba(20,33,29,.05);
}
.nav-inner {
  height: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 22px;
  display: flex; align-items: center; gap: var(--sp-2);
}
.logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 19px; font-weight: 800; letter-spacing: .02em;
  color: var(--text); margin-right: var(--sp-4); flex-shrink: 0;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(145deg, var(--sea-500), var(--sea-700));
  display: grid; place-items: center; color: #fff; font-size: 15px;
  box-shadow: 0 3px 10px rgba(29,107,88,.28);
}
.nav-menu { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: 5px;
  font-size: 14px; font-weight: 600; color: var(--text-2);
  padding: 9px 13px; border-radius: var(--r-sm);
  transition: color var(--dur-1), background var(--dur-1);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--sea-700); background: var(--sea-50); }
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.active { color: var(--sea-200); background: var(--surface-2); }
.nav-spacer { flex: 1; }

/* 下拉 */
.has-drop { position: relative; }
.drop {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translate(-50%, -8px) scale(.98);
  min-width: 520px; padding: var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-lg);
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease-out), visibility var(--dur-2);
  z-index: 120;
}
.drop.drop-wide { min-width: 660px; grid-template-columns: 1fr 1fr 1fr; }
.has-drop:hover .drop,
.has-drop:focus-within .drop {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.drop-title {
  grid-column: 1 / -1; font-size: 11.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3); padding: 10px 12px 5px;
}
.drop-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-sm);
  transition: background var(--dur-1);
}
.drop-item:hover { background: var(--sea-50); }
html[data-theme="dark"] .drop-item:hover { background: var(--surface-2); }
.drop-ico {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 14px;
  background: var(--sea-50); margin-top: 1px;
}
html[data-theme="dark"] .drop-ico { background: var(--surface-2); }
.drop-txt { min-width: 0; }
.drop-name {
  font-size: 13.5px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.drop-sub { font-size: 11.5px; color: var(--text-3); line-height: 1.5; margin-top: 1px; }
.drop-badge {
  font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 99px;
  background: var(--sea-100); color: var(--sea-700);
}
.drop-new {
  font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 99px;
  background: var(--sand-300); color: #6B5210; letter-spacing: .03em;
}

/* 导航右侧工具 */
.nav-tools { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; font-size: 16px;
  color: var(--text-2); transition: background var(--dur-1), color var(--dur-1);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* 移动端 */
.nav-burger { display: none; }
@media (max-width: 980px) {
  .nav-menu { display: none; }
  .nav-burger { display: grid; }
  .nav-tools .nav-cta { display: none; }
}
.mobile-panel {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 99;
  background: var(--bg); overflow-y: auto;
  padding: var(--sp-4) 22px var(--sp-8);
  transform: translateY(-12px); opacity: 0; visibility: hidden;
  transition: opacity var(--dur-2), transform var(--dur-2) var(--ease-out), visibility var(--dur-2);
}
.mobile-panel.open { opacity: 1; transform: none; visibility: visible; }
.mp-group { margin-bottom: var(--sp-5); }
.mp-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 8px;
}
.mp-link {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-radius: var(--r-sm);
  font-size: 14.5px; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.mp-link:last-child { border-bottom: none; }
.mp-link:active { background: var(--surface-2); }
.mp-link .drop-ico { width: 30px; height: 30px; font-size: 15px; }

/* 进度条（顶部滚动指示） */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2.5px; z-index: 200;
  background: linear-gradient(90deg, var(--sea-400), var(--sand-400));
  width: 0%; transition: width .1s linear;
}

/* ---------- 9. 页头 / 面包屑 ---------- */
.page-head {
  padding: clamp(36px, 5.5vw, 62px) 0 clamp(26px, 3.5vw, 40px);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(120% 130% at 8% 0%, var(--sea-50) 0%, transparent 58%),
    var(--bg);
}
html[data-theme="dark"] .page-head {
  background: radial-gradient(120% 130% at 8% 0%, var(--surface-2) 0%, transparent 58%), var(--bg);
}
.page-head h1 { margin-bottom: 10px; }
.crumb {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-3); margin-bottom: 14px;
}
.crumb a:hover { color: var(--sea-600); }
.crumb span.sep { opacity: .45; }

/* ---------- 10. 表单 ---------- */
.field { margin-bottom: var(--sp-3); }
.field label, .label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-2); margin-bottom: 7px;
}
.input, .select, .textarea {
  width: 100%; padding: 11px 15px;
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-size: 14.5px; line-height: 1.6;
  transition: border-color var(--dur-1), box-shadow var(--dur-1), background var(--dur-1);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--sea-400);
  box-shadow: 0 0 0 3.5px rgba(63,158,128,.14);
}
.textarea { resize: vertical; min-height: 110px; font-family: inherit; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%236E807A' stroke-width='1.7' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px;
}
.err-box {
  display: none; padding: 10px 14px; border-radius: var(--r-sm);
  background: #FDF0EE; color: #A8402F; font-size: 13px;
  border: 1px solid #F3D5CF; margin-bottom: var(--sp-3);
}
.err-box.show { display: block; }
html[data-theme="dark"] .err-box { background: #2E1714; color: #E8A79C; border-color: #4A2A25; }

/* 单选项（自测用） */
.opts { display: flex; gap: 8px; flex-wrap: wrap; }
.opt {
  position: relative; flex: 1 1 auto; min-width: 74px;
  display: flex; align-items: center; justify-content: center;
  padding: 9px 14px; border-radius: var(--r-sm);
  border: 1.5px solid var(--border-strong);
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: all var(--dur-1) var(--ease);
  user-select: none; text-align: center;
}
.opt:hover { border-color: var(--sea-300); background: var(--sea-50); }
html[data-theme="dark"] .opt:hover { background: var(--surface-2); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:has(input:checked) {
  background: var(--sea-600); border-color: var(--sea-600);
  color: #fff; box-shadow: 0 4px 12px rgba(29,107,88,.24);
}
.opt:has(input:focus-visible) { outline: 2.5px solid var(--sea-400); outline-offset: 2px; }

/* 进度 */
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress-bar {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--sea-400), var(--sea-600));
  width: 0%; transition: width var(--dur-3) var(--ease-out);
}

/* ---------- 11. 折叠面板 ---------- */
.acc { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.acc-item + .acc-item { border-top: 1px solid var(--border); }
.acc-head {
  width: 100%; display: flex; align-items: center; gap: 13px;
  padding: 16px 20px; text-align: left;
  font-size: 14.5px; font-weight: 600; color: var(--text);
  transition: background var(--dur-1);
}
.acc-head:hover { background: var(--surface-2); }
.acc-head::after {
  content: ""; margin-left: auto; flex-shrink: 0;
  width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--dur-2) var(--ease);
}
.acc-item.open .acc-head::after { transform: rotate(225deg) translateY(-2px); }
.acc-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-3) var(--ease-out);
}
.acc-item.open .acc-body { grid-template-rows: 1fr; }
.acc-body > div { overflow: hidden; }
.acc-inner { padding: 0 20px 18px; }
.acc-inner ol, .acc-inner ul { padding-left: 20px; margin: 0; }
.acc-inner li { font-size: 14px; color: var(--text-2); line-height: 1.95; margin-bottom: 7px; }
.acc-inner li::marker { color: var(--sea-500); font-weight: 700; }

/* ---------- 12. 页脚 ---------- */
.footer {
  background: var(--sea-900); color: rgba(244,251,248,.78);
  padding: clamp(44px, 6vw, 68px) 0 28px;
  margin-top: var(--sp-9);
}
html[data-theme="dark"] .footer { background: #071310; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: var(--sp-6); margin-bottom: var(--sp-7);
}
.footer h4 {
  font-size: 13px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(244,251,248,.5); margin-bottom: 14px;
}
.footer a {
  display: block; font-size: 13.5px; padding: 4px 0;
  color: rgba(244,251,248,.72); transition: color var(--dur-1), transform var(--dur-1);
}
.footer a:hover { color: #fff; transform: translateX(3px); }
.footer-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.footer-brand .logo-mark { box-shadow: none; }
.footer-brand b { font-size: 19px; color: #fff; letter-spacing: .02em; }
.footer-desc { font-size: 13px; line-height: 1.85; color: rgba(244,251,248,.62); max-width: 30ch; }
.footer-bottom {
  border-top: 1px solid rgba(244,251,248,.12);
  padding-top: 20px; display: flex; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap; font-size: 12.5px; color: rgba(244,251,248,.5);
}
.hotline {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--sand-300); font-weight: 600;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-5); }
}

/* ---------- 13. 动效 ---------- */
/* 渐进增强：只有 JS 就绪（html.anim-ready）后才隐藏，避免无 JS/动画失效时内容不可见 */
html.anim-ready [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  will-change: opacity, transform;
}
html.anim-ready [data-reveal].in { opacity: 1; transform: none; }

@keyframes float-slow {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(14px,-18px) scale(1.05); }
}
@keyframes breathe-glow {
  0%,100% { opacity: .5; transform: scale(1); }
  50% { opacity: .85; transform: scale(1.12); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}@keyframes shimmer {
  0% { background-position: -420px 0; }
  100% { background-position: 420px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--ink-100) 50%, var(--surface-2) 75%);
  background-size: 840px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--r-sm);
}
html[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, #1E3A32 50%, var(--surface-2) 75%);
  background-size: 840px 100%;
}

/* ---------- 14. 提示条 ---------- */
.note {
  display: flex; gap: 11px; padding: 13px 17px;
  border-radius: var(--r-sm); font-size: 13px; line-height: 1.8;
  background: var(--sea-50); border: 1px solid var(--sea-100); color: var(--sea-700);
}
.note-sand { background: var(--sand-50); border-color: var(--sand-200); color: #7A5E14; }
.note-bad { background: #FDF0EE; border-color: #F3D5CF; color: #A8402F; }
html[data-theme="dark"] .note { background: var(--surface-2); border-color: var(--border); color: var(--sea-200); }
html[data-theme="dark"] .note-sand { background: var(--sand-100); color: var(--sand-300); border-color: var(--border); }
html[data-theme="dark"] .note-bad { background: #2E1714; color: #E8A79C; border-color: #4A2A25; }

/* ---------- 15. 响应式 ---------- */
@media (max-width: 980px) {
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 680px) {
  body { font-size: 14.5px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .g-auto { grid-template-columns: 1fr; }
  .section { padding-block: 44px; }
  .card { padding: var(--sp-4); }
  .opts { gap: 6px; }
  .opt { padding: 8px 10px; font-size: 12.5px; min-width: 62px; }
  .footer { margin-top: 56px; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* 打印 */
@media print {
  .nav, .footer, .btn, .scroll-progress { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* ---------------- 骨架屏（加载占位） ---------------- */
.sk-line {
  height: 13px;
  border-radius: 7px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--surface-2, #EEF3F0) 25%, rgba(255,255,255,.75) 45%, var(--surface-2, #EEF3F0) 65%);
  background-size: 240% 100%;
  animation: skShimmer 1.3s ease-in-out infinite;
}
.sk-line:last-child { margin-bottom: 0; }
@keyframes skShimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}
html[data-theme="dark"] .sk-line {
  background: linear-gradient(90deg, rgba(255,255,255,.07) 25%, rgba(255,255,255,.16) 45%, rgba(255,255,255,.07) 65%);
  background-size: 240% 100%;
  animation: skShimmer 1.3s ease-in-out infinite;
}

/* Vue 聊天页首屏启动骨架：JS 加载完成前先给一个品牌底 */
#boot-splash {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: #FBFCFA;
  transition: opacity .35s ease;
}
#boot-splash.gone { opacity: 0; pointer-events: none; }
#boot-splash .bs-mark { font-size: 44px; animation: bsFloat 2.4s ease-in-out infinite; }
#boot-splash .bs-name { font-size: 20px; font-weight: 800; color: #1D6B58; letter-spacing: 4px; }
#boot-splash .bs-sub { font-size: 12.5px; color: #8AA097; letter-spacing: 1px; }
#boot-splash .bs-bar {
  width: 132px; height: 4px; border-radius: 4px; overflow: hidden; margin-top: 4px;
  background: #E4EEE9; position: relative;
}
#boot-splash .bs-bar::after {
  content: ""; position: absolute; left: -40%; top: 0; width: 40%; height: 100%;
  border-radius: 4px; background: #1D6B58;
  animation: bsSlide 1.1s ease-in-out infinite;
}
@keyframes bsFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes bsSlide { 0% { left: -40%; } 100% { left: 100%; } }
@media (prefers-color-scheme: dark) {
  #boot-splash { background: #0A1714; }
  #boot-splash .bs-name { color: #7FC0A8; }
  #boot-splash .bs-bar { background: rgba(255,255,255,.1); }
}

/* ---------------- 全站搜索面板 ---------------- */
.xs-mask {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(10, 23, 20, .42);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 20px 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.xs-mask.show { opacity: 1; pointer-events: auto; }
.xs-panel {
  width: 100%; max-width: 560px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg, 18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22); overflow: hidden;
  transform: translateY(-8px) scale(.98); transition: transform .22s cubic-bezier(.16,1,.3,1);
}
.xs-mask.show .xs-panel { transform: none; }
.xs-input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 18px; border-bottom: 1px solid var(--border); color: var(--text-3);
}
.xs-input-row input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 15px; color: var(--text-1); font-family: inherit;
}
.xs-input-row input::placeholder { color: var(--text-3); }
.xs-kbd {
  font-size: 10.5px; padding: 2px 7px; border-radius: 5px;
  border: 1px solid var(--border); color: var(--text-3); font-family: inherit;
}
.xs-results { max-height: min(52vh, 400px); overflow: auto; padding: 6px; }
.xs-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; text-decoration: none; color: inherit;
}
.xs-item.on, .xs-item:hover { background: var(--surface-2); }
.xs-kind {
  flex: none; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 5px;
  background: var(--sea-50); color: var(--sea-700);
}
html[data-theme="dark"] .xs-kind { background: rgba(95,180,148,.16); color: var(--sea-300); }
.xs-kind-知识 { background: var(--sand-50, #FBF3E2); color: #8A6A1F; }
html[data-theme="dark"] .xs-kind-知识 { background: rgba(217,164,65,.16); color: #E0B96B; }
.xs-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.xs-txt b { font-size: 13.5px; font-weight: 600; }
.xs-txt em { font-size: 11.5px; color: var(--text-3); font-style: normal;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xs-empty { padding: 34px 18px; text-align: center; color: var(--text-3); font-size: 13px; line-height: 2; }
.xs-ask { color: var(--sea-700); text-decoration: underline; }
.xs-foot {
  padding: 9px 18px; border-top: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-3); background: var(--surface-2);
}
.xs-foot a { color: var(--sea-700); text-decoration: underline; }

/* ---------------- 返回顶部 ---------------- */
.xy-top {
  position: fixed; right: 22px; bottom: 26px; z-index: 900;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--sea-700); cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s ease, transform .25s cubic-bezier(.16,1,.3,1);
}
.xy-top.show { opacity: 1; transform: none; pointer-events: auto; }
.xy-top:hover { background: var(--sea-50); }
html[data-theme="dark"] .xy-top { background: var(--surface-2); color: var(--sea-300); }
@media (max-width: 720px) {
  .xy-top { right: 14px; bottom: 18px; width: 40px; height: 40px; }
  .xs-mask { padding-top: 8vh; }
}
