@charset "UTF-8";
/* 通搜 style.css
   色号 4 种：--ink 正文 / --paper 底色 / --link 链接 / --desc 摘要（其余深浅一律靠 opacity）
   字号 4 种：根字号（正文）/ --xs 辅助 / --md 结果标题 / --lg 站名与页标题
   移动优先：基础样式按窄屏写，40rem 以上再加宽；工具条横向滚动不换行
   全站直角：统一 border-radius 0，并抹掉输入框在 iOS 上的默认圆角
   无 JS，无 px 字号，无 # 配色 */

*,*::before,*::after{ box-sizing: border-box; border-radius: 0; }

:root{
  --ink:   hsl(210 9% 14%);
  --paper: hsl(0 0% 100%);
  --link:  #1a0dab;   /* Google 搜索结果的链接蓝，沿用是为了让人不用重新适应 */
  --desc:  #6c6c6c;   /* 摘要灰。Google 实际用 #4d5156（更深），这里取浅一档 */
  --xs: 0.75rem;
  --sm: 0.88rem;   /* 摘要：比标题小一档，比辅助字大一档 */
  --md: 1.02rem;
  --lg: 1.3rem;
  --icon: 1.3rem;   /* 顶栏图标统一尺寸，5 个共用这一个值 */
}

html{
  font-size: clamp(1rem, 0.95rem + 0.1vw, 1.02rem);   /* 下限 1rem＝16px，iOS 聚焦输入框才不会自动放大 */
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

/* 深色：只翻这四个色变量，其余深浅本来就是 opacity 算出来的，自动跟着走。
   链接蓝要提亮 —— #1a0dab 在深底上几乎看不见。 */
html[data-theme="dark"]{
  --ink:   hsl(210 12% 88%);
  --paper: hsl(210 10% 12%);
  --link:  #8ab4f8;
  --desc:  #9aa3ab;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark){
  html[data-theme="auto"]{
    --ink:   hsl(210 12% 88%);
    --paper: hsl(210 10% 12%);
    --link:  #8ab4f8;
    --desc:  #9aa3ab;
    color-scheme: dark;
  }
}

body{
  margin: 0;
  font-family: "PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  line-height: 1.5;
}

.wrap{ width: 100%; padding-inline: .85rem; margin-inline: auto; }
a{ color: inherit; }
:focus-visible{ outline: 2px solid var(--link); outline-offset: 1px; }

/* 顶栏：站名 + 搜索框，一直贴在页面顶部 */
.head{ position: sticky; top: 0; background: var(--paper); z-index: 2; border-bottom: 1px solid var(--ink); }
.headin{ display: flex; align-items: center; gap: .55rem; padding-block: .6rem; }
.logo{
  font-family: "Songti SC","Noto Serif CJK SC","SimSun",serif;
  font-size: var(--lg); font-weight: 700; letter-spacing: .12em;
  text-decoration: none; white-space: nowrap; flex: none;
}
.sform{ display: flex; flex: 1 1 auto; min-width: 0; border: 1px solid var(--ink); }
.q{
  flex: 1 1 auto; min-width: 0; font: inherit; color: inherit;
  background: var(--paper); border: 0; padding: .4rem .5rem; appearance: none;
}
.q:focus{ outline: 0; }
.sform:focus-within{ box-shadow: inset 0 0 0 1px var(--ink); }
.go{
  font: inherit; color: var(--paper); background: var(--ink);
  border: 0; padding: .4rem .8rem; cursor: pointer; appearance: none; flex: none;
}
.go:hover{ opacity: .85; }

/* 顶栏右侧图标组：与 logo、搜索框同一行，靠屏幕右缘 */
/* .headbar 不能加左右 padding —— .headin 的 50% 按它的内容宽算，加了搜索框右缘就和结果列错位 */
.headbar{ display: flex; align-items: center; }
.headbar > .wrap{ flex: none; }
.icons{ display: none; margin-left: auto; gap: .9rem; padding-right: 1.4rem; }
.ic{ display: flex; color: var(--ink); opacity: .55; }
.ic:hover{ opacity: 1; }
.ic svg{ display: block; width: var(--icon); height: var(--icon); }

/* 分类 tab + 筛选工具 + 导出/设置 同一行；筛选面板是绝对定位的下拉，不再把结果推下去 */
.toolrow{ display: flex; align-items: center; gap: .6rem; font-size: var(--xs); padding-bottom: .5rem; position: relative; }
.verts{
  display: flex; gap: .1rem; min-width: 0;
  overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.verts::-webkit-scrollbar{ display: none; }
.vt,.verts .on{ padding: .3rem .6rem; border-bottom: 2px solid transparent; }   /* 未选中也占住 2px，切换时不跳动 */
.verts .on{ background: none; color: var(--ink); border-bottom-color: var(--ink); }   /* 选中态用下划线，不用实心块 */
.vt{ color: var(--link); text-decoration: none; }
.vt:hover{ text-decoration: underline; }
.verts .on{ font-weight: 700; border-bottom-color: var(--ink); }

/* 筛选工具：默认收起（details/summary，无需 JS） */
.tools{ flex: none; min-width: 0; }
.acts{ flex: none; margin-left: auto; display: flex; gap: .7rem; }
.panel{
  position: absolute; left: 0; right: 0; top: 100%; z-index: 3;
  background: var(--paper); border-bottom: 1px solid var(--ink); padding-bottom: .6rem;
}
.exp,.set{ font-size: var(--xs); color: var(--link); text-decoration: none; padding-block: .1rem; }
.exp:hover,.set:hover{ text-decoration: underline; }
.tools > summary{
  display: flex; align-items: center; gap: .3rem; width: max-content;
  list-style: none; cursor: pointer; font-size: var(--xs); color: var(--link); padding-block: .1rem;
}
.tools > summary::-webkit-details-marker{ display: none; }
/* 用 CSS 转义写全角加减号 —— 纯 ASCII，不受文件编码影响 */
.tools > summary::before{ content: "\FF0B"; }
.tools[open] > summary::before{ content: "\FF0D"; }
.tools > summary:hover{ opacity: .7; }

/* 每行筛选：窄屏横向滚动不换行，标签吸在左边 */
.filter{ display: flex; align-items: stretch; font-size: var(--xs); margin-top: .3rem; }
.fl{ flex: none; width: 2.6em; opacity: .55; display: flex; align-items: center; letter-spacing: .05em; }
.fo{
  display: flex; gap: .1rem; overflow-x: auto; white-space: nowrap;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.fo::-webkit-scrollbar{ display: none; }
.opt{ padding: .45rem .55rem; color: var(--link); text-decoration: none; }
.opt:hover{ text-decoration: underline; }
.on{ padding: .45rem .55rem; background: var(--ink); color: var(--paper); font-weight: 400; }

/* 结果 */
.stat{ font-size: var(--xs); opacity: .55; margin: .7rem 0 .3rem; }
.hit{ position: relative; margin: 0; padding: .42rem 0; }
.hit + .hit::before{
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: 1px; background: var(--ink); opacity: .1;
}
.hit.full{ padding: .5rem 0; }
.t{ color: var(--link); text-decoration: none; }
.t:hover{ text-decoration: underline; }
.hit.full .t{ font-size: var(--md); line-height: 1.3; display: inline-block; margin-top: .05rem; }
.src{ font-size: var(--xs); opacity: .65; }
/* 地址行：完整地址，长的允许换行断开，不撑破版心 */
.src .url{ word-break: break-all; }
/* 摘要最多两行 —— 首屏要装下六到七条，三四行的摘要是最大的一块占用。
   想看全文点进去就是，这里的作用是让人扫得快。 */
.sum{
  margin-top: .1rem; line-height: 1.45;
  font-size: var(--sm); color: var(--desc);   /* 比标题小一档、淡一档，标题才是视线落点 */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
}
.meta{ font-size: var(--xs); opacity: .55; }
/* 紧凑版式（每页 10 条）：标题、摘要、时间各占一行。
   摘要截到 160 字符宽（mb_strimwidth 按显示宽度算，一个汉字算 2）。 */
.hit:not(.full) .t{ display: inline-block; line-height: 1.35; }
.hit:not(.full) .sn{ font-size: var(--sm); color: var(--desc); line-height: 1.45; margin-top: .12rem; }
.hit:not(.full) .meta{ margin-top: .1rem; }
.hit b{ font-weight: 700; }
/* 命中的词只加粗，标题和摘要都不画下划线；标题悬停时整条才出下划线 */
.sum b,.sn b{ color: var(--ink); }   /* 摘要整体淡，命中的词回到正色 */
.tag{
  font-size: var(--xs); border: 1px solid var(--ink); padding: 0 .35rem;
  opacity: .5; white-space: nowrap;
}
.tag.ai{ background: var(--ink); color: var(--paper); opacity: .8; }

/* 翻页 */
.nav{ display: flex; flex-wrap: wrap; gap: .1rem; font-size: var(--xs); margin: 1.1rem 0 .6rem; }
.nav a{ padding: .5rem .7rem; color: var(--link); text-decoration: none; }
.nav a:hover{ text-decoration: underline; }
.nav .on{ padding: .5rem .7rem; }
.off{ padding: .5rem .7rem; opacity: .3; }

main.res{ padding-top: .5rem; }   /* 原来靠 .toolbar 的内边距撑开，行搬走后补回来 */
.foot{ font-size: var(--xs); opacity: .55; border-top: 1px solid var(--ink); padding-top: .6rem; margin-bottom: 1.5rem; }
.foot a{ color: var(--link); text-decoration: none; }
.foot a:hover{ text-decoration: underline; }
.note{ font-size: var(--xs); opacity: .6; }

/* 首页 */
.home{ text-align: center; padding-top: 18vh; }
.home .logo{ font-size: var(--lg); letter-spacing: .55em; padding-left: .55em; display: inline-block; }
.home .sform{ margin: 1.5rem auto 0; max-width: 32rem; }
.home .foot{ border: 0; margin-top: 2.2rem; }

/* 设置页 */
h2{ font-size: var(--lg); font-family: "Songti SC","SimSun",serif; letter-spacing: .1em; margin: 1rem 0 .4rem; }
.opts{ display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin: .7rem 0; }
label{ display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
input[type=radio]{
  appearance: none; width: .95rem; height: .95rem; margin: 0; flex: none;
  border: 1px solid var(--ink); background: var(--paper);
}
input[type=radio]:checked{ background: var(--ink); box-shadow: inset 0 0 0 .18rem var(--paper); }

/* 窄屏下紧凑版式省掉摘要，只留标题与时间，10 条才装得进首屏 */
@media (max-width: 40rem){
  .hit:not(.full) .sn{ display: none; }
}

/* 宽屏：内容收窄成单栏，筛选项恢复换行，控件收紧 */
@media (min-width: 40rem){
  .opt,.on{ padding: .25rem .5rem; }
  .nav a,.nav .on,.off{ padding: .35rem .6rem; }
  .hit{ padding: .32rem 0; }
  .wrap{ max-width: 48rem; padding-inline: 1.4rem; }
  .headin{ gap: 1rem; padding-block: .75rem; }
  .fl{ width: 3.2em; }
  .fo{ flex-wrap: wrap; overflow: visible; white-space: normal; }
  .home{ padding-top: 20vh; }
}

/* PC（64rem 起）：内容靠左占满半屏，右半屏留白；站名与搜索框同行，结果左缘对齐输入框 */
@media (min-width: 64rem){
  /* --gut 是左侧留白，标题栏与结果列共用同一个值，改它两边一起动、对齐不散。
     原来 1.4rem，结果列左缘＝1.4+3+1.6＝6rem；现在 4.4rem，左缘 9rem，正好宽 50%。 */
  :root{ --logow: 3rem; --headgap: 1.6rem; --gut: 4.4rem; }
  .wrap{ width: 50%; max-width: none; margin-inline: 0; padding-inline: var(--gut); }
  .wrap.home{ width: 100%; max-width: 48rem; margin-inline: auto; }   /* 首页仍居中 */
  .headin{ gap: var(--headgap); }
  .logo{ width: var(--logow); }
  .icons{ display: flex; }   /* 窄屏放不下 logo+输入框+5 图标，只在 PC 显示 */
  /* 筛选项不换行：单行横排，向右伸进右半屏的空白，装不下则该行内部横向滚动 */
  .panel{ right: auto; width: calc(100vw - (var(--gut) + var(--logow) + var(--headgap) + var(--gut) + 1rem)); }   /* 左缩进 + 右留白 + 竖滚动条 */
  .fo{ flex-wrap: nowrap; white-space: nowrap; overflow: auto hidden; }
  .wrap.res{ padding-left: calc(var(--gut) + var(--logow) + var(--headgap)); }   /* 结果列左缘＝输入框左缘 */
}

/* 筛选项暂无数据：保留位置，不可点 */
.opt.dim{color:#9aa0a6;cursor:not-allowed;text-decoration:none}
.opt.dim:hover{color:#9aa0a6;background:none}

/* 聚合条目：多家折叠成一条。跟普通结果一样排，不加底色不加标签 ——
   底下那行来源链接本身就说明了它是聚合的。
   百科永远在企信前面，那条规则在后端定，这里不管。 */

/* 来源行：红色小字，各家分开排，悬停才出下划线 */
.aggs{ margin-top: .3rem; display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; }
.aggsrc{ font-size: var(--sm); color: #c00; text-decoration: none; }
.aggsrc:hover{ text-decoration: underline; }

/* 官网标识：认证过的地址，挂在标题后面。样式对着百度那个「官方」做的 */
.own{
  font-size: .72rem; line-height: 1.5; white-space: nowrap;
  color: var(--link); border: 1px solid currentColor; border-radius: .55rem;
  padding: 0 .38rem; margin-left: .35rem; vertical-align: 2px;
}

/* 主题与语言下拉。用 <details> 做，跟筛选工具一个路子，不引 JS。
   面板样式对着开放平台控制台那个：深色底、当前项蓝底带对勾。 */
.pick{ position: relative; display: inline-block; }
.pick > summary{
  list-style: none; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
  width: var(--icon); height: var(--icon); opacity: .55;
}
.pick > summary::-webkit-details-marker{ display: none; }
.pick > summary:hover{ opacity: .9; }
.pick[open] > summary{ opacity: 1; }
.picki{ font-size: .95rem; line-height: 1; }
.picki sub{ font-size: .6em; }

.pick .menu{
  position: absolute; right: 0; top: calc(var(--icon) + .5rem); z-index: 30;
  min-width: 9.5rem; padding: .3rem 0;
  background: hsl(210 10% 18%); color: hsl(0 0% 96%);
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.pick .mi{
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .8rem; font-size: .9rem;
  color: inherit; text-decoration: none; white-space: nowrap;
}
.pick .mi:hover{ background: hsl(210 10% 26%); }
.pick .mi.on{ background: #1a73e8; color: #fff; }
.pick .mii{ width: 1.1rem; text-align: center; }
.pick .mck{ margin-left: auto; }

/* 首页右上角：只有这两个下拉 */
.homebar{ position: absolute; top: .8rem; right: 1rem; display: flex; gap: .9rem; }
