/* ============================================================
   cataito 工具箱 · 共享外壳样式
   定义设计令牌（亮/暗），工具页可再用自身样式覆盖（值一致）。
   ============================================================ */
:root {
  --bg: #fbfbfd; --bg-canvas: #f1f2f6; --card: #ffffff; --card-2: #f6f7f9;
  --border: #e6e8ee; --text: #1f2430; --text-2: #5b6472; --text-3: #9aa1ad;
  --accent: #6366f1; --accent-hover: #4f46e5;
  --accent-soft: rgba(99,102,241,0.10); --accent-soft-2: rgba(99,102,241,0.05);
  --radius: 13px; --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,0.06), 0 1px 3px rgba(16,24,40,0.04);
  --shadow-md: 0 10px 30px rgba(16,24,40,0.12);
}
html.dark {
  --bg: #0e1016; --bg-canvas: #0a0c11; --card: #171a21; --card-2: #1c2029;
  --border: #272b35; --text: #eef0f4; --text-2: #aab2bf; --text-3: #717a89;
  --accent: #818cf8; --accent-hover: #6366f1;
  --accent-soft: rgba(129,140,248,0.15); --accent-soft-2: rgba(129,140,248,0.07);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 14px 34px rgba(0,0,0,0.55);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: 1080px;
  margin: 0 auto;
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .2px;
}
.brand__mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.brand__name { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name small { font-size: 10.5px; font-weight: 500; color: var(--text-3); letter-spacing: .4px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none;
  color: var(--text-2);
  font-size: 13.5px;
  padding: 7px 12px;
  border-radius: 9px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--accent-soft); color: var(--accent); }
.nav a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  font-size: 13px; font-weight: 600;
  padding: 7px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.lang-switch:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.lang-switch .globe { width: 15px; height: 15px; }

/* ---------- 主区域 ---------- */
.site-main { max-width: 1080px; margin: 0 auto; padding: 28px 20px 56px; }

.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-3); margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .55; }

/* ---------- 首页 hero ---------- */
.hero { text-align: center; padding: 26px 0 30px; }
.hero__title { font-size: 34px; font-weight: 700; letter-spacing: -.5px; margin: 0 0 12px; color: var(--text); }
.hero__sub { font-size: 15px; color: var(--text-2); max-width: 620px; margin: 0 auto 22px; line-height: 1.6; }
.free-badge {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent); font-size: 13px; font-weight: 600;
}
.free-badge span { display: inline-flex; align-items: center; gap: 6px; }
.free-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- 工具网格 ---------- */
.section-head { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 30px 0 14px; letter-spacing: .3px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tool-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  text-decoration: none; color: inherit;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tool-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.tool-card__top { display: flex; align-items: center; gap: 12px; }
.tool-card__icon {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  background: var(--accent-soft); display: grid; place-items: center; color: var(--accent);
}
.tool-card__name { font-size: 16px; font-weight: 650; color: var(--text); margin: 0; }
.tool-card__desc { font-size: 13px; color: var(--text-2); line-height: 1.55; margin: 0; flex: 1; }
.tool-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.tool-card__go { font-size: 13px; font-weight: 600; color: var(--accent); }
.tag-soon {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  background: var(--card-2); border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 999px;
}
.tool-card.is-soon { opacity: .72; }
.tool-card.is-soon:hover { transform: none; border-color: var(--border); box-shadow: none; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; }
.site-footer__inner {
  max-width: 1080px; margin: 0 auto; padding: 22px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-3);
}
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer__links { display: flex; gap: 16px; }

/* h1 用于 SEO，视觉上作为页面标题 */
.page-h1 { font-size: 26px; font-weight: 700; letter-spacing: -.4px; margin: 4px 0 6px; color: var(--text); }
.page-sub { font-size: 14px; color: var(--text-2); margin: 0 0 22px; line-height: 1.6; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (max-width: 640px) {
  .hero__title { font-size: 27px; }
  .nav { display: none; }
  .brand__name small { display: none; }
}

/* ---------- 工具页主体布局（左工作区 + 右设置面板，两列网格） ---------- */
.tool-intro { padding: 22px 20px 8px; flex-shrink: 0; }
.tool-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  overflow: hidden;
}
@media (max-width: 1080px) {
  .tool-body { grid-template-columns: 1fr; overflow: visible; }
}
