:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-alt: #eef7f4;
  --ink: #17211d;
  --muted: #5d6a64;
  --line: #d9ded8;
  --green: #1f8a5b;
  --green-dark: #13643f;
  --blue: #315bff;
  --amber: #d8901f;
  --rose: #b14b62;
  --shadow: 0 20px 50px rgba(23, 33, 29, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

body::selection {
  background: #b9ead6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

code {
  padding: 0.1rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8faf8;
  color: #2c3a35;
  font-size: 0.9rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
  padding: 0 4vw;
  border-bottom: 1px solid rgba(217, 222, 216, 0.88);
  background: rgba(247, 245, 239, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: 1rem;
}

.topnav {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.topnav a,
.top-action,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.topnav a:hover,
.top-action:hover,
.ghost-link:hover {
  background: #ebe8df;
  color: var(--ink);
}

.top-action {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.top-action:hover {
  background: var(--green-dark);
  color: #fff;
}

.workspace-band {
  padding: 42px 4vw 58px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.55fr);
  gap: 24px;
  max-width: 1220px;
  margin: 0 auto;
  align-items: start;
}

.tool-panel,
.side-rail,
.guide-aside,
.lead-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-panel {
  overflow: hidden;
}

.hero-copy {
  padding: 28px 30px 22px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(31, 138, 91, 0.08), rgba(49, 91, 255, 0.07)),
    var(--surface);
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--green-dark);
  font-size: 0.84rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 0.8rem;
  font-size: 2.25rem;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0.6rem;
  font-size: 1.45rem;
  line-height: 1.25;
}

h3 {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
  line-height: 1.35;
}

.hero-text,
.tool-head p,
.guide-main p,
.lead-layout p,
.faq-box p,
.check-item p {
  color: var(--muted);
}

.hero-text {
  max-width: 720px;
  margin-bottom: 0;
}

.tool-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf7;
}

.tool-tab {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tool-tab:hover {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.tool-tab[aria-selected="true"] {
  border-color: rgba(31, 138, 91, 0.28);
  background: #e8f6ef;
  color: var(--green-dark);
}

.tool-surface {
  min-height: 560px;
}

.tool-view {
  padding: 26px 30px 30px;
}

.tool-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 20px;
}

.tool-head p {
  margin-bottom: 0;
}

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

.field {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.field span {
  color: #34423c;
  font-size: 0.92rem;
  font-weight: 800;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cdd5cf;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 138, 91, 0.14);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.metric-box,
.check-item,
.faq-box,
.affiliate-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.metric-box {
  min-height: 96px;
  padding: 14px;
}

.metric-box span,
.result-label,
.ad-slot span,
.affiliate-card span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.metric-box strong {
  display: block;
  margin-top: 0.45rem;
  overflow-wrap: anywhere;
  font-size: 1.35rem;
  line-height: 1.2;
}

.metric-box:nth-child(1) {
  border-top: 4px solid var(--green);
}

.metric-box:nth-child(2) {
  border-top: 4px solid var(--blue);
}

.metric-box:nth-child(3) {
  border-top: 4px solid var(--amber);
}

.metric-box:nth-child(4) {
  border-top: 4px solid var(--rose);
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
}

.result-row strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1.1rem;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  max-width: 100%;
  padding: 0.6rem 0.95rem;
  border-radius: var(--radius);
  font-weight: 800;
  white-space: nowrap;
}

.primary-button {
  border: 1px solid var(--green-dark);
  background: var(--green);
  color: #fff;
}

.primary-button:hover {
  background: var(--green-dark);
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.ghost-button:hover {
  border-color: #b8c3bb;
  background: #f7faf8;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.seo-results {
  display: grid;
  gap: 12px;
  min-height: 220px;
  margin-top: 16px;
}

.seo-result {
  display: grid;
  gap: 0.55rem;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.seo-result strong {
  color: var(--ink);
}

.seo-result p {
  margin-bottom: 0;
  color: var(--muted);
}

.url-output {
  min-height: 88px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111a17;
  color: #dff7ea;
}

.url-output code {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow-wrap: anywhere;
  line-height: 1.7;
}

.side-rail {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.preview-image {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f0f4f1;
  object-fit: cover;
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 116px;
  padding: 14px;
  border: 1px dashed #aeb8b2;
  border-radius: var(--radius);
  background: #f9faf7;
  text-align: center;
}

.ad-slot strong {
  color: var(--ink);
  font-size: 1rem;
}

.affiliate-panel {
  display: grid;
  gap: 10px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 18px;
}

.section-head.compact {
  align-items: center;
  margin-bottom: 0;
}

.section-head.compact h2 {
  margin-bottom: 0;
  font-size: 1.12rem;
}

.section-head.compact a {
  color: var(--green-dark);
  font-weight: 800;
}

.affiliate-list {
  display: grid;
  gap: 10px;
}

.affiliate-card {
  display: grid;
  gap: 0.45rem;
  padding: 13px;
}

.affiliate-card strong {
  line-height: 1.35;
}

.affiliate-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.affiliate-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: 0.25rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius);
  background: #ecf6f0;
  color: var(--green-dark);
  font-weight: 800;
}

.content-band,
.guide-band,
.lead-band {
  padding: 58px 4vw;
}

.content-band {
  background: #ffffff;
}

.guide-band {
  border-block: 1px solid var(--line);
  background: #f3f7f1;
}

.lead-band {
  background: #fffaf0;
}

.content-wrap {
  max-width: 1220px;
  margin: 0 auto;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.check-item {
  padding: 18px;
}

.check-item p {
  margin-bottom: 0;
}

.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 30px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: #fff1d7;
  color: #7b4d02;
  font-weight: 900;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.guide-main {
  max-width: 760px;
}

.guide-main p {
  font-size: 1.02rem;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.keyword-list li {
  padding: 0.45rem 0.7rem;
  border: 1px solid #bfd6c8;
  border-radius: var(--radius);
  background: #fff;
  color: var(--green-dark);
  font-weight: 800;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.article-card {
  display: grid;
  gap: 0.35rem;
  min-height: 150px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.article-card:hover {
  border-color: #9dc7ae;
  box-shadow: 0 12px 30px rgba(23, 33, 29, 0.08);
}

.article-card span,
.article-meta {
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.article-card strong {
  line-height: 1.35;
}

.article-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.article-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.article-body {
  max-width: 780px;
}

.article-body h1 {
  max-width: 760px;
}

.article-body h2 {
  margin-top: 2rem;
}

.article-body p,
.article-body li {
  color: #405047;
}

.article-body li {
  margin-bottom: 0.45rem;
}

.note-box,
.table-wrap {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.note-box {
  padding: 16px;
}

.note-box strong {
  display: block;
  margin-bottom: 0.45rem;
}

.note-box p:last-child {
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.mini-table th,
.mini-table td {
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.mini-table th {
  background: #f8faf8;
  color: #2c3a35;
}

.timeline-list,
.offer-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.timeline-list li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  list-style: none;
}

.offer-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.6rem 0.85rem;
  border: 1px solid #bfd6c8;
  border-radius: var(--radius);
  background: #fff;
  color: var(--green-dark);
  font-weight: 900;
}

.guide-aside {
  display: grid;
  gap: 16px;
  padding: 16px;
  box-shadow: none;
}

.faq-box {
  padding: 16px;
}

.faq-box h2 {
  font-size: 1.1rem;
}

details {
  border-top: 1px solid var(--line);
  padding: 0.8rem 0;
}

details:first-of-type {
  border-top: 0;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

details p {
  margin: 0.65rem 0 0;
}

.lead-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 0.64fr);
  gap: 24px;
  align-items: start;
}

.lead-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 28px 4vw;
  border-top: 1px solid var(--line);
  background: #17211d;
  color: #fff;
}

.site-footer div {
  display: grid;
  gap: 0.25rem;
}

.site-footer span,
.site-footer a {
  color: #c8d3ce;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  transform: translateY(12px);
  min-width: 180px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 0.8rem 1rem;
  border: 1px solid rgba(23, 33, 29, 0.18);
  border-radius: var(--radius);
  background: #17211d;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.sr-copy {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}

@media (max-width: 980px) {
  .workspace-grid,
  .guide-layout,
  .article-page,
  .lead-layout {
    grid-template-columns: 1fr;
  }

  .side-rail {
    grid-template-columns: 1fr 1fr;
  }

  .preview-image,
  .affiliate-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 18px;
  }

  .topnav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .workspace-band,
  .content-band,
  .guide-band,
  .lead-band {
    padding: 30px 16px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .hero-copy,
  .tool-view {
    padding: 22px 18px;
  }

  .tool-tabs,
  .form-grid,
  .metric-grid,
  .check-grid,
  .article-list,
  .lead-form,
  .side-rail {
    grid-template-columns: 1fr;
  }

  .tool-tabs {
    gap: 6px;
  }

  .result-row,
  .tool-head,
  .section-head,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .ghost-button,
  .ghost-link {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .top-action {
    display: none;
  }

  .brand span:last-child {
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
