:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f4fb;
  --text: #1f2937;
  --text-soft: #5b6675;
  --border: #e3e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --shadow: 0 6px 24px rgba(31, 41, 55, 0.08);
  --shadow-hover: 0 12px 32px rgba(31, 41, 55, 0.14);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

/* ---------- Top nav ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.brand-dot {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  display: grid; place-items: center;
  color: #fff; font-size: 16px;
}
.topnav a.back-home {
  font-size: 14px;
  color: var(--text-soft);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #38bdf8 120%);
  color: #fff;
  padding: 64px 0 72px;
}
.hero h1 {
  font-size: 38px;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.hero p {
  font-size: 17px;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 8px;
}
.hero-badges {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
}

/* ---------- Group section ---------- */
.section {
  padding: 48px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.section-head h2 {
  font-size: 24px;
  margin: 0;
}
.section-head .count {
  font-size: 14px;
  color: var(--text-soft);
}
.section-desc {
  color: var(--text-soft);
  margin: 0 0 26px;
  font-size: 15px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: block;
  color: var(--text);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
  border-color: #c7d6f5;
}
.card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.logo {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  flex: 0 0 auto;
}
.card h3 { margin: 0; font-size: 17px; }
.card .domain { font-size: 13px; color: var(--text-soft); margin: 2px 0 0; }
.card .go {
  margin-top: 14px;
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Detail page ---------- */
.detail-hero {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  padding: 40px 0;
}
.detail-hero .row {
  display: flex;
  align-items: center;
  gap: 18px;
}
.detail-hero .logo { width: 56px; height: 56px; font-size: 24px; border-radius: 14px; }
.detail-hero h1 { margin: 0; font-size: 28px; }
.detail-hero .badge {
  display: inline-block;
  margin-top: 6px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 13px;
}
.detail-hero p { margin: 10px 0 0; color: rgba(255,255,255,0.88); max-width: 760px; }

.official-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  background: #fff;
  color: #1e293b;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.official-btn:hover { background: #eef2f7; text-decoration: none; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 26px 30px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.panel h2 {
  font-size: 20px;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel h2 .num {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  font-size: 14px;
  flex: 0 0 auto;
}
.panel .lead { color: var(--text-soft); margin: 0 0 18px; font-size: 15px; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li {
  position: relative;
  padding: 0 0 20px 52px;
  counter-increment: step;
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 700;
  display: grid; place-items: center;
}
.steps li::after {
  content: "";
  position: absolute;
  left: 16px; top: 38px;
  width: 2px; height: calc(100% - 38px);
  background: var(--border);
}
.steps li:last-child::after { display: none; }
.steps li strong { display: block; margin-bottom: 2px; }
.steps li span { color: var(--text-soft); font-size: 14.5px; }
.steps code, .inline-code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 13px;
  color: #b91c1c;
}

/* SMTP table */
table.smtp {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  overflow: hidden;
  border-radius: 10px;
}
table.smtp th, table.smtp td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
table.smtp th {
  background: var(--surface-2);
  color: var(--text-soft);
  font-weight: 600;
  width: 160px;
}
table.smtp tr:last-child td { border-bottom: none; }
table.smtp td.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.tips { list-style: none; padding: 0; margin: 0; }
.tips li {
  padding: 12px 14px 12px 44px;
  position: relative;
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14.5px;
}
.tips li::before {
  content: "💡";
  position: absolute;
  left: 14px; top: 11px;
}

.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 40px;
}
.page-nav a {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 14px;
}
.page-nav a:hover { text-decoration: none; border-color: #c7d6f5; }
.page-nav a .label { color: var(--text-soft); font-size: 12px; display: block; }
.page-nav a.next { text-align: right; }

/* ---------- 返回汇总首页（低调链接，仅详情页，位于 footer 上方） ---------- */
.back-to-summary {
  text-align: center;
  padding: 30px 16px 6px;
}
.back-to-summary a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  transition: color .15s ease, border-color .15s ease;
}
.back-to-summary a:hover {
  color: var(--primary);
  border-color: #c7d6f5;
  text-decoration: none;
}

/* ---------- 免费版 vs 付费版（仅部分企业邮箱页，位于注意事项之后） ---------- */
.fp-note p {
  margin: 0 0 12px;
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.75;
}
.fp-note p:last-child { margin-bottom: 0; }
.fp-note strong { color: var(--text); }

/* Footer 样式已抽取到 style2.css（与 etax365.cn 一致，限定 footer 作用域，无需引入 Bootstrap）。 */

.note-box {
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14.5px;
  color: var(--text-soft);
}

/* ---------- SMTP 配置速查表 ---------- */
.hero-link {
  display: inline-block;
  margin-top: 22px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.hero-link:hover { background: rgba(255, 255, 255, 0.28); text-decoration: none; }

.cfg-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.cfg-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 14px;
  min-width: 780px;
}
.cfg-table thead th {
  background: #4232c2;
  color: #fff;
  text-align: left;
  padding: 13px 15px;
  font-weight: 600;
}
.cfg-table tbody td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cfg-table tbody tr:nth-child(even) { background: #fafbfc; }
.cfg-table tbody tr:hover { background: #f3f0ff; }
.mail-name { font-weight: 600; color: var(--text); }
.type-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 600;
}
.badge-personal { background: #e8f1ff; color: #1b6fe6; }
.badge-enterprise { background: #fff0e6; color: #de5b27; }
.badge-free { background: #eef0f4; color: #5b6472; }
.official-link { color: #4232c2; text-decoration: none; font-weight: 500; white-space: nowrap; }
.official-link:hover { text-decoration: underline; }
.pwd-tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 11px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.pwd-auth { background: #eafaf0; color: #1a7f3c; }
.pwd-login { background: #eef0f4; color: #5b6472; }
.cfg-note { font-size: 13px; color: var(--text-soft); line-height: 1.7; margin: 14px 2px 0; }

@media (max-width: 600px) {
  .hero h1 { font-size: 28px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  table.smtp th { width: 110px; }
}
