/* 全站只有浅色一套配色。color-scheme 写成 only light：
   声明「本页不提供深色」，Chrome 的强制深色（Auto Dark Mode）这类功能也不会再替页面反色。 */
:root {
  color-scheme: only light;

  --bg:          var(--gray-1);
  --surface:     #fff;
  --surface-2:   var(--gray-0);   /* 行悬停 */
  --border:      var(--gray-3);
  --border-soft: var(--gray-2);   /* 行分隔线，比卡片边框更轻 */
  --text:        var(--gray-9);
  --text-dim:    color-mix(in srgb, var(--gray-6) 62%, var(--gray-8));
  --text-mute:   var(--gray-6);   /* 占位符、© 行这类可有可无的字 */

  --accent:            var(--green-7);   /* 光晕、分组标记这类纯装饰 */
  --accent-text:       var(--green-10);  /* 浅底上的绿字、绿图标、焦点边框 */
  --accent-solid:      var(--green-10);  /* 实心按钮底 */
  --accent-solid-hover: var(--teal-7);
  --accent-contrast:   #fff;

  /* 焦点光环与卡片投影：用 color-mix 从主色/中性灰派生，避免再写死一组颜色 */
  --ring:   color-mix(in srgb, var(--accent) 26%, transparent);
  --halo:   color-mix(in srgb, var(--accent) 13%, transparent);
  --shadow-color: 220 22% 40%;
  --shadow-strength: 2%;

  --badge-green-bg:  var(--green-1);
  --badge-green-fg:  var(--green-10);
  --badge-gray-bg:   var(--gray-2);
  --badge-gray-fg:   var(--gray-8);
  --badge-amber-bg:  var(--orange-1);
  --badge-amber-fg:  var(--orange-11);
  --badge-red-bg:    var(--red-1);
  --badge-red-fg:    var(--red-10);

  --tag-danger-bg:    #fee2e2;
  --tag-danger-color: #dc2626;

  --tag-cn-bg:      var(--red-1);
  --tag-cn-fg:      var(--red-10);
  --tag-global-bg:  var(--indigo-1);
  --tag-global-fg:  var(--indigo-10);
  --tag-name-bg:    var(--gray-2);
  --tag-name-fg:    var(--gray-7);

  --score-warn-fill: #f59e0b;
  --score-warn-text: var(--orange-11);

  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
             "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
             "Noto Sans CJK SC", sans-serif;
  --font-code: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", "Roboto Mono", monospace;

  --card-radius: var(--radius-3);
  --field-radius: var(--radius-round);

  --wrap-width: 688px;
  --home-width: 468px;
}

/* ---------------------------------------------------------------- 基础 */

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  margin: 0;
  background-color: var(--bg);
  /* 顶部一层极淡的品牌绿光晕：整页唯一的「装饰」，把视线压向查询框 */
  background-image: radial-gradient(70rem 32rem at 50% -18rem, var(--halo), transparent 72%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: color-mix(in srgb, var(--accent) 25%, transparent);
}

/* Open Props 的 normalize 按 ch 给每一类文字单独裁了一个行宽：
   h1 20ch、h2 25ch、h3~h6 与 dt 35ch、li / dd / figcaption 45ch、p 60ch。
   那套值是照着英文正文定的，落到中文上就变成了「同一栏里每种标签各有各的宽度」——
   h1 只有 20ch，.hero 的 text-align:center 于是把标题居中在左边那一小段里；
   li 和 dd 只有 45ch，右边整片空着，跟上下 60ch 的 p 对不齐。
   本站的行宽只由 .wrap 一处控制，这里把这套限制整体撤掉，
   正文因此全部在同一条右边界上收尾。 */
:where(h1, h2, h3, h4, h5, h6, p, li, dt, dd, figcaption) {
  max-inline-size: none;
}

.wrap {
  max-width: var(--wrap-width);
  margin-inline: auto;
  padding-inline: var(--size-3);
  padding-block: var(--size-4) var(--size-8);
}

/* 数据值一律等宽——IP 段与 ASN 因此天然对齐，也是「这是技术工具」最直接的表达。
   tabular-nums 让相邻两行的数字纵向严格对齐。 */
.mono {
  font-family: var(--font-code);
  font-size: .94em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.dim {
  color: var(--text-dim);
}

/* 仅供读屏器的说明文本 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- 站点标识 */

.site {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-block-end: var(--size-5);
}

.site__logo {
  display: inline-block;
  line-height: 0;
  border-radius: var(--radius-2);
  transition: transform .25s var(--ease-out-3);
}

.site__logo:hover {
  transform: translateY(-1px);
}

.site__logo img {
  width: 216px;
  max-width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------- 查询区 */

.query {
  /* 与下面的 IP 卡片拉开一段：两块都是带边框的圆角容器，贴在一起会读成一整块 */
  margin-block-end: var(--size-4);
}

/* 输入框与按钮合成一枚胶囊：整体是一个可点的区域，
   焦点落在任意子元素上都由外壳统一给出反馈。 */
.query__line {
  display: flex;
  align-items: center;
  gap: var(--size-2);
  padding: 5px 5px 5px var(--size-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--field-radius);
  box-shadow: var(--shadow-1);
  transition: border-color .18s var(--ease-3), box-shadow .18s var(--ease-3);
}

.query__line:hover {
  border-color: var(--text-mute);
}

.query__line:focus-within {
  border-color: var(--accent-text);
  box-shadow: 0 0 0 4px var(--ring);
}

.query__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--text-mute);
  transition: color .18s var(--ease-3);
}

.query__line:focus-within .query__icon {
  color: var(--accent-text);
}

.query__icon svg {
  inline-size: 17px;
  block-size: 17px;
}

.query__input {
  flex: 1 1 auto;
  min-width: 0;
  padding-block: var(--size-2);
  font-size: 15px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
}

.query__input::placeholder {
  color: var(--text-mute);
}

.query__submit {
  flex: 0 0 auto;
  min-height: 38px;
  padding-inline: var(--size-4);
  font-family: inherit;
  font-size: 14px;
  font-weight: var(--font-weight-6);
  letter-spacing: .02em;
  color: var(--accent-contrast);
  background: var(--teal-6);
  border: 0;
  border-radius: var(--field-radius);
  cursor: pointer;
  transition: background-color .18s var(--ease-3), transform .18s var(--ease-3),
              opacity .18s var(--ease-3);
}

.query__submit:hover {
  background: var(--accent-solid-hover);
}

.query__submit:active {
  transform: scale(.97);
}

.query__submit:disabled {
  opacity: .6;
  cursor: default;
  transform: none;
}

/* ---------------------------------------------------------------- 人机验证对话框 */

/* 平时是一个零高度的空壳：Turnstile 以 interaction-only 渲染在里面，绝大多数访客看不到它。
   不能用 display:none / visibility:hidden 把它藏起来——那样 iframe 会被当成不可见帧，
   后台验证可能被浏览器节流甚至挂住。标题、说明、遮罩平时各自 display:none，
   只有 app.js 加上 is-open 时整块才就地变成居中的对话框（节点不动，iframe 不重载）。 */
.verify__backdrop,
.verify__head,
.verify__note {
  display: none;
}

.verify.is-open {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: var(--size-3);
}

.verify.is-open .verify__backdrop {
  display: block;
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--gray-12) 38%, transparent);
  animation: ipcx-fade .18s var(--ease-3) backwards;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .verify.is-open .verify__backdrop {
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }
}

.verify.is-open .verify__dialog {
  position: relative;
  inline-size: min(100%, 364px);
  padding: var(--size-4) var(--size-4) var(--size-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-5);
  animation: ipcx-rise .22s var(--ease-out-3) backwards;
}

.verify__dialog:focus {
  outline: none;
}

.verify.is-open .verify__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--size-3);
  margin-block-end: var(--size-1);
}

.verify__title {
  margin: 0;
  font-size: 16px;
  font-weight: var(--font-weight-7);
}

.verify__close {
  display: grid;
  place-items: center;
  flex: none;
  inline-size: 32px;
  block-size: 32px;
  padding: 0;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-round);
  cursor: pointer;
  transition: color .18s var(--ease-3), border-color .18s var(--ease-3);
}

.verify__close:hover {
  color: var(--text);
  border-color: var(--text-mute);
}

.verify__close svg {
  inline-size: 16px;
  block-size: 16px;
}

.verify.is-open .verify__note {
  display: block;
  margin: 0 0 var(--size-3);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* 组件在对话框里居中；标准尺寸 300×65，窄于 360px 的屏幕上 app.js 改用 compact */
.verify.is-open .verify__widget {
  display: flex;
  justify-content: center;
  min-block-size: 65px;
}

/* ---------------------------------------------------------------- 提示条 */

.notice {
  display: flex;
  align-items: flex-start;
  gap: var(--size-2);
  margin-block: var(--size-3) 0;
  padding: var(--size-2) var(--size-3);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--badge-red-fg);
  background: color-mix(in srgb, var(--badge-red-bg) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--badge-red-fg) 22%, transparent);
  border-radius: var(--radius-2);
}

.notice svg {
  flex: 0 0 auto;
  inline-size: 16px;
  block-size: 16px;
  margin-block-start: 2px;
}

.notice--stale {
  color: var(--badge-amber-fg);
  background: color-mix(in srgb, var(--badge-amber-bg) 60%, transparent);
  border-color: color-mix(in srgb, var(--badge-amber-fg) 22%, transparent);
  margin-block-end: var(--size-4);
}

/* ---------------------------------------------------------------- 当前 IP */

/* 全页的焦点：一块带极淡绿色渐变的卡片，IP 用最大的字号占住视觉中心 */
.current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--size-3);
  margin-block-end: var(--size-6);
  padding: var(--size-4) var(--size-4) var(--size-4) var(--size-5);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 9%, var(--surface)),
      var(--surface) 62%);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-2);
}

.current__eyebrow {
  display: block;
  margin-block-end: 2px;
  font-size: 12px;
  font-weight: var(--font-weight-6);
  letter-spacing: .1em;
  color: var(--accent-text);
  text-transform: uppercase;
}

.current__ip {
  display: block;
  font-family: var(--font-code);
  /* IPv6 完整形态很长，允许在窄屏收缩到可读下限，不做横向滚动 */
  font-size: clamp(1.35rem, 6vw, var(--font-size-5));
  font-weight: var(--font-weight-7);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* 反向解析出的主机名。它是 IP 的注脚，不是第二个主角：
   压到 12px 的绿字，解析不出来时整行不渲染（判断在 home.php）。 */
.current__host {
  display: block;
  margin-block-start: 4px;
  font-family: var(--font-code);
  font-size: 12px;
  line-height: 1.45;
  color: var(--green-10);
  /* 长 PTR（一串机房命名）在窄屏要能断行，不能把卡片撑出横向滚动 */
  overflow-wrap: anywhere;
}

/* 右侧的两枚按钮排成一列：遮罩在上（贴住卡片右上角），复制在下。
   不用绝对定位——窄屏下 .current 会改成顶对齐，绝对定位的按钮会压到复制按钮上。 */
.current__actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--size-2);
}

.mask {
  display: none;
  place-items: center;
  inline-size: 32px;
  block-size: 32px;
  padding: 0;
  color: var(--text-dim);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--field-radius);
  cursor: pointer;
  transition: color .18s var(--ease-3), border-color .18s var(--ease-3),
              background-color .18s var(--ease-3), transform .18s var(--ease-3);
}

:root.has-js .mask {
  display: grid;
}

.mask:hover {
  color: var(--text);
  border-color: var(--text-mute);
  transform: translateY(-1px);
}

.mask:active {
  transform: translateY(0);
}

.mask svg {
  inline-size: 16px;
  block-size: 16px;
  display: none;
}

/* 图标跟着状态走：常态给「眼睛」（点一下会藏起来），已遮罩给「划掉的眼睛」 */
.mask .mask__icon--show,
.mask[aria-pressed="true"] .mask__icon--hide {
  display: block;
}

.mask[aria-pressed="true"] .mask__icon--show {
  display: none;
}

/* 遮罩生效时按钮自己也变成状态指示：一眼看出这块数字不是真的 */
.mask[aria-pressed="true"] {
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* 主机名用 visibility 藏而不是 display:none：
   PTR 那一行一撤，卡片会矮掉一截，切换时整页跟着跳一下。 */
.current.is-masked .current__host {
  visibility: hidden;
}

.copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px var(--size-3);
  font-family: inherit;
  font-size: 13px;
  font-weight: var(--font-weight-5);
  color: var(--text-dim);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--field-radius);
  cursor: pointer;
  transition: color .18s var(--ease-3), border-color .18s var(--ease-3),
              background-color .18s var(--ease-3), transform .18s var(--ease-3);
}

.copy svg {
  inline-size: 14px;
  block-size: 14px;
}

.copy:hover {
  color: var(--text);
  border-color: var(--text-mute);
  transform: translateY(-1px);
}

.copy:active {
  transform: translateY(0);
}

/* 复制成功：按钮自身变成回执，不弹 toast */
.copy.is-done {
  color: var(--badge-green-fg);
  background: var(--badge-green-bg);
  border-color: color-mix(in srgb, var(--badge-green-fg) 28%, transparent);
}

.copy.is-fail {
  color: var(--badge-red-fg);
  background: var(--badge-red-bg);
  border-color: color-mix(in srgb, var(--badge-red-fg) 28%, transparent);
}

/* eSIM banner */

.esim-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--size-3);
  box-sizing: border-box;
  block-size: 90px;
  margin-block-end: var(--size-6);
  padding-inline: var(--size-4) var(--size-3);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 16%, var(--surface)),
      color-mix(in srgb, var(--accent) 5%, var(--surface)) 70%);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-2);
  transition: border-color .18s var(--ease-3), box-shadow .18s var(--ease-3),
              transform .18s var(--ease-3);
}

.current:has(+ .esim-banner) {
  margin-block-end: var(--size-3);
}

.esim-banner:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  box-shadow: var(--shadow-3);
  transform: translateY(-1px);
}

.esim-banner:active {
  transform: translateY(0);
}

.esim-banner__body {
  flex: 1 1 auto;
  min-inline-size: 0;   /* 允许文案在 flex 里收缩，否则长句会把按钮挤出卡片 */
}

.esim-banner__title {
  font-size: 14px;
  font-weight: var(--font-weight-7);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}

.esim-banner__desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-block-start: 2px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-dim);
}

.esim-banner__cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-block-size: 32px;
  padding-inline: var(--size-3);
  font-size: 13px;
  font-weight: var(--font-weight-6);
  letter-spacing: .02em;
  white-space: nowrap;
  color: var(--accent-contrast);
  background: var(--accent-solid);
  border-radius: var(--field-radius);
  transition: background-color .18s var(--ease-3);
}

.esim-banner:hover .esim-banner__cta {
  background: var(--accent-solid-hover);
}

/* ---------------------------------------------------------------- 信息分组 */

.groups {
  display: grid;
  gap: var(--size-5);
}

.group__title {
  display: flex;
  align-items: center;
  gap: var(--size-2);
  margin: 0 0 var(--size-2);
  padding-inline-start: 2px;
  font-size: 12px;
  font-weight: var(--font-weight-6);
  color: var(--text-dim);
  letter-spacing: .1em;
}

/* 标题前的一小段绿色，作用只是把两张卡片在纵向上分节 */
.group__title::before {
  content: "";
  inline-size: 3px;
  block-size: 12px;
  background: var(--accent);
  border-radius: var(--radius-round);
}

/* 分组容器是唯一的卡片层级；
   绝不给每一行加卡片——那会把 20 行信息变成 20 个盒子。 */
.rows {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

/* 以分组宽度 1/3 处为中心线：标签列右对齐贴住中心线，值列左对齐从中心线起排。
   列宽扣掉半个间距，中心线才正好落在 1/3，而不是被 gap 推偏。 */
.row {
  display: grid;
  grid-template-columns: calc(33.3333% - var(--size-3) / 2) 1fr;
  align-items: baseline;
  gap: var(--size-3);
  padding: var(--size-2) var(--size-4);
  transition: background-color .15s var(--ease-3);
}

.row + .row {
  border-top: 1px solid var(--border-soft);
}

/* 悬停整行提亮：长表格里指哪读哪，不必再靠斑马纹 */
.row:hover {
  background: var(--surface-2);
}

.row__label {
  text-align: right;
  font-size: 16px;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.row__value {
  text-align: left;
  overflow-wrap: anywhere;
}

.flag {
  font-size: 1.05em;
}

/* ---------------------------------------------------------------- 多库定位 */

/* 城市由 app.js 异步填进来；没有 JS 就填不进来，整块不出现，免得留一排永远的「查询中」 */
:root:not(.has-js) .geo {
  display: none;
}

/* 国家 / 州 / 城市之间的分隔符，压暗，只起断句作用 */
.geo__sep {
  margin-inline: 6px;
  color: var(--text-mute);
}

/* 「查询中 / 查询失败 / 库中无位置数据」是要读的正文，用 text-dim 而不是 text-mute（白底上只有 3:1） */
.geo__note {
  font-size: 13px;
  color: var(--text-dim);
}

/* ASN 链到 IP.IM 的 ASN 详情页：平时就是一段等宽文字，悬停才露出链接的样子，不抢整行的注意力 */
.asn-link {
  color: inherit;
  text-decoration: none;
}

.asn-link:hover {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ---------------------------------------------------------------- 徽章与标签 */

.badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  gap: 5px;
  padding: 2px var(--size-2);
  font-size: 12px;
  font-weight: var(--font-weight-6);
  line-height: 1.5;
  white-space: nowrap;
  border-radius: var(--radius-round);
  /* 一圈同色的内描边：浅底的徽章在白卡片上也有明确边界 */
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 16%, transparent);
}

/* 徽章前的圆点：颜色本身就是结论，圆点让它在灰度打印/色觉障碍下也不至于消失 */
.badge::before {
  content: "";
  inline-size: 5px;
  block-size: 5px;
  background: currentColor;
  border-radius: var(--radius-round);
  opacity: .75;
}

.badge--green { background: var(--badge-green-bg); color: var(--badge-green-fg); }
.badge--gray  { background: var(--badge-gray-bg);  color: var(--badge-gray-fg); }
.badge--amber { background: var(--badge-amber-bg); color: var(--badge-amber-fg); }
.badge--red   { background: var(--badge-red-bg);   color: var(--badge-red-fg); }
.badge--danger { background: var(--tag-danger-bg); color: var(--tag-danger-color); }

/* ASN 后缀的人机比例。绿/红只用在这两个数字上，方括号与竖线压暗，
   让它读起来像 ASN 的注脚，而不是又一枚跟徽章抢注意力的标记。 */
.botratio {
  margin-inline-start: var(--size-2);
  font-family: var(--font-code);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.botratio__bracket {
  opacity: .4;
}

.botratio__sep {
  margin-inline: 4px;
  opacity: .3;
}

/* 两个数字直接复用徽章的前景色：同一套语义色，对比度已经调过 */
.botratio__human {
  color: var(--badge-green-fg);
  font-weight: var(--font-weight-6);
}

.botratio__bot {
  color: var(--badge-red-fg);
  font-weight: var(--font-weight-6);
}

/* ------------------------------------------------------------------ IP 评分 */

/* 进度用内联 SVG 的 <rect width> 表达，而不是 <div style="width:57%">：
   CSP 里 style-src 只有 'self'，行内样式会被整条丢掉，进度条会永远是空的。
   表现属性不受 CSP 约束，viewBox 又正好取 100 个用户单位——宽度即分数，不需要换算。 */
.score {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  gap: var(--size-2);
}

.score__bar {
  /* 不写 preserveAspectRatio="none"：等比缩放时 rx 在两个方向上一致，
     两端才是正圆，而不是被横向拉扁的椭圆。 */
  inline-size: 140px;
  block-size: auto;
  flex: none;
}

.score__track {
  fill: var(--border);
}

/* 进度色走 --score-fill 而不是 currentColor：琥珀那档条子与数字要用不同的深浅，
   currentColor 绑死了两者就没法只压暗数字。 */
.score__fill {
  fill: var(--score-fill);
}

.score__num {
  font-size: 13px;
  font-weight: var(--font-weight-6);
  color: currentColor;
}

/* 分母压暗：分子是结论，「/100」只是量纲 */
.score__total {
  margin-inline-start: 1px;
  color: var(--text-mute);
  font-weight: var(--font-weight-4);
}

/* 三段配色。每档只定义两个变量：数字用的 color 与条子用的 --score-fill，
   多数情况下两者同值，只有琥珀那档要把数字单独压暗：#f59e0b 落在白卡片上做正文只有 2.2:1。
   <60 红：有明确的减分事实。60–69 琥珀：两头都不像——干净机房、转卖过的家宽。
   ≥70 绿：可以当成普通用户地址看待。 */
.score--good {
  color: var(--badge-green-fg);
  --score-fill: var(--badge-green-fg);
}

.score--warn {
  color: var(--score-warn-text);
  --score-fill: var(--score-warn-fill);
}

.score--bad {
  color: var(--badge-red-fg);
  --score-fill: var(--badge-red-fg);
}

.tags {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px;
}

.tag {
  display: inline-block;
  padding: 1px 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
  background: var(--badge-gray-bg);
  border-radius: var(--radius-round);
  white-space: nowrap;
}

/* 折叠用原生 details/summary：不依赖 JS，CSP 禁用内联脚本也能展开 */
.tag-more {
  display: inline-block;
}

.tag-more > summary {
  cursor: pointer;
  list-style: none;
  color: var(--text);
  transition: color .15s var(--ease-3), background-color .15s var(--ease-3);
}

.tag-more > summary:hover {
  color: var(--text);
  background: var(--border);
}

.tag-more > summary::-webkit-details-marker {
  display: none;
}

.tag-more > .tags {
  margin-block-start: 4px;
}

/* ---------------------------------------------------------------- 顶部导航 */

.navbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
  padding-block: var(--size-2);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-block-end: 1px solid var(--border-soft);
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .navbar {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

/* 和 .wrap 同宽同内边距——导航胶囊的左右两端要和下面的内容对齐 */
.navbar__inner {
  max-width: var(--wrap-width);
  margin-inline: auto;
  padding-inline: var(--size-3);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--size-1);
}

.nav__item {
  padding: 6px var(--size-3);
  font-size: 14px;
  font-weight: var(--font-weight-5);
  white-space: nowrap;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: var(--radius-round);
  transition: color .18s var(--ease-3), background-color .18s var(--ease-3);
}

.nav__item:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav__item.is-active {
  color: var(--accent-contrast);
  background: var(--teal-6);
}

.nav__item.is-active:hover {
  background: var(--accent-solid-hover);
}

/* 折叠态才会出现的两样东西：当前页名与菜单按钮。宽屏上五个入口整条排开，用不着它们。 */
.navbar__current,
.navbar__toggle {
  display: none;
}

/* 窄屏折叠。五个入口在一行里排不下的位置在 630px 上下，取 640 收口。
   整块挂在 :root.has-js 下：没有 JS 就没有开合能力，此时导航照旧整条显示（见下面的窄屏段），
   访客拿到的不会是一个点了没反应的按钮。app.js 里 matchMedia 的断点必须与这里一致。 */
@media (max-width: 640px) {
  :root.has-js .navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--size-3);
    min-block-size: 34px;
  }

  /* 当前页名替代整条导航留在条子上：折叠之后仍要一眼知道自己在哪一页 */
  :root.has-js .navbar__current {
    display: flex;
    align-items: center;
    gap: var(--size-2);
    min-inline-size: 0;
    font-size: 15px;
    font-weight: var(--font-weight-6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 名字前的一小段绿，和分组标题 .group__title::before 是同一个记号 */
  :root.has-js .navbar__current::before {
    content: "";
    flex: none;
    inline-size: 3px;
    block-size: 14px;
    background: var(--accent);
    border-radius: var(--radius-round);
  }

  /* 菜单按钮与遮罩、复制按钮同一套样子：同一页上的圆形图标按钮，不该长得像两套控件 */
  :root.has-js .navbar__toggle {
    display: grid;
    place-items: center;
    flex: none;
    inline-size: 34px;
    block-size: 34px;
    padding: 0;
    color: var(--text-dim);
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    border: 1px solid var(--border);
    border-radius: var(--radius-round);
    cursor: pointer;
    transition: color .18s var(--ease-3), border-color .18s var(--ease-3),
                background-color .18s var(--ease-3);
  }

  :root.has-js .navbar__toggle:hover,
  :root.has-js .navbar.is-open .navbar__toggle {
    color: var(--text);
    border-color: var(--text-mute);
  }

  :root.has-js .navbar.is-open .navbar__toggle {
    background: var(--surface-2);
  }

  :root.has-js .navbar__icon {
    display: none;
    inline-size: 18px;
    block-size: 18px;
  }

  /* 图标跟着状态走：收起时三道横线，展开时一个叉 */
  :root.has-js .navbar__icon--open,
  :root.has-js .navbar.is-open .navbar__icon--close {
    display: block;
  }

  :root.has-js .navbar.is-open .navbar__icon--open {
    display: none;
  }

  /* 菜单本体：一张悬在导航条下方的卡片。绝对定位而不是塞回文档流，
     展开时正文不会被往下推一截，收起时也不会跳回来。
     包含块是 .navbar（sticky 也是定位元素），inset-inline 取 .navbar__inner 的内边距，
     卡片两端于是与下面的内容对齐。 */
  :root.has-js .nav {
    display: none;
    position: absolute;
    inset-inline: var(--size-3);
    inset-block-start: calc(100% + 4px);
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-4);
  }

  :root.has-js .navbar.is-open .nav {
    display: flex;
    animation: ipcx-rise .18s var(--ease-out-3) backwards;
  }

  /* 列表里的每一项都是整行可点的：手机上目标区域不能只有文字那么宽 */
  :root.has-js .nav__item {
    padding: 10px var(--size-3);
    font-size: 15px;
    border-radius: var(--radius-2);
  }
}

/* ---------------------------------------------------------------- 检测页版面 */

.wrap--wide {
  max-width: var(--wrap-width);
}

.page-home .query,
.page-home .current,
.page-home .esim-banner,
.page-home .groups,
.page-home .notice--stale {
  max-inline-size: var(--home-width);
  margin-inline: auto;
}

/* 检测页没有站点头（Logo 只在首页），标题直接顶在导航条下面，上方留一段呼吸 */
.hero {
  margin-block: var(--size-6) var(--size-5);
  text-align: center;
}

.hero__title {
  margin: 0 0 var(--size-2);
  font-size: 26px;
  font-weight: var(--font-weight-7);
  letter-spacing: -.01em;
}

.hero__lede {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-dim);
  text-align: left;
}

/* ---------------------------------------------------------------- 检测控制条 */

.probe__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--size-3);
  margin-block-end: var(--size-4);
}

.probe__run {
  flex: 0 0 auto;
  min-height: 40px;
  padding-inline: var(--size-5);
  font-family: inherit;
  font-size: 14px;
  font-weight: var(--font-weight-6);
  letter-spacing: .02em;
  color: var(--accent-contrast);
  background: var(--teal-6);
  border: 0;
  border-radius: var(--field-radius);
  cursor: pointer;
  transition: background-color .18s var(--ease-3), transform .18s var(--ease-3),
              opacity .18s var(--ease-3);
}

.probe__run:hover:not(:disabled) { background: var(--accent-solid-hover); }
.probe__run:active:not(:disabled) { transform: scale(.97); }
.probe__run:disabled { opacity: .6; cursor: default; }
.probe__run:focus-visible { outline-color: var(--text); }

.probe__hint {
  flex: 1 1 12rem;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------------------------------------------------------------- 检测结论 */

/* 一整段结论，不是徽章。读者需要的是「所以我到底安不安全」这句话，
   三档语义色只负责让人一眼分出轻重，真正的信息在文字里。 */
.verdict {
  display: flex;
  align-items: flex-start;
  gap: var(--size-3);
  margin-block-end: var(--size-5);
  padding: var(--size-3) var(--size-4);
  border: 1px solid;
  border-radius: var(--card-radius);
}

/* display:flex 会盖掉 UA 那条 [hidden]{display:none}——两者特异度相同，后加载的赢。
   没跑检测之前结论块必须是不存在的，否则页面上会先摆着一个空框。 */
.verdict[hidden] {
  display: none;
}

.verdict__dot {
  flex: 0 0 auto;
  inline-size: 9px;
  block-size: 9px;
  margin-block-start: 8px;
  background: currentColor;
  border-radius: var(--radius-round);
}

.verdict__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: var(--font-weight-6);
}

.verdict__note {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-dim);
}

.verdict.is-good {
  color: var(--badge-green-fg);
  background: color-mix(in srgb, var(--badge-green-bg) 55%, transparent);
  border-color: color-mix(in srgb, var(--badge-green-fg) 22%, transparent);
}

.verdict.is-warn {
  color: var(--badge-amber-fg);
  background: color-mix(in srgb, var(--badge-amber-bg) 55%, transparent);
  border-color: color-mix(in srgb, var(--badge-amber-fg) 22%, transparent);
}

.verdict.is-bad {
  color: var(--badge-red-fg);
  background: color-mix(in srgb, var(--badge-red-bg) 55%, transparent);
  border-color: color-mix(in srgb, var(--badge-red-fg) 22%, transparent);
}


.fixnote {
  margin-block-end: var(--size-5);
  padding: var(--size-3) var(--size-4);
  background: color-mix(in srgb, var(--badge-amber-bg) 40%, transparent);
  border: 1px solid color-mix(in srgb, var(--badge-amber-fg) 22%, transparent);
  border-radius: var(--card-radius);
}

.fixnote__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: var(--font-weight-6);
  color: var(--badge-amber-fg);
}

.fixnote__note {
  margin: 0 0 var(--size-2);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-dim);
}

.fixnote__link {
  font-size: 13.5px;
  font-weight: var(--font-weight-6);
  color: var(--accent-text);
  text-decoration: none;
}

.fixnote__link:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------- STUN 行 */

/* 和首页的 .row 是同一张卡片里的兄弟，但列结构不同：
   这里是「谁 / 地址 / 结果」三段，中心线对齐那一套用不上。 */
.stun {
  display: grid;
  grid-template-columns: minmax(9rem, auto) 1fr minmax(8rem, auto);
  align-items: center;
  gap: var(--size-2) var(--size-3);
  padding: var(--size-2) var(--size-4);
  transition: background-color .15s var(--ease-3);
}

.stun + .stun {
  border-top: 1px solid var(--border-soft);
}

.stun:hover {
  background: var(--surface-2);
}

.stun__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--size-1);
}

.stun__url {
  font-size: 12.5px;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.stun__result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--size-1);
  font-size: 13px;
  text-align: right;
}

.stun__ms {
  font-size: 11.5px;
  color: var(--text-mute);
}

/* ---------------------------------------------------------------- DNS 解析器行 */

/* 和 .stun 是同一种三列卡片行，但中间一列要放三层信息（地址 / ASN·ISP / ECS），
   所以中列是块级堆叠而不是单行文本。两者没有合并成一个类：
   列宽与内部结构都不同，合并出来的会是一个带一堆修饰符的壳。 */
.dnsrow {
  display: grid;
  grid-template-columns: minmax(9rem, auto) 1fr minmax(8rem, auto);
  align-items: center;
  gap: var(--size-2) var(--size-3);
  padding: var(--size-2) var(--size-4);
  transition: background-color .15s var(--ease-3);
}

.dnsrow + .dnsrow {
  border-top: 1px solid var(--border-soft);
}

.dnsrow:hover {
  background: var(--surface-2);
}

.dnsrow__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--size-1);
}

/* min-width:0 是必须的：没有它，长 ISP 名会把 1fr 那列撑破整行 */
.dnsrow__id {
  min-inline-size: 0;
}

.dnsrow__ip {
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.dnsrow__net {
  margin-block-start: 2px;
  font-size: 12px;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

/* ECS 不是这台解析器的属性，是它替你交出去的东西——所以单独一行，且带个标签 */
.dnsrow__ecs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--size-1);
  margin-block-start: 4px;
  font-size: 11.5px;
  color: var(--text-mute);
}

.dnsrow__result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--size-1);
  font-size: 13px;
  text-align: right;
}

.dnsrow__count {
  font-size: 11.5px;
  color: var(--text-mute);
}

/* 出口归属：国旗标签 / ASN / ISP 三段并列，需要自己的间距 */
.dnsexit {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--size-1);
}

/* 空态与占位：一句话铺满整行，不参与三列 */
.dnsrow--empty {
  display: block;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
}

/* ---------------------------------------------------------------- 标签 */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--size-2);
  font-size: 12px;
  font-weight: var(--font-weight-6);
  line-height: 1.55;
  white-space: nowrap;
  border-radius: var(--radius-2);
}

.tag--cn     { background: var(--tag-cn-bg);     color: var(--tag-cn-fg); }
.tag--global { background: var(--tag-global-bg); color: var(--tag-global-fg); }

.tag--name {
  background: var(--tag-name-bg);
  color: var(--tag-name-fg);
  font-weight: var(--font-weight-5);
}

/* 检测结果用的三档：正常 / 需要留意 / 确认泄露，外加一档灰色表示没测到 */
.tag--ok    { background: var(--badge-green-bg); color: var(--badge-green-fg); }
.tag--warn  { background: var(--badge-amber-bg); color: var(--badge-amber-fg); }
.tag--leak  { background: var(--tag-danger-bg);  color: var(--tag-danger-color); }
.tag--muted { background: var(--badge-gray-bg);  color: var(--badge-gray-fg); font-weight: var(--font-weight-5); }

/* ---------------------------------------------------------------- 指纹页签 */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-1);
  margin-block-end: var(--size-4);
  padding: 4px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-3);
}

.tabs__item {
  flex: 1 1 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--size-2);
  padding: 8px var(--size-3);
  font-family: inherit;
  font-size: 14px;
  font-weight: var(--font-weight-5);
  color: var(--text-dim);
  background: transparent;
  border: 0;
  border-radius: var(--radius-2);
  cursor: pointer;
  transition: color .18s var(--ease-3), background-color .18s var(--ease-3);
}

.tabs__item:hover {
  color: var(--text);
  background: var(--surface-2);
}

.tabs__item.is-active {
  color: var(--accent-contrast);
  background: var(--teal-6);
}

/* 选中态下版本角标也得跟着反过来，否则浅灰落在实心绿上直接糊掉 */
.tabs__tag {
  padding: 1px 7px;
  font-size: 11px;
  font-family: var(--font-code);
  border-radius: var(--radius-round);
  background: var(--tag-name-bg);
  color: var(--tag-name-fg);
}

.tabs__item.is-active .tabs__tag {
  background: color-mix(in srgb, var(--accent-contrast) 22%, transparent);
  color: var(--accent-contrast);
}

/* ---------------------------------------------------------------- 指纹结果 */

.fp__desc {
  margin: 0 0 var(--size-4);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-dim);
}

/* 指纹值本身就是这一页的主角，给它一张独立的卡片，和首页的 .current 同一个分量 */
.hash {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--size-2) var(--size-3);
  padding: var(--size-3) var(--size-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-2);
}

.hash__eyebrow {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: var(--font-weight-6);
  letter-spacing: .08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.hash__value {
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 17px;
  font-weight: var(--font-weight-6);
  overflow-wrap: anywhere;
}

.hash__actions {
  flex: 0 0 auto;
  margin-inline-start: auto;
}

.fp__meta {
  margin: var(--size-2) 0 var(--size-5);
  font-size: 12.5px;
  color: var(--text-mute);
}

.fp__meta:empty {
  display: none;
}

/* ---------------------------------------------------------------- Claude 信号行 */

/* 与 .stun / .dnsrow 同属一张卡片里的行，但只有两列：左边「叫什么 / 怎么测」两层，右边结果。
   权重就写在名字后面——它是这一页最要紧的信息，读者要知道哪一项值得先改。 */
.sig {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, auto);
  align-items: center;
  gap: var(--size-2) var(--size-3);
  padding: var(--size-2) var(--size-4);
  transition: background-color .15s var(--ease-3);
}

.sig + .sig {
  border-top: 1px solid var(--border-soft);
}

.sig:hover {
  background: var(--surface-2);
}

/* 正在探测的那一行提亮：十项逐个点过去，读者能看见进度落在哪里 */
.sig.is-active {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.sig__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--size-1) var(--size-2);
}

.sig__name {
  font-size: 14.5px;
  font-weight: var(--font-weight-6);
}

.sig__desc {
  margin: 2px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

.sig__result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--size-1);
  font-size: 13px;
  text-align: right;
}

/* 检测值可能是一串字体名或两个地址，得允许折行，不然会把整行撑破 */
.sig__value {
  max-inline-size: 100%;
  white-space: normal;
  text-align: left;
  overflow-wrap: anywhere;
}

/* 这一项贡献的分数。没命中时压成灰，命中了跟着标签同一档颜色 */
.sig__points {
  font-size: 12px;
  color: var(--text-mute);
}

.sig__points--warn { color: var(--badge-amber-fg); }
.sig__points--leak { color: var(--badge-red-fg); }

/* 「Claude 同款」：唯一能与 Claude Code 已披露机制一一对应的信号，用蓝紫和其他标签区分开 */
.tag--claude {
  background: var(--tag-global-bg);
  color: var(--tag-global-fg);
}

/* ---------------------------------------------------------------- 正文 */

/* SEO 说明文字。首页没有这一块，所以这套排版只在检测页出现——
   它是给人读的文章，不是仪表，行高和段距都比表格宽松一档。 */
.prose {
  margin-block-start: var(--size-8);
  padding-block-start: var(--size-6);
  border-top: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.85;
}

.prose h2 {
  margin: var(--size-7) 0 var(--size-3);
  font-size: 19px;
  font-weight: var(--font-weight-7);
  letter-spacing: -.01em;
}

.prose h2:first-child {
  margin-block-start: 0;
}

.prose h3 {
  margin: var(--size-5) 0 var(--size-2);
  font-size: 16px;
  font-weight: var(--font-weight-6);
  color: var(--text-dim);
}

.prose p {
  margin: 0 0 var(--size-3);
  color: var(--text-dim);
}

.prose strong {
  color: var(--text);
  font-weight: var(--font-weight-6);
}

.prose ul,
.prose ol {
  margin: 0 0 var(--size-3);
  padding-inline-start: var(--size-5);
  color: var(--text-dim);
}

.prose li {
  margin-block-end: var(--size-2);
}

.prose a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.prose__note {
  padding: var(--size-3) var(--size-4);
  font-size: 13.5px;
  background: var(--surface-2);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius-2);
}

/* 扩展链接：链接一行、说明一行，说明压暗——先看清有哪几个，再决定要不要读为什么 */
.linklist {
  list-style: none;
  margin: 0 0 var(--size-4);
  padding: 0;
}

.linklist li {
  margin-block-end: var(--size-3);
  padding-inline-start: var(--size-3);
  border-inline-start: 2px solid var(--border);
}

.linklist a {
  display: block;
  font-weight: var(--font-weight-6);
  overflow-wrap: anywhere;
}

/* 用 text-dim 而不是 text-mute：这行是「为什么要装这个扩展」的正文，
   不是占位符——text-mute 铺在白底上只有 3:1，过不了 AA。 */
.linklist__note {
  display: block;
  margin-block-start: 2px;
  font-size: 13.5px;
  color: var(--text-dim);
}

/* 问答用 <dl>：这是语义上真正的「术语—释义」，也正好对上 FAQPage 结构化数据 */
.faq {
  margin: 0;
}

.faq dt {
  margin-block-start: var(--size-4);
  font-weight: var(--font-weight-6);
}

.faq dt:first-child {
  margin-block-start: 0;
}

.faq dd {
  margin: var(--size-1) 0 0;
  color: var(--text-dim);
}

/* ---------------------------------------------------------------- 页脚 */

/* 三段式：站点标识与简介 ｜ 政策与条款 ｜ 产品。
   左栏最宽（两句简介要能舒展开），产品栏里八个链接排成两列，三栏的高度因此大致齐平。 */
.foot {
  margin-block-start: var(--size-8);
  padding-block-start: var(--size-6);
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-dim);
}

.foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .75fr) minmax(0, 1.2fr);
  gap: var(--size-5) var(--size-6);
}

.foot__logo {
  display: inline-block;
  margin-block-end: var(--size-2);
  line-height: 0;
  border-radius: var(--radius-2);
}

.foot__logo img {
  width: 108px;
  height: auto;
}

.foot__about {
  margin: 0 0 4px;
  font-size: 13.5px;
  line-height: 1.7;
}

/* 与分组标题 .group__title 同一套写法：小号、加粗、拉开字距 */
.foot__title {
  margin: 4px 0 var(--size-2);
  font-size: 12px;
  font-weight: var(--font-weight-6);
  letter-spacing: .1em;
  color: var(--text);
}

/* normalize 给 ul 定了 1.1rem 的字号、给 li 加了左内边距，页脚里两者都不要 */
.foot__list {
  margin: 0;
  padding: 0;
  font-size: inherit;
  list-style: none;
}

.foot__list li {
  margin: 0;
  padding: 0;
}

.foot__list--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--size-3);
}

.foot__link {
  display: inline-block;
  padding-block: 3px;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s var(--ease-3);
}

.foot__link:hover {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.foot__copy {
  margin: var(--size-5) 0 0;
  padding-block-start: var(--size-3);
  border-top: 1px solid var(--border-soft);
  font-family: var(--font-code);
  font-size: 12.5px;
  color: var(--text-mute);
  text-align: center;
}

/* 窄屏：站点标识独占一行，后两栏并排在下面 */
@media (max-width: 640px) {
  .foot__grid {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: var(--size-5) var(--size-4);
  }

  .foot__col--brand {
    grid-column: 1 / -1;
  }
}

/* ---------------------------------------------------------------- 正文页（隐私政策 / 服务条款） */

/* 同一套 .prose 排版，但它就是整页的主体，不是检测结果下面的附录：去掉顶部分隔线与大段留白 */
.prose--page {
  margin-block-start: 0;
  padding-block-start: 0;
  border-top: 0;
}

.prose__meta {
  margin: 0 0 var(--size-5);
  font-size: 13px;
  color: var(--text-mute);
  text-align: center;
}

/* ---------------------------------------------------------------- 可访问性 */

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
  border-radius: var(--radius-2);
}

/* 外壳已经用光环表达了焦点，输入框内部不再套第二层轮廓 */
.query__input:focus-visible {
  outline: none;
}

/* 绿底按钮上再描一圈绿轮廓等于没有，键盘焦点在这里改用正文色 */
.query__submit:focus-visible {
  outline-color: var(--text);
}

/* ---------------------------------------------------------------- 入场 */

/* 结果区轻微上浮，只有一次、200ms 级别：足够让「查询完成了」被感知，
   又短到不会让人等它。 */
@keyframes ipcx-rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

@keyframes ipcx-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.current,
.esim-banner,
.group {
  animation: ipcx-rise .32s var(--ease-out-3) backwards;
}

.esim-banner { animation-delay: .02s; }

.group:nth-of-type(1) { animation-delay: .04s; }
.group:nth-of-type(2) { animation-delay: .08s; }
.group:nth-of-type(n+3) { animation-delay: .12s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------- 窄屏 */

@media (max-width: 480px) {
  .wrap {
    padding-block: var(--size-5) var(--size-7);
  }

  .site__logo img {
    width: 176px;
  }

  /* 窄屏放不下 1/3 中心线，退回上下堆叠，两列都靠左。 */
  .row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 2px;
    padding-inline: var(--size-3);
  }

  .row__label {
    text-align: left;
    font-size: 12.5px;
    letter-spacing: .02em;
  }

  /* 窄屏行改为上下堆叠，进度条不再与标签抢那 1/3 的宽度，可以铺开一点 */
  .score__bar {
    inline-size: min(180px, 46vw);
  }

  .current {
    align-items: flex-start;
    padding-inline: var(--size-4);
  }

  /* 推广条：按钮收紧、文案缩一号，390px 宽的手机整句还能两行放下；
     更窄的机型允许第三行，三行 11px 加标题仍在 65px 之内。 */
  .esim-banner {
    gap: 10px;
    padding-inline: var(--size-3) 10px;
  }

  .esim-banner__title {
    font-size: 13px;
    line-height: 1.25;
  }

  .esim-banner__desc {
    -webkit-line-clamp: 3;
    font-size: 11px;
    line-height: 1.3;
  }

  .esim-banner__cta {
    min-block-size: 30px;
    padding-inline: 10px;
    font-size: 12px;
  }

  /* 拇指够得着：手机上按钮的高度不低于 40px */
  .query__submit {
    min-height: 40px;
    padding-inline: var(--size-3);
  }

  .copy__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .copy {
    padding: 9px;
  }

  /* 复制按钮在窄屏收成 34px 的方块，遮罩按钮跟上，两枚在右侧对齐成一列 */
  .mask {
    inline-size: 34px;
    block-size: 34px;
  }

  /* 三列在手机上每列只剩几个字，退回上下堆叠，结果行改为左对齐 */
  .stun {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-inline: var(--size-3);
  }

  .stun__result {
    justify-content: flex-start;
    text-align: left;
  }

  .dnsrow {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-inline: var(--size-3);
  }

  .dnsrow__result {
    justify-content: flex-start;
    text-align: left;
  }

  .sig {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-inline: var(--size-3);
  }

  .sig__result {
    justify-content: flex-start;
    text-align: left;
  }

  .hero__title {
    font-size: 22px;
  }

  /* 没有 JS 时导航不折叠（见上面 640px 那段），五个入口在手机上排成规整的两列。
     flex-basis 给 40% 而不是 auto：按文字宽度排会变成 3 + 1 那种参差。
     有 JS 的访客走的是折叠菜单，这条规则不能碰到菜单卡片里的那一列。 */
  :root:not(.has-js) .nav__item {
    flex: 1 1 40%;
    text-align: center;
    padding-inline: var(--size-2);
    font-size: 13px;
  }

  .tabs__item {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .prose {
    font-size: 14.5px;
  }
}

/* ---------------------------------------------------------------- 打印 */

@media print {
  body {
    background: none;
  }

  .query,
  .navbar,
  .probe__bar,
  .tabs,
  .hash__actions,
  .current__actions,
  .esim-banner,
  .verify,
  .foot__col--products {
    display: none;
  }

  .rows,
  .current {
    box-shadow: none;
  }
}
