/* ==========================================================================
   免费工具站 - 全站样式
   纯静态站点，无需构建，可直接部署到 Cloudflare Pages
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fc;
  --bg-mute: #eef1f8;
  --text: #0f172a;
  --text-soft: #475569;
  --text-mute: #64748b;
  --border: #e4e8f1;
  --border-strong: #d3dae8;

  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff5ff;
  --accent: #7c3aed;
  --accent-soft: #f5f0ff;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, .08);
  --shadow-md: 0 14px 34px -18px rgba(15, 23, 42, .28);
  --shadow-lg: 0 28px 60px -30px rgba(15, 23, 42, .35);

  --maxw: 1120px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color .18s ease;
}
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
}

p { margin: 0; }

ul, ol { margin: 0; padding-left: 1.25em; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

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

/* ---------------------------------------------------------------- layout - */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: 56px 0; }

.section-head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head--left { margin-left: 0; text-align: left; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 16px;
}

.section-title { font-size: clamp(26px, 3.4vw, 38px); }
.section-sub {
  margin-top: 14px;
  font-size: 17px;
  color: var(--text-soft);
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-side { grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: start; }

/* ---------------------------------------------------------------- header - */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .9);
  flex: none;
}

.brand-text small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-mute);
  letter-spacing: .04em;
  line-height: 1.2;
  margin-top: -2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-soft);
  transition: background .18s ease, color .18s ease;
}
.nav a:hover { background: var(--bg-mute); color: var(--text); }
.nav a.is-active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

.nav-cta {
  margin-left: 8px;
  padding: 9px 18px !important;
  background: var(--text) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border-radius: 10px;
}
.nav-cta:hover { background: #1e293b !important; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ------------------------------------------------------------- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(37, 99, 235, .95);
}
.btn-primary:hover { color: #fff; box-shadow: 0 18px 34px -16px rgba(37, 99, 235, .95); transform: translateY(-1px); }

.btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-sm { padding: 9px 18px; font-size: 14.5px; border-radius: 10px; }

/* ----------------------------------------------------------------- hero -- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 84px;
  background:
    radial-gradient(720px 340px at 12% -8%, #e3edff 0%, rgba(227, 237, 255, 0) 62%),
    radial-gradient(620px 320px at 92% 4%, #f0e9ff 0%, rgba(240, 233, 255, 0) 60%),
    linear-gradient(180deg, #fbfcff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner { max-width: 820px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-dark);
  background: #fff;
  border: 1px solid #d6e3ff;
  border-radius: 999px;
  padding: 7px 16px;
  box-shadow: var(--shadow-xs);
}
.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}

.hero-title {
  margin-top: 22px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.16;
  letter-spacing: -.025em;
}
.hero-title .grad {
  background: linear-gradient(120deg, #2563eb 10%, #7c3aed 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 20px;
  font-size: 18px;
  color: var(--text-soft);
  max-width: 660px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 34px;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--text-soft);
}
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points svg { flex: none; color: #22c55e; }

/* ----------------------------------------------------------------- cards - */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-xs);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #cfdcf5;
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: var(--brand-soft);
  color: var(--brand);
  flex: none;
}
.card-icon--violet { background: var(--accent-soft); color: var(--accent); }
.card-icon--green { background: #e9fbf1; color: #16a34a; }
.card-icon--amber { background: #fff5e6; color: #d97706; }
.card-icon--rose { background: #fff0f3; color: #e11d48; }

.card h3 { font-size: 19px; }
.card p { margin-top: 10px; color: var(--text-soft); font-size: 15.5px; }

.card-link {
  margin-top: 18px;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-link::after { content: "→"; transition: transform .18s ease; }
.card-link:hover::after { transform: translateX(3px); }

.card--link {
  color: inherit;
  text-decoration: none;
}
.card--link:hover { color: inherit; }

.card--tool { padding: 32px; }

.card-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-mute);
  color: var(--text-soft);
  margin-bottom: 16px;
}

/* ------------------------------------------------------------ tool cards - */

.tool-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.tool-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: #fff;
  flex: none;
}
.tool-logo--blue { background: linear-gradient(135deg, #2563eb, #38bdf8); box-shadow: 0 14px 28px -16px rgba(37, 99, 235, .95); }
.tool-logo--violet { background: linear-gradient(135deg, #7c3aed, #ec4899); box-shadow: 0 14px 28px -16px rgba(124, 58, 237, .95); }

.tool-card h3 { font-size: 21px; }
.tool-host {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-mute);
  background: var(--bg-mute);
  padding: 3px 10px;
  border-radius: 7px;
}
.tool-card p { margin-top: 14px; color: var(--text-soft); }

.feature-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}
.feature-list li {
  position: relative;
  padding-left: 26px;
  font-size: 15.5px;
  color: var(--text-soft);
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 9px;
  height: 5px;
  border-left: 2px solid #22c55e;
  border-bottom: 2px solid #22c55e;
  transform: rotate(-45deg);
}

.tool-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* --------------------------------------------------------------- stats --- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat { background: #fff; padding: 28px 26px; text-align: center; }
.stat b { display: block; font-size: 28px; letter-spacing: -.02em; }
.stat span { font-size: 14.5px; color: var(--text-mute); }

/* ------------------------------------------------------------- articles -- */

.post-card { padding: 26px; }
.post-card .meta {
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.post-card h3 { font-size: 18.5px; line-height: 1.45; }
.post-card p { margin-top: 10px; font-size: 15px; }

/* ---------------------------------------------------------------- prose -- */

.page-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 48px;
}
.page-header h1 { font-size: clamp(28px, 4vw, 40px); }
.page-header .lede {
  margin-top: 16px;
  font-size: 17px;
  color: var(--text-soft);
  max-width: 720px;
}

.breadcrumb {
  font-size: 14px;
  color: var(--text-mute);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-mute); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { margin: 0 8px; opacity: .55; }

.prose { max-width: 760px; }
.prose > * + * { margin-top: 22px; }
.prose h2 {
  font-size: 25px;
  margin-top: 52px;
  padding-top: 6px;
}
.prose h3 { font-size: 19.5px; margin-top: 34px; }
.prose p, .prose li { color: #334155; font-size: 16.5px; }
.prose ul, .prose ol { display: grid; gap: 8px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.prose blockquote {
  margin: 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--brand);
  color: var(--text-soft);
  font-style: normal;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  background: var(--bg-mute);
  padding: 2px 7px;
  border-radius: 6px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
}
.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 12px 15px;
  text-align: left;
  vertical-align: top;
}
.prose th { background: var(--bg-soft); font-weight: 600; }

.callout {
  display: flex;
  gap: 14px;
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  border: 1px solid #d7e6ff;
  font-size: 15.5px;
  color: #1e3a8a;
}
.callout--warn { background: #fff8ec; border-color: #fbe3b9; color: #92400e; }
.callout--ok { background: #eefbf3; border-color: #c7efd8; color: #14532d; }

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  font-size: 15.5px;
}
.toc b { display: block; margin-bottom: 12px; font-size: 15px; }
.toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: 7px; color: var(--text-soft); }

/* ------------------------------------------------------------------ faq -- */

.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }

.faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.faq details[open] { border-color: #cfdcf5; box-shadow: var(--shadow-sm); }

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 16.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--text-mute);
  flex: none;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body {
  padding: 0 22px 20px;
  color: var(--text-soft);
  font-size: 15.5px;
}

/* -------------------------------------------------------------- contact -- */

.form {
  display: grid;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-xs);
}
.field { display: grid; gap: 8px; }
.field label { font-size: 14.5px; font-weight: 600; }
.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: inherit;
  font-size: 15.5px;
  color: var(--text);
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { min-height: 148px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.field .hint { font-size: 13px; color: var(--text-mute); }

.info-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: 0; }
.info-row .label { width: 116px; flex: none; font-weight: 600; font-size: 15px; }
.info-row .value { color: var(--text-soft); font-size: 15.5px; }

/* --------------------------------------------------------------- footer -- */

.site-footer {
  margin-top: 90px;
  background: #0f172a;
  color: #cbd5e1;
  padding: 64px 0 32px;
  font-size: 15px;
}
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .brand { color: #fff; }
.footer-brand .brand:hover { color: #fff; }
.footer-brand p {
  margin-top: 16px;
  color: #94a3b8;
  font-size: 14.5px;
  line-height: 1.8;
  max-width: 320px;
}
.footer-col h4 {
  color: #fff;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 11px; }
.footer-col li { font-size: 14.5px; }
.footer-col a { color: #94a3b8; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  margin-top: 48px;
  padding-top: 26px;
  border-top: 1px solid rgba(148, 163, 184, .2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #94a3b8;
}
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }

/* ------------------------------------------------------------ adsense ---- */

.ad-slot {
  margin: 44px auto;
  max-width: 900px;
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-mute);
  font-size: 13.5px;
  background: var(--bg-soft);
  text-align: center;
  padding: 14px;
}
.ad-slot--inline { margin: 34px 0; }

/* -------------------------------------------------------------- helpers -- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mt-56 { margin-top: 56px; }
.muted { color: var(--text-mute); }
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------ responsive - */

@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .nav-toggle { display: grid; }

  .nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav-cta { margin-left: 0; text-align: center; }

  .hero { padding: 68px 0 60px; }
  .section { padding: 60px 0; }
  .grid-2, .grid-3, .grid-side { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .tool-card { grid-template-columns: 1fr; gap: 20px; padding: 26px; }
  .info-row { flex-direction: column; gap: 4px; }
  .info-row .label { width: auto; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .hide-sm { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-actions .btn { width: 100%; }
  .card { padding: 22px; }
}

@media print {
  .site-header, .site-footer, .ad-slot, .hero-actions { display: none; }
}
