/* SwitchBG — light cool-toned tool site.
   Ported design tokens from the old site theme (navy primary, emerald accent). */
:root {
  --background: #ffffff;
  --foreground: #0f1729;
  --card: #ffffff;
  --secondary: #f1f5f9;
  --muted: #f1f5f9;
  --muted-foreground: #606f85;
  --primary: #1d4ed8;
  --primary-foreground: #ffffff;
  --accent: #10b981;
  --accent-foreground: #ffffff;
  --destructive: #ef4444;
  --border: #e1e7ef;
  --radius: 0.75rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .wrap { padding: 0 1.5rem; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  border-radius: 999px; padding: .5rem 1.25rem;
  background: var(--primary); color: var(--primary-foreground);
  font-size: .875rem; font-weight: 600; text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  transition: transform .15s;
}
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(.98); }
.link-btn {
  color: var(--primary); font-weight: 600; font-size: .875rem;
  text-decoration: underline; text-underline-offset: 4px;
}
.link-btn:hover { text-decoration: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
.brand-logo { height: 2rem; width: auto; }
.main-nav { display: none; align-items: center; gap: 1.75rem; }
@media (min-width: 768px) { .main-nav { display: flex; } }
.main-nav a { color: var(--muted-foreground); font-size: .875rem; text-decoration: none; }
.main-nav a:hover { color: var(--foreground); }

/* ---------- sections / typography ---------- */
.site-main { flex: 1; }
/* 灰蓝内容底色只用于首页(原站仅首页 main 有 bg-secondary/50) */
.site-main:has(#quality) { background: rgba(241,245,249,.5); }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.02em; }
h1 { font-size: 2.25rem; font-weight: 800; margin: 1rem 0 0; text-wrap: balance; line-height: 1.1; letter-spacing: -.025em; }
@media (min-width: 640px) { h1 { font-size: 3rem; line-height: 1; } }
h2 { font-size: 1.5rem; font-weight: 700; margin: 0; }
@media (min-width: 640px) { h2 { font-size: 1.875rem; } }
h3 { font-size: 1.125rem; font-weight: 600; }
section { padding: 4rem 0; scroll-margin-top: 5rem; }
section.tight { padding: 2.5rem 0; }
.narrow { max-width: 42rem; margin: 0 auto; }
.lead { color: var(--muted-foreground); font-size: 1rem; max-width: 42rem; }
@media (min-width: 640px) { .lead { font-size: 1.125rem; } }
p { margin: .5rem 0; }
.section-body p, .page-body p { margin: 1rem 0 0; color: var(--muted-foreground); }
.section-body h3, .page-body h3 { margin: 2rem 0 0; }
.section-body h2, .page-body h2 { margin: 0; }
.section-body strong, .page-body strong { color: var(--foreground); font-weight: 600; }
.page-body { padding: 3.5rem 0 4rem; }
.page-body h1 { margin-bottom: 0; }
.center { text-align: center; }
.hero { position: relative; overflow: hidden; padding-top: 3.5rem; }
/* 内页 hero:单组居中径向渐变 380px(原站内页版) */
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 380px; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 50% -10%, rgba(29,78,216,.10), transparent);
}
/* 首页 hero:三组渐变 520px(原站首页版) */
.hero:has(.hero-grid)::before {
  height: 520px;
  background:
    radial-gradient(ellipse 55% 45% at 18% 0%, rgba(29,78,216,.10), transparent),
    radial-gradient(ellipse 45% 40% at 82% 8%, rgba(16,185,129,.10), transparent),
    radial-gradient(ellipse 40% 32% at 55% 28%, rgba(156,199,252,.16), transparent);
}
@media (min-width: 640px) { .hero:has(.wrap.center) { padding-top: 4.5rem; } }
.hero .wrap { position: relative; }
.hero h1 .hl { position: relative; display: inline-block; }
.hero h1 .hl::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: 6px; z-index: -1; height: 14px; border-radius: 7px; background: rgba(16,185,129,.2); }
@media (min-width: 640px) { .hero h1 .hl::after { bottom: 8px; height: 16px; } }
.hero-sub { margin: 1.25rem auto 0; color: var(--muted-foreground); font-size: 1rem; max-width: 42rem; }
@media (min-width: 640px) { .hero-sub { font-size: 1.125rem; } }
.hero-cta {
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  margin: 1.75rem auto 0; max-width: 28rem;
  border: 2px dashed rgba(29,78,216,.25); border-radius: 1rem;
  background: var(--card); padding: 1.25rem 1.5rem; text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: border-color .15s;
}
.hero-cta:hover { border-color: rgba(29,78,216,.5); }
@media (min-width: 640px) { .hero-cta { flex-direction: row; justify-content: center; gap: 1rem; } }
.hero-cta .pill {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--primary); color: #fff; border-radius: 999px;
  padding: .75rem 1.5rem; font-size: .875rem; font-weight: 600;
}
.hero-cta .pill .pill-ic { width: 1rem; height: 1rem; }
.hero-cta .fmt { font-size: .75rem; color: var(--muted-foreground); }
.hero-note { margin-top: 1rem; font-size: .75rem; color: var(--muted-foreground); }
.hero-note.small { font-size: .75rem; opacity: .8; }
.hero-features { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.hero-features li {
  display: inline-flex; align-items: center; gap: .375rem;
  border: 1px solid var(--border); background: var(--card);
  border-radius: 999px; padding: .375rem .875rem;
  font-size: .875rem; font-weight: 500; line-height: 1.25rem; box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.hero-features li svg { width: .875rem; height: .875rem; color: var(--primary); flex-shrink: 0; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: minmax(0,1fr) auto; gap: 3rem; text-align: left; } }
.hero-compare { display: flex; align-items: center; justify-content: center; gap: .75rem; }
@media (min-width: 640px) { .hero-compare { gap: 1.25rem; } }
.hero-fig { position: relative; aspect-ratio: 24/25; min-width: 0; flex: 1; max-width: 12rem; overflow: hidden; border-radius: .75rem; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,.05); background: var(--secondary); margin: 0; }
@media (min-width: 640px) { .hero-fig { max-width: 18rem; } }
@media (min-width: 1280px) { .hero-fig { width: 18rem; max-width: none; flex: none; } }
.hero-fig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-fig.checker { background-color:#fff;background-image:linear-gradient(45deg,#e2e8f0 25%,transparent 25%),linear-gradient(-45deg,#e2e8f0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e2e8f0 75%),linear-gradient(-45deg,transparent 75%,#e2e8f0 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0; }
.hero-fig figcaption { position: absolute; bottom: .5rem; left: .5rem; border-radius: 999px; padding: .125rem .5rem; font-size: 12px; font-weight: 600; backdrop-filter: blur(4px); }
.hero-fig.before figcaption { background: rgba(17,24,39,.55); color: rgba(248,250,252,.9); }
.hero-fig.after figcaption { background: rgba(255,255,255,.85); color: var(--muted-foreground); }
.arrow-dot { display: flex; width: 2rem; height: 2rem; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; background: rgba(29,78,216,.1); color: var(--primary); font-size: 1.1rem; }
@media (min-width: 640px) { .arrow-dot { width: 2.5rem; height: 2.5rem; } }

/* ---------- tool band ---------- */
.tool-section { padding: 2.5rem 0 1.5rem; }
.tool-frame { border: 1px solid var(--border); background: var(--card); border-radius: .75rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 1.25rem; }
@media (min-width: 640px) { .tool-frame { padding: 2rem; } }

/* ---------- generic band layouts ---------- */
.band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(241,245,249,.4); }
/* 内页 FAQ 区块:原站只有上下边框、无底色 */
#faq.band { background: transparent; }
.section-body { max-width: 42rem; margin: 0 auto; }
.tagline { margin: 1rem 0 0; color: var(--muted-foreground); }

/* ---------- cards / grids ---------- */
.card-grid { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid.four { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .card-grid.three { grid-template-columns: repeat(3, 1fr); } }
.usecase-card { overflow: hidden; border: 1px solid var(--border); background: var(--card); border-radius: 1rem; padding: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.usecase-fig { display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 4/3; overflow: hidden; border-radius: .75rem; border: 1px solid var(--border); background: var(--secondary); position: relative; }
.usecase-fig > div { position: relative; overflow: hidden; }
.usecase-fig > div + div { border-left: 1px solid var(--border); }
.usecase-fig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.usecase-fig .tag { position: absolute; left: .75rem; top: .75rem; z-index: 1; background: var(--background); border-radius: 999px; padding: .25rem .625rem; font-size: .75rem; font-weight: 500; color: var(--muted-foreground); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.usecase-card h3 { margin: 1.25rem 0 0; text-align: center; }
.usecase-card p { text-align: center; font-size: .875rem; }
.usecase-card .link-btn { display: inline-flex; margin: .75rem auto 0; }
.usecase-card .card-foot { display: flex; flex-direction: column; align-items: center; }
.tool-card { display: block; border: 1px solid var(--border); background: var(--card); border-radius: .75rem; padding: 1.25rem; text-decoration: none; color: inherit; transition: box-shadow .15s; }
.tool-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.tool-card h3 { margin: 0; font-size: 1rem; }
.tool-card p { margin: .375rem 0 0; font-size: .875rem; color: var(--muted-foreground); }

/* ---------- why list ---------- */
.why-list { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; gap: 1rem; }
@media (min-width: 640px) { .why-list { grid-template-columns: repeat(2, 1fr); } }
.why-list li { display: flex; align-items: center; gap: 1rem; border: 1px solid var(--border); background: var(--card); border-radius: 1rem; padding: 1.25rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); font-weight: 500; }
.why-ic { display: flex; width: 2.5rem; height: 2.5rem; flex-shrink: 0; align-items: center; justify-content: center; border-radius: .75rem; background: rgba(29,78,216,.1); color: var(--primary); }
.why-ic svg { width: 1.125rem; height: 1.125rem; }
#why { background: linear-gradient(to bottom, var(--background), rgba(241,245,249,.5)); border-top: 0; border-bottom: 0; }

/* ---------- bullet lists (in-page) ---------- */
.dot-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.dot-list li { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .75rem; color: var(--muted-foreground); }
.dot-list li::before { content: ""; margin-top: .5rem; width: .375rem; height: .375rem; flex-shrink: 0; border-radius: 50%; background: var(--primary); }
.dot-list strong { color: var(--foreground); font-weight: 600; }
.num-list { list-style: none; counter-reset: n; padding: 0; margin: 1.5rem 0 0; }
.num-list li { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; color: var(--muted-foreground); counter-increment: n; }
.num-list li::before { content: counter(n); display: flex; width: 1.5rem; height: 1.5rem; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: .75rem; font-weight: 700; }
.num-list strong { color: var(--foreground); font-weight: 600; }

/* ---------- FAQ ---------- */
#quality { background: var(--background); border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px -18px rgba(15,23,41,.08); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { cursor: pointer; padding: 1rem 0; font-weight: 600; font-size: .95rem; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: .25rem; top: 1rem; color: var(--muted-foreground); font-weight: 400; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .a { padding: 0 0 1rem; color: var(--muted-foreground); font-size: .875rem; margin: 0; }
.faq-plain h3 { font-size: 1rem; margin: 2rem 0 0; }
.faq-plain h3:first-of-type { margin-top: 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); background: var(--card); border-radius: .75rem; margin-top: 2rem; }
table { width: 100%; min-width: 640px; border-collapse: collapse; text-align: left; font-size: .875rem; }
thead th { border-bottom: 1px solid var(--border); padding: .75rem 1rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-foreground); font-weight: 600; }
tbody td { border-bottom: 1px solid var(--border); padding: .75rem 1rem; color: var(--muted-foreground); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody td:first-child strong, tbody td strong { color: var(--foreground); }
tr.self-row { background: rgba(29,78,216,.05); }
.badge { display: inline-block; margin-left: .5rem; border-radius: 999px; background: rgba(29,78,216,.1); color: var(--primary); padding: .125rem .5rem; font-size: 12px; font-weight: 700; text-transform: uppercase; }

/* ---------- compare cards (showcase) ---------- */
.compare-grid { display: grid; gap: 2rem; margin-top: 2.5rem; }
@media (min-width: 640px) { .compare-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .compare-grid { grid-template-columns: repeat(3, 1fr); } }
.compare-card { overflow: hidden; border: 1px solid var(--border); background: var(--card); border-radius: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.compare-stage { position: relative; aspect-ratio: 4/3; overflow: hidden; cursor: ew-resize; touch-action: none; user-select: none; background-color:#fff;background-image:linear-gradient(45deg,#e2e8f0 25%,transparent 25%),linear-gradient(-45deg,#e2e8f0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e2e8f0 75%),linear-gradient(-45deg,transparent 75%,#e2e8f0 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0; }
.compare-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-tag { position: absolute; top: .75rem; z-index: 2; background: var(--background); border-radius: 999px; padding: .25rem .625rem; font-size: .75rem; font-weight: 500; color: var(--muted-foreground); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.compare-tag.left { left: .75rem; }
.compare-tag.right { right: .75rem; }
.compare-handle { position: absolute; top: 0; bottom: 0; z-index: 3; width: 2px; background: var(--background); box-shadow: 0 0 0 1px var(--border); cursor: ew-resize; }
.compare-handle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.compare-grip { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--border); background: var(--background); color: var(--foreground); box-shadow: 0 4px 8px rgba(0,0,0,.12); font-size: 1rem; }
.compare-card .cap { padding: 1.25rem; text-align: center; }
.compare-card .cap h3 { margin: 0; }
.compare-card .cap p { margin: .375rem 0 0; font-size: .875rem; color: var(--muted-foreground); }

/* ---------- CTA band ---------- */
.cta-band { border-radius: 1.5rem; background: linear-gradient(to right, var(--primary), var(--accent)); padding: 3.5rem 1.5rem; text-align: center; color: #fff; position: relative; overflow: hidden; }
@media (min-width: 640px) { .cta-band { padding: 3.5rem 3rem; } }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 36rem; margin: 1rem auto 0; font-size: .875rem; }
.cta-band .btn { background: var(--background); color: var(--primary); margin-top: 1.75rem; }

/* ---------- quote / strip ---------- */
.quote-band { border-left: 4px solid rgba(29,78,216,.4); background: rgba(241,245,249,.4); padding: 1rem 1.5rem; margin: 1.5rem 0 0; color: var(--muted-foreground); }
.strip { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--border); background: var(--card); border-radius: .75rem; padding: 1.25rem 1.5rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
@media (min-width: 640px) { .strip { flex-direction: row; } }
.strip p { margin: 0; font-size: .875rem; font-weight: 500; }
.btn-accent2 { display: inline-flex; align-items: center; gap: .5rem; border-radius: 8px; background: #0c8560; color: var(--accent-foreground); padding: .625rem 1.25rem; font-size: .875rem; font-weight: 600; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.08); transition: transform .15s; }
.btn-accent2:hover { transform: scale(1.03); }
.updated-note { font-size: .75rem; font-style: italic; color: var(--muted-foreground); margin-top: 1rem; }
.table-note { font-size: .75rem; color: var(--muted-foreground); margin-top: 1rem; }
.inline-link { color: var(--foreground); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.inline-link:hover { color: var(--primary); }
code { background: var(--secondary); border-radius: .25rem; padding: .125rem .375rem; font-size: .875em; font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); }
.footer-cols { display: grid; gap: 2.5rem; padding: 3rem 0; }
@media (min-width: 640px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-cols { grid-template-columns: repeat(4, 1fr); } }
.footer-title { margin: 0; font-size: .875rem; font-weight: 600; }
.footer-cols ul { list-style: none; margin: 1rem 0 0; padding: 0; }
.footer-cols li { margin-bottom: .625rem; }
.footer-cols a { color: var(--muted-foreground); font-size: .875rem; text-decoration: none; }
.footer-cols a:hover { color: var(--foreground); }
.footer-bottom { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--border); padding: 2rem 0; text-align: center; font-size: .75rem; color: var(--muted-foreground); }
@media (min-width: 640px) { .footer-bottom { flex-direction: row; text-align: left; } }
.footer-bottom p { margin: 0; }
.footer-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.legal-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1rem; }
.legal-nav a { color: var(--muted-foreground); text-decoration: none; }
.legal-nav a:hover { color: var(--foreground); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
