/**
 * 首页 · 与 AI Hub（ai_theme）对齐的 Inter / 大圆角 / 软阴影
 * 作用域：.home-root，避免污染 legacy 工具内页
 */
.site-main:has(.home-root) {
  background: var(--color-surface-base, #f8fafc);
  padding-bottom: 32px;
}

.home-root {
  --home-font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --home-text: #0b1220;
  --home-muted: #5c6578;
  --home-accent: #1e3a8a;
  --home-accent-2: #0891b2;
  --home-border: var(--color-border, #e2e8f0);
  --home-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
  --home-shadow-sm: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
  --home-radius-xl: var(--radius-lg, 18px);
  --home-radius-lg: var(--radius-md, 12px);
  font-family: var(--home-font);
  color: var(--home-text);
  line-height: 1.65;
}

.home-root a {
  color: var(--home-accent);
}

.home-root a:hover {
  color: #172554;
}

.home-strip {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 16px;
  font-size: 13px;
  color: var(--home-muted);
}

.home-strip a {
  text-decoration: none;
  font-weight: 500;
}

.home-strip .home-strip__cta {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--color-accent, #1e3a8a);
  color: #fff !important;
  font-size: 13px;
  box-shadow: var(--home-shadow-sm);
}

.home-strip .home-strip__cta:hover {
  filter: brightness(1.06);
  color: #fff !important;
}

.home-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 16px 28px;
}

.home-hero__panel {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(20px, 4vw, 40px);
  align-items: start;
  border-radius: var(--home-radius-xl);
  padding: clamp(28px, 5vw, 48px) clamp(22px, 4vw, 40px);
  background: var(--color-surface-raised, #fff);
  border: 1px solid var(--home-border);
  box-shadow: none;
  overflow: hidden;
}

.home-hero__panel::before {
  display: none;
}

.home-hero__inner {
  position: relative;
  max-width: none;
}

.home-hero__aside {
  position: relative;
  padding: 16px 18px;
  border-radius: var(--home-radius-lg, 18px);
  background: var(--color-surface-subtle, #f1f5f9);
  border: 1px solid var(--home-border);
}

.home-hero__aside-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--home-muted);
}

.home-hero__aside-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-hero__aside-list li + li {
  border-top: 1px solid var(--home-border);
}

.home-hero__aside-list a {
  display: block;
  padding: 10px 0;
  min-height: 44px;
  color: var(--color-accent, #1e3a8a);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.home-hero__aside-list a:hover {
  text-decoration: underline;
}

.home-hero__kicker {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--home-muted);
  margin-bottom: 10px;
}

.home-hero__title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.home-hero__lead {
  margin: 0 0 22px;
  font-size: 15px;
  color: var(--home-muted);
}

.home-hero__search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.home-hero__search input[type="search"] {
  flex: 1 1 220px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--home-border);
  font: inherit;
  background: var(--color-surface-raised, #fff);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.home-hero__search input[type="search"]:focus {
  outline: 2px solid var(--color-accent, #1e3a8a);
  outline-offset: 1px;
}

.home-hero__search button {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: var(--radius-md, 12px);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: #fff;
  background: var(--color-accent, #1e3a8a);
  box-shadow: none;
}

.home-hero__search button:hover {
  filter: brightness(1.05);
}

.home-ad-top {
  max-width: 1180px;
  margin: 0 auto 20px;
  padding: 0 16px;
}

.home-ad-top__box {
  border-radius: var(--home-radius-lg);
  padding: 12px;
  background: var(--color-surface-raised, #fff);
  border: 1px solid var(--home-border);
  box-shadow: var(--home-shadow-sm);
}

.home-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 992px) {
  .home-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.home-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.home-section {
  border-radius: var(--home-radius-xl);
  padding: clamp(20px, 3vw, 28px);
  background: var(--color-surface-raised, #fff);
  border: 1px solid var(--home-border);
  box-shadow: none;
}

.home-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.home-section__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-section__sub {
  margin: 0;
  font-size: 13px;
  color: var(--home-muted);
}

.home-tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--home-border);
}

.home-tool-list li {
  margin: 0;
  border-bottom: 1px solid var(--home-border);
}

.home-tool-list__link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  padding: 12px 4px;
  text-decoration: none !important;
  color: inherit !important;
}

.home-tool-list__link:hover .home-tool-list__title {
  color: var(--color-accent, #1e3a8a);
}

.home-tool-list__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--home-text);
}

.home-tool-list__desc {
  flex: 1 1 16rem;
  font-size: 13px;
  color: var(--home-muted);
}

.home-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.home-tool-card {
  position: relative;
  display: block;
  height: 100%;
  padding: 18px 18px 16px;
  border-radius: var(--home-radius-lg);
  text-decoration: none !important;
  color: inherit !important;
  background: var(--color-surface-raised, #fff);
  border: 1px solid var(--home-border);
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.home-tool-card:hover {
  border-color: var(--color-border-strong, #cbd5e1);
  background: var(--color-surface-subtle, #f1f5f9);
}

.home-tool-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--home-text);
}

.home-tool-card p {
  margin: 0;
  font-size: 13px;
  color: var(--home-muted);
  line-height: 1.55;
}

.home-chip {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.home-chip--hot {
  background: rgba(30, 58, 138, 0.1);
  color: #1e3a8a;
}

.home-chip--cool {
  background: rgba(8, 145, 178, 0.12);
  color: #0e7490;
}

.home-chip--gen {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

.home-chip--rank {
  background: rgba(15, 23, 42, 0.06);
  color: var(--home-muted);
}

.home-pro-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-warning-text, #78350f);
  background: var(--color-warning-bg, #fffbeb);
  border: 1px solid var(--color-warning-border, #fcd34d);
  box-shadow: none;
  pointer-events: none;
}

.home-pro-badge--inline {
  position: static;
  margin-left: auto;
  min-height: 22px;
}

.home-rank-num {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #1e3a8a, #4338ca);
  box-shadow: var(--home-shadow-sm);
  pointer-events: none;
}

.home-rank-stat {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--home-muted);
}

.home-pricing {
  border-radius: var(--home-radius-xl);
  padding: clamp(22px, 3vw, 32px);
  background: var(--color-surface-raised, #fff);
  color: var(--home-text);
  border: 1px solid var(--home-border);
  box-shadow: none;
}

.home-pricing h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--home-text);
}

.home-pricing__lead {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--home-muted);
}

.home-pricing ul {
  margin: 0 0 20px;
  padding-left: 18px;
  color: var(--color-text-secondary, #334155);
  font-size: 14px;
}

.home-pricing li {
  margin-bottom: 8px;
}

.home-pricing__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 768px) {
  .home-pricing__grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

.home-pricing__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius-md, 12px);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none !important;
  color: #fff !important;
  background: var(--color-accent, #1e3a8a);
  box-shadow: none;
}

.home-pricing__cta:hover {
  background: var(--color-accent-hover, #172554);
  color: #fff !important;
}

.home-pricing table {
  width: 100%;
  font-size: 14px;
  color: var(--home-text);
  border-collapse: collapse;
}

.home-pricing td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--home-border);
}

.home-pricing td:last-child {
  text-align: right;
  font-weight: 600;
}

.home-sidebar-ad--sticky {
  position: sticky;
  top: 72px;
  border-radius: var(--home-radius-lg);
  padding: 12px;
  background: var(--color-surface-raised, #fff);
  border: 1px solid var(--home-border);
  box-shadow: none;
}

.home-sidebar-ad--sticky .adsbygoogle {
  min-height: 250px;
}

.home-blog-panel {
  margin-top: 16px;
  border-radius: var(--home-radius-lg);
  padding: 14px 16px;
  background: var(--color-surface-raised, #fff);
  border: 1px solid var(--home-border);
}

.home-blog-panel h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.home-blog-panel a {
  display: block;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  text-decoration: none;
}

.home-blog-panel a:last-child {
  border-bottom: 0;
}

.home-hot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.home-pricing__badge {
  color: var(--color-warning-text, #78350f);
  font-size: 12px;
  font-weight: 600;
}

.home-pricing__note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--home-muted);
}

.home-sitemap__inner {
  border-radius: var(--home-radius-xl);
  padding: clamp(18px, 2.5vw, 24px);
  background: var(--color-surface-raised, #fff);
  border: 1px solid var(--home-border);
  box-shadow: none;
}

.home-sitemap .footer-nav h3 {
  margin-top: 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--home-text);
}

.home-sitemap .footer-nav h3:first-child {
  margin-top: 0;
}

.home-sitemap .footer-nav a {
  font-size: 13px;
}

@media (max-width: 767px) {
  .home-hero__panel {
    grid-template-columns: 1fr;
  }
}
