/* ===== 设计变量（浅色系） ===== */
:root {
  /* 页面底色：极浅的灰蓝，白卡片压在上面时层次才明显 */
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --line: #e3e9f3;
  --line-strong: #cfd9ea;
  --text: #101a2d;
  --text-2: #334155;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --green: #0e9f6e;
  --amber: #c47b0a;
  --red: #d04747;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(16, 26, 45, 0.05);
  --shadow: 0 10px 30px -12px rgba(16, 26, 45, 0.14), 0 2px 6px rgba(16, 26, 45, 0.04);
}

* { box-sizing: border-box; }

/* 组件里用了 display:flex / grid，会盖掉 UA 的 [hidden]{display:none} */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 8% -12%, #e4edff 0, transparent 60%),
    radial-gradient(760px 400px at 92% -6%, #eef2ff 0, transparent 58%),
    var(--bg);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 5px;
  background: #eef2f9;
  color: #1e40af;
}

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px 72px; }
.wrap.narrow { max-width: 900px; }

/* ===== 滚动 Banner ===== */
.banner {
  position: relative;
  max-width: 1060px;
  margin: 20px auto 6px;
  padding: 0 20px;
}

.banner {
  /* 说明条带的高度：slide 用它预留空间、标题条用它占位、翻页按钮用它算中心，
     三处必须同一个值，所以提到这里做单一来源 */
  --banner-cap-h: 34px;
}

.banner-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.banner-track::-webkit-scrollbar { display: none; }

.banner-slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: block;
  text-decoration: none;
  color: var(--text);
}
.banner-slide:hover { text-decoration: none; }

/* 招租位现在也是链接（跳到 /ad/3 招租页），只是配色和其他两张不同，
   所以这里只保留键盘焦点样式，不再假装它是「点击复制」的按钮。 */
.banner-slide.banner-rent { cursor: pointer; }
.banner-slide.banner-rent:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
  border-radius: var(--radius);
}

.banner-slide img {
  display: block;
  width: 100%;
  height: auto;
  /* 下沿改成直角：说明文字现在排在预留的条带里，不再是压在图上的浮层 */
  border-radius: var(--radius) var(--radius) 0 0;
}

/* 说明文字（2026-11-06 从「压在图上」改成「排在图下预留的条带里」）
 *
 * 原来它是绝对定位压在图片底部，再盖一层白色渐变。问题是横幅自己也有一行小字
 * 落在同一个位置 —— 两行字直接叠在一起，谁也读不清。横幅放大到 234 高之后
 * 这个重叠更明显（图里的小字正好顶在说明文字上）。
 * 现在在 slide 底部预留 --banner-cap-h，图片到那里就结束，说明文字占这条带子，
 * 图里所有文字都能完整看清，也不再需要渐变遮罩。
 */
.banner-slide { padding-bottom: var(--banner-cap-h, 34px); }

.banner-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--banner-cap-h, 34px);
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 12px;
  color: #475569;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* 左右翻页按钮：压在横幅两侧，半透明白底保证任何底色上都看得清 */
.banner-nav {
  position: absolute;
  /* 按图片区域的中心对齐（扣掉底部说明条带），而不是整个卡片的中点 */
  top: calc((100% - var(--banner-cap-h, 34px)) / 2);
  transform: translateY(-50%);
  z-index: 3;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(15, 27, 47, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 27, 47, 0.14);
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.banner-nav:hover { background: #fff; color: var(--accent); transform: translateY(-50%) scale(1.06); }
.banner-nav:active { transform: translateY(-50%) scale(0.96); }
.banner-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.banner-prev { left: 30px; }
.banner-next { right: 30px; }
/* 手机上本来就能左右滑动，按钮只会挡住内容 */
@media (max-width: 760px) {
  .banner-nav { display: none; }
  .banner-prev { left: 8px; }
  .banner-next { right: 8px; }
}

.banner-dots {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin-top: 10px;
}

.dot {
  width: 22px; height: 4px;
  border: 0; padding: 0;
  border-radius: 3px;
  background: #cbd5e1;
  cursor: pointer;
  transition: background 0.25s, width 0.25s;
}
.dot.is-active { background: var(--accent); width: 34px; }

/* ===== Hero ===== */
/* ===== 品牌标识 ===== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fdf6f0;
  box-shadow: var(--shadow-sm);
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #33507f;
}

.hero { padding: 54px 0 30px; text-align: center; }

/* 首屏右侧的文章栏（2026-11-06 第二次调整）。
 *
 * 第一版做成两栏 grid（1fr + 320px）并把左栏左对齐，结果标题被推到最左边、
 * 「往左挪太多」—— 用户要的是「用右边原本空着的那些地方」，不是把正文挤走。
 *
 * 实际量过（1440/1280/1920 都一样，因为 .wrap 上限 980 且内容居中）：
 *   正文区 241..1181，最宽的内容块（520 宽）451..971 居中，
 *   左右各剩 210px 空白。所以文章栏就用这 210 + 一点余量 = 220px，
 *   **绝对定位贴右**，左栏一点都不动（文字仍是居中的，位置和以前一样）。
 *
 * 为什么用绝对定位而不是 grid：grid 会把 220px 从正文宽度里扣掉，
 * 居中的标题就会跟着左移 110px —— 那正是用户说「挪太多」的原因。
 *
 * 断点 1040：正文区要到 940 才保证有 210 的空白（940-520)/2 = 210，
 * 再窄空白不够，宁可落回单栏把文章排到说明文字下面。
 * top:50% + translateY(-50%) 让它相对标题块垂直居中，也就是「中右部」。 */
@media (min-width: 1040px) {
  .hero { position: relative; }
  .hero-art {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    /* 200 而不是 210：宽 520 的内容块居中后右边缘在正文区 730 处，
       200 的栏从 740 起 —— 留 10px 呼吸，一像素都不重叠。 */
    width: 200px;
    /* 首屏是 text-align:center，卡片会继承过去 —— 标题和「1284 人读过」都居中，
       在这么窄的栏里读起来像一段被挤扁的居中文字。侧栏一律左对齐。 */
    text-align: left;
  }
  /* 220px 宽只放得下一列：卡片改成竖排，字号也降一档，
     否则 15px 的标题在这个宽度会折成三四行。 */
  .hero-art .art-band-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 9px;
    overflow: visible;
  }
  .hero-art .art-band-t { font-size: 15px; }
  .hero-art .art-card { flex: initial; min-height: 0; padding: 10px 12px; gap: 4px; }
  .hero-art .art-card-t { font-size: 13px; line-height: 1.45; }
  .hero-art .art-card-m { font-size: 11.5px; }
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11.5px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0 0 28px;
  font-size: clamp(30px, 5.2vw, 44px);
  line-height: 1.28;
  letter-spacing: -0.6px;
}

/* 「NAT 类型」用纯色高亮块突出，不使用文字渐变 */
.mark {
  position: relative;
  z-index: 0;
  margin-left: 0.12em;
  color: #1d4ed8;
  font-weight: 800;
}
.mark::before {
  content: "";
  position: absolute;
  left: -0.1em;
  right: -0.1em;
  bottom: 0.04em;
  height: 0.42em;
  background: #dbeafe;
  border-radius: 3px;
  z-index: -1;
}

.grad {
  background: linear-gradient(96deg, #2563eb 0%, #6d4aff 55%, #db2777 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 0 auto 26px;
  max-width: 620px;
  color: var(--muted);
  font-size: 15px;
}

/* 居中放大的主按钮 */
.cta { display: grid; justify-items: center; gap: 12px; }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: 14.5px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s, border-color 0.2s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
}
.btn:hover { border-color: #a9bde0; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* 测试进行中：按钮里转圈 + 文案变「正在测试…」 */
.btn.is-loading:disabled { opacity: 0.92; cursor: progress; }
.btn.is-loading::before {
  content: '';
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 9px;
  vertical-align: -2px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  animation: btnSpin 0.7s linear infinite;
}
.btn-ghost.is-loading::before {
  border-color: rgba(37, 99, 235, 0.25);
  border-top-color: #2563eb;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

.btn-primary {
  border: 0;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 12px 26px -10px rgba(37, 99, 235, 0.65);
}
.btn-primary:hover { filter: brightness(1.05); border: 0; }

.btn-xl {
  min-width: 240px;
  padding: 17px 56px;
  font-size: 18px;
  letter-spacing: 1px;
  border-radius: 14px;
}

/* ===== 开始测试按钮的高亮阴影 + 悬浮抬起 =====
   效果由两部分组成：
     1) 常驻高亮：按钮底下垫一层蓝色辉光（.cta-btn::before），轻微呼吸（3.8s 一轮），
        让 CTA 在白色背景上「自己发光」，比动画环更耐看、也更不打扰阅读；
     2) 悬浮反馈：#startBtn 上移 2px、辉光与投影同时加深，松开回位。
   为什么辉光要挂在包裹层而不是按钮的 ::before/::after：
     按钮自己的 ::before 已经被「测试中」的转圈占用；而按钮内部再放负 z-index 的元素，
     会画在按钮背景之上（把按钮脸色染脏）。包一层再往后放，就是干干净净的背光。
   性能：动画只改 opacity / transform（合成层就能做），不触发重排。 */
.cta-btn {
  position: relative;
  display: inline-flex;
  isolation: isolate;
}

.cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;                     /* 与按钮同尺寸，阴影靠 box-shadow 往外压 */
  border-radius: 14px;
  z-index: -1;
  pointer-events: none;
  /* 四层叠出来的「一笔重墨」：
     1) 贴着边缘的接触阴影 —— 让按钮像压在纸上；
     2) 中景深蓝投影 —— 决定「沉」的观感；
     3) 远景大扩散 —— 白底上那一圈明显的蓝晕；
     4) 同色外发光 —— 和按钮本身的蓝色接上，不留灰边。 */
  box-shadow:
    0 4px 10px -2px rgba(30, 58, 138, 0.35),
    0 14px 28px -6px rgba(30, 64, 175, 0.55),
    0 28px 56px -10px rgba(30, 64, 175, 0.45),
    0 0 34px 4px rgba(59, 130, 246, 0.5);
  opacity: 0.95;
  animation: ctaGlow 3.8s ease-in-out infinite;
}

@keyframes ctaGlow {
  0%, 100% { opacity: 0.78; }
  50%      { opacity: 1; }
}

/* 按钮本身的过渡：抬起要快、回位要稳，所以时长分开写 */
#startBtn {
  transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.3, 1),
              box-shadow 0.22s ease,
              filter 0.18s ease;
}

#startBtn:hover:not(:disabled) {
  transform: translateY(-2px);
  /* 抬起来时阴影再压一层：距离更远、扩散更大，才看得出「离地了」 */
  box-shadow:
    0 6px 12px -2px rgba(30, 58, 138, 0.38),
    0 20px 36px -8px rgba(30, 64, 175, 0.6),
    0 36px 68px -14px rgba(30, 64, 175, 0.5),
    0 0 44px 6px rgba(59, 130, 246, 0.55);
  filter: brightness(1.04);
}

/* 按下去要「落回地面」，否则按下瞬间还浮着，手感是假的 */
#startBtn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 10px 20px -6px rgba(30, 64, 175, 0.55);
}

/* 测试进行中：按钮不可点，辉光也停下来，别在「正在测试」时还闪 */
.cta-btn:has(> .btn.is-loading)::before { animation: none; opacity: 0.55; }

/* 窄屏辉光收一点，避免糊到上下文字 */
@media (max-width: 480px) {
  .cta-btn::before {
    box-shadow:
      0 3px 8px -2px rgba(30, 58, 138, 0.3),
      0 12px 24px -6px rgba(30, 64, 175, 0.5),
      0 22px 42px -12px rgba(30, 64, 175, 0.4),
      0 0 26px 3px rgba(59, 130, 246, 0.45);
  }
}

/* 系统开了「减少动态效果」：不留呼吸、也不做位移，只保留静态高亮 */
@media (prefers-reduced-motion: reduce) {
  .cta-btn::before { animation: none; opacity: 0.9; }
  #startBtn { transition: none; }
  #startBtn:hover:not(:disabled),
  #startBtn:active:not(:disabled) { transform: none; }
}

.btn-ghost { background: var(--surface); }
.btn-block { display: block; width: 100%; text-align: center; }

.tiny { color: var(--muted); font-size: 12px; margin: 10px 0 0; }

/* 首页科普区的「延伸阅读」已经撤掉（2026-11-01）：那三篇搬进了 /blog，
   读者统一从「技术文章」入口进，首页不再重复摆一份链接列表。 */

/* ===== 长尾文章页 ===== */
.article { padding-top: 28px; }
.article .crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.article .crumbs a { color: var(--muted); }
.article .crumbs a:hover { color: var(--accent, #2563eb); }
.article h1 { font-size: 30px; line-height: 1.35; margin: 0 0 12px; letter-spacing: -0.4px; }
.article .lead { font-size: 16px; color: var(--text-2); margin: 0 0 26px; }
.article-body { font-size: 15.5px; line-height: 1.85; color: var(--text-2); }
.article-body h2 {
  font-size: 20px; margin: 40px 0 12px; color: var(--text);
  padding-left: 12px; border-left: 4px solid var(--accent, #2563eb); line-height: 1.4;
}
.article-body h3 { font-size: 16.5px; margin: 24px 0 8px; color: var(--text); }
.article-body p { margin: 0 0 14px; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 22px; }
.article-body li { margin: 6px 0; }
.article-body strong { color: var(--text); }
.article-body a { color: var(--accent, #2563eb); text-decoration: underline; text-underline-offset: 2px; }
/* 正文里的按钮：上面这条 `.article-body a` 是「class + 元素」的选择器，
   优先级高于 `.btn-primary`（单个 class），会把按钮文字染成蓝底蓝字、还带下划线。
   这里显式还原成按钮配色 —— 光猫超密页最早踩到过，按钮看着像空白。 */
.article-body a.btn { color: #ffffff; text-decoration: none; }
.article-body a.btn:hover { text-decoration: none; }
.article-body table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 14.5px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
/* 文章里的表格列多、文案长。全局有一条 `th, td { white-space: nowrap }`（给首页那张
   五列对照表用的），这里必须把 th 和 td 都覆盖回 normal，否则整表被撑出容器、右侧被裁掉 */
.article-body table { table-layout: fixed; }
.article-body th, .article-body td { white-space: normal; word-break: break-word; }
.article-body th { background: var(--surface-2, #eef3fb); color: var(--text); font-weight: 600; }

/* 超密表：只有三列且内容短，.article-body table 是 table-layout:fixed，
   不分列宽会三等分、右半边大片空白。这里只给这一类表指定比例。 */
.article-body table.cred th:nth-child(1), .article-body table.cred td:nth-child(1) { width: 22%; }
.article-body table.cred th:nth-child(2), .article-body table.cred td:nth-child(2) { width: 34%; }
.article-body table.cred code { font-size: 14px; letter-spacing: .2px; }
.note {
  margin: 18px 0; padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.7;
  background: #fff8e6; border: 1px solid #f6dfae; color: #7a5a12;
}
.note b { color: #6b4c08; }
/* ===== 光猫超密页：置顶现状提示 + 「找我」推荐卡 =====
   这个页面的转化路径和别的不一样：读者真正的问题是「我这台到底怎么办」，
   所以正文第一屏先把「网上教程已失效」的现状说清，再把「找人」这条路摆在最前。 */
.ont-alert {
  margin: 0 0 26px;
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.8;
  color: #6d4a0c;
  background: linear-gradient(180deg, #fff6e5, #fffcf5);
  border: 1px solid #f0d6a2;
}
.ont-alert b { color: #5a3c05; }
/* 「改坏了会断网」这一段：整篇里后果最重的一句，给它一条左边线和一个底色，
   让人扫过时不会漏掉（但仍在同色系里，不喧宾夺主）。 */
.ont-alert p.ont-risk {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid #d97706;
  background: rgba(217, 119, 6, 0.09);
  color: #5f3a06;
  font-size: 14px;
}

.ont-best {
  margin: 18px 0 26px;
  padding: 18px 20px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.09), rgba(37, 99, 235, 0.02));
  border: 1px solid rgba(37, 99, 235, 0.3);
  box-shadow: 0 14px 30px -22px rgba(37, 99, 235, 0.6);
}
.ont-best h3 { margin: 0 0 8px; font-size: 17.5px; }
/* 三条好处做成列表，扫一眼就能带走 */
.ont-benefits {
  list-style: none;
  margin: 12px 0 14px;
  padding: 0;
  display: grid;
  gap: 7px;
  font-size: 14.5px;
}
.ont-benefits li { padding-left: 20px; position: relative; color: var(--text-2); }
.ont-benefits li::before {
  content: '✓';
  position: absolute;
  left: 2px;
  color: #2563eb;
  font-weight: 700;
}
.ont-jump, .help-jump {
  display: flex;
  align-items: center;
  justify-content: center;   /* 只剩一颗按钮，居中放 */
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 !important;
}
.ont-jump .meta { font-size: 12.5px; color: var(--muted); }
/* 手机上按钮独占一行：文案较长，和提示挤在一行会被压得很窄 */
@media (max-width: 520px) {
  .ont-jump, .help-jump { gap: 8px; }
  .ont-jump .btn, .help-jump .btn { display: block; width: 100%; text-align: center; }
}

/* ===== 文章里的「这类问题我能解决」卡片 =====
   用在读者自己动手搞不定的地方（运营商 CGNAT 这类）：与其让文章停在
   「反正你在家怎么设都没用」，不如把出路摆出来 —— 一张卡 + 一颗按钮，
   按钮跳到对应的闲鱼宣传页（NAT 类型 /ad/1，光猫超密 /ad/2）。
   配色与 .ont-best 同一套，读者在几篇文章之间不会觉得是两个站。 */
.help-card {
  margin: 18px 0 26px;
  padding: 18px 20px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.09), rgba(37, 99, 235, 0.02));
  border: 1px solid rgba(37, 99, 235, 0.3);
  box-shadow: 0 14px 30px -22px rgba(37, 99, 235, 0.6);
}
/* 正文的 p 有 14px 下边距，卡片里要收一点，否则按钮离文字太远 */
.help-card p { margin: 0 0 12px; font-size: 15px; line-height: 1.75; }
.help-card p:last-child { margin-bottom: 0; }
.help-card b { color: var(--accent, #2563eb); }
.help-card code { background: rgba(37, 99, 235, 0.1); color: #1d4ed8; }

/* 文首的「找站长」卡：比正文里的求助卡更像一个入口，
   所以加一行小标题（.qh-k）把「不想自己试」这句话单独拎出来。 */
.help-card.quick-help { margin-top: 0; }
.help-card .qh-k {
  margin: 0 0 8px;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
/* 「想自己动手也行」这句是分道扬镳的提示：别让它看起来像正文的一段 */
.qh-alt {
  margin: 0 0 8px !important;
  font-size: 13.5px;
  color: var(--muted);
}

.article-cta {
  margin: 40px 0 8px; padding: 22px; border-radius: 16px; text-align: center;
  background: var(--surface-2, #eef3fb); border: 1px solid var(--line);
}
.article-cta p { margin: 0 0 14px; color: var(--text-2); }
.article-cta .btn { margin: 0 6px; }
.article-nav { margin: 34px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.article-nav a { color: var(--text-2); }
@media (max-width: 720px) {
  .article h1 { font-size: 24px; }
  .article-body { font-size: 15px; }
}

/* ===== 探测日志（控制台） ===== */
.panel {
  margin-top: 8px;
  padding: 18px 20px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.2px;
}

.state-chip {
  font-size: 12px;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.2);
  white-space: nowrap;
}
.state-chip.is-done { background: rgba(14, 159, 110, 0.09); color: var(--green); border-color: rgba(14, 159, 110, 0.24); }
.state-chip.is-error { background: rgba(208, 71, 71, 0.09); color: var(--red); border-color: rgba(208, 71, 71, 0.26); }

.console {
  min-height: 72px;
  max-height: 210px;
  overflow-y: auto;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--text-2);
}

.log-line {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  align-items: baseline;
  animation: logIn 0.18s ease both;
}

@keyframes logIn {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: none; }
}

.log-time { flex: 0 0 auto; width: 66px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.log-phase { flex: 0 0 auto; width: 152px; color: #7c3aed; font-weight: 600; letter-spacing: 0.2px; }
.log-text { flex: 1 1 220px; min-width: 0; word-break: break-word; color: #475569; }
.log-text:only-child { flex: 1 1 100%; color: var(--muted); }

.log-line.is-ok .log-text { color: var(--green); }
.log-line.is-warn .log-text { color: var(--amber); }
.log-line.is-bad .log-text { color: var(--red); }
.log-line.is-muted .log-text,
.log-line.is-muted .log-phase { color: var(--muted); }

/* ===== 结果 ===== */
.result {
  margin-top: 20px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: rise 0.35s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.result-head { display: flex; gap: 18px; align-items: center; }

.nat-badge {
  flex: 0 0 auto;
  min-width: 88px;
  padding: 12px 14px;
  border-radius: 15px;
  text-align: center;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: #f1f5fb;
  border: 1px solid var(--line);
  color: var(--muted);
}
.nat-badge.nat1 { background: linear-gradient(160deg, #e6f9f1, #e6f2fe); color: #067a56; border-color: #bfe9d8; }
.nat-badge.nat2 { background: linear-gradient(160deg, #e8f1fe, #eef0fe); color: #1d4ed8; border-color: #c9dbfb; }
.nat-badge.nat3 { background: linear-gradient(160deg, #fdf3e3, #fdeee2); color: #a35f04; border-color: #f3dcb8; }
.nat-badge.nat4 { background: linear-gradient(160deg, #fdeaea, #f6e9f8); color: #b92f2f; border-color: #f6cdcd; }

/* ===== 判成 NAT4 时的「先重启再测」提示 =====
   位置在结果卡内部、跟着结论走，所以用暖色描边 + 浅底把它从白卡片里拎出来，
   但比红色（=封禁/危险）轻，避免吓人 —— 这里的结论是「可能只是设备 BUG」。
   只在 NAT4 结论下渲染（app.js 控制 hidden），其余类型完全不占版面。 */
.nat4-tip {
  margin: 18px 0 0;
  padding: 16px 18px 14px;
  border-radius: 14px;
  border: 1px solid #f3dcb8;
  border-left: 4px solid var(--amber);
  background: linear-gradient(180deg, #fffaf1, #fffdf9);
}
.nat4-tip .nt-h {
  margin: 0 0 8px;
  font-size: 15px;
  color: #7a4a06;
}
.nat4-tip .nt-h b { color: #8a5205; }
.nat4-tip .nt-b {
  margin: 0 0 14px;
  font-size: 13.8px;
  line-height: 1.8;
  color: #6b4a12;
}
.nat4-tip .nt-b b { color: #8a5205; }
.nat4-tip .nt-a {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}
.nat4-tip .nt-meta { font-size: 12.5px; color: #9a7b45; }

@media (max-width: 560px) {
  .nat4-tip { padding: 14px 14px 12px; }
  .nat4-tip .nt-b { font-size: 13.5px; }
  /* 窄屏按钮独占一行，别和说明挤在一起 */
  .nat4-tip .nt-a .btn { display: block; width: 100%; text-align: center; }
}

/* 结果里的出口 IP 与归属地 */
/* 出口 IP / 归属地 / 测试时间：做成一条浅蓝信息带。
   之前是 13px 灰字混在说明文里，用户「测完想截个图」根本看不清自己 IP，
   所以这里给整块加底色、IP 字号拉到 20px 加粗用主色，其余两项 15px 深色。
   三项用 flex + gap 排，窄屏自动换行（换行后仍保持左对齐，不会挤成一行小字）。 */
.result-net {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 26px;
  margin: 14px 0 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(37, 99, 235, 0.16);
  font-size: 15px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.result-net .rn { display: inline-flex; align-items: baseline; gap: 8px; }
/* 标签小一号、灰一点：让「值」成为视觉主体 */
.result-net .rn-k { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.result-net b {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
  line-height: 1.25;
}
.result-net .rn-v { font-size: 15px; font-weight: 600; color: var(--text); }

@media (max-width: 560px) {
  .result-net { gap: 6px 16px; padding: 11px 13px; font-size: 14px; }
  .result-net b { font-size: 18px; }
  .result-net .rn-v { font-size: 14px; }
}

.result-title h2 { margin: 0 0 3px; font-size: 19px; }
.result-title p { margin: 0; color: var(--muted); font-size: 13.5px; }

.table-scroll { overflow-x: auto; margin-top: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
th, td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th { color: var(--muted); font-weight: 500; font-size: 12px; background: var(--surface-2); }
tbody tr:hover { background: var(--surface-2); }

/* ===== 分级引导（Canvas） ===== */
.guide {
  margin-top: 18px;
  padding: 10px 6px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: rise 0.35s ease both;
  /* 气泡（.guide-tip）按圆点在画布里的坐标绝对定位，锚点就是这一块 */
  position: relative;
}

#guideCanvas {
  display: block;
  width: 100%;
  touch-action: manipulation;
}

/* 场景行末尾「?」的悬浮气泡（2026-11-07）。
   位置由 guide.js 按圆点坐标算 —— 圆点在 Canvas 里，只有脚本知道它在哪；
   但折行、字号、阴影交给浏览器，比自己用 Canvas 量文本省事也更清晰。 */
.guide-tip {
  position: absolute;
  z-index: 6;
  max-width: min(260px, calc(100vw - 44px));
  padding: 7px 10px;
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 12.5px;
  line-height: 1.6;
  box-shadow: 0 14px 30px -16px rgba(15, 23, 42, .65);
  /* 气泡不接鼠标：鼠标从圆点划到气泡上会把 hover 断掉，气泡就一闪一闪 */
  pointer-events: none;
}

.guide-cta { display: flex; justify-content: center; padding: 2px 0 12px; }

/* ===== 科普区 ===== */
.science { margin-top: 54px; }
.science h2 { font-size: 20px; margin: 0 0 14px; letter-spacing: -0.2px; }

.science-table { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.science-table th, .science-table td { white-space: normal; vertical-align: top; }
.science-table td:first-child { white-space: nowrap; }
/* 2026-11-06 表格从 5 列扩到 8 列（加 NAS IPv4 / Xbox / BT·PT）。
   860px 是「桌面 940 可用宽度内刚好放得下、再窄就横向滚动」的临界值。
   列一多就容易被压成每格两三个字、换行换到看不清，所以给一个下限：
   窄屏宁可横向滚动（外层 .table-scroll 就是干这个的），也不要把字挤碎。 */
.science-table { min-width: 860px; }

/* 横向滚动提示：只在窄屏出现（桌面 7 列放得下，多一句是噪音）。
   目的是告诉用户「右边还有内容」，否则看起来像表格被卡片边缘裁断了。 */
.table-hint {
  display: none;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
@media (max-width: 640px) {
  .table-hint { display: block; }
}

/* ===== 答案区（定义 + 常见问题，2026-11-16） =====
   这块是为「可被引用」而写的：搜索引擎 / AI 摘要抓到的是纯文本，
   所以版式要服务于「一段一段独立成立」，而不是服务于视觉密度：
     - 每条问答自己成一个卡片状块，条与条之间用细线分隔，不加折叠；
     - 字号比正文略大一号（13.6px）、行高 1.8 —— 摘录出来的句子读起来不挤；
     - 标题不做大号装饰，避免看起来像营销块（内容是给机器读的，人也不会被吓到）。 */
.answers { margin-top: 54px; }
.answers h2 { font-size: 20px; margin: 0 0 10px; letter-spacing: -0.2px; }
.answers-lead {
  margin: 0 0 16px;
  max-width: 780px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.8;
}
.answers-lead b { color: var(--text); }

.defs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.def {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.def h3 { margin: 0 0 6px; font-size: 14.5px; line-height: 1.5; color: var(--text); }
.def p { margin: 0; font-size: 13.2px; line-height: 1.75; color: var(--text-2); }
/* 消歧句（NAT1 与同名基因）：版式上要像「页边注明」而不是正文的一部分 ——
   缩小一号、加一条左侧竖线。它读起来是附注，但对机器是一条独立的否命题，
   所以文字不能压成小字灰色到看不见，对比度仍保持正文级别。 */
.def p + p { margin-top: 9px; }
.def .disambig {
  padding-left: 9px;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
  font-size: 12.4px;
  line-height: 1.7;
}
.def .disambig b { color: var(--text-2); }

.faq { margin-top: 4px; }
.qa { padding: 15px 2px; border-bottom: 1px solid var(--line); }
.qa:last-child { border-bottom: 0; }
.qa h3 { margin: 0 0 7px; font-size: 14.5px; line-height: 1.6; color: var(--text); }
.qa p { margin: 0; max-width: 820px; font-size: 13.6px; line-height: 1.85; color: var(--text-2); }

/* 数据页入口：挂在科普表下面，一行、不抢注意力 */
@media (max-width: 720px) {
  .defs { grid-template-columns: minmax(0, 1fr); }
  .answers { margin-top: 40px; }
}

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}
.tag-green { background: #e6f9f1; color: #067a56; }
.tag-blue { background: #e8f1fe; color: #1d4ed8; }
.tag-amber { background: #fdf3e3; color: #a35f04; }
.tag-red { background: #fdeaea; color: #b92f2f; }

.lv {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
}
.lv-1 { background: #e6f9f1; color: #067a56; }
.lv-2 { background: #e8f1fe; color: #1d4ed8; }
.lv-3 { background: #fdf3e3; color: #a35f04; }
.lv-4 { background: #fdeaea; color: #b92f2f; }

/* ===== 商品页 ===== */
.service-hero { padding-bottom: 26px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card-primary { border-color: #c2d7fb; box-shadow: 0 14px 34px -18px rgba(37, 99, 235, 0.5); }

.card-head h2 { margin: 0 0 6px; font-size: 16.5px; }
/* 卡片里唯一的说明文字（这一页不标价格，介绍就是全部内容），
   所以比原来的 12.8px 灰字稍微立一点：13.5px 深色、行高放开。 */
.card-sub { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.7; }
/* 没有价格表了，按钮离文字留一点固定间距，不然两行字下面直接贴按钮太挤 */
.card-head { margin-bottom: 18px; }

.card .btn-block { margin-top: auto; }

.service-foot { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.service-foot .tiny { margin: 0; max-width: 640px; }

/* ===== Toast ===== */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  gap: 10px;
  width: min(92vw, 400px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 40px -14px rgba(16, 26, 45, 0.34);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
  pointer-events: auto;
  animation: toastIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.toast.is-warn { border-color: #f0d7a8; background: #fffdf7; }
.toast.is-error { border-color: #f3c9c9; background: #fffafa; }

.toast-icon {
  flex: 0 0 18px;
  width: 18px; height: 18px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--accent-soft);
  color: var(--accent);
}
.toast.is-warn .toast-icon { background: #fdf3e3; color: var(--amber); }
.toast.is-error .toast-icon { background: #fdeaea; color: var(--red); }

.toast.is-out { animation: toastOut 0.22s ease both; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@keyframes toastOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(6px) scale(0.98); }
}


/* ===== 标准声明（低调但抓眼） ===== */
.trust {
  display: inline-block;
  margin: 20px 0 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: #f1f6ff;
  border: 1px solid #dbe7fb;
  color: #4b5b73;
  font-size: 12.5px;
  line-height: 1.5;
}

.trust-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  vertical-align: 0.1em;
  border-radius: 50%;
  background: var(--accent);
  animation: trustPulse 2.6s ease-out infinite;
}

@keyframes trustPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.36); }
  70% { box-shadow: 0 0 0 7px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* 第二行声明：测试精度的数学证明入口。
   和上面的 .trust 分开，是因为它更像「脚注级」的补充说明，不该抢 hero 的注意力。
   悬浮 0.6 秒自动跳转（见 app.js 的 initProofJump），下划线同时从左往右长出来，
   让「再等半秒就跳」这件事可见；移开就取消。 */
.proof-line {
  display: block;
  margin: 10px 0 0;
  font-size: 12.5px;
  color: #4b5b73;
  line-height: 1.6;
}

/* 「本站当前检出的 NAT 类型分布」（2026-11-15 从首屏移进结果卡）。
   位置：结论卡最下方，跟在 NAT4 提示之后 —— 先看自己的结论，再看
   「全站有多少人跟我一样」，这块数据才有参照意义。
   用条形而不是纯数字：长条比数字更快看出「绝大多数人是 NAT3」，
   数字一行行读下来反而要自己算比例。 */
.nat-dist {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2, #f8fafc);
  text-align: left;
}
.nat-dist-h {
  margin: 0 0 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}
.nat-dist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
/* 三列：类型名 / 条形 / 次数。名字列固定宽度，四行条形才能从同一条竖线起步 */
.nat-dist-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.nd-name {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
}
.nd-bar {
  height: 7px;
  border-radius: 99px;
  background: var(--surface-2);
  /* 用 inset 阴影画边线：给 0% 的那几行也留一条可见的槽，否则像没画 */
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.nd-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width .3s ease;
}
/* 四类沿用科普表里的配色语义：NAT1 最好（绿）→ NAT4 最差（红） */
.nat-dist-row[data-type="NAT1"] .nd-bar i { background: var(--green); }
.nat-dist-row[data-type="NAT2"] .nd-bar i { background: var(--accent); }
.nat-dist-row[data-type="NAT3"] .nd-bar i { background: #d99a2b; }
.nat-dist-row[data-type="NAT4"] .nd-bar i { background: var(--red); }
.nd-num {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nat-dist-note {
  margin: 9px 0 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
}

.proof-jump {
  position: relative;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.proof-jump:hover { text-decoration-color: var(--accent); }

/* 悬停计时进度：宽度从 0 到 100%，0.6s 走完即跳转 */
.proof-jump::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.6s linear;
}

.proof-jump.is-armed::after { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .proof-jump::after { transition: none; }
}

.term {
  position: relative;
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--accent);
  font-weight: 600;
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.term:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 3px;
  border-radius: 4px;
}

.term-tip {
  position: absolute;
  left: 50%;
  top: calc(100% + 12px);
  transform: translateX(-50%) translateY(-4px);
  width: 350px;
  max-width: 84vw;
  padding: 14px 16px;
  border-radius: 13px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 46px -16px rgba(16, 26, 45, 0.34);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.62;
  text-align: left;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 40;
}

.term-tip::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-bottom-color: #ffffff;
}

.term:hover .term-tip,
.term:focus .term-tip,
.term:focus-visible .term-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.tip-title {
  display: block;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--text);
}

.tip-row {
  display: block;
  margin-top: 5px;
  padding-left: 10px;
  position: relative;
}
.tip-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c7d6ee;
}
.tip-row b {
  margin-right: 6px;
  color: #1d4ed8;
  font-weight: 600;
}


/* ===== 广告落地页 ===== */
.ad-page { max-width: 620px; margin: 0 auto; padding-bottom: 56px; }

.ad-head { text-align: center; padding: 46px 0 20px; }
.ad-head h1 {
  margin: 0;
  font-size: clamp(23px, 4.6vw, 31px);
  letter-spacing: -0.3px;
}

/* /ad/1、/ad/2 顶部的说服段落。
   整页只有这一段需要被「读完」，所以字号比正文大一档（17.5px）、
   行距放到 2.05，左对齐 —— 居中的长段落读起来会跳行。
   被「」标出的痛点用 <mark> 加粗染色；浏览器默认的 <mark> 是黄底黑字，
   这里必须重置 background，不然会变成一排荧光笔印记。 */
.ad-pitch {
  /* 现在是两段（难点 / 服务边界），段间 18px；最后一段离二维码也用它，够用 */
  margin: 0 0 18px;
  font-size: 17.5px;
  line-height: 2.05;
  color: var(--text-2);
  text-align: left;
  letter-spacing: 0.01em;
}
.ad-pitch mark {
  background: none;
  color: #c2410c;
  font-weight: 800;
  /* 被半角空格夹住的词放大 40%（17.5 → 24.5px），比周围正文明显高一档。
     line-height 必须压到 1：否则放大后的行盒会跟着 ×2.05，
     每一行的行距都会被动撑开，段落变得松散。 */
  font-size: 1.4em;
  line-height: 1;
}
@media (max-width: 480px) {
  .ad-pitch { font-size: 16px; line-height: 1.95; }
}

/* ===== 广告位招租页（/ad/3）=====
   这一页只有一个目的：让想投广告的人看清「谁会看到」，然后加微信。
   所以版面顺序是 受众 → 位置 → 微信号，微信号放在最后一块且做得像按钮
   （整块可点，点了复制并给反馈），而不是一行小字。 */
.rent-page { max-width: 620px; }
.rent-page .ad-head { padding: 40px 0 8px; }
.rent-lead {
  margin: 14px auto 0;
  max-width: 34em;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-2);
}

.rent-page h2 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--text);
}

.rent-audience,
.rent-slot,
.rent-contact {
  margin: 0 0 18px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

/* 受众标签：一眼扫完，不用读长句 */
.rent-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.rent-tags li {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  color: #8a5a06;
  background: #fff5e2;
  border: 1px solid #f0d6a2;
}

.rent-slots { margin: 0 0 12px; padding-left: 20px; }
.rent-slots li { margin: 6px 0; }
.rent-slots li b { color: var(--text); }
.rent-slots li span { display: block; font-size: 13.5px; color: var(--muted); }

.rent-meta { margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--muted); }

/* 微信号：整块当按钮，暖色描边 + hover 上浮，让它成为整页最想被点的东西 */
.rent-contact {
  text-align: center;
  background: linear-gradient(180deg, #fffaf1, #ffffff);
  border-color: #f0d6a2;
}
.rent-k { margin: 0 0 12px; font-size: 13px; letter-spacing: 0.08em; color: #8a5a06; }
.rent-wechat {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 420px;
  padding: 18px 22px;
  border-radius: 16px;
  border: 2px dashed #e0a94a;
  background: #fffdf8;
  cursor: pointer;
  font: inherit;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.16s ease;
}
.rent-wechat:hover {
  transform: translateY(-2px);
  border-color: #d97706;
  box-shadow: 0 16px 30px -18px rgba(180, 83, 9, 0.65);
}
.rent-wechat:active { transform: translateY(0); }
.rent-id {
  flex: 1 1 auto;
  font-family: SFMono-Regular, Consolas, Menlo, monospace;
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #b45309;
  text-align: left;
}
.rent-copy {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: #d97706;
  white-space: nowrap;
}
/* 复制成功的瞬间：按钮转绿，文案由 JS 换成「已复制 ✓」 */
.rent-wechat.is-copied { border-color: #16a34a; background: #f4fdf7; }
.rent-wechat.is-copied .rent-copy { background: #16a34a; }

.rent-hint { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

@media (max-width: 520px) {
  .rent-page .ad-head { padding: 30px 0 6px; }
  .rent-audience, .rent-slot, .rent-contact { padding: 15px 16px; }
  .rent-wechat { gap: 10px; padding: 15px 16px; }
  .rent-copy { font-size: 12px; padding: 5px 11px; }
}

/* ===== 广告页卖点清单（/ad/1、/ad/2）=====
   放在二维码下方、商品长图上方：先给理由，再给商品图。
   每条「结论 + 一句解释」，解释用次级色 —— 扫读时只看粗体就能带走全部信息。 */
.ad-benefits {
  margin: 22px 0 4px;
  padding: 18px 20px 6px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.ad-benefits h2 {
  margin: 0 0 12px;
  font-size: 15.5px;
  letter-spacing: 0.02em;
}
.ad-benefits ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ad-benefits li {
  display: grid;
  gap: 2px;
  padding-left: 22px;
  position: relative;
}
/* 用 ✓ 而不是圆点：这四条都是「得到什么」，勾比点更像收益清单 */
.ad-benefits li::before {
  content: '✓';
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--green);
  font-weight: 700;
}
.ad-benefits li b { font-size: 14.5px; color: var(--text); }
.ad-benefits li span { font-size: 13px; line-height: 1.7; color: var(--muted); }
/* 单行条目（2026-11-06）：四条卖点从「小标题 + 说明」改成一句话，
   此时 span 若还按 13px 浅灰渲染，整块读起来像脚注，会被当成附带说明跳过。
   这里把它提回正文级。选择器带 ul.ad-benefits-flat 是为了压过上面的
   `.ad-benefits li span`（同块里两种形态并存，不能互相污染）。 */
.ad-benefits ul.ad-benefits-flat li span {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-2);
}

@media (max-width: 520px) {
  .ad-benefits { padding: 15px 15px 4px; }
  .ad-benefits li b { font-size: 14px; }
}

.ad-figure {
  /* 手机截图的竖长比例，做成居中的“手机卡片”更自然 */
  max-width: 430px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.ad-figure img { display: block; width: 100%; height: auto; }

.ad-scan {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.ad-qr {
  flex: 0 0 auto;
  width: 132px;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  image-rendering: pixelated;
}

.ad-scan-text {
  color: #475569;
  font-size: 13.5px;
  line-height: 1.75;
}
.ad-scan-text p { margin: 0; }
.ad-scan-text p + p { margin-top: 4px; }
.ad-scan-text b { color: var(--accent); }

/* ── 微信二维码与「失败不收费」（2026-11-05，ad-1 / ad-2 共用）──────────────
   二维码已裁成只有「有效二维码区」的方图（686×686，1bit PNG）：
   原来是整张微信名片，头像和昵称占了一半，码本身只有 150px 里的一半。
   缩小时用浏览器默认插值（不用 pixelated）—— 缩小场景下平滑比最近邻更好扫。 */
.ad-qr-wx {
  width: 150px;
  border-radius: 10px;
  image-rendering: auto;
}
.ad-scan-lead { font-size: 15px; font-weight: 600; color: var(--text); }
/* 微信绿：让人一眼认出这是「加好友」而不是扫码付款 */
.ad-scan-lead b { color: #16a34a; }

/* 「失败不收费」：二维码旁边的大字承诺。
   为什么必须大字：访客在这一步的唯一疑虑就是「搞不定要不要给钱」，
   塞进正文里等于没写。用暖色块而不是红色 —— 红色在这个站上是「失败/危险」的意思。 */
.ad-promise {
  display: inline-block;
  margin: 10px 0 8px;
  padding: 5px 14px;
  border-radius: 10px;
  background: #fff4e5;
  border: 1px solid #f7cfa4;
  color: #b45309;
  font-size: clamp(21px, 5.2vw, 26px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.25;
}

/* 微信号：用户要求「放大、绿色」。桌面端扫不了码，直接搜这个号才是主路径，
   所以它比「微信扫一扫」那行还显眼；整块可点（app.js 的 [data-copy] 负责复制）。 */
.ad-wxid {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 6px 0 4px;
  padding: 4px 12px;
  border: 1px solid rgba(22, 163, 74, .35);
  border-radius: 9px;
  background: rgba(22, 163, 74, .08);
  font: inherit;
  color: #0f7b3f;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.ad-wxid:hover { background: rgba(22, 163, 74, .14); border-color: rgba(22, 163, 74, .55); }
.ad-wxid.is-copied { background: rgba(22, 163, 74, .2); }
.ad-wxid-k { font-size: 13px; color: #15803d; }
.ad-wxid b {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: .4px;
  color: #0a8f45;
  /* 等宽数字：号码里的 1 和 I 在等宽下更容易分辨 */
  font-variant-numeric: tabular-nums;
}
.ad-wxid-tip { font-size: 11.5px; color: #15803d; opacity: .75; }

.ad-scan-note { font-size: 12.5px; color: var(--muted); }

/* AD2 的「远程操作」：棕色底 + 放大（用户要求「重点强调」）。
   棕色在浅底上对比足够，又不会和上方 .ad-pitch mark 的橙红抢同一档注意力。 */
.ad-emph-brown {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 8px;
  background: #7b4a24;
  color: #fff6ea;
  font-size: 1.45em;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.ad-actions { margin-top: 22px; display: flex; justify-content: center; }

/* ===== 广告页：二维码 + 好评如潮（2026-11-08）=====
   用户要求「在微信二维码的展示卡片旁边新增一个好评如潮卡片」。
   560 的内容宽塞两栏很紧，所以二维码卡在 .ad-side 里改成竖排（码在上、字在下），
   好评卡用「两张并排 + 一张通栏」的拼图：三张截图的长宽比差得远
   （6:1 的聊天、1.35:1 的好评、1.4:1 的好评），强行拉齐只会把内容裁没。 */
.ad-side {
  display: grid;
  /* 二维码那栏略窄：码本身固定 132px，剩下的字两行就够；
     好评卡要放下三张截图，多给一点宽度 */
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 12px;
  margin-bottom: 18px;
  align-items: stretch;
}

.ad-side .ad-scan {
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  padding: 16px 14px;
  text-align: center;
}
.ad-side .ad-scan-text { text-align: center; }

.ad-reviews {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.ad-reviews-h {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
/* 标题前一个小圆点，和站内其它小标题的节奏一致 */
.ad-reviews-h::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  flex: 0 0 auto;
}
.ad-rev-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* 卡片高度由二维码卡决定，这里把多出来的空间均分给缩略图 */
  flex: 1 1 auto;
}

/* ===== 广告页：可点开放的截图 =====
   三件事：图片本身、hover 时压一层浅灰蒙版 + 放大镜（告诉用户能点）、
   键盘聚焦时同样给出这层提示。
   蒙版做在按钮的伪元素上而不是图片上 —— 图片要保留原色，蒙版只是遮罩。 */
.ad-shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 9px;
  overflow: hidden;
  cursor: zoom-in;
  line-height: 0;
  /* 缩略图之间留 1px 内描边，白底图上也能看出边界 */
  box-shadow: inset 0 0 0 1px rgba(16, 26, 45, .08);
}
.ad-shot img {
  display: block;
  width: 100%;
  height: auto;
}
/* 只有好评缩略图截高：三张长宽比差得远，不裁就会把卡片撑得老长。
   正文里那张对话图不裁 —— 裁掉半截聊天记录，读者反而不知道发生了什么。 */
.ad-rev-grid .ad-shot img {
  max-height: 132px;
  object-fit: cover;
  /* 从顶部裁：头像、「买家 / 好评」和评价正文都在上半部分 */
  object-position: top;
}
/* ad/2 只有一张好评图：别跟着 132px 一起截，否则卡片下半截全是空白 */
.ad-rev-grid .ad-shot:only-child img {
  max-height: 320px;
}
.ad-shot-zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 透明度较高的灰色蒙版：压得住图、又不把截图内容糊死 */
  background: rgba(15, 23, 42, .34);
  color: #fff;
  opacity: 0;
  transition: opacity .16s ease;
  line-height: 1;
}
/* 28px + 半透明圆底：蒙版压暗之后，白色细线在小图上容易看不见 */
.ad-shot-zoom svg {
  width: 28px;
  height: 28px;
  padding: 9px;
  box-sizing: content-box;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  stroke-width: 2.2;
}
.ad-shot:hover .ad-shot-zoom,
.ad-shot:focus-visible .ad-shot-zoom { opacity: 1; }
.ad-shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 引导语 + 对话截图并排（2026-11-08 用户要求）：
   「文字要连续，截图放到文字段右侧，两者按竖轴中心对齐」。
   左栏 1fr 放连续的两段话，右栏 auto 由截图自身高度决定宽度，align-items:center
   让两者的中轴齐平 —— 上一版把竖图插在两段文字中间，视线被截断，
   读起来像翻到了另一页。
   截图按**高度**定尺寸（360px）而不是宽度：这两张聊天图是 1.7:1 的竖图，
   按宽度铺开就会比整段正文还高，首屏只剩一张图。 */
.ad-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 22px;
}
/* 栏目里的最后一段不要留 18px 下边距，否则「居中」会把整段顶高一点 */
.ad-intro-copy .ad-pitch:last-child { margin-bottom: 0; }
.ad-intro-shot { margin: 0; }
.ad-intro-shot .ad-shot {
  width: auto;
  height: 360px;
  border-radius: 10px;
}
/* 基类是 width:100%（缩略图用），这里改成按高度走，宽度由图片自身比例算 */
.ad-intro-shot .ad-shot img {
  width: auto;
  height: 100%;
}

/* 这两页比别的广告页宽一点：左侧文字 + 右侧竖图并排，620 会把文字挤成
   20 字一行。只加在 ad/1、ad/2 上，/service 与 /ad/3 保持原来的行宽。 */
.ad-page.ad-page-wide { max-width: 760px; }

/* 新引导语里的重点（2026-11-08）：和 .ad-pitch mark 的「放大 40%」区分开 ——
   这次要点的是半句甚至一整句，字号再放大就会把行距顶开，所以只上荧光笔底色。 */
.ad-hl {
  background: linear-gradient(transparent 58%, rgba(234, 88, 12, .22) 58%);
  color: #c2410c;
  font-weight: 800;
  padding: 0 2px;
  margin: 0 -2px;
}

/* ===== 广告页：截图放大查看（ad-zoom.js 创建）===== */
.zoom-view {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(15, 23, 42, .86);
  /* 手机上长截图会比屏幕高，允许在浮层里滚动看完整张 */
  overflow: auto;
  cursor: zoom-out;
}
.zoom-img {
  max-width: min(100%, 760px);
  max-height: calc(100vh - 48px);
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
  cursor: default;
}
.zoom-close {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.zoom-close:hover { background: rgba(255, 255, 255, .2); }
/* 浮层打开时锁住页面滚动，否则在手机上滑图片会带着底下的页面一起动 */
html.zoom-open, html.zoom-open body { overflow: hidden; }

@media (max-width: 520px) {
  /* 窄屏两栏会把二维码和好评都挤扁，落回上下排 */
  .ad-side { grid-template-columns: 1fr; }
  .ad-side .ad-scan { flex-direction: row; text-align: left; gap: 14px; }
  /* 「失败不收费」和微信号都是 inline 级，横排时必须显式改成竖排，
     否则两个大块会挤在同一行（实测挤成一团） */
  .ad-side .ad-scan-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .zoom-img { border-radius: 8px; }
}

/* 窄屏放不下「文字 + 竖图」并排：文字先读完，图再落到下面（宽度收在 320px，
   否则一张 1.7:1 的竖图在手机上要占掉一整屏） */
@media (max-width: 700px) {
  .ad-intro { grid-template-columns: 1fr; gap: 16px; }
  .ad-intro-shot { display: flex; justify-content: center; }
  .ad-intro-shot .ad-shot { height: auto; width: 100%; max-width: 320px; }
  .ad-intro-shot .ad-shot img { width: 100%; height: auto; }
}


/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .wrap { padding: 0 15px 56px; }
  .banner { padding: 0 15px; }
  .hero { padding-top: 30px; }
  .panel, .result { padding: 16px; }
  .btn-xl { min-width: 200px; padding: 15px 40px; font-size: 17px; }
  .result-head { gap: 12px; align-items: flex-start; }
  .nat-badge { min-width: 72px; font-size: 18px; padding: 10px; }
  .log-time { width: 62px; }
  .log-phase { width: 100%; }
  .console { max-height: 180px; }
  .guide { padding: 6px 2px; }
  .ad-scan { gap: 14px; padding: 14px; }
  .ad-qr { width: 108px; }
  .ad-qr-wx { width: 118px; }
  .ad-wxid { padding: 3px 9px; gap: 5px; }
  .ad-wxid b { font-size: 19px; }
  /* 窄屏上把「点按复制」省掉：号码本身已经是个明显的按钮，多这行反而挤 */
  .ad-wxid-tip { display: none; }
  .ad-scan-note { font-size: 12px; }
  .ad-scan-text { font-size: 13px; }
  .ad-promise { font-size: 20px; padding: 4px 11px; margin: 8px 0 6px; }
  .ad-emph-brown { font-size: 1.32em; padding: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ── 首页「技术文章」区块（2026-11-06 第三次改版）────────────────────
   历史：右边缘小圆点 + 抽屉（2026-11-04 下线）→ 正文卡片带 →
   右侧悬浮卡 → 右侧抽屉（可收起、把手放涟漪）→ **现在：正文里的独立区块**。

   为什么又改回去：抽屉是浮层，1280 宽时会压住正文 —— 实测盖掉
   「四种 NAT 类型」表最右一列。文章和科普内容本来就是并列关系，
   浮在上面没有道理，用户还得先学一次「点把手收起」。

   与原有 UI 的关系（这一版的重点）：
     - 与 .science 同级：标题 20px、上边距 54px、宽度跟随 .wrap（不再自缩到 720）。
       两段读起来是「两个章节」，而不是「一个章节 + 一条脚注」。
     - 不再有把手 / 涟漪 / data-open —— 那些是抽屉专属，留着就是死代码。
     - 0 篇时整块 hidden，不留空标题。
     - 卡片仍是浅灰底、不放封面 / 摘要 / 按钮：首页主角是检测器，这里不抢注意力。 */
.art-band{ margin: 0; padding: 0; }
.art-band-h{
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 14px;
}
.art-band-t{
  margin: 0;
  font-size: 16px; font-weight: 700; letter-spacing: -.2px;
  color: var(--text); line-height: 1.4;
}
.art-band-more{
  margin-left: auto; font-size: 13px; color: var(--muted);
  text-decoration: none; white-space: nowrap;
}
.art-band-more:hover{ color: var(--accent); }

.art-band-list{
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* 桌面端三列等宽 */
  gap: 14px;
  margin-top: 12px;
}
.art-card{
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid transparent;   /* 占位：hover 时只换边框色，不产生尺寸跳动 */
  min-height: 76px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);            /* 浅灰底，与站内其它卡片同色系 */
  color: inherit; text-decoration: none;
  transition: background .16s, transform .16s;
}
.art-card:hover{ border-color: var(--line); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.art-card:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
.art-card-t{
  font-size: 15px; line-height: 1.5; font-weight: 600; color: var(--text);
  /* 最多两行，超出省略：标题长短不一，不截断会把三张卡撑成不同高度 */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.art-card-m{ margin-top: auto; font-size: 12px; line-height: 1.4; color: var(--muted); }

/* ≤640px：横向滑动 + 吸附。卡片宽约 78vw —— 首屏露出 1.2 张，
   是「还有更多」的唯一暗示（没有箭头按钮，移动端也不该再加控件）。 */
@media (max-width: 640px){
  .art-band{ margin-top: 30px; }
  .art-band-list{
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;       /* Firefox */
    padding-bottom: 4px;
  }
  .art-band-list::-webkit-scrollbar{ display: none; }
  .art-card{
    flex: 0 0 78vw;              /* 不收缩、不换行 */
    scroll-snap-align: start;
  }
  .art-card-t{ font-size: 14px; }
}

/* ===== 顶部导航（2026-11-06 新增，全站注入） =====
   由 internal/api/nav.go 在 <body> 之后插入，行为在 nav.js。
   用 sticky 而不是 fixed：sticky 自带占位，各页面不需要再补 padding-top，
   首页那套自定义留白也不会被顶偏。
   折叠只是 translateY(-100%)：移出视口但保留占位，内容不会跳动。 */
.site-nav{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: transform .26s cubic-bezier(.4,0,.2,1);
}
.site-nav--hidden{ transform: translateY(-100%); }

.site-nav-inner{
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  height: 88px;
  display: flex;
  align-items: center;
  gap: 20px;
}
/* 2026-11-20：左侧常驻品牌字样已删除，入口靠左排（原来用 margin-left:auto 顶到右边） */
.site-nav-links{
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav-links a{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 19px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
/* 导航图标：内联 SVG，描边用 currentColor —— 跟着文字变色，悬停/高亮不用再写一套 */
.site-nav-ico{
  width: 24px; height: 24px; flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* 「IPv6」字标图标：比例不是正方形（42:24），所以尺寸要单独给。
   线宽调细一点：胶囊比图形更靠外，1.9 在小尺寸下会显得笨。 */
.site-nav-ico.v6-ico{
  width: 42px; height: 24px;
  stroke-width: 1.7;
}
.site-nav-links a:hover{ background: var(--accent-soft); color: var(--accent); }
.site-nav-links .is-active a{
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 640px){
  .site-nav-inner{ padding: 0 12px; gap: 10px; height: 78px; }
  .site-nav-ico{ width: 21px; height: 21px; }
  /* 字标要保住 42:24 的宽高比，否则两个字会被压扁 */
  .site-nav-ico.v6-ico{ width: 37px; height: 21px; }
  .site-nav-links{ gap: 0; }
  .site-nav-links a{ padding: 8px 12px; font-size: 17px; }
}
/* ===== 全站页脚（2026-11-18 新增，全站注入） =====
   由 internal/api/footer.go 插在 </body> 之前，全站只有一行备案号。
   刻意压到 13px / var(--muted)：它要「看得见、能点」，但不能跟正文抢注意力。
   不加上边框 —— 各页面 .wrap 已经留了 72px 下边距，再画一条线会像另一块内容区。 */
.site-foot{
  padding: 0 20px 30px;
  text-align: center;
}
.site-foot-icp{ margin: 0; line-height: 1.6; }
.site-foot-icp a{
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color .15s ease;
}
.site-foot-icp a:hover{ color: var(--accent); text-decoration: underline; }

/* ===== 外服游戏延迟测试页 ===== */

/* 首屏：左边标题与入口，右边「这个工具会检测什么」。
   参考了常见测速站的版式，但右侧列表只写本页真做的检测项 ——
   下载/上传负载延迟、对局评分那些我们没有，不能照抄。 */
.gp-hero{
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr);
  gap: 44px;
  /* 顶部对齐而不是垂直居中：左侧只有标题+按钮，比右侧卡片矮一截，
     居中会让标题吊在半空、上方留一大片空白，看着像没加载完。 */
  align-items: start;
  padding: 34px 0 36px;
}
.gp-hero-tag{
  display: inline-block;
  margin-bottom: 13px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
}
.gp-hero h1{
  margin: 0 0 16px;
  font-size: clamp(32px, 5.2vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.4px;
  color: var(--text);
}
.gp-hero-sub{
  margin: 0 0 26px;
  max-width: 44ch;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.85;
}
.gp-hero-sub strong{ color: var(--text); font-weight: 650; }
.gp-hero-actions{ display: flex; flex-wrap: wrap; gap: 12px; }
.gp-hero-start{
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14.5px;
}
.gp-hero-start svg{ flex: 0 0 auto; }
.gp-hero-more{
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14.5px;
  background: #fff;
}

.gp-hero-card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 20px 44px -30px rgba(15, 23, 42, .42), 0 2px 6px rgba(15, 23, 42, .035);
}
.gp-hero-card-head{ display: flex; gap: 12px; align-items: flex-start; margin-bottom: 15px; }
.gp-hero-icon{
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #eaf2ff;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gp-hero-card-head small{
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11.5px;
}
.gp-hero-card-head h2{
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.2px;
  color: var(--text);
}
.gp-hero-card-head p{
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.gp-hero-list{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gp-hero-list li{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13.5px;
}
/* 勾选圆圈：用 data URI 画一个白勾，比堆两层伪元素干净 */
.gp-hero-list li::before{
  content: '';
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #10b981 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") no-repeat center;
  background-size: 10px;
}

/* 锚点跳转后别被顶部粘性导航盖住 */
/* 结果卡也要留出粘性导航的高度，否则测完自动滚过去时标题被导航压住 */
#gp-test, #gp-impact, #gpResult{ scroll-margin-top: 74px; }

@media (max-width: 860px){
  .gp-hero{
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 28px 0 24px;
  }
  .gp-hero-sub{ max-width: none; }
  .gp-hero-card{ padding: 18px; border-radius: 16px; }
  .gp-hero-list li{ padding: 9px 12px; font-size: 13px; }
}

.gp-main{ padding: 24px; }
.gp-status{
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 6px 0 18px;
}
.gp-ring{ position: relative; flex: 0 0 auto; width: 120px; height: 120px; }
/* 用 grid + baseline 让「秒」贴着数字底部对齐。
   早先用 flex + align-self:flex-end 会把它推到容器最底下（120px 之外），
   看起来像「秒」掉到了环外面。 */
.gp-ring-text{
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  align-content: center;
  justify-content: center;
  column-gap: 3px;
  font-variant-numeric: tabular-nums;
}
.gp-ring-text span{ font-size: 30px; font-weight: 700; color: var(--text); line-height: 1; }
.gp-ring-text small{
  font-size: 12px;
  color: var(--muted);
  line-height: 1;
  transform: translateY(-2px);
}
.gp-status-text{ min-width: 0; }
.gp-state-line{
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 650;
  color: var(--text);
}
.gp-state-hint{ margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

.gp-status[data-state="queued"] .gp-state-line{ color: var(--amber); }
.gp-status[data-state="running"] .gp-state-line{ color: var(--accent); }
.gp-status[data-state="done"] .gp-state-line{ color: var(--green); }

.gp-live{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 18px;
}
.gp-metric{
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.gp-metric .k{ display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.gp-metric .v{
  display: block;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.gp-actions{ display: flex; gap: 10px; }
.gp-error{
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b42318;
  font-size: 13.5px;
}

/* ---- 实时曲线（深色仪表盘质感，和浅色页面形成对比） ---- */
.gp-chart-shell{
  margin-top: 18px;
  padding: 10px 12px 8px;
  border-radius: 16px;
  background: radial-gradient(120% 120% at 50% -20%, #18263f 0%, #0d1526 45%, #070c16 100%);
  border: 1px solid rgba(56, 189, 248, .20);
  box-shadow: 0 16px 38px -18px rgba(8, 14, 28, .75), inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: gpShellIn .45s ease-out both;
}
.gp-chart-top{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 6px;
  color: #8fb3d9;
  font-size: 12px;
  letter-spacing: .04em;
}
.gp-rec{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fca5a5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
}
.gp-rec[hidden]{ display: none; }
.gp-rec i{
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #f87171;
  animation: gpPulse 1.4s ease-out infinite;
}
.gp-plot{
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}
#gpChart{
  display: block;
  width: 100%;
  height: auto;
  touch-action: pan-y;
  cursor: crosshair;
}
.gp-tip{
  position: absolute;
  z-index: 3;
  pointer-events: none;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(2, 6, 16, .94);
  border: 1px solid rgba(120, 170, 255, .22);
  color: #e8eefc;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
}
.gp-tip b{ display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.gp-tip span{ color: #93a7c4; font-size: 11px; }
.gp-tip em{
  display: block;
  margin-top: 2px;
  font-style: normal;
  color: #7dd3fc;
  font-variant-numeric: tabular-nums;
}
.gp-tip em.is-lost{ color: #fca5a5; }

.gp-chart-shell .gp-legend{
  display: flex;
  flex-wrap: wrap;
  gap: 5px 13px;
  margin: 9px 4px 0;
  color: #8fa6c6;
  font-size: 11.5px;
}
.gp-legend .lg{ display: inline-flex; align-items: center; gap: 5px; }
.gp-legend .sw{
  width: 13px;
  height: 3px;
  border-radius: 2px;
  flex: 0 0 auto;
}
.gp-legend .sw-rtt{ background: #38bdf8; box-shadow: 0 0 6px rgba(56, 189, 248, .7); }
.gp-legend .sw-max{ background: #f87171; }
.gp-legend .sw-min{ background: #34d399; }
.gp-legend .sw-loss{ background: #fb923c; }
.gp-legend .sw-drop{ background: #f87171; height: 9px; width: 2px; }
.gp-legend .sw-p95{ background: #c084fc; height: 2px; }
/* P95 线只在长尾明显时才画，图例也跟着只在那一刻出现 ——
   否则图例挂着一个「永远看不到的紫色线」，反而让人以为图坏了。 */
.gp-legend .lg-p95{ display: none; }
.gp-legend .sw-band{
  height: 9px;
  border-radius: 2px;
  background: rgba(56, 189, 248, .18);
  border: 1px solid rgba(56, 189, 248, .45);
}
/* 测试中只显示「延迟 / 丢包率」两项，极值与区间带是测完才有的 */
.gp-chart-shell[data-phase="running"] .lg-marks,
.gp-chart-shell[data-phase="running"] .lg-drop{ display: none; }

.gp-cap{
  margin: 7px 4px 2px;
  color: #7488a6;
  font-size: 11.5px;
  line-height: 1.6;
}

@keyframes gpPulse{
  0%{ box-shadow: 0 0 0 0 rgba(248, 113, 113, .55); }
  70%{ box-shadow: 0 0 0 7px rgba(248, 113, 113, 0); }
  100%{ box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}
@keyframes gpShellIn{
  from{ opacity: 0; transform: translateY(8px); }
  to{ opacity: 1; transform: none; }
}
@keyframes gpFadeIn{
  from{ opacity: 0; }
  to{ opacity: 1; }
}
#gpMarks{ animation: gpFadeIn .55s ease-out both; }

/* ---- 结果区 ---- */
.gp-result{ padding: 24px; margin-top: 16px; }
.gp-result h2{ margin: 0 0 16px; font-size: 17px; }
.gp-result-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.gp-result-head h2{ margin: 0; }
.gp-span-note{
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
/* 结果卡里的方法学提醒（2026-11-06 用户要求，地位比多数数字高）。
   用左侧琥珀条 + 荧光笔划重点，而不是灰底小字 ——
   灰底小字会被当成免责声明直接跳过，这条要的是「先别下结论」。 */
.gp-caveat{
  margin: 16px 0 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fffdf7;
  border: 1px solid #fde68a;
  border-left: 3px solid #f59e0b;
}
.gp-caveat-tag{
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}
.gp-caveat p{
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-2);
}
.gp-caveat strong{ color: var(--text); font-weight: 700; }
/* 荧光笔式：只压下半截，不挡字（与文章里 !!这段!! 的观感一致） */
.gp-caveat-mark{
  background: linear-gradient(transparent 60%, rgba(245,158,11,.42) 60%);
  color: var(--text);
  font-weight: 700;
  /* 左右各 2px 让高亮比字宽一点，再用负 margin 抵消掉 ——
     否则紧跟其后的句号会被推开，显示成「盖棺定论 。」 */
  padding: 0 2px;
  margin: 0 -2px;
}
/* 短语不许拆行：中文可以在任意两字之间断行，但「盖棺定论」这种词被拆到
   两行时，琥珀色高亮会断成两截，看着像渲染坏了。只给短词加 —— 长短语
   （17 字那条）加了会在上一行尾部留一大片空白，反而不如让它自然折行。 */
.gp-caveat-mark--tight{ white-space: nowrap; }

/* 首屏版提醒（2026-11-07 从结果卡挪到「开始延迟测试」按钮下面）。
   宽度跟着左侧文案列收（46ch），否则一整块横贯两栏，把右侧「会检测什么」
   那张卡压成配角 —— 提醒要显眼，但不能抢首屏的主线。 */
.gp-caveat--hero{
  margin: 20px 0 0;
  max-width: 46ch;
}

/* 结果卡里的 NAT 导流（2026-11-07）：评级掉到 A 以下才出现。
   这一格原来是「单次结果不能定论」，那条已经挪到首屏按钮下面了；
   测完的用户要的是「下一步怎么办」，所以这里递的是 NAT 检测入口。
   配色用站点的蓝而不是提醒的琥珀：这不是警告，是另一条路。 */
.gp-nat-tip{
  margin: 16px 0 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f4f8ff;
  border: 1px solid #cddffb;
  border-left: 3px solid var(--accent);
}
.gp-nat-tip p{
  margin: 0;
  /* 2026-11-07 用户要求放大加粗：这行是结果卡里唯一一句「下一步点哪」，
     13.5px 常被当成注释跳过。550 而不是 700 —— 里面的重点词已经是 700，
     整句再上 700 就没有重点可言了。 */
  font-size: 15px;
  font-weight: 550;
  line-height: 1.85;
  color: var(--text);
}
/* 荧光笔式高亮，跟 .gp-caveat-mark 同一观感，只是换成蓝色系
   （同一页里两种高亮不能长得一样，否则用户分不清哪句是警告、哪句是引导） */
.gp-nat-tip-mark{
  background: linear-gradient(transparent 60%, rgba(37,99,235,.3) 60%);
  color: var(--text);
  font-weight: 700;
  /* 左右各 2px 让高亮比字宽一点，再用负 margin 抵消 —— 否则紧跟的「？」
     会被推开，显示成「延迟高 ？」 */
  padding: 0 2px;
  margin: 0 -2px;
}
/* 中间有个「？」隔开，这两个词都不能被折断 */
.gp-nat-tip-mark--tight{ white-space: nowrap; }
.gp-nat-tip-link{
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, .35);
  transition: border-color .15s ease;
}
.gp-nat-tip-link:hover{ border-bottom-color: var(--accent); }

/* 句末的「?」小圆钮 + 悬浮气泡。
   为什么不用 title 属性：浏览器要停住约一秒才弹，样式不可控，长句在手机上
   干脆不显示；而这句话正是「凭什么测延迟的页面让我去查 NAT」的答案，不能省。
   为什么不用 JS：显隐纯 CSS 就够，CSP 也不用为它开口子。
   tabindex + :focus-visible 让键盘用户也能看到（触屏点一下也会 focus）。 */
.gp-nat-tip-help{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 18px 的字面 + 4px 内边距：鼠标好命中，又不会把行高顶开 */
  width: 18px;
  height: 18px;
  margin-left: 7px;
  border-radius: 50%;
  border: 1px solid #a9c4f0;
  background: #fff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  /* 圈心和汉字的视觉中线对齐（默认 baseline 会显得偏高半像素） */
  vertical-align: -3px;
  outline: none;
}
.gp-nat-tip-help:hover,
.gp-nat-tip-help:focus-visible{
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.gp-nat-tip-pop{
  position: absolute;
  /* 吸附在圆钮右侧向左展开：这行文字本来就靠右，向右开会顶出卡片 */
  right: -6px;
  bottom: calc(100% + 10px);
  width: max-content;
  /* 手机窄屏兜底：再宽也不能超出视口（100vw - 两倍卡片留白）。
     桌面给到 320px —— 这句 35 个字，268px 会折成四行、末行只剩「要。」，
     读起来像渲染坏了；两行半以内才像一句完整的话。 */
  max-width: min(320px, calc(100vw - 76px));
  padding: 10px 13px;
  border-radius: 9px;
  background: #0f172a;
  color: #f8fafc;
  /* 气泡里不能继承外面的 15px/550，否则一行挤不了几个字 */
  font-size: 13px;
  font-weight: 500;
  line-height: 1.65;
  text-align: left;
  white-space: normal;
  box-shadow: 0 14px 30px -14px rgba(15, 23, 42, .6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  /* 气泡不接鼠标事件，否则鼠标从圆钮挪到气泡上会闪断 */
  pointer-events: none;
  z-index: 5;
}
/* 气泡下方的小尖角，指向圆钮 */
.gp-nat-tip-pop::after{
  content: '';
  position: absolute;
  top: 100%;
  right: 11px;
  border: 5px solid transparent;
  border-top-color: #0f172a;
}
.gp-nat-tip-help:hover .gp-nat-tip-pop,
.gp-nat-tip-help:focus-visible .gp-nat-tip-pop{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 测试期间页面被切到后台的提示：这不是「建议」，是真的会算错数据 */
.gp-warn{
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 13px;
  line-height: 1.7;
}
.gp-big{
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.gp-big > div{ display: flex; align-items: baseline; gap: 6px; }
.gp-big-n{
  font-size: clamp(34px, 7vw, 46px);
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.gp-big small{ color: var(--muted); font-size: 13px; }

/* ---- 评级卡：五档各一套配色 + 字号递减 ----
   颜色不只是装饰：S 用金色、D 用红色，是为了让用户扫一眼就知道自己在哪一档。 */
.gp-grade{
  position: relative;
  margin: 0 0 18px;
  padding: 18px 20px 16px;
  border-radius: 16px;
  border: 1px solid var(--gc-line);
  background:
    radial-gradient(120% 160% at 100% 0%, var(--gc-glow) 0%, transparent 60%),
    linear-gradient(135deg, var(--gc-bg1), var(--gc-bg2));
  overflow: hidden;
  animation: gpGradeIn .55s cubic-bezier(.22, 1, .36, 1) both;
}
.gp-grade[data-grade="S"]{
  --gc:#b45309; --gc-strong:#f59e0b; --gc-bg1:#fffdf5; --gc-bg2:#fef3c7; --gc-line:#fcd34d;
  --gc-glow: rgba(245, 158, 11, .22);
}
.gp-grade[data-grade="A"]{
  --gc:#047857; --gc-strong:#10b981; --gc-bg1:#f6fefa; --gc-bg2:#d1fae5; --gc-line:#6ee7b7;
  --gc-glow: rgba(16, 185, 129, .18);
}
.gp-grade[data-grade="B"]{
  --gc:#1d4ed8; --gc-strong:#3b82f6; --gc-bg1:#f7faff; --gc-bg2:#dbeafe; --gc-line:#93c5fd;
  --gc-glow: rgba(59, 130, 246, .18);
}
.gp-grade[data-grade="C"]{
  --gc:#c2410c; --gc-strong:#f97316; --gc-bg1:#fffaf5; --gc-bg2:#ffedd5; --gc-line:#fdba74;
  --gc-glow: rgba(249, 115, 22, .18);
}
.gp-grade[data-grade="D"]{
  --gc:#b91c1c; --gc-strong:#ef4444; --gc-bg1:#fff7f7; --gc-bg2:#fee2e2; --gc-line:#fca5a5;
  --gc-glow: rgba(239, 68, 68, .18);
}

.gp-grade-mark{ display: flex; align-items: center; gap: 16px; }
.gp-grade-letter{
  font-size: 56px;
  font-weight: 900;
  line-height: .85;
  letter-spacing: -.04em;
  color: var(--gc-strong);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 6px 18px var(--gc-glow);
  flex: 0 0 auto;
}
/* 等级越高字号越大：S 在视觉上明显压过 A/B，形成「段位感」 */
.gp-grade[data-grade="S"] .gp-grade-letter{ font-size: 74px; }
.gp-grade[data-grade="A"] .gp-grade-letter{ font-size: 64px; }
.gp-grade[data-grade="B"] .gp-grade-letter{ font-size: 56px; }
.gp-grade-meta{ min-width: 0; }
.gp-grade-meta b{
  display: block;
  font-size: clamp(19px, 3.4vw, 24px);
  font-weight: 800;
  color: var(--gc);
  letter-spacing: -.3px;
  line-height: 1.3;
}
.gp-grade-meta span{
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--gc);
  opacity: .8;
  font-variant-numeric: tabular-nums;
}
.gp-grade-text{
  position: relative;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--gc-line);
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
}
@keyframes gpGradeIn{
  from{ opacity: 0; transform: translateY(12px) scale(.97); }
  to{ opacity: 1; transform: none; }
}

/* 8 格固定 4 列：两行四列，比 auto-fit 排成 6+2 顺眼 */
.gp-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.gp-grid-note{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}
.gp-grid > div{
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.gp-grid .k{ display: block; font-size: 12px; color: var(--muted); }
.gp-grid .v{
  display: block;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---- 科普与对照表 ---- */
.gp-faq{ padding: 24px; margin-top: 16px; }
.gp-faq h2{ margin: 0 0 12px; font-size: 16px; }
.gp-faq h2 + p{ margin-top: 0; }
.gp-faq ul{ margin: 0; padding-left: 20px; color: var(--text-2); font-size: 13.5px; line-height: 1.8; }
.gp-faq li{ margin-bottom: 8px; }
.gp-faq b{ color: var(--text); }
/* FAQ 里的「门槛式结论」（2026-11-07）。
   这两句原本写成 markdown 的 **...**，页面把星号原样吐了出来 —— 像没写完的稿子。
   改用荧光笔式高亮：只压下半截、不挡字，和首屏那条琥珀色「重要」区分开
   （这边是蓝色：陈述事实，不是警告）。整句都压，因为结论本身就是整句。 */
.gp-faq-mark{
  background: linear-gradient(transparent 50%, rgba(37, 99, 235, .38) 50%);
  color: var(--text);
  font-weight: 600;
  /* 左右各 2px 让高亮比字宽一点，不让标点贴着边缘 */
  padding: 0 2px;
  margin: 0 -2px;
  /* 长句会在任意两字之间折行，mark 是行内元素，背景自然跟着断行，不会撕裂 */
}
.gp-faq p{ color: var(--text-2); font-size: 13.5px; line-height: 1.8; }
.gp-faq code{
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
}
.gp-faq-note{
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted) !important;
  font-size: 12.5px !important;
}
.gp-faq-intro{ margin: 0 0 14px; }

.gp-table-wrap{ overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -2px; }
.gp-table{
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13px;
}
.gp-table th{
  text-align: left;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.gp-table td{
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  line-height: 1.7;
  vertical-align: top;
}
.gp-table tbody tr:last-child td{ border-bottom: 0; }
.gp-table td:nth-child(2){ white-space: nowrap; }
.gp-table td b{ color: var(--text); }
.gp-tag{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.gp-tag.s{ background: #fef3c7; color: #b45309; }
.gp-tag.a{ background: #d1fae5; color: #047857; }
.gp-tag.b{ background: #dbeafe; color: #1d4ed8; }
.gp-tag.c{ background: #ffedd5; color: #c2410c; }
.gp-tag.d{ background: #fee2e2; color: #b91c1c; }

@media (max-width: 640px){
  .gp-main, .gp-result, .gp-faq{ padding: 18px; }
  .gp-status{ gap: 16px; }
  .gp-ring{ width: 92px; height: 92px; }
  .gp-ring svg{ width: 92px; height: 92px; }
  .gp-ring-text span{ font-size: 24px; }
  .gp-state-line{ font-size: 16.5px; }
  .gp-live{ grid-template-columns: 1fr 1fr; }
  .gp-grid{ grid-template-columns: 1fr 1fr; }
  .gp-big{ gap: 24px; }
  .gp-chart-shell{ padding: 8px 9px 6px; border-radius: 14px; }
  .gp-grade{ padding: 16px 16px 14px; }
  .gp-grade-mark{ gap: 13px; }
  .gp-grade[data-grade="S"] .gp-grade-letter{ font-size: 58px; }
  .gp-grade[data-grade="A"] .gp-grade-letter{ font-size: 52px; }
  .gp-grade[data-grade="B"] .gp-grade-letter{ font-size: 48px; }
  .gp-grade[data-grade="C"] .gp-grade-letter{ font-size: 46px; }
  .gp-grade[data-grade="D"] .gp-grade-letter{ font-size: 46px; }
  .gp-grade-text{ font-size: 13.5px; }
  .gp-caveat{ padding: 12px 14px; }
  .gp-caveat p{ font-size: 13px; }
  .gp-caveat--hero{ margin-top: 16px; }
  .gp-nat-tip{ padding: 12px 14px; }
  .gp-nat-tip p{ font-size: 14px; line-height: 1.8; }
  /* 窄屏：气泡宽度必须收在「视口 - 两侧留白」以内。
     只写 calc(100vw - 68px) 是不够的 —— 520px 宽时它给到 450px，
     气泡以图标右缘为锚点向左展开，左边会直接顶出屏幕外被裁掉。
     所以再压一个绝对上限（280px），窄屏以更小的那个为准。 */
  .gp-nat-tip-pop{ font-size: 12px; padding: 8px 10px; max-width: min(280px, calc(100vw - 68px)); }
}

/* ===== 全站数据页（/nat-stats）已于 2026-11-18 整体下线 =====
   页面、模板、路由与这里的一整套 .stats-* / .bar 样式一起删掉了：
   地址在 gone.go 的 retiredPages 里回 410，站内不再有任何入口。
   别把 .bar 加回来给新页面用 —— 后台仪表盘有一份同名但独立的样式。 */

/* ===== 上行测速页（2026-11-20 改版） =====
   版式跟外服游戏延迟测试页一致：首屏两栏 + 白卡片 + 荧光笔高亮。
   与那一页不同的是这里的"舞台"是牛顿摆 + 实时曲线，不是倒计时环 ——
   测速的时长是随机的（14–22 秒），画一个固定 30 秒的环只会骗人。 */

/* 标题里的荧光笔：只压字的下半截，不挡字。
   和 .gp-faq-mark 同一套做法，颜色取绿色系 —— 这一页讲的是"真实"，不是警告。 */
.up-hl{
  background: linear-gradient(transparent 58%, rgba(16, 185, 129, .34) 58%);
  color: inherit;
  padding: 0 2px;
  margin: 0 -2px;
}

/* 首屏那段话里的跨页链接：既要是链接，又要是"高亮" */
.up-diff-link{
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(transparent 56%, rgba(37, 99, 235, .26) 56%);
  padding: 0 2px;
  margin: 0 -2px;
  border-bottom: 1px solid rgba(37, 99, 235, .35);
  transition: background .15s ease;
}
.up-diff-link:hover{
  text-decoration: none;
  background: linear-gradient(transparent 40%, rgba(37, 99, 235, .38) 40%);
}

/* ---- 首屏右卡里的检测项 ---- */
.up-checks{ list-style: none; margin: 0; padding: 0; }
.up-check{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
}
.up-check::before{
  content: '';
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #10b981 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") no-repeat center;
  background-size: 10px;
}

/* 绿色花括号：左边竖排标签 + 一条曲线，把四项括成一组。
   用 SVG 画括号而不是 border-left —— 方括号表达不出"这是一组同类项"，
   而这条曲线两端带钩，和正文里的括号语义一致。 */
.up-brace-box{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px 10px 4px;
  border-radius: 11px;
  background: #f4fdf9;
  border: 1px solid #d5f0e4;
}
.up-brace-side{ display: flex; align-items: stretch; gap: 3px; color: #10b981; }
.up-brace-label{
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  color: #0e9f6e;
  align-self: center;
  white-space: nowrap;
}
.up-brace-line{ width: 18px; height: 100%; min-height: 94px; flex: 0 0 auto; }
.up-brace-items{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.55;
}
.up-brace-items li{ position: relative; padding-left: 12px; }
.up-brace-items li::before{
  content: '';
  position: absolute;
  left: 2px;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #10b981;
}

/* ---- 测速卡 ----
   2026-11-20 用户要求：卡片里的元素全部居中。所以状态行、通道选择、
   排队条、按钮都按"一条竖轴"排 —— 只有舞台（摆 + 曲线）本来就是居中的。 */
.up-main{ padding: 26px 24px; text-align: center; }

.up-status{ display: block; }
.up-sdot{
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background .2s ease;
}
.up-status[data-state="ready"] .up-sdot{ background: var(--green); }
.up-status[data-state="running"] .up-sdot{ background: var(--accent); animation: upPulse 1.6s infinite; }
.up-status[data-state="queued"] .up-sdot{ background: var(--amber); animation: upPulse 1.6s infinite; }
.up-status[data-state="done"] .up-sdot{ background: var(--green); }
/* 圆点和文字同一行、整体居中：圆点单独占一列会因为两行文字而偏上 */
.up-state-line{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}
.up-status[data-state="running"] .up-state-line{ color: var(--accent); }
.up-status[data-state="queued"] .up-state-line{ color: var(--amber); }
.up-status[data-state="done"] .up-state-line{ color: var(--green); }
.up-state-hint{
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  min-height: 0;
}

/* 通道选择：两个药丸，灰掉的那个仍然可点（点它给一句解释） */
.up-pick{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}
.up-pick-label{ color: var(--muted); font-size: 12.5px; margin-right: 2px; }
.up-opt{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.up-opt:hover{ border-color: var(--line-strong); }
.up-opt input{ margin: 0; accent-color: var(--accent); }
.up-opt:has(input:checked){
  border-color: #c2d7fb;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.up-opt.dis{
  color: #a8b3c4;
  background: var(--surface-2);
  border-style: dashed;
  cursor: not-allowed;
}
.up-opt.dis:has(input:checked){ background: var(--surface-2); color: #a8b3c4; font-weight: 400; }

/* 排队条：从"进队"一直显示到"开测"，中途不闪断 —— 排队最怕的就是
   不知道自己还在不在队里。数字用等宽（tabular）避免跳动。 */
.up-queue{
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbff, #eef5ff);
  border: 1px solid #dbe8fb;
}
.up-queue.on{ display: flex; }
.up-queue-dot{
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(37, 99, 235, .45);
  animation: upPulse 1.7s infinite;
}
@keyframes upPulse{
  0%{ box-shadow: 0 0 0 0 rgba(37, 99, 235, .45); }
  70%{ box-shadow: 0 0 0 9px rgba(37, 99, 235, 0); }
  100%{ box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}
.up-queue-body{ display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.up-queue-body b{ font-size: 14px; color: var(--text); font-weight: 600; }
.up-queue-body span{ font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.up-queue-body em{ font-style: normal; color: var(--accent); font-weight: 600; }

/* 舞台：只在测试过程中存在，初始化时不占位 */
.up-stage{ display: none; margin: 18px 0 0; }
.up-stage.on{ display: block; min-height: 190px; animation: upStageIn .26s ease; }
@keyframes upStageIn{
  from{ opacity: 0; transform: translateY(8px); }
  to{ opacity: 1; transform: none; }
}
.up-cradle, .up-dash{ display: none; }
.up-cradle.on{ display: block; }
.up-dash.on{ display: flex; }

/* 牛顿摆：2026-11-20 用户要求放慢 3 倍（0.62s → 1.86s）。
   周期里 0–50% 左侧球摆出去再回来，50%–100% 右侧球同样一次 ——
   任意时刻只有一侧在动，这才是"摆"而不是"四球一起抖"。 */
.up-cradle{ width: 100%; max-width: 340px; margin: 6px auto 0; }
.up-cradle .bar{ stroke: #cfd8e3; stroke-width: 4; stroke-linecap: round; }
.up-cradle .str{ stroke: #cfd8e3; stroke-width: 2; }
.up-cradle .ball{ fill: var(--accent); }
.up-cradle .b{ transform-box: view-box; }
.up-cradle .b1{ transform-origin: 70px 20px; animation: cradleL 1.86s linear infinite; }
.up-cradle .b5{ transform-origin: 210px 20px; animation: cradleR 1.86s linear infinite; }
@keyframes cradleL{
  0%{ transform: rotate(0); animation-timing-function: ease-out; }
  25%{ transform: rotate(28deg); animation-timing-function: ease-in; }
  50%{ transform: rotate(0); }
  100%{ transform: rotate(0); }
}
@keyframes cradleR{
  0%{ transform: rotate(0); }
  50%{ transform: rotate(0); animation-timing-function: ease-out; }
  75%{ transform: rotate(-28deg); animation-timing-function: ease-in; }
  100%{ transform: rotate(0); }
}

/* 仪表 + 曲线：宽屏左右排，窄屏上下排 */
.up-dash{ gap: 14px; align-items: center; }
.up-panel{ flex: 1 1 auto; min-width: 0; display: flex; gap: 14px; align-items: center; }
.up-gauge{ flex: 0 0 230px; width: 230px; height: 150px; }
.up-chart{ flex: 1 1 auto; min-width: 0; height: 150px; }
.up-gauge .bar{ stroke: #cfd8e3; stroke-width: 3; stroke-linecap: round; }
.up-gauge .str{ stroke: #dfe6ef; stroke-width: 1.6; }
.up-gauge .ball{ fill: var(--accent); }
.up-gauge .b{ transform-box: view-box; }
.up-gauge .b1{ transform-origin: 70px 16px; animation: cradleL 1.86s linear infinite; }
.up-gauge .b5{ transform-origin: 210px 16px; animation: cradleR 1.86s linear infinite; }
.up-gauge .num{
  font-size: 34px;
  font-weight: 700;
  fill: var(--text);
  text-anchor: middle;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
}
.up-gauge .unit{ font-size: 11px; fill: var(--muted); text-anchor: middle; }

.up-actions{ display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.up-actions .btn{ padding: 11px 26px; }

/* ---- 结果卡 ----
   只留两个信息：多少 Mbps、走的哪条通道。居中、留白，数字是唯一的主角。
   通道用颜色区分（IPv6 紫 / IPv4 蓝）—— 比在明细里写"通道：IPv6"直观得多，
   而且和通道选择器上的选中色是同一套色，用户不用再学一遍。 */
.up-result{ padding: 34px 24px 32px; margin-top: 16px; }
.up-result-inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  animation: upResultIn .32s ease both;
}
@keyframes upResultIn{
  from{ opacity: 0; transform: translateY(10px); }
  to{ opacity: 1; transform: none; }
}
.up-chan{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  border: 1px solid transparent;
}
.up-chan::before{
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.up-chan[data-stack="v6"]{
  color: #6d4df0;
  background: #f2eeff;
  border-color: #ddd3ff;
}
.up-chan[data-stack="v4"]{
  color: #1d5fd6;
  background: #eaf2ff;
  border-color: #cfe0fb;
}
.up-result-num{
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
}
.up-result-num span{
  font-size: clamp(46px, 8vw, 64px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.up-result-num small{
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}
.up-result-cap{
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* ---- toast：卡片里只留"进行到哪一步"，出错统一飘一条出来 ---- */
.up-toast-wrap{
  position: fixed;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.up-toast{
  pointer-events: auto;
  max-width: min(92vw, 440px);
  padding: 11px 15px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid #f1d7d7;
  border-left: 3px solid var(--red);
  box-shadow: 0 10px 28px rgba(16, 24, 40, .14);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  animation: upToastIn .18s ease;
}
@keyframes upToastIn{
  from{ opacity: 0; transform: translateY(-8px); }
  to{ opacity: 1; transform: none; }
}

/* ---- QA ---- */
.up-qa{ margin-top: 18px; }
.up-qa:first-of-type{ margin-top: 10px; }
.up-q{
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.7;
}
.up-a{ padding-left: 2px; }
.up-a p{ margin: 0 0 8px; }
.up-a p:last-child{ margin-bottom: 0; }
.up-cond{
  margin: 0 0 8px;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  color: var(--text-2) !important;
  font-size: 13px !important;
  line-height: 1.9 !important;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 860px){
  .up-main, .up-result{ padding: 18px; }
  .up-dash{ flex-direction: column; }
  .up-panel{ flex-direction: column; width: 100%; }
  .up-gauge{ flex: 0 0 auto; width: 100%; max-width: 280px; height: 160px; }
  .up-chart{ width: 100%; height: 130px; }
  .up-result{ padding: 26px 18px 24px; }
}

/* 标题里不许被拆开的两字词（中文字间可以在任意处折行，"真/实"被拆开很难看） */
.up-nowrap{ white-space: nowrap; }
