/* =====================================================================
   styles.css — 入口页（index.html）的设计系统。

   **配色和控件照 privatepdf.io 做**（Tailwind v4 的默认色板：stone-50 底、
   white 卡片、zinc-200 边框、neutral 文字、indigo-600 主色），版式骨架还是
   原来那套：白色顶栏 + hero + 一排分类筛选药丸 + 工具卡片网格 + 多列页脚。
   工具页那边另有一份 assets/img/img.css，用的是同一套 token。

   零外部依赖：不加载任何第三方字体、图标或脚本。
   No external requests. System fonts only.
   ===================================================================== */

/* ---------- 设计令牌 / Design tokens ---------- */
:root {
  /* 全站一套色，照 privatepdf.io 抄（Tailwind v4 默认色板）：
     整页 stone-50、卡片纯白、边框 zinc-200、正文 neutral-700、主色 indigo-600。
     和 assets/img/img.css 里那份是同一套值 —— 工具页和首页看起来才是同一个站。 */
  --page:          #fafaf9;   /* stone-50 */
  --bg:            #ffffff;
  --bg-elevated:   #ffffff;
  --bg-sunken:     #f5f5f4;
  --bg-hover:      #f5f5f4;

  --chip-on:       #4f39f6;   /* 选中的筛选药丸：主色（原来是近黑） */
  --chip-on-fg:    #ffffff;
  --heading:       #171717;   /* neutral-900 */
  --text:          #404040;   /* neutral-700 */
  --text-muted:    #525252;
  --text-faint:    #737373;

  --border:        #e4e4e7;   /* zinc-200 */
  --border-strong: #d4d4d8;   /* zinc-300 */

  /* 主色 indigo-600 #4f39f6（Tailwind v4 的值，实测过参考站那颗主按钮）。
     红只留给报错和「会发数据出去」的警示 —— 两者同色的时候一屏里分不出来。 */
  --accent:        #4f39f6;
  --accent-hover:  #432dd7;
  --accent-soft:   #eef2ff;

  --local:         #16a34a;   /* 纯本地 */
  --local-soft:    #dcfce7;
  --cdn:           #d97706;   /* 需联网加载库 */
  --cdn-soft:      #fef3c7;
  --network:       #dc2626;   /* 发送数据至第三方 */
  --network-soft:  #fee2e2;

  /* 首页第一屏（hero）自己的一套色：整幅米白底 + 靛蓝→紫的渐变字。
     底色比整页再暖一点（参考站那一屏就是 #FAF8F5，和 body 的 stone-50
     差一点点）；靛蓝跟全站同一支，别再单独调。 */
  --hero-bg:       #faf8f5;
  --hero-ink:      #18181b;   /* 标题：近黑，不用品牌色 —— 渐变那行才是主角 */
  --hero-muted:    #52525b;
  --hero-line:     #e8e4dd;
  --hero-brand:    #4f39f6;
  --hero-brand-h:  #432dd7;
  --hero-brand-2:  #7c3aed;
  --hero-brand-3:  #a855f7;
  --hero-brand-soft: #eef2ff;
  --hero-card:     #ffffff;
  --hero-glow:     #efece5;   /* 插图背后那团很淡的光 */
  /* 页脚：参考站是浅色的（白底 + 一条上边框 + 灰字），不是深色大块 */
  --foot-bg:       rgba(255,255,255,.55);
  --foot-fg:       #525252;
  --foot-strong:   #171717;
  --foot-line:     #e4e4e7;

  --radius:        12px;   /* 按钮 */
  --radius-card:   20px;   /* 卡片 */
  --radius-sm:     8px;
  --radius-pill:   99px;
  /* 阴影是 Tailwind 那两层很浅的投影（参考站的卡片几乎就是「一条边」）*/
  --shadow:        0 1px 3px rgba(0,0,0,.10), 0 1px 2px -1px rgba(0,0,0,.10);
  --shadow-lg:     0 10px 15px -3px rgba(0,0,0,.10), 0 4px 6px -4px rgba(0,0,0,.10);

  /* hero 清单里那个对勾：做成遮罩用的 SVG（颜色由 background 决定，
     所以暗色主题下不用再画一份）。与主题无关，三套色板共用这一条。 */
  --check-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.8 12.6l4.6 4.6 9.8-10' fill='none' stroke='%23000' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page:          #0a0a0a;
    --bg:            #171717;
    --bg-elevated:   #171717;
    --bg-sunken:     #262626;
    --bg-hover:      #262626;
    --chip-on:       #818cf8;   /* 选中的药丸：暗色下用亮靛蓝 */
    --chip-on-fg:    #171717;
    --heading:       #f5f5f5;
    --text:          #d4d4d4;
    --text-muted:    #a3a3a3;
    --text-faint:    #737373;
    --border:        #2e2e2e;
    --border-strong: #404040;
    --accent:        #818cf8;
    --accent-hover:  #a5b4fc;
    --accent-soft:   #1e1b4b;
    --local:         #4ade80;
    --local-soft:    #052e16;
    --cdn:           #fbbf24;
    --cdn-soft:      #451a03;
    --network:       #f87171;
    --network-soft:  #450a0a;
    /* hero 那一套跟着暗色走：米白底换成偏暖的深灰，靛蓝提亮两档
       （#4f46e5 压在深底上发闷，看不清） */
    --hero-bg:       #1a1917;
    --hero-ink:      #f4f4f5;
    --hero-muted:    #a1a1aa;
    --hero-line:     #2e2c29;
    --hero-brand:    #818cf8;
    --hero-brand-h:  #a5b4fc;
    --hero-brand-2:  #a78bfa;
    --hero-brand-3:  #c084fc;
    --hero-brand-soft: #221f3d;
    --hero-card:     #232228;
    --hero-glow:     #262421;
    --foot-bg:       rgba(23,23,23,.55);
    --foot-fg:       #a3a3a3;
    --foot-strong:   #f5f5f5;
    --foot-line:     #2e2e2e;
    --shadow:        0 1px 3px rgba(0,0,0,.5), 0 1px 2px -1px rgba(0,0,0,.5);
    --shadow-lg:     0 10px 15px -3px rgba(0,0,0,.5), 0 4px 6px -4px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --page:          #0a0a0a;
  --bg:            #171717;
  --bg-elevated:   #171717;
  --bg-sunken:     #262626;
  --bg-hover:      #262626;
  --chip-on:       #818cf8;
  --chip-on-fg:    #171717;
  --heading:       #f5f5f5;
  --text:          #d4d4d4;
  --text-muted:    #a3a3a3;
  --text-faint:    #737373;
  --border:        #2e2e2e;
  --border-strong: #404040;
  --accent:        #818cf8;
  --accent-hover:  #a5b4fc;
  --accent-soft:   #1e1b4b;
  --local:         #4ade80;
  --local-soft:    #052e16;
  --cdn:           #fbbf24;
  --cdn-soft:      #451a03;
  --network:       #f87171;
  --network-soft:  #450a0a;
  --hero-bg:       #1a1917;
  --hero-ink:      #f4f4f5;
  --hero-muted:    #a1a1aa;
  --hero-line:     #2e2c29;
  --hero-brand:    #818cf8;
  --hero-brand-h:  #a5b4fc;
  --hero-brand-2:  #a78bfa;
  --hero-brand-3:  #c084fc;
  --hero-brand-soft: #221f3d;
  --hero-card:     #232228;
  --hero-glow:     #262421;
  --foot-bg:       rgba(23,23,23,.55);
  --foot-fg:       #a3a3a3;
  --foot-strong:   #f5f5f5;
  --foot-line:     #2e2e2e;
  --shadow:        0 1px 3px rgba(0,0,0,.5), 0 1px 2px -1px rgba(0,0,0,.5);
  --shadow-lg:     0 10px 15px -3px rgba(0,0,0,.5), 0 4px 6px -4px rgba(0,0,0,.5);
}

/* ---------- 基础 / Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--page); overflow-x: clip; }
body {
  margin: 0; background: none; color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 {
  margin: 0 0 .5em; font-weight: 700; line-height: 1.25; letter-spacing: -.02em;
  color: var(--heading);
}
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .88em; }
kbd {
  background: var(--bg-sunken); border: 1px solid var(--border);
  border-bottom-width: 2px; border-radius: 4px; padding: .1em .4em; font-size: .82em;
}
::selection { background: var(--accent-soft); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Hero（首页第一屏） ---------- */
/* 这一屏是照 privatepdf.io 的首页做的：一整幅米白底，左边一列文字、
   右边一摞浮起来的卡片。左边从上到下依次是：
     小徽章 → 超大标题（第二行是靛蓝→紫的渐变字）→ 副标题（关键词加粗）
     → 2×2 的对勾清单（两列中间一条竖线）→ 主按钮 + 一句「试试看」的批注。
   字号是照着量的：它那条标题 lg 档 60px/800、副标题 20px、清单 14px。
   中文的字面比拉丁字母满，同一个字号看着更重，所以标题取 54、副标题取 19
   —— 对齐的是视觉重量，不跟数字较劲。 */
.hero {
  background: var(--hero-bg);
  border-bottom: 1px solid var(--hero-line);
  padding: 72px 0 84px;
}
.hero__in { display: flex; align-items: center; gap: 48px; }
.hero__text { flex: 1 1 auto; min-width: 0; }

/* 顶上那枚小徽章：呼吸的小圆点 + 一句「100% 免费 & 本地处理」 */
.hero__badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px 7px 13px; margin-bottom: 24px;
  border-radius: var(--radius-pill);
  background: var(--hero-brand-soft); color: var(--hero-brand);
  font-size: 13.5px; font-weight: 700;
}
.hero__badge i {
  position: relative; width: 7px; height: 7px; border-radius: 50%;
  background: var(--hero-brand); flex: none;
}
/* 荡开的那圈：animation 只用 transform/opacity，主线程忙的时候也不卡 */
.hero__badge i::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: var(--hero-brand); animation: hero-ping 1.9s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes hero-ping {
  0%        { transform: scale(1);   opacity: .55; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}

.hero h1 {
  font-size: clamp(34px, 4.3vw, 54px); font-weight: 800;
  line-height: 1.16; letter-spacing: -.035em;
  color: var(--hero-ink); margin: 0 0 20px;
}
/* 渐变字：background-clip:text 的老写法要带 -webkit- 前缀，
   Firefox 认无前缀那条 —— 两条都写上 */
.hero h1 .gr {
  background-image: linear-gradient(96deg, var(--hero-brand), var(--hero-brand-2) 58%, var(--hero-brand-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* 宽度用 em 不用 ch：ch 量的是「0」的宽度，中文一行放几个字跟它没关系
   （46ch 在这里只折出 23 个字，末尾会孤零零掉下一个词）。31em ≈ 一行
   31 个字，这段正好三行多一点。 */
.hero__sub {
  max-width: 31em; margin: 0 0 30px; text-wrap: pretty;
  font-size: 20px; line-height: 1.75; color: var(--hero-muted);
}
.hero__sub b { color: var(--hero-ink); font-weight: 700; }

/* 2×2 对勾清单。参考站是两列、中间一条竖线 —— 用两个 ul 并排做，
   第二列加左边框，比在一列里塞伪元素干净。 */
.hero__checks { display: flex; gap: 28px; margin: 0 0 34px; }
.hero__checks ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 13px;
}
.hero__checks ul + ul {
  border-left: 1px solid var(--hero-line); padding-left: 28px;
}
.hero__checks li {
  position: relative; padding-left: 29px;
  font-size: 15.5px; line-height: 1.45; color: var(--hero-muted);
}
/* 圆底 */
.hero__checks li::before {
  content: ''; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%; background: var(--hero-brand-soft);
}
/* 勾用遮罩画的：颜色跟着 background 走，暗色主题下自动换成亮靛蓝 */
.hero__checks li::after {
  content: ''; position: absolute; left: 4.5px; top: 4.5px;
  width: 11px; height: 11px; background: var(--hero-brand);
  -webkit-mask: var(--check-mask) center / contain no-repeat;
  mask: var(--check-mask) center / contain no-repeat;
}

/* 窄屏：清单并成一条竖的 —— 两个窄列并排，每行只有五六个字就折行，
   中间那条竖线还会贴到字上。 */
@media (max-width: 620px) {
  .hero__checks { flex-direction: column; gap: 13px; }
  .hero__checks ul + ul { border-left: 0; padding-left: 0; }
}

.hero__cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero__btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: var(--radius);
  background: var(--hero-brand); color: #fff;
  font-size: 17px; font-weight: 700;
  box-shadow: 0 12px 26px -10px rgba(79, 70, 229, .7);
  transition: background .14s, box-shadow .14s;
}
.hero__btn:hover { background: var(--hero-brand-h); color: #fff; }
.hero__btn svg { width: 18px; height: 18px; transition: transform .16s; }
.hero__btn:hover svg { transform: translateX(4px); }
.hero__try {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 8px;
  background: var(--hero-brand-soft); color: var(--hero-brand);
  font-size: 13px; font-weight: 800; letter-spacing: .04em;
}
.hero__try b { font-size: 20px; line-height: 1; font-weight: 400; }

/* ---------- Hero 右边那摞卡片（纯 CSS 画的，没有图片请求） ---------- */
/* 参考站右边是一摞浮起来的小卡片 + 背后一团很淡的光。这里照做：
   一张主卡（一张图正在压缩，带进度）+ 左右各一张压在后面的卡
   + 一枚「100% 本地处理」的小牌子。全是 div 和渐变，不加载任何图片。 */
.hero__art {
  position: relative; flex: 0 0 430px; height: 360px;
  display: none;                      /* 窄屏藏掉，别把文字挤扁 */
}
@media (min-width: 1060px) { .hero__art { display: block; } }
.hero__art .art-glow {
  position: absolute; inset: -6% -2%;
  background: radial-gradient(closest-side, var(--hero-glow), transparent 76%);
  border-radius: 50%;
}
.hcard {
  position: absolute; border-radius: 18px;
  background: var(--hero-card); border: 1px solid var(--hero-line);
  box-shadow: 0 20px 45px -22px rgba(24, 24, 27, .38), 0 2px 6px rgba(24, 24, 27, .05);
}
/* 后面左右两张：压扁一点、转个角度，露出一个角就够了 */
.hcard--l { left: -4px; top: 54px; width: 176px; height: 236px; padding: 14px; transform: rotate(-7deg); opacity: .96; }
.hcard--r { right: -6px; top: 40px; width: 184px; height: 244px; padding: 14px; transform: rotate(7deg); opacity: .96; }
.hcard--main { left: 50%; top: 30px; width: 244px; padding: 18px; transform: translateX(-50%); z-index: 3; }
.hero__art .art-pill {
  position: absolute; right: 2px; top: 4px; z-index: 4;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: var(--radius-pill);
  background: var(--hero-card); border: 1px solid var(--hero-line);
  box-shadow: 0 10px 22px -12px rgba(24, 24, 27, .35);
  font-size: 13px; font-weight: 700; color: var(--hero-ink);
}
.hero__art .art-pill i {
  width: 7px; height: 7px; border-radius: 50%; background: #16a34a; flex: none;
}

/* 主卡里的一行行 */
.hcard__top { display: flex; align-items: center; gap: 10px; }
.hcard__ic {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: var(--hero-brand-soft); color: var(--hero-brand);
  display: grid; place-items: center;
}
.hcard__ic svg { width: 19px; height: 19px; }
.hcard__name { display: block; font-size: 14.5px; font-weight: 700; color: var(--hero-ink); }
.hcard__meta { display: block; font-size: 12.5px; color: var(--hero-muted); margin-top: 3px; }
.hrow { display: flex; align-items: center; gap: 9px; margin-top: 14px; }
.hdot { width: 15px; height: 15px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.hdot--ok { background: #dcfce7; color: #16a34a; }
.hdot--ok svg { width: 9px; height: 9px; }
.hdot--run { background: var(--hero-brand); box-shadow: 0 0 0 3px var(--hero-brand-soft); }
.hbar { height: 6px; border-radius: 99px; background: var(--hero-line); flex: 1 1 auto; }
.hbar--half { flex: 0 0 42%; }
.hbar--on {
  background: linear-gradient(90deg, var(--hero-brand), var(--hero-brand-2));
  flex: 0 0 62%;
}
.hcard__foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--hero-line);
  font-size: 12.5px;
}
.hcard__foot b { color: var(--hero-brand); font-weight: 800; }
.hcard__foot span:last-child { color: var(--hero-muted); }
/* 后面两张卡里的装饰：一条缩略图 + 两行灰条 / 四格缩略图。
   饱和度压得很低 —— 它们是陪衬，抢了主卡的注意力就本末倒置了
   （参考站那两张背后的小卡几乎就是灰白的）。 */
.hthumb {
  height: 84px; border-radius: 11px;
  background: linear-gradient(150deg, #dbeafe, #c7d2fe 58%, #ddd6fe);
}
.hline { height: 7px; border-radius: 99px; background: var(--hero-line); margin-top: 10px; }
.hline--s { width: 58%; }
.hcards4 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.hcards4 i {
  display: block; height: 66px; border-radius: 10px;
  background: linear-gradient(150deg, #fef3c7, #fde68a);
}
.hcards4 i:nth-child(2) { background: linear-gradient(150deg, #d1fae5, #a7f3d0); }
.hcards4 i:nth-child(3) { background: linear-gradient(150deg, #e0e7ff, #c7d2fe); }
.hcards4 i:nth-child(4) { background: linear-gradient(150deg, #ffe4e6, #fecdd3); }

/* 工具区最下面那行小字（「本站没有服务端…⌘K…」）。
   以前挂在 hero 里，hero 改成左文右图之后它是另一件事了，单独一行。 */
.page-note {
  margin: 26px auto 0; max-width: 74ch; text-align: center;
  font-size: 14px; color: var(--text-faint); line-height: 1.8;
}

/* ---------- 分类筛选药丸 ---------- */
/* 药丸从 hero 里挪到了工具区顶上：hero 是左对齐的排版，药丸跟着左对齐，
   正好压在一排分类标题上面。 */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 34px 0 20px;
}
.chip {
  font: inherit; font-size: 14.5px; cursor: pointer;
  background: var(--bg-elevated); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 9px 18px; display: inline-flex; align-items: center; gap: 7px;
  transition: background .12s, border-color .12s, color .12s, transform .12s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
/* 选中的那颗用主色填实 —— 和工具页里的页签、开关是同一套「选中」的写法。 */
.chip[aria-pressed="true"] {
  background: var(--chip-on); border-color: var(--chip-on); color: var(--chip-on-fg);
  font-weight: 600;
}
.chip[aria-pressed="true"]:hover { color: var(--chip-on-fg); }
.chip .dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--tile, var(--text-faint));
}
.chip[aria-pressed="true"] .dot { background: var(--chip-on-fg); }
.chip .count { font-size: .88em; opacity: .65; font-variant-numeric: tabular-nums; }

/* ---------- 分组标题 ---------- */
.sec-title {
  margin: 44px 0 16px; font-size: 17px; font-weight: 700;
  color: var(--text); display: flex; align-items: center; gap: 9px;
}
.sec-title::before {
  content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: var(--tile, var(--text-faint));
}
.sec-title .n { font-weight: 500; font-size: 14px; color: var(--text-faint); }
.section { margin: 0 0 8px; scroll-margin-top: 84px; }

/* ---------- 工具卡片 ---------- */
/* 卡片：图标在左上角、然后是标题和两行说明。字号照 iLoveIMG 的卡片量
   （它的标题约 18.5px、正文约 15px）往下压一点 —— 一屏要摆十几张，
   照搬原尺寸就摆不下了，取中间值兼顾「看得清」和「一屏装得下」。 */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(208px, 1fr));
}
.card {
  display: flex; flex-direction: column; gap: 9px;
  background: var(--bg-elevated); border-radius: var(--radius-card);
  padding: 20px 20px 18px; color: inherit; position: relative;
  box-shadow: var(--shadow);
  transition: box-shadow .16s, transform .16s;
}
.card:hover {
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-lg); transform: translateY(-2px);
}
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card .top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.card h3 {
  margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.015em;
  color: var(--heading);
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
}
/* 图标：和 iLoveIMG 一样是彩色的图形摆在左上角，没有底色块。
   图来自 assets/site/icons.js 那一套自绘 SVG，颜色用分类色（--tile），
   所以一屏卡片扫过去能看出「这几张是一类」。 */
.card .ic {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  color: var(--tile, var(--text-muted));
}
.card .ic svg { width: 30px; height: 30px; display: block; }
.card p {
  margin: 0; font-size: 15px; color: var(--text-muted); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .foot {
  margin-top: auto; padding-top: 8px; display: flex; align-items: center;
  gap: 8px; flex-wrap: wrap;
}
.card .slug {
  font-family: var(--mono); font-size: 12.5px; color: var(--text-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- 空状态 ---------- */
.empty {
  text-align: center; padding: 56px 20px; color: var(--text-muted);
  background: var(--bg-sunken); border-radius: var(--radius);
}
.empty .chip { background: var(--bg-elevated); }

/* ---------- 广告位 ---------- */
/* 首页那条 970×90 的横幅：位置和尺寸对着 iLoveIMG 的量 —— 工具网格下面、
   页脚上面，居中的一条。现在放的是占位框（本站不接广告脚本）。
   要接 Google AdSense：① 在 <head> 里加 <script async src=".../adsbygoogle.js?client=ca-pub-XXXX">；
   ② 把这个 div 换成 <ins class="adsbygoogle" ...></ins> 并 push({})。
   工具页那边配了一份同样的（.adslot，在 img.css 里）。 */
.adslot {
  display: flex; align-items: center; justify-content: center;
  width: 100%; max-width: 970px; height: 90px;
  margin: 40px auto 0; padding: 0 8px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text-faint); font-size: 12px; letter-spacing: .1em;
}
.adslot span { pointer-events: none; }
@media (max-width: 760px) {
  .adslot { max-width: 320px; height: 100px; }
}

/* ---------- 页脚 ---------- */
/* 页脚按分类分列 ——
   每一列是一个分类，列里的每一条是一个工具（数据从 tools-data.js 来）。 */
/* 页脚：浅色 + 一条上边框（照参考站），不再是深色大块 */
.site-footer {
  margin-top: 56px;
  background: var(--foot-bg); color: var(--foot-fg);
  border-top: 1px solid var(--border);
  padding: 40px 0 26px; font-size: 14px;
}
.site-footer .cols {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.site-footer h4 {
  color: var(--foot-strong); font-size: 13px; letter-spacing: .08em;
  margin: 0 0 12px; font-weight: 700;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: var(--foot-fg); }
.site-footer a:hover { color: var(--foot-strong); }
.site-footer .bottom {
  margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--foot-line);
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
  color: var(--foot-fg); font-size: 13.5px;
}
.site-footer .bottom .grow { flex: 1 1 auto; }

/* ---------- 联系我们（contact.html） ----------
   一页纸的内容：一张居中的卡片，邮箱是最大那颗靛蓝按钮。没做表单 ——
   本站没有服务端，表单要么发不出去、要么就成了「偷偷发数据」，两样都不行。
   姊妹站 pdftools 也是这一页、这一套写法。 */
.contact { padding: 56px 0 8px; }
.contact__card {
  max-width: 620px; margin: 0 auto; text-align: center;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--shadow);
  padding: 40px 36px 32px;
}
.contact__ic {
  width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.contact__ic svg { width: 27px; height: 27px; display: block; }
.contact h1 { font-size: 32px; margin: 0 0 12px; }
.contact .lede {
  margin: 0 auto 26px; max-width: 44ch; text-wrap: pretty;
  font-size: 17px; line-height: 1.75; color: var(--text-muted);
}
.contact__mail {
  display: flex; gap: 10px; align-items: center; justify-content: center;
  flex-wrap: wrap; margin-bottom: 8px;
}
.mailbtn {
  font-size: 18px; font-weight: 600; letter-spacing: .01em;
  padding: 14px 24px; border-radius: 12px;
  background: var(--accent); color: #fff;
  box-shadow: var(--shadow);
  transition: background .14s;
}
.mailbtn:hover { background: var(--accent-hover); color: #fff; }
.copybtn {
  padding: 13px 18px; border-radius: 12px; font-size: 15.5px; cursor: pointer;
  background: var(--bg-elevated); color: var(--text);
  border: 1px solid var(--border-strong);
  transition: background .14s, color .14s;
}
.copybtn:hover { border-color: var(--border-strong); background: var(--bg-sunken); color: var(--text); }
.contact__ok { margin: 10px 0 0; font-size: 14px; color: var(--local); min-height: 1.2em; }
.contact__tips {
  list-style: none; margin: 26px 0 22px; padding: 22px 0 0; text-align: left;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 11px;
}
.contact__tips li {
  position: relative; padding-left: 20px;
  font-size: 15px; line-height: 1.65; color: var(--text-muted);
}
.contact__tips li::before {
  content: ""; position: absolute; left: 2px; top: .58em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.contact__tips b { color: var(--heading); }
.contact__note { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--text-faint); }
@media (max-width: 640px) {
  .contact { padding: 30px 0 6px; }
  .contact__card { padding: 28px 20px 24px; }
  .contact h1 { font-size: 25px; }
}

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-elevated); border: 0;
  color: var(--text-muted); cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow-lg); font-size: 17px; padding: 0;
  opacity: 0; pointer-events: none; transition: opacity .18s, color .12s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { color: var(--accent); }

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .hero { padding: 40px 0 46px; }
  .hero h1 { font-size: 34px; }
  .hero__sub { font-size: 16.5px; max-width: none; }
  .hero__badge { margin-bottom: 18px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .grid { grid-template-columns: 1fr; }
  .to-top { right: 12px; bottom: 12px; }
}

@media print {
  .to-top, .filters, .adslot { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}
