/* ============================================================
   移民 DIY 框架 - 共享样式（小红书风格重设计）
   设计基调：小红书红 #FF2442 + 柔粉 / 浅灰信息流背景 /
            圆角白色卡片 / 粉嫩标签 / 红色主行动 / 友好圆润字体
   仅作为展示层，不影响任何项目页的内容独立性。
   ============================================================ */

:root {
  --bg: #f7f7f7;            /* 浅灰信息流底 */
  --surface: #ffffff;
  --ink: #2b2b2b;
  --ink-soft: #6b6b6b;
  --ink-faint: #a8a8a8;
  --line: #f1e9ea;          /* 偏暖的浅分隔线 */

  --brand: #FF2442;         /* 小红书红 */
  --brand-2: #FF6B81;       /* 柔粉 */
  --brand-dark: #d81e3a;
  --accent: #FF2442;
  --accent-soft: #FFF0F2;   /* 浅粉底（标签/提示） */
  --accent-2: #FF2442;

  --ok: #2bb673;
  --warn: #FF8A00;

  --radius: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --shadow: 0 2px 8px rgba(255,36,66,.05), 0 8px 24px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 36px rgba(255,36,66,.12);
  --maxw: 1140px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system,
          BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  opacity: .06;
  pointer-events: none;
}
/* 槽位图位在未被后台替换时默认隐藏，避免破图占位 */
img[data-slot]:not([src]),
img[data-slot][src=""] { display: none; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 顶栏（由 main.js 注入） ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 16px;
}
.site-header .brand { flex: 0 1 auto; font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: .2px; }
.site-header .brand span { color: var(--brand); }

/* 折叠菜单（桌面端常显，移动端折叠） */
.site-header .nav-collapse { display: contents; }
.site-header .nav-links { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14px; }
.site-header .nav-links a { color: var(--ink-soft); font-weight: 500; }
.site-header .nav-links a:hover { color: var(--brand); text-decoration: none; }

/* 展开/收起文字按钮（仅移动端显示） */
.site-header .nav-toggle { display: none; }
.site-header .nav-toggle {
  align-items: center; justify-content: center;
  padding: 7px 16px; cursor: pointer;
  background: #fff; border: 1px solid var(--brand); border-radius: 10px;
  box-shadow: 0 2px 6px rgba(255,36,66,.12);
  color: var(--brand); font-size: 14px; font-weight: 700; letter-spacing: 2px;
}
/* 隐藏原来的横线图标，仅用文字 */
.site-header .nav-toggle span { display: none; }
.site-header .nav-toggle::after { content: "展开"; }
.site-header .nav-toggle[aria-expanded="true"]::after { content: "收起"; }

/* ---------- 容器 ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 30px 20px 64px; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #fff1f3 58%, #ffe6ea 100%);
  color: var(--ink); border: 1px solid #ffe0e4;
  border-radius: 24px; padding: 50px 44px; margin-bottom: 30px;
  box-shadow: var(--shadow);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 88% 12%, rgba(255,36,66,.10), transparent 40%),
    radial-gradient(circle at 6% 96%, rgba(255,107,129,.12), transparent 38%);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  opacity: .22;
  pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 { margin: 0 0 12px; font-size: 33px; line-height: 1.25; letter-spacing: .5px; color: var(--ink); }
.hero p { margin: 0; color: var(--ink-soft); max-width: 660px; font-size: 16px; }

.hero .search {
  margin-top: 26px; display: flex; gap: 8px; max-width: 660px; margin-left: -10px;
  background: #fff; padding: 7px 7px 7px 0; border-radius: var(--radius-pill);
  box-shadow: 0 6px 22px rgba(255,36,66,.12); border: 1px solid #ffe0e4;
}
.hero .search input {
  flex: 1 1 auto; min-width: 0; border: none; background: transparent;
  padding: 12px 18px 12px 22px; border-radius: var(--radius-pill); font-size: 15px; outline: none; color: var(--ink);
  text-align: left;
}
.hero .search input::placeholder { color: var(--ink-faint); }
.hero .btn {
  border: none; cursor: pointer; padding: 12px 28px; border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  font-weight: 800; font-size: 15px; font-family: inherit; white-space: nowrap;
  transition: transform .15s ease, filter .15s ease;
}
.hero .btn:hover { transform: translateY(-1px); filter: brightness(1.04); }

.hero .quick { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--ink-soft); padding-left: 0; }
.hero .quick .lbl { opacity: .8; }
.hero .chip {
  border: 1px solid #ffd5db; background: var(--accent-soft); color: var(--brand);
  padding: 5px 14px; border-radius: var(--radius-pill); cursor: pointer; font-size: 13px;
  font-family: inherit; transition: all .15s ease; text-align: center;
}
.hero .chip:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

.hero-stats {
  margin-top: 26px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-stats .stat {
  flex: 1 1 150px;
  text-align: center;
  padding: 16px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.hero-stats .stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.hero-stats .num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: var(--brand);
  letter-spacing: .5px;
}
.hero-stats .lbl {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 8px;
  line-height: 1.4;
}

/* ---------- 亮点卡片 ---------- */
.feat-grid {
  display: grid; gap: 18px; margin: 8px 0 30px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.feat {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 84px 22px 22px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.feat-icon {
  position: absolute; top: 50%; right: 16px; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff0f3; padding: 11px; object-fit: contain;
  box-shadow: 0 2px 8px rgba(255,36,66,.18);
}
.feat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); opacity: 0; transition: opacity .18s ease;
}
.feat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feat:hover::before { opacity: 1; }
.feat h3 { margin: 0 0 6px; font-size: 16px; color: var(--ink); }
.feat p { margin: 0; color: var(--ink-soft); font-size: 14px; }

/* ---------- 客户案例 ---------- */
.case-grid {
  display: grid; gap: 20px; margin: 14px 0 8px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.case {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.case:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.case-img { position: relative; height: 172px; overflow: hidden; background: linear-gradient(135deg, #f4f6fb, #eef1f7); }
.case-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.case:hover .case-img img { transform: scale(1.05); }
.case-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.case-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.case-flag { font-size: 22px; line-height: 1; }
.case-tag {
  display: inline-block; padding: 3px 10px; font-size: 12px; font-weight: 700;
  color: var(--brand); background: var(--accent-soft, rgba(255,36,66,.08));
  border-radius: var(--radius-pill);
}
.case h3 { margin: 0 0 8px; font-size: 16px; color: var(--ink); line-height: 1.45; }
.case p { margin: 0; color: var(--ink-soft); font-size: 13.5px; line-height: 1.75; }
.case-note {
  margin-top: 12px !important; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 12px !important; color: var(--ink-faint) !important; line-height: 1.6 !important;
}

/* ---------- 联系我们 ---------- */
.contact-list { list-style: none; margin: 12px 0 4px; padding: 0; }
.contact-list li {
  display: flex; gap: 14px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px;
}
.contact-list .k { flex: 0 0 96px; font-weight: 700; color: var(--brand); font-size: 14px; }
.contact-list .v { flex: 1 1 auto; color: var(--ink); font-size: 14px; }
.contact-list .wx-text { display: block; margin-bottom: 10px; color: var(--ink-soft); }
.contact-list .wx-qr {
  display: block; width: 180px; height: 180px; object-fit: contain;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; padding: 6px; box-shadow: var(--shadow);
}

/* ---------- 咨询表单 ---------- */
.consult-form-block { margin-top: 18px; }
.consult-form { margin-top: 12px; max-width: 560px; }
.form-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 14px; margin-bottom: 16px; }
.form-label { flex: 0 0 72px; font-weight: 700; color: var(--ink); font-size: 14px; padding-top: 9px; }
.form-input {
  flex: 0 1 60%; min-width: 0; max-width: 60%; padding: 9px 12px; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 36, 66, .12); }
.form-checks { flex: 1 1 220px; display: flex; flex-wrap: wrap; gap: 8px 14px; padding-top: 6px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.consult-btn-full { flex: 0 1 calc(60% + 86px); max-width: calc(60% + 86px); justify-content: center; margin-top: 6px; font-size: 18px; font-weight: 800; letter-spacing: 4px; text-indent: 4px; }
.form-tip { margin: 12px 0 0; color: var(--brand); font-size: 14px; font-weight: 600; }
.form-tip.ok { color: #1a7f37; }
.form-tip.err { color: #c0392b; }

/* ---------- 独立页面页头 ---------- */
.page-hero {
  margin: 4px 0 22px; padding: 28px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.page-hero h1 {
  margin: 0 0 8px; font-size: 26px; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.page-hero h1::before {
  content: ""; width: 5px; height: 24px; border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.page-hero p { margin: 0; color: var(--ink-soft); font-size: 15px; max-width: 720px; }

/* ---------- 导航登录按钮 ---------- */
.site-header .nav-login {
  padding: 6px 18px; border-radius: var(--radius-pill); color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 700; box-shadow: 0 4px 12px rgba(255,36,66,.22);
}
.site-header .nav-login:hover { color: #fff; opacity: .92; }

/* ---------- 登录页 ---------- */
.auth-wrap { max-width: 420px; margin: 40px auto 60px; padding: 0 16px; }
.auth-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px 28px;
}
.auth-card h1 { margin: 0 0 4px; font-size: 22px; text-align: center; color: var(--ink); }
.auth-card .sub { margin: 0 0 22px; text-align: center; color: var(--ink-faint); font-size: 13px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.auth-tab {
  flex: 1 1 0; padding: 10px 0; font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer; border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft);
  border-radius: var(--radius-pill); transition: all .15s ease;
}
.auth-tab.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }
.auth-pane { animation: tabFade .2s ease; }
.auth-pane[hidden] { display: none; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: border-color .15s ease;
}
.field input:focus { outline: none; border-color: var(--brand); }
.field.code-row { display: flex; gap: 10px; align-items: flex-end; }
.field.code-row > div { flex: 1 1 auto; margin: 0; }
.btn-code {
  flex: 0 0 auto; padding: 12px 14px; font-size: 13px; font-weight: 700; font-family: inherit;
  cursor: pointer; white-space: nowrap; border: 1px solid var(--brand); color: var(--brand);
  background: #fff; border-radius: var(--radius-sm); transition: all .15s ease;
}
.btn-code:hover:not(:disabled) { background: var(--accent-soft); }
.btn-code:disabled { opacity: .5; cursor: not-allowed; }
.btn-auth {
  width: 100%; padding: 13px 0; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer;
  color: #fff; border: none; border-radius: var(--radius-pill); margin-top: 4px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 8px 20px rgba(255,36,66,.22);
}
.btn-auth:hover { opacity: .93; }
.wechat-login { text-align: center; padding: 10px 0 4px; }
.wechat-qr {
  margin: 6px auto 14px;
}
.wechat-login .wx-qr {
  display: block; width: 180px; height: 180px; object-fit: contain;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; padding: 6px; box-shadow: var(--shadow); margin: 0 auto;
}
.contact-tip { margin: 8px 0 4px; font-size: 13px; color: var(--ink-soft); }
.btn-wechat {
  width: 100%; padding: 13px 0; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer;
  color: #fff; border: none; border-radius: var(--radius-pill);
  background: #07c160; box-shadow: 0 8px 20px rgba(7,193,96,.22);
}
.btn-wechat:hover { opacity: .93; }
.auth-note { margin-top: 18px; font-size: 12px; color: var(--ink-faint); text-align: center; line-height: 1.6; }
.auth-agree { margin-top: 14px; font-size: 12px; color: var(--ink-soft); display: flex; gap: 8px; align-items: flex-start; }
.auth-agree input { margin-top: 3px; }

/* ---------- 类别 Tabs ---------- */
.tabs { display: flex; gap: 10px; margin: 12px 0 22px; }
.tab-btn {
  flex: 0 0 auto; padding: 11px 26px; font-size: 15px; font-weight: 700;
  font-family: inherit; cursor: pointer; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); border-radius: var(--radius-pill);
  transition: all .15s ease; box-shadow: var(--shadow);
}
.tab-btn:hover { color: var(--brand); border-color: #ffd5db; }
.tab-btn.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(255,36,66,.22); }
.tab-panel { animation: tabFade .25s ease; }
@keyframes tabFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- 国家卡片 ---------- */
.section-title {
  font-size: 20px; margin: 34px 0 16px; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: ""; width: 5px; height: 20px; border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.country-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.country-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.country-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); opacity: 0; transition: opacity .18s ease;
}
.country-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.country-card:hover::before { opacity: 1; }
.country-card h3 { margin: 0 0 4px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.country-card .sub { color: var(--ink-faint); font-size: 13px; margin-bottom: 12px; }

/* 圆形国旗图标 */
.flag-circle {
  width: 26px; height: 26px;
  border-radius: 50%; object-fit: cover; vertical-align: middle;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.country-card h3 .flag-circle { width: 28px; height: 28px; }
.meta .v.accent .flag-circle { width: 22px; height: 22px; margin-right: 6px; }

/* 分栏装饰图 */
.section-banner {
  width: 100%; max-height: 180px; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 22px;
  box-shadow: var(--shadow);
}

.prog-list { list-style: none; margin: 0; padding: 0; }
.prog-list li {
  border-top: 1px dashed var(--line); padding: 10px 0;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.prog-list li:first-child { border-top: none; }
.prog-list a { font-weight: 600; }
.prog-list a:hover { color: var(--brand); }

.tag {
  font-size: 11px; padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--brand); white-space: nowrap; font-weight: 600;
}
.tag.easy { background: #e6f7ee; color: var(--ok); }
.tag.mid  { background: #fff2e0; color: var(--warn); }
.tag.free { background: #eef0f3; color: #8a6d3b; }

/* ---------- 项目页布局 ---------- */
.doc-layout { display: grid; grid-template-columns: 1fr 240px; gap: 34px; align-items: start; }
.doc-main { min-width: 0; }
.breadcrumb { font-size: 13px; color: var(--ink-faint); margin-bottom: 16px; }
.breadcrumb a { color: var(--ink-soft); }

.doc-title { font-size: 31px; margin: 0 0 16px; line-height: 1.25; }
.meta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.meta {
  flex: 1 1 150px; background: linear-gradient(180deg, #ffffff, #fff6f7);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.meta .k { font-size: 12px; color: var(--ink-faint); }
.meta .v { font-size: 16px; font-weight: 800; color: var(--ink); }
.meta .v.accent { color: var(--brand); }

.card-block {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 26px; margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.card-block h2 {
  font-size: 19px; margin: 0 0 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line); position: relative;
}
.card-block h2::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 50px; height: 3px;
  border-radius: 2px; background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

/* 勾选清单 */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  position: relative; padding: 9px 0; border-bottom: 1px solid var(--line);
  font-size: 15px; color: var(--ink-soft);
}
.checklist li:last-child { border-bottom: none; }

/* 材料表格 */
table.doc { width: 100%; border-collapse: collapse; font-size: 14px; overflow: hidden; border-radius: var(--radius-sm); }
table.doc th, table.doc td {
  text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top;
}
table.doc th { background: linear-gradient(180deg, #fff0f2, #ffe6ea); color: var(--ink); font-weight: 700; }
table.doc tr:hover td { background: #fff7f8; }
.badge { font-size: 12px; padding: 2px 9px; border-radius: var(--radius-pill); font-weight: 600; }
.badge.y { background: #e6f7ee; color: var(--ok); }
.badge.n { background: #ffe9ec; color: var(--brand); }
.badge.o { background: #eef0f3; color: var(--ink-soft); }

/* 流程步骤 */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 18px 16px 58px; box-shadow: var(--shadow);
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 16px; top: 18px; width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; box-shadow: 0 4px 10px rgba(255,36,66,.25);
}
.steps h4 { margin: 0 0 6px; font-size: 15px; color: var(--ink); }
.steps p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.65; }
.steps p strong { color: var(--brand); font-weight: 700; }

/* 提醒框 */
.note {
  border-left: 4px solid var(--brand); background: var(--accent-soft);
  padding: 13px 17px; border-radius: 10px; font-size: 14px; color: #b3122e; margin: 6px 0;
}
.note.info { border-color: var(--brand); background: var(--accent-soft); color: #b3122e; }

/* ---------- 核心价值三大支柱 ---------- */
.pillars { margin: 8px 0 22px; }
.pillars .section-title { margin: 4px 0 18px; }
.pillar {
  display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.pillar--rev .pillar-media { order: 2; }
.pillar-media {
  border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: 0 8px 22px rgba(255,36,66,.10); aspect-ratio: 4 / 3; background: #faf3f4;
}
.pillar-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pillar-body { position: relative; }
.pillar-num {
  display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: 1px;
  color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  padding: 4px 12px; border-radius: var(--radius-pill); margin-bottom: 10px;
}
.pillar-body h3 { margin: 0 0 10px; font-size: 21px; color: var(--ink); }
.pillar-body p { margin: 0 0 14px; color: var(--ink-soft); font-size: 15px; line-height: 1.85; }
.pillar-body p strong { color: var(--brand); font-weight: 700; }
.pillar-body .checklist li { font-size: 14.5px; color: var(--ink-soft); }
.pillar-body .checklist li strong { color: var(--ink); font-weight: 700; }
@media (max-width: 760px) {
  .pillar { grid-template-columns: 1fr; gap: 16px; padding: 18px; }
  .pillar--rev .pillar-media { order: 0; }
  /* 手机端：图片按自身比例自适应屏宽，完整显示不裁切 */
  .pillar-media { aspect-ratio: auto; width: 100%; }
  .pillar-media img { width: 100%; height: auto; max-height: 60vh; object-fit: contain; }
  .pillar-body h3 { font-size: 19px; }
}

/* 随行家属与年龄要求 */
.family-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 6px 0 12px; }
.family-info .fi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.family-info .fi .k { font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.family-info .fi .v { font-size: 14px; line-height: 1.6; color: var(--ink); }

/* 材料清单折叠 */
.doc-accordion { margin: 6px 0 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.doc-item { border-top: 1px solid var(--line); }
.doc-item:first-child { border-top: none; }
.doc-head { width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--surface); border: none; cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.doc-head:hover { background: var(--accent-soft); }
.doc-name { font-weight: 700; font-size: 14px; flex: 0 0 auto; max-width: 40%; line-height: 1.4; }
.doc-desc { flex: 1 1 auto; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.doc-badges { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }
.doc-caret { flex: 0 0 auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg); transition: transform .15s ease; margin: 4px 0 0 2px; }
.doc-head.open .doc-caret { transform: rotate(-135deg); }
.doc-body { padding: 2px 14px 14px; background: var(--surface); }
.doc-sub { padding: 10px 0; border-top: 1px dashed var(--line); }
.doc-sub:first-child { border-top: none; }
.doc-sub-name { font-weight: 700; font-size: 13px; color: var(--brand); margin-bottom: 6px; }
.doc-sub-row { display: flex; gap: 10px; font-size: 13px; line-height: 1.6; margin-top: 4px; }
.doc-sub-row .k { flex: 0 0 76px; color: var(--ink-soft); font-weight: 600; }
.doc-sub-row .v { flex: 1 1 auto; color: var(--ink); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item h4 { margin: 0 0 6px; font-size: 15px; color: var(--ink); }
.faq-item p { margin: 0; color: var(--ink-soft); font-size: 14px; }

/* 目录 TOC */
.toc {
  position: sticky; top: 78px; align-self: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); font-size: 14px;
}
.toc h3 { margin: 0 0 10px; font-size: 13px; color: var(--ink-faint); font-weight: 700; letter-spacing: .5px; }
.toc a { display: block; padding: 6px 0 6px 12px; color: var(--ink-soft); border-left: 2px solid var(--line); }
.toc a.active { color: var(--brand); font-weight: 700; border-left-color: var(--brand); }
.toc a:hover { text-decoration: none; color: var(--brand); }

/* ---------- 页脚（由 main.js 注入） ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--surface);
  color: var(--ink-faint); font-size: 13px; margin-top: 30px;
}
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; padding: 26px 20px; }
.site-footer strong { color: var(--ink-soft); }

/* ---------- 响应式 ---------- */
@media (max-width: 880px) {
  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; margin-bottom: 22px; }
  .hero { padding: 36px 24px; }
  .hero h1 { font-size: 26px; }
  .site-header .nav-links { gap: 14px; }
  .hero .search { margin-left: 0; }
}

/* ---------- 手机竖屏优化（≤600px） ---------- */
@media (max-width: 600px) {
  .wrap { padding: 18px 14px 40px; }

  /* 顶栏：移动端折叠菜单（仅手机端生效，桌面/平板保持原样） */
  .site-header .bar { flex-wrap: nowrap; gap: 10px; padding: 10px 14px; align-items: center; }
  .site-header .brand { flex: 1 1 auto; font-size: 16px; min-width: 0; }
  .site-header .nav-toggle { display: inline-flex; flex: 0 0 auto; }
  .site-header .nav-collapse {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 20px rgba(0,0,0,.06); padding: 4px 0;
  }
  .site-header .nav-collapse.open { display: block; }
  .site-header .nav-links { flex-direction: column; align-items: stretch; gap: 0; margin-left: 0; }
  .site-header .nav-links a { padding: 13px 18px; font-size: 15px; border-top: 1px solid var(--line); }
  .site-header .nav-links a:first-child { border-top: none; }

  /* Hero */
  .hero { padding: 26px 18px; }
  .hero h1 { font-size: 23px; }
  .hero p { font-size: 14px; }
  .hero .search { margin-left: 0; max-width: 100%; }
  .hero .quick { gap: 6px; }

  /* 类别切换 Tabs：缩小内边距单行容纳，过窄时横向滚动而非撑破页面 */
  .tabs { overflow-x: auto; gap: 8px; padding-bottom: 3px; -webkit-overflow-scrolling: touch; }
  .tab-btn { padding: 10px 16px; font-size: 14px; }

  /* 项目页 */
  .doc-title { font-size: 23px; }
  .meta-row { gap: 8px; }
  .meta { flex: 1 1 calc(50% - 8px); }
  .card-block { padding: 18px 16px; overflow-x: auto; }
  .card-block h2 { font-size: 17px; }

  /* 表格：缩小字号与内边距，必要时在卡片内横向滚动而非撑破整页 */
  table.doc { width: 100%; font-size: 12px; }
  table.doc th, table.doc td { padding: 8px 6px; }

  /* 材料手风琴：名称与说明改为上下堆叠，避免窄屏挤压 */
  .doc-head { flex-wrap: wrap; }
  .doc-name { flex: 1 1 100%; max-width: 100%; }
  .doc-desc { flex: 1 1 100%; }

  /* 流程步骤 */
  .steps li { padding: 14px 14px 14px 50px; }

  /* 独立页头 / 登录卡片 / 各类栅格统一单列 */
  .page-hero { padding: 20px 16px; }
  .page-hero h1 { font-size: 21px; }
  .auth-card { padding: 22px 18px; }
  .feat-grid, .case-grid, .country-grid { grid-template-columns: 1fr; }

  /* 手机端：首页亮点框圆形小图缩小显示（保持比例，不隐藏） */
  .feat { padding: 22px 62px 22px 22px; }
  .feat-icon { width: 40px; height: 40px; padding: 8px; right: 12px; }

  /* 兜底：避免任何残留元素导致整页横向滚动 */
  body { overflow-x: hidden; }
}
.empty-tip { color: var(--ink-faint); font-size: 14px; padding: 20px; text-align: center; }

/* ---------- 实用工具 ---------- */
.tools-section { margin-top: 40px; padding-top: 8px; border-top: 1px dashed var(--line); }
.tool-panel { animation: tabFade .25s ease; }
.tool-lead { color: var(--ink-soft); font-size: 14px; margin: 0 0 16px; }
.tool-form { max-width: 760px; }
.tool-q {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px 16px; margin: 0 0 16px; min-width: 0; background: var(--surface);
}
.tool-q legend { font-weight: 700; padding: 0 6px; color: var(--ink); }
.tool-q label {
  display: inline-block; margin: 6px 18px 6px 0; cursor: pointer; font-size: 14px; color: var(--ink-soft);
}
.tool-q label input { margin-right: 6px; vertical-align: -1px; }
.tool-row { display: flex; gap: 16px; flex-wrap: wrap; }
.tool-row .tool-field { flex: 1 1 240px; }
.tool-field { margin-bottom: 14px; }
.tool-field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.tool-field input, .tool-field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; background: var(--surface); color: var(--ink); box-sizing: border-box;
}
.tool-field input:focus, .tool-field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,36,66,.12); }
.tool-hint { margin-top: 6px; font-size: 13px; color: var(--brand); min-height: 1px; }
.tool-result { margin-top: 16px; }
.tool-result-title { font-size: 16px; margin: 4px 0 12px; }
.tool-reco { list-style: none; padding: 0; margin: 0; }
.tool-reco li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 8px; background: var(--surface);
}
.tool-reco a { font-weight: 600; color: var(--brand); text-decoration: none; }
.tool-reco a:hover { text-decoration: underline; }
.note.ok { border-color: #bfe6cf; background: #effaf3; color: #1c7a43; }
.note.warn { border-color: #f3d9a8; background: #fff7e9; color: #9a6b15; }
@media (max-width: 640px) {
  .tool-row { flex-direction: column; gap: 0; }
}

/* ---------- 签证预约情况查询 ---------- */
.visa-appt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 8px; }
.visa-appt-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; background: var(--surface); display: flex; flex-direction: column;
}
.visa-appt-card .va-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-bottom: 8px; color: var(--ink); }
.visa-appt-card p { color: var(--ink-soft); font-size: 13px; line-height: 1.6; margin: 0 0 14px; flex: 1; }
.visa-appt-card .btn { align-self: center; margin-top: auto; text-decoration: none; }
.visa-appt-card .va-note { color: var(--ink-faint); font-size: 12px; line-height: 1.55; margin: 0 0 10px; }

/* ---------- 汇率查询 ---------- */
.fx-converter {
  max-width: 560px; margin: 4px 0 24px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.fx-direction {
  display: inline-flex; gap: 6px; padding: 4px; margin-bottom: 16px;
  background: #f3f5fa; border-radius: var(--radius-pill);
}
.fx-dir {
  flex: 1; padding: 8px 18px; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer;
  border: none; background: transparent; color: var(--ink-soft); border-radius: var(--radius-pill);
  transition: all .15s ease;
}
.fx-dir.active { background: #fff; color: var(--brand); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.fx-row { display: flex; flex-wrap: wrap; gap: 14px; }
.fx-field { display: flex; flex-direction: column; gap: 6px; }
.fx-amount { flex: 1 1 200px; }
.fx-cur { flex: 0 1 180px; }
.fx-field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.fx-input, .fx-select {
  width: 100%; min-width: 0; padding: 10px 12px; font-size: 15px; font-family: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fx-select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%23999'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.fx-input:focus, .fx-select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,36,66,.12); }
.fx-result { margin-top: 16px; font-size: 24px; font-weight: 800; color: var(--brand); line-height: 1.3; }
.fx-result .fx-unit { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-left: 6px; }
.fx-note { margin-top: 6px; font-size: 12px; color: var(--ink-faint); }
.fx-subtitle { margin: 4px 0 10px; font-size: 15px; color: var(--ink); }
.visa-appt-card .va-rows { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.visa-appt-card .va-rows li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 12px; font-size: 13px; }
.visa-appt-card .va-rows li + li { border-top: 1px solid var(--line); }
.visa-appt-card .va-rows li span:first-child { color: var(--ink-soft); }
.visa-appt-card .va-rows li b { color: var(--ink); font-weight: 700; text-align: right; }
.visa-appt-card .va-rows li b.none { color: var(--ink-faint); font-weight: 600; }
.visa-appt-card .va-control { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.visa-appt-card .va-control label { font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.visa-appt-card .va-consulate {
  flex: 1; min-width: 0; appearance: none; -webkit-appearance: none;
  padding: 8px 30px 8px 10px; font-size: 13px; color: var(--ink);
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%23999'/></svg>") no-repeat right 10px center;
  border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.visa-appt-card .va-consulate:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ---------- 最新移民 & 签证资讯 ---------- */
.news-section { margin-top: 8px; }
.more-section { margin-top: 8px; }
.more-lead { margin-top: 8px; color: var(--ink-soft); line-height: 1.75; font-size: 15px; max-width: 720px; }
.more-cta { margin-top: 16px; }
.news-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 16px;
}
.news-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .2s ease, transform .2s ease;
}
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.news-thumb {
  height: 140px; overflow: hidden;
  background: linear-gradient(135deg, #f4f6fb, #eef1f7);
  border-bottom: 1px solid var(--line);
}
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
.news-src { color: var(--brand); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-date { color: var(--ink-soft); white-space: nowrap; }
.news-title { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.35; margin: 0; }
.news-sum {
  font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-foot { margin-top: 14px; font-size: 12px; color: var(--ink-faint); }
.news-updated #news-updated { font-weight: 600; color: var(--ink); }

@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .news-grid { grid-template-columns: 1fr; }
}



/* ---------- 美国排期查询·最新 FINAL ACTION DATES ---------- */
.bulletin-box {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); margin: 4px 0 18px;
}
.bulletin-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: linear-gradient(180deg, #fff0f2, #fff);
  border-bottom: 1px solid var(--line);
}
.bulletin-title { font-weight: 700; color: var(--ink); font-size: 15px; }
.bulletin-meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.bulletin-sub { margin: 16px 16px 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.doc-table-scroll { margin: 0 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.doc-table-scroll table.doc { min-width: 640px; }
.btn-sm { display: inline-flex; align-items: center; padding: 7px 14px; font-size: 13px; font-weight: 700; text-decoration: none; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-radius: var(--radius-pill); white-space: nowrap; box-shadow: 0 4px 12px rgba(255,36,66,.18); }
.btn-sm:hover { filter: brightness(1.04); }
.bulletin-box .note { margin: 12px 16px 16px; }

@media (max-width: 640px) {
  .bulletin-head { flex-direction: column; align-items: flex-start; }
}
