/* Thunder Tools — 首页（V8.0 §P0.6）
 *
 * 布局目标不是「好看」，是**一屏之内能看见并点到工具**。
 * 所以这里没有巨型 Hero、没有通栏插画、没有居中的一句口号配三行留白：
 * 首屏从上到下是 H1 → 一句口号 → 三条优势 → 搜索/分类 → 工具网格。
 *
 * 断点按 V8.0 原文：1920→6 列、1440→5–6、1280→5、1024→4、768→3、390→2。
 * 用 max-width 而不是 min-width，是因为默认值必须是**最宽**那一档：
 * 反过来写的话，任何没被媒体查询覆盖到的宽度都会掉到 1 列。
 */

.tt-main {
  max-width: var(--tt-max);
  margin: 0 auto;
  padding: 0 24px 48px;
}

/* ── 首屏文案 ──────────────────────────────────────────────────────────── */

.tt-hero { padding: 30px 0 22px; }

.tt-hero h1 {
  margin: 0;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -.022em;
  line-height: 1.14;
  color: var(--tt-navy);
  max-width: 640px;
  /* 中文标题在 390px 上会剩一个孤零零的「用。」占第二行。
     balance 让两行长度接近，比留着孤字好看得多；不支持的浏览器
     只是退回普通换行，不会坏。 */
  text-wrap: balance;
}

.tt-tag {
  margin: 10px 0 0;
  font-size: 17px;
  color: var(--tt-slate);
  font-weight: 500;
}

.tt-adv {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.tt-adv li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--tt-text-2);
  line-height: 1.4;
}
.tt-adv-ico {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: var(--tt-success); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
/* 第一条是「文件不上传」，用锁的图形，颜色跟其它两条一样是绿：
 * 三条都是「对你有利的事实」，不该用三种颜色暗示其中一条更重要。 */

/* ── 搜索与分类 ────────────────────────────────────────────────────────── */

.tt-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.tt-search {
  position: relative;
  flex: 1 1 240px;
  max-width: 360px;
}
.tt-search-ico {
  position: absolute;
  left: 13px; top: 50%;
  width: 18px; height: 18px;
  transform: translateY(-50%);
  fill: none; stroke: var(--tt-slate); stroke-width: 2;
  stroke-linecap: round; pointer-events: none;
}
.tt-search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  font: inherit;
  font-size: 15px;
  color: var(--tt-navy);
  background: #fff;
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-r-sm);
  transition: border-color .15s, box-shadow .15s;
}
.tt-search input::placeholder { color: var(--tt-slate); opacity: 1; }
.tt-search input:hover { border-color: #C9D3E4; }
.tt-search input:focus { outline: none; border-color: var(--tt-blue); box-shadow: 0 0 0 3px rgba(33,85,239,.18); }

.tt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tt-chip {
  height: 36px;
  padding: 0 15px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--tt-slate);
  background: #fff;
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-r-pill);
  cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
}
.tt-chip:hover { border-color: #C9D3E4; color: var(--tt-navy); }
/* 选中态：蓝底白字 = 5.82:1，AA 合格。
 * 不用「浅蓝底 + 蓝字」那种更柔和的做法，因为那是 2.9:1 左右，
 * 在一个需要快速扫读的筛选条上不合格。 */
.tt-chip[aria-pressed="true"] {
  background: var(--tt-blue);
  border-color: var(--tt-blue);
  color: #fff;
}

/* ── 工具网格 ──────────────────────────────────────────────────────────── */

.tt-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.tt-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 152px;          /* V8.0 要求 150–165px */
  padding: 15px 15px 16px;
  text-decoration: none;
  color: inherit;
  background: var(--tt-white);
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-r);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tt-card:hover {
  border-color: #C9D3E4;
  box-shadow: var(--tt-shadow-hover);
  transform: translateY(-1px);
}
/* 键盘焦点要有环。鼠标点完不留环（:focus-visible 的语义），
   但 Tab 走过来必须能看见「我现在停在哪张卡上」。 */
.tt-card:focus-visible {
  outline: 3px solid var(--tt-blue);
  outline-offset: 2px;
}

.tt-ico {
  width: 40px; height: 40px;
  flex: none;
  margin-bottom: 2px;
  /* 图标是外部 sprite 的 <use>，浏览器按「替换元素」处理，
     宽高必须显式给，否则会塌成 0。 */
}
.tt-name {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--tt-navy);
  letter-spacing: -.01em;
}
.tt-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--tt-slate);
  /* 两行截断：描述本身已经控制在两行以内，这里是防御——
     将来谁把某条文案写长了，卡片高度也不会被它撑破。 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tt-empty {
  margin: 26px 0 0;
  font-size: 15px;
  color: var(--tt-slate);
}

/* ── 隐私说明 ──────────────────────────────────────────────────────────── */

.tt-priv {
  margin: 40px 0 0;
  padding: 22px 24px;
  background: var(--tt-white);
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-r);
}
.tt-priv h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--tt-navy);
}
.tt-priv ul {
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--tt-text-2);
  font-size: 14px;
  line-height: 1.6;
}
.tt-priv li { margin-bottom: 4px; }
.tt-priv-more { margin: 12px 0 0; font-size: 14px; }
.tt-priv-more a { color: var(--tt-blue); font-weight: 600; }

/* ── 品牌图 ────────────────────────────────────────────────────────────── */

.tt-logo { display: block; height: 30px; width: auto; }
.tt-logo-foot { height: 26px; margin-bottom: 8px; }

/* ── 断点 ──────────────────────────────────────────────────────────────── */

@media (max-width: 1799px) {
  .tt-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
  .tt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tt-hero h1 { font-size: 34px; }
}
@media (max-width: 899px) {
  .tt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tt-main { padding: 0 18px 36px; }
  .tt-hero { padding: 24px 0 18px; }
  .tt-hero h1 { font-size: 30px; max-width: none; }
  .tt-tag { font-size: 15.5px; }
  .tt-adv { gap: 8px 18px; }
}
@media (max-width: 559px) {
  .tt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tt-main { padding: 0 14px 32px; }
  .tt-hero h1 { font-size: 27px; line-height: 1.18; }
  .tt-card { min-height: 142px; padding: 13px; }
  .tt-name { font-size: 15px; }
  .tt-ico { width: 36px; height: 36px; }
  .tt-search { max-width: none; flex-basis: 100%; }
  .tt-chips { width: 100%; }
  /* 手机上分类条横向滚动而不是折成两行：
     折行会把工具网格整体往下推 40px，而首屏只有 844px 高。 */
  .tt-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .tt-chips::-webkit-scrollbar { display: none; }
  .tt-chip { flex: none; }
}
